Commit Graph

1061248 Commits

Author SHA1 Message Date
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
Zefa Chen
0d7bc5495a media: rockchip: cif fixed error that may cause an error during the second run
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: If00c67909da448c926110a9843cc41c6f4cb0c75
2021-12-01 15:39:03 +08:00
Elaine Zhang
e1271eecd2 net: can: rockchip: support can-2.0
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I8fee96d28118c635dcbaad79fa32c2397e1f1809
2021-12-01 15:35:06 +08:00
Elaine Zhang
1403265a5e dt-bindings: can: rockchip_canfd: add can-2.0
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I90cbee47de662f4a06bb94e531300dc9abc5b0b1
2021-12-01 15:32:25 +08:00
Elaine Zhang
3bfd4fb2eb arm64: dts: rockchip: rk3588: Fix can compatible
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I56b21d6bafab511a37e5e388f25266828e195125
2021-12-01 15:32:05 +08:00
Jianqun Xu
9b97628093 pinctrl: rockchip: fix rk3588 pinmux get
For GPIO0_B4 to GPIO0D7, the pinmux must read two registers.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Ic8d70c0ee56ce8ae8890a708cea84868f3a04228
2021-12-01 15:14:04 +08:00
Guochun Huang
449408e884 phy: rockchip: mipi-dcphy: clk bias enable HS_VREG after lane enable
Change-Id: I81ce750821549e30f606f65fa85f853adb627ae3
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2021-12-01 15:09:04 +08:00
Zefa Chen
40c21f3337 include: rk_vcm_head: add t_div config
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Iad35fbc12ec18d24198ee48be88dc9315ac9b312
2021-12-01 14:57:25 +08:00
Zefa Chen
342bda4075 include: rk_vcm_head.h fixed compile error
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Icf9094d096347bae974718a9be31c5137ba127a3
2021-12-01 14:56:43 +08:00
Zefa Chen
821201ff6a media: rockchip: rkcif support get spd/ebd data type
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I74635dce94c54b3db79a750eb59e4533b8ccb090
2021-12-01 14:27:15 +08:00
Lin Jinhan
4c58956a5e crypto: rockchip: add DMA32 addressing range limits
Crypto only supports DMA32 address addressing and behaves
 abnormally on more than 4G DDR.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I5b6b5c9eb5f00698d25e47a778f358380f4121eb
2021-12-01 14:17:10 +08:00
Zefa Chen
adb2ff0444 arm64: dts: rockchip: rk3588 vicap dclk set to 600M
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ib2edcf7968bc6fe67cca09de029bc8186f06463c
2021-12-01 11:27:55 +08:00
Andy Yan
167ea3e2e9 drm/rockchip: vop2: Fix dclk_out rate calculate error in YUV420 output mode
The K will be set 2 in YUV420 output mode, so we
don't need to handle YUV420 for DisplayPort.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I8f42536735e65c82705d58382f1db2b2994d741b
2021-12-01 11:27:23 +08:00
Andy Yan
27dc0c199b drm/rockchip: vop2: Fix hdmi_edp1_pixclk div width
Max div of hdmi_edp1_pixclk is 2.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: Idb21a06a586f088f8a332435676a8bb031a384ca
2021-12-01 11:27:23 +08:00
Wu Liangqing
250a8af383 arm64: dts: rockchip: rk3588s-evb: sync with rk3588-evb
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Change-Id: If6aaec4a52b28fe0e25c7ace20aa4611177a3e03
2021-12-01 10:20:26 +08:00
Weixin Zhou
59b695cf32 arm64: configs: rockchip_defconfig: Enable CONFIG_SENSORS_PWM_FAN
RK3588 EVB use this feature.

Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I4535dfe182f76ebf1441cebf5d48f02805e74450
2021-12-01 09:41:42 +08:00
Weixin Zhou
b874d148dc arm64: dts: rockchip: Add pwm-fan for rk3588 evb
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: Ia0cf7c9ba9e53e427631a1068ebfc8fb315afb29
2021-12-01 09:40:02 +08:00
Shaoxing Chen
6e6c4d831e arm64: dts: rockchip: Enable hym8563 for rk3588s-evb4
1) Enable hym8563 clkout for WIFI/BT
    2) Remove spi2m2_cs1 for hym8563 interrupt gpio

Signed-off-by: Shaoxing Chen <csx@rock-chips.com>
Change-Id: Id2f563115efab751f360d4d00df0b78b155c0bc1
2021-12-01 09:20:27 +08:00
Shaoxing Chen
9392c1c4b3 arm64: dts: rockchip: Add WIFI/BT node for rk3588s-evb4
Signed-off-by: Shaoxing Chen <csx@rock-chips.com>
Change-Id: I77dda984658e828bce3472ff6a38170044e52080
2021-12-01 09:20:20 +08:00
Zefa Chen
f1d87b2a3d media: i2c: ov50c40 change pdaf otp data align to big endian
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I75a099e14c74adb7df13ff5971c702fb3537a4ce
2021-11-30 21:12:37 +08:00
Zefa Chen
1b717058b0 media: i2c: ov50c40 support get spd data type
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I3debaf964b00b0ba8cc4545de1a9e81862d93dd7
2021-11-30 21:02:41 +08:00
Zefa Chen
f7b8afb8b4 include: uapi: rk-camera-module.h: struct channel_info add data type
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I64ca7e16e0048c88938ce4cc77e96c81d14b7601
2021-11-30 21:02:19 +08:00
Elaine Zhang
5119ab44df arm64: dts: rockchip: rk3588: Change the clk link registration sequence
Reduces clock registration time

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I9ff4218e23fe9dde42f7345fc0e4bcd6f42c5d73
2021-11-30 21:01:05 +08:00
Mark Huang
a8d82cff69 arm64: dts: rockchip: rk3588-nvr-demo: enable hdmi1 in vop0 and vop2
Signed-off-by: Mark Huang <huangjc@rock-chips.com>
Change-Id: If5e9452505ccf9d97b81f7ab2b41604d931e2a03
2021-11-30 20:36:20 +08:00
Algea Cao
6680da5e1f drm/rockchip: dw_hdmi: Fix hdmitx0 hpd irq mute by hdmitx1 driver
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ia4b4c977208f925c0f2c2fe6e763f3cd7ecc9db9
2021-11-30 19:40:05 +08:00
Jiajian Wu
d34e75ac1e drm/bridge: synopsys: Add hook_plugged_cb for dw-hdmi-qp reporting connector status
Signed-off-by: Jiajian Wu <jair.wu@rock-chips.com>
Change-Id: I3103df9f379dfe98a4eb54dc5d3ce9f407038d8c
2021-11-30 18:37:26 +08:00
Andy Yan
1966a3328a drm/rockchip: vop2: Report max_input of window as 4096x4320
Make hwc work correct when handle a 8K input source

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I77ee3c13f5c884fbdd9eec72b02998e10bbc3425
2021-11-30 18:37:19 +08:00
Shunqian Zheng
6953760a2a arm64: rockchip_linux_defconfig: enable imx415
IMX415 is supposed to be the default sensor on rk3588 evb boards.

Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I4b2ea0f57c2510d46ea5c0b3416d536a2e7bc898
2021-11-30 18:32:14 +08:00
Cai YiWei
f5b1a62925 media: rockchip: isp: dynamic memory alloc for params and stats function
Change-Id: Iecc3391295e264ac6569c2ace257a023bfa3ed9e
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-11-30 18:31:11 +08:00
Wang Jie
5869a2d49e arm64: dts: rockchip: rk3588s-tablet: fix Type-C0 vbus issue
Just as the commit 25e44a6ed98b("bq25700: register otg vbus regulator")
said that there will be some problems with the current vbus control,
and the patch has registered the otg vbus regulator in the charger ic
driver, then the otg vbus regulator can be referenced in the fusb302 node.

Change-Id: Id4c9f866a3d131eee6f732300ff642a7f5489672
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
2021-11-30 18:27:12 +08:00
Frank Wang
7790a659ae phy: rockchip: usbdp: tuning ssc modulation rate
Set SSC Modulation rate to 31.2 KHz that can pass the compliance test
and have a better margin.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Iaf82e4803a9ccb196d21d9a02a93293be0dd053e
2021-11-30 18:23:23 +08:00
Cai YiWei
5dc6645028 media: rockchip: isp: fix bay3d mi no update
Change-Id: I44cdb1fa3bbfcde374ce6747a3b5825b22373c10
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-11-30 17:24:12 +08:00
Wyon Bi
8d3c3e5d41 drm/rockchip: dw-dp: Improve link maintenance
- Only check link retrain in short hpd pulse
- Always do link train in modeset
- Fix link retrain condition
- Add sink count check

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ifed1d706dcda5ac79322271ec59c2f1a5a79262b
2021-11-30 15:58:44 +08:00
Wang Jie
25e44a6ed9 power: supply: bq25700: register otg vbus regulator
For Type-C PD driver using the tcpm framework and charger ic
(bq25700) output otg vbus solution. Because the dwc3 driver
cannot know whether the Type-C PD device sends DR_swap and
PR_swap messages, there are some problems with the charger ic
vbus control:
(1) rk3588s as sink, Type-C device sends DR_swap Message, u2phy driver
    will send enable otg vbus notification to charger ic driver;
(2) After the Type-C device sends PR_swap Message to realize the
    Sink->Source or Source->Sink switch, the charge ic driver cannot
    dynamically enable or disable the otg vbus;

Based on the above problems, an otg vbus regulator is registered in
the charge ic driver for use by the fusb302 (Type-C PD controller chip)
driver, the otg vbus control is transferred to the tcpm framework.

In some cases (for example, the hardware does not have a PD chip),
in order to be compatible with switching from a lower version kernel
(kenrel-4.4/4.19) to a higher version kernel(kernel-5.10), dts will not
be modified. the software registration of the otg vbus regulator fails,
the vbus extcon mechanism will be registered.

Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
Change-Id: I721abcb214795c0024e200b10ec3ab1d4a9b790a
2021-11-30 10:59:45 +08:00