Commit Graph

1072294 Commits

Author SHA1 Message Date
Jason Zhang
c33ad29a3e iio: light: ucs12cm0: fix IRQ setup
Use irq trigger flags to setup interrupt, support interrupt level
low and falling edge.

Signed-off-by: Jason Zhang <jason.zhang@rock-chips.com>
Change-Id: I463eda0e7c405a7f0bfb170ed50a889ee1fe2ed4
2022-08-16 10:43:40 +08:00
Ziyuan Xu
4a15a42ac2 soc: rockchip: Add rockchip thunder boot service driver
It's used for the other processor to signal ARM via mailbox, that's
means the other processor is EOL.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I38ee434ec8ee1bb0841fd0c178f24192f6d74bdf
2022-08-16 10:11:16 +08:00
Ziyuan Xu
daf43701e9 mailbox: rockchip: initcall early when CONFIG_ROCKCHIP_THUNDER_BOOT=y
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I8401351fa059eec3473070347b3480e214ff10ee
2022-08-15 19:58:54 +08:00
Sandy Huang
0da77f77c0 drm/rockchip: drv: add support pre mapping for vop iommu
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I24f292f58859ed89a7557322dc9cd15ea4930eee
2022-08-15 17:51:07 +08:00
Simon Xue
c3db24d09b iommu/rockchip: support reupdate page that already mapped
1. pre-map all 4G range to a reserve page with "IOMMU_PRIV"

2. iommu_unmap will remap to the reserve page

Change-Id: Id019dfc720b00abac1572245fd523fed4e40361d
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2022-08-15 16:45:36 +08:00
Finley Xiao
bff8c7fa3b soc: rockchip: opp_select: Support multiple regulator for opp table calibration
1. Add support for devices with devfreq feature.
2. If use dev_pm_opp_set_rate(), it will fail to set clk rate
when only one opp in the latest kernel.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I935cca49caec1a0658c6aec8d64e04ea65260ce9
2022-08-15 15:40:26 +08:00
Finley Xiao
5b350c02e8 cpufreq: rockchip: Change read margin according to initial voltage
The default read margin is 4, it may not match the initial voltage.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I24c2ee3141f2259c83f2a5219c579115dff4d260
2022-08-15 15:40:26 +08:00
Finley Xiao
120cd00e08 soc: rockchip: opp_select: Change read margin according to initial voltage
The default read margin is 4, it may not match the initial voltage.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I9be7a75a34b3b460c3253be9a2a1860c0778fa08
2022-08-15 15:40:26 +08:00
Yandong Lin
a9a156162d video: rockchip: mpp: fix vepu2 reset crash issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I6531009438fb40ed30d0198be49dfc68ad71c286
2022-08-15 15:28:50 +08:00
Jon Lin
21dbd7a7f5 drivers: rkflash: Update to SFTL version: 5.0.58 20220814
1.Check the data in second page
2.Fix V7-T:
undefined reference to `__stack_chk_guard' .. undefined reference to `__stack_chk_fail'

Change-Id: Ie494a6c0898fdc58601c4db925afbc5ba1a7e09e
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-08-15 14:48:35 +08:00
Luo Wei
5b8a34c35d arm64: dts: rockchip: rk3588-vehicle-evb: dsi1 change to use 1920x720 resolution
Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: Ib3373c715c87647a94326e96c85161ec0860c5d4
2022-08-15 11:13:11 +08:00
Su Yuefu
685eb49e76 media: i2c: sc3338 fix gain table error
Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
Change-Id: Ibe35b1c74224723cf2be128ca45eeab12c6f05a9
2022-08-15 11:08:52 +08:00
Shawn Lin
356dbfbc92 PCI: rockchip: dw: Add RASDES common event signal status dump
It's useful for PM debug sometimes.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I9ebcd59eddaadff9dc259693dad7ddfecb9609b8
2022-08-15 11:07:54 +08:00
Yandong Lin
ed6e7edce9 video: rockchip: mpp: fix enc err using rcb buf on dule core
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I74a34b4b9a12c051b833a7c3f8fe86dbfa9fead2
2022-08-13 09:42:36 +08:00
Jianwei Zheng
75572d37b6 phy: rockchip-inno-usb2: fix dwc2 init failed due to core soft reset
timeout

Dwc2 controller will call phy init function during probe, Current code
will schedule otg_sm_work immediately after phy init, if we don't plug
in usb cable at this time, phy will power off soon after, this will
cause dwc2 do core soft reset failed.

To resolve this problem, We use typec_vbus_det property to distinguish
whether otg_sm_work needs to be executed immediately, If not needed,
delay 1 second.

Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
Change-Id: I191c8f2b83673e8712afea1d642224ae1ae2eb97
2022-08-12 18:42:34 +08:00
Jieyao Hu
cad6488ba3 ARM: dts: rockchip: rv1106g-evb2-v10: add reserved memory for isp and meta
Change-Id: Ie847c6295743b5436b721413300dc113d4dc207b
Signed-off-by: Jieyao Hu <toxicant.bane@rock-chips.com>
2022-08-12 17:29:41 +08:00
Jieyao Hu
8f4ffda867 media: i2c: sc3336 fix gain table error
Change-Id: I3f1c16a37d00321f3f740fc2816db1c9f9d5d98a
Signed-off-by: Jieyao Hu <toxicant.bane@rock-chips.com>
2022-08-12 15:52:55 +08:00
Sandy Huang
6ae6cdd235 drm/rockchip: vop2: fix PD_EMSART closed at wrong time
PD_ESMART will be closed at esmart layers attathed to VPs config done + FS,
but different VP FS time is different, this maybe lead to PD_ESMART closed
at wrong time and display error, so we don't dynamic turn on/off PD_ESMART
when have more than one display.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I2c5ada04992dd52ad72951198e327de540ba1974
2022-08-12 15:52:36 +08:00
Caesar Wang
9ab42b3be5 arm64/configs: enable IEP for rockchip_linux_defconfig
Enable rockchip iep module by default.

Tested on RK3399 EVB IND board as below.
root@linaro-alip:~# dmesg |grep IEP
[    3.258719] iep: IEP Power ON
[    3.258758] iep: IEP Power OFF
[    3.258780] iep: IEP Driver loaded successfully
...

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I80452a89a05e210a4dba0261c302517544b40c31
2022-08-12 14:51:23 +08:00
XiaoDong Huang
3b882fc5a8 dt-bindings: suspend: rk3588: add io-retention related macros
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: If0ac25224b525a56017f593d0ab71a3f67edfc29
2022-08-11 21:02:38 +08:00
XiaoDong Huang
7f64e7c02c soc: rockchip: pm_config: support sleep-io-ret-config
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: I5a26367fe2396832f7655331e292b53ebcf9a15d
2022-08-11 21:02:38 +08:00
Cai YiWei
a46a7e6ca0 media: rockchip: isp: add procfs write for debug
config isp procfs note to set debug mode:
BIT(0) for show isp reg
BIT(1) for dump bay3d iir/cur/ds buf once

BIT(8) for skip aiq params update
BIT(9) for skip hw params update, only for same w & h & bayer

example:
1.show isp reg info
echo mode=0x1 > /proc/rkisp0-vir0
cat /proc/rkisp0-vir0

2.dump bay3d iir/cur/ds buf to /tmp
echo mode=0x2 > /proc/rkisp0-vir0

3.skip aiq params update
echo mode=0x100 > /proc/rkisp0-vir0
echo 0x2200=0 0x538=0x800080 > /proc/rkisp0-vir0

4.skip hw params update
echo mode=0x200 > /proc/rkisp0-vir0

5.close debug mode
echo mode=0 > /proc/rkisp0-vir0

case 3 or 4 also can will with 1 and 2, such as mode=0x103

Change-Id: I64b41a1685453e12481c4ad9d22de8caf56eb2bf
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-08-11 20:53:06 +08:00
Huibin Hong
3095b83bfc soc: rockchip: debug: print pcsr when hardlock or rcu stall
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: I7673aa509e15df550fecc3f970ea64c34199a4f9
2022-08-11 20:33:45 +08:00
Huibin Hong
012bd50682 rcu: add rcu_stall_notifier_list
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: I53a22745174bdab77baee65cf6586402a54fe1da
2022-08-11 12:10:56 +00:00
Huibin Hong
d851edc401 watchdog/hardlockup: add hardlock_notifier_list
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: Id469d3c5a38f0bcb43a13a5c2263b53cf327154b
2022-08-11 12:10:56 +00:00
Tao Huang
95c089fb93 arm64: rockchip_gki.config: Enable CONFIG_SND_SOC_AW883XX
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I53cb756ac4168d811cf7d440648515dd5fbd9f89
2022-08-11 19:46:56 +08:00
Tao Huang
6877d61519 arm64: rockchip_gki.config: Enable CONFIG_DRM_MAXIM_MAX96745/MAX96752F/MAX96755F
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ib71ee9a1b319e767454616812d7324c2bf4ed66b
2022-08-11 19:46:23 +08:00
Yiqing Zeng
ec643ba062 ARM: dts: rockchip: support rv1106g-evb1-v10-dual-cam dts
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: Ia34bd6b558b82775ea0a2700619e956017e14b7a
2022-08-11 18:30:38 +08:00
Xing Zheng
7d1cb2fa96 ASoC: rockchip: multicodecs: fix the invalid jack reference without codec_hp_det and gpio detection
The crash log:
========
[    6.807722] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[    6.812273] Mem abort info:
[    6.812596]   ESR = 0x96000006
[    6.812899]   EC = 0x25: DABT (current EL), IL = 32 bits
[    6.813439]   SET = 0, FnV = 0
[    6.813737]   EA = 0, S1PTW = 0
[    6.814037] Data abort info:
[    6.814316]   ISV = 0, ISS = 0x00000006
[    6.814733]   CM = 0, WnR = 0
[    6.815042] user pgtable: 4k pages, 39-bit VAs, pgdp=0000000002585000
[    6.815676] [0000000000000000] pgd=0000000002584003, p4d=0000000002584003, pud=0000000002584003, pmd=0000000000000000
[    6.816819] Internal error: Oops: 96000006 [#1] PREEMPT SMP
[    6.817341] Modules linked in:
[    6.817664] CPU: 1 PID: 64 Comm: kworker/u8:1 Not tainted 5.10.110 #151
[    6.818268] Hardware name: Rockchip RK3308B-S evb analog mic v11 board (DT)
[    6.818923] Workqueue: events_power_efficient rk3308_codec_hpdetect_work
[    6.819549] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO BTYPE=--)
[    6.820112] pc : __pi_strcmp+0x90/0x158
[    6.820480] lr : dapm_find_widget+0xb0/0xec
[    6.820871] sp : ffffffc010cfbc20

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I6b0e8823353c34eb669e57a633e83a9945275a14
2022-08-11 18:27:51 +08:00
Caesar Wang
2918367d62 arm64/configs: enable CONFIG_SQUASHFS_XZ for rockchip_linux_defconfig
This patch enabled CONFIG_SQUASHFS_XZ that includes support for reading
Squashfs file systems compressed with XZ compression. XZ gives better
compression than the default zlib compression, that enable it on linux
platform by default.

The snap can't work issue that found on some popular latest llnux OS,
as below error log with snap.

$snap install hello-world

Filesystem uses "xz" compression. This is not supported
error: system does not fully support snapd: cannot mount squashfs image
using "squashfs": mount: /tmp/sanity-mountpoint-583983220: wrong fs type,
bad option, bad superblock on /dev/loop0, missing codepage or helper
program, or other error.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I54426d8e30ab4d4f9ca2f9477d780d797e56bfce
2022-08-11 17:31:46 +08:00
Jianwei Zheng
1ac7160008 arm64: dts: rockchip: px30: add u2phy clk for usb2 host
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
Change-Id: I2be61f36df18931a51326f1167fa0dd98e0657dd
2022-08-10 21:22:55 +08:00
Finley Xiao
ea56536c35 arm64: dts: rockchip: Assign SCLK_UART1_SRC to USB480M fox px30
Change-Id: Iab1c8af4289cf0767910d6301689ea52a4195067
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Jianwei zheng <jianwei.zheng@rock-chips.com>
2022-08-10 21:03:29 +08:00
Lin Jianhua
d9b709eb59 arm64: configs: update rk3308_linux_defconfig
1.enable CONFIG_MEDIA_SUPPORT/CONFIG_ROCKCHIP_GRF/CONFIG_RFKILL_RK
2.enable CONFIG_CPU_FREQ_STAT/CONFIG_CPU_FREQ_TIMES
3.enable RK816
4.wifi build module

Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
Change-Id: I23a3c9edcf3a043ee2bedb854ddee86d1e5a90b9
2022-08-10 19:07:52 +08:00
Sugar Zhang
69ba52d77b ASoC: rockchip: mdais: Fix panic when dai control enabled
Unable to handle kernel NULL pointer dereference at virtual address 00000080
pgd = 5be93016
[00000080] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 3 PID: 58 Comm: kworker/3:1 Not tainted 4.19.111 #9
Hardware name: Generic DT based system
PC is at snd_soc_add_dai_controls+0x24/0x40
LR is at   (null)
pc : [<b0692590>]    lr : [<00000000>]    psr: 20000053
sp : ee117d58  ip : 00000000  fp : ddb2d540
r10: ddbd1c40  r9 : 00000000  r8 : ddb35b80
r7 : ddb35940  r6 : ddb65080  r5 : 00000002  r4 : eeb39410
r3 : 00000001  r2 : b0d464e4  r1 : eeb39410  r0 : ddb65080
Flags: nzCv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment user

Change-Id: I0571e1a0554f11af62fab3572fcb11f299626be6
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit d6885ff37ffcee0233d2b417a5c3d2f2dbae34d5)
2022-08-10 18:45:31 +08:00
XiaoTan Luo
81fff31dd3 ASoC: rockchip: rk817-codec: enable dac when play
In this case playback_path set to ON, and then play music.
when playback close, stream mute power off the dac,
but the playback_path do not be set to OFF, so we must
power on the dac again.

Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: I7baa8518ccbb567cb146c5739f9a125da320e674
2022-08-10 18:35:17 +08:00
Xing Zheng
84fe156d05 ASoC: rockchip: rk817-codec: Reset DTOP_DIGEN_CLKE after finish digital registers
This patch try to reset DTOP_DIGEN_CLKE during hook power up
after finish configure digital registers, avoid to the incorrect
work status.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: Iaa7eb3ebf41d0a55ddf8005bcaeccae2c60656eb
2022-08-10 18:35:17 +08:00
Xing Zheng
07ee28e836 ASoC: rockchip: rk817-codec: add support recover playback/capture path after resume
[Fix and using new sound APIs (snd_soc_kcontrol_component()/snd_soc_component_get_drvdata())]

Change-Id: I52487370ce33b057d9cf774b7c0cef06f2c98bca
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2022-08-10 18:35:17 +08:00
Xing Zheng
88344894fa ASoC: rockchip: rk817-codec: clean up and wrap playback and capture path configurations
[Fix and using new sound APIs (snd_soc_kcontrol_component()/snd_soc_component_get_drvdata())]

Change-Id: I6bc36626a8952ef28789dfacf57c2b27580a3467
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2022-08-10 18:35:17 +08:00
Frank Wang
7552d08021 mailbox: rockchip: put off irq request until it parsed
Put off irq request in case the interrupt may occur and the irq handler
is not get ready yet at the probe time.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I269d98ddbd8368c24b783b0e53703f19366301c0
2022-08-10 17:27:22 +08:00
Frank Wang
c9bbeb3741 mailbox: rockchip: add reading the last message support
The client can invoke rockchip_mbox_read_msg() to read the last message
in the related mailbox channel.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Ia9b78bfc04341648f98db4363ca94b66ebe2cee5
2022-08-10 17:22:36 +08:00
Wangqiang Guo
27366d4294 arm64: dts: rockchip: rk3588: fix hdmirx ddc communicate err.
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
Change-Id: I8307283bf833fabdeef6f8911bf1d3b525db7a37
2022-08-10 15:29:29 +08:00
Simon Xue
502e1d32f2 iommu: Don't break iommu_attach_device() if iommu shared by more than one master
Don't break iommu_attach_device.
iommu_attach_device will break if iommu shared by two or more masters

Change-Id: Ifd1c652341e2270bfde57ebe1e0cd00d51d38eec
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2022-08-10 15:21:22 +08:00
Yiqing Zeng
f9613e3a3c media: i2c: gc4023 update version v0.2.0
1, update init registers setting;
2, update gain table;
3, update mirror/flip setting;

Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: Ic8a84efadc9dd69e8e826f10beb5c4fec90b4ee6
2022-08-10 15:16:45 +08:00
Guochun Huang
ecc6097c8d drm/bridge: Add support for Maxim MAX96776
The deserializers convert a singleor dual-link GMSL2
serial input to embedded DisplayPort (eDP), enabling
display of high-resolution RGB888 video.

Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: Ief4d5a8ca9ed42c5954c8fc1403da58bebee4730
2022-08-10 10:19:57 +08:00
Guochun Huang
4b9ba5d213 mfd: Add support for Maxim MAX96776
The MAX96776/MAX96778 deserializers convert singleor
dual-link GMSL™ serial input to embedded DisplayPort
(eDP) v1.4a. 600MHz PCLK capability and decompression
of VESA 3:1 DSC v1.1 enable transport of 4K (UHD),
24-bit, 60fps video over a single coax or twisted pair
link. The MAX96776/MAX96778 also send and receive
sidechannel and peripheral control data to enable
full-duplex single-wire transmission of video and
bidirectional data.

Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I3c07fc1053ae6080cb1cca1bfb9bca5fb38bb563
2022-08-10 10:19:27 +08:00
Zefa Chen
18279453cd media: rockchip: vicap does not do a soft reset before capture raw
while online mode is running

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I023ad640be010b9d109458e6c755d251e9338294
2022-08-10 09:46:32 +08:00
Wang Panzhenzhuan
fb39bd5bec media: i2c: gc5035: fix compile error
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I5baa609d0028d7cbcfc26334d68ace1db741e340
2022-08-09 19:32:35 +08:00
Kever Yang
df5f7115ff phy: rockchip: naneng-combophy: Set pcie to use T3-p1
T3-p1 with 650mV output voltage is the best signal via the test.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I5c2bd3ab0c235f3079925a03a59c419ad37da485
2022-08-09 19:31:40 +08:00
Yu Qiaowei
783ba8db79 video: rockchip: rga3: Modify YUV10bit of RGA3 to default to compact mode
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I310839f124e4c3e4ef7aa0e81f4cc780893377db
2022-08-09 19:01:49 +08:00
Caesar Wang
bce92d16b2 arm64: dts: rockchip: Add mmc aliases for linux
This series in order to have the default MMC alias.

The mmc default alias:
	mmc0 = &sdhci;
	mmc1 = &sdmmc;
	mmc2 = &sdio0;

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: I27b5645200a645bee6c3dc2f4e95cdb23ba19ab8
2022-08-09 17:21:34 +08:00