Commit Graph

1086630 Commits

Author SHA1 Message Date
Finley Xiao
86d8a7fc28 soc: rockchip: Add clock subunit driver
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Id1d784d2549bf1c47066b572d32b396966c52c96
2023-11-27 19:27:52 +08:00
Damon Ding
23789ce869 arm64: dts: rockchip: px30: add pwm irq configs
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I121376bf28c157d5d588466dc9d5796e764cd425
2023-11-27 19:09:42 +08:00
Jon Lin
7d15f43d91 PCI: rockchip: dw: Reserve msi_data in obj_info
Change-Id: I7b589d6c5b03a96c04c33330c63066505dabc1b0
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-11-27 19:09:42 +08:00
Jon Lin
694b4503a6 misc: rockchip: pcie-rkep: Support mmap bar resource and rw config space
Change-Id: Ib97bd299cfdc3bcba40250cc1d10686fb1fc64e4
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-11-27 19:09:42 +08:00
Jon Lin
5592509ba4 misc: rockchip: pcie-rkep: Adding more mmap resources
Adding:
	PCIE_EP_MMAP_RESOURCE_USER_MEM,
	PCIE_EP_MMAP_RESOURCE_RK3568_RC_DBI,
	PCIE_EP_MMAP_RESOURCE_RK3588_RC_DBI,

Change-Id: I69facbb8b268516c3ab68f70f15650b214649c55
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-11-27 19:09:42 +08:00
Cai YiWei
d2188d8a06 media: rockchip: isp: fix wnd_num cause array access out of bounds
Change-Id: I689475aacd5e0a49dee067a03c995aee241bcf5b
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-11-27 19:09:42 +08:00
shengfei Xu
b473fca294 mfd: rk806: Add RK806 support i2c
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: Ic7a633fe53b3218cbcc2e8a36d214d6c4c865f85
2023-11-27 19:09:41 +08:00
Shawn Lin
5dc8f0d04b PCI: rockchip: dw: Validate phy mode in suspend
Some PCIe root port uses combophy but combo phy can be used by
other type of controllers. If someone enable phy for both of two
controllers, it should break the s2r and hard to debug. Validate
this kind of bug and cast an error like this:

[   10.698225] naneng-combphy fee20000.phy: expected mode is PCIe, but current mode is USB3
[   10.698232] rk-pcie fe180000.pcie: PHY is reused by other controller, check the dts!
[   10.698244] PM: dpm_run_callback(): rockchip_dw_pcie_suspend+0x0/0x410 returns -22
[   10.698266] PM: Device fe180000.pcie failed to suspend async: error -22
[   10.902134] PM: pm_system_irq_wakeup: 166 triggered fsc_interrupt_int_n

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Icc65c9d19ef2bcb54bfb3665d4c012f8ac0e710e
2023-11-27 19:09:41 +08:00
Shawn Lin
f4b096ab2d phy: rockchip: naneng-combphy: Add phy_validate support
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Icc2587edadcb37be0bac41c2128391f7583bc3ff
2023-11-27 19:09:41 +08:00
Chaoyi Chen
5c6639e0ef arm64: dts: rockchip: add lvds demo dts for rk3567/rk3568
This commit adds demo dts about the various possible uses of LVDS:
1. Single channel LVDS
2. Dual LVDS
3. Two Video Port use two separate single channel LVDS
4. One Video Port use two separate single channel LVDS

For case 1, the video port outputs as follows:
	VP1 -> LVDS0 or VP1 -> LVDS1
	or VP2 -> LVDS0 or VP2 -> LVDS1

For case 2, the video port outputs as follows:
	VP1 -> LVDS0, VP1 -> LVDS1
	or VP2-> LVDS0, VP2-> LVDS1

For case 3, the video port outputs as follows:
	VP1 -> LVDS0, VP2 -> LVDS1
	or VP1 -> LVDS1, VP2 -> LVDS0

For case 4, the video port outputs as follows:
        VP1 -> LVDS0, VP1 -> LVDS1
        or VP2-> LVDS0, VP2-> LVDS1

Change-Id: I426ba9033863cc1442834daf8fa63aaa472274c5
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2023-11-27 19:09:41 +08:00
Chaoyi Chen
a857a766e8 arm64: dts: rockchip: rk3568: Add readable label for lvds0
Change-Id: Iacf2cc02fb23ac4a5e8384c3901ce83ed30ef392
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2023-11-27 19:09:41 +08:00
Yu Qiaowei
38cfa875e4 video: rockchip: rga3: modify rga_win_data formats config
Change-Id: I83e1be5313e4e6d18c19c7c50dce9b7b685da6b1
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
2023-11-23 10:51:07 +08:00
Damon Ding
e165441fc7 drm/rockchip: vop2: add debug name for rgb565_2x8 mode
Change-Id: Idf9c1f90866496062d1b974732a996793804110b
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2023-11-22 11:36:43 +08:00
Damon Ding
bb65c8eb38 drm/rockchip: vop: add debug name for rgb666_3x6 and rgb565_2x8 modes
Change-Id: Idb613d15de7d20d5f89e8284111be1db0d5e9031
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2023-11-22 11:35:59 +08:00
Jon Lin
9cf5d69483 spi: rockchip: Preset SPI slave controller configuration
Ensure that cs io is in the input state in initial progress.

Change-Id: I808994ec14e3f4ab1c580f2f07e3e41b444bcc2e
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-11-22 10:44:32 +08:00
Luo Wei
d2ce9f696f mfd: display-serdes: improve pinctrl interface for maxim chip
Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: I3e05160c5cadc4c930185a2667f2135ed6f1c83f
2023-11-22 10:32:57 +08:00
Cai YiWei
9736af62dd media: rockchip: isp: frame timestamp change to sof
Change-Id: I94139520934d399363c3343fdab9338b6ec617cb
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-11-22 09:20:36 +08:00
Finley Xiao
6db68e7935 driver: rknpu: Split devfreq into separate file
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ieb75646dafd30e4cd2d445bc51a984e284cba34b
2023-11-21 18:53:08 +08:00
Jianlong Wang
b3eb34d31e arm64: dts: rockchip: rk3328-evb: update to kernel5.10
Change-Id: I617db145fe22c22651903b3ff218f54b3fdb40be
Signed-off-by: Jianlong Wang <jianlong.wang@rock-chips.com>
2023-11-21 16:10:52 +08:00
Jianlong Wang
a84f6f5045 arm64: dts: rockchip: rk3328: correct dmc_opp_table frequencies
Change-Id: Ic680a2e73d84ed4e2604b1228b2d743b91601af1
Signed-off-by: Jianlong Wang <jianlong.wang@rock-chips.com>
2023-11-21 15:14:13 +08:00
Jianlong Wang
137c61caf0 arm64: dts: rockchip: rk3328: update to kernel5.10
Change-Id: If0969403709e56c61177003dedf251d10ba0cced
Signed-off-by: Jianlong Wang <jianlong.wang@rock-chips.com>
2023-11-21 10:59:12 +08:00
Zefa Chen
0e02eaa9e3 media: rockchip: vicap: mipi csi2 set default lane to 4 while not connect to sensor
fixes:

[    2.431002][    T1] rkcif rkcif-mipi-lvds: clear unready subdev num: 1
[    2.431031][    T1] ================================================================================
[    2.431039][    T1] UBSAN: shift-out-of-bounds in drivers/media/platform/rockchip/cif/mipi-csi2.c:523:18
[    2.431048][    T1] shift exponent -1 is negative
[    2.431059][    T1] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 5.10.198 #14
[    2.431065][    T1] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
[    2.431072][    T1] Call trace:
[    2.431088][    T1]  dump_backtrace+0x0/0x1dc
[    2.431096][    T1]  show_stack+0x18/0x24
[    2.431107][    T1]  dump_stack_lvl+0xe4/0x12c
[    2.431114][    T1]  dump_stack+0x18/0x3c
[    2.431126][    T1]  __ubsan_handle_shift_out_of_bounds+0x2dc/0x30c
[    2.431137][    T1]  csi2_g_mbus_config+0xf8/0x100
[    2.431147][    T1]  call_get_mbus_config+0x2c/0x44
[    2.431154][    T1]  subdev_notifier_complete+0xec/0x6dc
[    2.431162][    T1]  v4l2_async_notifier_clr_unready_dev+0xd0/0xd8
[    2.431168][    T1]  rkcif_clr_unready_dev+0x38/0x6c
[    2.431175][    T1]  do_one_initcall+0xe8/0x320
[    2.431186][    T1]  do_initcall_level+0xd4/0x1d8
[    2.431193][    T1]  do_initcalls+0x54/0x94
[    2.431199][    T1]  do_basic_setup+0x24/0x30
[    2.431205][    T1]  kernel_init_freeable+0xf0/0x168
[    2.431212][    T1]  kernel_init+0x14/0x1ac
[    2.431219][    T1]  ret_from_fork+0x10/0x18
[    2.431225][    T1] ================================================================================
[    2.431639][    T1] rkcif-mipi-lvds: rkcif_update_sensor_info: stream[0] get remote terminal sensor failed!
[    2.431662][    T1] rkcif-mipi-lvds: Async subdev notifier completed
[    2.431679][    T1] rkcif-mipi-lvds: rkcif_update_sensor_info: stream[0] get remote terminal sensor failed!
[    2.431687][    T1] rkcif-mipi-lvds: There is not terminal subdev, not synchronized with ISP

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Id6bebc37a2e649a856ae12cbe3eb60917ecdf165
2023-11-21 10:40:23 +08:00
XiaoDong Huang
0aa6d336c0 ARM: rockchip: support rv1103 suspend
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: I9dc1d71bf0c20b8a48f49c283bc1fdef37be770a
2023-11-20 16:49:20 +08:00
Damon Ding
f946ec4332 drm/rockchip: vvop: fix compile errors
Fixes: 7f0033da72 ("drm/rockchip: vvop: fix a potential race condition when vvop_disable_vblank")

Change-Id: I63356c83dfca4d6d0c98a23105343a496b760587
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2023-11-20 15:32:59 +08:00
Guochun Huang
58ca4dfe89 drm/rockchip: dsi2: support Auto-Calculation mode
the dsi2 controller can be select work in Munual or
Automatic mode, by writing in MANUAL_MODE_CFG register.

the Auto-Calculation mode has the following advantages:

1.Eliminates the need for the user to configure a set of registers
2.Makes the configuration routine easier, and the controller is less
  prone to undesired behaviors
3.Allows IPI frames to change dynamically with the controller adapting
  the output frames

Change-Id: I00dfad82f9d5aa27abc4a2b99471ae4d6412d1b0
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2023-11-17 18:13:49 +08:00
Guochun Huang
90463250cb drm/rockchip: dsi2: fix IPI_RATIO_MAN_CFG in dsc mode
Change-Id: Iad403cca10fb1d9efb84d6b7e6524e22586a2421
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2023-11-17 17:59:08 +08:00
Rimon Xu
dfb726bf21 video: rockchip: vtunnel: buffer ID should generate by instance
When resetting an instance, the buffer generation ID will be changed,
but when receiving images, the ID will be used to determine whether
it is an expired buffer. Therefore, the ID generator should be placed
in the instance instead of the device.

Change-Id: I707403dd22dce784dee07654d7333a02f5f35f43
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
2023-11-17 16:50:39 +08:00
Mingwei Yan
5eda8fae48 media: i2c: add mis4001 sensor driver
Signed-off-by: Mingwei Yan <mingwei.yan@rock-chips.com>
Change-Id: I14ce592e0f03af0584b49f9dbf79b4685265bba3
2023-11-17 15:46:44 +08:00
Mingwei Yan
7a09fd1675 media: i2c: add mis2031 sensor driver
Signed-off-by: Mingwei Yan <mingwei.yan@rock-chips.com>
Change-Id: Ief24f6240f85971aa1e65927127934b2c2e41e77
2023-11-17 15:42:21 +08:00
Sach Lin
094d8870cd media: i2c: add sc2355 driver
Signed-off-by: Sach Lin <sach.lin@rock-chips.com>
Change-Id: I829a47eb558a47d93e437c0aef71b42fd1ce4fd1
2023-11-17 15:15:49 +08:00
Jianlong Wang
36fe76db56 ARM: configs: rk312x: enable CONFIG_DRM_IGNORE_IOTCL_PERMIT
Allow the DRM ignore some permission issues.

Change-Id: I8e122ebeb1fc103b0bb5b9334cbb89ebf5a4334d
Signed-off-by: Jianlong Wang <jianlong.wang@rock-chips.com>
2023-11-17 15:04:20 +08:00
Zefa Chen
187f0ceb6a media: i2c: sc5336 update register list
compatible with sc5336 and sc5338

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I294b88bae34a4f38e8d4947acdc7b1fddacdfd5c
2023-11-17 14:51:42 +08:00
Tao Huang
3b5325a4cd soc: rockchip: minidump: make md_vmalloc_to_page() static
drivers/soc/rockchip/minidump/minidump_log.c:662:14: warning: no previous prototype for 'md_vmalloc_to_page' [-Wmissing-prototypes]

Fixes: 0417e5b732 ("soc: rockchip: minidump: don't save peripheral space")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I23753bd1baebb78fc60aae8ab1529f560ea84d25
2023-11-17 09:36:10 +08:00
Huibin Hong
4ec9300575 fiq_debugger: set current_cpu to new cpu after current_cpu is offline
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: Ie86c4115df6b20e2d5ab3d79cd594e6e5ddad0c9
2023-11-16 14:23:27 +08:00
Zhichao Guo
cfae443e0a ARM: dts: rockchip: add rv1106g-evb2-v12-aov-spi-nor.dts
Signed-off-by: Zhichao Guo <zhichao.guo@rock-chips.com>
Change-Id: I76e9dd8413fa2ccc6cd0d08e31e3a5aaae58a9de
2023-11-16 11:26:29 +08:00
Zefa Chen
07eb3ddd78 media: rockchip: vicap: reserve memory according to actual needs when dev change from thunderboot to online
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I539450bd80ee5e1a81e58924f75bd27d0aefe86c
2023-11-16 10:31:03 +08:00
Zefa Chen
61949a9b21 media: rockchip: vicap fixes error when work on both thunderboot and quick suspend/resume
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ied9db7a3ed4e63735066424c48b6870830284588
2023-11-16 10:11:26 +08:00
Yandong Lin
49b335bda8 video: rockchip: add mpp osal
The osal is to adapt to kmpp ko.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I134d1e50b66a0e23ecfd8de60498b7b6e5c3a0c2
2023-11-16 10:09:16 +08:00
Huibin Hong
0417e5b732 soc: rockchip: minidump: don't save peripheral space
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: I9da05cd44d85866dccd0bbd61962c2ac4534dcfd
2023-11-16 01:21:08 +00:00
Huibin Hong
15eb463188 arm64: dts: rockchip: rk3588-linux: support minidump
Take a buffer from pstore buffer for minidump share memory

Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: If201f09d771b612258d703fa567813976f7c99f2
2023-11-16 01:21:08 +00:00
Cody Xie
33ea3cee5e media: i2c: max92756: Support V4L2 DV class
Change-Id: Ia790015f551442f7716deeb10f79530d8a023c9a
Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
2023-11-15 18:58:36 +08:00
Zefa Chen
2688d7f925 media: i2c: add ar2020 sensor driver
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I16a53fa473d82ac377c31fadb3cc55898825428f
2023-11-15 18:45:36 +08:00
Simon Xue
e8cea8fe67 watchdog: dw_wdt: fix array out-of-bounds in theory
Change-Id: Ie11b60cf79b4c988af1ca7939334cbb742582247
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2023-11-15 18:44:21 +08:00
Zhang Yubing
077c5b13fa mfd: rkx110_x120: add irq support
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Ibb8316211ef67ffe9ee9a0dcfa391ecfae0af9d0
2023-11-15 18:17:57 +08:00
Andy Yan
5498c2a4d2 drm/rockchip: vop2: fix overlapping_copy
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: Icbae6c1dd5ad0b3c580c73b8776272d364473501
2023-11-15 18:11:05 +08:00
Jon Lin
eeaca8874b mtd: spi-nor-ids: support PY25Q128LA
Change-Id: I5b92a866871b5635963510f46d3ba822d66964a2
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-11-15 17:58:35 +08:00
Andy Yan
7f0033da72 drm/rockchip: vvop: fix a potential race condition when vvop_disable_vblank
A very similar case on amdgpu_vkms:
commit 826c1e923b ("drm/amdgpu/vkms: relax timer deactivation by
hrtimer_try_to_cancel")

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I0692cd2c4ad3e3f090c0df040537995f99c2fcff
2023-11-15 16:33:51 +08:00
Sandy Huang
f15552775d drm/rockchip: vop2: Fix possible_crtcs error for cursor plane
Before this commit, because the crtc is not initialized yet, if use the drm_crtc_mask(crtc) at
vop2_cursor_plane_init(), the cursor plane possible_crtcs will always be 1 for vp0.

After this commit, the plane possible_crtcs will be:
if (disable_win_move && vop2)
	possible_crtcs = BIT(registered_num_crtcs);
else if (vop3)
	possible_crtcs = win->possible_crtcs from reg_data;
else
	possible_crtcs =(1 << vop2_data->nr_vps) - 1;//all crtc

Fixes: 1a6b7e170f1e ("drm/rockchip: vop3: add support rk3528")
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I7d23aab328962c1a77f6d0c11c5f81731bdceb80
2023-11-15 15:33:03 +08:00
Cai Wenzhong
f89c0e66e0 media: i2c: maxim2c: driver version v2.00.01
1. MIPI TXPHY add tunnel mode support.
2. MIPI TXPHY mode only support 2x4Lanes and 2x2Lanes.

Signed-off-by: Cai Wenzhong <cwz@rock-chips.com>
Change-Id: I33d5ff240c9f85319f757c3cc2ba7d067ce69aae
2023-11-15 15:28:11 +08:00
Damon Ding
4b18a69d88 drm/rockchip: vvop: add support to multiple CRTCs
1.Add crtc property IS_VIRTUAL and SOC_ID. HWC needs
  property IS_VIRTUAL to identify the virtual crtc,
  and the property SOC_ID to confirm the platform.
2.Add support for resolutions:
  1280x720   720x1280
  1920x1080  1080x1920
  2560x1440  1440x2560
  3840x2160  2160x3840
  4096x2160  2160x4096
  with frame rate 30/60/90/120/144.
3.Fix the process of releasing resources in vvop_unbind().

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I5cbd8ce4cb0d55023fb36426ff3a79bf0ae25080
2023-11-15 15:22:49 +08:00