Commit Graph

1285803 Commits

Author SHA1 Message Date
Shengfei Xu
11dd45bfb8 arm64: dts: rockchip: rk3588-evb10: Add ina226 node
Change-Id: I488fa4acf81885118e54e03cd720f15f34247c8b
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2025-09-05 09:38:00 +08:00
Shengfei Xu
8f37891624 arm64: configs: rockchip_linux_defconfig enable CONFIG_SENSORS_INA2XX
The main function is to obtain voltage and current, currently used for
testing the input voltage and input current of the RK1820 small board on
the RK3588 to determine the current load.

Change-Id: Ibfe1babfa0a6fba11008a3b19d3c09e354b4674a
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2025-09-04 20:15:55 +08:00
Caesar Wang
ff98cc67d0 arm64/configs: rockchip_linux_defconfig: enable CONFIG_HWSPINLOCK_ROCKCHIP
Change-Id: I81f75a71d612d8c94e8a7950db616a80ea5e2ae8
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2025-09-04 11:34:54 +08:00
Caesar Wang
d52be97549 arm64/configs: rv1126b.config: enable CONFIG_ROCKCHIP_DVBM
Change-Id: I03fd425806214bda651a2c78080cbce88847b7b9
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2025-09-04 11:31:38 +08:00
Guochun Huang
d0f521ef68 drm/rockchip: dsi: solve dsi failed to enter command mode before system sleeping
dsi may failed to send command to panel before system sleeping:

[   95.191478][  T336] dw-mipi-dsi2 27d80000.dsi: failed to enter command mode
[   95.211617][  T336] dw-mipi-dsi2 27d80000.dsi: [drm:cri_fifos_wait_avail] *ERROR* command interface is busy
[   95.211744][  T336] panel-simple-dsi 27d80000.dsi.0: failed to write dcs cmd: -110

Change-Id: I24ea8bda3fc001145120c69e73bc786a1843a2a1
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2025-09-04 03:14:47 +00:00
Caesar Wang
7f26bae328 arm64/configs: enable CONFIG_DMABUF_PARTIAL for rockchip_linux_defconfig
Change-Id: If7c07bb84eebcca14471077590c5a461859c8c9b
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2025-09-04 09:58:20 +08:00
Zhibao Huang
53adf7a62f ARM: configs: rockchip_linux_defconfig enable RK628 hdmitx and videoin
Change-Id: Ie71e3c0f9a7b351058e5fc64c686a6355ca50ce1
Signed-off-by: ZhiBao Huang <hzb@rock-chips.com>
2025-09-03 08:42:02 +00:00
Jon Lin
6d1a9ac5db misc: rockchip: pcie-rkep: Use the matching dma_mmap_coherent
The memory allocated by dma_alloc_coherent can be mapped using the
matching dma_mmap_coherent interface.

Change-Id: I7289d490771a86985ec5ed19af5c3cbbfb9810c2
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-09-03 03:56:49 +00:00
Frank Wang
3d0138ac35 usb: storage: Add quirk for Teclast CoolFlash
During the long-term loop playback test of videos stored in the
USB flash drive, it was found that the Teclast CoolFlash drive
(idVendor=346d, idProduct=5678) disconnects abnormally, and the
serial port reports the following error messages.

[  T227] xhci-hcd xhci-hcd.7.auto: Timeout while waiting for setup device command
[  T227] usb 2-1: device not accepting address 2, error -62
[  T227] xhci-hcd xhci-hcd.7.auto: Timeout while waiting for setup device command
[  T227] usb 2-1: device not accepting address 2, error -62
[ T7577] xhci-hcd xhci-hcd.7.auto: xHCI host not responding to stop endpoint command
[ T7577] xhci-hcd xhci-hcd.7.auto: xHCI host controller not responding, assume dead
[ T7577] xhci-hcd xhci-hcd.7.auto: HC died; cleaning up
[  T227] xhci-hcd xhci-hcd.7.auto: Timeout while waiting for stop endpoint command
[ T7578] usb 2-1: USB disconnect, device number 2
[  T227] sd 1:0:0:0: [sde] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=DRIVER_OK cmd_age=27s

Adding this quirk to limit max_sectors to 64 sectors to avoid issue
occurring.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Ie2f72a5d95e566818789f1280452cad239a57d62
2025-09-03 03:55:22 +00:00
Ziyuan Xu
a0f99badf0 ARM: dts: rockchip: rv1126b-thunder-boot: Add i2c3 clocks to thunder_boot_rkisp
Change-Id: Ifcdc0b3a3acf5a34ed3f95fc1a088636175d1005
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2025-09-03 03:55:08 +00:00
Zefa Chen
1f9a1cc25f media: rockchip: vicap distinguish share interrupts
Change-Id: Idaae50c8a1e6a9ea897b0063c4e181866b32e490
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-09-03 11:49:06 +08:00
LiuDiMing Lin
c7314afb32 ARM: configs: rv1126b-tb: Support SC850SL
Signed-off-by: LiuDiMing Lin <fenrir.lin@rock-chips.com>
Change-Id: I43f2c14fa52a8962d4c3024c427575235de2e218
2025-09-03 03:39:54 +00:00
LiuDiMing Lin
60f3ee74d0 ARM: dts: rockchip: Add rv1126b-evb2-v10-tb-800w-emmc support
Signed-off-by: LiuDiMing Lin <fenrir.lin@rock-chips.com>
Change-Id: Ie4d07b4c2d27e12422e4a9c22146c63814e53269
2025-09-03 03:39:48 +00:00
Sugar Zhang
3e176f1746 arm64: dts: rockchip: rv1126b: Add spec-sn for cpuinfo
RV1126B:
rockchip-cpuinfo cpuinfo: SoC            : 1126xb01

RV1126B-P:
rockchip-cpuinfo cpuinfo: SoC            : 1126xb10

Note:

* x: don't care.
* bit[7~0]: 0x1 ~ 0x1a --- A ~ Z

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ibe21215fd1829e19aea6070419ee565abf05ca97
2025-09-03 10:53:30 +08:00
Sugar Zhang
53c6a1e7e3 soc: rockchip: cpuinfo: Add RV1126B-P
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I1f8db7fbd27ec0bbd68c341d10bf647ef3e157b2
2025-09-03 10:53:29 +08:00
Sugar Zhang
50947fe0d6 soc: rockchip: cpuinfo: Add rockchip_set_spec_sn
Parse 'spec-sn' as rockchip_soc_id bit[7:0].

e.g.

cpuinfo {
	compatible = "rockchip,cpuinfo";
	nvmem-cells = <&otp_id>, <&cpu_version>, <&cpu_code>, <&specification_serial_number>;
	nvmem-cell-names = "id", "cpu-version", "cpu-code", "spec-sn";
};

* bit[7~0]: 0x1 ~ 0x1a --- A ~ Z

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ic1d3d384343f4bde0e65c7826260d5dcc5149e80
2025-09-03 10:53:21 +08:00
Simon Xue
4827685ea8 media: videobuf2-cma-sg: support rk-system-heap
Change-Id: I49f03a6221279882a02d5b11cf76fc85f5d3c931
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2025-09-03 02:01:26 +00:00
Simon Xue
4cab224038 dma-buf: rk_heaps: add rk-system-heap
Change-Id: Iebcb584b76f528140a8621a33bf554f413075abd
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2025-09-03 01:58:30 +00:00
Zefa Chen
8bf958c071 media: rockchip: vicap disables its dma adapter when in debug mode
Change-Id: If30a5b3011734d5ae1a7c76f72753d0e1906a2ac
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-09-03 01:40:44 +00:00
Xing Zheng
f97790a06e soc: rockchip: aoa_middleware: remove global variables as much as possible to avoid multi-core racing issues
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: If08e2f68a86c61fc94f58371f2b9e78ffbf8fc3c
2025-09-03 09:13:41 +08:00
Xing Zheng
5806024db1 soc: rockchip: aoa_middleware: fix the log storm caused by DMA interrupt not being closed during repeated insmod
Abnormal log appears steps:

insmod rk_aoa.ko
start sample_aoa_capture
kill sample_aoa_capture
rmmod rk_aoa
insmod rk_aoa.ko
----
[  788.184730] Invalid dma_count: 110
[  788.200733] Invalid dma_count: 111
[  788.216741] Invalid dma_count: 112
[  788.232745] Invalid dma_count: 0
[  788.248748] Invalid dma_count: 1
----

Therefore, we need to make sure that the DMA interrupt is disabled
again when rmmod rk_aoa.ko.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: If9ebff47b8307c2f1759678e5aa050f530ae5041
2025-09-03 09:13:35 +08:00
Xing Zheng
42b93983b3 soc: rockchip: aoa_middleware: fix NULL pointer during rmmod rk_aoa.ko
Because the call:
  platform_set_drvdata(pdev, am_d);

in aoa_mmap_probe() is overwritten by the subsequent call:
  platform_set_drvdata(pdev, amw_d);

therefore, the am_d handle needs to be saved separately. Also, previously allocated IRQ and
platform resources must be released.

And, fix the issue where repeated insmod operations couldn't be performed due to resource usage.

After successfully executing the command `insmod rk_aoa.ko` for the first time,
executing `rmmod rk_aoa` to uninstall the file and then executing `insmod rk_aoa.ko`
again will result in the following error:

----
[ 93.352370] platform 208b0000.aoa: can't request region for resource [mem 0x208b0000-0x208b0fff]
[ 93.352401] aoa-middleware aoa_middleware: probe rockchip aoa failed: -16
[ 93.352411] aoa-middleware: probe of aoa_middleware failed with error -16
----

Furthermore, the pdev functions for aoa_drv and lp_rkdma are manually probed via
aoa_middleware and cannot be automatically released via the devm mechanism.

Therefore, you must manually allocate resources in the probe function and release
them manually in the remove function.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I454c970de620f1dc7007bf530e2e0650c81066e4
2025-09-02 20:15:51 +08:00
Wei Dun
09c47e99df media: rockchip: vpss: set stride 0 for 4-byte-align stride
Change-Id: I91537bccf3475f0859e3f47faa259b84969e0753
Signed-off-by: Wei Dun <willam.wei@rock-chips.com>
2025-09-02 10:27:23 +00:00
Yandong Lin
993b7f02f5 iommu: rockchip: Register pm ops to LATE_SYSTEM_SLEEP_PM_OPS
Some master device resume early but the iommu has not yet resume, which
will cause the iommu to be inaccessible.
So set LATE_SYSTEM_SLEEP_PM_OPS for iommu pm ops, which will resume early and suspend late.

Change-Id: I9424198900a56004098e8cf6c3194baa62eeda09
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-09-02 10:12:29 +00:00
Yuefu Su
2fe7f95acf ARM: dts: rockchip: rv1126b-evb2-v10-tb-400w-emmc: fix isp reserve memory error
Signed-off-by: Yuefu Su <yuefu.su@rock-chips.com>
Change-Id: I7577ec906a7d4713873311d91441eff93ef53ef4
2025-09-02 10:09:10 +00:00
Zefa Chen
93945464f5 include: uapi: rkcif-config: add describe for quick stream control
Change-Id: I8fa27286cea0972f4967f0fa91611b499d9a7358
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-09-02 10:04:07 +00:00
Zefa Chen
45d263f7e4 media: rockchip: vicap skip cache resume_mode when it is an illegal value
Change-Id: I01b080794e1a7cd601f4418ef313268be1228313
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-09-02 10:03:32 +00:00
Yuefu Su
7e8e41f4df ARM: dts: rockchip: rv1126b-thunder-boot: Add DCLK_CSI2HOST0 to protect
Signed-off-by: Yuefu Su <yuefu.su@rock-chips.com>
Change-Id: I9a5a48974ca95cab01847f479b3443b200434d9a
2025-09-02 09:17:34 +00:00
Algea Cao
5672204e8a drm/rockchip: drv: Fix kernel-doc warning
Fix warning `warning: Cannot understand  * @vrefresh_khz`

Fixes: d0e8f558bc ("drm/rockchip: vop2: Support hdmi qms-vrr")
Change-Id: Ic41739628726ee5c36f951750b24e01515c62e99
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-09-02 09:11:24 +00:00
Zefa Chen
750ba34f19 media: rockchip: vicap clean cache of rdbk_rx_buf after stream off
Change-Id: I5c7d1779fe81ab01bdabf48e197ac80fbf680766
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-09-01 07:22:48 +00:00
Sugar Zhang
6094a7765e ASoC: rockchip: i2s-tdm: Compatible for deprecated property 'clk-trcm'
In kernel 6.1 and later versions, the property 'clk-trcm' has been updated:

  rockchip,clk-trcm -> rockchip,trcm-sync-tx/rx-only

Not all products' DT have been updated to use the new property. Therefore,
still support for old property for now, and a prompt is logged to suggest
to adopt the new property.

The old property will be removed in a future version.

Log:

  Deprecated property 'rockchip,clk-trcm', please use 'rockchip,trcm-sync-tx/rx-only' in DT

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I594ba932486440d6eefc65abb54516d530ad090b
2025-09-01 09:05:37 +08:00
Algea Cao
4f0e1facb7 drm/rockchip: vop2: Support hdmi fva
Change-Id: If999183facd14678d6a8124efb1fc3a79bd43a79
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-08-29 16:39:45 +08:00
Algea Cao
5a89a1cb8b drm/bridge: synopsys: dw-hdmi-qp: Support qms-vrr
Change-Id: Idad7f638df53c78bbaf4485623a326d723e2892b
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-08-29 16:39:25 +08:00
Algea Cao
d0e8f558bc drm/rockchip: vop2: Support hdmi qms-vrr
Change-Id: Icc2931661b50a3a8168a98b983a676a74a9ba9da
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-08-29 16:17:59 +08:00
Algea Cao
da450eccf5 drm/rockchip: drv: Support parse vrr capbility in edid scds
Change-Id: Iae91fe5ed41e2602bf94817d659f81586e2cb774
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-08-29 16:08:29 +08:00
ZhengRong Ruan
78d43276e0 ARM: dts: rockchip: add rv1126b-evb2-v12-fastboot-spi-nor.dts
Signed-off-by: ZhengRong Ruan <ryan.ruan@rock-chips.com>
Change-Id: If77f8ef62b32007a7ab6e04de0ad1138bbab645a
2025-08-29 06:09:37 +00:00
ZhengRong Ruan
19441b6d78 arm64: dts: rockchip: add rv1126b-evb2-v12-fastboot-spi-nor.dts
Signed-off-by: ZhengRong Ruan <ryan.ruan@rock-chips.com>
Change-Id: I162eb480907811378ed8d92514dbea56a1617ee5
2025-08-29 06:09:18 +00:00
Yu Qiaowei
a79b096740 video: rockchip: rga3: remove useless mutex_unlock
Fixes: c09c257b5d ("video: rockchip: rga3: fix map/unmap buffers in mutex_lock")

Change-Id: Ic56df7f2c7ae6a44a5fe38afd04e33fc9e2c47cb
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
2025-08-29 02:55:59 +00:00
ZhengRong Ruan
2e2bf5a3c9 ARM: dts: rockchip: add rv1126b-evb2-v12-fastboot-spi-nand.dts
Signed-off-by: ZhengRong Ruan <ryan.ruan@rock-chips.com>
Change-Id: I3784611206281c27536e9d1d27440a0c5573f235
2025-08-29 01:24:13 +00:00
ZhengRong Ruan
df347526e6 arm64: dts: rockchip: add rv1126b-evb2-v12-fastboot-spi-nand.dts
Signed-off-by: ZhengRong Ruan <ryan.ruan@rock-chips.com>
Change-Id: I6434268022e5e65234d25cfdc0daf31776786a00
2025-08-29 01:23:50 +00:00
Yao Xiao
30e769eb27 net: mac80211: Added p2p0 for ap mode in softmac
Change-Id: I364d7bc0a51907c9518f83e5a49697b00ee9cc11
Signed-off-by: Yao Xiao <xiaoyao@rock-chips.com>
2025-08-29 01:22:47 +00:00
Simon Xue
c0d2580727 iommu/rockchip: add support pagefault fake mode
Fake mode accesses memory using the DTE address as the final physical
address on page fault, ignoring reads and discard writes. This resolves
VOP mmu hang issues caused by page faults.

Change-Id: I6b37b79a425c0341e53e0c8a786767a4b7da304e
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2025-08-28 08:47:57 +00:00
Wang Panzhenzhuan
7552dcf31c media: rockchip: cif: subdev-itf add update sensor info in s_power
cif subdev-itf need to update sensor info in s_power, fix
mipi switch case info error issue.

Change-Id: I1ce93c31e4b3c1631dac4c86e30c65b6d4503624
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
2025-08-28 08:30:21 +00:00
Wang Panzhenzhuan
ea8ce0984a media: i2c: ov08d10: fix wrong no ioctl return value
Wrong noioctl return value cause rkisp get cfg failed,
so fix it.

Change-Id: I70e310c35a565369ea760a06f45465f78a0c321b
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
2025-08-28 08:30:21 +00:00
Jon Lin
1df44e9668 misc: rockchip: pcie-rkep: Repair accidental deletion of ioctl PCIE_EP_RESET_CTRL
Fixes: 8633bf3947 ("misc: rockchip: pcie-rkep: Support continuous buffer")
Change-Id: I29bcf73f5af3d1e1a45fbb16da0b09cda9ff3f46
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-08-28 07:11:28 +00:00
Shawn Lin
28c7bb690f arm64: rockchip_linux_defconfig: Enable CONFIG_NVME_HWMON
Change-Id: Iabcbe619c415ae9bc4ab98982ab368f3b03c1008
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2025-08-28 11:23:18 +08:00
XiaoDong Huang
1825fc5818 rpmsg: rockchip_test: fix compile error
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: Ic9a26216e2d6494b3ce0856483ab0358250bf837
2025-08-28 01:20:38 +00:00
Jkand Huang
fbd92843d2 arm64: dts: rockchip: rv1126b-evb2-v10.dtsi: adjust voltage ranges for vdd_cpu and vdd_npu
Signed-off-by: Jkand Huang <jkand.huang@rock-chips.com>
Change-Id: Iddef11758f63ea31643898436376c2ff040d9f4d
2025-08-28 01:18:58 +00:00
Jkand Huang
7914308c23 arm64: dts: rockchip: rv1126b-pinctrl: set all dsm pins to pcfg_pull_down
Signed-off-by: Jkand Huang <jkand.huang@rock-chips.com>
Change-Id: I8251cddc014d8a6358047ea4d747a62960d8c900
2025-08-28 01:18:16 +00:00
Jkand Huang
5f5f85cab7 arm64: dts: rockchip: rv1126b-evb2-v10.dtsi: dsm use rn and rp pins
Signed-off-by: Jkand Huang <jkand.huang@rock-chips.com>
Change-Id: I63573f4cd158410d60cd522a3fbf4622f08cf3c3
2025-08-28 01:18:16 +00:00