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>
The RK817b fuel gauge has incorporated the following enhancements:
The constant voltage (CV) charging levels have been expanded.
However, after modifying the level switching function bit, the level
value must be forcibly written again to activate the change; otherwise,
the level switching cannot be increased. The constant current source
for temperature testing has added 80μA, 100μA, 120μA, and 160μA levels
to elevate the constant current value, thereby reducing the impact of
negative contact resistance on sampling accuracy
Change-Id: I9f253c3a89f70a126ba4d72483afe02ea5be2f52
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
Implement temperature filtering functionality to mitigate abrupt
temperature fluctuations caused by probabilistic acquisition of
erroneous thermistor resistance values.
Change-Id: Iedda4af3f75e3cee1b132e659857a2c032681d3a
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
Retain the remainder of the smoothing coefficient calculation
for use in the next iteration to ensure continuity.
Change-Id: Iea5769149a9df4d294a721e43df7c2e6583a8e4f
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
Data overflow during fast-charging may cause the battery
percentage to freeze near full capacity.
Change-Id: I1c9d8108196c7a102e1fd251cbda86cbfbaeffe8
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
Added automatic stage switching functionality for the TS crossflow
current source. To mitigate the impact of contact resistance and
enhance the sampling accuracy of the thermistor voltage, the current
strategy prioritizes using higher current ranges of the TS constant
current source while remaining within the ADC's sampling range. The
system now employs software-based monitoring of the thermistor's
voltage to dynamically adjust the current source's output stage.
Change-Id: I92e9165280c932b987b85530a9b6792c6b817187
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
Incorporate calculations for negative terminal contact resistance
to minimize errors in thermistor resistance measurements, particularly
deviations in high-temperature regions caused by voltage drops across
the contact resistance.
Change-Id: Iaae24e44649a31c3f81fd4f7e96293d6d14204f3
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
This is the 6.1.141 stable release
* tag 'v6.1.141': (3704 commits)
Linux 6.1.141
net: ethernet: ti: am65-cpsw: Lower random mac address error print to info
platform/x86: thinkpad_acpi: Ignore battery threshold change event notification
platform/x86: fujitsu-laptop: Support Lifebook S2110 hotkeys
NFS: Avoid flushing data while holding directory locks in nfs_rename()
nvme-pci: add NVME_QUIRK_NO_DEEPEST_PS quirk for SOLIDIGM P44 Pro
spi: spi-sun4i: fix early activation
um: let 'make clean' properly clean underlying SUBARCH as well
platform/x86: thinkpad_acpi: Support also NEC Lavie X1475JAS
nfs: don't share pNFS DS connections between net namespaces
HID: quirks: Add ADATA XPG alpha wireless mouse support
coredump: hand a pidfd to the usermode coredump helper
fork: use pidfd_prepare()
pid: add pidfd_prepare()
coredump: fix error handling for replace_fd()
perf/arm-cmn: Initialise cmn->cpu earlier
perf/arm-cmn: Fix REQ2/SNP2 mixup
net_sched: hfsc: Address reentrant enqueue adding class to eltree twice
arm64: dts: qcom: sm8350: Fix typo in pil_camera_mem node
af_unix: Fix uninit-value in __unix_walk_scc()
...
Change-Id: I80c048bb313ef26f13f7809a84c21cee17f220e2
Hardware suggests adjusting the 800mV voltage to 900mV.
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
Change-Id: Ice645a47138b4905053e8bf6d1a903c616a1c719
The user can update the dimming data via "DIMMING_DATA" property, and
it will be sent to the panel supported local dimming function in the
rockchip dimming panel driver.
Change-Id: I7dba541450fce86be064d0205af0f595b1712aea
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
In order to support the loader protect function of more panel
drivers, we add the DRM panel as part of Rockchip DRM sub devices.
The panel-simple driver always is regarded as a panel driver demo of
Rockchip platforms, so we first add the Rockchip DRM sub_dev for it.
The panel drivers that adapt to Rockchip DRM drivers can call
rockchip_drm_register_sub_dev()/rockchip_drm_unregister_sub_dev() to
register/unregister DRM sub_dev, and then invoke
rockchip_drm_panel_loader_protect() to achieve the panel loader
protect function.
Change-Id: Ibc302c3f3677e0c55545e90af29d7a87444c2e21
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>