Commit Graph

1073212 Commits

Author SHA1 Message Date
Sugar Zhang
02435edfc3 drm/bridge: synopsys: dw-hdmi-qp: Fix register access fail
This patch wrap register access by lock which guarantee the clk
enabled first. and remove the unused CLK status from CMN.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Iba058ad08c71de0b118913216baec1886d8f3819
2022-12-09 20:31:55 +08:00
Shunhua Lan
d6e8547727 drm/bridge: synopsys: dw-hdmi-qp: report hdmi status in atomic_check if uboot logo enabled
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: Ib211456c71c37faa9f7fd47ea9a2a7a61f76bfef
2022-12-09 17:48:11 +08:00
Hu Kejun
1d88e3036e media: i2c: fp5510: fix set vcm config failed
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I60291814215740e852feae28ce409d3b5335f563
2022-12-09 16:22:54 +08:00
Su Yuefu
a4c5031a0a media: i2c: sc4336 support fastboot
Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
Change-Id: Ia941af0c3319a5ed675024bf0ef06b24ac10dc21
2022-12-09 14:23:39 +08:00
Yu Qiaowei
6be361f257 video/rockchip: rga: fix hardware abort error when pre-scaling
The reserved pre-scale buffer size is modified to the currently supported
maximum output size.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: If2f2a1275466bfd39e9003e24e3cf0a848dccff1
2022-12-08 17:28:47 +08:00
Yu Qiaowei
bbab2e43b6 video/rockchip: rga: remove log printing of unknown ioctl cmd
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: If1f17ecd83c32e1d021f0445b65379a39ea9aec8
2022-12-08 15:43:06 +08:00
Yu Qiaowei
5893da2a48 video/rockchip: rga: enable MMU interrupt
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I8ac1b290bcb3390221e58bf0cef1ea3d7cee9a93
2022-12-08 15:43:01 +08:00
Zefa Chen
9e6e11128c media: i2c: gc2145 fix issue of power off, when probe fail
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ice95c869bee6ab1c8170021e68a0b2ec529f3143
2022-12-08 14:52:47 +08:00
Finley Xiao
edba7a6365 clk: rockchip: rk3128: Fix aclk_peri_src parent
Change-Id: Id679e7235f78635233dc4d6bd59c75ce05dfc99e
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2022-12-08 11:58:19 +08:00
Wyon Bi
7a3c5ebd55 clk: rockchip: rk3128: mark the hclk_vio_h2p as critical clk
Change-Id: Ib4eb985b1c3aacf6e51d593fcf71cd46e1dc0b82
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2022-12-08 11:58:07 +08:00
Finley Xiao
6b9329bb95 clk: rockchip: rk3128: Add sclk_hsadc_tsp
Change-Id: I842869a7ea79730daa6616f1cf2a8f5db7165ceb
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2022-12-08 11:57:54 +08:00
Liang Chen
15eed48777 clk: rockchip: rk3128: fix incorrect configuration
1. The first parent name of sclk_cif_out_src is wrong, it is
"sclk_cif_src".
2. The MUX configuration for sclk_cif_out_src is wrong, it should
be muxdiv_offset=29, mux_shift=2, mux_width=1.

Change-Id: I36a0ec0791afdef398d37ac8b92b7831619fb01b
Signed-off-by: Liang Chen <cl@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2022-12-08 11:57:39 +08:00
Wu Liangqing
914877f7c1 arm64: configs: rockchip_gki: Enable CONFIG_PWRSEQ_SIMPLE
Change-Id: I95a39f35eecc2139e894b8d9b8c1730d674ddf6c
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2022-12-07 18:19:31 +08:00
Tao Huang
a60cc43489 arm64: rockchip_gki.config: Enable CONFIG_CPU_RK3568
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ied70ff781c200aed42cf6ca9f4a33ccb0ab281d5
2022-12-07 18:17:42 +08:00
Jianqun Xu
ebc7e6d848 irqchip/gic-v3: get free page instead of kmalloc for itt
Since kmalloc may not care about GFP_DMA32, change to use get free pages
for itt on its device.

To reduce the impact of this change, we only applied it to rk3566/rk3568.

Change-Id: I2e91c97bd4d61d2542cf437363fc3dd1d9fa669c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2022-12-07 18:15:05 +08:00
Guochun Huang
0b2f07b378 drm/rockchip: dsi: driver may retry bind when panel or bridge not register
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I8687da829e61a170e52c83f8565c2db879fd958a
2022-12-07 18:14:51 +08:00
Huibin Hong
f8080404df soc: rockchip: debug: rockchip_show_interrupts print all cpu
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: I929a9cee5d596a8d9f1280f8232eefc2fecf2f31
2022-12-07 17:37:42 +08:00
Finley Xiao
2438e94364 arm64: dts: rockchip: rk3588s: Add hardware version for rk3588m and rk3588j
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ide13f6d0c8d38c1e46be52c4b407b1147a08ad8a
2022-12-07 17:21:51 +08:00
Finley Xiao
63e89b6e63 driver: rknpu: Implement set_soc_info and set_soc_info for rk3588
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I8cfe13ffded798363388153bfbf305f6fc9f9f33
2022-12-07 17:21:51 +08:00
Finley Xiao
b1bae8a36b MALI: bifrost: Implement set_soc_info and set_soc_info for rk3588
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ic5dddbd667b63b61f60b80270ba8bae8b1086852
2022-12-07 17:21:51 +08:00
Finley Xiao
1e655030ce soc: rockchip: opp_select: Add support to set soc info
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I101ff42d9e175535cfab9b58781c472b00b700e1
2022-12-07 17:21:51 +08:00
Finley Xiao
c25a99d05f cpufreq: rockchip: Add support for rk3588j
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I13d2ffae1253c7e5b3513c6aefcf15fb8e16eb5d
2022-12-07 17:21:51 +08:00
William Wu
ee7c3ab6b5 usb: dwc2: fix waiting time for host only mode
The current code uses 50ms sleep to wait for host only
mode, the delay time is not enough for some Rockchip
platforms (e.g RK3036G EVB1).

Test on RK3036G EVB1, the dwc2 host only controller reg
GOTGCTL.ConIDSts = 1'b1 (device mode) if only wait for
50ms. And the host fails to detect usb2 device with the
following error log:

usb usb2-port1: connect-debounce failed

This patch checks the GOTGCTL.ConIDSts for host only
mode and increases the maximum waiting time to 200ms.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ie28299934aba09907ea08f5fd3b34bf2fb35822e
2022-12-07 16:56:58 +08:00
Elaine Zhang
7a22993077 clk: rockchip: update the frac clk parent
Fixes: cd10522093 ("clk: rockchip: fix up frac clk parent no update")
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I9fd76eb118f925ec4eeb8b928a7acb3ee2b93deb
2022-12-07 15:38:11 +08:00
Herman Chen
1a04192711 video: rockchip: mpp: vepu2: Fix core id limit
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I52268e292c8527bd377da1574a64ff09621d4971
2022-12-07 15:34:01 +08:00
Sandy Huang
1abf5c42d2 drm/rockchip: drv: split pre mapping into two mapping
At 32 bit platform size_t maximum value is 0xffffffff, SZ_4G(0x100000000) will
be cliped to 0, so we split into two mapping.

Fixes: 0da77f77c0 ("drm/rockchip: drv: add support pre mapping for vop iommu")
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I4066b1e20cfb9e29033b72f2035bf5e24a1f1f23
2022-12-07 15:32:27 +08:00
Damon Ding
ffa6d4f255 drm/rockchip: vop: add support for cvbs interface on rk3036
CVBS only support for 480i and 576i display mode. It is
needed for rk3036 to enable scaling when using interlace
mode, which also updated in this commit.

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I1d131ec71c0b31680280353e1690f8c01eb3c94e
2022-12-07 15:22:41 +08:00
Damon Ding
e327d3bb1a drm/rockchip: drv: register rockchip tve driver
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I40cce413d738ad16473eb35ce6c2adf4897380d6
2022-12-07 15:20:14 +08:00
ZhiZhan Chen
c9d18638d6 drm/rockchip: add config options of TVE driver
Change-Id: I059808111bfa96724eb629b6fc37915a4852e234
Signed-off-by: ZhiZhan Chen <zhizhan.chen@rock-chips.com>
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2022-12-07 15:08:12 +08:00
Damon Ding
47855807ea ARM: configs: rockchip_linux_defconfig: enable tve
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I6c1b81809b31873e751207c29feb045fdcfc1a63
2022-12-07 15:08:12 +08:00
Damon Ding
7ffd80939a drm/rockchip: tve: add tve support for rk3036/rk312x/rk322x
The related codes are ported from kernel-3.10. Tve interface
function has been tested on rk3036/rk3128/rk3228.

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I5395bdccd7c645dfd34e9ccf166f3c94086e3134
2022-12-07 15:08:12 +08:00
Damon Ding
657133eb06 ARM: dts: rockchip: rk3036: add tve node
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Ia912356862fc30ad79506dc75c9bc105ca3bba6e
2022-12-07 15:00:36 +08:00
Cai YiWei
25cbf08d91 media: rockchip: isp: fix rockit stream pause if readback mode
Change-Id: I8482c9cd365f34adbb6ded979cd4d58d4b299776
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-12-06 18:44:51 +08:00
Su Yuefu
6564f48d22 media: rockchip: fix vicap captures raw not responding
caused by commit of thunderboot support
be07e90202262ebfe8b008e7ec5b0142ee54a99c

Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
Change-Id: I54c19bd9084a004bb15fc6f9054138f2c81ff059
2022-12-06 18:10:52 +08:00
Zefa Chen
d2293b5e0c media: rockchip: vicap do dma reset before dma capture enable
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I0450794d584bb7918e1c1e21f099ee649e76d736
2022-12-06 18:08:05 +08:00
Jon Lin
79c73e2fb5 arm64: dts: rockchip: rk3588-h0: Set clkreq as gpio property
The clkreq is recommended:
1.Set as gpio property
2.Set as function io with supports-clkreq property enable

Change-Id: Idc72fa9190a3ec51876f3f5dce09d7e7a5201009
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-12-06 14:32:10 +08:00
Kever Yang
cbf3eb9b7f phy: rockchip-snps-pcie3: update fw when init
This fw fix some RX issue:
1. connect detect error;
2. transfer error in ssd huge data write(more than 10GB).

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: If9b8d7fbe4414ae4d28ff6bbd4415d88b582113d
2022-12-06 14:27:00 +08:00
Kever Yang
1b493c5412 Revert "phy: phy-rockchip-snps-pcie3: Update calibration controls for rk356x"
This reverts commit 8e908294a5.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I063f98312f5fa94309fc72c983516f222d0addf7
2022-12-06 14:26:31 +08:00
Cai YiWei
8a3d4599c6 media: rockchip: isp: fix dmatx loss first buf
Change-Id: I7355529f6ff4f39cba7206b3201d434d110bd4a6
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-12-06 11:18:16 +08:00
Yandong Lin
56353bf118 video: rockchip: mpp: fix jpege dma coherence issue
Allocate multiple jpeg enc cores to encode the same frame at the same time,
and than there is a dma cache coherence issue when the user
space copies bitstream data to another buffer.

So, need to invalid cache after every core encoding done.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I0868398f09787cdbd2be6f6a2cd3c1adbe61e4b5
2022-12-06 10:54:29 +08:00
Zefa Chen
9461447888 media: rockchip: vicap fixs toisp ctrl register updata fail
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I1d96ff04ae1b9372476f7d03ad1f015b67862c7d
2022-12-05 20:57:32 +08:00
Guochun Huang
697dac415b drm/rockchip: dsi: compatible for GKI
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I64f7b209a5121ef3f4d4b7b1f27358ec56430e1d
2022-12-05 09:47:57 +00:00
Wu Liangqing
b160d2b44f arm64: dts: rockchip: rk3588-h0: set dp-lane-mux=<0 1 2 3>
Change-Id: I5ada157b4e5cd35feca0dc082f8ea355faeabe14
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2022-12-05 08:04:01 +00:00
William Wu
061c383405 phy: rockchip-naneng-combo: config usb3 port in phy init
Rockchip platforms support to force usb3 to usb2 only
via the property "rockchip,dis-u3otg*-port". With this
property, we can disable the usb3 port and select the
clk utmi for the source clk of usb3 controller.

However, during system PM suspend, the related registers
may lost power, so the usb3 port configurations will
lost. This patch initializes the usb3 port in the usb3
phy init, and it doesn't need to configure the usb3 mode
if the property "rockchip,dis-u3otg*-port" is set.

Change-Id: If82cfb9e3e34dc799db32b2b84f843fce2028df5
Signed-off-by: William Wu <william.wu@rock-chips.com>
2022-12-05 15:34:33 +08:00
Jon Lin
f6989fdac8 pcie: rockchip: dw: Fix the error of repeatedly initializing dma object
Change-Id: I215e38d0b78403fd688a8a9d4afd6c4a7b5460bb
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-12-05 15:30:45 +08:00
Lin Jianhua
35bcabc502 ARM: dts: rk312x: dmc disable 200M freq
DDR Dvfs tress test failed, disable 200M freq to test OK.
so disabled temporary.

Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
Change-Id: I2f41b1f9c8bfbb33b399a49bbc6a730b87ce9b3d
2022-12-05 15:25:03 +08:00
David Wu
00b877ac98 ethernet: arc: Fix the device for dma_map_single/dma_unmap_single
The ndev->dev and pdev->dev aren't the same device, use ndev->dev.parent
which has dma_mask, ndev->dev.parent is just pdev->dev.
Or it would cause the following issue:

[   39.933526] ------------[ cut here ]------------
[   39.938414] WARNING: CPU: 1 PID: 501 at kernel/dma/mapping.c:149 dma_map_page_attrs+0x90/0x1f8

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I18e9b655524d2aba9fbde654c54c0bde9fc32aa7
2022-12-02 20:18:55 +08:00
Wenchao Chen
24ae565a72 UPSTREAM: mmc: hsq: Fix data stomping during mmc recovery
The block device uses multiple queues to access emmc. There will be up to 3
requests in the hsq of the host. The current code will check whether there
is a request doing recovery before entering the queue, but it will not check
whether there is a request when the lock is issued. The request is in recovery
mode. If there is a request in recovery, then a read and write request is
initiated at this time, and the conflict between the request and the recovery
request will cause the data to be trampled.

Signed-off-by: Wenchao Chen <wenchao.chen@unisoc.com>
Fixes: 511ce378e1 ("mmc: Add MMC host software queue support")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220916090506.10662-1-wenchao.chen666@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I879d746f578ba7c6f27029d81c980c743c3215ba
(cherry picked from commit e7afa79a3b)
2022-12-02 18:42:28 +08:00
Finley Xiao
567e355611 arm64: dts: rockchip: rk3588: Add memory read margin for litcore and dsu
It may improve stability.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I8d41ee7348bff9d280b5d22e42d8ad356d2db7eb
2022-12-02 18:42:12 +08:00
Tao Huang
e5e0f7afd8 clk: rockchip: rk3588: allow insmod to succeed if no DT match
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I175e3200a41fd3a81059b90d1d6b77d47ea39913
2022-12-02 18:36:48 +08:00