Commit Graph

1061281 Commits

Author SHA1 Message Date
Zefa Chen
f2fcd374fc media: rockchip: cif-scale add power control
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I734f00bef832c661bd72aec1bf492665bb3dfbbc
2021-12-03 17:22:30 +08:00
Zefa Chen
9258867e86 media: rockchip: cif disable dma_en
only disable capture_en may cause memory access error

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ia3c7e5a07b3d95c762735e1b73170fb1911f48da
2021-12-03 17:16:46 +08:00
Algea Cao
7bd094a384 drm/rockchip: dw_hdmi_qp: Fix rk3588 hdmitx suspend crash
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I5f7771dbcbcfb13fb556b84ba147711fbde689e5
2021-12-03 16:14:51 +08:00
Li Huang
e931260b2c video: rockchip: rga3: fixup the uv opposite problem of yuv format on win1
Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: I23ca682136255557c4acec4076cdce884d2a9053
2021-12-03 15:55:15 +08:00
Mark Huang
552498e475 arm64: configs: add rk3588_nvr.config for nvr
make ARCH=arm64 rockchip_linux_defconfig rk3588_nvr.config

Signed-off-by: Mark Huang <huangjc@rock-chips.com>
Change-Id: I94f8a89aff5795817690b8d6b8796f9cb9c0b70a
2021-12-03 15:18:06 +08:00
Yiqing Zeng
4736fbadd0 arm64: rockchip_linux_defconfig: enable rk ircut
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I1c0b5c7ae874e665b9b40086dd0efa31a3a3405f
2021-12-03 15:17:18 +08:00
Wyon Bi
b7723280a5 drm/rockchip: dw-dp: support dynamic binding to different vp port
Fixes: ca885383eb ("drm/rockchip: dw-dp: support dynamic binding to different vp port")
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I94654e6eb916d688d9fe46544f60bd02e8d8cb7b
2021-12-03 15:16:11 +08:00
Sugar Zhang
ae7682acd6 drm/bridge: synopsys: dw-hdmi-qp: Fix PKTSCHED register access error
ACR located at Packet Scheduler which belongs to VIDQPCLK domain.
So, the related clk should be enabled before register access.

Actually, There are three CLK domain (AUDCLK, VIDQPCLK, LINKQPCLK)
related to Audio. So, do check clk status before config audio.

Maybe the better way should be spliting hdmi regmap into several parts
which managed by related clk domain in future.

e.g.

  devm_regmap_init_mmio_clk(dev, "aud", regs, AUD_REGBANK);
  devm_regmap_init_mmio_clk(dev, "vidqp", regs, VIDQP_REGBANK);
  devm_regmap_init_mmio_clk(dev, "linkqp", regs, LINKQP_REGBANK);
  ...

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ib497d92a73d99d9f38c4617f615f02c705b82ae7
2021-12-03 15:15:46 +08:00
Jianqun Xu
4799914074 pinctrl: rockchip: fix rk3588 pinconf offset for internal pins
Fixes: 8bc63bf4e5 ("pinctrl: rockchip: fix rk3588 pinconf offset")

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Ibcc2eab8a839c1ad72656d2e6dee3377d2f1fe99
2021-12-03 09:45:22 +08:00
William Wu
78db018c90 arm64: dts: rockchip: rk3588: add php and pipe clks for usb3 host2
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I1e99f810512c2ffd8623a9e238a0c236fdd279d0
2021-12-03 09:45:02 +08:00
Roger Chen
d4156b7d78 misc: rk803: Add compat_ioctl
Signed-off-by: Roger Chen <roger.chen@rock-chips.com>
Change-Id: I578bf38a56f02978cca7f84e0fe0943308a63ae1
2021-12-03 09:35:17 +08:00
Zefa Chen
e21ffc697c arm64: dts: rockchip: rk3588 disable csi2_dcphy1 as default
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I8e686e65dff52b6505e480c842fa41d7e0ca2677
2021-12-02 18:22:50 +08:00
Zefa Chen
7e5e2b0503 media: i2c: imx464 add more reg for linear change to hdr 2
because imx464 has no reset register

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I023ba541db32aa2fa489bbb6a898faffcb4e80ef
2021-12-02 18:12:28 +08:00
Zefa Chen
122a1dcfae media: i2c: aw8601 fix some incorrect usage
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I0841f63106bb132073568aa22a774b6ccc7b4324
2021-12-02 18:11:32 +08:00
Elaine Zhang
1f57d9eb1b clk: rockchip: rk3588: export clk_phy0/1_ref_alt_p/m clk id
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I149c43cd77f777c9d45c095be8c0c77c126b56d2
2021-12-02 18:10:18 +08:00
Shawn Lin
e2a2addf37 PCI: rockchip: dw: Fix unblance pm call for fake probe
We move all the probe stuff to kthread so that it won't block
the system to go on probing other drivers. But that introduced
a bug that PM calls would not be removed by driver core. As each
platform driver uses the same PM callbacks for all device instances.
So add device_release_driver if it fails to probe devices.

Fixes: 79ac46bdea ("PCI: rockchip: dw: Add kthread to probe PCIe devices")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I9d6ba448a87defa8d924927f1bfcff51c889e1a0
2021-12-02 15:41:28 +08:00
Shawn Lin
3be978903a Revert "PCI: rockchip: dw: Fix unblance pm call for fake probe"
This reverts commit c296f63fe3.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I09ad2cd68257e0f17b1c1031ae609d0d8b09ce57
2021-12-02 15:41:28 +08:00
Zhang Yubing
ead5e8f022 phy: rockchip: usbdp: avoid repeat run power off
When phy status is none, it mean that the power off
process is already be run. if the phy power off
function is called again before power on, ignore it.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I34c3f2b92076f7c27a1537d3c78000781de61179
2021-12-02 14:39:46 +08:00
Zhang Yubing
4f8587023c phy: rockchip: usbdp: optimize the power on flow
when we set mode change flag and the phy is idle, here
will not clear the mode change flag when power on, we
need clear it.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I900d5c37a2e83212eb6461d714a653c93da923c7
2021-12-02 14:39:46 +08:00
Dingxian Wen
78d231ff65 arm64: configs: rockchip_defconfig: enable LT6911UXC
Enable lt6911uxc HDMI to MIPI CSI-2 bridge driver for hdmi-in
application. Which found on rk3568-evb2-lp4x-v10.

Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I4ce22f3040dbe55c3236ac3d0ac62f7821011c8d
2021-12-02 14:36:01 +08:00
Jianwei Fan
8c39b46063 media: i2c: lt6911uxc: update driver to v0.01.02
v0.01.01: fix if plugin_gpio was not used
v0.01.02: modify driver init level to late_initcall

Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I3b15bed365552aa0dbaf8a8126400597caa96ed6
2021-12-02 14:31:52 +08:00
Jianqun Xu
8880c05e5a ANDROID: dma-buf: system_heap: support to allocate pages with GFP_DMA32
Add add heap - "system-dma32" to allocate pages with GFP_DMA32, support cache,
and add heap - "system-uncached-dma32" to allocate pages with GFP_DMA32, but
unsupport cache

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I93bb7c17fc038f52940ddc4facf836637c917bea
2021-12-02 14:17:34 +08:00
Herman Chen
595d953df0 video: rockchip: mpp: rkvenc2: Add rcb buffer
rkvenc2 encoder need rcb buffer for H.264 above 4K.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ic1b9b5fafa3e4488d8e993e21335ca8bd7cd5c6f
2021-12-02 11:17:37 +08:00
Elaine Zhang
09b21de775 net: can: rockchip: fix up the canfd/can error
To classify errors:
RX/TX error count < 128 is CAN_STATE_ERROR_WARNING,
An error frame is sent, enters the active error state.
RX/TX error count < 256 is CAN_STATE_ERROR_PASSIVE,
An error frame is sent, enter passive error state.
RX/TX error count >= 256 is CAN_STATE_BUS_OFF,
can bus off need to restart.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I4a85af3c86c5dfd14e4274832b0fb55ac09c98f7
2021-12-02 11:16:56 +08:00
Finley Xiao
66586e0579 arm64: dts: rockchip: rk3588s: Add more opp for cpu and gpu
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I91cc0b7592f6a940502aa228dc039dd7d76d4f65
2021-12-02 11:08:26 +08:00
Shaoxing Chen
c0f3a39d16 arm64: dts: rockchip: Add PWM IR for rk3588s-evb4
Signed-off-by: Shaoxing Chen <csx@rock-chips.com>
Change-Id: I0b6214a497e069f3ae06c6788ba6cc462cadb61a
2021-12-02 10:35:36 +08:00
Mark Huang
8ed6a37e49 arm64: dts: rockchip: rk3588-nvr: Add supply regulators for gpu
Signed-off-by: Mark Huang <huangjc@rock-chips.com>
Change-Id: I4f84b06e6680f8853ac7066de923e04b6b83c22d
2021-12-02 10:35:02 +08:00
Huang zhibao
2efb5117aa arm64: dts: rockchip: enable hs400 for rk3588 nvr
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I1fe3410bbb0231cc5932209209c77ee291385857
2021-12-02 10:34:16 +08:00
Huang zhibao
0b5ded86a2 arm64: dts: rockchip: Fix GMAC0 and GMAC1 tx delayline for rk3588-nvr-demo
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I117e1a26910072b2f209b52fcff3fa59a5ae4e3b
2021-12-02 10:05:35 +08:00
Wangqiang Guo
74a94db2e7 arm64: dts: rockchip: rk3588-evb/rk3588s-evb: gt1x add power-supply
Fix enter suspend/resume error

Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
Change-Id: I08335c818ef3b49fb15a782db105bfee333d3e91
2021-12-02 09:39:38 +08:00
Elaine Zhang
cc82bd9594 arm64: dts: rockchip: rk3588: add aclk_vop for pd_vop
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I3849557bd860a2bf9da88bb596745c31fcdace76
2021-12-01 19:10:13 +08:00
Lian Xu
26d33fa19b media: rockchip: ispp: solving ispp compilation problems
Change-Id: I20a6eee6157eccee6ac117b561a472474ce36b9f
Signed-off-by: Lian Xu <xu.lian@rock-chips.com>
2021-12-01 18:55:25 +08:00
Li Huang
e3ee3291f7 video: rockchip: rga3: Update version to 1.1.4
change to load rga3 first

Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: I642ba342632dcef30a85fe438ff1f7e04c1343df
2021-12-01 18:20:08 +08:00
Li Huang
76c173d8fe video: rockchip: rga3: Add some missing format
Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: Ia8b7f81389917b821993ea655323b3c625b2a5d3
2021-12-01 18:19:59 +08:00
Li Huang
c4c3388ca9 video: rockchip: rga3: fixup current->mm is null in multithreading
save current->mm on rga_job

Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: I04ea720fb20a4e88eecb07c776c1c9c7c90f6ff6
2021-12-01 18:19:27 +08:00
Li Huang
141acdb941 video: rockchip: rga3: fixup virtual addr fail on rga2
Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: I65d0d3ca5b82f25870741138130c2dc7e081496f
2021-12-01 18:19:18 +08:00
Li Huang
a06b16bc56 video: rockchip: rga3: Update version to 1.1.3
1. Fixup timeout when running multi thread,
   because fd can not pass on other thread.
2. Tide some code

Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: I68b0557138f583ab8bb341bf5bbe2ec145d2884c
2021-12-01 18:19:01 +08:00
Li Huang
2ed162aef5 video: rockchip: rga3: Support pm_runtime
Add enable/disable pd on rga_job_schedule/done

Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: Iaf3c19027c599ecc5f8ffdbd3ef7da44a4049381
2021-12-01 18:18:06 +08:00
Wang Jie
096cbd86cf arm64: dts: rockchip: rk3588s-tablet: disable unused usb_host1
Change-Id: I373006e78451d55eeeca192319c15719c1ab5854
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
2021-12-01 17:46:52 +08:00
Heiko Stuebner
aaa2148c7f UPSTREAM: gpio/rockchip: fetch deferred output settings on probe
Fetch the output settings the pinctrl driver may have created
for pinctrl hogs and set the relevant pins as requested.

Fixes: 9ce9a02039 ("pinctrl/rockchip: drop the gpio related codes")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20210913224926.1260726-5-heiko@sntech.de
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

(cherry picked from commit 59dd178e1d)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I675bb8af9bfba6603e0e423211a0d9ade6a9c3ce
2021-12-01 16:52:30 +08:00
Jianqun Xu
083b5eee62 gpio: rockchip: sync with upstream version
Sync the driver with upstream version.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I9d524163af76008ca04a3af2991b974f0b148bdb
2021-12-01 16:52:30 +08:00
shengfei Xu
a5a0435814 regulator: rk806: optimize regulator code
update:
1. use gpiod_get_value() instead of gpio_get_value()
2. updtae the rk806 register offset

Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I55b7dfdde06dabe3f8ab6285366059930f282a42
2021-12-01 16:49:07 +08:00
Wang Panzhenzhuan
2956ffd7cb arm64: rockchip_defconfig: enable CONFIG_VIDEO_AW8601
Enable vcm aw8601 config for ov50c40 module,
for rk3588s tablet & rk3588 evb1 use.

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Ie148c6d17280eea36e855fed1024f28180cd5518
2021-12-01 16:43:16 +08:00
Zefa Chen
7ec62fc3ee media: i2c: add vcm driver aw8601
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I6a32eca36e9268b94cffd2fd60c6350f35f1d04e
2021-12-01 16:43:16 +08:00
Shaoxing Chen
181d1452a0 arm64: dts: rockchip: Enable combphy2_psu for rk3588s-evb4
Signed-off-by: Shaoxing Chen <csx@rock-chips.com>
Change-Id: I5e721c085dcb976b7f283fc45bf37a231ee05ef8
2021-12-01 16:43:15 +08:00
Sugar Zhang
5260237497 Revert "drm/bridge: synopsys: Fix register access panic when PD off"
This reverts commit 6b7fb9a6c9.

The audio regbank of hdmi-qp is drived by audio interface clk, and had
fixed by commits as follows:

[1] 3a7f369b5c ("arm64: dts: rockchip: rk3588: Add aud clk for hdmi nodes")
[2] e108ff9f6f ("drm/rockchip: dw_hdmi: Handle aud clk for hdmi qp")

OTOH, to make android hal happy, we still allow to access hdmi audio even
hdmi is plugged out.

  "hdmi-audio-codec: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19"

Android/Linux should reopen hdmi sound card depends on HPD plug event
to bring back to normal state.

Change-Id: I654fe18a04b750f57c8bd52ef4948a476bc1fa50
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-12-01 16:43:15 +08:00
Zefa Chen
e9e0707d04 media: rockchip: cif add power control for online mode
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I78c8e81b6ba89060defae4feb74a829ea0708d7a
2021-12-01 16:19:05 +08:00
Lian Xu
0c003fbb00 arm64: dts: rockchip: rk3588s: Add ispp node
Change-Id: I7e2799980cbb2274c80d3dfa44eb4ee95728ac99
Signed-off-by: Lian Xu <xu.lian@rock-chips.com>
2021-12-01 16:07:37 +08:00
Heiko Stuebner
dd34cad8d0 UPSTREAM: pinctrl/rockchip: add a queue for deferred pin output settings on probe
The separation of pinctrl and gpio drivers created a tiny window where
a pinconfig setting might produce a null-pointer dereference.

The affected device were rk3288-veyron devices in this case.

Pinctrl-hogs are claimed when the pinctrl driver is registered,
at which point their pinconfig settings will be applied.
At this time the now separate gpio devices will not have been created
yet and the matching driver won't have probed yet, making the gpio->foo()
call run into a null-ptr.

As probing is not really guaranteed to have been completed at a specific
time, introduce a queue that can hold the output settings until the gpio
driver has probed and will (in a separate patch) fetch the elements
of the list.

We expect the gpio driver to empty the list, but will nevertheless empty
it ourself on remove if that didn't happen.

Fixes: 9ce9a02039 ("pinctrl/rockchip: drop the gpio related codes")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20210913224926.1260726-4-heiko@sntech.de
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

(cherry picked from commit e7165b1dff)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Id179c7eaacfb41565e2427ad82b55d11c2be8c4d
2021-12-01 16:03:50 +08:00
Jianqun Xu
7bb2c21642 pinctrl: rockchip: sync difference with upstream version
Some difference made during driver upstream review, this patch sync the
driver with upstream version.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I0da05d04f54bfc8e83afa28692c658b0b4d2604b
2021-12-01 16:03:09 +08:00