Commit Graph

1285788 Commits

Author SHA1 Message Date
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
Jon Lin
8633bf3947 misc: rockchip: pcie-rkep: Support continuous buffer
1.Add continuous buffer support:
    alloc continuous buffer by ioctl PCIE_EP_CONTINUOUS_BUFFER_ALLOC
    free continuous buffer by ioctl PCIE_EP_CONTINUOUS_BUFFER_FREE
    mmap continuous buffer virtual addr by ioctl PCIE_EP_SET_MMAP_RESOURCE_CONTINUOUS_BUFFER
2.Change to record mmap resource index under each task file.

Change-Id: Ib820086dd67b3f0bd2f820232491860b8e170ae3
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-08-27 10:29:04 +00:00
ZhengRong Ruan
8421327494 ARM: dts: rockchip: add rv1126b-evb2-v12-fastboot-emmc.dts
Signed-off-by: ZhengRong Ruan <ryan.ruan@rock-chips.com>
Change-Id: Ifecff7ac56ab6cf1038b588562fa9ca4549e2433
2025-08-27 09:15:52 +00:00
ZhengRong Ruan
65f350ecdf arm64: dts: rockchip: add rv1126b-evb2-v12-fastboot-emmc.dts
Signed-off-by: ZhengRong Ruan <ryan.ruan@rock-chips.com>
Change-Id: Ia34fe16b5e39d6f554978f97e1e2efde166ae20b
2025-08-27 09:15:20 +00:00
Zitong Cai
27382779b8 arm64: dts: rockchip: rk3588-vehicle-evb: Adaptation of the PMIC pin usage for the rk3588 vehicle EVB V23 board
Change-Id: I2845224e6059d30ca0c878345cfc5b9741045543
Signed-off-by: Zitong Cai <zitong.cai@rock-chips.com>
2025-08-27 17:13:24 +08:00
Zhang Yubing
5d6ddd1c67 drm/rockchip: dw-dp: compare the real bus format before for mode change
Change-Id: I73a655ae2f3fa0f49992d55161733a8047ad55cd
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2025-08-27 09:09:23 +00:00
Weiwen Chen
7dd4b52637 ARM: dts: rockchip: add rv1126bp-evb1-v12-fastboot-emmc.dts
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: If2add034e85e385008be02cc42f0b5214f70c32e
2025-08-27 14:32:13 +08:00
Weiwen Chen
30582bb0e5 arm64: dts: rockchip: Add rv1126bp-evb1-v12-fastboot-emmc.dts
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I2727cf1bff00d9e39d57fe1c2d95094f40431f30
2025-08-27 14:32:12 +08:00
Weiwen Chen
76207a56c4 ARM: configs: rv1126b-fastboot: SND enable SIMPLE_CARD and SOC_RK817
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I284daf97290f116f98b26c573ea8454d8efb318f
2025-08-27 14:32:12 +08:00
Simon Xue
b115421b4c media: videobuf2-cma-sg: Fix missing put rk-dma-heap-cma heap ref
Change-Id: Id3faa21f1fa0c6bf8357c7403df7b18119de1d22
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2025-08-27 09:58:37 +08:00
Simon Xue
9abccf14b4 dma-buf: rk_heaps: export rk_dma_heap_put
Change-Id: If5e55cc6528a86c8dfaea4ec6c7afb99e4df6087
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2025-08-27 09:41:38 +08:00
Zhang Yubing
ae9109eca6 drm/rockchip: dw-dp: protect panel status when show logo
Change-Id: I506170da755fb25d43296e28378299392de177e3
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2025-08-26 10:44:53 +00:00
Jon Lin
c42d5b7f6c mtd: spi-nor: puya: support PY25Q64LB
Change-Id: I88341697eb2e30d05fd9a09af11b9dec47b97b69
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-08-26 10:08:09 +00:00
Ziyuan Xu
468b76b222 soc: rockchip: thunderboot_mmc: Send CMD12 after transmission completion
There're two ways to support read multiple blocks transmission:
- Current design: SET_BLOCK_COUNT(CMD23) + READ_MULTIPLE_BLOCK(CMD18)
- READ_MULTIPLE_BLOCK(CMD18) + STOP_TRANSMISSION(CMD12)

CMD23 only support 2^16 blocks, we should change to plan B for the
larger size transmission.

Change-Id: Id8f3d11dbff65b8bac4b74ef2024862b6722fc26
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2025-08-26 09:51:08 +00:00
Liang Chen
3be4ad7282 arm64: dts: rockchip: rv1126b-evb: set venc-supply for evb1/evb4
Change-Id: I4aa7003bc8b0ba5f1c5f073f02561db95d497e43
Signed-off-by: Liang Chen <cl@rock-chips.com>
2025-08-26 09:46:30 +00:00
Jon Lin
488a2bed4a PCI: rockchip: dw_ep: Support building as a module when dma_test disabled
Change-Id: I43ef9a2b069f3b49c529170855e88b90984efbf5
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-08-26 09:41:54 +00:00