Commit Graph

1080426 Commits

Author SHA1 Message Date
Jianwei Fan
6f12652f07 arm64: dts: rockchip: rk3568: default enable mipi_csi2_hw
Fixes: 841fa2175d ("arm64: dts: rockchip: rk3568 separate the node of csi2 and hw")
Change-Id: I16a05ac90044e9aad1338827ac33146bb4f2bc71
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2023-08-18 20:05:38 +08:00
Steven Liu
0013ee06a1 rpmsg: rockchip: fix mailbox txdone method to polling
Since there is no txdone irq in the Rockchip mailbox IP, invoking
    mbox_chan_txdone()/mbox_client_txdone() after mbox_send_message()
    to tick the TX would be free the active request which have not been
    sent out if the controller returned the EBUSY state before. So amend
    the txdone method to polling to fix it.

The TX polling interval can specify in mailbox DT with
    set "rockchip,txpoll-period-ms" property to 1 milliseconds.

Fixes: b5795e81ec ("rpmsg: rockchip: add Rockchip RPMsg Platform Support")
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I9d15ed4a61cda049c7804e2688e79f157de1c5a2
2023-08-17 19:36:01 +08:00
Binyuan Lan
e79df5fa17 arm64: dts: rockchip: rk3562-android: assign a fixed index to mmc devices
Change-Id: I707e84a2e7cbbf7004522674ac2fd05564f8e930
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2023-08-17 16:04:58 +08:00
Caesar Wang
c7973edb63 arm64: dts: rockchip: Add mmc aliases for rk3562-linux.dtsi
This series in order to have the default MMC alias.

The mmc default alias:
            mmc0 = &sdhci;
            mmc1 = &sdmmc0;
            mmc2 = &sdmmc1;

The Linux OS have the post-build.sh to handle the rootfs,
and export RK_EXTRA_PARTITIONS for setting the PARTITIONS.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I28ae38a7aaf35c6f584879c19a339ff6079d059d
2023-08-17 16:03:57 +08:00
Wu Liangqing
d21f77d0fd arm64: dts: rockchip: Makefile add rk3399-sapphire-excavator-edp-avb.dtb
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp.dtsi:210.20-216.4: ERROR (i2c_bus_reg): /i2c@ff110000/vm149c@0c: I2C bus unit address format error, expected "c"
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp.dtsi:243.20-249.4: ERROR (duplicate_label): /i2c@ff110000/vm149c@0c: Duplicate label 'vm149c' on /i2c@ff110000/vm149c@0c and /i2c@ff110000/vm149c@c
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-avb.dts:29.24-54.4: ERROR (i2c_bus_reg): /i2c@ff110000/tc35874x@0f: I2C bus unit address format error, expected "f"

Change-Id: Ie89eb8038b8791e89b63dab2c990f929596984a8
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2023-08-17 15:26:38 +08:00
Steven Liu
0621d78318 arm64: dts: rockchip: add rk3568 evb1 linux amp dts
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: Ic38603697a7a909e1c406bc56be10e0ab7c5608b
2023-08-17 14:45:32 +08:00
Steven Liu
5aeacb348d arm64: dts: rockchip: rk3568: Add arm_pmu label
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: Ia2c342e70042e98c3800c5748e8d1f4ad39fbfc3
2023-08-17 14:45:32 +08:00
Joseph Chen
f2576488ab soc: rockchip: amp: Update coding style and message
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I05b802b7caec5361c5b659926ebd46f31f0b1d44
2023-08-17 14:45:32 +08:00
Joseph Chen
a555b785b3 soc: rockchip: amp: Add 'boot-on' property assignment support
boot-on is absent or boot-on = <1>: bring up this cpu when driver probe.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I0157e72b53f5c35e5478408804a72bab5fd02837
2023-08-17 14:45:32 +08:00
Shunhua Lan
4b354ca1b7 arm64: dts: rockchip: rk3399-evb: fix dts build error
Fixes: d449b25d6b ("arm64: dts: rockchip: rk3399-evb: use multicodecs instead simple card")
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: I2c13a7834090e8433301125b79e86219db7b805d
2023-08-17 14:31:40 +08:00
Jon Lin
490787f8b7 drivers: rkflash: Add sleep for spinand
Program/Erase/Read Speed
– Page Program time : 450us typical
– BLOCK ERASE time : 4ms typical
– PAGE READ time : 120us maximum (without ECC)

Change-Id: I0c5bc9827788938df028e525e331c0db8d041676
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-08-17 14:17:14 +08:00
Jon Lin
939dcaa594 dt-bindings: spi: spi-rockchip: Support rockchip,autosuspend-delay-ms
Change-Id: Ib5a7344b4732ce525a3ac54c90868e89e82ca819
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-08-16 18:22:33 +08:00
Jon Lin
8a5c76ee45 spi: rockchip: Support pm_runtime_use_autosuspend
Change-Id: I12103f0d1fbe3c168c5fa304d4bfb181d2a4ab5f
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-08-16 18:22:33 +08:00
Algea Cao
75476ee430 drm/bridge: synopsys: dw-hdmi-qp: Disable access to registers when hdmi is disabled
When hdmi is disabled, relevant clocks have been turned off.
Accessing hdmi registers may cause crash.

Change-Id: Id5370641aac15d317d2e820aeac053a1bcf016a5
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2023-08-16 18:14:47 +08:00
Finley Xiao
f109af5ac1 arm64: dts: rockchip: rk3588s: Change leakage-voltage-sel for venc
In order to improve stability for some chips.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ia09d9e6d455e7dd932c84f4d7815c95dda83a6d6
2023-08-16 17:35:26 +08:00
Guochun Huang
613e5c0710 drm/rockchip: dsi2: havle dsc pps pic_width in dual channel dsi
two dsc encoder slices which is equal to pic_width / slice_width
will also halve whith pic_width

 <-HxV->  <------------- H/2 x V -------------->  <-H x V->
          ┌───────┐    ┌───────┐   ┌───────────┐
          │  DSC0 ├───►│dsi0 tx├──►│lcd dsi0 rx│\ ┌───────┐
 ┌─────┐ /└───────┘    └───────┘   └───────────┘ \│       │
 │     │/                                        /│lcd DSC│
 │  VP │\ ┌───────┐    ┌───────┐   ┌───────────┐/ │       │
 └─────┘ \│  DSC1 ├───►│dsi1 tx├──►│lcd dsi1 rx│  └───────┘
          └───────┘    └───────┘   └───────────┘

Change-Id: I65e65f969f9b1e81bee1a7343b386f577255a2f5
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2023-08-16 17:35:02 +08:00
William Wu
e45322a926 ARM: dts: rockchip: disable hs park mode for usb dwc3 controller
Some high speed devices performance drop drastically on
Rockchip platforms when connected with DWC3-xHCI controller.
It's because that the DWC3 controller enable high speed
park mode by default, it aims to improve performance with
pipelining of multiple packet. However, for some devices
(such as UVC with bulk transfer VID:04b4, PID:02f9),
when an IN request is sent within 900ns of the ACK of the
previous packet, these devices NAKs more than 3 times, it
could decrease the performance.

These slow devices include:
1. idVendor=04b4, idProduct=02f9, Product: IRay UVC
2. idVendor=1921, idProduct=21863, Product: Sandisk
3. idVendor=3744, idProduct=8552, Manufacturer: Flex Drive

In order to improve compatibility with high speed devices,
this patch disable HS park mode for USB DWC3 controller on
all arm64 SoCs.

With this patch, we test RK3588 with one slow device
(IRay UVC VID:04b4, PID:02f9) and three fast devices
(U2 disk VID:058f, PID:6387; U2 disk VID:0781, PID:557c;
 U3 disk VID:174c, PID:55aa), all of these device have
no performance loss.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I0ac37e7af429392f65f339cf1448cf2958e03b57
2023-08-16 15:29:15 +08:00
William Wu
d04353d002 arm64: dts: rockchip: disable hs park mode for usb dwc3 controller
Some high speed devices performance drop drastically on
Rockchip platforms when connected with DWC3-xHCI controller.
It's because that the DWC3 controller enable high speed
park mode by default, it aims to improve performance with
pipelining of multiple packet. However, for some devices
(such as UVC with bulk transfer VID:04b4, PID:02f9),
when an IN request is sent within 900ns of the ACK of the
previous packet, these devices NAKs more than 3 times, it
could decrease the performance.

These slow devices include:
1. idVendor=04b4, idProduct=02f9, Product: IRay UVC
2. idVendor=1921, idProduct=21863, Product: Sandisk
3. idVendor=3744, idProduct=8552, Manufacturer: Flex Drive

In order to improve compatibility with high speed devices,
this patch disable HS park mode for USB DWC3 controller on
all arm64 SoCs.

With this patch, we test RK3588 with one slow device
(IRay UVC VID:04b4, PID:02f9) and three fast devices
(U2 disk VID:058f, PID:6387; U2 disk VID:0781, PID:557c;
 U3 disk VID:174c, PID:55aa), all of these device have
no performance loss.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I9037143fa2553317ad7ae55abeafad3b106cafcb
2023-08-16 15:29:04 +08:00
Stanley Chang
35db5a9e94 UPSTREAM: usb: dwc3: core: add support for disabling High-speed park mode
Setting the PARKMODE_DISABLE_HS bit in the DWC3_USB3_GUCTL1.
When this bit is set to '1' all HS bus instances in park mode are disabled

For some USB wifi devices, if enable this feature it will reduce the
performance. Therefore, add an option for disabling HS park mode by
device-tree.

In Synopsys's dwc3 data book:
In a few high speed devices when an IN request is sent within 900ns of the
ACK of the previous packet, these devices send a NAK. When connected to
these devices, if required, the software can disable the park mode if you
see performance drop in your system. When park mode is disabled,
pipelining of multiple packet is disabled and instead one packet at a time
is requested by the scheduler. This allows up to 12 NAKs in a micro-frame
and improves performance of these slow devices.

Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Stanley Chang <stanley_chang@realtek.com>
Link: https://lore.kernel.org/r/20230419020044.15475-1-stanley_chang@realtek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry-pick from commit d21a797a3e)
Change-Id: I43ee416e54779a073a0ba4057edf4be8bd7886de
2023-08-16 15:27:25 +08:00
Weixin Zhou
c75ca4c583 spi: rockchip: Add spi thread priority configuration
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: Ie66572bb129b7221f4c908869a402db3d229e464
2023-08-16 15:23:39 +08:00
Jun Zeng
0bc5a00c65 arm64: dts: rockchip: rk3588-vehicle change the format of car_rk3308_sound to tdm8
Change-Id: I8ac6e5ffdfe8f00b204265acb0b82d40017621e0
Signed-off-by: Jun Zeng <jun.zeng@rock-chips.com>
2023-08-16 14:18:34 +08:00
LiuDiMing Lin
26bfb0dec0 ARM: dts: rockchip: add rv1106g-evb2-v12-wakeup.dts
Change-Id: Iba82df1d5696ba0c232e5d966c1d43ea129e5f19
Signed-off-by: LiuDiMing Lin <fenrir.lin@rock-chips.com>
2023-08-16 14:17:49 +08:00
Cai YiWei
4ce5cb8b0f media: rockchip: isp: add lock to save tb info
multi sensor share same tb info buf, and this buf will
overwrittern when first sensor stream on but second fast_work
schedule slowly. So to save tb info for all dev at first read.

Change-Id: I335b9e3bd317202a348be17965be112a1259bb3e
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-08-15 20:38:54 +08:00
Cai YiWei
3ba7441b0d media: rockchip: isp: remove __isp_config_hdrshd
config store in reg buf, no need to record

Change-Id: I7b789ca514925175daca89528e711d6b61340026
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-08-15 20:38:54 +08:00
Lin Jinhan
c2a9ac0f23 media: i2c: add sc1346 support
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I21f6e1ac11850666fb56960af6ef9d13c5907ba4
2023-08-15 20:33:38 +08:00
Weiwen Chen
9f27599976 ARM: dts: rockchip: disable rv1103g battery ipc dvfs
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I41e968b9b181d2e8890750a858a67c59f2f826c0
2023-08-15 20:19:03 +08:00
Jake Wu
6879d26cf8 arm64: dts: rockchip: rk3588s-evb2-lp5: fix usb2.0-only
Signed-off-by: Jake Wu <jake.wu@rock-chips.com>
Change-Id: I1505f3ab997f4ee815c440b38bb42df8e8c0424f
2023-08-15 20:18:05 +08:00
Yandong Lin
8e8158deff video: rockchip: mpp: fix access null task issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ie5f6b38f4be0276cca6f982205e59428f79650ce
2023-08-15 20:17:29 +08:00
Sugar Zhang
6a8c650aea ASoC: rockchip: pdm: Fix register access in probe
MUST: after pm_runtime_enable step, any register R/W
should be wrapped with pm_runtime_get_sync/put.

Another approach is to enable the regcache true to
avoid access HW registers.

Alternatively, performing the registers R/W before
pm_runtime_enable is also a good option.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ib3d5daecad8491f05a3612a2cb02742ec31e4899
2023-08-15 18:47:20 +08:00
Sugar Zhang
08f416da20 ASoC: rockchip: i2s: Fix register access in probe
MUST: after pm_runtime_enable step, any register R/W
should be wrapped with pm_runtime_get_sync/put.

Another approach is to enable the regcache true to
avoid access HW registers.

Alternatively, performing the registers R/W before
pm_runtime_enable is also a good option.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I9c495361fcb7fb0a06fe1538d05b94617e332756
2023-08-15 18:22:00 +08:00
Shawn Lin
4e6c17be0a PCI: rockchip: dw: fix compliance mode set
Fixes: 02ee7a133e ("PCIe: dw: rockchip: rework compliance test settings")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ibdec2f90616eeb84f26932cdbbb0ac8fde6ca6f0
2023-08-15 18:01:27 +08:00
Jon Lin
72986913fc mtd: spinand: Enable HWP_EN for skyhigh devices
HWP_EN must be enabled first before block unlock region is set.

Change-Id: I6b107d97de48bb2644da865f353d2adace95224e
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-08-15 17:39:33 +08:00
Jon Lin
cb0b9bc78c mtd: spinand: esmt: Support new device F50L2G41KA
Change-Id: I12c40bfdd3fced2543723c03ec1291af6c3c178d
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-08-15 17:38:49 +08:00
Jon Lin
cf0f63fbfc arm64: dts: rockchip: rk3528: Set default value with level2 for spi
Change-Id: I7f14eb9438998660b85f09fb11f7006be420c4e1
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-08-15 17:37:31 +08:00
Lin Jianhua
83cd5cd9b4 ARM: configs: add rk3308bs_aarch32_mipi_display.config for rk3308bs support mipi display
Change-Id: Idf3c935ab1dfbcae4095d0c3e45dfcaeb81e8956
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
2023-08-15 17:37:14 +08:00
XiaoDong Huang
2ae2bc1582 ARM: rockchip: rv1106: sleep: support hpmcu fast wakeup
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: I4a34e33fd267a54c4df0a5b158e28837e3a28051
2023-08-15 16:17:13 +08:00
LiuDiMing Lin
956c9209ad ARM: rockchip: Locate kernel at 0x00208000 for RV1106 when CONFIG_RV1106_HPMCU_FAST_WAKEUP=y
The memory layout for rv1106 hpmcu fast wake up feature:

SPL:       0 ~ 256KB
RTOS:      256KB ~ 512KB
SPL S & H: 512KB ~ (2MB - 8KB)
ATAGS:     (2MB - 8KB) ~ 2MB
KERNEL_R:  (2MB + 0x8000) ~ (8MB - 128KB)
FDT:       (8MB - 128KB) ~ 8MB
META:      8MB ~ (8MB + 384KB)
ISP:       (8MB + 384KB) ~ (8MB + 384KB + ceil(w*10/8/256)*256*h*(buf_num))

Change-Id: I80c2d31d6e2f16d81ed7eb4bd8010df23bb7efc4
Signed-off-by: Fenrir Lin <fenrir.lin@rock-chips.com>
2023-08-15 15:02:22 +08:00
LiuDiMing Lin
4e4541690e ARM: configs: rockchip: add rv1106-wakeup.config
Change-Id: I4ff379589b0a0b99a71a372cf8b74282f6f355a9
Signed-off-by: Fenrir Lin <fenrir.lin@rock-chips.com>
2023-08-15 15:01:58 +08:00
XiaoDong Huang
292bd239a4 ARM: rockchip: support RV1106_HPMCU_FAST_WAKEUP config
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: Id16c8013cf9456cecaa75fbc49b7c7ddd55fb4dd
2023-08-15 15:01:05 +08:00
Damon Ding
9759ccc368 arm64: dts: rockchip: rk3308-evb: add rgb display board
RGB panel FX070-DHM11BOE-A supports RGB666 and RGB888 mode.

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: If0b70fad4587e0c1bb908f3f493bfff809baef8f
2023-08-15 12:05:26 +08:00
Zefa Chen
8bd1123ed7 media: rockchip: vicap fixes crop sync error
while two camera link to a device tree, if the link relationship is switched from one sensor to another,
there may be error messages in crop information

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I6b6aa3efcf8f862b5b1b6e41fb2b4c2fcead2282
2023-08-15 12:04:21 +08:00
Jon Lin
e4bbd1b7a1 mtd: spinand: xtx: Support new device XT26Q04DWSIGA
Change-Id: Icb44af2383585484cd8c4fdc310d8ca4f55166f4
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-08-14 19:13:23 +08:00
Jon Lin
9e520dcc31 mtd: spinand: gigadevcie: Add 3rd flash id for GD5F1GQ5RExxG
Add 3rd flash id for GD5F1GQ5RExxG to make distinguish with
F50L2G41KA.

Change-Id: I54b65bf631ee5584119bc667f1f6b954789f0f8b
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-08-14 14:53:30 +08:00
Jon Lin
2107aa0271 mtd: spinand: xtx: Support new device XT26Q02DWSIGA and XT26Q01DWSIGA
Change-Id: I7e32d54781684d2970ecc85effdd2fc07011a1d7
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-08-14 14:53:30 +08:00
Jon Lin
a8fb036aea mtd: spinand: dosilicon: Support new device DS35Q1GD-IB
Change-Id: I98d7ef0b7b9a9323bbacce243d2ae49ccb9287e7
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-08-14 14:53:30 +08:00
Zefa Chen
684fcdf113 media: i2c: sc530ai change mipi data rate to 936Mbps/lane and vblank up to 6ms
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: If172f3b0036efb1ab437d04f05d80360c464a8ad
2023-08-14 14:39:58 +08:00
Elaine Zhang
7a72bc05dc clk: rockchip: rk3588: fix up the frac pll calculation
rk3588 frac pll:
FFVCO = ((m + k / 65536) * FFIN) / p
FFOUT = ((m + k / 65536) * FFIN) / (p * 2s)
k is the original code, but the K[15:0] is complement code
(6'b1000_0000_0000_0000 <= K[15:0] <= 16'b0111_1111_1111_1111),
need to be converted.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I107d31d910d260c83891d5b6e927f119761d6fba
2023-08-11 18:57:20 +08:00
Jianwei Zheng
d0e6f8a073 phy: rockchip: naneng-combphy: fix U3 RX long cable test failed for RK3528
1.Set slow slew rate control for PI
2.Set CDR phase path with 2x gain

Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
Change-Id: I2d0811b0be7b1d4764ecd738d069b06e4da5eaa2
2023-08-11 18:29:16 +08:00
Sugar Zhang
b59d476403 ASoC: rockchip: i2s-tdm: Fix register access in probe
MUST: after pm_runtime_enable step, any register R/W
should be wrapped with pm_runtime_get_sync/put.

Another approach is to enable the regcache true to
avoid access HW registers.

Alternatively, performing the registers R/W before
pm_runtime_enable is also a good option.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I69dd66230cba636d2ccb31ec01a21be1a482a0e3
2023-08-11 18:18:02 +08:00
Sugar Zhang
f8a6ea7388 ASoC: rockchip: sai: Fix register access in probe
MUST: after pm_runtime_enable step, any register R/W
should be wrapped with pm_runtime_get_sync/put.

Another approach is to enable the regcache true to
avoid access HW registers.

Alternatively, performing the registers R/W before
pm_runtime_enable is also a good option.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ife9b1a0e6f75e714bfb6e7c0d472e4603fa8cd8f
2023-08-11 18:17:10 +08:00