Commit Graph

1285824 Commits

Author SHA1 Message Date
Haoran Han
0d393aedbc arm64: dts: rockchip: rk3588-vehicle-evb-v23: Modify the master of i2c-7 and the lock pin of max96756
Change-Id: I97bc8a465250464274b1b7b812f9bdcb12c1238e
Signed-off-by: Haoran Han <haoran.han@rock-chips.com>
2025-09-11 01:55:23 +00:00
Haoran Han
9904b5853f arm64: configs: rk3588_vehicle.config: add CONFIG_VIDEO_MAX96756=y
Change-Id: I82957e89d550c0fbb1606c27c1f37434cb1850a8
Signed-off-by: Haoran Han <haoran.han@rock-chips.com>
2025-09-11 01:54:05 +00:00
Xing Zheng
b69407b9ad arm64: dts: rockchip: rv1126b-evb: enable both acodec_pmu and acodec for 4ch capture by default
For example:
amixer sset 'ACodec_LP PGA Gain' 20
amixer sset 'ACodec PGA Gain' 20
arecord -Dhw:0,0 -c 4 -fs16_le -r 16000 /tmp/record.wav -vv

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I48f15036233286da78d3322a39723e4031b99e54
2025-09-11 01:53:15 +00:00
Haoran Han
df9a97d980 media: i2c: max96756: Compatible with kernel-6.1 version
Change-Id: I28736b16eab72c9fb85914a12190f1d21d2d173c
Signed-off-by: Haoran Han <haoran.han@rock-chips.com>
2025-09-11 01:47:31 +00:00
Tao Huang
a665085775 video: rockchip: rga3: Explicitly include vmalloc.h
Fixes: 6e89da27be ("video: rockchip: rga3: use dma_map_sg instead of dma_map_resouce")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ic3dbdb03e0de19b6360f44a9e7a821b4ceb62d28
2025-09-11 01:38:46 +00:00
Zitong Cai
3042fbdfcf mfd: display-serdes: Fix system crash caused by serdes_init_seq being a null pointer
When the serdes-init-sequence is not configured, serdes_init_seq is
a null pointer. However, some serdes initializations do not require
the serdes_init_seq configuration, so the driver needs to execute
normally even when the serdes-init-sequence is not configured.

Change-Id: Id01f0921c9050db5c20f6ad075ddd47891f68bcb
Signed-off-by: Zitong Cai <zitong.cai@rock-chips.com>
2025-09-10 11:58:27 +00:00
Tao Huang
ea16ecc60e media: i2c: 0x03c10: Make generate_byte_stream() static
Fixes: 865a3ad68d ("media: i2c: 0x03c10 support check register setting crc")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iae9bdb29d396db6ae265cc0da080f0e825038493
2025-09-10 18:34:14 +08:00
Yifeng Zhao
17901d5a27 mmc: sdhci-of-dwcmshc: optimize the random write performance when CMDQ is enabled
Some EMMC devices only have one hardware queue, and CMD13 can only
query one slot at a time to transmit data, which cannot be processed
in parallel. The CMD13 query interval can be modified to increase
query frequency and improve random write performance.

Change-Id: I5f8cfd9d62228e62fd0ad71d7b69698d80b21f80
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
2025-09-10 06:22:10 +00:00
Damon Ding
69c6e6af9d drm/bridge: analogix_dp: Fix to use &drm_display_mode.clock to check bandwidth
For split mode, we will update the &drm_display_mode in
&drm_connector_helper_funcs.get_modes() earlier. However, as for
non-split mode, the &drm_display_mode->crtc_clock may be 0, which
make the bandwidth check always pass. It should be reasonable to
use &drm_display_mode.crtc instead of &drm_display_mode.crtc_clock
for bandwidth check.

Fixes: b935b0aa0c ("drm/rockchip: analogix_dp: use mode crtc_* timing for hardware config")
Change-Id: Iee9681e15eeeb765957dbd127cbca19d4be405c8
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-09-09 11:37:44 +00:00
Zhang Yubing
e7fa9af804 drm/rockchip: dw-dp: add a dp_status node dump more info
Add a dp_status node to dump more debug info, include
hpd status, link status, video status, msa status, sdp
status.

Change-Id: I130f08238396bb891f2fab2bbdf76b33858ef8c2
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2025-09-09 11:37:07 +00:00
Zhang Yubing
baa928edb1 drm/rockchip: dw-dp: add a debugfs directory
The DPTX may be not create a drm connector, or it will create
more than 1 drm connector when work in MST mode. So it's better
to create a debugfs directory for the DPTX driver. A drm
encoder is necessary for DPTX driver and the drm connector is
optional, So the debug node add when drm encoder late register
state.

Change-Id: I7515872aebc0101611a9afa393765a8bd478699d
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2025-09-09 11:35:47 +00:00
Zhang Yubing
3b68d42dda drm/rockchip: dw-dp: print debug log use drm_dbg_dp
Replace the dev_dbg with drm_dbg_dp, it will dump the debug log
more easily. Just adjust the drm debug log level, set the bit[9]
as follow:
echo 0x100 > /sys/module/drm/parameters/debug

Change-Id: I3b522d542f043a79fab652d017dfb7e11f67fb74
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2025-09-09 11:25:21 +00:00
Wei Dun
3795c31e57 media: rockchip: vpss: add RKVPSS_CMD_BUF_DEL_BY_FILE cmd
Change-Id: I4c80133b75459c419f6572384be2fca9cdec978f
Signed-off-by: Wei Dun <willam.wei@rock-chips.com>
2025-09-09 10:43:19 +00:00
Jon Lin
25f97ec5e6 misc: rockchip: pcie-rkep: Fix rkep memory free apis error
1.Missing size, cannot match when releasing;
2.Missing valid virtual address, cannot successfully release.

Fixes: 8633bf3947 ("misc: rockchip: pcie-rkep: Support continuous buffer")
Change-Id: I6682f63b8c17b9f005d5eb2bc2d29f0a4962a0e5
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-09-09 08:46:54 +00:00
Wu Liangqing
ff4be6b36f arm64: dts: rockchip: rk3588-evb7-lp4: change the UART port of Bluetooth to ttys9
Change-Id: I88567ba63904f6b01ad381e652e2d8febfcf533f
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2025-09-09 06:12:34 +00:00
Zhang Yubing
8cb70d4022 drm/rockchip: dw-dp: don't send sdp when disable video stream
When the display mode change from HDR to SDR but the vsc sdp and
hdr infoframe still send after exit HDR mode, the picture quality
will be abnormal. It need disable sdp when disable video stream.

Fixes: 0ac9316547 ("Revert "drm/rockchip: dw-dp: reset dp controller status"")

Change-Id: I060e8d8e6c9765b71831d08060a1d3ed097bbefa
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2025-09-09 06:11:20 +00:00
Jon Lin
9e1626c671 arm64: rockchip_linux_defconfig: Enable CONFIG_PCIE_FUNC_RKEP as module
Change-Id: I3caa91b36b759a460a2dd76998b35bf5c4e7e688
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-09-09 06:10:56 +00:00
Chaoyi Chen
83596577da drm/rockchip: vop2: Clear WB_COMPLETE_INTR when vop power on
When vop power on, the WB_COMPLETE_INTR is active. Clear it before
use writeback. Otherwise the interrupt will be triggered immediately
after being enabled.

Change-Id: If54ca15597b8cfcf644a2bfb1ce127fd5d8c3caf
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2025-09-08 07:51:36 +00:00
Zefa Chen
80e98b2188 media: rockchip: vicap fixes error of output format when restart dma capture
Change-Id: I53406d0f1ead4cff4c9dff8a779a942a549eb775
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-09-05 06:23:43 +00:00
Zhang Yubing
a1d4071c51 drm/rockchip: dw-dp: support SDP bank regs as readable
Support SDP bank regs as readable for debug scenario

Change-Id: I831454e9f5de2f5f7438576b530eb30e8a83b657
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2025-09-05 03:13:10 +00:00
William Wu
3754e108b2 FROMLIST: usb: gadget: configfs: Correctly set use_os_string at bind
Once the use_os_string flag is set to true for some functions
(e.g. adb/mtp) which need to response the OS string, and then
if we re-bind the ConfigFS gadget to use the other functions
(e.g. hid) which should not to response the OS string, however,
because the use_os_string flag is still true, so the usb gadget
response the OS string descriptor incorrectly, this can cause
the USB device to be unrecognizable on the Windows system.

An example of this as follows:

echo 1 > os_desc/use
ln -s functions/ffs.adb configs/b.1/function0
start adbd
echo "<udc device>" > UDC   #succeed

stop adbd
rm configs/b.1/function0
echo 0 > os_desc/use
ln -s functions/hid.gs0 configs/b.1/function0
echo "<udc device>" > UDC  #fail to connect on Windows

This patch sets the use_os_string flag to false at bind if
the functions not support OS Descriptors.

Fixes: 87213d388e ("usb: gadget: configfs: OS String support")
Link: https://patchwork.kernel.org/project/linux-usb/patch/1755833769-25434-1-git-send-email-william.wu@rock-chips.com/
Change-Id: I79fce9ad19b5ceaf5ded84894d6b509a3d0c75f4
Signed-off-by: William Wu <william.wu@rock-chips.com>
2025-09-05 02:10:29 +00:00
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