Commit Graph

1072149 Commits

Author SHA1 Message Date
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
Cai YiWei
29d191c2fb media: rockchip: isp: enum multi isp size at power on
Change-Id: Iace3eb94bef514413708958c383f591b082cb341
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-07-28 14:20:37 +08:00
Cai YiWei
9a0c2a7dc8 media: rockchip: isp: unite mode to support multi dev for isp30
Change-Id: Ie590383b8b42952a257e294c656b02188de550d7
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-07-28 14:20:37 +08:00
Cai YiWei
f468eab640 media: rockchip: cif/isp support compat_ioctl32 for video
Change-Id: I6e02df9faeb64d71b0cb8033493c11a4267494a3
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-07-28 14:20:37 +08:00
Jon Lin
572d1d7548 spi: rockchip-sfc: Support ACPI
Change-Id: I84178e0945737945398d16ee59e4808a42cf1a99
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-07-28 14:06:22 +08:00
Jianwei Zheng
25da86fe62 usb: dwc2: Fix dwc2 OTG-HOST resume fails to recognize peripherals
This patch fix following two cases dwc2 resume does not recognize
peripherals.

1. plug in device after system suspend, then press the power-on
button to wake up,at this time the dr_mode is OTG, op_state is
still Peripheral, the Bit[0] of GINTSTS is 1 and the port power
is off, dwc2 will not resume at this time.

2. plug in device then press the power-on button to put the system
to sleep, then we press the power-on button to wake up the system,
At this time, the dr_mode is OTG, op_state is still Host, the Bit[0]
of GINTSTS is 1, dwc2 will not resume and working abnormally.

To resolve the first exception, we should call the dwc2_hsotg_resume()
directly to resume dwc2. To resolve the second exception, if the dwc2
is lost power during suspend like RK3326S platform, wo should reinit
the core to device mode, and after do dwc2_hsotg_resume, it can trigger
the ID status change interrupt if the OTG cable is still connect. Then
we can init it for host mode in the ID status change interrupt handler.
We can use the power on bit of Hprt register to distinguish whether
it is lost power during suspend.

Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
Change-Id: I7cd09bce993dcee8e5bfcaddd5fe884cdfab6b52
2022-07-28 11:05:54 +08:00
William Wu
5452a06eed usb: gadget: uvc: support zero copy with rockchip encoder
Some rockchip encoder (e.g RV1106/RV1103) support to reserve
UVC Header in the encoded image, this patch improve the uvc
driver to support zero copy for uvc formats MJPEG/H264/H265,
and no support zero copy for YUYV.

By default, the uvc driver disable the zero copy, you can
set the ${USB_FUNCTIONS_DIR}/uvc.gs*/uvc_zero_copy to 1
to enable the zero copy.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I19be26170d51f209f3196f546515be665481b8b5
2022-07-28 10:22:54 +08:00
Tao Huang
875964ad5d net: wireless: rockchip_wlan: bcmdhd: Call kernel_read/write() only when CONFIG_NO_GKI
kernel_read()/kernel_write() are missing from GKI symbol list.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iad8f6749840d8fdc6c80c751a3d229e9f04359de
2022-07-27 19:51:33 +08:00
Tao Huang
1659a56516 net: wireless: rockchip_wlan: bcmdhd: Enable CONFIG_BCMDHD_REQUEST_FW
GKI missing kernel_read/kernel_write symbol.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I277955b9054240e7f84f0830a9f1968bbf0f51f1
2022-07-27 19:46:03 +08:00
Sandy Huang
5aa1d0e08f drm/rockchip: vop2: fix double config done at one frame time
Maybe appear the following case:
-> set gamma
-> config done
-> atomic commit
   --> update win format
   --> update win address
   ---> here maybe meet vop hardware frame start, and triggle some config take affect.
   ---> as only some config take affect, this maybe lead to iommu pagefault.
   --> update win size
   --> update win other parameters
-> config done

so we add vop2_wait_for_fs_by_done_bit_status() to make sure the first config done take
effect and then to do next frame config.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I6ec67b374b3afd2bed4a57aa1e7b729964df1736
2022-07-27 18:16:29 +08:00
Xiao Yao
c7a58b42fc ARM: configs: rockchip: rv1106: add sdio/usb/tb wificonfig
Signed-off-by: Xiao Yao <xiaoyao@rock-chips.com>
Change-Id: I8f5252e59f892f0dee5137e1f913893de1676abe
2022-07-27 16:43:41 +08:00
Shaoxing Chen
9850c41c78 ARM: dts: rockchip: rv1106g-evb2-v10: add wireless-wlan node
Signed-off-by: Shaoxing Chen <csx@rock-chips.com>
Change-Id: Ib04abb48a5ac3234eda45e5ff6b6c629ac3330cd
2022-07-27 16:04:33 +08:00
Tao Huang
1701545271 drm/rockchip: vop2: Remove unnecessary check
Fix the following smatch warnings:

rockchip_drm_vop2.c:2892 rk3568_crtc_load_lut() warn: we tested 'vp->gamma_lut_active' before and it was 'true'
rockchip_drm_vop2.c:6995 vop2_setup_hdr10() warn: we tested 'vp->hdr_out' before and it was 'true'
rockchip_drm_vop2.c:7512 vop2_setup_dly_for_vp() warn: we tested 'vp->hdr_in' before and it was 'true'

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I239658d19924b12843efdee8edf89962df1dae0b
2022-07-27 15:32:40 +08:00
Liang Chen
867ebf0228 arm64: configs: rockchip_linux_defconfig: enable CONFIG_CPU_FREQ_GOV_INTERACTIVE
Change-Id: I412e6236facb852b3869c763a8ec3efa1c71d63f
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-07-27 15:10:20 +08:00
Liang Chen
57e5026c03 arm64: configs: rockchip_defconfig: enable CONFIG_CPU_FREQ_GOV_INTERACTIVE
Change-Id: I2243a3b384ed77781ebb351ee6ae23db8f99e3c8
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-07-27 15:10:14 +08:00