Commit Graph

1065348 Commits

Author SHA1 Message Date
Andy Yan
925acfb272 Revert "drm/rockchip: vop2: Disable aclk of video port when it unused"
This reverts commit e5cb1f01cd.

This function is not stable.

u-boot should also revert this commit:
0b728e80d451 ("drm/rockchip: vop2: disabled aclk of video port when unused")

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I8f3b1180c29a670433a12993f18b33716bef288f
2022-03-16 14:29:46 +08:00
Alex Wang
252b7b1c4b arm64: dts: rockchip: rk3588-nvr-demo-v10-android: enable logo
Change-Id: I34ca01cc64561b8a5ce199da7e0bde74dedfae1e
Signed-off-by: Alex Wang <alex.wang@rock-chips.com>
2022-03-16 14:23:46 +08:00
Johnson Ding
5481a1fc33 video: rockchip: mpp: Add AVS2 decoder config
Change-Id: Ia0cb76a934fe5163b39cd5d9700378da9a545a2a
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2022-03-16 11:07:05 +08:00
Algea Cao
2141f96c8c phy: rockchip-samsung-hdptx-hdmi: Reset phy when disable phy
Phy must be reset or GRF_HDPTX_STATUS will always show phy
is locked.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I9f1ade5ce6f744b1d9590f72b95bc18c58b6d12b
2022-03-16 09:39:33 +08:00
Sandy Huang
2f4d9c9d83 drm/rockchip: vop2: fix port mux error when at 8k hdr10 + dual display
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I038923d38794605938d84a55280a1aca958506ed
2022-03-16 09:16:44 +08:00
Cai YiWei
bee058dcef media: rockchip: isp: wrap mode for dvbm
Change-Id: I8d20364c03c057465c390107e33ced3e5eb4dcbf
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-03-15 17:52:48 +08:00
Yandong Lin
5d269355f0 video: rockchip: dvbm: support dvbm module
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I165a7b0eebb56da76ddc3ab82cb455aee28c0ffe
2022-03-15 17:52:48 +08:00
Chen Shunqing
9ab8c6cff6 media: rockchip: hdmirx: fix get yuv420 timing error
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I37f6a4f19d9be0875c117f58f3ba6da9cbe3f9ed
2022-03-15 17:51:44 +08:00
Wyon Bi
dd10fa5593 drm/rockchip: dw-dp: Fix dynamic range in vsc sdp
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ifa48bc2312216f03900ec98d5ab6334815e33a4c
2022-03-15 17:48:13 +08:00
Simon Xue
d647ce0460 dma-buf: rk_heaps: refactor code
Make APIs and structure only visible in rk_heaps ranges

Change-Id: I396f6dc47210591647f52a2247abc969bb826245
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2022-03-15 17:31:30 +08:00
William Wu
1b79a4684c USB: quirks: Add NO_LPM quirk for Lexar Flash drive
LPM on the device appears to cause xHCI host controllers
to reset the usb device when run at USB 2.0 high speed,
then the device will enter suspend and unable to exit.

Change-Id: I185cfe2c01f6de20463b041bdf4dac54978f1ada
Signed-off-by: William Wu <william.wu@rock-chips.com>
2022-03-15 17:26:57 +08:00
Simon Xue
8788877d01 dma-buf: rk_heaps: add debug info via proc
cat /proc/rk_dma_heap/dma_heap_info

Change-Id: I03d0f49ffed4929ba3986f7c4b87679eb0fd09ba
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2022-03-15 16:56:04 +08:00
Simon Xue
0e671b294c dma-buf: rk_heaps: update /sys/kernel/debug/rk_dma_heap/dma_heap_info
List total buffer size on the last line
List each buffer size

Change-Id: I5ca932cf77d3fb041c90df38b1cd19f68665f3f3
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2022-03-15 16:55:58 +08:00
Lin Jinhan
def4274701 crypto: rockchip: cryptodev_linux: move user header to uapi/linux
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Ie2cb4600a109fd2830b81ddae99b3182ae91f780
2022-03-15 16:42:25 +08:00
Wang Jie
8bee178eae dt-bindings: usb: et7303: add usb role and orientation switch config
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
Change-Id: I66b4ec8c7d2b05ccfd25bd38e4ffc9aeabda73c5
2022-03-15 16:41:09 +08:00
Wang Jie
1c71e396cf usb: typec: tcpm: add vbus regulator ctrl for et7303
This adds optional vbus control for et7303 Type-C controller.

Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
Change-Id: I7cd324f994962f212ff01dbd2b6073753151bfa9
2022-03-15 16:41:09 +08:00
Tao Huang
35fc84096e dt-bindings: display: media-bus-format: include uapi/linux/media-bus-format.h directly
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ifb9dfa7a0ddbdae804eb570f2af714ed5d623446
2022-03-15 16:40:07 +08:00
Jon Lin
c981b50cb2 mtd: spinand: gigadevice: Support new GD5F1GM7UxG
Change-Id: Ic0c9817afd04d281c614f8043b320857bc0ca4ac
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-03-15 16:39:38 +08:00
Felix Zeng
871ec3d046 ARM: dts: rockchip: rv1106: Add rknpu node
Signed-off-by: Felix Zeng <felix.zeng@rock-chips.com>
Change-Id: I5ae014a2af87a706d3b393cd6df165e14ca63c3b
2022-03-15 16:38:33 +08:00
Cai YiWei
306ddd3e8e ARM: dts: rockchip: add dvbm to isp for rv1106
Change-Id: I2b91a815e7fc7eda99978b0eb114ce7e257c8ec7
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-03-15 16:35:51 +08:00
Shawn Lin
2a608e4801 PCI: rockchip: dw: improve L2 support
Wlan devices support for RK platform has changed as the function driver
would cut down the power before host driver take place. So L2 must fail
now. We don't need to waste time for waiting for L2 to happen.

Meanwhile, given that the L2 handshake is a MSG TLP level operation, we
don't need such a long time to wait for timeout, in case some buggy devices
wouldn't support it.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I6bd9e54a9ace46c0d44e9f2fcfb1b5ced43136ab
2022-03-15 16:34:03 +08:00
Dingxian Wen
ac0d8ffc8a media: rockchip: hdmirx: Workaround to fix system crashes
1.Hdmirx DMA caused NOC abnormal pending during hot-plug operation,
resulting in system crash.Detect signal change as soon as possible
and reset hdmirx controller in FIQ to avoid hdmirx DMA exception.
2.Add hdmirx DMA reset operation when HDMI is unplugged and hdmirx
DMA is off.

Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I89dfda97cc0e4a9ac366a87b134762e400675530
2022-03-15 14:38:18 +08:00
Dingxian Wen
c24a7e3c5c arm64: dts: rockchip: rk3588: config interrupt 468 for HDMIRX_HDMI
HDMIRX_HDMI interrupt is handled in FIQ and triggered by software
interrupt 468 in HDMIRX driver.

Change-Id: I9f3abb373198bcb615e7290621d6baa96de21a7f
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
2022-03-15 14:27:00 +08:00
Chen Shunqing
c4f2304ac6 media: rockchip: hdmirx: fix edid error after resume
Close vdd_log in suspend, cause sram reset.

Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I72b02b1df0e6df762133fb70faf47a604dd0fa57
2022-03-15 14:24:50 +08:00
Tony Xie
f9a03f5e5c soc: rockchip: sip: support config fiq.
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Change-Id: Ie1dab613993b1dc2a54e6c87dbbac9043421b4c7
2022-03-15 14:21:04 +08:00
Yifeng Zhao
ed08d01ec6 mmc: sdhci-of-dwcmshc: configure the TX DLL TAP value for HS400
According to the signal test results, it is recommended
to configure the value of TX DLL TAP as 0x9 for HS400.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I4f999020a2d1c1d415894fb58b63b55f700a1531
2022-03-15 14:10:22 +08:00
Yandong Lin
2d2e264f4c ARM: dts: rockchip: add dvbm/mpp/enc node for rv1106
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Id464222aa0c41b47be2c8b075d7f5bfa8e43a343
2022-03-15 11:45:12 +08:00
Jon Lin
cd7c4819ab mtd: spi-nor: xtx: Add code
Change-Id: I789d0662cc77f038fd0521749274c3d484a42bfc
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-03-15 11:42:18 +08:00
Jon Lin
a3df8a05a6 mtd: spi-nor: xmc: Support new devices
XM25QH32C, XM25QH64C, XM25QU64C, XM25QH128B, XM25QH128C, XM25QU128C

Change-Id: I3a305f3a7359803c707c7efd7973cfcf1c8a4a32
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-03-15 11:42:18 +08:00
Jon Lin
a5456f1383 mtd: spi-nor: gigadevice: Support gd25q512
Change-Id: I2f0368bffb6002a21126f35eb555909339dcc5ae
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-03-15 11:42:18 +08:00
Lin Jinhan
02bd80254d crypto: rockchip: cryptodev_linux: add rsa support
Add new ioctl cmd RIOCCRYPT_RSA_CRYPT for rsa encrypt/decrypt.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: If92e1a71b1ce4fcf6b414736cf6405a1d7b6334c
2022-03-15 10:34:10 +08:00
Tao Huang
cf394eddf2 usb: typec: tcpm: Fix for GKI
Fixes: b1302e6a83 ("usb: typec: tcpm: add pd handler lock")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ic0709a80851490a8dca4c53a8e0fa50b18bf0a63
2022-03-15 09:45:57 +08:00
Tao Huang
463bcb6c7f init: Introduce call initcall async
Support call same level initcall async in kthread.
Introduce kernel parameter "initcall_nr_threads" control how many threads.
initcall_nr_threads default is 0, which disable intcall async.
initcall_nr_threads=-1, auto selected the number of threads.

Save boot time about 29ms on rk3126-bnd-d708 board.

Change-Id: I04663d22500bc1d65ca5841fb08e4b57083d6b5e
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2022-03-14 19:37:36 +08:00
Cai YiWei
243508d8ec media: rockchip: isp: fix config of capture_v30
Change-Id: Iaa929ec3f1ca3d469c2b227980ec44e135f0e1a8
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-03-14 19:26:51 +08:00
Ding Wei
b6f99be6df iommu/rockchip: fix issue for read the value for the MMU_DTE_ADDR
The register of MMU_DTE_ADDR may effect for delay several us.

Change-Id: I74397a914313d9fe3d7c93de7b94b4b38dc61c7b
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2022-03-14 17:56:48 +08:00
Jianqun Xu
06d55ecd4d ARM: rv1106_defconfig: CONFIG_FORCE_MAX_ZONEORDER = 9
+CONFIG_FORCE_MAX_ZONEORDER=9

Set max zone order to 9, make the pagelock to be 1MiB size.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: If013d2dc092c85c89b325b4c646c814f9cf94fef
2022-03-14 16:22:47 +08:00
William Wu
f14ef60afd phy: rockchip: inno-usb2: set bvalid to high by grf for rv1103
RV1103 doesn't have VBUSDET pin for the usb phy to
detect the USB VBUS, and the default status of bvalid
is inactive(low level), it cause the dwc3 controller
fail to start usb device connection, so it needs to
set bvalid to high by grf for RV1103.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: If63c68270c14ff8fa402805a33ce3061f6f796ab
2022-03-14 16:04:46 +08:00
William Wu
7598c25d0b ARM: configs: rv1106-evb.config: Enable usb phy and controller
This patch enable the USB configs for basic device and
host functions.

With this patch, it also enable CONFIG_CONFIGFS_FS because
the USB Gadget F_FS depends on it.

I use size cmd to calculate the increased static memory.

before:
   MODULE                                     BYTES
   kernel/drivers                           1212734
   kernel/fs                                 699540

after:
   MODULE                                     BYTES
   kernel/drivers                           1506379
   kernel/fs                                 712940

And if we disable the CONFIG_DEBUG_FS, it can save 11441 Bytes
for xhci-debugfs driver.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Id23410e66c49fb54663e34a23e09e142d49c7dd9
2022-03-14 16:04:25 +08:00
Ondrej Jirman
7c62ae6c44 BACKPORT: i2c: rk3x: Handle a spurious start completion interrupt flag
In a typical read transfer, start completion flag is being set after
read finishes (notice ipd bit 4 being set):

trasnfer poll=0
i2c start
rk3x-i2c fdd40000.i2c: IRQ: state 1, ipd: 10
i2c read
rk3x-i2c fdd40000.i2c: IRQ: state 2, ipd: 1b
i2c stop
rk3x-i2c fdd40000.i2c: IRQ: state 4, ipd: 33

This causes I2C transfer being aborted in polled mode from a stop completion
handler:

trasnfer poll=1
i2c start
rk3x-i2c fdd40000.i2c: IRQ: state 1, ipd: 10
i2c read
rk3x-i2c fdd40000.i2c: IRQ: state 2, ipd: 0
rk3x-i2c fdd40000.i2c: IRQ: state 2, ipd: 1b
i2c stop
rk3x-i2c fdd40000.i2c: IRQ: state 4, ipd: 13
i2c stop
rk3x-i2c fdd40000.i2c: unexpected irq in STOP: 0x10

Clearing the START flag after read fixes the issue without any obvious
side effects.

This issue was dicovered on RK3566 when adding support for powering
off the RK817 PMIC.

Signed-off-by: Ondrej Jirman <megous@megous.com>
Reviewed-by: John Keeping <john@metanate.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
(cherry picked from commit 02fe0fbd8a)
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I9cf23d9a9bc9560a421c6fe13a82a6637d8a1432
2022-03-14 15:28:45 +08:00
Shunhua Lan
0260220515 media: rockchip: hdmirx: add hdmirx class for audio info
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: Ifd4f9cd9e28318f49fdc3da95113819de3775587
2022-03-14 14:18:36 +08:00
Guochun Huang
7cceedfb74 drm/panel: panel-simple: add error message to debug.
in order to directly determine the specific error
location of panel_simple_probe from error message
as follow:

BUG:
[    2.055658] rockchip-drm display-subsystem: bound ff900000.vop (ops
vop_component_ops)
[    2.055791] rockchip-vop ff8f0000.vop: missing rockchip,grf property
[    2.056148] rockchip-drm display-subsystem: bound ff8f0000.vop (ops
vop_component_ops)
[    2.056505] [drm:rockchip_dp_bind] *ERROR* failed to find panel
[    2.056732] rockchip-drm display-subsystem: failed to bind
ff970000.edp (ops rockchip_dp_component_ops): -517
[    2.057374] rockchip-drm display-subsystem: master bind failed: -517

Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I2ceeaa9fac3834ad0c4b2bc0a4d8ab79050dfd8b
2022-03-12 19:32:59 +08:00
Lin Jinhan
23c9526f86 crypto: rockchip: v2: akcipher: prevent input data overflow
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I39442e8e8ad1897b454da451090fbe867d6b26d6
2022-03-12 17:19:57 +08:00
Lin Jinhan
1e2b2b5aec crypto: rockchip: v2: akcipher: drop sign and verify
For kernel 5.10, the interface functions of sign and
 verify have changed and are not mandatory.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I2b94eaeaa5d0d3dd99ba86dd418338d9502c8aa5
2022-03-12 17:19:57 +08:00
吴良清
6e8b377f6d Revert "Revert "arm64: dts: rockchip: rk3588-android: enabled dmc""
This reverts commit de8062f2c3.

Change-Id: I061d2738aed267263f02f494b1663fb8d8a0e5db
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2022-03-12 16:57:59 +08:00
Jianwei Fan
d079e65435 media: i2c: imx214: adapt to kernel-5.10 and add 4lane mode support
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I05129ea47403f173fda55ddc4ccccc9fce5791f8
2022-03-12 16:49:51 +08:00
Sugar Zhang
d27ca5b359 drm/bridge: synopsys: dw-hdmi-qp: Fix audio infoframe
AUDI_CONTENTS0: { RSV, HB2, HB1, RSV }
AUDI_CONTENTS1: { PB3, PB2, PB1, PB0 }
AUDI_CONTENTS2: { PB7, PB6, PB5, PB4 }

PB0: CheckSum
PB1: | CT3    | CT2  | CT1  | CT0  | F13  | CC2 | CC1 | CC0 |
PB2: | F27    | F26  | F25  | SF2  | SF1  | SF0 | SS1 | SS0 |
PB3: | F37    | F36  | F35  | F34  | F33  | F32 | F31 | F30 |
PB4: | CA7    | CA6  | CA5  | CA4  | CA3  | CA2 | CA1 | CA0 |
PB5: | DM_INH | LSV3 | LSV2 | LSV1 | LSV0 | F52 | F51 | F50 |
PB6~PB10: Reserved

AUDI_CONTENTS0 default value defined by HDMI specification,
and shall only be changed for debug purposes.
So, we only configure payload byte from PB0~PB7(2 word total).

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Idfbb34ff7f7069af4e73c6995f32eefa798a9450
2022-03-12 16:29:28 +08:00
Sugar Zhang
ea0f840194 drm/bridge: synopsys: dw-hdmi-qp: Fix channel status
* LPCM: BPCUV insertion by hw
* NLPCM/HBR: BPCUV insertion from stream

when BPCUV is from stream, we should not enable hw channel
status override which will replace CS with the hw one.
This fixes DD+ bitstream.

when BPCUV generated from HW, PBIT_FORCE_EN should be set
for Parity bit calculated internally.
This fixes no sound on some display devices.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I3aa0390d9dd7d217853394c74576749c36b84720
2022-03-12 16:29:22 +08:00
Sugar Zhang
974a88ba65 arm64: dts: rockchip: rk3588: Add DCLKx for hdmi nodes
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: If7e1be0e59bd2234e32769e06bc767b4a6fc2112
2022-03-12 16:29:15 +08:00
Algea Cao
de16913c3b drm/rockchip: dw_hdmi: Make sure dclk is enabled when set audio registers
Change-Id: Idb62c2c9ea0d75d7090ec3e35c7742b0d42b3e43
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2022-03-12 16:29:07 +08:00
Algea Cao
c14ae13e54 drm/rockchip: vop2: Save crtc id in rockchip_crtc_state
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Iadcf16d59241f4915421f5c3937d4abe0a9bc304
2022-03-12 16:28:59 +08:00