Commit Graph

1072263 Commits

Author SHA1 Message Date
Sugar Zhang
ed95aea3f1 ARM: dts: rockchip: Add support for rv1126 evb boards
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Iec56cf4d3a27d0e2b18ef577a7d990d350354194
2022-08-02 14:24:46 +08:00
Sugar Zhang
4ed0b6538e ARM: dts: rockchip: rv1126-evb-v10: Remove unused property for rk809 sound
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Icc98fbb842786a927f8ee9e24ec87156eabbc174
2022-08-02 11:00:36 +08:00
Damon Ding
d3fd7f006d ARM: dts: rockchip: rv1106: add rgb route node on display_subsystem
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Ia047276482c39801ffc74dd5952eea5c87b5a570
2022-08-01 19:11:55 +08:00
Elon Zhang
629253fd04 ARM: dts: rockchip: add rv1106g-evb1-v10-facial-gate
Signed-off-by: Elon Zhang <zhangzj@rock-chips.com>
Change-Id: I6ebb77931a29f649e96978be9084f37f24f999c9
2022-08-01 18:31:29 +08:00
Weiwen Chen
d3dcc9f47f kbuild: support enable -fno-verbose-asm by c_flags
The %.s object generate by -fverbose-asm default,
now we can enable -fno-verbose-asm by c_flags.

Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I40a832b4704740dd2a5199514528bb2d8f6db45e
2022-08-01 16:58:31 +08:00
Zhang Yubing
2703184e9d drm/rockchp: dw-dp: set a suitable hsync limit value
In actual test, the min hsync value is 9, So it just need filter
the display mode whose hsync value is less than 9.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I06bc52c1f8b45894ee9813c8d014e6a9e3f48df6
2022-08-01 16:45:41 +08:00
Wangqiang Guo
e3006fca4f media: i2c: it66353: fix it66353 no lock.
1.Config ddc/hpd/5v no bypass.
2.Add mutex_lock on dev_loop/hdmisel.
3.Fix tx_is_sink_hpd_high return err.
4.Config switch port hpd toggle time 2s.
5.Set EDID to print a 16-byte line.

Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
Change-Id: I26ad6b12e243405684785352c10f7835729c1bf4
2022-08-01 16:31:39 +08:00
William Wu
d360ef05db arm64: dts: rockchip: rk3566: disable usb2 lpm for xhci
The xHCI specification 1.1 does not require xHCI-compliant
controllers to always enable hardware USB2 LPM. However,
the current xHCI driver always enable it when seeing HLC=1.

On rk3566 platforms, the xHCI USB2 LPM is enabled by default.
And we found that a lot of USB Disks have USB2 HW LPM broken
issue when connected to rk3566 USB2 OTG interface.

Here are a part of special USB Disks with USB2 HW LPM broken:

1. idVendor=325d, idProduct=6410, Manufacturer: aigo
2. idVendor=21c4, idProduct=0cd1, Manufacturer: Lexar
3. idVendor=0951, idProduct=1666, Manufacturer: Kingston

When use dd command to write to these USB Disks, it may fail
with the following log:

[ 2844.700148] usb 7-1: reset high-speed USB device number 4 using xhci-hcd
[ 2889.072272] usb 7-1: reset high-speed USB device number 4 using xhci-hcd
[ 2921.498045] usb 7-1: reset high-speed USB device number 4 using xhci-hcd
......
[ 2953.923773] usb 7-1: reset high-speed USB device number 4 using xhci-hcd

Theoretically, we can add USB_QUIRK_NO_LPM individually for
these special USB Disks, however, it's diffcult to cover all
USB Disks. So it's better to disable the USB2 LPM for xHCI
on rk3566 platforms.

Change-Id: I2c180b68f41a4d25a4c860c32550f3a406eb2028
Signed-off-by: William Wu <william.wu@rock-chips.com>
2022-08-01 15:15:23 +08:00
William Wu
28e0999bee ARM: dts: rockchip: rv1106: disable usb2 lpm for xhci
The xHCI specification 1.1 does not require xHCI-compliant
controllers to always enable hardware USB2 LPM. However,
the current xHCI driver always enable it when seeing HLC=1.

On rv1106 platforms, the xHCI USB2 LPM is enabled by default.
And we found that a lot of USB Disks have USB2 HW LPM broken
issue when connected to rv1106 USB2 OTG interface.

Here are a part of special USB Disks with USB2 HW LPM broken:

1. idVendor=325d, idProduct=6410, Manufacturer: aigo
2. idVendor=21c4, idProduct=0cd1, Manufacturer: Lexar
3. idVendor=0951, idProduct=1666, Manufacturer: Kingston

When use dd command to write to these USB Disks, it may fail
with the following log:

[ 2844.700148] usb 7-1: reset high-speed USB device number 4 using xhci-hcd
[ 2889.072272] usb 7-1: reset high-speed USB device number 4 using xhci-hcd
[ 2921.498045] usb 7-1: reset high-speed USB device number 4 using xhci-hcd
......
[ 2953.923773] usb 7-1: reset high-speed USB device number 4 using xhci-hcd

Theoretically, we can add USB_QUIRK_NO_LPM individually for
these special USB Disks, however, it's diffcult to cover all
USB Disks. So it's better to disable the USB2 LPM for xHCI
on rv1106 platforms.

Change-Id: Ie058b65b963ce9a8aa72ae1a55a38f0c78d3a095
Signed-off-by: William Wu <william.wu@rock-chips.com>
2022-08-01 15:15:23 +08:00
Zefa Chen
74aca7167d media: rockchip: rv1106 vicap support dvp
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I8c5b3db27d4fef1f486763cf2018729b9745b4ea
2022-08-01 15:12:54 +08:00
Zefa Chen
0a274564e9 phy: rockchip: csi dphy support TTL mode
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ie2806026da6a126a4fd72b26cf26cdf85399fe90
2022-08-01 15:12:54 +08:00
Zefa Chen
23cad042e9 media: rockchip: vicap fixed bug for capture hdr raw with online mode
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I47df30b6e544977a96246cbfb5be1dd281e98aa4
2022-08-01 15:12:54 +08:00
Zefa Chen
b8e3b3e3ce media: i2c: sensor adapter support get/set dphy param with multi dev
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I4eb2a62e01eb9290d83e71532c3f6cef14c7df9c
2022-08-01 15:12:54 +08:00
Zefa Chen
e2cedb5e0d phy: rockchip: mipi-dcphy: support get phy param with multi dev
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I859d6e3f06bf38e77ba9ca7a2cd22ca78ca527c2
2022-08-01 15:12:54 +08:00
Zefa Chen
cd0558f059 media: rockchip: vicap: mipi csi2 not to notify error for fs/fe not match
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: If29fe6ffff561fcacab58891dd1060f95ae873ed
2022-08-01 15:12:54 +08:00
Zefa Chen
c92d93f2df media: rockchip: vicap fixed fs/fe not paire detect error
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ic39599613df38dd2407d6cf06f8b8dc2a5b33ef5
2022-08-01 15:12:54 +08:00
Zefa Chen
b096ef166e media: rockchip: vicap fixed csi2 notifier chain issue
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I896acc5586efd9b3614fb97674881c44022608a8
2022-08-01 15:12:54 +08:00
Zefa Chen
3bafc15055 include: uapi: rkcif-config.h: add cmd RKCIF_CMD_SET_CSI_IDX
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I91aa19d72e2442433231f158ba722d1393e04fa8
2022-08-01 15:12:54 +08:00
Chen Shunqing
f710bf284e regulator: wl2868c: add suspend/resume functions
If wl2868c power off in suspend, then the registers
will be reset, so we need to restored them after resume.

Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: Id7170a27f18fd9a640df358e0b13244036121d9f
2022-08-01 15:10:21 +08:00
Zhang Yubing
f7645e0726 arm64: dts: rockchip: rk3588s: assign vop aclk rate in vop node
In common case, the 500MHz vop aclk rate can satisfy the vop request.
For some high pixel clock case(8K@60Hz, 4K@120Hz, etc),the vop aclk
should enhance to 800MHz to avoid abnormal display issue.

When display a high pxel clock timing from bootloader to kernel, the
bootloader will set the vop aclk rate to 800MHz. The vop driver in
kernel will also set the vop aclk rate to 800MHz. But the clock driver
will set the vop aclk rate to 800MHz before the vop driver. The vop
aclk rate will change as: 800MHz->500MHz->800MHz, which will cause
a flicker.

To fix this issue, remove the vop aclk rate assign in clock controller
node, and define it in vop node.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I785fe464bba79bb2bcd63a8588d847edecef5a17
2022-08-01 14:58:37 +08:00
Chen Shunqing
37c7780120 media: rockchip: hdmirx: modify timing criteria
The hsync of some timings maybe bigger than 300.
If get hsync error, it could be very large, so we
think that is error if it's bigger than 500.

Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I57e8b462c3a224ba402d8ab1c20fd2c4c0f77a2c
2022-08-01 14:49:11 +08:00
Caesar Wang
e31f1b672c arm64: dts: rockchip: use SPDX-License-Identifier
Update all 64bit rockchip devicetree files to use SPDX-License-Identifiers.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: Ie983cca0d54cae8b5ad6d322d51eb7bbd265aa0a
2022-08-01 14:20:46 +08:00
Chen Shunqing
a1b5570871 media: rockchip: hdmirx: add cec enable config
HDMIRX and HDMITX cec cannot enable at the same time.

Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I825c552a57dd795d358108f95a1dc24391aa3f93
2022-08-01 14:12:32 +08:00
Weiwen Chen
c3724eaa3a ARM: configs: rockchip: rv1106: add rndis config
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I9d988fd416b50eb729ca42deccac233fd962403a
2022-08-01 09:21:35 +08:00
Dingxian Wen
2588aa2aa4 media: rockchip: hdmirx: fix yuv420 hblank timings err
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I4be46b636a0f2ee81fab509c794bbdf88c06aae2
2022-07-29 17:26:16 +08:00
Jake Wu
5fb8464990 gpio: support gpio expand chip aw9110
Signed-off-by: Jake Wu <jake.wu@rock-chips.com>
Change-Id: I370b77f578e7937712eedec830a1334ce938667b
2022-07-29 16:13:11 +08:00
XiaoTan Luo
60da6cd444 arm64: dts: rockchip: rk3588s-evb1-lp4x: add es8326_sound
Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: Id5c7289aa96ec1df2b7732889664220497e3dd10
2022-07-29 14:17:32 +08:00
XiaoTan Luo
c3eff600ee arm64: dts: rockchip: rk3588s-evb1-lp4x: add aw883xx_sound
Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: Ib102474f448a0445b3cbbd4502affe70ce1de915
2022-07-29 14:16:43 +08:00
Cai YiWei
e09cebac4b media: rockchip: isp: disable link vir isp when hw working
Change-Id: I1006c9320c30397b8ed106cb75039b10f55fd286
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-07-29 10:40:28 +08:00
Cai YiWei
a8b7cd32f2 media: rockchip: isp: 2 readback for support multishot large resolution
Change-Id: Idffbb0836c9981cc8390881ef82e7040ca5c1f05
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-07-29 10:40:28 +08:00
Cai YiWei
b3260da5e9 media: rockchip: isp: extend pixel to 32 for isp30 unite mode
Change-Id: I26030c63a9f255dc68a4d2b1bb9ba46718d81110
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-07-29 10:40:28 +08:00
Tao Huang
886c4597c8 arm64: rockchip_gki.config: Enable CONFIG_VIDEO_RK_IRCUT
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Icbbec65bfa0cd3e6a91137357eb6c3a752576e8f
2022-07-29 10:11:21 +08:00
Zefa Chen
2b1647e40e arm64: configs: rockchip_defconfig: enable CONFIG_VIDEO_RK_IRCUT
CONFIG_VIDEO_RK_IRCUT need config for imx415 module with rk3588 evb1
otherwise camera can't work in GKI mode
Because GKI does not compile __v4l2_async_notifier_clr_unready_dev,
the link relationship will be established only after all devices
on the dts link are registered

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ib7e244e0ab7ea1f19e4247ce0731f2a588c1d382
2022-07-29 09:42:04 +08:00
Wang Panzhenzhuan
7145f97cf5 media: i2c: cn3927v: add dev connection check before register
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Ie17227a89837ba994a70688c067d65dcd593367e
2022-07-29 09:40:14 +08:00
Algea Cao
a40352070e drm/rockchip: dw_hdmi: Fixed ID error when disable HDMI
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Iad2a8486d798b6a4ea0f1a0b41755ffcb4a554b7
2022-07-28 21:11:54 +08:00
Yu Qiaowei
a322f85b91 video: rockchip: rga3: Fix compilation error on kernel-4.19
drivers/video/rockchip/rga3/rga_iommu.c:38:11: error: implicit declaration of function 'kmap' [-Werror=implicit-function-declaration]
   vaddr = kmap(pages[taipage_num - 1]);

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I3f570c4812f4c308001cdd894799682faa18203e
2022-07-28 20:45:00 +08:00
Yu Qiaowei
0e669c6e25 video: rockchip: rga3: Fix for CONFIG_ROCKCHIP_FPGA=y
drivers/video/rockchip/rga3/rga_drv.c:1036:3: error: implicit declaration of function 'rga_power_enable_all' [-Werror=implicit-function-declaration]
   rga_power_enable_all();
   ^~~~~~~~~~~~~~~~~~~~
drivers/video/rockchip/rga3/rga_drv.c:1040:3: error: implicit declaration of function 'rga_power_disable_all' [-Werror=implicit-function-declaration]
   rga_power_disable_all();
   ^~~~~~~~~~~~~~~~~~~~~
drivers/video/rockchip/rga3/rga_drv.c: In function 'rga_drv_probe':
drivers/video/rockchip/rga3/rga_drv.c:1526:1: warning: label 'failed' defined but not used [-Wunused-label]
error, forbidden warning:rga_drv.c:1526
 failed:
 ^~~~~~
drivers/video/rockchip/rga3/rga_drv.c:1376:6: warning: unused variable 'i' [-Wunused-variable]
error, forbidden warning:rga_drv.c:1376
  int i, irq;

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I3a7bd21a2351b474df654a81b93f7f0c1560aac1
2022-07-28 20:43:22 +08:00
Damon Ding
4b8c0aef05 drm/rockchip: vop2: add plane mask assignment rule for rk3566
There are 3 planes and 3 mirror plane for rk3566. If both
exist in one vp, the mirror planes should be removed in
plane_mask drm_property.

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I15b776224ebfbaa19a0d9d3dca56828a980e0c54
2022-07-28 18:27:35 +08:00
Damon Ding
787097d01b drm/rockchip: logo: modify debug messages in get_framebuffer_by_node()
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I395019d6a908d5b06d4c5f75aa1b888408b5dff4
2022-07-28 18:27:35 +08:00
Yu Qiaowei
de9ba17c93 video: rockchip: rga3: generate register before inserting to-do list
In order to avoid mapping memory when the job pointer is invalid after abort.

Update driver version to 1.2.18

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I50a581f604e66975f87d1566a3dd1b2e95c7e2a3
2022-07-28 17:55:22 +08:00
Yu Qiaowei
1e6930e62f video: rockchip: rga3: add debug api about scheduler
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ia81032036b52df8727408fe64681611c54370ade
2022-07-28 17:55:22 +08:00
Yu Qiaowei
7d6ab956f1 video: rockchip: rga3: add status of the scheduler
This will be used to identify the running state of the current scheduler.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ib5cdff02e9aa6a32ac1f5e2916190aaa6141a687
2022-07-28 17:55:22 +08:00
Yu Qiaowei
953dcf650f video: rockchip: rga3: Fix post-processing of request timeouts
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ie985ced34241b3da2a5a68c302623023ca76a68e
2022-07-28 17:55:22 +08:00
Yu Qiaowei
b535c17671 video: rockchip: rga3: allow jobs in batch-mode to fail
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Id2b67f8e77c4668423289fcbca67a2bf26b4fdc7
2022-07-28 17:55:22 +08:00
Yu Qiaowei
14c0e4eed3 video: rockchip: rga3: kernel_commit adapted to batch mode
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I66852923d4179ab509d14cef12a88cc17553de22
2022-07-28 17:55:22 +08:00
Yifeng Zhao
ef5cd68c97 mmc: sdhci-of-dwcmshc: Support ACPI
1. Remove the dependence on the linux clock framework
2. Add clock setting method "SCLK"
3. Remove runtime PM
4. Remove quirks flag SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: Ieef3f45474447d8eb030f73aab23d2a5523290ac
2022-07-28 16:52:07 +08:00
Liang Chen
cf8b87bbec sched: optimize prio for kernel RT thread and kworker
In some cases, there are too much userspace high priority RT threads, which
cause kernel RT threads or kworkers block too long time. This config separate
kernel and userspace RT threads into two priority regions, priority 0~49 for
kernel and priority 50~99 for userspace, so that kernel RT threads is always
higher priority than userspace. This config also set RT policy for kworkers.

Change-Id: I87e03915dc0dd03cbcd91d211d2ef56c301451f9
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-07-28 16:30:51 +08:00
Caesar Wang
ed97e50c65 arm64/configs: rockchip_linux_defconfig: enable CONFIG_VIDEO_ROCKCHIP_RKISP1
Enable this config used in some old IP chips, e.g. rk3288/rk3399...Socs.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I015ac9fdab94f23c8c6cd14b2696cfdf03cc0f18
2022-07-28 14:26:59 +08:00
Sandy Huang
ce5a779a19 drm/rockchip: vop2: gamma maybe enable at uboot
gamma maybe enable at uboot, so we read dsp_lut state to adjust gamma
state is more correct.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ie8893e6136009874c140933b10a77d532e019aa1
2022-07-28 14:26:04 +08:00
Liang Chen
f2f9c7b160 sched/pelt: add sysctl node to set pelt halflife period
Default 32ms and only support 8ms/32ms:
    echo 8 > /proc/sys/kernel/sched_pelt_period
    echo 32 > /proc/sys/kernel/sched_pelt_period

Change-Id: I04bfa571c4f8bf6b8a16075b7553caf275cd9586
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-07-28 14:24:59 +08:00