Commit Graph

1285493 Commits

Author SHA1 Message Date
Xuhui Lin
dcb85d8d34 spi: rockchip-slave: Support dma cyclic for misc devices
Change-Id: I46ad77c9879f1d89dcc682ac201ff6aac5f46bbe
Signed-off-by: Xuhui Lin <xuhui.lin@rock-chips.com>
2025-07-12 11:22:01 +00:00
Hu Kejun
2be8f9d5fd media: rockchip: aiisp: support picture width over 4096 in airms algo
Change-Id: I5115494f57fc5a745ba066d32fc9e16b3911eb15
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2025-07-12 16:33:28 +08:00
Hu Kejun
2469020021 media: rockchip: aiisp: update airms algo
Change-Id: I6a1d1b9dd9bc120925da57ea817593bf639c4a80
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2025-07-12 16:32:42 +08:00
Zefa Chen
d5a7bbea0d phy: rockchip: mipi dcphy move apb_rst to runtime resume to avoid break dcphy rx
Change-Id: I097eeb7e3fd7decc4f0d1badd335b2d7176ce223
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2025-07-12 15:21:40 +08:00
Zefa Chen
c348e9697f media: rockchip: vicap fixes error of stream off when one_frame mode
change to mulit_frame mode

Change-Id: I97bc6e891342a78a4079d034876c7ad256abff20
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-07-12 15:17:11 +08:00
Zefa Chen
4ec86e75f7 media: rockchip: vicap fixes error of tool node get raw
Change-Id: Ib0bb1c3266002344b9862844a5d5756478f0ed80
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-07-12 15:16:21 +08:00
Zefa Chen
83f73e5ee5 media: rockchip: vicap fixes error of crop enable state
Change-Id: I7d47f5d40e89198aa3369ad2f1c3ecefb183a331
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-07-12 15:10:43 +08:00
Zefa Chen
e66c0f380b media: rockchip: vicap support config complete frame of toisp
Change-Id: I1bea6eb816acbd382f11650e7e736b6a0a65132c
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-07-12 11:59:25 +08:00
Zefa Chen
9a86c24f4d media: i2c: os12d40 support set wbgain and blc
Change-Id: I9068988f9712dcb47db51416c2906d8a0cfce0a2
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-07-11 12:13:41 +00:00
Jianwei Zheng
1d2414b4d1 usb: dwc2: platform: Fix dwc2 resume failed for RK3506 OTG1
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>
2025-07-11 12:04:07 +00:00
Yu Zheng
dce355282d ARM: dts: rockchip: add rv1126b-evb2-v10-dv
Signed-off-by: Yu Zheng <yu.zheng@rock-chips.com>
Change-Id: Ibf7ffb7f1acb6487dfec038d8174211c4f74d7a5
2025-07-11 12:03:17 +00:00
Yu Zheng
39a230accf arm64: dts: rockchip: add rv1126b-evb2-v10-dv
Signed-off-by: Yu Zheng <yu.zheng@rock-chips.com>
Change-Id: I8ef95e04879741ccbf44573fe62020638beb8002
2025-07-11 12:02:46 +00:00
Zefa Chen
383d30e79b media: rockchip: vicap support "cat /proc/rkcif*" to show mipi csi2 error info
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ida097baabb2ab239289c6910ca59ad88203c4fe0
2025-07-11 12:01:01 +00:00
Zefa Chen
87a53f1122 media: rockchip: vicap fixes error triggrer of fs/fe not match when monitor mode enable
Change-Id: I4fa5502064f6a589a87a9e675d00bd0d237a839d
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-07-11 11:59:33 +00:00
Shengfei Xu
02ac4cc230 power: supply: rockchip-charger-manager: Resolving charging anomalies
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>
2025-07-11 11:58:11 +00:00
Ziyuan Xu
6eae8a8147 ARM: dts: rockchip: Add rv1126b-evb2-v10-tb-400w-emmc support
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I082c03df1339eb92ce76af5da9534221ca3cf9b2
2025-07-11 07:17:41 +00:00
Ziyuan Xu
327f216065 ARM: dts: rockchip: Add rv1126b-evb2-v10-tb-400w-spi-nor support
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
2025-07-11 15:10:29 +08:00
Ziyuan Xu
103d8c78c6 arm64: dts: rockchip: remove rv1126b-tb files
AKA rv1126b-thunderboot only support ARM32.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I2775fdbab622b8c90c4b2662ee3f793cd678ddd7
2025-07-11 15:10:07 +08:00
Andrei Kuchynski
26ae45e719 UPSTREAM: usb: typec: displayport: Fix potential deadlock
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)
2025-07-11 11:22:54 +08:00
Jos Wang
3dc042a43b UPSTREAM: usb: typec: displayport: Receive DP Status Update NAK request exit dp altmode
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)
2025-07-11 11:02:24 +08:00
Jos Wang
64e8ddbe73 BACKPORT: usb: typec: tcpm: PSSourceOffTimer timeout in PR_Swap enters ERROR_RECOVERY
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)
2025-07-11 10:49:25 +08:00
Liang Chen
b611ab7090 arm64: configs: optimize latency for PREEMPT_RT
Change-Id: I463d66d69d8ab45435511265d0b977040bc26dac
Signed-off-by: Liang Chen <cl@rock-chips.com>
2025-07-11 02:30:22 +00:00
Liang Chen
0642495196 ARM: configs: add rockchip_rt.config for PREEMPT_RT
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: If4b3ed245a4f0f4a207409fcb42d3430cbe26dbe
2025-07-11 02:29:55 +00:00
Algea Cao
9b1fbae396 drm/bridge: synopsys: dw-hdmi-qp: Fix hdmi is enabled twice during boot
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>
2025-07-11 02:27:42 +00:00
Sandy Huang
4924db6630 drm/rockchip: vop2: only esmart/cluster win0 need to manage done bit
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
2025-07-11 02:27:16 +00:00
Liang Chen
e91e88fce4 arm64: dts: rockchip: rv1126bp: set init-freq to 600M for npu
Change-Id: I535100d95276518ed4df3afba5fbc50d0f37fb72
Signed-off-by: Liang Chen <cl@rock-chips.com>
2025-07-11 02:26:47 +00:00
Liang Chen
b3d69d6c03 arm64: dts: rockchip: rv1126b: adjust opp-supported-hw for npu
Change-Id: Ib151747c2f9f848401ecad9fddea059b4749a4cc
Signed-off-by: Liang Chen <cl@rock-chips.com>
2025-07-11 02:26:47 +00:00
Zefa Chen
a32d290ab8 media: rockchip: vicap fixes size error of rgb888
Change-Id: I695e906bb07e62fb79348d15fe522cd06f506cad
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-07-11 02:23:07 +00:00
Xiao Lin
b68d0098b2 rtc: s35390a: fix the issue where the alarm clock interruption cannot be triggered
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>
2025-07-11 10:11:55 +08:00
Algea Cao
a9e716a7e7 drm/bridge: synopsys: dw-hdmi-qp: Clear mode list when hdmi plug out
When a userspace process that is not the drm master calls
drm_mode_getconnector(), fill_modes() will not be called and
connector mode list will not be updated. If mode list is not
cleared when hdmi plug out, mode list obtained by the use-space
process when hdmi is disconnected will still be the same as when
hdmi is connected. This is inconsistent with the actual situation.
So when the hdmi plug out, connector mode list needs to be
actively cleared. The "modetest -c" printed when the error occurs
is as follows:

Connectors:
id      encoder status          name            size (mm)       modes   encoders
410     409     disconnected    HDMI-A-1        0x0             49      409
  modes:
        index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
  #0 3840x2160 24.00 3840 4092 4180 5500 2160 2168 2178 2250 297000 flags: phsync, pvsync; type: preferred, driver
  #1 4096x2160 60.00 4096 4184 4272 4400 2160 2168 2178 2250 594000 flags: phsync, pvsync; type: driver
  #2 4096x2160 59.94 4096 4184 4272 4400 2160 2168 2178 2250 593407 flags: phsync, pvsync; type: driver
  #3 4096x2160 50.00 4096 5064 5152 5280 2160 2168 2178 2250 594000 flags: phsync, pvsync; type: driver
  #4 4096x2160 30.00 4096 4184 4272 4400 2160 2168 2178 2250 297000 flags: phsync, pvsync; type: driver
  #5 4096x2160 29.97 4096 4184 4272 4400 2160 2168 2178 2250 296703 flags: phsync, pvsync; type: driver
  #6 4096x2160 24.00 4096 5116 5204 5500 2160 2168 2178 2250 297000 flags: phsync, pvsync; type: driver
  #7 4096x2160 23.98 4096 5116 5204 5500 2160 2168 2178 2250 296703 flags: phsync, pvsync; type: driver
  #8 3840x2160 120.00 3840 4016 4104 4400 2160 2168 2178 2250 1188000 flags: phsync, pvsync; type: driver
  #9 3840x2160 119.88 3840 4016 4104 4400 2160 2168 2178 2250 1186813 flags: phsync, pvsync; type: driver
  #10 3840x2160 100.00 3840 4896 4984 5280 2160 2168 2178 2250 1188000 flags: phsync, pvsync; type: driver
  #11 3840x2160 60.00 3840 4016 4104 4400 2160 2168 2178 2250 594000 flags: phsync, pvsync; type: driver
  #12 3840x2160 59.94 3840 4016 4104 4400 2160 2168 2178 2250 593407 flags: phsync, pvsync; type: driver
  #13 3840x2160 50.00 3840 4896 4984 5280 2160 2168 2178 2250 594000 flags: phsync, pvsync; type: driver
  #14 3840x2160 30.00 3840 4016 4104 4400 2160 2168 2178 2250 297000 flags: phsync, pvsync; type: driver
  #15 3840x2160 29.97 3840 4016 4104 4400 2160 2168 2178 2250 296703 flags: phsync, pvsync; type: driver
  #16 3840x2160 25.00 3840 4896 4984 5280 2160 2168 2178 2250 297000 flags: phsync, pvsync; type: driver
  #17 3840x2160 24.00 3840 5116 5204 5500 2160 2168 2178 2250 297000 flags: phsync, pvsync; type: driver
  #18 3840x2160 23.98 3840 5116 5204 5500 2160 2168 2178 2250 296703 flags: phsync, pvsync; type: driver
  #19 1920x1080 120.00 1920 2008 2052 2200 1080 1084 1089 1125 297000 flags: phsync, pvsync; type: driver
  #20 1920x1080 119.88 1920 2008 2052 2200 1080 1084 1089 1125 296703 flags: phsync, pvsync; type: driver
  #21 1920x1080 60.00 1920 2008 2052 2200 1080 1084 1089 1125 148500 flags: phsync, pvsync; type: driver
  #22 1920x1080 60.00 1920 2008 2052 2200 1080 1084 1089 1125 148500 flags: phsync, pvsync; type: driver
  #23 1920x1080 59.94 1920 2008 2052 2200 1080 1084 1089 1125 148352 flags: phsync, pvsync; type: driver
  #24 1920x1080i 30.00 1920 2008 2052 2200 1080 1084 1094 1125 74250 flags: phsync, pvsync, interlace; type: driver
  #25 1920x1080i 29.97 1920 2008 2052 2200 1080 1084 1094 1125 74176 flags: phsync, pvsync, interlace; type: driver
  #26 1920x1080 50.00 1920 2448 2492 2640 1080 1084 1089 1125 148500 flags: phsync, pvsync; type: driver
  #27 1920x1080i 25.00 1920 2448 2492 2640 1080 1084 1094 1125 74250 flags: phsync, pvsync, interlace; type: driver
  #28 1920x1080 30.00 1920 2008 2052 2200 1080 1084 1089 1125 74250 flags: phsync, pvsync; type: driver
  #29 1920x1080 29.97 1920 2008 2052 2200 1080 1084 1089 1125 74176 flags: phsync, pvsync; type: driver
  #30 1920x1080 24.00 1920 2558 2602 2750 1080 1084 1089 1125 74250 flags: phsync, pvsync; type: driver
  #31 1920x1080 23.98 1920 2558 2602 2750 1080 1084 1089 1125 74176 flags: phsync, pvsync; type: driver
  #32 1280x1024 60.02 1280 1328 1440 1688 1024 1025 1028 1066 108000 flags: phsync, pvsync; type: driver
  #33 1280x800 59.91 1280 1328 1360 1440 800 803 809 823 71000 flags: phsync, nvsync; type: driver
  #34 1280x720 60.00 1280 1390 1430 1650 720 725 730 750 74250 flags: phsync, pvsync; type: driver
  #35 1280x720 60.00 1280 1390 1430 1650 720 725 730 750 74250 flags: phsync, pvsync; type: driver
  #36 1280x720 59.94 1280 1390 1430 1650 720 725 730 750 74176 flags: phsync, pvsync; type: driver
  #37 1280x720 50.00 1280 1720 1760 1980 720 725 730 750 74250 flags: phsync, pvsync; type: driver
  #38 1024x768 119.99 1024 1072 1104 1184 768 771 775 813 115500 flags: phsync, nvsync; type: driver
  #39 1024x768 60.00 1024 1048 1184 1344 768 771 777 806 65000 flags: nhsync, nvsync; type: driver
  #40 800x600 60.32 800 840 968 1056 600 601 605 628 40000 flags: phsync, pvsync; type: driver
  #41 720x576 50.00 720 732 796 864 576 581 586 625 27000 flags: nhsync, nvsync; type: driver
  #42 720x576 50.00 720 732 796 864 576 581 586 625 27000 flags: nhsync, nvsync; type: driver
  #43 720x480 60.00 720 736 798 858 480 489 495 525 27027 flags: nhsync, nvsync; type: driver
  #44 720x480 60.00 720 736 798 858 480 489 495 525 27027 flags: nhsync, nvsync; type: driver
  #45 720x480 59.94 720 736 798 858 480 489 495 525 27000 flags: nhsync, nvsync; type: driver
  #46 720x480 59.94 720 736 798 858 480 489 495 525 27000 flags: nhsync, nvsync; type: driver
  #47 640x480 60.00 640 656 752 800 480 490 492 525 25200 flags: nhsync, nvsync; type: driver
  #48 640x480 59.94 640 656 752 800 480 490 492 525 25175 flags: nhsync, nvsync; type: driver
  props:
        1 EDID:
                flags: immutable blob
                blobs:

                value:
        2 DPMS:
                flags: enum
                enums: On=0 Standby=1 Suspend=2 Off=3
                value: 0

Fixes: f1c83fae2e ("drm/bridge: synopsys: dw-hdmi-qp: Clear edid property when hdmi plug out")

Change-Id: I76551a751dd7ebe1da440c38ca5186b1d2b74e93
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-07-10 02:42:23 +00:00
Huibin Hong
5c679e9058 soc: rockchip: fiq_debugger: fix dts property 'rockchip,irq-mode-enable'
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
2025-07-09 19:17:45 +08:00
Damon Ding
a1d62b81ae pwm: rockchip: Remove redundant pwmchip_remove()
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>
2025-07-09 16:44:45 +08:00
Algea Cao
d464908e13 phy: rockchip: inno-hdmi: Support automatic calculation of the phy pll frequency division coefficient
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>
2025-07-09 07:58:26 +00:00
Jon Lin
5ae472ab4e arm64: configs: rockchip_linux_defconfig enable CONFIG_PCIE_FUNC_RKEP
Change-Id: I9e500c5cf8a57e7644a5377a227a4f862a5f9361
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-07-09 07:57:39 +00:00
Jon Lin
d5de9fa853 PCI: rockchip: dw: Add PCIE_DW_ROCKCHIP_RC_DMATEST macro limit for dma test
Change-Id: Ife44ec0ef94bf731ba7b7056833b942608801ed4
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-07-09 06:19:36 +00:00
Shawn Lin
1a93d3ca23 phy: rockchip-snps-pcie3: increase sram init timeout
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>
2025-07-09 06:15:26 +00:00
Ziyuan Xu
185cbe4eea Revert "arm64: dts: rockchip: rv1126b-evb2-v10-tb-400w: Add rndis support"
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>
2025-07-08 18:20:46 +08:00
Ziyuan Xu
7ee99a0968 spi: spi-rockchip-sfc: prefer asynchronous probing when CONFIG_ROCKCHIP_THUNDER_BOOT=y
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
2025-07-08 07:44:28 +00:00
Sugar Zhang
26b5e473be dmaengine: pl330: Fix NULL pointer dereference in pl330_tasklet()
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010
Mem abort info:
  ESR = 0x0000000096000005
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
  FSC = 0x05: level 1 translation fault
Data abort info:
  ISV = 0, ISS = 0x00000005
  CM = 0, WnR = 0
user pgtable: 4k pages, 39-bit VAs, pgdp=0000000007a01000
[0000000000000010] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000
Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
Modules linked in: bcmdhd(O)
CPU: 3 PID: 16268 Comm: brcm_patchram_p Tainted: G        W  O       6.1.118 #135
Hardware name: Rockchip RK3308B EVB AUDIO DDR3 V11 Board + Rockchip RK3308 RGB ExtBoard V10 (DT)
pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : pl330_tasklet+0xf8/0x51c
lr : pl330_tasklet+0x44/0x51c
sp : ffffffc008d23e50
x29: ffffffc008d23e50 x28: 0000000000000001 x27: 0000000000000101
x26: ffffff80018c3848 x25: ffffff80018c3848 x24: ffffffc00877d0f0
x23: ffffff80018c3848 x22: ffffff80018c3870 x21: 0000000000000000
x20: 0000000000000000 x19: ffffff80018c37a0 x18: ffffffc00b8c3b28
x17: ffffffc015c48000 x16: ffffffc008d20000 x15: 0000000000000000
x14: ffffff8002dd170c x13: 0000000000000801 x12: 0000000000000001
x11: 0000000000000003 x10: 0000000000000000 x9 : 000000000029316c
x8 : ffffff801e684200 x7 : 000000000000028e x6 : 0000000000000c00
x5 : ffffff80018c3870 x4 : 0000000000000000 x3 : ffffff80018c3848
x2 : 0000000000000001 x1 : ffffff80018c3848 x0 : 0000000000000000
Call trace:
 pl330_tasklet+0xf8/0x51c
 tasklet_action_common.constprop.0+0x8c/0xd0
 tasklet_hi_action+0x24/0x2c
 handle_softirqs+0x1b0/0x1f0
 _stext+0x10/0x18
 ____do_softirq+0xc/0x14
 call_on_irq_stack+0x24/0x34
 do_softirq_own_stack+0x18/0x20
 __irq_exit_rcu+0x64/0xac
 irq_exit_rcu+0xc/0x14
 el1_interrupt+0x34/0x5c
 el1h_64_irq_handler+0x14/0x1c
 el1h_64_irq+0x64/0x68
 exit_rcu+0x0/0x6c
 do_group_exit+0x30/0x8c
 get_signal+0x174/0x5e4
 do_notify_resume+0x128/0x938
 el0_svc_compat+0x30/0x3c
 el0t_32_sync_handler+0xac/0xf4
 el0t_32_sync+0x14c/0x150

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I42e960bb3975d86754c0dab50f95ac5a1e951b31
2025-07-08 07:34:02 +00:00
Sandy Huang
3ee1df0be9 drm/rockchip: drv: use drm_format_info_bpp() to get bpp
The actual number of bits per pixel need consider block size.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ib0202cb0e8f8167261ddfda2b272a6ff3eae9d47
2025-07-08 06:21:20 +00:00
Xuhui Lin
d9131bbe37 soc: rockchip: rockchip_thunderboot_mmc: Don't continue if timeout happens when loading firmware
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>
2025-07-08 10:17:40 +08:00
Shengfei Xu
43d933d9e4 power: supply: rk817_battery: Optimize temperature filtering functionality
1. Compatibility with abrupt temperature changes: Detect scenarios involving
   consecutive rapid temperature shifts (valid when 5 consecutive abrupt changes occur);
2. Single-spike filtration: Eliminate isolated jumps caused by charging/discharging processes;
3. Automatic detection of maximum RMS output: Monitor the constant current source’s
   effective output limits

Change-Id: Id8351c8fc987df7afa8a839af9e920b2946e8905
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2025-07-08 01:59:28 +00:00
Shengfei Xu
d0eb6d8d55 power: supply: rk817_battery: Support rk817b
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>
2025-07-08 01:59:28 +00:00
Shengfei Xu
57f548caa1 power: supply: rk817_battery: Implement temperature filtering functionality
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>
2025-07-08 01:59:28 +00:00
Shengfei Xu
cefe8cd2e3 power: supply: rk817_battery: Smooth charging/discharging curves
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>
2025-07-08 01:59:28 +00:00
Shengfei Xu
fedcfc9334 power: supply: rk817_battery: Resolve data overflow issue
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>
2025-07-08 01:59:28 +00:00
Shengfei Xu
23397aa1ac power: supply: rk817_battery: Add auto-stage switching for TS crossflow
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>
2025-07-08 01:59:28 +00:00
Shengfei Xu
750233099a power: supply: rk817_battery: Consider the effect of contact resistance
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>
2025-07-08 01:59:28 +00:00
Tao Huang
cb2c6fee8a Merge tag 'v6.1.141'
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
2025-07-07 19:57:35 +08:00
Tao Huang
40fac1a66c Revert "tee: optee: interrupt an RPC when supplicant has been killed"
This reverts commit e6c7ea7d4d.

Replaced by commit ec18520f5e ("tee: optee: Fix supplicant wait loop").

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2025-07-07 19:15:34 +08:00