Commit Graph

1281454 Commits

Author SHA1 Message Date
Liang Chen
aaf41c3dcf clk: rockchip: clk-pvtpll: rv1126b: add more frequency point
Change-Id: I494c6ca95ec33c893f773533dfdf4fbb24a96dd1
Signed-off-by: Liang Chen <cl@rock-chips.com>
2025-05-15 12:49:35 +00:00
Wei Dun
c14fcf698b media: rockchip: vpss: support ver_stride input config
Signed-off-by: Wei Dun <willam.wei@rock-chips.com>
Change-Id: I7bda66e3f3b10ebec49476141f3e0225895df4c3
2025-05-15 10:19:00 +00:00
Jon Lin
aff8b88091 misc: rockchip: pcie-rkep: Define reserved spaces for different purposes
Change-Id: I361db2e6cd4e382e93ea9ad0b35a865e65e93810
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-05-15 09:57:30 +08:00
Jon Lin
683e4de867 misc: rockchip: pcie-rkep: Support function drivers version
Change-Id: I84a241f9860b9ccd910e74392d77b2a11a8e09ac
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-05-15 01:06:58 +00:00
Jon Lin
73d20803ec PCI: rockchip: dw_ep: Reset atu index when PM suspend/resume
Change-Id: I131580165444f1e7b0393cb3645594b1c43021ea
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-05-14 08:49:59 +00:00
Jon Lin
032401c7c9 PCI: rockchip: dw_ep: Remove useless vm_flags definition
Define vm_flags by remap_pfn_range.

Change-Id: I6f1b7ca4e1653fab2eab0f4139c6b9648c903e10
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-05-14 08:49:59 +00:00
Jon Lin
b176f5d83b PCI: rockchip: dw_ep: Avoid repeated calls to irq and works registration
Change-Id: Ic98737ccaa515f1e36e39e1e4615c68cedb6d9de
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-05-14 08:49:59 +00:00
Damon Ding
da66c6a3ee drm/bridge: analogix_dp: replace readl()/writel() with analogix_dp_read()/_write() for SSC switch
The analogix_dp_read()/analogix_dp_write() help workaround async
issue between pclk clock and 24m clock. See the following commit
for details:

commit 33f5d1439f ("drm/bridge: analogix_dp: Workaround async issue between pclk clock and 24m clock")

Change-Id: I41a0767184bfbfc5bcacceb2177189836dcc9e90
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-05-14 08:49:08 +00:00
Jianwei Fan
279372aba2 video: rockchip: vehicle: add dvp input interlace support
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I8445d9d79fae77f20247e82885719f704df9c02e
2025-05-14 08:47:40 +00:00
Jianwei Fan
a50578469a video: rockchip: vehicle: add input mode and fix yuv input order error for rk3576
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Ic2cf42382a889aa5940a2578ced19fda98242d66
2025-05-14 08:47:40 +00:00
Liang Chen
7b30163761 cpufreq: interactive: add attribute for touchboost_freq/duration
ls -l /sys/devices/system/cpu/cpu0/cpufreq/interactive/
...
-rw-r--r-- 1 root root 4096 2022-12-05 18:27 touchboost_duration
-rw-r--r-- 1 root root 4096 2022-12-05 18:28 touchboost_freq

Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I964a5553dcf7035d56357ee1cd4db074f60a1184
2025-05-14 08:47:09 +00:00
Liang Chen
1a06d0b8a6 cpufreq: interactive: remove cpu limit of system monitor when touchboost
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I53be2f5a8093b5fbfc0be7744e1b5b40f22530f1
2025-05-14 08:47:09 +00:00
Liang Chen
d37ee119fe soc: rockchip: system_monitor: add function to remove/restore cpu limit
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I60c7b3cb1ab68c06852871cf9fa435031915c328
2025-05-14 08:47:09 +00:00
Zefa Chen
6220b24adc media: i2c: add os12d40 sensor driver
Change-Id: I1952ff79c18d311aebeb74d56fa81041f6a21d66
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-05-14 08:43:35 +00:00
Zefa Chen
722cda0d68 include: rk-camera-module: add cmd RKMODULE_GET_BAYER_MODE
Change-Id: I42076ecfe827c32d94b3585fcbb08bc7f55befff
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-05-14 08:43:29 +00:00
Jon Lin
9e0231a401 mtd: spi-nor: lock the spinor for shutdown progress
During the reset process, some threads may still be accessing the
flash, which will affect the soft reset behavior of the subsequent
startup process. For example, the MXIC device may not meet the tREADY2
timing, so it is necessary to avoid flash access during the reset
process.

Change-Id: Ibb0aa2791a83ec820d7352c9558d3a962a2bf66d
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-05-14 14:40:26 +08:00
Jon Lin
3cab45ddc1 mtd: spi-nor: Add SNOR_F_NO_READ_CR warning
SPI Nor usually has a way to obtain the CR status and add a warning
to notify developers to make corresponding optimizations to avoid
forced SR writing, which may cause SR wear out.

Change-Id: Id0e32b94c33f564539cbbac3bb2147ad8227c3dd
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-05-14 06:08:43 +00:00
Jon Lin
8a152b2e8c mtd: spi-nor: winbond: Remove all devices SNOR_F_NO_READ_CR flags
All winbond particles support 35H command, but some particles do
not accurately feedback information after SDFP param parsing.

Change-Id: I00ad45ccd7ca7f7798a2c0699d064a58c6e411c6
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-05-14 06:08:43 +00:00
Yuefu Su
94bf2f3b05 media: i2c: add imx678 sensor driver
Signed-off-by: Yuefu Su <yuefu.su@rock-chips.com>
Change-Id: I5cace6a4708ca44d55d700d2415e8d6da20dda12
2025-05-13 17:14:52 +08:00
Luo Wei
705a627436 mfd: display-serdes: fix kmemleak warning from kasprintf
Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: Icc4fc3f40f6b96f35ff4b21c2263f0870745361c
2025-05-13 14:47:20 +08:00
Shunqian Zheng
9c4c5ea152 arm64: configs: rv1126b: add robot config fragment
Change-Id: I20d3edbf5948f68ec78d17eb01cf29ef2f997147
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2025-05-12 09:59:52 +00:00
Zefa Chen
18c6b8bc21 media: i2c: add ox03c10 sensor driver
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Iafc364cb36febaf46888f55037c0ba44e834373e
2025-05-10 17:53:14 +08:00
Jon Lin
39dbfdc2ff arm64: dts: rockchip: rk3588: Add clk PCLK_PHP_ROOT to pcie30phy
Configure pcie30phy phy_grf with clk PCLK_PHP_ROOT on.

Change-Id: Ie3f9fa78aaf7b1098450ade48e6f0c9f09725869
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-05-09 12:14:10 +00:00
Jon Lin
6bfde08139 phy: rockchip-snps-pcie3: Configuring grf with clk enabled
Change-Id: I085e1f3ec19a653d1664dd108859522440cc5563
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-05-09 12:14:10 +00:00
Yu Zheng
a221bbbd5a media: i2c: gc8613 add 4lane 4K40fps support
Signed-off-by: Yu Zheng <yu.zheng@rock-chips.com>
Change-Id: If56ae838c808419c23814210d5e028b9583b0853
2025-05-09 09:37:49 +00:00
Zefa Chen
bc8cb8cb82 include: rk-camera-module: add cmd RKMODULE_GET_EXP_MODE
Change-Id: I292bdb9d8447cb4990f4f0ecf9a42c02c028a6b1
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-05-09 09:36:36 +00:00
Zefa Chen
fb91ee53b5 media: rockchip: vicap clean data_type if get fail
Change-Id: I23e2877e7d8c3291f1a49825885c703f6d0639b3
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-05-09 16:12:44 +08:00
Zefa Chen
0c98e86e6c media: rockchip: vicap fixes loss stream of single buffer work on one frame mode with rv1106
Change-Id: I8017b4a606ce36988bd691c153fbb0af7fee76aa
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-05-09 14:44:51 +08:00
Zefa Chen
eb88b3f4a8 media: rockchip: vicap fixes error of change to online with multi online
Change-Id: Icb4d148def061052085fba5f6f074e5dde523414
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-05-09 14:44:34 +08:00
Zefa Chen
7c7079f011 media: rockchip: vicap fixes error resume_mode state of restart from aov
Change-Id: Ia9df46404ffaf4c4d3b54f7a1f6b177850a6700e
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-05-09 14:44:26 +08:00
Zefa Chen
087a57f504 media: rockchip: vicap fixes error condition of disable online
Change-Id: I0d9bcca0c76a76f522a596e8326f434d71a501da
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-05-09 14:44:19 +08:00
Cai YiWei
6e5b2259f9 media: rockchip: isp: fix mipi overflow for isp21
Change-Id: Id5582a2ef799389567d8df5a66963ac5c777e718
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2025-05-09 03:05:34 +00:00
Andy Yan
f57715b5aa drm/rockchip: cleanup fb when drm_gem_fb_afbc_init failed
In the function drm_gem_fb_init_with_funcs, the framebuffer (fb) and
its corresponding object ID have already been registered.

So we need to do cleanup the drm framebuffer if the subsequent execution
of drm_gem_fb_afbc_init fails.

Or we will meet list_del corruption like bellow when userspace call
drm_mode_rmfb to remove all the previous created fb:

[  202.019304] list_del corruption. prev->next should be ffffff817eba4608, but was 0000000000000000. (prev=ffffff817eba5f08)
[  202.019340] kernel BUG at lib/list_debug.c:61!
[  202.019346] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
[  202.021421] Modules linked in: bcmdhd(O) r8168
[  202.021884] CPU: 7 PID: 395 Comm: binder:339_3 Tainted: G W  O       6.1.118 #59
[  202.022648] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
[  202.023249] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  202.023925] pc : __list_del_entry_valid+0xbc/0xd0
[  202.024409] lr : __list_del_entry_valid+0xbc/0xd0
[  202.024889] sp : ffffffc00dd8bb40
[  202.025248] x29: ffffffc00dd8bb40 x28: 00000000000000af x27:ffffff81088ab600
[  202.025936] x26: 0000000000000004 x25: ffffff810880eac0 x24:ffffffc00962bc98
[  202.026623] x23: 0000000000000000 x22: ffffff81002be000 x21:ffffff817eba4608
[  202.027310] x20: ffffff817eba4600 x19: ffffff81002be218 x18:ffffffc00dbc5080
[  202.027998] x17: 20747562202c3830 x16: ffffffffffffffff x15:0000000000000004
[  202.028684] x14: ffffffc00a06c980 x13: 0000000000001d5a x12:0000000000000003
[  202.029372] x11: 000000010000dd5a x10: c00000010000dd5a x9 :02c01f0f68978400
[  202.030059] x8 : 02c01f0f68978400 x7 : 205b5d3430333931 x6 :302e32303220205b
[  202.030747] x5 : ffffffc00a493617 x4 : ffffffc00dd8b897 x3 :0000000000000000
[  202.031434] x2 : 0000000000000000 x1 : ffffffc00dd8b900 x0 :000000000000006d
[  202.032121] Call trace:
[  202.032395]  __list_del_entry_valid+0xbc/0xd0
[  202.032843]  drm_framebuffer_cleanup+0x34/0x80
[  202.033305]  __rockchip_drm_fb_destroy+0x18/0x1ec
[  202.033789]  rockchip_drm_fb_destroy+0x18/0x40
[  202.034247]  drm_framebuffer_free+0x30/0x40
[  202.034674]  drm_mode_object_put+0x60/0xac
[  202.035100]  drm_mode_rmfb+0x170/0x1a4
[  202.035493]  drm_mode_rmfb_ioctl+0x14/0x20
[  202.035920]  drm_ioctl_kernel+0x80/0xf8
[  202.036324]  drm_ioctl+0x2d4/0x554

Change-Id: I191e2b2a1b8229da1642ac58a6adc8fc3a3d71ea
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2025-05-09 03:04:36 +00:00
Wei Dun
113d77f355 media: rockchip: vpss: Fix FBC format output issue in offline mode
Signed-off-by: Wei Dun <willam.wei@rock-chips.com>
Change-Id: Ife1b94330d20f16816cc1e5cdb8da6e98ce265b5
2025-05-09 02:40:04 +00:00
Wei Dun
b526d363c9 media: rockchip: vpss: add condition for RKVPSS_MIR_FORCE_UPD
Signed-off-by: Wei Dun <willam.wei@rock-chips.com>
Change-Id: I67b8c8017aed9eef5ad7f2db6bcd25b7022481df
2025-05-09 02:39:56 +00:00
Wei Dun
e2fb9cd245 media: rockchip: vpss: remove rkvpss_soft_reset on process timeout
Signed-off-by: Wei Dun <willam.wei@rock-chips.com>
Change-Id: I3a53f005ddf4a524991b369adf7cb6a10bc20883
2025-05-09 02:39:56 +00:00
Wei Dun
a5f9e1799f media: rockchip: vpss: fix RKVPSS2X_MI_WR_FBCE_SIZE calculation error
Signed-off-by: Wei Dun <willam.wei@rock-chips.com>
Change-Id: Ibdc4b3f6dc4e54bbd4381d51d28bdf6aa054c195
2025-05-09 02:39:56 +00:00
Wei Dun
84268cfeff media: rockchip: vpss: set ONLINE2_CMSC_EN 0 in offline mode
Signed-off-by: Wei Dun <willam.wei@rock-chips.com>
Change-Id: Id7e670404c30f3f7b78b9f43d7803e48f59fb957
2025-05-09 02:39:56 +00:00
Cai YiWei
b5b44dbbfc media: rockchip: isp: reduce rockit buf vmap
Change-Id: I80ead8934b06e94692ba8145f465c3b9ccbd5243
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2025-05-09 01:33:50 +00:00
Cai YiWei
5c1ece6d8f media: rockchip: vpss: frame start to update buf
Change-Id: I5c064b96a6d7d9f6690ff43a8beec9a03763a384
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2025-05-08 11:24:38 +00:00
Zefa Chen
191adb1fc5 media: rockchip: vicap init frame_phase_cache
Change-Id: Ic783b0c8d86106d00fe60d4bff41a7abb1f7dd3e
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-05-08 11:24:04 +00:00
Zefa Chen
1064d12c6d phy: rockchip: mipi csi2 dphy fixes error of clk0 enable
enable too early may lead to mipi csi2 overflow

Change-Id: Ib4d1f59803b8dcfdea8ba219fe8dc9667db35428
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-05-08 11:24:04 +00:00
Yu Zheng
58732189b1 arm64: dts: rockchip: rv1126b-evb1-v10-dv: reduce spi freq
Signed-off-by: Yu Zheng <yu.zheng@rock-chips.com>
Change-Id: I2a0ad349fad55917adc26db5855beaffcc80696f
2025-05-08 17:05:19 +08:00
Sandy Huang
5c295c7639 drm/rockchip: vop2: avoid config done time close to vsync
Avoid commit new plane time close to vsync at async mode, the following
case maybe lead to error:
vsync[1]->update plane[2]->config done[3]->update plane[4]->vsync[5]
If new vsync[5] insert step 4, only part of plane register complete,
this will lead to part of plane register take effect and lead to error.

So we introduce this safeguard, when commit time exceeds 15/16 of a
frame, this frame will be postponed to the next frame.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I4e405baf6ac080f6990e94f639c168ff9f0daf1c
2025-05-07 10:11:21 +00:00
Chaoyi Chen
1f34b60222 drm/rockchip: vop2: Use regbak to determine whether win is disabled
The vop2_win_disable() may be called multiple times in a short period
before the fs comes. Using VOP_WIN_GET(vop2, win, enable) for
judgment may cause double disable of win, leading to double decrement
of vop2_power_domain.ref_count.

This patch uses regbak to determine whether win is already disabled
in vop2_win_disable(), similar to what is done in the
vop2_win_enable().

Change-Id: I3095ef0ef0068ef3dd7245375127083a17871341
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2025-05-07 10:11:10 +00:00
Chaoyi Chen
ce5794977b drm/rockchip: vop2: Set initial ref_count for parent power domain
If the power domain has a parent power domain, the ref_count of
parent power domain should also be set during initialization.

Change-Id: I4948d11fee2829049559541040ae2117ca319329
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2025-05-07 10:11:10 +00:00
Chaoyi Chen
8b2e37f03c drm/rockchip: vop2: Fix integer underflow for power domain ref_count
If the PD has already been turned off, and the value of
vop2_power_domain.ref_count is zero at this time, calling
vop2_power_domain_put() again will cause ref_count to underflow.
This underflow will be interpreted as if the PD has been turned on.

Fixes: aa3aee14d0 ("drm/rockchip: vop2: Add vop2 internal pd support for rk3588")
Change-Id: Ia814c5907072cd1aee785734e36053cba7382b23
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2025-05-07 10:11:10 +00:00
Wu Liangqing
8d47fabe2f arm64: dts: rockchip: add rk3588-evb10-v10.dts for rk3588 evb10
Change-Id: I83775b3c362c954b8d3551b48f543c53f775c0bf
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2025-05-07 17:32:41 +08:00
Huibin Hong
3f38eabc5b arm64: armv8_deprecated: protect prev_mode or it would cause undef_lock deadlock
When do 'echo 1 > /proc/sys/abi/swp' on two cpus at the same time, we can see:

	call_undef_hook() at traps.c:442
	do_undefinstr() at traps.c:504
	el0_undef() at entry-common.c:605
	el0t_64_sync_handler() at entry-common.c:689
	el0t_64_sync() at entry.S:585

That is because write swp 1 at the same time, add the swp_hooks to the undef_hook
list twice, swp_hooks list node's next becomes itself. When list_for_each_entry of
the undef_hook, cpu loops forever here.

Change-Id: Ice60dbc633020220e7218a554e9d0e4c7dacceb4
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2025-05-07 08:54:58 +00:00
Zhen Chen
e54469c723 MALI: rockchip: Add separate src directory for Valhall driver from DDK g28p0-00eac0
Previously, Valhall and Bifrost GPUs shared a single driver source directory (drivers/gpu/arm/bifrost).
However, starting from DDK r52 (g27), Bifrost GPUs are no longer supported.
As a result, the Valhall GPU driver from DDK r53 (g28) must use a separate source directory
(drivers/gpu/arm/valhall).

There are also modifications in some header files outside of drivers/gpu/arm/.

In addition, the configs related to Bifrost and Valhall GPUs have been removed
from the defconfig file like rockchip_linux_defconfig,
which does not reflect the current SoC.
Instead, these configs have been migrated to the .config files
such as rk3576.config, whose file names can reflect the current SoC.
Therefore, for some SoCs, the kernel compilation command line needs to be adjusted.

Change-Id: I0c4384212b4b679a728401f7f89ae839530f002b
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2025-05-07 07:43:36 +00:00