Commit Graph

1271828 Commits

Author SHA1 Message Date
Zhibin Huang
4f35f8e5bc drm/bridge: attach dsi in probe according to dsi driver
Type: Fix
Redmine ID: N/A
Associated modifications:
    commit d420d65bec ("drm/rockchip: dsi2: optimize drive probe process")
    Change-Id: Ic8782e9902a6133990fca728ab12e530e50b6d68
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: Ia5e8d905e6eb683d78174bb06724261c6301d6e0
2024-05-31 19:08:48 +08:00
Chaoyi Chen
2973c66147 dt-bindings: phy: Add lvds output voltage for rockchip,px30-dsi-dphy
Change-Id: I60ac24e3990697e532f18dae2b4898e50cf9ed66
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2024-05-31 19:08:48 +08:00
Chaoyi Chen
6ad510277d phy: rockchip: inno-dsidphy: Add support to change lvds output voltage
This patch add support to change LVDS output common mode voltage
and differential voltage using dts prop "inno,lvds-vcom" and
"inno,lvds-vod".

&video_phy0  {
        inno,lvds-vcom = <950>; /* 950mV */
        inno,lvds-vod = <350>; /* 350mV */
}

Change-Id: Icbaa0943f9bad7a82ffa03a178a1486c7e1117c9
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2024-05-31 19:08:48 +08:00
Tingjin Huang
d9f56ab7af video: rockchip: mpp: rkvenc2: Update address trans table
Change-Id: I033bbc42840272349f70eded7e5f39e76e34011d
Signed-off-by: Tingjin Huang <timkingh.huang@rock-chips.com>
2024-05-31 15:50:48 +08:00
Yiqing Zeng
8c7cf431ac arm64: dts: rockchip: rk3576-vehicle-evb: support rkvpss
Change-Id: I9ac58914c36d5533266c08b876d38d87c62d1535
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
2024-05-31 15:04:37 +08:00
Zhang Yubing
89b7bdea30 drm/rockchip: vop2: get correct dclk source when fixup dclk rate
For rk3576 and rk3588, vop dclk can be from pll or hdmi phy[except hdmi
2.1(dclk bigger than 597M), the HDMI work at FRL mode], when dclk is
from pll, dclk_parent is equal to dclk, we need clk_round_rate() for
dclk_parent to check whether can support this mode.

1. GPLL/CPLL/VPLL
       dclk_parent
           dclk

2. xin24m
       clk_hdmiphy_pixel0
           dclk

Change-Id: Ie5b9a7a5056a6f997ade95ab6af9b6d7ddc10f3b
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-05-30 20:42:47 +08:00
William Wu
915826d691 phy: rockchip: inno-usb2: Clear charger state in host mode
Test on RK3576 Tablet Android 14 GKI, when plug in U disk,
it will trigger the usb2 phy to do charging detection logic
in the following process.

1. Type-C PD controller chip (e.g HUSB311) detect DFP mode;

2. Type-C tcpm call usb_role_switch_set_role() to notify
   the usb controller to set USB_ROLE_HOST;

3. The usb dwc3 controller driver do dwc3_set_mode() to
   initialize the controller and phy for host mode;

4. In the __dwc3_set_mode(), it do pm_runtime_get_sync()
   -> dwc3_runtime_resume() -> dwc3_resume_common() ->
   dwc3_core_init() -> phy_init(dwc->usb2_generic_phy);

5. In the usb2 phy driver, it do rockchip_usb2phy_init()
   -> schedule otg_sm_work -> rockchip_chg_detect_work()

6. Detect dcp cable is connected, and call extcon_set_state_sync()
   to send charger notification with true state.

Later, if plug out the U disk and plug in a USB charger,
it will fail to send charger notification because its
extcon state still in true state.

To fix this issue, we need to clear the charger state
in the otg_sm_work if it's already in host mode.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I6a30429162290927cae3e5f3495f51db61bf15b6
2024-05-30 20:32:44 +08:00
Finley Xiao
4b8f3fe475 arm64: dts: rockchip: rk3576: Change low temp config for opp table
Change-Id: I87569675f1140b756722b9ba818730606f0299cb
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-05-30 20:32:14 +08:00
Zorro Liu
c3a7f7cec3 arm64: dts: rockchip: init rk806 pwrctrl3 output low for rk3576-eink
rk3576 ebook have ultra sleep circuit design, set
pwrctrl3 output low to improve system stability

Type: Function
Redmine ID: #N/A
Associated modifications: I7ccb27c54ddb8123fafe8fdbc019702caa9b9861
Test: N/A

Change-Id: I260e5069fd3b794683105d2ef425864e88b5ba96
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2024-05-30 15:45:23 +08:00
Finley Xiao
655b972bcc arm64: dts: rockchip: rk3588-rk806: Change cpu init volt to 800mV
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I7687f1f9540033f318098efef52c9db6806651da
2024-05-30 14:59:52 +08:00
Finley Xiao
6d64f4c2d4 arm64: dts: rockchip: rk3588s: Change low temp to 15000mC
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I6cf7d8911944ccc135f0dfa669f0c73185cc2521
2024-05-30 14:59:52 +08:00
Finley Xiao
39f174d725 arm64: dts: rockchip: rk3588s: Change cpu low temp min vlot to 800mV
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I5fa1f5a587e90495176a14cf68956af6aa0c63be
2024-05-30 14:59:52 +08:00
Wang Panzhenzhuan
83ed0e999d media: i2c: ov16885: fix vflip ghost issue
1. fix vflip ghost issue.
2. add write/read reg failed log.

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I83d6a92f163c8f504b71e4d38b063c7bb5af3550
2024-05-30 14:58:02 +08:00
Zhang Yubing
b3ea30f4d4 drm/rockchip: dw-dp: select encoder by the correct crtc
Change-Id: If459d759403fdbeddde9ce121de292d72c7b0541
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-05-30 11:49:25 +08:00
Cai Wenzhong
f1b09d1386 arm64: dts: rockchip: rk3576-vehicle-evb-maxim-max96712-dphy0.dtsi: fix lock and pwdn gpio config error
Signed-off-by: Cai Wenzhong <cwz@rock-chips.com>
Change-Id: I913414a1ed2a8018ac743768dedc968892d4b897
2024-05-29 19:19:53 +08:00
Jianwei Fan
3457984e9a media: i2c: lt6911uxe/lt7911uxx/lt8668sx: add i2c enable when check chipid
Change-Id: I7de9b2392a79f71d1c4279a345216013c7ce93d4
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-05-29 19:19:33 +08:00
Cai YiWei
8815bc0efa media: rockchip: isp: skip mbus if link to vicap
media bus configuration useless if input from vicap

Change-Id: Ie3246a36cf021e39a9458a2e460eeb43f2f1a423
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-05-29 19:19:12 +08:00
Damon Ding
da33ef8e9e phy/rockchip: samsung-hdptx: add support for rate R216/R243/R324/R432
R216/R243/R324/R432 are the new recommended link rates in
eDP v1.4, which may be read from DPCD SUPPORTED_LINK_RATES
(0x00010h through 0x0001fh). And set the link rate by DPCD
LINK_BW_SET(0x00100h).

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Ib692d18cd79765eb172fb0455cbc1bc1f0594d79
2024-05-29 15:03:33 +08:00
Damon Ding
617e6880cd drm/bridge: analogix_dp: add support for rate R216/R243/R324/R432
R216/R243/R324/R432 are the new recommended link rates in
eDP v1.4, which may be read from DPCD SUPPORTED_LINK_RATES
(0x00010h through 0x0001fh). And set the link rate by DPCD
LINK_BW_SET(0x00100h).

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I2d46c910bc763f1dac282a2156f9daec88d60cac
2024-05-29 15:03:26 +08:00
Damon Ding
31702584f8 drm/bridge: analogix_dp: add support to parse link rate for eDP v1.4
As Table 4-23 in eDP v1.4 spec, the link rate can be
read from SUPPORTED_LINK_RATES(0x00010h through 0x0001fh),
which is required for sink devices.

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Ibff01e7eee16be735b5f4b10c6ef51e9b2954274
2024-05-29 15:03:17 +08:00
Damon Ding
6fcb928f74 drm/bridge: analogix_dp: remove getting bandwidth/lane_count in analogix_dp_full_link_train()
The bandwidth/lane_count have been got in analogix_dp_detect(),
which is earlier than analogix_dp_full_link_train().
And getting link configs in .detect() will help to
check mode support in .mode_valid().

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Ia98bae1d3be20243f1a81b5beec0fb53f2ea3ca1
2024-05-29 15:03:09 +08:00
Luo Wei
0fd18c66f6 mfd: display-serdes: attach dsi in probe according to dsi driver
Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: Ia21da73530deaa4269502664560e85b13b97cb16
2024-05-29 14:22:32 +08:00
Chandler Chen
0bb1c89c19 video: rockchip: mpp: rkvdec: add spinlock for mmu fault handle
Change-Id: I181ad3c6bb821ec36152e3317e5ba4c0847d8f68
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
2024-05-29 11:37:13 +08:00
Chandler Chen
3bd8034095 video: rockchip: mpp: mask mmu irq before reg dump
Change-Id: I54c9b01296c7ae21e164dd8a2c3635b7eb4d2dd5
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
2024-05-29 11:34:49 +08:00
Zhang Yubing
74016d114b drm/rockchip: dw-dp: print sink request info when autotest SI
Change-Id: Ib54270da1e9e823a65b0cd5e4363a823e865ede1
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-05-28 20:24:16 +08:00
Zhang Yubing
1eab7dd4f8 drm/rockchip: dw-dp: init audio when register encoder
According to Documentation/driver-api/driver-model/driver.rst,
a warning as follow:
-EPROBE_DEFER must not be returned if probe() has already created
child devices, even if those child devices are removed again
in a cleanup path. If -EPROBE_DEFER is returned after a child
device has been registered, it may result in an infinite loop of
.probe() calls to the same driver.

To avoid this issue, we do the audio init work when register
encoder.

Change-Id: I2f527f29a32ca8cb28a0044b3689933845b7108a
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-05-28 20:22:46 +08:00
William Wu
bf2d6a4286 arm64: dts: rockchip: rk3562: Add usb power-domains for rockchip_suspend
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I946f9ac2ad549a78eab0a3022fc660df66fcf857
2024-05-28 20:22:13 +08:00
William Wu
9b22c41c15 arm64: dts: rockchip: rk3588: Add usb power-domains for rockchip_suspend
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Iae086aa1db15087010160ffc30be9c0f9650ed46
2024-05-28 20:22:13 +08:00
Wangqiang Guo
4146d113d3 media: rockchip: hdmirx: modify ioctl return hdcp status.
Change-Id: I983fa605815944fc5d157ae7bd00d66cf43e7513
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
2024-05-28 20:21:12 +08:00
Finley Xiao
3fcfa6749a soc: rockchip: system_monitor: Fix max frequency when use high_limit_table
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ie45f3c704b89867274f929dad5c6fcfbd56c2052
2024-05-28 20:07:28 +08:00
Finley Xiao
ec744ad8e3 arm64: dts: rockchip: rk3576: Add early min volt for dmc and vop
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I19997be1d0015ce3a93d25538104610d9fed31b5
2024-05-28 20:07:08 +08:00
Finley Xiao
d16a3075b4 soc: rockchip: system_monitor: Add multiple regulator support for early min volt
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ife4bfeea52b1f857c36dfe523c8269f70b9e9005
2024-05-28 20:06:59 +08:00
Finley Xiao
6b63014398 arm64: dts: rockchip: rk3576: Add power-domains for rockchip_suspend
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Id95a412b1ec9314c3b1d04155daeddda96b8a419
2024-05-28 20:01:28 +08:00
Finley Xiao
82eac53250 soc: rockchip: pm_config: Add pm runtime support
Add support to power up pd for usb otg when some devices failed to suspend.
This patch fixes the following panic.

Kernel panic - not syncing: Asynchronous SError Interrupt
Call trace:
dump_backtrace+0xf4/0x118
show_stack+0x18/0x24
dump_stack_lvl+0x60/0x7c
dump_stack+0x18/0x38
panic+0x16c/0x388
nmi_panic+0xa4/0xa8
arm64_serror_panic+0x6c/0x94
do_serror+0xc4/0xd0
el1h_64_error_handler+0x34/0x48
el1h_64_error+0x68/0x6c
readl+0x0/0x8c
dwc3_core_init_for_resume+0x40/0x1f4
dwc3_resume_common+0x3c/0x25c
dwc3_resume+0x40/0x78
dpm_run_callback+0x44/0x174
__device_resume+0x1c8/0x360
dpm_resume+0x100/0x278
dpm_resume_end+0x1c/0x38
suspend_devices_and_enter+0x8a0/0xb5c
pm_suspend+0x17c/0x5ac
state_store+0x104/0x144
kobj_attr_store+0x30/0x48
sysfs_kf_write+0x54/0x6c
kernfs_fop_write_iter+0x104/0x1a4
vfs_write+0x1e0/0x2c8
ksys_write+0x78/0xe8
__arm64_sys_write+0x1c/0x2c
invoke_syscall+0x58/0x11c
el0_svc_common+0xb4/0xf4
do_el0_svc+0x2c/0xb0
el0_svc+0x2c/0xa4
el0t_64_sync_handler+0x68/0xb4
el0t_64_sync+0x1a4/0x1a8

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I4b548c04feb009063e8aaa05865ec4e4ff23cb72
2024-05-28 20:01:28 +08:00
Andy Yan
a981063f36 drm/rockchip: Move register of dw-hdmi-qp hdcp device to encoder->late_register
w-hdmi-qp-hdcp device is very easy to register and probe it's
driver, move it out of bind callback to avoid create child device when
hdmi driver or other components run probe(this may cause infinite loop
probe as these components are very easy run into defer probe).

Note: Documentation/driver-api/driver-model/driver.rst

Change-Id: I99ec2bcbe7ef39a91a4bd01cd73b8f251db8b42d
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2024-05-28 17:15:56 +08:00
Andy Yan
17394b0ff4 drm/rockchip: Move register of dw-hdmi-qp cec device to encoder->late_register
dw-hdmi-qp-cec device is very easy to register and probe it's
driver, move it out of bind callback to avoid create child device when
hdmi driver or other components run probe(this may cause infinite loop
probe as these components are very easy run into defer probe).

Note: Documentation/driver-api/driver-model/driver.rst

Change-Id: Id7b04b8f65fe8a99b6bb6492553774bd0d13bcc2
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2024-05-28 17:15:56 +08:00
Andy Yan
4cbfbec8ce drm/rockchip: Move register of dw-hdmi-qp audio device to encoder->late_register
dw-hdmi-qp-i2s-audio device is very easy to register and probe it's
driver, move it out of bind callback to avoid create child device when
hdmi driver or other components run probe(this may cause infinite loop
probe as these components are very easy run into defer probe).

Change-Id: Iabfc5e1714cceff26bfbcf559ab66003cc258d84
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2024-05-28 17:15:56 +08:00
Zhang Yubing
c451304a3a drm/rockchip: dw-dp: retry trigger act when it auto clear timeout
Change-Id: I9ec8a46d6adbdf7a69993aa4bed252a01265d114
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-05-28 10:09:33 +08:00
Andy Yan
620675e654 drm/rockchip: dw_hdmi: Avoid run shutdown if hdmi component is not bind
If dw_hdmi_rockchip_bind is bind failed or other related
components(dp/dsi) bind failed, dw_hdmi_rockchip_unbind will
be called, then some resources like hdmi->workqueue will be
destroyed. So we should not reference this resources at ->shutdown.

Change-Id: Ie9ddf431d62ac217126620d3deb6e18eecc9a46a
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2024-05-27 18:41:56 +08:00
Alex Wang
5349fa33ec arm64: dts: rockchip: rk3576-evb-input-keymap: update HOME KeyCode of key_table
Change-Id: Ia86ff1fc139dee356399304a5c7d20e7cf17a66f
Signed-off-by: Alex Wang <alex.wang@rock-chips.com>
2024-05-27 18:41:06 +08:00
Andy Yan
cd76b108b5 drm/bridge: dw-hdmi-qp: Rename __dw_hdmi_probe/remove to dw_hdmi_qp_probe/remove
Make it much clearer.

Change-Id: Id78fa7d9f66fe1e6cc816afd7b5d50a664221366
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2024-05-27 18:31:29 +08:00
Tao Huang
4d91117006 arm64: dts: rockchip: Add rk3576-cpu-swap.dtsi
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I22bdf4a116f8324513193c5057883066c28c054c
2024-05-27 18:22:20 +08:00
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