Commit Graph

1086691 Commits

Author SHA1 Message Date
Luo Wei
80ebdebca0 mfd: display-serdes: add split mode function support
Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: I70f1707c8625d8d693b1134d178c68fcdfbdf268
2023-12-05 17:22:19 +08:00
Finley Xiao
23cdd1ae0e dt-bindings: opp: Document rockchip opp bindings
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I0a60b7d43e5f34de402266859543400cd5d523ff
2023-12-05 16:48:30 +08:00
Finley Xiao
92f826364b arm64: dts: rockchip: rk3588: Change opp clock for gpu and npu opp table
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ic2f585ecbfc0de4a11d20f14bbc6f0dd10f7b25d
2023-12-05 16:48:21 +08:00
Finley Xiao
7e80a3380a soc: rockchip: opp_select: Add support to parse rockchip,opp-clocks
The clocks property is used to get avs frequency and avs scale on some
platforms, add new property rockchip,opp-clocks for pvtpll and read
margin.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ida795081e199b40a0bdfe3cb079ae8286d006057
2023-12-05 16:48:14 +08:00
Jacob Chen
80af59f8b8 video: rockchip: rve: update to 1.0.5
fix unexpected exit during execution of llp tasks, The 0th
bit of the work status register indicates whether the current
task in linked-list mode has successfully completed execution.
The 4th bit indicates all tasks has been processed done.

Change-Id: I099c55e2f00cc63e9f4ee0d3e2696ccec9a5ae9a
Signed-off-by: Jacob Chen <cc@rock-chips.com>
2023-12-05 16:13:27 +08:00
XiaoDong Huang
ad7b71f2e2 ARM: rockchip: rv1106: support CONFIG_RV1106_PMU_WAKEUP_TIMEOUT
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: I66859ef75a39e71de20a1efab5fc840bfa296346
2023-12-05 15:44:01 +08:00
Mingwei Yan
164aa84b56 media: rockchip: isp: fix is_on false cause pm isp die
rv1106 dual_sensor will call rkisp_hw_enum_isp_size,
if memset isp_size to 0 will cause is_on be false,
when isp pm,isp reg_save/reg_store can't be called

Signed-off-by: Mingwei Yan <mingwei.yan@rock-chips.com>
Change-Id: If91e3feaf113fe8ca3d22fca92c2800c99f5b55d
2023-12-05 15:14:10 +08:00
XiaoDong Huang
9e64835577 ARM: rockchip: rv1106: support PMIC_SLEEP over gpio0_a4
Change-Id: I14678dfe44ed893f4a2e42168eb2b869c622aa89
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2023-12-05 14:51:58 +08:00
Wu Liangqing
6e8cfc3b55 arm64: dts: rockchip: rk3588-evb: enabled rkvtunnel
Change-Id: I942a6b44e9f8251666ea4ebf494800a6b09c94ab
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2023-12-04 19:58:28 +08:00
Wu Liangqing
2f92fa5c05 arm64: dts: rockchip: rk3588: add rkvtunnel
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Change-Id: I07acae6e2b5085986c4485f84c0103db92322c37
2023-12-04 19:57:47 +08:00
Wu Liangqing
f82ba785ed arm64: configs: rockchip: add CONFIG_ROCKCHIP_VIDEO_TUNNEL
Change-Id: I9216b9013aa6a2ac90e167daaed5318f5f1b6a54
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2023-12-04 19:57:29 +08:00
Cai YiWei
e2935d993b media: rockchip: isp: add mode for rv1106 suspend without rtt
Change-Id: I878de96cac813ad6e31ad844b7fcd3c84ce0c5d6
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-12-04 15:56:18 +08:00
Finley Xiao
9758b645e0 soc: rockchip: opp_select: Fix getting wrong struct rockchip_clk_pll pointer
On RK3588, the clocks propety in gpu and npu opp table are not pll
clock, when call rockchip_pll_clk_rate_to_scale(), it will get a wrong
pointer from to_rockchip_clk_pll, the pll->rate_count may be a large
value, and do unnecessary for loops.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I1364e8a930cc8cd9e2cb9627709eea0ba198a566
2023-12-04 15:06:06 +08:00
Cai YiWei
718e3c0d99 media: rockchip: isp: more time to wait isp end
Change-Id: I8c08343a47e6b8467e90c4a7cd6a5e4d7c5bfbd4
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-12-04 09:38:07 +08:00
Dingxian Wen
6c39b12bf8 media: rockchip: hdmirx: Binding CPU compatible with CPU swap scenarios
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I80bc5c50ba7136752e266302cc78f76a3d22ba26
2023-12-01 18:37:08 +08:00
Wu Liangqing
00244fab41 arm64: dts: rockchip: rk3326-evb/px30-evb: changed esc and home key code
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Change-Id: I0e60bf3f5bcd81600fd886f7e6c8ef786226e7a9
2023-11-30 12:48:03 +00:00
Damon Ding
5de0bccb0d drm/rockchip: vop2: fix the dclk log in vop2_crtc_atomic_enable()
Change-Id: I370d519aaed0cf96f852c7bec88399ab2a0e5a76
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2023-11-30 16:47:28 +08:00
William Wu
ce3e4b920b ARM: dts: rockchip: rv1106-uvc: disable usb2 phy suspend
This patch add property "rockchip,dis-u2-susphy" for
u2phy_otg to avoid the usb2 phy driver set the phy
enter suspend mode if the usb is in unconnected state.
It has no side effect for phy suspend in deep sleep.

For self power board, this patch is useful in hot
plug case, it can fix uvc unrecognized issue with
the following error log:

dwc3 ffb00000.usb: failed to enable ep0out

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ic5ba708201050e12669f098c1b554eeb625b42a2
2023-11-30 15:30:34 +08:00
William Wu
a064f84622 ARM: dts: rockchip: set usb dr_mode to otg for rv1106 evb1 and evb2
Most of rv1106 evb1 and evb2 dts set the usbdrd_dwc3
dr_mode to peripheral, it aimed to avoid conflict when
set vbus-supply for otg host mode, likes rv1106g-evb2
v10, the USB_PWREN gpio is shared with usb vbus-supply
and emmc/spi, and set peripheral mode can also simplify
the usb controller initialization process.

However, peripheral mode causes two issues:

1. USB device can't be recognized in hot plug scenario.
   The dwc3 driver print err log:
   dwc3 ffb00000.usb: failed to enable ep0out

2. The dwc3 driver fails to stop controller in the
   function dwc3_gadget_run_stop() when do system reboot,
   and it will increase the reboot time because the stop
   timeout is set to usleep_range(1000, 2000) * 2000.

   If the CONFIG_HIGH_RES_TIMERS is disabled and the
   CONFIG_HZ_100 is enabled, the dwc3 stop timeout will
   take about 20 seconds.

The root cause of the two issues is that the usb2 phy
is set to suspend mode in phy driver if the usb in
unconnected state, and the usb controller internal
utmi clock provided by usb2 phy is also disabled.
If the dwc3 driver access the registers of the dwc3
controller while the usb2 phy in suspend mode, the
accessing operation is invalid.

This patch sets the dr_mode to otg, then the dwc3
driver will enable the pm runtime and avoid accessing
its registers while the usb2 phy in suspend mode.
In otg mode, the dwc3 uses the extcon notifier from
the usb2 phy to set peripheral or host mode.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I0e77771c2ef62ee6b86c5d7d6444ea7539e51833
2023-11-30 15:30:34 +08:00
Felix Zeng
b83118aa35 driver: rknpu: Update rknpu driver, version: 0.9.3
* Add RK3583 NPU support
* Add kernel mapping control in RV1106
* Add hardware elapse time support
* Fix issue of double core execution in auto mode
* Fix multi-cores schedule issue due to task number incorrect sort

Signed-off-by: Felix Zeng <felix.zeng@rock-chips.com>
Change-Id: I861dd571e7229befe424842c06a5d249e34abf67
2023-11-30 15:29:55 +08:00
Elaine Zhang
f23554b1ad soc: rockchip: Add rockchip_disable_unused driver
Change-Id: I86f6fe8d45ea655910bfb9e96f887aa0cc30dd80
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2023-11-30 15:16:59 +08:00
Finley Xiao
2584be7192 Revert "drm/rockchip: Add support to unprotect clocks"
This reverts commit 9028a39e63.

Change-Id: I2d483062d9cb53f5303f784afe10cc4524750e2e
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2023-11-30 14:57:22 +08:00
Finley Xiao
248ac544c7 soc: rockchip: power-domain: Implement rockchip_pd_disable_unused() for gki
Change-Id: I3239964d7d72fe43970fbe5e3f3d84d3ff17995a
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2023-11-30 14:54:32 +08:00
Finley Xiao
34d2458d75 clk: rockchip: Implement rockchip_clk_disable_unused() for gki
Change-Id: I597fc35690d7a76dbc109e86db4045a1ddb3796d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2023-11-30 14:33:41 +08:00
Finley Xiao
31898079f9 clk: rockchip: rk3562: Make dpll critical
Change-Id: I67f9e3eb5595b7e83da6b9c9a28ed2a424bf9b69
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2023-11-30 11:41:01 +08:00
Mingwei Yan
01e20cf6c4 media: rockchip: isp: fix reset can't open
Signed-off-by: Mingwei Yan <mingwei.yan@rock-chips.com>
Change-Id: I73fc94e63ee1b9069fbb95305fc27ef1f77f3c3d
2023-11-30 11:40:16 +08:00
Cai YiWei
89ace2b9c7 media: rockchip: isp: fix info2ddr no enable
Change-Id: I351b236f210457d5abc24ae30e9fc1c6186753dd
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-11-30 11:39:28 +08:00
Finley Xiao
cae3ff29cc video: rockchip: mpp: rkvenc2: remove opp table when remove devfreq
rk3588_s:/sdcard # insmod rk_vcodec.ko
rk3588_s:/sdcard # rmmod rk_vcodec.ko
rk3588_s:/sdcard # insmod rk_vcodec.ko

[   31.701985][ T2028] WARNING: CPU: 7 PID: 2028 at drivers/opp/core.c:1767 dev_pm_opp_set_regulators+0x18c/0x1a4
[   31.701989][ T2028] Modules linked in: rk_vcodec(+) [last unloaded: rk_vcodec]
[   31.702002][ T2028] CPU: 7 PID: 2028 Comm: insmod Not tainted 5.10.160 #398
[   31.702005][ T2028] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
[   31.702011][ T2028] pstate: 20400009 (nzCv daif +PAN -UAO -TCO BTYPE=--)
[   31.702015][ T2028] pc : dev_pm_opp_set_regulators+0x18c/0x1a4
[   31.702019][ T2028] lr : dev_pm_opp_set_regulators+0x30/0x1a4
[   31.702022][ T2028] sp : ffffffc00e2fb500
[   31.702026][ T2028] x29: ffffffc00e2fb500 x28: ffffffc0012d1c8f
[   31.702031][ T2028] x27: ffffffc008071dbc x26: ffffff8114e1f080
[   31.702036][ T2028] x25: 0000000000000001 x24: ffffffc0012d89c0
[   31.702040][ T2028] x23: ffffffc00e2fb558 x22: ffffff8101480810
[   31.702045][ T2028] x21: ffffff8168e6e5b0 x20: 0000000000000002
[   31.702049][ T2028] x19: ffffff816eeb2800 x18: ffffffc00be95118
[   31.702054][ T2028] x17: 6d726f6674616c70 x16: 0000000000000000
[   31.702058][ T2028] x15: 0000000000000000 x14: ffffffffffffffff
[   31.702062][ T2028] x13: 0000000000000010 x12: 00000000000002f6
[   31.702067][ T2028] x11: 0000000000000020 x10: 0101010101010101
[   31.702072][ T2028] x9 : ffffff8174c00500 x8 : ffffff816eeb2850
[   31.702076][ T2028] x7 : 736d63ff786b6f6f x6 : 0000000080645d51
[   31.702080][ T2028] x5 : 515d640000000000 x4 : 0000008000000000
[   31.702084][ T2028] x3 : 0001332500000000 x2 : 0000000000000000
[   31.702088][ T2028] x1 : ffffff816b2baac0 x0 : ffffff816eeb2800
[   31.702093][ T2028] Call trace:
[   31.702098][ T2028]  dev_pm_opp_set_regulators+0x18c/0x1a4
[   31.702152][ T2028]  rkvenc_init+0x184/0x304 [rk_vcodec]
[   31.702191][ T2028]  mpp_dev_probe+0x25c/0x444 [rk_vcodec]
[   31.702231][ T2028]  rkvenc_probe+0x1fc/0x430 [rk_vcodec]
[   31.702239][ T2028]  platform_drv_probe+0x94/0xbc
[   31.702245][ T2028]  really_probe+0x200/0x500
[   31.702249][ T2028]  driver_probe_device+0x7c/0xb8
[   31.702253][ T2028]  device_driver_attach+0x6c/0xac
[   31.702257][ T2028]  __driver_attach+0xc0/0x14c
[   31.702262][ T2028]  bus_for_each_dev+0x80/0xcc
[   31.702266][ T2028]  driver_attach+0x24/0x30
[   31.702270][ T2028]  bus_add_driver+0x10c/0x1f8
[   31.702275][ T2028]  driver_register+0x78/0x110
[   31.702279][ T2028]  __platform_driver_register+0x44/0x50
[   31.702319][ T2028]  mpp_add_driver+0x114/0x158 [rk_vcodec]
[   31.702358][ T2028]  mpp_service_probe+0x548/0x598 [rk_vcodec]
[   31.702362][ T2028]  platform_drv_probe+0x94/0xbc
[   31.702366][ T2028]  really_probe+0x200/0x500
[   31.702370][ T2028]  driver_probe_device+0x7c/0xb8
[   31.702374][ T2028]  device_driver_attach+0x6c/0xac
[   31.702378][ T2028]  __driver_attach+0xc0/0x14c
[   31.702382][ T2028]  bus_for_each_dev+0x80/0xcc
[   31.702386][ T2028]  driver_attach+0x24/0x30
[   31.702390][ T2028]  bus_add_driver+0x10c/0x1f8
[   31.702394][ T2028]  driver_register+0x78/0x110
[   31.702398][ T2028]  __platform_driver_register+0x44/0x50
[   31.702437][ T2028]  init_module+0x20/0xfe8 [rk_vcodec]
[   31.702444][ T2028]  do_one_initcall+0xe8/0x314
[   31.702451][ T2028]  do_init_module+0x4c/0x1fc
[   31.702454][ T2028]  load_module+0x2ce0/0x3494
[   31.702459][ T2028]  __arm64_sys_finit_module+0xb8/0xf4
[   31.702464][ T2028]  el0_svc_common+0xac/0x1ac
[   31.702469][ T2028]  do_el0_svc+0x1c/0x28
[   31.702475][ T2028]  el0_svc+0x10/0x1c
[   31.702478][ T2028]  el0_sync_handler+0x68/0xac
[   31.702482][ T2028]  el0_sync+0x160/0x180

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Icb29c2cc989ad371ccf03bc99ddab0059ca2fd9d
2023-11-30 11:37:02 +08:00
Yandong Lin
8b15ae280a video: rockchip: mpp: optimize iommu faul handle for ccu flow
1. Add iommu fault handle for soft ccu flow
2. Optimize iommu fault handle for hard ccu flow

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I7efc0e006469ef673b96a537555e345fd0f92a2f
2023-11-30 11:36:42 +08:00
Mingwei Yan
f127b87577 media: rockchip: isp: fix rockit set_fmt stuck
Signed-off-by: Mingwei Yan <mingwei.yan@rock-chips.com>
Change-Id: I8b4eda7462ce6dc0afc23fc63b35ff364ee59b9f
2023-11-30 09:10:42 +08:00
Damon Ding
65d10a12ec pwm: rockchip: rename pwm-rockchip.h to pwm-rockchip-irq-callbacks.h
Change-Id: Iea8f4edf02c35cd7b2337b014989abb2fa94b71d
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2023-11-29 16:03:07 +08:00
yuefu.su
7a225df5af media: i2c: sc223a fix dvp image error
1. modify mbus_fmt to 8bit
2. modify the edge of sampling to rising

Change-Id: I771b9c0df5a582576de18a5877a898f35336d661
Signed-off-by: yuefu.su <yuefu.su@rock-chips.com>
2023-11-29 16:02:05 +08:00
yuefu.su
b5ad0abeef media: i2c: sc223a add dvp configuration
Signed-off-by: yuefu.su <yuefu.su@rock-chips.com>
Change-Id: I52fb0bea0c29d41d94db2c7a5ba8366933da4409
2023-11-29 16:02:05 +08:00
Herman Chen
f3304bc395 video: rockchip: mpp: rkvenc2: fix irq proc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I169c526004d85220940b677755ce8021828765d2
2023-11-29 15:14:04 +08:00
Damon Ding
fd4811893b ARM: dts: rockchip: rv1126: add pwm irq configs
Change-Id: Idf54d512d8c4be462c8cf5280a0b2b8cbf18815d
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2023-11-29 15:13:46 +08:00
Jon Lin
a0c00d3e72 PCI: rockchip: dw: Support DMA linked list mode
Change-Id: I0016897ce22dde35b379f23872324614e50b6713
Signed-off-by: Simon Xue <xxm@rock-chips.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-11-29 11:11:22 +08:00
Jon Lin
4baf0d6fad PCI: rockchip: dw: Adding DMA linked list mode definition
Change-Id: Ia4264d281296fc07c8567bf2306e5b45e09af458
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-11-29 11:11:22 +08:00
Yu Qiaowei
bb47c8ad34 video: rockchip: rga3: fix import failure does not return error code
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ie1295d10b48b5e9775f0b66eeb0fd21bb916dded
2023-11-29 11:09:26 +08:00
Cai YiWei
e47fab24c5 media: rockchip: isp: fix power_cnt if error
Change-Id: I2c918827daeebb14af57c83cc1de2250a85422ca
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-11-29 11:06:20 +08:00
Eddy Zhang
75479b9711 drm: bridge: dw-hdmi: fix incorrect I2CM configuration
In the old code, I2CM configuration was not performed when using a
separate controller, This will cause a wrong interrupt polarity
configuration and make communication confirmation timeout between
the Synopsys controller and Synopsys PHYs

Change-Id: Ie95e0f41164a33417bad5d17a722218c279624f9
Signed-off-by: Eddy Zhang <eddy.zhang@rock-chips.com>
2023-11-29 11:05:33 +08:00
Eddy Zhang
b924b98ffa Revert "drm: bridge: dw-hdmi: Fixed ddc error caused by plug out hdmi when reading edid"
This reverts commit 3f1bcfe6ec.

Change-Id: Ib2d1d621f8903601fd9cd03d74c23d2e758665a5
Signed-off-by: Eddy Zhang <eddy.zhang@rock-chips.com>
2023-11-29 11:05:33 +08:00
shengfei Xu
76c5bcfc43 arm64: configs: rockchip_defconfig: Enable CONFIG_MFD_RK806_I2C
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I115a5fbed17d3db420e6360d3f0acf8597f0ed92
2023-11-29 11:01:36 +08:00
Damon Ding
bf5401325c arm64: dts: rockchip: rk3528: add pwm irq configs
Change-Id: I426d21919ee8a3f674446797e56e36e5de96a181
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2023-11-29 10:52:05 +08:00
Damon Ding
7a7cdb6365 arm64: dts: rockchip: rk3328: add pwm irq configs
Change-Id: I8d12796a9f58a5121f67d70434d3a4cf1c791474
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2023-11-29 10:48:42 +08:00
Damon Ding
d240b85d0b arm64: dts: rockchip: rk1808: add pwm irq configs
Change-Id: I5d8f3ce9e9229e6b2ca810c6cf02b774b6e2a8fa
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2023-11-29 10:46:38 +08:00
Damon Ding
5ec7ab5d65 arm64: dts: rockchip: rk3568: add pwm irq configs
Change-Id: I45dd3c50cbae6100c099714dcec5d39ce20a710a
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2023-11-28 16:40:20 +08:00
Mingwei Yan
851545fccc media: rockchip: isp: fix rv1106 cycle kill rkipc null pointer
Signed-off-by: Mingwei Yan <mingwei.yan@rock-chips.com>
Change-Id: I070878cb4d0fc31adabc76885b9090e4da982fc1
2023-11-28 16:39:59 +08:00
Tony Zheng
7c102d5c0b arm64: rk3308_linux_defconfig: add CONFIG_DRM_IGNORE_IOTCL_PERMIT
Change-Id: Ib86ee647d9f1f45bf3dfaba39ea39a83748b3c4a
Signed-off-by: Tony Zheng <tony.zheng@rock-chips.com>
2023-11-28 09:20:22 +08:00
Zefa Chen
28a0dfee1c media: i2c: imx464 fixes exposure error of short frame
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I73143f8dfb665d802c4d7ad911b6a1a50f4f612e
2023-11-27 19:45:23 +08:00
Zefa Chen
d4dcc9b2c5 media: i2c: add og01a10 driver
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I4be70fac4eaaee48692edc843b6dbc0940acc3b1
2023-11-27 19:45:23 +08:00