Commit Graph

1072349 Commits

Author SHA1 Message Date
Sugar Zhang
e1b9f44606 ASoC: rockchip: i2s-tdm: Explicitly delay for dma to fill FIFO
Explicitly delay 1 usec for dma to fill FIFO,
though there was a implied HW delay that around
half LRCK cycle (e.g. 2.6us@192k) from XFER-start
to FIFO-pop.

1 usec is enough to fill at lease 4 entry each FIFO
@192k 8ch 32bit situation.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I9eebfcfa6a3fc73a75b2ea9c700131b5cd366bde
2022-08-22 17:42:55 +08:00
Sugar Zhang
e1df6dab68 ASoC: rockchip: i2s-tdm: Set maxburst per FIFO waterlevel
Set dma maxburst per FIFO waterlevel for better performance
on high bit-rate situation, such as 192k 8ch 32bit situation.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ib8d7596e2f43fa8efec10ce045bb3225e3873070
2022-08-22 17:42:55 +08:00
Sugar Zhang
52397dcf3e ASoC: rockchip: i2s-tdm: Simplify xfer routine
This patch simplify xfer and reset routine. and prepare
for better support for always-on function.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I0d8a2588566783e604dfec26deaf3bfca9178deb
2022-08-22 17:42:55 +08:00
Wyon Bi
2abd3af02c drm/bridge: analogix_dp: Use video format information from register
Force sync polarity to active low for RK3588.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Icbc2b344d67dd1b8e288cfd5117b5065fd4b2142
2022-08-22 14:57:45 +08:00
Wyon Bi
7fbb159554 drm/bridge: analogix_dp: Fix potential NULL pointer dereference
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I737d6ce4f1077ba05c0744fea024652f305adfc1
2022-08-22 14:57:45 +08:00
Ziyuan Xu
d486f41dfc media: i2c: sc3338: increase v-blank to 8ms
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ibf1406ca0967ddace6f073468ddaa2ee6b2eb62f
2022-08-22 11:10:52 +08:00
Sugar Zhang
d2e5b9912d ASoC: rockchip: i2s-tdm: Clean code
* clean and simplify code
* fix clk err handling
* fix copy-paste err

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I09006be2d2ad12a3c71889c22175bc322465c5cb
2022-08-20 11:16:57 +08:00
Xing Zheng
e26cc54362 ASoC: rk3308_codec: fix the crash without do INIT hpdet_work
If we specify the property of acodec "rockchip,no-hp-det", we
shouldn't queue the hpdet_work that is without initialized,
and the dwork timer->function is NULL.

The crashed log:
===
[    0.666484] ------------[ cut here ]------------
[    0.666536] WARNING: CPU: 1 PID: 1 at kernel/workqueue.c:1657 __queue_delayed_work+0x51/0xd8
[    0.666553] Modules linked in:
[    0.666586] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.10.110 #168
[    0.666602] Hardware name: Generic DT based system

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I66de7c031c6d7373eb77e65448771eb183e0888b
2022-08-20 09:54:37 +08:00
Jianqun Xu
efa2755aad pinctrl: rockchip: fix iomux set for rk3588 GPIO0_B4-GPIO0_D7
The pin range from GPIO0_B4 to GPIO0_D7 for rk3588 SoCs should set two
registers for iomux, since each of them has 8 bits width.

This patch fixes a issue when reset the iomux from a value from larger
than 8 to a value littler than 8, the high 4 bits should be reset to
'0'.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I61196f78ceb08ed47b26374c6f1ca7031f15b9d9
2022-08-19 11:30:25 +08:00
Jianwei Fan
de9477630d media: i2c: imx577: add dgain control
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I2c52c1b57b711c5e8776b39184f0396a0575fa95
2022-08-19 11:18:00 +08:00
Guochun Huang
9218ea9567 mfd: MAX96745: add support line fault monitor status report
GMSL2 serializers include a novel line-fault detection circuit that
detects and reports open-circuit, short-to-battery, short-to-ground,
and line-to-line short. The line-fault monitor is disabled by default,
and configuration options are available through registers. Its status
can be read by register.

Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: Ie548d25a8492f0ff883cc777c3a14049d25dda9a
2022-08-19 09:44:37 +08:00
Guochun Huang
13c7ab8585 mfd: MAX96755F: add support line fault monitor status report
GMSL2 serializers include a novel line-fault detection circuit that
detects and reports open-circuit, short-to-battery, short-to-ground,
and line-to-line short. The line-fault monitor is disabled by default,
and configuration options are available through registers. Its status
can be read by register.

Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: Iad44a7d2a56992f2906376b9a07e708c8f37c05b
2022-08-19 09:44:37 +08:00
Yu Qiaowei
4d223f6c65 video: rockchip: rga3: move rga_dma_sync_flush_range to rga_dma_buf.c
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I2a58ada9e12bba51afe15de55d3f75b28834f931
2022-08-18 21:02:00 +08:00
Yu Qiaowei
8d38661ce3 video: rockchip: rga3: return an error when job_commit failed
when a request is being submitted, if one of the job commits fails,
the submission of the request is aborted and return an error.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I15c0271c95a66288f1232c9e33d731e5c14741c8
2022-08-18 20:07:36 +08:00
Yu Qiaowei
deedcb50d4 video: rockchip: rga3: enable dump_image only when CONFIG_NO_GKI
kernel_read()/kernel_write() are missing from GKI symbol list.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Id8c15e682e6187f551aa48ee28d23944d71b72f6
2022-08-18 20:07:35 +08:00
Jianqun Xu
2c72e670b0 arm64: dts: rockchip: rk3588s move the compatible property ahead for dfi
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I4e2bb5169a9d71e454a09111307c96de3c42cdff
2022-08-18 19:18:58 +08:00
Elon Zhang
c8b2593e7a ARM: configs: rv1106-smart-door: disable thunderboot isp
CONFIG_VIDEO_ROCKCHIP_THUNDER_BOOT_ISP is not need for now.

Signed-off-by: Elon Zhang <zhangzj@rock-chips.com>
Change-Id: I6f0d06f8caae764839d87fd3dbcbe35c10140437
2022-08-18 19:14:43 +08:00
Ziyuan Xu
a521037db6 ARM: configs: rv1106: enable ROCKCHIP_THUNDER_BOOT_SERVICE for battery-ipc
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I3f9c7de5dbe76fa4f6f581ec5ebffe1df8798b76
2022-08-18 16:44:57 +08:00
Ziyuan Xu
4cfa4f8150 ARM: dts: rockchip: rv1103g-battery-ipc-v10: enable tb-service for synchronization between A&B
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: If463bd8356abd4986a60e6b8bd9d0c3a01352c66
2022-08-18 16:44:05 +08:00
Ziyuan Xu
e82db3b644 soc: rockchip: tb_service: ensure *cb* to be called when !ROCKCHIP_THUNDER_BOOT_SERVICE
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Id1a876458195c5a8ff591c555a0f9f29672012c6
2022-08-18 16:13:49 +08:00
Ziyuan Xu
c2b9cad6de i2c: rk3x: Serialize interrupt handle when *amp-shared* is available
The "amp-shared" means the other processors might use I2C at the same
time, make sure that the other processors finish.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I43fd964a684e54baf1e600776cbf27b2fe7d6df6
2022-08-18 16:13:47 +08:00
Lin Jianhua
f2e1d39a30 ARM: configs: update rk3308_linux_aarch32_defconfig
1:enable CONFIG_MEDIA_SUPPORT/CONFIG_ROCKCHIP_GRF/CONFIG_RFKILL_RK
2.enable CONFIG_CPU_FREQ_STAT
3:wifi build module
4:enable adb
5:open some debug info

Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
Change-Id: If63ef361336cb24330437384a24ef5f716b03bdf
2022-08-18 14:25:30 +08:00
Luo Wei
50879cb827 arm64: dts: rockchip: rk3588-vehicle-evb: add multi-logo support
Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: I454176a7f4b52a115c51754657fb352ab25a6bbf
2022-08-18 14:23:35 +08:00
Shiqin Chen
d1c1f41753 media: i2c: sc031gs: add sc031gs driver
1. modify max and min gain value.
2. add digital_gain_reg for gain setting

Signed-off-by: Shiqin Chen <chensq@rock-chips.com>
Change-Id: I690ba934964fea8c1052ffdf10438016094baac6
2022-08-18 14:09:59 +08:00
Yu Qiaowei
3164a01108 video: rockchip: rga3: RGA3 complete support rotation+mirror scene
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I28900311ddeb042f99b34bab34f448631ffc2763
2022-08-17 16:56:13 +08:00
Yu Qiaowei
83e96ce187 video: rockchip: rga3: Async mode will pass error code through fence
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I2354d6d2e0253aa061c759fef39aa29af54119e7
2022-08-17 16:56:13 +08:00
Yu Qiaowei
647206278f video: rockchip: rga3: Fix job_commit cannot return error code
Fix the use of job->ret that has been released when returning abnormally.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I93f2fd89c16790889aabcda43f5a848a999d1277
2022-08-17 16:56:12 +08:00
Tao Huang
5bfb669b13 arm64: rockchip_gki.config: Enable RK618
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ia1e5290cf3679eda0b1968f56cb690f6e35c0c85
2022-08-17 16:17:51 +08:00
Damon Ding
7b08c19150 mfd: rk618: fix compile error
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I9537cfba5afc37df0c450068317962c3d69ecff9
2022-08-17 16:16:03 +08:00
Damon Ding
b9ff4470cb drm/rockchip: rk618: adapt to kernel-5.10
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I59afe9495a7ba9418afe48d6e26c6e98a871e699
2022-08-17 15:49:37 +08:00
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