Commit Graph

1072319 Commits

Author SHA1 Message Date
Jason Zhang
3d910581e4 iio: imu: lsm6dsr: restore the dynamic ODR table
The LSM6DSR has an ODR selection ranges from 12.5 Hz to 833 Hz,
remove the fix ODR selections in the ODR table.

Signed-off-by: Jason Zhang <jason.zhang@rock-chips.com>
Change-Id: I1eca8a4d2fb07370750b9f9aeb3f3f3781bfd68e
2022-08-17 15:16:10 +08:00
Jason Zhang
c36e34dc08 iio: imu: lsm6dsr: fix deadlock on resume
The sequence of hw->lock and hw->page_lock in
st_lsm6dsr_update_watermark and st_lsm6dsr_fsm_init are in
reverse, which may results in deadlock.

The fifo water mark is held by iio_dev->mlock, Remove hw->lock
in st_lsm6dsr_update_watermark.

Signed-off-by: Jason Zhang <jason.zhang@rock-chips.com>
Change-Id: I9a1f60cf0ba4444f285ecb95fb37745fbf45e609
2022-08-17 15:15:54 +08:00
Sandy Huang
589f31ceda drm/rockchip: vop2: adjust aclk rate when in psr mode
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I4e43267cff912d871d402b22d0653bb715224680
2022-08-17 14:44:25 +08:00
Chen Shunqing
f15c1e3a24 media: rockchip: hdmirx: report hpd event for cec service
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: Ieae5593dc11578e253a02a63d3802ffa039c6b6d
2022-08-17 11:45:22 +08:00
Cai YiWei
635e5a0fe3 media: rockchip: isp: fix isp20 error
Change-Id: Ifd7d3c1e4c78b0815a84d969057cea06b79cabe7
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-08-17 11:44:09 +08:00
Finley Xiao
85166ddd95 arm64: dts: rockchip: Remove 2112MHz for rk3588m
Improves stability at high temperatures.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I1126742df334e341ecedd821de88bcb0ad2ce50a
2022-08-17 11:28:33 +08:00
Lin Jianhua
60f17c7808 net: wireless: rockchip_wlan: bcmdhd: fixup compile error on aarch32
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_escan.c:995:1:
warning: the frame size of 1120 bytes is larger than 1024 bytes

Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
Change-Id: Ie7899827ed313f7eddc853e78474be7e7ac9a756
2022-08-17 11:25:30 +08:00
Jon Lin
b8eea96692 drivers: rkflash: Fix the error of repeatedly calling memory allocation
Reinit the spiflash in resume ops and result in memory leak.

Change-Id: Id0a12f115f267df91e27a9cfc9d01ecce71be256
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-08-17 09:26:20 +08:00
David Wu
fba09b4ecb i2c: rk3x: Use the dev_warn_ratelimited to print
This patch to limit the print:
[  653.751436][    T1] rk3x-i2c fec80000.i2c: unexpected irq in STOP: 0x80
[  653.752035][    T1] rk3x-i2c fec80000.i2c: unexpected irq in STOP: 0x80
[  653.752634][    T1] rk3x-i2c fec80000.i2c: unexpected irq in STOP: 0x80
[  653.753232][    T1] rk3x-i2c fec80000.i2c: unexpected irq in STOP: 0x80
[  653.753832][    T1] rk3x-i2c fec80000.i2c: unexpected irq in STOP: 0x80
[  653.754431][    T1] rk3x-i2c fec80000.i2c: unexpected irq in STOP: 0x80

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I9e67edf1c780ff1cd05070113d6b58df6144d0fd
2022-08-17 09:10:12 +08:00
Sandy Huang
d7a8d7bb1a drm/rockchip: rgb: fix unbind unregister_sub_dev error
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I8fb797499421d7ee512a6f1aea7caa0638efe4a8
2022-08-16 20:17:55 +08:00
Luo Wei
48c480f1fa drm/bridge: disable bu18rl82 while disable display
Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: I4d2fd24e56e2fbceaf1a4c160033249748db29b1
2022-08-16 19:57:53 +08:00
William Wu
7ff327fd5e phy: rockchip: naneng-combophy: adjust Rx squelch for RK3588 U3
This patch adjust the RK3588 U3 Rx squelch input filler
bandwidth which is used for rx_lfps, reduce the bandwidth
to avoid filtering valid superspeed data.

With this patch, it can fix the issue that Kingston U3 Disk
read error on RK3588 platforms with the following log:

[   71.507131][  T404] usb 6-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd
[   71.524942][  T404] usb 6-1: New USB device found, idVendor=0951, idProduct=1666, bcdDevice= 1.10
[   71.524971][  T404] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   71.524984][  T404] usb 6-1: Product: DataTraveler 3.0
[   71.524995][  T404] usb 6-1: Manufacturer: Kingston
[   71.525006][  T404] usb 6-1: SerialNumber: 08606E6D3FDDB090680C42D4
[   71.532019][  T404] usb-storage 6-1:1.0: USB Mass Storage device detected
[   71.537183][  T404] scsi host0: usb-storage 6-1:1.0
[   72.541060][    T9] scsi 0:0:0:0: Direct-Access     Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6
[   72.542143][    T9] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   72.542545][  T222] sd 0:0:0:0: [sda] 30277632 512-byte logical blocks: (15.5 GB/14.4 GiB)
[   72.542800][  T222] sd 0:0:0:0: [sda] Write Protect is off
[   72.543171][  T222] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   72.620179][  T222]  sda: sda4
[   72.623249][  T222] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   72.797197][ T2097] usb 6-1: reset SuperSpeed Gen 1 USB device number 2 using xhci-hcd
[   72.814719][    C3] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK cmd_age=0s
[   72.814735][    C3] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 11 20 00 01 00 00
[   72.814743][    C3] blk_update_request: I/O error, dev sda, sector 4384 op 0x0:(READ) flags 0x80700 phys_seg 29 prio class 0

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I78031bcc79008fb34a529b7bbc71f5d4aae9c375
2022-08-16 19:49:37 +08:00
Jianqun Xu
b711d2cccf arm64: dts: rockchip: rk3308: use irq mode for fiq-debugger
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I5fc38116cb1b63cc36091b9f3ea617c4799db808
2022-08-16 19:49:07 +08:00
Caesar Wang
9b20a51836 arm64/configs: enable CONFIG_SQUASHFS_LZO for rockchip_linux_defconfig
Download snap "gnome-3-38-2004" (113) from channel "stable" will report
the below error:

Filesystem uses "lzo" compression. This is not supported
error: cannot perform the following tasks:
- Mount snap "gnome-3-38-2004" (113) (systemctl command
[start snap-gnome\x2d3\x2d38\x2d2004-113.mount] failed with exit status.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: Id35c140a482d41cb411fb62ba200d92804e814e5
2022-08-16 19:02:57 +08:00
XiaoTan Luo
047d1ad771 ASoC: rockchip: i2s-tdm: fixed PCM DSP A/B config.
DSP_A: PCM delay 1 bit mode,L data MSB after FRM LRC
 DSP_B: PCM no delay mode,L data MSB during FRM LRC

Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: I204384e368d741f42bc7a9862e400abb3dcce143
2022-08-16 17:24:01 +08:00
Algea Cao
d23a615de0 drm/bridge: synopsys: dw-hdmi-qp: Send VSI once per frame
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I7ae4aab3d9f705182e34ee9755d55575382b6318
2022-08-16 10:53:51 +08:00
Algea Cao
cde5917f63 drm/bridge: synopsys: dw-hdmi-qp: Don't send audio metadata
We don't support HDMI 3D Audio and Multi Stream Audio at present,
audio metadata should not be sent.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I8013b8a186f06ac89122b37184801ff124b5a095
2022-08-16 10:53:51 +08:00
Algea Cao
fbe1b004fa drm/bridge: synopsys: dw-hdmi-qp: Set color depth and phase to 0 when 24-bit format
According to CTS requirements, CD field and PP field in GCP
should be set to zero when 24-bit output.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Icf79493d5531a9781f9b6b8c656b297eec98f7b0
2022-08-16 10:53:51 +08:00
Algea Cao
14755141c9 drm/bridge: synopsys: dw-hdmi-qp: Set keep out period
Some display equipment require that the interval
between Video Data and Data island must be at least 58 pixels,
and set keep out always can meet the requirement.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I144c74f7eecb610c02f25126179535adab33944a
2022-08-16 10:53:51 +08:00
Algea Cao
e836764568 drm/bridge: synopsys: dw-hdmi-qp: Optimize HDMI resolution switching process
1.Support phy pll clk enable/disable is separated from
phy signal output.

2.Add avmute set/clear in resolution switching process.

3.To comply with the timing requirements of the HDMI protocol,
HDMI must be enabled in tmds mode according to the following process:

disable FRL -> enable/disable scramble —> power up phy

4.Optimize flt process

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I5f48b3292b434b26ab28a4e7238a87c8d64d5a33
2022-08-16 10:53:51 +08:00
Algea Cao
55f74a244a drm/rockchip: dw_hdmi: Updated the auto color policy
When the TV doesn't support the current color, switch
to 'auto' color format, YUV444 is preferred.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I4201012c27e9e1abae3dc87a036771b33109de75
2022-08-16 10:53:51 +08:00
Algea Cao
0e95e08982 phy: rockchip-samsung-hdptx-hdmi: Add function of enabling PLL independently in FRL mode
The phy pll must be enabled before access hdmi controller registers.
To support config hdmi controller registers before phy output is
enabled, pll must be enabled separately in both TMDS and FRL mode.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I1860c8a333e37db0c3406a0487ec916d5fd94976
2022-08-16 10:53:51 +08:00
Algea Cao
d0eb5198e1 arm64: dts: rockchip: rk3588: Add hdmi reference to hdmiphy pll clock
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ie3c154e151f4a5447cc0d6f94bcdfb86f5787c46
2022-08-16 10:53:51 +08:00
Jason Zhang
b8c6a7d52d iio: imu: lsm6dsr: fix IRQ setup
Fix wrong interrupt activation level setup in CTRL3_C.

Fix also wrong block data update setup in CTRL3_C, enable FIFO
threshold interrupt on INT1 pin.

Signed-off-by: Jason Zhang <jason.zhang@rock-chips.com>
Change-Id: I52a268ea0486bd1834880345511e59eaf8a2bdf9
2022-08-16 10:51:39 +08:00
Jason Zhang
6e4237635c iio: imu: lsm6dsr: reapply settings at resume
The ST LSM6DSR does not currently preserve settings after
powered down, it will default to the ST LSM6DSR settings after
powered up, not the settings set by the host.

Reapply all the settings at resume.

Signed-off-by: Jason Zhang <jason.zhang@rock-chips.com>
Change-Id: I702140e4d952ea5aee227d0ef4d2761bf6e6760f
2022-08-16 10:51:29 +08:00
Jason Zhang
c33ad29a3e iio: light: ucs12cm0: fix IRQ setup
Use irq trigger flags to setup interrupt, support interrupt level
low and falling edge.

Signed-off-by: Jason Zhang <jason.zhang@rock-chips.com>
Change-Id: I463eda0e7c405a7f0bfb170ed50a889ee1fe2ed4
2022-08-16 10:43:40 +08:00
Ziyuan Xu
4a15a42ac2 soc: rockchip: Add rockchip thunder boot service driver
It's used for the other processor to signal ARM via mailbox, that's
means the other processor is EOL.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I38ee434ec8ee1bb0841fd0c178f24192f6d74bdf
2022-08-16 10:11:16 +08:00
Ziyuan Xu
daf43701e9 mailbox: rockchip: initcall early when CONFIG_ROCKCHIP_THUNDER_BOOT=y
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I8401351fa059eec3473070347b3480e214ff10ee
2022-08-15 19:58:54 +08:00
Sandy Huang
0da77f77c0 drm/rockchip: drv: add support pre mapping for vop iommu
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I24f292f58859ed89a7557322dc9cd15ea4930eee
2022-08-15 17:51:07 +08:00
Simon Xue
c3db24d09b iommu/rockchip: support reupdate page that already mapped
1. pre-map all 4G range to a reserve page with "IOMMU_PRIV"

2. iommu_unmap will remap to the reserve page

Change-Id: Id019dfc720b00abac1572245fd523fed4e40361d
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2022-08-15 16:45:36 +08:00
Finley Xiao
bff8c7fa3b soc: rockchip: opp_select: Support multiple regulator for opp table calibration
1. Add support for devices with devfreq feature.
2. If use dev_pm_opp_set_rate(), it will fail to set clk rate
when only one opp in the latest kernel.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I935cca49caec1a0658c6aec8d64e04ea65260ce9
2022-08-15 15:40:26 +08:00
Finley Xiao
5b350c02e8 cpufreq: rockchip: Change read margin according to initial voltage
The default read margin is 4, it may not match the initial voltage.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I24c2ee3141f2259c83f2a5219c579115dff4d260
2022-08-15 15:40:26 +08:00
Finley Xiao
120cd00e08 soc: rockchip: opp_select: Change read margin according to initial voltage
The default read margin is 4, it may not match the initial voltage.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I9be7a75a34b3b460c3253be9a2a1860c0778fa08
2022-08-15 15:40:26 +08:00
Yandong Lin
a9a156162d video: rockchip: mpp: fix vepu2 reset crash issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I6531009438fb40ed30d0198be49dfc68ad71c286
2022-08-15 15:28:50 +08:00
Jon Lin
21dbd7a7f5 drivers: rkflash: Update to SFTL version: 5.0.58 20220814
1.Check the data in second page
2.Fix V7-T:
undefined reference to `__stack_chk_guard' .. undefined reference to `__stack_chk_fail'

Change-Id: Ie494a6c0898fdc58601c4db925afbc5ba1a7e09e
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-08-15 14:48:35 +08:00
Luo Wei
5b8a34c35d arm64: dts: rockchip: rk3588-vehicle-evb: dsi1 change to use 1920x720 resolution
Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: Ib3373c715c87647a94326e96c85161ec0860c5d4
2022-08-15 11:13:11 +08:00
Su Yuefu
685eb49e76 media: i2c: sc3338 fix gain table error
Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
Change-Id: Ibe35b1c74224723cf2be128ca45eeab12c6f05a9
2022-08-15 11:08:52 +08:00
Shawn Lin
356dbfbc92 PCI: rockchip: dw: Add RASDES common event signal status dump
It's useful for PM debug sometimes.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I9ebcd59eddaadff9dc259693dad7ddfecb9609b8
2022-08-15 11:07:54 +08:00
Yandong Lin
ed6e7edce9 video: rockchip: mpp: fix enc err using rcb buf on dule core
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I74a34b4b9a12c051b833a7c3f8fe86dbfa9fead2
2022-08-13 09:42:36 +08:00
Jianwei Zheng
75572d37b6 phy: rockchip-inno-usb2: fix dwc2 init failed due to core soft reset
timeout

Dwc2 controller will call phy init function during probe, Current code
will schedule otg_sm_work immediately after phy init, if we don't plug
in usb cable at this time, phy will power off soon after, this will
cause dwc2 do core soft reset failed.

To resolve this problem, We use typec_vbus_det property to distinguish
whether otg_sm_work needs to be executed immediately, If not needed,
delay 1 second.

Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
Change-Id: I191c8f2b83673e8712afea1d642224ae1ae2eb97
2022-08-12 18:42:34 +08:00
Jieyao Hu
cad6488ba3 ARM: dts: rockchip: rv1106g-evb2-v10: add reserved memory for isp and meta
Change-Id: Ie847c6295743b5436b721413300dc113d4dc207b
Signed-off-by: Jieyao Hu <toxicant.bane@rock-chips.com>
2022-08-12 17:29:41 +08:00
Jieyao Hu
8f4ffda867 media: i2c: sc3336 fix gain table error
Change-Id: I3f1c16a37d00321f3f740fc2816db1c9f9d5d98a
Signed-off-by: Jieyao Hu <toxicant.bane@rock-chips.com>
2022-08-12 15:52:55 +08:00
Sandy Huang
6ae6cdd235 drm/rockchip: vop2: fix PD_EMSART closed at wrong time
PD_ESMART will be closed at esmart layers attathed to VPs config done + FS,
but different VP FS time is different, this maybe lead to PD_ESMART closed
at wrong time and display error, so we don't dynamic turn on/off PD_ESMART
when have more than one display.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I2c5ada04992dd52ad72951198e327de540ba1974
2022-08-12 15:52:36 +08:00
Caesar Wang
9ab42b3be5 arm64/configs: enable IEP for rockchip_linux_defconfig
Enable rockchip iep module by default.

Tested on RK3399 EVB IND board as below.
root@linaro-alip:~# dmesg |grep IEP
[    3.258719] iep: IEP Power ON
[    3.258758] iep: IEP Power OFF
[    3.258780] iep: IEP Driver loaded successfully
...

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I80452a89a05e210a4dba0261c302517544b40c31
2022-08-12 14:51:23 +08:00
XiaoDong Huang
3b882fc5a8 dt-bindings: suspend: rk3588: add io-retention related macros
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: If0ac25224b525a56017f593d0ab71a3f67edfc29
2022-08-11 21:02:38 +08:00
XiaoDong Huang
7f64e7c02c soc: rockchip: pm_config: support sleep-io-ret-config
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: I5a26367fe2396832f7655331e292b53ebcf9a15d
2022-08-11 21:02:38 +08:00
Cai YiWei
a46a7e6ca0 media: rockchip: isp: add procfs write for debug
config isp procfs note to set debug mode:
BIT(0) for show isp reg
BIT(1) for dump bay3d iir/cur/ds buf once

BIT(8) for skip aiq params update
BIT(9) for skip hw params update, only for same w & h & bayer

example:
1.show isp reg info
echo mode=0x1 > /proc/rkisp0-vir0
cat /proc/rkisp0-vir0

2.dump bay3d iir/cur/ds buf to /tmp
echo mode=0x2 > /proc/rkisp0-vir0

3.skip aiq params update
echo mode=0x100 > /proc/rkisp0-vir0
echo 0x2200=0 0x538=0x800080 > /proc/rkisp0-vir0

4.skip hw params update
echo mode=0x200 > /proc/rkisp0-vir0

5.close debug mode
echo mode=0 > /proc/rkisp0-vir0

case 3 or 4 also can will with 1 and 2, such as mode=0x103

Change-Id: I64b41a1685453e12481c4ad9d22de8caf56eb2bf
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-08-11 20:53:06 +08:00
Huibin Hong
3095b83bfc soc: rockchip: debug: print pcsr when hardlock or rcu stall
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: I7673aa509e15df550fecc3f970ea64c34199a4f9
2022-08-11 20:33:45 +08:00
Huibin Hong
012bd50682 rcu: add rcu_stall_notifier_list
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: I53a22745174bdab77baee65cf6586402a54fe1da
2022-08-11 12:10:56 +00:00
Huibin Hong
d851edc401 watchdog/hardlockup: add hardlock_notifier_list
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: Id469d3c5a38f0bcb43a13a5c2263b53cf327154b
2022-08-11 12:10:56 +00:00