Commit Graph

1268660 Commits

Author SHA1 Message Date
Zorro Liu
c478f1f7d4 arm64: dts: rockchip: rk3576-ebook-v10: update wacom touch config
Change-Id: Icc0c3886bbc32ff959698a6edc9cb685d5a5881d
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2024-03-19 19:06:03 +08:00
Cai YiWei
2ee9ce1196 media: rockchip: isp: dpcc border for isp39
Change-Id: I080fb9f62e7f11d2bb9bbe2ebeecd80910d4a0c3
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-03-19 19:05:30 +08:00
Johnson Ding
ddc7807764 arm64: dts: rockchip: rk3576: Increase vpu720 frequency to 702M
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
Change-Id: Id77982a5bafe9c308740a61e5b04ed26688580a1
2024-03-19 19:04:53 +08:00
Finley Xiao
037df56ef7 drm/rockchip: vop2: Add support to request early supend
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I53c710712fa058a0a8b6e46f2daab2b28f4b41ed
2024-03-19 18:57:59 +08:00
Finley Xiao
702c493b80 soc: rockchip: rockchip_system_monitor: Implement early suspend
Change-Id: Iaaac3766d3dba58bdde0f10cb8161b4066e0e1a3
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-03-19 18:57:56 +08:00
Finley Xiao
e190fda5f7 soc: rockchip: Kconfig: Add HAS_EARLYSUSPEND and ROCKCHIP_EARLYSUSPEND
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I7fe0d0288588194fec1e8d67398ddd0afe631b8a
2024-03-19 12:22:28 +08:00
Arve Hjønnevåg
ed688b8126 PM: Add early suspend api.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I5133bd84fc33c2bc0f1f26ea05078d44b7135938
2024-03-19 12:22:28 +08:00
Finley Xiao
36be8862f9 input: touchscreen: gt1x: Don't add pm ops when enable early suspend
Fix underflow of vcc3v3_lcd0_n regulator enable count.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ie5383504b29c3efa8f98df76d32feb5721ee22c2
2024-03-19 12:10:01 +08:00
XiaoDong Huang
2807756abc arm64: dts: rockchip: rk3576: rockchip_suspend: enable RKPM_SLP_32K_EXT
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: Ieacfc301d6abb2d036b9232d006cc84d837ef3f9
2024-03-19 11:21:07 +08:00
XiaoDong Huang
d00bf4dffb dt-bindings: suspend: rk3576: fix *WKUP* macro
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: Id11895f0e48a00fa987dabc77be7d31123bfb1f3
2024-03-19 11:21:07 +08:00
Elaine Zhang
5664c1e4e4 clk: rockchip: rk3576: mark pclk_ddr_root as critical
Change-Id: Ibfb1aed00638afee4d7885d34252d85879243954
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2024-03-19 10:51:10 +08:00
Tao Huang
ea0c96c905 input: touchscreen: cyttsp5: fix module building
ERROR: modpost: "cyttsp5_devtree_create_and_get_pdata" [drivers/input/touchscreen/cyttsp5/cyttsp5.ko] undefined!
ERROR: modpost: "cyttsp5_devtree_clean_pdata" [drivers/input/touchscreen/cyttsp5/cyttsp5.ko] undefined!
ERROR: modpost: "cyttsp5_devtree_create_and_get_pdata" [drivers/input/touchscreen/cyttsp5/cyttsp5_i2c.ko] undefined!
ERROR: modpost: "cyttsp5_devtree_clean_pdata" [drivers/input/touchscreen/cyttsp5/cyttsp5_i2c.ko] undefined!
ERROR: modpost: "_cyttsp5_loader_platform_data" [drivers/input/touchscreen/cyttsp5/cyttsp5.ko] undefined!
ERROR: modpost: "cyttsp5_xres" [drivers/input/touchscreen/cyttsp5/cyttsp5.ko] undefined!
ERROR: modpost: "cyttsp5_init" [drivers/input/touchscreen/cyttsp5/cyttsp5.ko] undefined!
ERROR: modpost: "cyttsp5_power" [drivers/input/touchscreen/cyttsp5/cyttsp5.ko] undefined!
ERROR: modpost: "cyttsp5_irq_stat" [drivers/input/touchscreen/cyttsp5/cyttsp5.ko] undefined!

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I50187a731f717e1ccf8d01e2e32d20c40dd656ef
2024-03-19 09:21:40 +08:00
Damon Ding
e1e8b5683b arm64: configs: rockchip_linux_defconfig: enable CONFIG_PWM_RKX120
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I4f5ec337d75703d474bc407f6733639f6e333799
2024-03-18 21:05:17 +08:00
Damon Ding
d307eedb3c mfd: rkx110_x120: add config option PWM_RKX120
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Ia8bdc484d05beb5afa6869e0260c83781852ccc5
2024-03-18 21:05:11 +08:00
Weixin Zhou
bf280825e8 input: touchscreen: add ft5726
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: Ia5b1e35e5a58b3991a0a95a42e4c69219f9db988
2024-03-18 20:34:45 +08:00
Algea Cao
dcba99b1e1 drm/rockchip: vop2: Update acm info when acm prop changed
Previous versions did not update the acm status in real time.
This causes the input color format of post csc to be
wrongly judged.

Change-Id: I1213ec3962682a09d9ad80827564b1d68b97cb20
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2024-03-18 20:16:44 +08:00
Luo Wei
6553ec09f2 arm64: configs: Add rk3576_vehicle.config
Change-Id: I67bc915be1770d4dbeae052b5c7042a9a2608876
Signed-off-by: Luo Wei <lw@rock-chips.com>
2024-03-18 20:14:57 +08:00
Weixin Zhou
20728e11cd arm64: dts: rockchip: rk3576-ebook-color-v10: for color display
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I46dbda1e64e0760918b7fe188ea50d1e903f33d4
2024-03-18 20:10:23 +08:00
Jianwei Fan
ad2269d28d arm64: dts: rockchip: rk3576-tablet: add ov16880 camera
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I0b343946a6606a67db2f1e671312555b17044d90
2024-03-18 20:06:17 +08:00
Jianwei Fan
24569fc13f media: i2c: ov16880: add camera driver
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Ibe581cb1f371005138bc2b798b51609a072fdb01
2024-03-18 20:06:09 +08:00
Tao Huang
6523a8c7f3 arm64: dts: rockchip: Fix Makefile sorting for rk3576-iotest-v10
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ibfb107aa828ec51fd6f2be62b14ca2f6385966f0
2024-03-18 20:04:43 +08:00
Binyuan Lan
97d6a1d0cf arm64: dts: rockchip: rk3576-tablet: add dp_sound
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
Change-Id: I1a61786f9e1f353eb98b96f932bb6ab07d96aec8
2024-03-18 20:00:40 +08:00
Liang Chen
4941995dbd clk: rockchip: rk3576: mark clk_ref_mphy_26m as critical
The power consumption of mphy will be abnormal when clk_ref_mphy_26m
is disabled and PD_USB is power off/on.

Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: Icd67187494a22656a25454352ffcc06cc4321577
2024-03-18 20:00:08 +08:00
Damon Ding
1568e5614d drm/rockchip: vop2: not to register crtc for inactive video port
Make sure that the vp to be registered has at least
one connector, otherwise it will be as an inactive vp.

Fixes: 6092eb96b6 ("drm/rockchip: vop2: add possible_vp_mask to calculate the exact possible_crtcs")
Change-Id: Ibc078d9f50e47877e4296c2e570721a6f69c9058
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-03-18 19:59:31 +08:00
Sandy Huang
0ce65b9ff3 drm/rockchip: vop2: fix hdmi yuv420 display error for rk3576
At HDMI 4kYUV420 or 4K60 split output mode, pixel clk is 600M, dclk from
hdmi phy is 297M.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I619b94647b7dcb651b34f084e346f10bcc35efd3
2024-03-18 19:59:31 +08:00
Sandy Huang
398895b615 drm/rockchip: vop2: get the correctly vp id when close all pd
The win attached vp maybe unused, and the unused vp will not
register crtc, so we need to lool up all win under the pd and check
if the win attached vp has register crtc.
If all the win attached vp is unused, we set the first win(undter
the pd) attach to the first crtc to make sure the pd can be closed normally.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Id7dfedae2d3b6e7a139ca2eebaefea250e986d12
2024-03-18 19:59:31 +08:00
Luo Wei
7df2bd15e3 arm64: dts: rockchip: rk3576-vehicle-evb: init dts files
Change-Id: I3fa36362f761ef9a2de9ff22a3a111a6200d6aad
Signed-off-by: Luo Wei <lw@rock-chips.com>
Signed-off-by: Zheng zhiqi <looper.zheng@rock-chips.com>
Signed-off-by: Cai Wenzhong <wenzhong.cai@rock-chips.com>
Signed-off-by: Xu Xuehui <xxh@rock-chips.com>
2024-03-18 15:56:45 +08:00
Andy Yan
b34ddbc6c6 drm/rockchip: vop: Improve registers dump
Add vop register address base.
Add callback for active register dump.

Change-Id: I78b39f160c799aa72da22f17564696c92a256962
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2024-03-18 14:22:46 +08:00
Andy Yan
6b460d196d drm/rockchip: vop: print dest->x1/y1 for display offset
The dsp_stx/dsp_sty on vop is dest->x1/y1 + blank timing,
this is different from vop2.

Change-Id: If2f97e85aa65ee94dcf8889d5703d92750e36061
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2024-03-18 14:22:46 +08:00
Andy Yan
7f4926daaf drm/rockchip: vop: Fix blend_mode check
DRM_MODE_BLEND_PREMULTI is defined as zero.

Change-Id: I6bcb1777a9f9df454b6709f1f741c2a2aa9c63e3
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2024-03-18 14:22:46 +08:00
Weixin Zhou
ae9e12cb18 arm64: dts: rockchip: rk3576-eink: move rk806 node to eink dtsi
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I75a29f323c1f48c6d0b9f0e6121e59e4c78aa330
2024-03-18 14:18:57 +08:00
Wang Panzhenzhuan
e74f2de328 arm64: dts: rockchip: rk3576 evb1 add nvp6324 ahd2csi board
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I133a0b7ebeed1ee832468c6fe03183b7ba63cfaf
2024-03-18 14:18:36 +08:00
XiaoDong Huang
9b7a30b33d arm64: dts: rockchip: rk3576-eink: enable rockchip_suspend node
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: I9f277c0e4b8db73f241c0be7708ba449b862bbb7
2024-03-18 14:16:56 +08:00
Lin Jianhua
881a04cde8 arm64: dts: rockchip: rk3576-industry: enable boot logo
Change-Id: I721fbe80ed4cf083aaaf0c1344127d494f6d417e
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
2024-03-18 14:16:05 +08:00
Weixin Zhou
bb44752e4c arm64: dts: rockchip: rk3576-test1-v10-eink: only include evb rk806
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: Ibc6b97eefdfcaf316fd713d7999e5f4a234ee218
2024-03-18 14:11:09 +08:00
Finley Xiao
446711ce94 soc: rockchip: power-domain: Make pd vpu keep on when startup for rk3576
Because the ebc is under pd vpu, and it may be enabled in uboot.

Change-Id: Iee8afa8f802a5f02c7c50f2223479349614371ff
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-03-18 12:03:19 +08:00
Mingwei Yan
7614b638e9 media: rockchip: vpss: optimize module set
1: add module_get
2: module can't be changed dynamically

Signed-off-by: Mingwei Yan <mingwei.yan@rock-chips.com>
Change-Id: I4b7c6c5a8b3b600908a796224ab5fceaab6c995b
2024-03-18 11:30:52 +08:00
Binyuan Lan
4f9157021a arm64: dts: rockchip: rk3576-tablet: update rk806 config
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
Change-Id: Ia83caef6c9d67801c706d8031a0cb0d96dee6f96
2024-03-18 11:16:53 +08:00
Jakub Raczynski
4a6827b309 stmmac: Clear variable when destroying workqueue
Currently when suspending driver and stopping workqueue it is checked whether
workqueue is not NULL and if so, it is destroyed.
Function destroy_workqueue() does drain queue and does clear variable, but
it does not set workqueue variable to NULL. This can cause kernel/module
panic if code attempts to clear workqueue that was not initialized.

This scenario is possible when resuming suspended driver in stmmac_resume(),
because there is no handling for failed stmmac_hw_setup(),
which can fail and return if DMA engine has failed to initialize,
and workqueue is initialized after DMA engine.
Should DMA engine fail to initialize, resume will proceed normally,
but interface won't work and TX queue will eventually timeout,
causing 'Reset adapter' error.
This then does destroy workqueue during reset process.
And since workqueue is initialized after DMA engine and can be skipped,
it will cause kernel/module panic.

To secure against this possible crash, set workqueue variable to NULL when
destroying workqueue.

Log/backtrace from crash goes as follows:
[88.031977]------------[ cut here ]------------
[88.031985]NETDEV WATCHDOG: eth0 (sxgmac): transmit queue 1 timed out
[88.032017]WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:477 dev_watchdog+0x390/0x398
           <Skipping backtrace for watchdog timeout>
[88.032251]---[ end trace e70de432e4d5c2c0 ]---
[88.032282]sxgmac 16d88000.ethernet eth0: Reset adapter.
[88.036359]------------[ cut here ]------------
[88.036519]Call trace:
[88.036523] flush_workqueue+0x3e4/0x430
[88.036528] drain_workqueue+0xc4/0x160
[88.036533] destroy_workqueue+0x40/0x270
[88.036537] stmmac_fpe_stop_wq+0x4c/0x70
[88.036541] stmmac_release+0x278/0x280
[88.036546] __dev_close_many+0xcc/0x158
[88.036551] dev_close_many+0xbc/0x190
[88.036555] dev_close.part.0+0x70/0xc0
[88.036560] dev_close+0x24/0x30
[88.036564] stmmac_service_task+0x110/0x140
[88.036569] process_one_work+0x1d8/0x4a0
[88.036573] worker_thread+0x54/0x408
[88.036578] kthread+0x164/0x170
[88.036583] ret_from_fork+0x10/0x20
[88.036588]---[ end trace e70de432e4d5c2c1 ]---
[88.036597]Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004

Fixes: 5a5586112b ("net: stmmac: support FPE link partner hand-shaking procedure")
Change-Id: Id0284c08a103ec9d539a0665374f71ca0ae06fab
Signed-off-by: Jakub Raczynski <j.raczynski@samsung.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: David Wu <david.wu@rock-chips.com>
2024-03-16 18:26:25 +08:00
Liang Chen
f15de56eee cpufreq: rockchip: fix find opp for panic dump
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I1c2b4d398a30cc959594d9eb7f0df6534ea5a26f
2024-03-16 18:26:25 +08:00
Finley Xiao
5299842032 arm64: dts: rockchip: rk3576: Change suspend freq to 408MHz for cpub
Change-Id: I3ee338692ec7a1d09c3b6d1c31d6830aa7e5be08
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-03-16 16:26:37 +08:00
Damon Ding
0772c64096 drm/rockchip: remove the dependency of CONFIG_ROCKCHIP_VOP for CONFIG_ROCKCHIP_ANALOGIX_DP
The CONFIG_ROCKCHIP_ANALOGIX_DP may be enabled for VOP or VOP2,
so make its dependency consistent with the configs of other
interfaces.

Fixes: b382406a2c ("drm/rockchip: Make VOP driver optional")
Change-Id: I272926898bf520d5e023e0bbb873f680362b68ee
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-03-15 18:14:15 +08:00
Jianwei Fan
863b879bf9 media: i2c: rk628: remove mutex lock in g_frame_interval
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I0efe96ae6fccfac7d49044f3253e07f94dd71956
2024-03-15 15:04:37 +08:00
Tao Huang
fc124f851e mfd: rkx110_x120: ROCKCHIP_SERDES_DRM_PANEL depends on MFD_RKX110_X120
ERROR: modpost: "rkx120_dsi_tx_cmd_seq_xfer" [drivers/mfd/rkx110_x120/rkx110_x120_panel.ko] undefined!

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I427e0ff85376f38e7877db4ccd01e811e41b14a6
2024-03-15 14:54:32 +08:00
Shawn Lin
ad6596720d scsi: ufs: rockchip: Fix compile error of module
Fix the error:
ERROR: modpost: "ufshcd_send_uic_cmd" [drivers/ufs/host/ufs-rockchip.ko] undefined!

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ifda88359f03c3aa70564c093dc734f9a1aff4ae7
2024-03-15 14:06:53 +08:00
Weixin Zhou
3ec876a7d5 arm64: dts: rockchip: rk3576-ebook-v10: adjust ebc configs
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: Idfd05922c3ea1c8b32d9d596bd2dbef9ac0f83eb
2024-03-14 19:53:26 +08:00
Shawn Lin
08d7544548 scsi: ufs: rockchip: Fix ufs_rockchip_remove
Modular test showed a bug in ufs_rockchip_remove which looks like:
[   23.132276][  T844] ufshcd-rockchip 2a2d0000.ufs: Unbalanced pm_runtime_enable!
[   23.133411][  T217] ueventd: restorecon_recursive: /sys/devices/platform/2a2d0000.ufs
[   23.141741][   T80] platform 2a2d0000.ufs: uic cmd 0x16 with arg3 0x0 completion timeout
[   23.141749][   T10] platform 2a2d0000.ufs: uic cmd 0x14 with arg3 0x0 completion timeout
[   23.141772][   T10] platform 2a2d0000.ufs: dme-reset: error code -110
[   23.141775][   T10] platform 2a2d0000.ufs: DME_RESET failed
[   23.141779][   T10] platform 2a2d0000.ufs: link startup failed -110
[   23.141782][   T10] platform 2a2d0000.ufs: UFS Host state=0
[   23.141785][   T10] platform 2a2d0000.ufs: outstanding reqs=0x0 tasks=0x0
[   23.141789][   T10] platform 2a2d0000.ufs: saved_err=0x0, saved_uic_err=0x0
[   23.141800][   T10] platform 2a2d0000.ufs: Device power mode=1, UIC link state=0
[   23.141801][   T80] Unable to handle kernel paging request at virtual address ffffffc00f170034
[   23.141804][   T80] Mem abort info:
[   23.147077][   T10] platform 2a2d0000.ufs: PM in progress=0, sys. suspended=0
[   23.147829][   T80]   ESR = 0x0000000096000007
[   23.148134][   T10] platform 2a2d0000.ufs: Auto BKOPS=0, Host self-block=0
[   23.148752][   T80]   EC = 0x25: DABT (current EL), IL = 32 bits

This can be triggered by:
while true
do
  echo "2a2d0000.ufs" > /sys/bus/platform/drivers/ufshcd-rockchip/unbind;
  sleep 2;
  echo "2a2d0000.ufs" > /sys/bus/platform/drivers/ufshcd-rockchip/bind;
  sleep 2;
done

Also we leave reference clk ungate if ufs is removed. Fix them all together.

Change-Id: I785a7c196ddacf2fb51eba441bcdb288441f9c30
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2024-03-14 19:42:25 +08:00
William Wu
a6a4762e0c usb: typec: tcpci_husb311: Refactor irq wakeup
Currently, the husb311 driver enable irq wakeup by default,
it can wakeup system if the vbus or the CC state changes.
However, if the Type-C port data role is DFP and the vbus
is power on, after enter deep sleep, the vbus maybe power
off for low power management, this cause system resume
immediately by husb311 irq.

Actually, the husb311 vbus irq wakeup is no need if the vbus
state changes for DFP mode. This patch only enable irq wakeup
if the vbus is power off, it can support husb311 irq wakeup
system if the Type-C connect with Type-C charger or Type-C DFP.
And disable husb311 irq if the vbus is power on, it can avoid
the tcpm_state_machine_work run before the husb311_pm_resume
during system resume.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I62d35b10b6b2375125b32101426ea141f709ed91
2024-03-14 19:41:50 +08:00
Ding Wei
ec8394fb33 video: rockchip: mpp: rk3576: Add compatible check when hack run
dec->fix is used in rk3568 and rk3576, while CONFIG_CPU_RK3568 and
CONFIG_CPU_RK3576 are all defined, it will hack error.
Thus, the compatible need matching, then hack.

Change-Id: Icd1368c9f414422c0403d425ba732f20579b550d
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2024-03-14 19:41:35 +08:00
Guochun Huang
deee50bc92 arm64: dts: rockchip: rk3576-tablet: bind dclk_vp1 to vpll
Change-Id: I052decdc2ebe83d388997cdb8c13a3e3996d41e3
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-03-14 16:45:10 +08:00