Commit Graph

1271786 Commits

Author SHA1 Message Date
Tao Huang
6ff03d2d70 arm64: dts: rockchip: Move rk3576.dtsi out of rk3576-vehicle-evb.dtsi
Allow the final dts to modify the contents of rk3576.dtsi,
e.g. including rk3576-cpu-swap.dtsi

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I0802429be68d58b087979cbd992fafacb8dff76e
2024-05-27 18:22:20 +08:00
Tao Huang
817483ec0c arm64: dts: rockchip: Move rk3576.dtsi out of rk3576-test2.dtsi
Allow the final dts to modify the contents of rk3576.dtsi,
e.g. including rk3576-cpu-swap.dtsi

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I2740041f036a58b2e8a44acc2d536226c6ba782a
2024-05-27 18:22:20 +08:00
Tao Huang
b1098ad39b arm64: dts: rockchip: Move rk3576.dtsi out of rk3576-test1.dtsi
Allow the final dts to modify the contents of rk3576.dtsi,
e.g. including rk3576-cpu-swap.dtsi

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I009a72420f50344ad9173fe9b83ac81057c3f349
2024-05-27 18:22:20 +08:00
Tao Huang
0f2880b94d arm64: dts: rockchip: Move rk3576.dtsi out of rk3576-iotest.dtsi
Allow the final dts to modify the contents of rk3576.dtsi,
e.g. including rk3576-cpu-swap.dtsi

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ie0b70135b4e139f9912d57ef4be6b846eda1e93f
2024-05-27 18:22:20 +08:00
Tao Huang
f7fc553dd0 arm64: dts: rockchip: Move rk3576.dtsi out of rk3576-industry-evb.dtsi
Allow the final dts to modify the contents of rk3576.dtsi,
e.g. including rk3576-cpu-swap.dtsi

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I9ce306c89653f23eb18fb32149b061883b4478c1
2024-05-27 18:22:20 +08:00
Tao Huang
e0c84bcdc6 arm64: dts: rockchip: Move rk3576.dtsi out of rk3576-evb2.dtsi
Allow the final dts to modify the contents of rk3576.dtsi,
e.g. including rk3576-cpu-swap.dtsi

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I7c4e3a81c9a101b9669abe875f235351bb2e0fa5
2024-05-27 18:22:20 +08:00
Tao Huang
9cd3119169 arm64: dts: rockchip: Move rk3576.dtsi out of rk3576-evb1.dtsi
Allow the final dts to modify the contents of rk3576.dtsi,
e.g. including rk3576-cpu-swap.dtsi.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I981c1bd2541c6bb3a5fc7c1ff8126f358f85beee
2024-05-27 18:22:20 +08:00
Zhibin Huang
7e70102b91 misc: rk628: bt1120: fix read bt1120_dec clock frequency error
Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: I40f80f9d6a0daee6aedbae07cadfe24e7e171e56
2024-05-27 11:05:00 +08:00
Zhibin Huang
86b285adeb misc: rk628: bt1120: set up a tolerance of 2% for bt1120 decoder clk
BT1120 dec clk is a 4-bit integer division, which is inaccurate in
most resolutions.

For example, In bt1120->HDMI 1024x768@60Hz scenario, the actual
required clk frequency is 65MHz, while the CPLL frequency is 1188MHz.
After frequency division, the obtained frequency is 62.5MHz, which
deviates too much from the actual clk and causes the screen to be
unable to display.

So if the frequency division is not accurate, apply for a fault
tolerance of up 2% in frequency setting, so that the obtained
frequency is slightly higher than the actual required clk, so that
the deviation between the actual clk and the required clk frequency
is not significant.

Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: Ib04c55d60211ea0cdc56a3bcc3ce49db1ceef8a8
2024-05-27 11:04:59 +08:00
Zhibin Huang
3d48d95ae9 misc: rk628: bt1120: y2r enable is handled in the post_process
Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: I9c3c6d0ce917d80b0d4ce1369133439a79bf2df9
2024-05-27 11:04:59 +08:00
Zhibin Huang
f12b2d73bb misc: rk628: fix 64-bit division error when compiling arm platform
Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: I1bf1319de734979735ff3af95bd83f12ffcd3c5c
2024-05-27 11:04:59 +08:00
XiaoDong Huang
e8ce498b96 arm64: dts: rockchip: rk3576-evb: rockchip_suspend; add rockchip,regulator-on-before-mem
Change-Id: Ib1f83b18c8861707f436e7f4482c5e67f110126b
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2024-05-27 10:43:09 +08:00
XiaoDong Huang
d06dc052ef soc: rockchip: pm_config: support to enable regulator before sleep
If we want to enable regulators before system leep, just configure
property "rockchip,regulator-on-before-mem = <xx>, <xx>, <xx>..."
in rockchip-suspend node.

Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: Ic421498650f0a208a070c8ceacb94f57ed897609
2024-05-27 10:43:09 +08:00
XiaoDong Huang
6c3dd070c7 soc: rockchip: pm_config: rename on_off_regs_list to on_off_regs_dev_list
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: I40ef08d5c85413b521da5a26b44c3246cfccfc3e
2024-05-27 10:24:14 +08:00
Damon Ding
4427d8f548 drm/rockchip: rgb: add dclk_delayline config for rk3576
The dclk_delayline is to adjust the phase between dclk
and data for bt1120/bt656/rgb interface.

According to the rk3576 SI test report, the dclk_delayline
should be 0x5 in order to improve signal quality.

Change-Id: I93d3b865d0b012588ce022876af81ccc47451f32
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-05-24 19:02:27 +08:00
Luo Wei
a72be40c93 mfd: display-serdes: add max96745 bridge split support
Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: I038592b035a9623962e7f129881ec197261e4c22
2024-05-24 16:09:34 +08:00
Tao Huang
70fde854ea arm64: rockchip_linux_defconfig: Use CONFIG_HZ_250
Which is default.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ib6cd6ea9a22e238ff9b97d69f93a4ce50b4b4331
2024-05-24 15:26:53 +08:00
Tao Huang
74ff804eba arm64: rockchip_linux_defconfig: Disable CPU errata 2441007 (Cortex-A55)
According to ANDROID commit a9567a35d0 ("ANDROID: arm64: Disable workaround
for CPU errata 2441007 and 2441009"):

CPU errata 2441007 (Cortex-A55) and 2441009 (Cortex-A510) are categorised
as "rare" by Arm and consequently the workaround is not intended to be
deployed in practice as the issue is not expected to occur in real-world
environments.

Given that the cost of the workaround, which issues additional broadcast
TLB invalidation requests, has been shown to impact kswapd significantly
on Pixel devices, disable the workaround following Arm's recommendation.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I794d048a094714c1370752bfaa47bee2afd57d53
2024-05-24 15:26:53 +08:00
Huibin Hong
9fbcb7ca5b serial: 8250_port: fix dma tx issue on rockchip
Fixes: e8ffbb71f7 ("serial: 8250: use THRE & __stop_tx also with DMA")

Change-Id: I8c30f0413a3ff7f9f36ee089ee1be5f3f4a0d045
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2024-05-24 15:08:14 +08:00
Yu Qiaowei
171188308c video: rockchip: rga3: scheduler needs to be locked when operating registers
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I729f1e0dac96022ffe01b3367a964d61e4e739e1
2024-05-24 14:07:56 +08:00
Yu Qiaowei
4f91478b80 video: rockchip: rga3: query job state when clearinga timeout job
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ia78895878e5ed2a0658e827ec16ffd3314235edb
2024-05-24 14:07:56 +08:00
Yu Qiaowei
d60dbd00ed video: rockchip: rga3: support querying hardware work cycle
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I7884f17590ed8a11134664897534eb0cc911275d
2024-05-24 14:07:56 +08:00
Tao Huang
c6a0b5d0c7 arm64: rockchip_linux_defconfig: Disable AMPERE/A520 erratum
-CONFIG_AMPERE_ERRATUM_AC03_CPU_38
-CONFIG_ARM64_ERRATUM_2966298

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iac5a07f0190dac519f7ab4570b0de7963be0c90c
2024-05-24 11:04:55 +08:00
Tao Huang
13f5c96469 ARM: dts: rockchip: Sort dtb entries in Makefile
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Idde8ca2faf4faf1767c4b140a920af68a5e1ebf4
2024-05-24 10:22:37 +08:00
Yandong Lin
4938e4ee1b video: rockchip: mpp: optimize the schedule of enc/dec
Remove the isr thread to reduce one thread schedule.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I4721fc6066c8580e5955f8c79025e46b96c82d85
2024-05-24 10:22:08 +08:00
Zhibin Huang
d420d65bec drm/rockchip: dsi2: optimize drive probe process
Put "component_add" in the attach call so that dsi host and dsi device
(panel or bridge) can be regarded as a component as a whole.

dsi calls "mipi_dsi_host_register" so that the panel executes the probe
process or the bridge successfully executes "mipi_dsi_device_register_full"
during the probe process. The panel or bridge triggers "component_add"
by calling mipi_dsi_attach after the probe is successful.

Through the above modifications, you can avoid dsi defer probe infinitely
due to panel configuration errors.

Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: Ic8782e9902a6133990fca728ab12e530e50b6d68
2024-05-23 11:28:09 +08:00
Tao Huang
50f19f66e6 soc: rockchip: pm_config: better module support
Use __is_defined(MODULE) to replace "#ifndef MODULE".

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I41ad334a9c4c6459bdcd0902098b16113d34c6e5
2024-05-23 10:18:13 +08:00
Zorro Liu
88a2bf21f1 soc: rockchip: rockchip_system_monitor: modify ebc dmc policy
Change-Id: If621bcdc3caad5c25545696b4daf2f640c44d2b6
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-05-23 10:12:29 +08:00
Finley Xiao
3d41eb3c90 PM / devfreq: rockchip_dmc: Add ebc system status support
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I17c359d119e5ea6c0124d05bb0ab55e3d540643b
2024-05-23 10:12:29 +08:00
Finley Xiao
2bb3dc2155 drm/rockchip: vop2: Set single vop status when only one active video port
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I30b924023af3058409ec40ff1d47259ff20c3aeb
2024-05-23 10:12:29 +08:00
Jon Lin
6f5319f062 net: wireless: rockchip_wlan: bcmdhd: Reset PCIe when wifi reg on
Change-Id: Iec7811ae42a7e8bc35ef59006d0694b78e372368
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-05-22 17:22:24 +08:00
Jon Lin
94664c08ae PCI: dw: rockchip: Support rockchip_dw_pcie_pm_ctrl_for_user
Some PCIe devices have custom power management measures that do
not rely on the PCIe framework, such as PCIe wifi, which rely on
the reset of the PCIe controller to avoid or solve potential fault
problems.

Change-Id: I7bdb0bd9edfb837a03a12790521e71adc6cd99fe
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-05-22 17:22:24 +08:00
Caesar Wang
99bc8cce0a arm64: dts: rockchip: add rk3562-iotest-lp3-v10.dtsi for iotest board
This commit adds a new device tree source file rk3562-iotest-lp3-v10.dtsi
to describe the hardware configuration of the Rockchip RK3562 IOTEST LP3
V10 development board. It also modifies the rk3562-iotest-lp3-v10-linux.dts
and rk3562-iotest-lp3-v10.dts files to include the new
rk3562-iotest-lp3-v10.dtsi file.

The main purpose of this commit is to enable synchronized updates for
common content related to the RK3562 IOTEST LP3 V10 development board.

Change-Id: I8d5d26c12e6b4ed00b43118737f8fe36761eaab7
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2024-05-22 14:58:38 +08:00
Zefa Chen
39c7e7c4d4 media: i2c: fixes error of techpoint driver
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I20508cfb5e08d2629221fa898852bc3bad5ba767
2024-05-22 11:57:12 +08:00
Zhang Yubing
fc87ca81ee drm/rockchip: dw-dp: use low link rate for low pixel clock timing
When DPTX controller config 2 pixe mode and work in sst mode,
and a low pixel clock image transmit in high link rate(HBR3),
some monitor may display flicker. To avoid this issue appear,
use lower link rate(HBR2) when transmit a low pixel clock image.

Change-Id: I75ac8fcb963631cb372dd76c4b45ca33e960f6c9
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-05-21 15:26:50 +08:00
Wang Panzhenzhuan
63172c061d phy: rockchip: csi2-dphy: fixes dphy open/close stuck issue for rk3576
This fixes system stuck when open/close dphy connected sensor.
Unable to handle kernel access to user memory outside uaccess routines
at virtual address 000000010000035c
Call trace:
rockchip_csi2_dphy_detach_hw+0x368/0x598
csi2_dphy_s_stream+0x184/0x6a0
csi2_s_stream+0x1e4/0x6c8
rkcif_pipeline_set_stream+0x1e4/0x780
rkcif_do_stop_stream+0x390/0x1260
rkcif_stop_streaming+0x18/0x24
__vb2_queue_cancel+0x38/0x260
vb2_core_streamoff+0x28/0xac
vb2_ioctl_streamoff+0x5c/0x8c
v4l_streamoff+0x24/0x30
__video_do_ioctl+0x2d8/0x3f0
video_usercopy+0x418/0x9ac
video_ioctl2+0x18/0x24
v4l2_ioctl+0x4c/0x5c
__arm64_sys_ioctl+0x90/0xc8
invoke_syscall+0x40/0x104
el0_svc_common+0xbc/0x168
do_el0_svc+0x1c/0x28
el0_svc+0x1c/0x68
el0t_64_sync_handler+0x68/0xb4
el0t_64_sync+0x164/0x168

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I568c8790df3ea23b767b71cf414439583853d4b0
2024-05-21 15:18:02 +08:00
Jianwei Fan
170875f34d media: i2c: rk628: fix mutex_lock when get_fmt if nosignal
Fixes: 7f0bc0de39 ("media: i2c: rk628: add nosignal process when get_fmt and enable stream")
Change-Id: I94b55ca0bdd9dd17168f28d25590c66e9f1dd923
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-05-21 10:29:56 +08:00
Chandler Chen
ea6b7d434e video: rockchip: mpp: rkvdec: link mode use autosuspend
Change-Id: I65be7aeb36b6e0906a80768df3ed81af131252e3
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
2024-05-20 18:40:24 +08:00
Cai YiWei
8e8fd7e954 media: rockchip: isp: fix cac repeat enable
Change-Id: I2b0e5cb7e3064a3118147b689ce126e7ff99c9c3
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-05-20 16:30:51 +08:00
Damon Ding
e6a4425422 Revert "phy/rockchip: samsung-hdptx: correct SDC_N"
This reverts commit 843fd2249d.

The ROPLL_SDC_N should be 1 in HBR and HBR2, which
has been confirmed with the vendor. The pervious
commit will make the SI failed to meet the specifications:

      theoretical rate(Gbps)  actual rate(Gbps)  result
RBR          1.620                 1.620          pass
HBR          2.700                 2.702          fail
HBR2         5.400                 5.404          fail

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I6faf6f36b43f7645739e829c761c9f61449d91a3
2024-05-20 16:26:52 +08:00
Sandy Huang
64f2438ab1 drm/rockchip: vop2: correctly config cluster win dly num
Cluster win1 dly num is same with win0 and saved by cluster-win0
dly_num.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Id9938a69db827513dc3000c5cb832170d0480ab4
2024-05-20 15:22:33 +08:00
Sandy Huang
060f786e9b drm/rockchip: vop2: The data from cluster mix is always premultiplied alpha
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Icf107d31f9fb04cf612a02a0127d66448d8f7ed1
2024-05-20 11:05:39 +08:00
Algea Cao
727394f2d9 phy: rockchip-samsung-hdptx-hdmi: Fix get phy pll freq failed in frl mode
Get phy pll freq failed in frl mode should read lcpll regs.

Fixes: fff8ec3ee9 ("phy: rockchip-samsung-hdptx-hdmi: Fix phy pll is incorrectly configured when logo is enabled.")
Change-Id: I64e973f85acd74ee251b4ab6c0a141394c116d92
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2024-05-20 10:57:34 +08:00
Jake Wu
5e320d0310 usb: typec: husb311: set vbus off when shutdown
vbus-on will trigger pmic restart when system shutdown.

Signed-off-by: Jake Wu <jake.wu@rock-chips.com>
Change-Id: I49a610f6a24c6d0ffc33a5bef7dc909f738f1f12
2024-05-20 09:41:34 +08:00
Yu Zheng
2945f84855 arm64: dts: rockchip: rk3576 evb1 boards for linux ipc form 3x to 4x camera
Change-Id: I045431ee5fa3f8168bde7a79b40fb60c7d3b3dbd
Signed-off-by: Yu Zheng <yu.zheng@rock-chips.com>
2024-05-20 09:40:08 +08:00
Tao Huang
cf28107f98 mfd: rkx110_x120: pwm: Add module license
Fixes the following error:

ERROR: modpost: missing MODULE_LICENSE() in drivers/mfd/rkx110_x120/rkx120_pwm.o

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I27def7b919a0efcffc62f30e159066a4c21cb905
2024-05-17 19:48:00 +08:00
Finley Xiao
feb16e5db3 soc: rockchip: power-domain: Add memory reset support for rk3576
This fixes panic when pd power on.
rockchip-pm-domain 27380000.power-management:power-controller: failed to set domain 'nputop', target_on= 1, val=0
Kernel panic - not syncing: panic_on_set_domain set ...
Call trace:
dump_backtrace+0xf4/0x114
show_stack+0x18/0x24
dump_stack_lvl+0x6c/0x90
dump_stack+0x18/0x38
panic+0x14c/0x338
rockchip_do_pmu_set_power_domain+0x640/0x644
rockchip_pd_power+0x154/0x350
rockchip_pd_power_on+0x24/0x30
genpd_power_on+0x1d4/0x2ec
genpd_power_on+0x7c/0x2ec
genpd_runtime_resume+0xb0/0x384
__rpm_callback+0x7c/0x3c4
rpm_resume+0x43c/0x678
__pm_runtime_resume+0x4c/0x90
rknpu_power_on+0xa0/0x2d8
__rknpu_action_ioctl+0x54/0x230
drm_ioctl_kernel+0x80/0xf8
drm_ioctl+0x2d4/0x554
__arm64_sys_ioctl+0x90/0xc8
invoke_syscall+0x40/0x104
el0_svc_common+0xbc/0x168
do_el0_svc+0x1c/0x28
el0_svc+0x1c/0x68
el0t_64_sync_handler+0x68/0xb4
el0t_64_sync+0x164/0x168

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ic73413d48335ef6bc57f3793ba6e3b39d4ecd100
2024-05-17 19:38:54 +08:00
Sugar Zhang
d73c871ae7 arm64: dts: rockchip: rk3576: Assign audio_frac_1 to AUPLL
Currently, it serves 48k series sample rate for better jitter
performance.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I11045e45d8deb297d45e4fa9704fc25fcd3857e0
2024-05-17 16:37:49 +08:00
Sugar Zhang
c3c63e6eeb clk: rockchip: rk3576: Export CLK_AUDIO_FRAC_SRC
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I57d467cdba4295a78a9d2b73ff90add51eee8acf
2024-05-17 16:37:35 +08:00
Chandler Chen
0f466460c8 video: rockchip: mpp: reset rkvdec before pm suspend
For link mode, decoder may still running after
frame ready status was written in link table.
Do soft reset before powering off the decoder
to ensure decoder is fully idle.

fixes https://redmine.rock-chips.com/issues/477479
rockchip-pm-domain 27380000.power-management:power-controller:
failed to set idle on domain 'vdec', target_idle = 1, val=0

Change-Id: I30a337bb4cd9193627ae95fae137c12d73027c38
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
2024-05-17 16:37:21 +08:00