According to SI test report, BT1120/BT656 drive strength should be
set.
Change-Id: I59aa29fc1c24b0b152fd96a260197fab21790d75
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
According to SI test report, BT1120/BT656 delay line should be set.
Change-Id: Id30655e15daac20ed126683768bab90d7425cb83
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
The RK3506/RV1126B use 7bit signed number to calculate the brightness.
That is [-64, 63].
Fixes: 08fbbdb571 ("drm/rockchip: vop: add support for rk3506")
Change-Id: I64df5bd97e20350e8f3e7db9fe68966f01155dd8
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
Since the decom_mmu uses a dedicated clock, its clk must be included
in the decom's clk management to ensure proper operation.
Change-Id: Id95c4563c092dcf1cab09c190fa82d24018b6a1d
Signed-off-by: Simon Xue <xxm@rock-chips.com>
The utmi iddig signal of RK3506 OTG1 is left floating by default.
Even when the system is suspended and the logic is powered off,
once the system resume and the clock is enabled, the controller's
current mode will be set to Host mode by default, causing dwc2
fail to reinitialize.
To resolve this issue, we found that the ForceHstMode bit in the
GUSBCFG register returns to its default value of 0 after the logic
is powered off. Once the logic power is restored, this bit does not
automatically return to 1. Therefore, we can use this bit to
determine whether the logic has been powered off when dr_mode is
set to Host.
Change-Id: I76c46c9ca7bb9f51f455a6835d3161a3edbeeebb
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
For devices without a charge pump inserted into a PPS charger,
they must be treated directly as PD chargers.
Change-Id: Ib39dcd5e6842f5cefb00c1a76fbef8ccbee06ab1
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
Move rv1126b-tb files from arm64 to arm32, and rename
rv1126b-evb2-v10-tb-400w.dts to rv1126b-evb2-v10-tb-400w-spi-nor.dts.
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ifa141adf272864de4641b78134798d9501c38f54
The deadlock can occur due to a recursive lock acquisition of
`cros_typec_altmode_data::mutex`.
The call chain is as follows:
1. cros_typec_altmode_work() acquires the mutex
2. typec_altmode_vdm() -> dp_altmode_vdm() ->
3. typec_altmode_exit() -> cros_typec_altmode_exit()
4. cros_typec_altmode_exit() attempts to acquire the mutex again
To prevent this, defer the `typec_altmode_exit()` call by scheduling
it rather than calling it directly from within the mutex-protected
context.
Change-Id: I6b97900003c324f5bde6d9ce996871d95f604148
Cc: stable <stable@kernel.org>
Fixes: b4b38ffb38c9 ("usb: typec: displayport: Receive DP Status Update NAK request exit dp altmode")
Signed-off-by: Andrei Kuchynski <akuchynski@chromium.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250624133246.3936737-1-akuchynski@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frawang.cn@gmail.com>
(cherry picked from commit 099cf1fbb8afc3771f408109f62bdec66f85160e)
Although some Type-C DRD devices that do not support the DP Sink
function (such as Huawei Mate 40Pro), the Source Port initiates
Enter Mode CMD, but the device responds to Enter Mode ACK, the
Source port then initiates DP Status Update CMD, and the device
responds to DP Status Update NAK.
As PD2.0 spec ("6.4.4.3.4 Enter Mode Command"),A DR_Swap Message
Shall Not be sent during Modal Operation between the Port Partners.
At this time, the source port initiates DR_Swap message through the
"echo device > /sys/class/typec/port0/data_role" command to switch
the data role from host to device. The device will initiate a Hard
Reset for recovery, resulting in the failure of data role swap.
Therefore, when DP Status Update NAK is received, Exit Mode CMD is
initiated to exit the currently entered DP altmode.
Change-Id: I9dd50aa0df8e0d3f6fd59a35b4da91d4820dd2aa
Signed-off-by: Jos Wang <joswang@lenovo.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250209071926.69625-1-joswang1221@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit b4b38ffb38c91afd4dc387608db26f6fc34ed40b)
As PD2.0 spec ("6.5.6.2 PSSourceOffTimer"),the PSSourceOffTimer is
used by the Policy Engine in Dual-Role Power device that is currently
acting as a Sink to timeout on a PS_RDY Message during a Power Role
Swap sequence. This condition leads to a Hard Reset for USB Type-A and
Type-B Plugs and Error Recovery for Type-C plugs and return to USB
Default Operation.
Therefore, after PSSourceOffTimer timeout, the tcpm state machine should
switch from PR_SWAP_SNK_SRC_SINK_OFF to ERROR_RECOVERY. This can also
solve the test items in the USB power delivery compliance test:
TEST.PD.PROT.SNK.12 PR_Swap – PSSourceOffTimer Timeout
[1] https://usb.org/document-library/usb-power-delivery-compliance-test-specification-0/USB_PD3_CTS_Q4_2025_OR.zip
Change-Id: I12947c108a9e8b49b0e9f6f19ce1296415d37d59
Fixes: f0690a25a1 ("staging: typec: USB Type-C Port Manager (tcpm)")
Cc: stable <stable@kernel.org>
Signed-off-by: Jos Wang <joswang@lenovo.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Amit Sunil Dhamne <amitsd@google.com>
Link: https://lore.kernel.org/r/20250213134921.3798-1-joswang1221@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 659f5d55feb75782bd46cf130da3c1f240afe9ba)
If hdmi uboot logo is disabled and hdmi resolution is HDMI 2.0
resolution(such as 4k60), hdmi->logo_plug_out will be set to true
and won't be clear before hdmi is enabled. After hdmi is enabled,
hdmi->disabled is set to false, and then mode_changed is set to
true. hdmi will be disabled and enabled again.
hdmi->logo_plug_out is mainly used to determine whether hdmi has
been plugged from the end of uboot to the completion of kernel
driver initialization when the uboot logo is enabled. So when
setting it to true, it is necessary to determine whether the
uboot logo is enabled.
Change-Id: I1256f7d5e531dcb3e3ed8209a7839019aadef32e
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
The esmart and cluster sub win done bit is controlled by one bit, and we
must use win0 first, so only esmart/cluster win0 need to manage done bit.
Fixes: fc46321d50 ("drm/rockchip: vop2: add support reserved plane display")
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I16e16e6b4169f29232dde94c925680e6d44ab3f5
The alarm clock failed to register the interrupt handling
function properly, resulting in the alarm clock being
unable to report the alarm event to the framework layer
Change-Id: Ie683776238255740badb1dcd83b56390c79dff05
Signed-off-by: Xiao Lin <xiao.lin@rock-chips.com>
When cpu is ARM-V7 without ATF, the uart interrupt mode is
fiq mode when 'rockchip,irq-mode-enable' is 1, and it is irq
mode when 'rockchip,irq-mode-enable' is 0.
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: Ia648639a52fe8c08893b7be0d4913233fb6d9607
The pwmchip_add() has been replaced with devm_pwmchip_add(), so the
pwmchip_remove() is needless.
Fixes: 19b3f8d830 ("pwm: rockchip: add pwm clk_osc control for wave generator mode")
Change-Id: I2f75be757fc6b8e73f376fe2ec1c251b9a2701be
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
If the required frequency is not in the pre_pll_cfg_table, the
automatically calculated frequency division coefficient will be
used.
The automatic calculation function has been tested at following
frequencies(unit is Mhz):
594/371.25/297/185.625/148.5/108/92.8125/74.25/59.4/33.75/27/25.2
Change-Id: If58e12c284dc315c82043600edec6cb313423550
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
It's reported that one of RK3568 boards could be timeout when doing
s2r test. Increasing the timeout value solves the problem. At this
time, reuse RK_PCIE_SRAM_INIT_TIMEOUT instead.
Change-Id: I9a935104cf3cf6058d69181c4604749692292ff9
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
The RV1126B-EVB2 doesn't support u3, and other usb nodes had beed
defined in base dtsi.
This reverts commit 2b322acaa7.
Change-Id: Ie960b9cfabfc2f79ffe5e67124bb36ec042eb6c5
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Save boot time about 5ms on rv1126b-evb2-v10-tb-400w board.
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ie70a3e96c88d71bbc78729cbc64ead792fe319fc
The actual number of bits per pixel need consider block size.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ib0202cb0e8f8167261ddfda2b272a6ff3eae9d47
If mmc read timeout and continue start decom, the phenomenon is that
decom error, and it's more difficult to locate the true reason.
Change-Id: I95b2f2ac46764485bced6f86a715cfc5b7c80ef0
Signed-off-by: Xuhui Lin <xuhui.lin@rock-chips.com>