Commit Graph

1073299 Commits

Author SHA1 Message Date
William Wu
6cbb4c5088 ARM: dts: rockchip: rv1126: disable usb2 lpm for xhci
The xHCI specification 1.1 does not require xHCI-compliant
controllers to always enable hardware USB2 LPM. However,
the current xHCI driver always enable it when seeing HLC=1.

On rv1106 platforms, the xHCI USB2 LPM is enabled by default.
And we found that a lot of USB Disks have USB2 HW LPM broken
issue when connected to rv1106 USB2 OTG interface.

Here are a part of special USB Disks with USB2 HW LPM broken:

1. idVendor=325d, idProduct=6410, Manufacturer: aigo
2. idVendor=21c4, idProduct=0cd1, Manufacturer: Lexar
3. idVendor=0951, idProduct=1666, Manufacturer: Kingston

When use dd command to write to these USB Disks, it may fail
with the following log:

[ 2844.700148] usb 7-1: reset high-speed USB device number 4 using xhci-hcd
[ 2889.072272] usb 7-1: reset high-speed USB device number 4 using xhci-hcd
[ 2921.498045] usb 7-1: reset high-speed USB device number 4 using xhci-hcd
......
[ 2953.923773] usb 7-1: reset high-speed USB device number 4 using xhci-hcd

Theoretically, we can add USB_QUIRK_NO_LPM individually for
these special USB Disks, however, it's difficult to cover all
USB Disks. So it's better to disable the USB2 LPM for xHCI
on rv1126 platforms.

Change-Id: Ideafe2ecf91fe3013825a064631509eecdad0254
Signed-off-by: William Wu <william.wu@rock-chips.com>
2022-12-23 15:23:04 +08:00
Cai YiWei
1b33d33635 media: rockchip: isp: add mosaic block size for cmsk
Change-Id: Ic5696540c569a287b7c3c1f6c32edbeeeaa1f757
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-12-23 15:10:04 +08:00
Cai YiWei
0d9882e6af media: rockchip: isp: 400ms timeout for rtt complete
Change-Id: I4099d84503e374bf34c358af229dc44cb696de83
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-12-23 15:10:04 +08:00
Finley Xiao
70f62fd169 MALI: mali400: Add support to use scmi clock
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I19f19c3091efcbb9ddd9290d37812bd3a8601076
2022-12-22 11:19:51 +08:00
Sandy Huang
c17d632595 arm64: dts: rockchip: add core dtsi for RK3528 Soc
RK3528 is a Soc from Rockchip, which embedded with quad
ARM Cortex-A53.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Signed-off-by: Shaohan Yao <shaohan.yao@rock-chips.com>
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Simon Xue <xxm@rock-chips.com>
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Zou Dengming <marsow.zou@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I36f95b30b27591a060f48b66a303ffe1177a1d8e
2022-12-22 11:19:10 +08:00
ZiHan Huang
690c6bbe2b arm64: configs: add rk3588_ipc_linux.config
Usage:
make ARCH=arm64 rockchip_linux_defconfig rk3588_ipc_linux.config

Signed-off-by: ZiHan Huang <zack.huang@rock-chips.com>
Change-Id: I886c0e3b3d6f09b9b65f0a16bd99beebed01b575
2022-12-22 11:14:33 +08:00
Liang Chen
e0d6e449eb PM / devfreq: rockchip_dmc: dump current opp state when panic for ddr
panic log:
rockchip-dmc dmc: cur_freq: 528000000 Hz, volt_vdd: 675000 uV, volt_mem: 700000 uV

Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: Iad0ef4c72f9761e23f68098d1e9ad03dec4d84a1
2022-12-22 10:58:08 +08:00
Liang Chen
2f39a52b83 cpufreq: rockchip: dump current opp state when panic for cpu
panic log:
cpu cpu6: cur_freq: 1008000000 Hz, volt_vdd: 675000 uV, volt_mem: 675000 uV
cpu cpu4: cur_freq: 408000000 Hz, volt_vdd: 675000 uV, volt_mem: 675000 uV
cpu cpu0: cur_freq: 816000000 Hz, volt_vdd: 675000 uV, volt_mem: 675000 uV

Change-Id: I7d58b8b287d002db21a68448c65d14a2bd44f063
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-12-22 10:56:21 +08:00
Liang Chen
0140962993 Revert "soc: rockchip: opp_select: dump current opp state when panic for cpu/ddr"
clk_get_rate()/regulator_get_voltage() maybe not useable when panic.

This reverts commit bc2d913a39.

Change-Id: I127a24cb596e459f9f608a5e2847b41530062758
2022-12-22 10:55:04 +08:00
Yifeng Zhao
69325a369b mmc: sdhci-of-dwcmshc: support for rk3528
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I1e4aee345839d02442494d0592410ee4245c4828
2022-12-21 20:00:52 +08:00
Damon Ding
4209529be5 dt-bindings: display: add rockchip tve dclk upsample mode macro
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Ie887ab493f2a9c07d1552e3f400ba9ed55217029
2022-12-21 19:54:53 +08:00
XiaoDong Huang
543eefb739 soc: rockchip: support rk3528 pm config
Change-Id: If69922b071970bbefb3c0589a6dfc5b4d92fe054
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2022-12-21 19:53:29 +08:00
XiaoDong Huang
9b678fbbbc dt-bindings: suspend: rk3528: add sleep mode config defines
Change-Id: I8b27dd9cf181e935fc0c1c6d90ef47bbf55ffc2f
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2022-12-21 19:52:21 +08:00
Finley Xiao
2ed777fcd0 soc: rockchip: power-domain: add power domain support for rk3528
This driver is modified to support RK3528 SoCs.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: If024916eb7b52ec86ff7533aedefc1bda457b612
2022-12-21 19:47:37 +08:00
Finley Xiao
d486f0e97d dt/bindings: power: add RK3528 SoCs header for idle-request
According to a description from TRM, add all the idle request.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I3c58c73a61bf88d91930f9f3464207f820965b94
2022-12-21 19:45:33 +08:00
Sandy Huang
549386c823 soc: rockchip: cpuinfo: Add support for rk3528
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I0c2ba1875faa224afd60065f7a17b4d247ac0ab0
2022-12-21 19:45:00 +08:00
Joseph Chen
16f512f1e1 clk: rockchip: Add clock controller for the RK3528
Add the clock tree definition for the new RK3528 SoC.

gmac1 clocks are all controlled by GRF, but CRU helps to abstract
these two clocks for gmac1 since the clock source is from CRU.

The io-in clocks are module phy output clock, gating child
clocks by disabling phy output but not CRU gate.

Add gmac0 clocks.
They are all orphans if clk_gmac0_io_i is not registered by
GMAC driver. But it's fine that GMAC driver only get it but
not to set/get rate.

Add CLK_SET_RATE_PARENT for mclk_sai_i2s0/1.
Allowed to change parent rate.

Add CLK_SET_RATE_NO_REPARENT for dclk_vop0.
dclk_vop0 is often used for HDMI, it prefers parent clock from
clk_hdmiphy_pixel_io for better clock quality and any rate.
It assigns clk_hdmiphy_pixel_io as parent in dts and hope not to
change parent any more.

Add CLK_SET_RATE_PARENT for aclk_gpu.
Allow aclk_gpu and aclk_gpu_mali to change parent rate.

Add CLK_SET_RATE_PARENT for aclk_rkvdec_pvtmux_root.
Allow aclk_rkvdec_pvtmux_root and aclk_rkvdec to change parent rate.

set aclk_m_core = core_clk/2.
aclk_m_core signoff is 550M, but we set div=2 for better
performance.

Add CLK_IS_CRITICAL for clk_32k.
Mainly for pvtpll during reboot stage.

Add CLK_IS_CRITICAL for all IOC clocks.
IOC doesn't share clock with GRF. The iomux can't be changed if they
are disabled.

Disable aclk_{vpu,vpu_l,vo}_root rate change
They are all shared by multiple modules, disable rate change
by modules.

Don't register clk_uart_jtag
It's for force jtag uart delay counter. It must be open
for box product without tf card but with uart0.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I09745b6a31484d6a27f04e608268d9738c1fe224
2022-12-21 19:21:22 +08:00
Joseph Chen
7a7e67d633 clk: rockchip: add dt-binding header for rk3528
Add the dt-bindings header for the rk3528, that gets shared between
the clock controller and the clock references in the dts.
Add softreset ID for rk3528.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I465f0a3c7fc36eee4c2ab0de38a810b8e691d41e
2022-12-21 19:05:45 +08:00
Joseph Chen
a1a02755f2 clk: rockchip: pll: Add ROCKCHIP_PLL_FIXED_MODE for pll_rk3036/rk3328 type
PLL can be normal mode only.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I331e107b561047aa6b46a6c2f7df539a77a6da2d
2022-12-21 19:00:45 +08:00
Steven Liu
ee5af82a6f pinctrl: rockchip: add rk3528 support
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I2c1d32907168caf8a8afee6d1f742795b3d13536
2022-12-21 18:54:03 +08:00
Cai YiWei
7eb478dd39 media: rockchip: isp: fix 3a to ddr iommu err for isp30 two readback mode
Change-Id: I7b8911930cae4fce99b9f36fbf0d807bb55e5c07
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-12-21 11:34:26 +08:00
Huicong Xu
0a5d5e6024 dt-bindings: display: rockchip: inno_hdmi: add rk3128 hdmi support
Signed-off-by: Huicong Xu <xhc@rock-chips.com>
Change-Id: Id3907605ab607a784004912c12fc333c2f4391f4
2022-12-21 10:11:00 +08:00
Huicong Xu
c2322ff698 drm/rockchip: inno_hdmi: add rk3128 hdmi support
Change-Id: I929880020f4a72e61d21b7af4d73a98da337b10b
Signed-off-by: Huicong Xu <xhc@rock-chips.com>
2022-12-21 10:10:06 +08:00
Shawn Lin
370364aed7 PCI: rockchip: Activate power domain
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I95215bbe8152c1c97eac920272b2551e1a3e2e34
2022-12-21 10:02:12 +08:00
Shawn Lin
823a0bdfec arm64: dts: rockchip: Add power domain for RK3399 PCIe node
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I1a712e7b81bca6302ca83510bedf715f0d282c92
2022-12-21 09:49:35 +08:00
Sandy Huang
01d5ef7d1e drm/rockchip: vop2: clk init is only used at rk3588
clk init is only used at rk3588 but rk3528 version is bigger
then rk3588

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I0730242f223b6ab3b48765c13fe4ff1ab2803570
2022-12-21 09:47:46 +08:00
Elaine Zhang
053d015d34 arm64: dts: rockchip: rk3588s: set spdif2\5 to 12M by default
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I49eda13a3122e25eae362c943a2e1973ac1babf8
2022-12-20 18:05:11 +08:00
Elaine Zhang
f260c6e910 Revert "clk: rockchip: update the frac clk parent"
This reverts commit 7a22993077.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I7e300cd51e7390ad63f7d3215983000be940491c
2022-12-20 18:05:06 +08:00
Zefa Chen
4bd12e6711 media: rockchip: vicap fix error state about get clk/rst
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I4e19314f273f9d7077d9067c32d13c030b95dffc
2022-12-20 18:04:18 +08:00
Cai YiWei
62c5f6364d media: rockchip: isp: fix iommu err for stream stop
Change-Id: Ib7f02300b466e2217a88041031cf11d292337312
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-12-20 18:00:19 +08:00
Cai YiWei
937782ee49 media: rockchip: isp: no support rgb8888 for isp30
Change-Id: Icf3849d9919aad9eaca590936c14734c3dd795f4
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-12-20 18:00:19 +08:00
Elaine Zhang
307b3adba4 clk: rockchip: add branch_gate_no_set_rate
Add branch_gate_no_set_rate for gate clks not
allowed to support setting rate.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ic940acbc035804a011e59b8e1a0d440168e18c26
2022-12-20 16:35:46 +08:00
Wu Liangqing
1134192ff2 arm64: dts: rockhip: rk3588-h0: disabled leds
Change-Id: I300b9ab34946ea3cddd0d994ac0b9afc1edc525d
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2022-12-20 09:56:18 +08:00
Cai YiWei
78b5218880 media: rockchip: isp: merge dual dhaz config chang to user for unite mode
Change-Id: If90e930f55e7dc3fccd06f4e37609a7ef0dfcdf4
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-12-19 16:51:16 +08:00
Cai YiWei
05374081e5 media: rockchip: isp: fix lsc table read by isp for multi sensor
Change-Id: Ic04c7521ee17806d74732aa852e9347411f92281
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-12-19 16:51:16 +08:00
Cai YiWei
fb022c61ad media: rockchip: isp: fix mulit isp x3 mode
Change-Id: I2b8adb5f2e11772b72e2ab5e66c97fb16d820a43
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-12-19 16:51:16 +08:00
Cai YiWei
96343bece8 media: rockchip: isp: sync stop to dmarx for isp stop
Change-Id: Iec5ebdb3e764f48fabcc9503941c46a0aff59951
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-12-19 16:51:16 +08:00
Cai YiWei
410d81458c media: rockchip: isp: isp30 3a to ddr for readback mode
Change-Id: Idf3e67aa2921e1578d1983628590c3aa29142b17
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-12-19 16:51:16 +08:00
Cai YiWei
3800ed1278 media: rockchip: isp: api to force enum multi isp resolution
Change-Id: Idcbbdc3d4324fc7b1dd3c27eab3a1cab6e25f1bb
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-12-19 16:51:16 +08:00
Cai YiWei
d22aff3bfa media: rockchip: remove cif/isp/ispp hw SYSTEM_SLEEP_PM_OPS
fix suspend error by vir dev and hw dev run SYSTEM_SLEEP_PM_OPS

Change-Id: I10971c3f43debf082278cf13aacf68eb97d2f0c3
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-12-19 16:51:16 +08:00
Liang Chen
312e48609f arm64: dts: rockchip: rk3568: adjust opp-table for venc/bus-npu
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I3d888fb6cbb48f3a02722d412c98bc7d5f29502a
2022-12-19 15:11:40 +08:00
Yu Qiaowei
e4811169f5 video: rockchip: rga3: add RGA3 limit on offset
Requires x_offset + act_width < max_act_width, y_offset + act_height < max_act_height on RGA3.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I332d8f6c804f1228c0aa7b24c7f0f2dc3e42c1d9
2022-12-19 15:04:25 +08:00
Su Yuefu
88d85896c3 media: i2c: add sc2336 sensor driver
Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
Change-Id: Ifc5a2353624f4acea6e4faa06ff160203e0fdb2c
2022-12-19 15:03:53 +08:00
Su Yuefu
cff4b2f03a media: i2c: sc301iot fixs brightness change
1、Fixes brightness is increasing to a stable value when
   sensor’s exp reg is fixed value
2、Fixes cross stripe in the first 15 frame

this patch will delay 3ms before frame start

Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
Change-Id: I40ea052ae9e4677b5dc0451ce683f5445feeeed5
2022-12-19 14:38:41 +08:00
Su Yuefu
e7b2f688ba media: i2c: sc301iot support for fastboot
Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
Change-Id: I242fa36afb685b97cb66cbb47996388eeb2d5727
2022-12-19 14:38:41 +08:00
Sugar Zhang
d49058266c arm64: dts: rockchip: rk3588: Workaround for DTS-HD Bitstream on Denon
BACKGROUND:
DTS-HD Bitstream sounds noise occasionally on Denon-AVR-X2700H,
and we found this happen sometime on PLL(frac mode), But it's gone
on PLL(int mode).

This patch Assign parent of I2S5/6 which used for HDMI0/1 to GPLL
to fix DTS-HD Bitstream noise occasionally on Denon-AVR-X2700H.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I071409278ab983af3c32e7b282de1e2819bb706b
2022-12-19 14:33:27 +08:00
Sugar Zhang
932e81825b clk: rockchip: rk3588: Workaround for DTS-HD Bitstream on Denon
BACKGROUND:
DTS-HD Bitstream sounds noise occasionally on Denon-AVR-X2700H,
and we found this happen sometime on PLL(frac mode), But it's gone
on PLL(int mode).

This patch Adds "CLK_SET_RATE_NO_REPARENT" for I2S5/6 which used
for HDMI0/1 to make its parent fixed from GPLL(int mode) to fix
DTS-HD Bitstream noise occasionally on Denon-AVR-X2700H.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I5694c0a7839df817fd32b82ce69450f0eebdcf77
2022-12-19 14:33:16 +08:00
Andy Yan
09d66b0809 arm64: dts: rockchip: rk3588-evb1: Enable hdmi logo
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I0709a3d963df792ddefe4524cf2d044d7cdef2d7
2022-12-19 14:21:33 +08:00
Dexiong Zhang
6e46655407 ARM: dts: rockchip: rv1103g-battery-ipc-v11: pwm11 use pwm11m1_pins
Signed-off-by: Dexiong Zhang <dexiong.zhang@rock-chips.com>
Change-Id: I5a937ed99a98fd03be79405a95739690a1b04f1c
2022-12-19 14:16:51 +08:00
William Wu
15b317ff84 usb: dwc2: gadget: Disable nak interrupt when get first isoc in token
The dwc2 driver use the nak interrupt for the starting point
of isoc-in transfer. The first nak interrupt for isoc-in means
that in token has arrived and the dwc2 driver can obtain the
(micro) frame of the token to set the even/odd (micro) frame
field of DIEPCTL.

However, on some platforms (e.g Rockchip rk3308) which don't
support the "OTG_MULTI_PROC_INTRPT", it means that all device
endpoints share the same nak mask and interrupt. If the nak
interrupt is always enabled, it may trigger nak interrupt storm
by other endpoints except the isoc-in endpoint. So we disable
the nak interrupt when get first isoc in token if the feature
"OTG_MULTI_PROC_INTRPT" isn't enabled.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I99c71a5e0d7903346fd8f71619b6736c3181c0ec
2022-12-19 09:37:39 +08:00