Commit Graph

1073631 Commits

Author SHA1 Message Date
Finley Xiao
ddea4b4025 clk: rockchip: rk3562: change pll to slow mode before power down
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I7ee6d2478bc012bf70ca061738534ed57d1612f0
2023-02-13 19:31:59 +08:00
Yandong Lin
0ce21e2477 video: rockchip: mpp: fix jpege dma coherence issue for rkvenc2
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ida23480b46ce37bcd40b1f7de7907e889b267fc4
2023-02-13 18:50:37 +08:00
Hongming Zou
3ab683e330 ARM: dts: rockchip: rk3036-evb1: fix es8311 default aec mode
For products with light performance like RK3036, the playback
function may not be so important, and the stereo recording can
be guaranteed first. Therefore, the default left channel is ADC
input data.

Change-Id: Iffc51986f58fd5946a35ea39d12104b2e1f2d39f
Signed-off-by: Hongming Zou <hongming.zou@rock-chips.com>
2023-02-13 18:40:50 +08:00
Hongming Zou
b7b36e0653 ARM: dts: rockchip: rk3036-evb1: add support multi-sounds and spdif-sound
Change-Id: Id0f7286003f08aeb0632a28cf1f08c1f2799010b
Signed-off-by: Hongming Zou <hongming.zou@rock-chips.com>
2023-02-13 18:40:50 +08:00
Hongming Zou
ec0ab20967 ARM: dts: rockchip: rk3036: update acodec compatible to rockchip,rk3036-codec
Change-Id: I094a62ccd06f4b62bb175cc7260117622628cd30
Signed-off-by: Hongming Zou <hongming.zou@rock-chips.com>
2023-02-13 18:40:50 +08:00
Hongming Zou
5ee5151fed ARM: dts: rockchip: rk3036: remove hdmi_sound node
Change-Id: I3cb4010e255559c31eb0fe46c14b3f700b060d64
Signed-off-by: Hongming Zou <hongming.zou@rock-chips.com>
2023-02-13 18:40:50 +08:00
Hongming Zou
3d2844c61b ARM: dts: rockchip: rk3036: add spdif-sound node
Change-Id: I34672a839876afa1e54c70b151f90479bb8f8a19
Signed-off-by: Hongming Zou <hongming.zou@rock-chips.com>
2023-02-13 18:40:50 +08:00
Jianwei Fan
24250deb77 arm64: dts: rockchip: rk3562-rk817-tablet: add camera configuration
Change-Id: I57b5841eb91c2a6a7cd3650bf1a75695aa646a4c
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2023-02-13 18:32:42 +08:00
Jianqun Xu
e4d1514867 drm/rockchip: gem: fix for VVOP enabled but VOP and VOP2 not
In some case we need to select the CONFIG_ROCKCHIP_VVOP but unselect the
CONFIG_ROCKCHIP_VOP and CONFIG_ROCKCHIP_VOP2, this patch can fix it to
not do vop iommu map/unmap.

Change-Id: Ib48a11fd1dc6c0230701edb94c19c9f2a1a08a0a
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2023-02-13 18:31:28 +08:00
Jianlong Wang
53881cfb5f arm64: configs: add rockchip_linux_docker.config
enable kernel config for docker

for rk356x:
make ARCH=arm64 rockchip_linux_defconfig rockchip_linux_docker.config

for rk3588:
make ARCH=arm64 rockchip_linux_defconfig rk3588_linux.config rockchip_linux_docker.config

Signed-off-by: Jianlong Wang <jianlong.wang@rock-chips.com>
Change-Id: Idf52c56a30d6918ea12fb985c14dacccfaeb2583
2023-02-13 18:28:11 +08:00
Zefa Chen
61c9d9c4b8 arm64: dts: rockchip: add camera dtsi for rk3562 evb1
Add dts for gc8034 on rk3562 evb1 board.

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I64f34f37522a861b96ed509f95415dc0372bac97
Signed-off-by: Xu Hongfei <xuhf@rock-chips.com>
2023-02-13 18:25:33 +08:00
Steven Liu
ed46f27f29 arm64: dts: rockchip: rk3562: fix pinctrl cam m0/m1 clk0/clk1
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: Iebf5c036af34478a44047ec55f71bb67f0f7e11e
2023-02-13 18:24:35 +08:00
Zhang Yubing
c6165d6923 drm/rockchip: vop3: implement get property function for hdr, csc, acm
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Ia89c70387a6e3093f327ff71c61886066935b7bc
2023-02-13 17:44:47 +08:00
Zhang Yubing
cb9f78f78e drm/rockchip: vop3: alloc hdr gem object when first use it
the vop is binded before iommu init, if alloc hdr gem object in
vop bind stage, which may get the wrong dma address. To fix this
issue, alloc hdr gem object when first used it.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I99359cc345cb49aee1ce34ff6d5ee33d04ac2283
2023-02-13 17:39:35 +08:00
Sandy Huang
390dee5bd8 drm/rockchip: vop3: add xmirror register define
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I3e6653efb208b53f7a858904b7babaf092a6841f
2023-02-13 16:33:13 +08:00
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