Commit Graph

1073616 Commits

Author SHA1 Message Date
Jake Wu
707da1d0cb arm64: dts: rockchip: rk3562-test2: enable usb nodes
This enable usb20-otg.

Signed-off-by: Jake Wu <jake.wu@rock-chips.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I82a8e1417a7e4318e77d19504365bdd5908cbf3e
2023-02-13 14:56:23 +08:00
Yu Qiaowei
cc646fcd14 Revert "video: rockchip: rga3: disable memory when RGA power off to save power"
This reverts commit 0a7cd35e38.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I3d2c7a40ee3e0bc18fe802ce0b7a7e089ab58f3d
2023-02-13 14:55:44 +08:00
Jianwei Fan
58a0936021 arm64: rockchip_defconfig: enable dw9763 for rk3562-rk817-tablet
Change-Id: I47ce770ebb4fd40ef7222c7b1861b80f8c83571c
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2023-02-13 14:23:55 +08:00
Jianwei Fan
f23955ad2c media: i2c: add vcm dw9763 driver
Change-Id: Ib7b903f508e002d9bd41d842a01f406925ee48f5
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2023-02-13 14:23:11 +08:00
Joseph Chen
116e21f4fd arm64: dts: rockchip: rk3562: Use GRF_PMU_OS_REG8 as reboot-mode register
GRF_PMU_OS_REG8 can't be reset by NPOR.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ie1dee8c0744b00b3cba23637cadcc382ba529207
2023-02-13 03:20:35 +00:00
Hongming Zou
be6124d199 ARM: configs: rockchip_linux_defconfig: add two codec configs for the rk3036 evb1 board
CONFIG_SND_SOC_INNO_RK3036=y
CONFIG_SND_SOC_ES8311=y

Change-Id: Id90f81974cf045b3534031d5b504f6cac080a3f1
Signed-off-by: Hongming Zou <hongming.zou@rock-chips.com>
2023-02-10 20:38:16 +08:00
Hongming Zou
9b71d6a080 drm/rockchip: inno_hdmi: add support hdmi audio
Change-Id: I4df13c5ed17516cf820dc425c17368c1fbb9c6be
Signed-off-by: Hongming Zou <hongming.zou@rock-chips.com>
2023-02-10 20:35:45 +08:00
Hongming Zou
311bd445fb ARM: dts: rockchip: rk3036-echo/kylin use new i2s node
Change-Id: I46677e361788f58738e216593277cee390392e51
Signed-off-by: Hongming Zou <hongming.zou@rock-chips.com>
2023-02-10 20:34:02 +08:00
Hongming Zou
b3e140c597 ARM: dts: rockchip: rk3036-evb1: update es8311 node and i2s node
Change-Id: Ic50c3c5f75bee2dea72a133a600c707875e17d4b
Signed-off-by: Hongming Zou <hongming.zou@rock-chips.com>
2023-02-10 20:34:02 +08:00
Hongming Zou
b99d30ed2a ARM: dts: rockchip: rk3036: fix i2s pinctrl
Change-Id: I4e8ddc326c95694ba648545049f56b8804a89ac5
Signed-off-by: Hongming Zou <hongming.zou@rock-chips.com>
2023-02-10 20:33:54 +08:00
Zefa Chen
e9a0711b53 media: i2c: sensor driver remove mutex lock in g_frame_interval
g_frame_interval may be called in interrupt function

[<b0362517>(__mutex_lock.constprop.10) from [<af8951e5>] (gc2053_g_frame_interval+0x13/0x2a [gc2053])
[<af848257>(rkisp_rockit_ctrl_fps [video rkisp]) from [<af83f461>] (mi_frame_start+0x19/0xa8 [video rkisp])
[<af83f461>(mi_frame_start [video rkisp]) from [<af83b35b>] (rkisp_stream_frame_start+0x31/0x3e [video rkisp])
[<af83b35b>(rkisp_stream_frame_start [video rkisp]) from [<af8357e5>] (rkisp_trioger_read_back+0x1bd/0x710 [video rkis])
[<af8357e5>(rkisp_trigger_read_back [video rkisp]) from [<af835df3>] (rkisp_rdbk_trigger_event+0xbb/0x2a8 [video rkisp])
[<af835df3>(rkisp_rdbk_trigger_event [video rkisp]) from [<b0016e19>] (tasklet_action_common.constprop.3+0x3d/0x58)
[<b00094d7>](__do_softirq) from [<b0016c31>] (__irq_exit rcu+0x31/0x68)

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I4edd1a0600fa8c6a09133c255da4a957022babdf
2023-02-10 20:12:00 +08:00
Zefa Chen
10019a5beb media: i2c: sensor driver remove not necessary check of fmt_code in enum_frame_interval
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I2bafbe067054c30cd4e61740365a59d9ff839ae4
2023-02-10 19:19:52 +08:00
Elaine Zhang
89d5027fb3 clk: rockchip: rk3588: Fix up the dump information of panic
Just dump the valid register.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I82d9ab4d0f97b93b9dcfde5a07fbd4f4afb9ab23
2023-02-10 17:15:30 +08:00
Elaine Zhang
3fb264c4e2 soc: rockchip: power-domain: Fix up the dump information of panic
Just dump the valid register.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I3c35530d03463d2a5940862d866668a1f51a283c
2023-02-10 17:15:30 +08:00
Finley Xiao
52c9c71ccb clk: rockchip: rk3562: Remove CRYPTO RNG and KLAD clocks
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I35d432561605227b35a1c3b953bfa6c926b1adb8
2023-02-10 16:27:56 +08:00
YouMin Chen
d508911411 arm64: dts: rockchip: Add rk3562 ddr relate node
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: Icd2ba1ef071259e50ff4495fb1b78caf02d82cd9
2023-02-10 14:48:40 +08:00
YouMin Chen
c7cb4c1ef8 PM / devfreq: rockchip_dmc: Add support for rk3562
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: I839d731812df29a05f339a0ff5d63bf2056a88f2
2023-02-10 14:28:01 +08:00
YouMin Chen
65a05dcbab dt-bindings: devfreq: rockchip_dmc: Add rk3562 support
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: I00e209a30918bc69d43d93306a812e10805fe32c
2023-02-10 14:27:01 +08:00
YouMin Chen
1af50cdeaf PM / devfreq: rockchip-dfi: Add support for rk3562 dfi
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: Idf016a7ad082771277e6de6a7412d9a7a8e226eb
2023-02-10 14:26:16 +08:00
YouMin Chen
b46525b951 dt-bindings: devfreq: rockchip_dfi: Add rk3562 support
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: Ia10308583f88909a2efeb76922ca635f63d6016e
2023-02-10 14:25:48 +08:00
Finley Xiao
001bea88b9 arm64: dts: rockchip: rk3562: Crypto and rng use scmi clock
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ia34b1caf94aaa964c71a303130f81ee0d1f5253f
2023-02-10 14:23:11 +08:00
Finley Xiao
c44d1ff0ab clk: rockchip: rk3562: Add clock ids for secure crypto
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ic2614c5ff312e6a2b69b481eb5d794c97e6f711e
2023-02-09 20:48:24 +08:00
Jianqun Xu
408861dc07 Revert "ARM: dts: rockchip: delete gpu 100MHz for rk3288"
This reverts commit 25e9b5b53a.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Ifabc3f04113c0b8ebf054df2cbc58c57d4c3925b
2023-02-09 18:23:26 +08:00
Wangqiang Guo
8abf8eba33 media: rockchip: hdmirx: add aviif_chg_irq.
Use aviif_chg_irq interrupts to monitor scenarios where
the TMDS signal is not disconnected but the resolution,
frame rate, color range or image format changes.

Change-Id: I2f6e3d0d734de1c5a8033b00d3b6b14d1815f6ca
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
2023-02-09 08:21:13 +00:00
Tao Huang
50ae3938ef dma-buf: Rename CONFIG_DMABUF_DEBUG_ADVANCED to CONFIG_RK_DMABUF_DEBUG_ADVANCED
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I7752359d34e1fb579471d915c2e2039229a2defc
2023-02-09 14:21:20 +08:00
Tao Huang
4f0ec7c431 arm64: configs: Renmae CONFIG_DMABUF_DEBUG to CONFIG_RK_DMABUF_DEBUG
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ie808ed8bd8d47e2fbd5734a20ab979a5c240b2e9
2023-02-09 14:21:20 +08:00
Tao Huang
0513facbab dma-buf: Rename CONFIG_DMABUF_DEBUG to CONFIG_RK_DMABUF_DEBUG
To avoid conflicts with upstream config.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ib24fc9dbd07604a934de53d3b2402ab747bbcadf
2023-02-09 14:21:20 +08:00
Tao Huang
0a51d4a592 soc: rockchip: io-domain: Sync with upstream
Change-Id: I3aa990729e988f08f384a10606cc2cf26d091b8a
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2023-02-09 14:20:37 +08:00
Tao Huang
d1de5fc48f soc: rockchip: bring all rockchip drivers into a submenu
As the number of Rockchip drivers increase, entries in SoC menu looks
scattered with other SoC drivers. Make a submenu for Rockchip drivers
to make it visibly clear while selecting Rockchip SoC specific drivers.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ia657e184a32c9b28f6ddd585838890ba5ec814cf
2023-02-09 11:39:29 +08:00
Tao Huang
9cd7abdb02 net: wireless: rockchip_wlan: bcmdhd: No include stdarg.h from 5.15
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: If5a6ca39f8fcdc0854a34049f08f90c636b2044c
2023-02-08 19:45:37 +08:00
Tao Huang
7558c3e935 gpio: rockchip: Sync with upstream
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I49a33907327f3c08d613d9c463cd9abaac8dcd92
2023-02-08 19:32:41 +08:00
Tao Huang
bc249ee6f7 soc: rockchip: power-domain: Sync with upstream
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ice950e43affea12912acf5f96d51c52b0c132bfb
2023-02-08 19:20:52 +08:00
Korneliusz Osmenda
a74fc5b70d BACKPORT: FROMLIST: PCI: sysfs: Guard pci_create_sysfs_dev_files with atomic value
There is a race contition seen in rockchip platform which seems expose a long
existing bug in PCI sysfs code.

1. pci_bus_add_device() called pcibios_bus_add_device() or
pci_fixup_device() but have not called pci_create_sysfs_dev_files() yet.
Meanwhile pci_sysfs_init() is running and pci_create_sysfs_dev_files()
was called for newly registered device. In this case function
pci_create_sysfs_dev_files() is called two times, ones from
pci_bus_add_device() and once from pci_sysfs_init().

2. pci_sysfs_init() is called. It first sets sysfs_initialized to 1
which unblock calling pci_create_sysfs_dev_files(). Then another bus
registers new PCI device and calls pci_bus_add_device() which calls
pci_create_sysfs_dev_files() and registers sysfs files. Function
pci_sysfs_init() continues execution and calls function
pci_create_sysfs_dev_files() also for this newly registered device. So
pci_create_sysfs_dev_files() is again called two times.

The call trace looks like:

[    2.822232] [  T143] sysfs: cannot create duplicate filename '/devices/platform/fe170000.pcie/pci0002:20/0002:20:00.0/0002:21:00.0/config'
[    2.822240] [  T143] CPU: 1 PID: 143 Comm: rk-pcie Not tainted 5.10.66 #56
[    2.822245] [  T143] Hardware name: Telpo RK3588 F206 Board (DT)
[    2.822251] [  T143] Call trace:
[    2.822262] [  T143]  dump_backtrace+0x0/0x1c8
[    2.822269] [  T143]  show_stack+0x1c/0x2c
[    2.822276] [  T143]  dump_stack_lvl+0xdc/0x12c
[    2.822282] [  T143]  dump_stack+0x1c/0x64
[    2.822289] [  T143]  sysfs_warn_dup+0x6c/0x8c
[    2.822296] [  T143]  sysfs_create_bin_file+0xe4/0x130
[    2.822303] [  T143]  pci_create_sysfs_dev_files+0x50/0x210
[    2.822310] [  T143]  pci_bus_add_device+0x30/0xac
[    2.822316] [  T143]  pci_bus_add_devices+0x44/0x88
[    2.822321] [  T143]  pci_bus_add_devices+0x70/0x88
[    2.822327] [  T143]  pci_host_probe+0x78/0xb0
[    2.822335] [  T143]  dw_pcie_host_init+0x308/0x3f8
[    2.822340] [  T143]  rk_pcie_really_probe+0x954/0xe04
[    2.822347] [  T143]  kthread+0x13c/0x344
[    2.822353] [  T143]  ret_from_fork+0x10/0x30

There are continuous reporting about this bug[1] can be found here[1].

The above link leads me to the fix[2]. Upstream kernel has contained the fix:
0ad52e381d85eb86906749e2b8073cdc2265844b ("Convert "config" to static attribute")
However there are still corner bugs around directory create. So Bijorn created
a Bugzilla item[3] for it. After a long time, Korneliusz Osmenda pushed a new
patch to fix it. Then we wait for another long period of time without any update.
IMO, [4] is better than other proposes. So just backport the better fix into vendor
tree.

[1] https: //lore.kernel.org/all/m3eebg9puj.fsf@t19.piap.pl/
[2] https: //patchwork.kernel.org/project/linux-pci/patch/20210416205856.3234481-2-kw@linux.com/
[3] Bug: https://bugzilla.kernel.org/show_bug.cgi?id=215515
[4] https: //patchwork.kernel.org/project/linux-pci/patch/4469eba2-188b-aab7-07d1-5c77313fc42f@gmail.com/
Signed-off-by: Korneliusz Osmenda <korneliuszo@gmail.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
[Shawn: backport and reword to explain what happened]
Change-Id: Ib0a54bc2204afa7d9136e8d3156b00ec6aa4d8b3
(cherry-picked from https: //patchwork.kernel.org/project/linux-pci/patch/4469eba2-188b-aab7-07d1-5c77313fc42f@gmail.com/)
2023-02-08 18:48:36 +08:00
Jianqun Xu
9c22724d16 ARM: dts: rockchip: default to disable the rga for rk3288
Set the rga node to be "disabled" defaultly for rk3288.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Idccb5dfd79e7bfd5005307f5fba576df1ff03a0d
2023-02-08 18:47:07 +08:00
Jianqun Xu
bb15bb91c3 Revert "ARM: dts: rockchip: rk3288: Fix reg size for ehci"
This reverts commit 0fce242c01.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I34edb1a073fb977bcd78300fc14ac5d0040d3de6
2023-02-08 18:46:48 +08:00
Jianqun Xu
c8436595e4 ARM: dts: rockchip: rk3288 fix thermal node name to 'soc-thermal'
Fixes: 043ddfca3f ("ARM: dts: rockchip: rk3288: add operating-points-v2 for cpu nodes")

The pvtm driver will find a thermal by name of the thermal node.

This patch fixes a issue as following:
[    5.215126] cpu cpu0: failed to read out thermal zone (-22)
[    5.221562] thermal thermal_zone1: binding zone cpu_thermal with cdev thermal-cpufreq-0 failed:-17

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I475e4035ab797f9d374feaddce8fda68af0d522c
2023-02-08 18:44:56 +08:00
Frank Wang
9cce7d5ac8 phy: rockchip: inno-usb2: fix incorrect perip_connected
The U2PHY sent "peripheral connected" extcon message to DWC3 even if
there is no USB cable pluuged when the otg_sm_work is scheduled first
time, this would be resumed DWC3 unexpectedly and cause the DWC3 gadget
to incorrect state. So initialize the perip_connected to false before
send the extcon message to fix it.

This can fix the ADB can not be enumerated when plug the USB cable
in the first time after the system boot up and the below messages
may find in the Kernel log on RK3562-EVB2 board.

[    7.218101] read descriptors
[    7.218191] read strings
[    7.306784] dwc3 fe500000.usb: failed to enable ep0out

Fixes: 00168bb5b5 ("phy: rockchip: inno-usb2: fix otg port with vbus always on")
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I90209f15605d16ca746dd6c44fbaf6d9c1684eaa
2023-02-08 18:04:08 +08:00
Tao Huang
5e0fa7cfef pinctrl/rockchip: Sync with upstream
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I752b6433b1682930eb0e080759334a5a876a5d23
2023-02-08 17:33:34 +08:00
Sugar Zhang
c1770bf251 ASoC: rockchip: sai: Handle HCLK with runtime PM
This patch handle HCLK with runtime PM to save a little
bit of power consumption.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I4ab16fd21d592245a0d0eb2240740f0a90403f0a
2023-02-08 16:38:09 +08:00
Guochun Huang
b6de31a022 phy/rockchip: inno-dsidphy: add support px30s
Change-Id: I275d589f56e5963649aee9397eba3a9994e5901d
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2023-02-08 16:17:22 +08:00
Guochun Huang
81dbadea25 arm64: dts: rockchip: rk3562-evb: enable dsi display logo
Change-Id: I52d558e9f3d2a857acd461f67bc11152acd0f27e
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2023-02-08 16:11:49 +08:00
Guochun Huang
411e86fa31 arm64: dts: rockchip: rk3562-android/linux: move display route to innermost dtsi
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: Ibb68db2daab5ded86019a607efde554250d0559b
2023-02-08 16:11:29 +08:00
Guochun Huang
b21ba4394d arm64: dts: rockchip: rk3562: move display route to innermost dtsi
Change-Id: I34471e644d6a2e070cc031e7699489c6fc8632d4
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2023-02-08 16:11:15 +08:00
Jason Zhu
12609f9226 arm64: dts: rockchip: rk3562-iotest: support rk dsm sound
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I25ad0e77f03a69ae19e085a20d5cb5ccdee78af4
2023-02-08 16:05:16 +08:00
Jason Zhu
22c0fc4c7d arm64: dts: rockchip: rk3562: change the dsm info
Change the IP name according to the TRM. Delete unused info  and
correct the grf base address.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ic562db95e504372ace137eaebb679697230a0a6c
2023-02-08 16:05:09 +08:00
Jason Zhu
1d55fcb01f arm64: configs: rockchip_gki: enable CONFIG_SND_SOC_RK_DSM
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I586e7cd2c142b0b6245039a5177676b765afa1ca
2023-02-08 16:00:39 +08:00
Jason Zhu
a8617a2870 arm64: rockchip_linux_defconfig: enable CONFIG_SND_SOC_RK_DSM
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Id95110bd1b6a95c89f82432e352fd538303b0896
2023-02-08 15:58:15 +08:00
Jason Zhu
52dfec02ca arm64: configs: rockchip_defconfig: enable CONFIG_SND_SOC_RK_DSM
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I6e69cd59e64af922ee8608fbbd9454fcf3960e0a
2023-02-08 15:54:03 +08:00
Jason Zhu
a0881c07c2 ASoC: codecs: support rk dsm
Support rockchip Delta-sigma Digital Converter. And
it only has DAC which is a reduced version of rk_codec_digital.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I0444ac99b12ed4d8cfb6df4034392dbd844e2bca
2023-02-08 15:53:10 +08:00
Steven Liu
c115ee06bc arm64: dts: rockchip: rk3562-amp: add rpmsg node
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I4a1b1842414042c91a3365161f3baea236f7dc7d
2023-02-08 14:58:28 +08:00