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>
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
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
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>
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
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
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
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>
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>
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
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
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
../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
add vehicle-evb-v20 dts file for first time
Signed-off-by: Oliver Peng <oliver.peng@rock-chips.com>
Change-Id: If48fa4fee974d84c99989e3014651fc8aacf53e0