Commit Graph

1079661 Commits

Author SHA1 Message Date
Damon Ding
2cd49534fc drm/rockchip: tve: add support for parsing vdac_out_current from otp
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I1bfd7535adc36ff77b510a7e735de0bb0ad16c48
2023-04-07 16:20:31 +08:00
Damon Ding
7a94eacc84 arm64: dts: rockchip: rk3528: add test_version/vdac_out_current in otp node
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I7dcc214f457874c540a5f110783557b7e84ded8a
2023-04-07 16:20:26 +08:00
Jianwei Fan
6358a02c0c video: rockchip: vehicle: add rk3562 support
Change-Id: I4e2609244e349f7de802f5de42307d8240edd264
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2023-04-07 14:24:43 +08:00
Chandler Chen
4bee1c9a00 video: rockchip: mpp: fix rk3036 vdpu soft reset issue
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I38b3beaf0e6bcc5ef0e63614eb8c5c27fa37a1ca
2023-04-07 14:16:56 +08:00
William Wu
c3239eb297 phy: rockchip: inno-usb2: Fix mismatch id interrupt
Test on RK3588S Tablet, set the power supply of logic on
and set the power supply of usb2 phy off during deep sleep,
then the id falling edge interrupt will be triggered after
system resume, and kernel panic with the following log:

SError Interrupt on CPU0, code 0xbe000011 -- SError
CPU: 0 PID: 1946 Comm: kworker/0:0 Not tainted 5.10.110 #600
Hardware name: Rockchip RK3588S TABLET RK806 SINGLE Board (DT)
Workqueue: events rockchip_usb2phy_otg_sm_work
pstate: 20c00009 (nzCv daif +PAN +UAO -TCO BTYPE=--)
pc : _raw_spin_unlock_irqrestore+0x28/0x60
lr : regmap_unlock_spinlock+0x18/0x28
......
Kernel panic - not syncing: Asynchronous SError Interrupt
CPU: 0 PID: 1946 Comm: kworker/0:0 Not tainted 5.10.110 #600
Hardware name: Rockchip RK3588S TABLET RK806 SINGLE Board (DT)
Workqueue: events rockchip_usb2phy_otg_sm_work
Call trace:
 dump_backtrace+0x0/0x1c8
 show_stack+0x1c/0x2c
 dump_stack_lvl+0xdc/0x12c
 dump_stack+0x1c/0x64
 panic+0x150/0x3a4
 test_taint+0x0/0x30
 arm64_serror_panic+0x78/0x84
 do_serror+0xe0/0x100
 el1_error+0x94/0x118
 _raw_spin_unlock_irqrestore+0x28/0x60
 regmap_unlock_spinlock+0x18/0x28
 regmap_write+0x68/0x84
 rockchip_usb2phy_power_on+0x128/0x1f0
 rockchip_usb2phy_otg_sm_work+0x1d0/0x454
 process_one_work+0x1f4/0x490
 worker_thread+0x278/0x4dc
 kthread+0x13c/0x344
 ret_from_fork+0x10/0x30

In fact, there are two issues here.
1. The power of phy id belongs to the usb2 phy power supply.
And the id is pulled up to high level by default. So if we
power off usb2 phy supply during deep sleep, the id status
will fall to low level and trigger the falling edge interrupt.
In the id irq handler rockchip_usb2phy_id_irq(), it send Host
notification only depends the id falling edge irq status, it's
not enough in this case, it needs to check the iddig status
to make sure that the id status is indeed in low level.

2. For RK3588S, the pipe phystatus select register from the
usb grf, and the power domain of usb grf belongs to PD_USB.
So we must make sure the PD_USB is on when operate the pipe
phystatus select register. Originally, we operated the pipe
phystatus register in the phy ops of power_on, because we
expected that the phy ops of power_on called from the dwc3
controller pm runtime resume process which can power on the
PD_USB. However, in this test case, if the id falling edge
interrupt after system resume, the phy ops of power_on can
be called when PD_USB is off.

The call stack:
 rockchip_usb2phy_id_irq()
    -> send Host notification ->
 rockchip_otg_event()
    -> receive notification and schedule otg_sm_work ->
 rockchip_usb2phy_otg_sm_work()
    -> detect EXTCON_USB_HOST is set and call phy power_on ops
 rockchip_usb2phy_power_on()
    -> set the pipe phystatus select register

Change-Id: Ib7e5bc095ab1df2ca4c983d58a9f15720f0cccb9
Signed-off-by: William Wu <william.wu@rock-chips.com>
2023-04-07 14:16:20 +08:00
Chandler Chen
9ea7c790e7 video: rockchip: mpp: rkvdec2_link: modify task isr
fix task timeout not proc issue

Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I76c246595ccfcc1d855e4ed3f2043f7a013ad005
2023-04-07 14:15:39 +08:00
Zhichao Yu
4b50d2f038 media: i2c: gc4653: fix image corruption when switch sensor flip/mirror
The configuration of flip/mirror would take effect in the half of frame,
which cause frame corruption. To make sure the flip/mirror configuration
is took effect in the next frame, we should enable register frame buffer
on gc4653.

Signed-off-by: Zhichao Yu <zhichao.yu@rock-chips.com>
Change-Id: Ibf85eb46d7c22785a820bcf781bd3e96a3455f00
2023-04-06 21:26:53 +08:00
Jianwei Fan
aaf9c163ea arm64: dts: rockchip: rk3562-evb2: add fast image reverse support
Change-Id: Ic240f2680e221aaadf40303d3367fcf604e03100
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2023-04-06 18:31:51 +08:00
Cai YiWei
d297b6606c media: rockchip: isp: version to v2.2.1
Change-Id: I0a14c0eb03337658812e63b325b4639105d86db3
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-04-06 16:55:13 +08:00
Liang Chen
47989c4975 mali400: mali: set clk_gpu to normal pll when suspend
The pvtpll will power-down when suspend, and it will cause gpu resume
failed, so do not use pvtpll when suspend.

Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: Ibf06cc8d836c994468751a66cf9ed3d0cc1e4b9f
2023-04-06 09:44:27 +08:00
Liang Chen
5302628c0d MALI: mali400: force gpu enter runtime suspend before system suspend
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I17c3c883774de97f2e09c56184ed98baf1ce5a07
2023-04-06 09:44:27 +08:00
Liang Chen
f08095c70c arm64: dts: rockchip: rk3528: adjust trip-point-0/1/2 for thermal-zones
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I46cde51e3f1a48a2a5fb4bae8bb5564071434e14
2023-04-06 09:44:27 +08:00
Elaine Zhang
7f95a5b165 arm64: dts: rockchip: rk3588: modify aclk_top_root 800M to 750M
aclk_top_root 800M parent is aupll(786.432M), but aupll is for audio only.
aclk_top_root 750M parent is cpll(1500M).

Change-Id: I61b306f11f1085b4a08adce89095f88b175c6738
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2023-04-06 09:37:05 +08:00
David Wu
d86890c654 net: phy: motorcomm: Fix clock in or out setting for YT8512B
If the PHY use ext clock, don't do ext clock register setting,
otherwise, go ahead.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I492d3bc21878cce9985333fbb7f609089d69a9f4
2023-04-06 09:36:33 +08:00
Jianwei Fan
24d4113f10 media: i2c: lt7911uxc: fix dcphy params and add more format
Change-Id: I0ec7fd209a878b899152c45101b03e4a22044692
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2023-04-06 09:30:54 +08:00
Cai YiWei
ebc5802918 media: rockchip: isp: sync dev register and fast_work
Change-Id: I36617e8c8e277f5616a139fec970fcdedf17256a
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-04-04 18:29:57 +08:00
Cai YiWei
d7fed91daa media: rockchip: isp: fix open video during device register
Change-Id: I9569dd51b5237307ff48e3daf25bf0c97a5fbbb6
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-04-04 18:23:11 +08:00
Cai YiWei
464f935a46 media: rockchip: isp: lock for rockit qbuf
Change-Id: Ic66cae540a91916fa94c59d9541f847070239187
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-04-04 18:23:08 +08:00
Finley Xiao
0142cfb4ec arm64: dts: rockchip: rk3568: Add trim configure for tsadc
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: If1b4bf98b3be24c8a3f97fbb0adf7279ca9a2ed2
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2023-04-04 16:35:25 +08:00
Finley Xiao
bd7f511f36 thermal: rockchip: Add trim temperature for rk3568
Get the calibration parameters for each chip by reading the OTP,
and calculate temperature using calibration parameters.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ib0542cac3a1122ec9781139b2808df86d2d631bd
2023-04-04 16:35:25 +08:00
Chandler Chen
a7edc06ea2 video: rockchip: mpp: rkvdec2: use mmu reset instead of soft reset
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: Ic163aa78422122030b4e608879bed2c4a223429d
2023-04-04 14:31:30 +08:00
Damon Ding
61ff18b478 drm/rockchip: vop: add rb_swap check for serial rgb format
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I5394e22e58eac87f9ee1a8fdee1cc576970d5a87
2023-04-04 14:20:52 +08:00
Damon Ding
52afd66cc1 drm/rockchip: vop: add support for bg/rb/rg/delta/dummy swap ctrl
The dsp_data_swap bits order may be different.

One is bg/rb/rg/delta/dummy, such as RK3288, RK3328
and RK3399. The other is bg/delta/rb/rg/dummy, such
as RK3308, RV1126 and RV1106.

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I876f5f3e416e7d44fecda70841b59c78b48bb90c
2023-04-04 14:20:52 +08:00
Chandler Chen
c4bd8d465a iommu/rockchip: add iommu force reset interface for device
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I153b91b2e1ad8e099d80f4af8c9e51d12f3af607
2023-04-04 11:18:36 +08:00
Chandler Chen
b6cc751bbb video: rockchip: mpp: rkvdec2_link: disable mmu irq when reset
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I537a2caf670456a1a25894e94968b6445961ff91
2023-04-04 11:16:25 +08:00
Qiqi Zhang
8832a2b6ce drm/rockchip: dsi2: mode valid func add more judgment conditions
In VR application scenarios, some panel will realize dynamic frame
rate adjustment through a wide range of VFP settings, and VFP may
exceed the ip limit (0~1023), which may cause abnormal display. so
reject any modes with larger periods.

Change-Id: I7bc6ae9709393ca0796fdec9ed1079b53b65cf99
Signed-off-by: Qiqi Zhang <eddy.zhang@rock-chips.com>
2023-04-04 10:43:15 +08:00
Jianwei Fan
52610e14e4 video: rockchip: vehicle: fix errors if not use gpio-det
Change-Id: I33ab7123e0aa938169fb7bdbe7c1bbb32f6a7c48
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2023-04-04 10:41:18 +08:00
Zhang Yubing
4fb2138533 drm/rockchip: vop3: fix rk3528 csc mode register config
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Ifca0405a705e333ed98ee8b0b5925857fcb63102
2023-04-04 10:31:47 +08:00
Sandy Huang
f2f4ac622f drm/rockchip: vop3: fix vp win_mask error
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Iac3f0af7d8911cf188cc29788b4777a446536360
2023-04-03 18:21:02 +08:00
ZhiZhan Chen
30769f9482 arm64: dts: rockchip: use cluster for cursor on rk3568-evb1-ddr4-v10-linux.dts
Signed-off-by: ZhiZhan Chen <zhizhan.chen@rock-chips.com>
Change-Id: Icf667a4598a93b672777587775673539018bf4bc
2023-04-03 18:07:37 +08:00
Tao Huang
0500678ee9 net: wireless: rockchip_wlan: bcmdhd: Call filp_open() only when CONFIG_NO_GKI
filp_open() is missing from GKI symbol list.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I6fce3176441fca1910c4edfb6f3eeb423149fc45
2023-04-03 16:32:25 +08:00
Wyon Bi
61301c3b7b drm/bridge: maxim-max96745: Use the parent's extcon
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I002987713d316f9ac5f59794f501016e29db2de7
2023-04-03 11:19:25 +08:00
Wyon Bi
9ba7ca42d5 mfd: max96745: Add extcon support
In order to set extcon state early at boot.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: If4abed7d97bb53e7f73219b600a03b22a54409a6
2023-04-03 11:19:25 +08:00
Cai Wenzhong
62a74f10f4 media: i2c: thcv244: fix abnormal streaming from video1 to video3 in four cameras.
Signed-off-by: Cai Wenzhong <cwz@rock-chips.com>
Change-Id: I3fdf4da58de8684ab654ef1166c5c03c479c68cf
2023-04-03 11:17:53 +08:00
Jianqun Xu
d59cc6f311 iommu/iova: revert downstream debug codes
Since there is no iova bug currently, revert the debug codes to sync
with upstream, including:

Revert commit af9e6b8f04 ("iommu/iova: fix cpu from 'unsigned long' to 'unsigned int' for for_each_online_cpu")
Revert commit 0373c12d82 ("iommu/iova: drop codes about rcache from iova_dump")
Revert commit 3c9526f479 ("iommu/iova: remove a iova procfs if existed")
Revert commit 4fe55239b3 ("iommu/iova: add iova procfs for each dma iommu")
Revert commit 0c51523b06 ("iommu/iova: dump iova when alloc failed")

Change-Id: If78564d81a9b77e2dd5bef7abd69fc14cd28f864
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2023-04-03 10:57:00 +08:00
Luo Wei
931ba6bd4f arm64: dts: rockchip: rk3588-vehicle-evb: add backlight gpio control for dp/edp serdes lcd
Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: I673bc66ebd2ea6d1d70a817f98b32f6e6a5bc82f
2023-04-03 10:35:46 +08:00
Chen Shunqing
52b4834126 media: rockchip: hdmirx: add hdcp1x key write
Change-Id: I43d828663e1d3fcdc670d258f883f4a1b3492b06
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
2023-03-31 08:46:19 +00:00
Sugar Zhang
c6c61f8679 ASoC: hdmi-codec: Add option for ELD bypass
This patch allow users to enable "ELD Bypass" who don't
care anything from EDID Link Data.

Currently, this driver gets ELD(from EDID) to constraint
channels and rates.

Unfortunately, EDID is not always valid, maybe caused by
the fragile HDMI port or cable, in this situation, the max
features are limited to 48kHz stereo.

So, add this option to allow user to select the manual way
to output audio as expected. such as multi-channels LPCM(7.1),
or HBR bitstream for these sink devices.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ic5ad66002d6f97b4585aaeb01620a53e08b7ed84
2023-03-31 15:49:36 +08:00
Guochun Huang
da5c8288d2 arm64: dts: rockchip: rk3588-vehicle-maxim-serdes: remove unused attribute
Change-Id: I53aac65a92b01464d5f39196fd8b5ca1736a70f6
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2023-03-31 15:45:55 +08:00
Xing Zheng
a79d5a5f0a drm/rockchip: inno_hdmi: fix the noise during pause/resume by application
Since the i2s does not support the clock to be always on, and
snd_pcm_stop() will turn off the i2s clock.

However, the inno HDMI codec still needs to the clock to work, then
it does not do the corresponding clear and leads to abnormal audio
logic inside HDMI without the clock.

This patch adds an AUDIO_PD off/on to clear internal audio logic
during HDMI prepare to solve this problem.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I1ccb486a3fe1729c95d7d755ae2caf88d61a146b
2023-03-31 14:40:08 +08:00
Jianwei Fan
ca99cd1152 media: i2c: jaguar1: fix compile error and add enum_frame_interval api
Change-Id: I93832e248ee6c2c2efc761d2a3bd2e7cea793fae
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2023-03-31 14:38:41 +08:00
Jon Lin
3193e78fe5 arm64: dts: rockchip: Reserved bar2 memory region for pcie3x4 ep
Change-Id: I5fac8637263c9f9fc351ddc6ae1d7cc37a8a32af
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-03-31 14:37:58 +08:00
Jon Lin
60ce2e8807 PCI: rockchip: dw: Support bar2 memory map
Rerseved memory for bar2 mapping by the dts property
"memory-region", the bar resource mapping rule:
 - bar0 4MB
 - bar2 64MB

for example:
	reserved-memory {
		...
		bar0_region: bar0-region@0x3c000000 {
			reg = <0x0 0x3c000000 0x0 0x00400000>;
		};
		bar2_region: bar2-region@0x40000000 {
			reg = <0x0 0x40000000 0x0 0x04000000>;
		};
	};

	&pcie3x4 {
		...
		memory-region = <&bar0_region>, <&bar2_region>;
		memory-region-names = "bar0", "bar2";
		...
	};

The rule is flexble and change by user as they want.

Change-Id: I1b866919f81892ad5326fb93896384c22c54fe74
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-03-31 14:37:58 +08:00
Wyon Bi
0608f7e239 drm/bridge: maxim-max96745: Remove unused code
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I2f686f7a6395feb72896a3644093fc1acb315e81
2023-03-31 14:36:20 +08:00
Wyon Bi
dd1d5e6715 drm/panel: maxim-deserializer: Add static GPIO ID assignment
bl_pwm - GPIO ID 0

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I0eb4ec5e2e6ff6ad06efbc93f1e7c9837312308f
2023-03-31 14:36:20 +08:00
Wyon Bi
bd05f5d23c arm64: dts: rockchip: rk3588-vehicle-maxim-serdes: Add static GPIO ID assignment
bl_pwm - GPIO ID 0

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I807d578646387cc870e5f825f935f50d12924065
2023-03-31 14:36:20 +08:00
Tao Huang
8ded72f47d arm64: rockchip_gki.config: Disable CONFIG_CHR_DEV_SCH
android13 without these symbols:
__scsi_execute
scsi_device_lookup
scsi_print_sense_hdr
scsi_register_driver

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I22871cf2470b33b9d780daca81c195a7343b3655
2023-03-31 09:48:34 +08:00
Tao Huang
95a8c1b877 net: wireless: rockchip_wlan: bcmdhd: Fix out-of-srctree build
../drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.c:25:10: fatal error: 'typedefs.h' file not found

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I425cb52776bb1b3294b8ef67c951b04afe2288a9
2023-03-30 21:14:08 +08:00
Zhang Yubing
d0954732ea drm/rockchip: dw_hdmi-qp: support show split mode logo
Change-Id: I13d62aee86ba911253112be6709d84e86213a59e
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2023-03-29 18:52:50 +08:00
Oliver Peng
f06f540a36 arm64: dts: rockchip: init rk3588-vehicle-evb-v20 dts file
add vehicle-evb-v20 dts file for first time

Signed-off-by: Oliver Peng <oliver.peng@rock-chips.com>
Change-Id: If48fa4fee974d84c99989e3014651fc8aacf53e0
2023-03-29 16:34:52 +08:00