Commit Graph

1073814 Commits

Author SHA1 Message Date
Jianqun Xu
9b6c6fdc27 rknpu: make rknpu_mem_sync_ioctl to use dma apis
Before this patch, the rknpu mem uses the partial sync ops from dmabuf,
which is not upstream patch. this patch makes the sync ioctl to use dma
apis directly.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Id648f567af86a36459d10e96db2aec2cd4177fce
2023-03-02 18:12:40 +08:00
Wyon Bi
aabe565c15 drm/rockchip: vop2: Fix dual channel setup
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ica99e16464d414535d151b80cbc1fc5cba0c2a1a
2023-03-02 18:11:04 +08:00
Su Yuefu
8d67eb0d2e ARM: configs: rv1106-cvr: add A/D Converter compilation to use AHD sensor
Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
Change-Id: I3ac3dfc10513772e89fd5047f134eb97471cf146
2023-03-02 18:10:48 +08:00
Su Yuefu
322ab30e47 ARM: dts: rockchip: support tp2855 and sc530ai for rv1106-evb-cvr-dual-cam.dtsi
based on rv1106g-evb1-v11-cvr.dts

Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
Change-Id: I5e65e1ff7bc63838fa59cecd0f3c60634fbe8ac3
2023-03-02 16:55:27 +08:00
Jianqun Xu
3c65f6f3c3 video: rockchip: mpp: fix dma buf sync start dma address
Locate the start dma address with the dma address from the first sg and
the offset, since the sg_dma_address for the other sg will return a
invalid mapping address (-1).

Unable to handle kernel paging request at virtual address ffffff8000000000
Mem abort info:
  ESR = 0x96000146
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
Data abort info:
  ISV = 0, ISS = 0x00000146
  CM = 1, WnR = 1
swapper pgtable: 4k pages, 39-bit VAs, pgdp=0000000001caa000
[ffffff8000000000] pgd=000000007fffb003, p4d=000000007fffb003, pud=000000007fffb003, pmd=0000000000000000
Internal error: Oops: 96000146 [#1] PREEMPT SMP
Modules linked in: rk_vcodec [last unloaded: rk_vcodec]
CPU: 0 PID: 2173 Comm: mpp_mjpege_217 Not tainted 5.10.110 #389
Hardware name: Rockchip PX30 mini evb ddr3 board (DT)
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO BTYPE=--)
pc : __clean_dcache_area_poc+0x20/0x38
lr : arch_sync_dma_for_device+0x20/0x2c
sp : ffffffc0136fbb90
x29: ffffffc0136fbb90 x28: 000000000000026f
x27: 0000000000000000 x26: ffffff805fa22c00
x25: 0000000000000000 x24: ffffff8045543800
x23: 0000000000100000 x22: 0000000000000000
x21: 0000000041100000 x20: 000000000000026f
x19: 0000000000000001 x18: ffffffc012139060
x17: 0000000000000000 x16: 00000000000000c0
x15: 0000000000000004 x14: 0000000000003fff
x13: ffffffc011c8c7f0 x12: 0000000000000000
x11: 0000000000000000 x10: 0000000000000001
x9 : 0000000100000000 x8 : 0000000000000000
x7 : 7320302074657366 x6 : ffffffc011e764a0
x5 : ffffffffffffffff x4 : 0000000000000000
x3 : 000000000000003f x2 : 0000000000000040
x1 : ffffff800000026f x0 : ffffff8000000000
Call trace:
 __clean_dcache_area_poc+0x20/0x38
 iommu_dma_sync_single_for_device+0x40/0x54
 dma_sync_single_for_device+0x2c/0xe8
 mpp_dma_buf_sync+0x138/0x184 [rk_vcodec]
 vepu_alloc_task+0x2a0/0x390 [rk_vcodec]
 mpp_process_task_default+0x5c/0x218 [rk_vcodec]
 mpp_dev_ioctl+0x39c/0x5e0 [rk_vcodec]
 __arm64_compat_sys_ioctl+0x104/0x158
 el0_svc_common+0xac/0x1ac
 do_el0_svc_compat+0x1c/0x28
 el0_svc_compat+0x10/0x1c
 el0_sync_compat_handler+0x60/0x8c
 el0_sync_compat+0x164/0x180

Fixes: 3fb2e28edd ("video: rockchip: mpp: change the way to refresh the dma cache")
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I7d9fc844df602e38ee8fa0e303a0e251a58b072a
2023-03-02 16:52:06 +08:00
Tao Huang
b3cfdcd677 Revert "ARM64: defconfig: add the basic config for 3399 ChromeOS"
This reverts commit 5ce147aff1.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I4c868a4bc277d1d4f93556061bb707fd0a0027b6
2023-03-02 15:49:46 +08:00
Su Yuefu
5ac9e8096d media: i2c: support techpoint driver
Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
Change-Id: Ia579416e730ae7da65d614d35997683a3caf1bd7
2023-03-02 15:35:57 +08:00
Simon Xue
fa6dbf5e59 iommu/rockchip: Backport from UPSTREAM linux-5.15
Change-Id: I110dbe10b49d6e61a7e48a0f85864389641526de
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2023-03-02 15:15:01 +08:00
Jason Zhu
205c5a8113 ASoC: codecs: rk_dsm: clean up code
Delete unused definition and modify the error register definition.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I255c17049bc28faf108dbca8ec0337d3ccb11555
2023-03-02 14:51:21 +08:00
Jason Zhu
df50198904 ASoC: codecs: rk_dsm: fix channel disorder
The dsm sound may be channel disorder when play sometimes,
we can reset the rk_dsm to reconfigure the IP and make it
work well.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Iece70267c478c0ec60f685ab85e39ff365b16f4c
2023-03-02 14:51:21 +08:00
Yiqing Zeng
2566a239df ARM: dts: rockchip: add rv1106g-evb1-v11-dual-cam dts
based on rv1106g-evb1-v10-dual-cam.dts

Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: Ib4cced42d19af4af43c13ba95386910a57f24304
2023-03-02 14:46:11 +08:00
Sugar Zhang
24fd898a83 ASoC: rockchip: i2s: Add support for clk compensation
This patch introduces a method to handle clk drift and compensation.

e.g:

/# amixer contents
numid=1,iface=PCM,name='PCM Clk Compensation In PPM'
; type=INTEGER,access=rw------,values=1,min=-1000,max=1000,step=1
: values=0

/# arecord -D hw:0,0 --period-size=1024 --buffer-size=4096 -r
16000 -c 2 -f s16_le /dev/zero &

/# amixer -- cset numid=1 -10
numid=1,iface=PCM,name='PCM Clk Compensation In PPM'
; type=INTEGER,access=rw------,values=1,min=-1000,max=1000,step=1
: values=-10

/# amixer -- cset numid=1 10
numid=1,iface=PCM,name='PCM Clk Compensation In PPM'
; type=INTEGER,access=rw------,values=1,min=-1000,max=1000,step=1
: values=10

Change-Id: I6be8d7275ccf985f43ebc2980ce284c83504ddbc
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2023-03-02 10:04:58 +08:00
Yu Qiaowei
d1e360f3b0 video: rockchip: rga3: fix timeout not returning error code
Update driver version to 1.2.25

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I718ccbbe3512de3194b5a5b4da549971b3999d14
2023-03-02 09:34:37 +08:00
Yu Qiaowei
bfcf44d74a video: rockchip: rga3: clean timeout job before matching scheduler
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I3f476ac2b519953a290587bb7399c68153a5bae3
2023-03-02 09:34:37 +08:00
Yu Qiaowei
7f9bf911cd video: rockchip: rga3: fix abort when virt_addr is free
Physically contiguous virt_addr needs to add the offset of the first
page when obtaining the phys_addr.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I8076ad2aac31ad61d8a5e0d4332fe69f702d2adb
2023-03-02 09:34:37 +08:00
Yu Qiaowei
2c2f6687dc video: rockchip: rga3: improve the resolution limitation of VSP
When the horizontal input exceeds 2k (here refers to 1996), need to switch
from BI-cubic to BI-linear. When there is an HSD(horizontal scale down),
need to check the horizontal input after the HSD.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I3e4ceeb0e85811ccb131c22fe77ebaa571b8a922
2023-03-02 09:34:37 +08:00
Yu Qiaowei
e16186b552 video: rockchip: rga3: fix the exception of acquire fence
Modify recognition that acquire_fence has been signaled

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Id7d9ba288dae05b8c50ebb2090e3aa7ae8b61671
2023-03-02 09:34:37 +08:00
Elaine Zhang
28822b16c6 thermal: rockchip: The temperature ranges from -60 to 180°C
-40 to 125°C reliable, outside the range existed unreliability.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I7f24809bd7a4aa89a7fa12763081258468281fee
2023-03-02 09:32:24 +08:00
Jianwei Zheng
b80051be40 phy: rockchip: inno-usb2: change HS disconnect detect mode for RV1106
This patch set HS disconnect detect mode to single ended detect mode
for RV1106, fix RV1106 can not recognize device plug out sometimes.

Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
Change-Id: I6ee6ded4cc12032cf2825eadd207c1e5003957cd
2023-03-01 17:29:16 +08:00
Yiqing Zeng
f368f6b087 ARM: rv1106-evb.config: enable CONFIG_VIDEO_GC2053
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I67865797e830f991b37b30b7bc9eb974cf9ec3db
2023-03-01 16:56:59 +08:00
Yiqing Zeng
f1238c6c04 ARM: dts: rockchip: support dual gc2053 for rv1106-evb-dual-cam.dtsi
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: If236dcd35e77583ca106f788f627d5d9279d4d4d
2023-03-01 16:53:53 +08:00
Damon Ding
7a06461290 drm/rockchip: vop2: remove the version check in core_dclk_div setting
Fixes: f8882d308d94("drm/rockchip: vop2: fix the core_dclk_div_sel setting")
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I46b402035e8ab3cb76a1adea0c2393a17e633e5a
2023-03-01 16:52:54 +08:00
Caesar Wang
c55b5512e8 arm64: dts: rockchip: add rk3562-iotest-lp3-v10-linux.dts
Change-Id: I784aa391ca03b9d511919daa1b601a2564b94f1a
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2023-03-01 16:51:48 +08:00
Jon Lin
584f0eb12b arm64: dts: rockchip: rk3528: Assign spi sclk_in
Assign spi0 and spi1 sclk_in

Change-Id: If7337ddaaaa964854122794367d8be8b86c58fb1
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-03-01 16:31:04 +08:00
Jon Lin
3301cd7413 arm64: dts: rockchip: rk3562: Assign spi sclk_in
Assign spi0 and spi1 sclk_in.

Change-Id: I582b27fff7a5ec6da6ad7ef5fee18bbe8fbedb1b
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-03-01 16:31:04 +08:00
ZiHan Huang
47d70443c2 ARM: rockchip_linux_defconfig: enable CONFIG_SND_SOC_ROCKCHIP_SAI=y
Change-Id: I61f8ca7ffb98774a5c8256765f73ba95c2f8478f
Signed-off-by: ZiHan Huang <zack.huang@rock-chips.com>
2023-03-01 16:24:32 +08:00
Jason Zhu
9ec9e12850 ASoC: rk_codec_digital: fix register definition error
Fixes: 5d33c809c3 ("ASoC: codecs: Add support for rockchip codec digital interface")
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I867538d4aef82120b9cefa2cf833ccfe43f11596
2023-03-01 16:24:15 +08:00
Zefa Chen
dba7790c26 media: rockchip: vicap fixes pclk polarity for rv1106
Fixes: 74aca7167d ("media: rockchip: rv1106 vicap support dvp")
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I521d0f56061486f7db4ebe283382aa69c4f2d5e3
2023-03-01 16:19:25 +08:00
Sugar Zhang
309faf4a9c ASoC: rockchip: i2s: Fix FIFO clear error on SLAVE mode
Workaround for FIFO clear on SLAVE mode:

A Suggest to do reset hclk domain and then do mclk
  domain, especially for SLAVE mode without CLK in.
  at last, recovery regmap config.

B Suggest to switch to MASTER, and then do FIFO clr,
  at last, bring back to SLAVE.

Now we choose plan B here.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I1884659df7fa9052477652b7b0315da21e3165c2
2023-03-01 16:01:29 +08:00
Sugar Zhang
3d084c2144 ASoC: rockchip: i2s: Simplify FIFO clear routine
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I4ecfe4978d7646a99b205772515ae1c4f2d4607f
2023-03-01 16:01:29 +08:00
Sugar Zhang
c003b7fd8a ASoC: rockchip: i2s-tdm: Fix FIFO Clear failed on SLAVE mode sometimes
The previous idea about FIFO clear on SLAVE mode is:

1, Switch to MASTER mode
2, Do FIFO clear
3, Switch to SLAVE mode

But, there is a risk that drivers don't set mclk on SLAVE mode,
the mclk from PLL maybe a very high freq (higher than controllers'
signoff freq) that make controller work unexpected.

This patch allow set mclk freq for MASTER / SLAVE mode to fix it.
and, of course, there is no side effect.

This patch also simplify the clear routine by merging clear step 1/2
into a single one.

Fixes: 0a0a0b7606 ("ASoC: rockchip: i2s-tdm: Fix FIFO clear error on SLAVE mode")

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I8488b039e1e21a632bfd2a1c48c86b343fded17a
2023-03-01 16:01:29 +08:00
Zefa Chen
fce76cf947 media: rockchip: vicap support rockit
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I4748ecdf0909c8af71a311f43022b796c531d5be
2023-02-28 21:18:16 +08:00
Zefa Chen
89611a83d2 include: rockchip: rockchip_rockit.h support vicap
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I5551e4af4ad2396f5cec470e59cc8e464ff84a56
2023-02-28 21:15:07 +08:00
Yifeng Zhao
605b9e4765 arm64: dts: rockchip: enable emmc power off notify for rk3588s-evb
The emmc power is turned off after it is suspended. The drivers
need to enable the power off notification, otherwise the emmc
initialization will take a long time during wake-up.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: Iea233d378c0a7f313ebc39228b4e109cbb4a4f83
2023-02-28 17:31:11 +08:00
Yifeng Zhao
1e3334adf1 arm64: dts: rockchip: enable emmc power off notify for rk3588-evb
The emmc power is turned off after it is suspended. The drivers
need to enable the power off notification, otherwise the emmc
initialization will take a long time during wake-up.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I52ed6ecd3c5bb8eacf2b918a7b091e83db026594
2023-02-28 17:31:11 +08:00
Yifeng Zhao
069d2d95b4 arm64: dts: rockchip: enable emmc power off notify for rk3568-evb
The emmc power is turned off after it is suspended. The drivers
need to enable the power off notification, otherwise the emmc
initialization will take a long time during wake-up.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: Ifbcfdc0b7821c85cc20d7a88c86c29b5343d7259
2023-02-28 17:31:11 +08:00
Yifeng Zhao
da17fb1daf arm64: dts: rockchip: enable emmc power off notify for rk3562-evb
The emmc power is turned off after it is suspended. The drivers
need to enable the power off notification, otherwise the emmc
initialization will take a long time during wake-up.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I47d61aa0b3d310c3c5718e35dc4432111103ec19
2023-02-28 17:31:11 +08:00
Zhang Yubing
7af4de4666 drm/rockchip: dw-dp: avoid null pointer issue
Fixes: 7d048d6dac ("drm/rockchip: dw-dp: Add HDCP function support")
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I29b4b7b118cfdde9e6b3a99dfc0f1c0c8103d6cc
2023-02-28 17:16:22 +08:00
Yiqing Zeng
9a3e2b4d71 media: i2c: gc2053 support slave mode
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: Ia851a9de5443c835be9c1c2b1d89625062742682
2023-02-28 14:35:55 +08:00
Jianwei Fan
ee38b2089a media: i2c: gc2093: set gpios output mode when use gpios
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I7f91264f7202393a9041721f221c0a098cc79624
2023-02-28 14:34:51 +08:00
Jianwei Fan
1296e0f778 media: i2c: ov16a1q: add ov16a1q camera sensor
Change-Id: I9a19655697f231dedff577c1572e5663aa7bfc0d
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2023-02-28 14:34:34 +08:00
Finley Xiao
6444f91bf9 arm64: dts: rockchip: rk3562: Remove clocks for pd gpu
As the clk_matrix_200m_src is critical clock.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I1efb315dd00de2aa4f4067a84f04f9370c91d915
2023-02-28 14:32:24 +08:00
Finley Xiao
7b957a4593 clk: rockchip: rk3562: Make 100m 200m and 300m src as critical clk
The ATF may use these clocks.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ie31f6b368aa467a989cd534c1795bb781ddd9998
2023-02-28 14:31:34 +08:00
Finley Xiao
2c323bbc97 clk: rockchip: rk3562: make the hpll as parent just for audio
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I15a17655ba30abc79a31b7eb68b5630b7c7e6054
2023-02-28 14:31:34 +08:00
Finley Xiao
d4fcb0f9a4 arm64: dts: rockchip: rk3562: Change dclk vop1 parent to apll
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I883e0523495431c686d45ff645dc8bfd89788a13
2023-02-28 14:28:03 +08:00
Finley Xiao
7efdc461ea clk: rockchip: rk3562: change parent for aclk core and pclk dbg
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Iab8ef712d0f263897e212b4ad3c3a3b0e504a2d3
2023-02-28 11:10:08 +08:00
Finley Xiao
d731e092fe clk: rockchip: rk3562: make the apll as parent just for dclk vop1
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I9961d3cd865abc3a9589d4b28c698f2b829ae941
2023-02-28 11:10:08 +08:00
Jianqun Xu
20153d54d3 dma-buf: support partial sync under CONFIG_DMABUF_PARTIAL
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I1bf92c9bea5ae9506adb636f5d645bea434ade7c
2023-02-28 10:34:41 +08:00
Binyuan Lan
31c11a2896 arm64: dts: rockchip: Add peripheral dts node for RK3562 test1
Change-Id: I307dbab8cb296474d80eac02ce54bb0931224a87
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2023-02-28 10:25:02 +08:00
Frank Wang
99321070f1 usb: typec: tcpm: fusb302: fix pd rx packet loss
This amends the following points:
 - pull all RX messages from FIFO to TCPM while packet received and
   GoodCRC sent.
 - for TX success alert, just complete the tx status and GoodCRC will
   be read out at RX process (GCRCSENT alert).

The above changes can fix the Source Caps packets may loss in PD
renegotiate stage probably.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I0422449842fd24e42e398a38446dc00477c7acce
2023-02-28 10:04:50 +08:00