Commit Graph

869050 Commits

Author SHA1 Message Date
William Wu
f39b590ea1 phy: rockchip-naneng-usb2: enable host port wakeup for rv1126
RV1126 PMU supports to enable USB interrupt as wakeup
source, include USB PHY irqs from OTG port and Host port.
In additionally, it needs to enable Host port wakeup in
GRF_SOC_CON0.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ia4d2b868a42afb9fe35d444d5df557c3b6c12b37
2022-08-04 15:48:02 +08:00
Felix Zeng
ccf145fa4f driver: rknpu: Update rknpu driver, version: 0.8.0
* Add SRAM memory allocation and manager support
* Improve job submit stability
* Add reset and mm node for debugging

Signed-off-by: Felix Zeng <felix.zeng@rock-chips.com>
Change-Id: Iab0fc924e9289f37b9d209ceb0f8fd6c60f3e8fa
2022-08-03 19:10:28 +08:00
Cai YiWei
e996f25f39 media: rockchip: isp: sync head for compressed data
Change-Id: Iabfba2ce0b9e8687f3935330f56ff3bb5c5e340b
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-08-02 09:18:49 +08:00
Cai YiWei
357a5ff353 media: rockchip: isp: fill extend line data for fix dhaz bug
Change-Id: I7271a57f4642aec71614598eb76df6fbfcdfe8b1
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-08-01 17:14:45 +08:00
Nickey Yang
5f900e8397 arm64: dts: rockchip: add rk3568j core ddr4 v10 board support
make ARCH=arm64 rockchip_linux_defconfig rk3568j.config
make ARCH=arm64 rk3568j-core-ddr4-v10.img -j8

Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: If728fe50328ab3aa098bb770bd5eaa42134d1d81
2022-08-01 16:44:48 +08:00
William Wu
81896279da 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-07-31 16:38:37 +08:00
Maxim Devaev
484aecfab9 UPSTREAM: usb: gadget: f_hid: optional SETUP/SET_REPORT mode
f_hid provides the OUT Endpoint as only way for receiving reports
from the host. SETUP/SET_REPORT method is not supported, and this causes
a number of compatibility problems with various host drivers, especially
in the case of keyboard emulation using f_hid.

  - Some hosts do not support the OUT Endpoint and ignore it,
    so it becomes impossible for the gadget to receive a report
    from the host. In the case of a keyboard, the gadget loses
    the ability to receive the status of the LEDs.

  - Some BIOSes/UEFIs can't work with HID devices with the OUT Endpoint
    at all. This may be due to their bugs or incomplete implementation
    of the HID standard.
    For example, absolutely all Apple UEFIs can't handle the OUT Endpoint
    if it goes after IN Endpoint in the descriptor and require the reverse
    order (OUT, IN) which is a violation of the standard.
    Other hosts either do not initialize gadgets with a descriptor
    containing the OUT Endpoint completely (like some HP and DELL BIOSes
    and embedded firmwares like on KVM switches), or initialize them,
    but will not poll the IN Endpoint.

This patch adds configfs option no_out_endpoint=1 to disable
the OUT Endpoint and allows f_hid to receive reports from the host
via SETUP/SET_REPORT.

Previously, there was such a feature in f_hid, but it was replaced
by the OUT Endpoint [1] in the commit 99c5150058 ("usb: gadget: hidg:
register OUT INT endpoint for SET_REPORT"). So this patch actually
returns the removed functionality while making it optional.
For backward compatibility reasons, the OUT Endpoint mode remains
the default behaviour.

  - The OUT Endpoint mode provides the report queue and reduces
    USB overhead (eliminating SETUP routine) on transmitting a report
    from the host.

  - If the SETUP/SET_REPORT mode is used, there is no report queue,
    so the userspace will only read last report. For classic HID devices
    like keyboards this is not a problem, since it's intended to transmit
    the status of the LEDs and only the last report is important.
    This mode provides better compatibility with strange and buggy
    host drivers.

Both modes passed USBCV tests. Checking with the USB protocol analyzer
also confirmed that everything is working as it should and the new mode
ensures operability in all of the described cases.

Link: https://www.spinics.net/lists/linux-usb/msg65494.html [1]
Change-Id: I5cd93f642e5696a84e58afc63aaaaf8e27c7d514
Reviewed-by: Maciej Żenczykowski <zenczykowski@gmail.com>
Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Maxim Devaev <mdevaev@gmail.com>
Link: https://lore.kernel.org/r/20210821134004.363217-1-mdevaev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit d7428bc26f)
2022-07-31 16:36:31 +08:00
Zorro Liu
26e4e8d4a9 arm64: dts: rockchip: rk3566-eink: remove private dmc_opp_table
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I67a150eed7519e68e67abca80ec3ee2105bbd74d
2022-07-29 21:56:09 +08:00
Cai YiWei
0948e63218 media: rockchip: ispp: support fec/orb image stabilization
Change-Id: Idf6b56d44bf9ab0c0137ffaca26436752f30b57d
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-07-29 10:35:43 +08:00
Cai YiWei
c0b2acc691 media: rockchip: ispp: fec to support output size crop by mesh
add rkispp-subdev pad2:Source set format API to support fec
crop output size by mesh size.

Change-Id: I8857547d1dc07ff033a50b1dc7bc2079a9221b12
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-07-29 10:35:28 +08:00
Hu Kejun
53880adeab media: rockchip: ispp: separate param/stats video device
Change-Id: I9cc94eb59b2704f27d16ce37aa6b8e8d33f84a7e
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-07-29 10:35:12 +08:00
Sandy Huang
3a237c9fa9 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'

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I239658d19924b12843efdee8edf89962df1dae0b
2022-07-28 11:05:25 +08:00
Sandy Huang
217848e479 drm/rockchip: vop2: add support rk3588 gamma
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I6be46a12d73890c61578f1dae7a88b9cb4271dfb
2022-07-28 11:05:25 +08:00
Algea Cao
4759980219 drm/rockchip: vop2: Save crtc id in rockchip_crtc_state
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Iadcf16d59241f4915421f5c3937d4abe0a9bc304
2022-07-28 11:05:25 +08:00
Sandy Huang
dc1a72c622 drm/rockchip: vop2: bcsh add support 8k
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I2ff73d12b9d6100c5bbfb96229166800841356ac
2022-07-28 11:05:25 +08:00
Andy Yan
037e236acc drm/rockchip: vop2: Only check pending done bits for rk3568
This is a workaround for rk3566/rk3568 only.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I6762ab146e810535643f9f59b99af2271febbab4
2022-07-28 11:05:25 +08:00
Andy Yan
21d354938d drm/rockchip: vop2: Make sure previout zpos update take effect before change it
We have the same LAYER_SEL&PORT_SEL register conflicts
issue as rk356x.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I68bf32499b04bba5b0089df2bb473673d9804b90
2022-07-28 11:05:20 +08:00
Andy Yan
d0c943dd95 drm/rockchip: vop2: Setup dly for vp even there is no plane
We notice there are many POST_BUF_EMPTY irq when user space
enable a video port but without any attached plane.

Setup dly in this situation can avoid the POST_BUF_EMPTY
irq storm.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I907eb1737ac134dda8b2d237584c9d2f2b917b5e
2022-07-27 20:44:02 +08:00
Jianwei Zheng
06df49a796 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-27 18:14:17 +08:00
Cai YiWei
f2ea4b9aec media: rockchip: isp: fix dhaz config for multi isp21
Change-Id: I1f9c36f14ec00e32147061e3f993004a7a0ad724
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-07-27 11:25:20 +08:00
Tao Huang
71309e64f4 drm/rockchip: drv: Fix drm_atomic_helper_duplicate_state() error check
Use IS_ERR() instead of checking for a NULL pointer when calling for
drm_atomic_helper_duplicate_state() failures.
drm_atomic_helper_duplicate_state() return an ERR_PTR()-encoded error
code on failure.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I95388698239a7e1bd2bfbedd2bd921bbf52372f0
2022-07-27 11:19:41 +08:00
Andy Yan
6d391ea7c6 drm/rockchip: vop2: Default give primary plane the lower zpos
Linux app always use the default zpos, and they thought:
Primary plane zpos < overlay plane zpos < cursor plane zpos.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I5d10be4c4a6463248a80fb2e3f6ff27e8b3cc414
2022-07-27 10:02:55 +08:00
Sandy Huang
818032bce2 drm/rockchip: vop3: move cluster mix config from vop_ctrl to cluster_regs
cluster mix config followed cluster, so we move mix register from
vop_ctrl to cluster_regs is more suitable.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I28d80ce9e902992870b9876296af3daa2f5add65
2022-07-27 10:02:11 +08:00
Sandy Huang
b056a462be drm/rockchip: vop2: add support RGB101010 and update dither config
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I616225d36ff3a7385c5937fc663ff063f0683b0c
2022-07-26 20:56:31 +08:00
Andy Yan
dbd13b592c drm/rockchip: vop2: Check for YUV2RGB for writeback
YUV2RGB is not supported by wb.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: Ib0ed42029522b3a16ea2fc09c7f2ca09ad4e121e
2022-07-26 20:56:30 +08:00
Andy Yan
070d6009ea drm/rockchip: vop2: Set correct possible_crtcs for writeback connector
We only register used vp. So the registered crtcs may less than
the total vp on vop.

Fix warning:

[    0.495636][    T1] Bogus possible_crtcs: [ENCODER:345:Virtual-345]
possible_crtcs=0x7 (full crtc mask=0x3)
[    0.495681][    T1] WARNING: CPU: 0 PID: 1 at
drivers/gpu/drm/drm_mode_config.c:638
drm_mode_config_validate+0x1f0/0x2e8
[    0.495697][    T1] Modules linked in:
[    0.495717][    T1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.10.43
[    0.495730][    T1] Hardware name: Rockchip RK3568 EVB1 DDR4 V10
Board (DT)
[    0.495741][    T1] pstate: 60800009 (nZCv daif -PAN +UAO -TCO
BTYPE=--)
[    0.495751][    T1] pc : drm_mode_config_validate+0x1f0/0x2e8
[    0.495765][    T1] lr : drm_mode_config_validate+0x1f0/0x2e8
[    0.495777][    T1] sp : ffffffc01003b8c0
[    0.495786][    T1] x29: ffffffc01003b8d0 x28: 0000000000000000
[    0.495804][    T1] x27: ffffff8003b23580 x26: 0000000000000001
[    0.495823][    T1] x25: 000000000000000f x24: ffffff8003bc2750
[    0.495839][    T1] x23: ffffffc0114aa4b8 x22: ffffffc0114aa438
[    0.495851][    T1] x21: ffffff8003bb4368 x20: ffffff8003bb4368
[    0.495863][    T1] x19: ffffff8003bb4360 x18: ffffffffffffffff
[    0.495879][    T1] x17: 0000000000049705 x16: 00000000000d42dc
[    0.495896][    T1] x15: 0000000000000113 x14: ffffffc01003b550
[    0.495911][    T1] x13: 00000000ffffffea x12: ffffffc011bbb7b0
[    0.495928][    T1] x11: 0000000000000001 x10: 0000000000000001
[    0.495945][    T1] x9 : 0000000000000003 x8 : ffffffc011a5b808
[    0.495961][    T1] x7 : ffffffc011bbb808 x6 : c0000000ffffbfff
[    0.495977][    T1] x5 : 000000000005ffe8 x4 : 0000000000000000
[    0.495993][    T1] x3 : 00000000ffffffff x2 : ffffffc011a5b788
[    0.496008][    T1] x1 : 4effea469dba5e00 x0 : 0000000000000000
[    0.496026][    T1] Call trace:
[    0.496041][    T1]  drm_mode_config_validate+0x1f0/0x2e8
[    0.496057][    T1]  drm_dev_register+0x16c/0x1f0
[    0.496074][    T1]  rockchip_drm_bind+0x4f4/0x568
[    0.496087][    T1]  try_to_bring_up_master+0x15c/0x1c8
[    0.496096][    T1]  __component_add+0xb0/0x198
[    0.496104][    T1]  component_add+0x10/0x18
[    0.496120][    T1]  dw_mipi_dsi_rockchip_host_attach+0x28/0xd8
[    0.496136][    T1]  dw_mipi_dsi_host_attach+0xd0/0x120
[    0.496149][    T1]  mipi_dsi_attach+0x24/0x38
[    0.496165][    T1]  panel_simple_dsi_probe+0x94/0x1c8
[    0.496180][    T1]  mipi_dsi_drv_probe+0x1c/0x28
[    0.496195][    T1]  really_probe+0x20c/0x3e8
[    0.496209][    T1]  driver_probe_device+0x54/0xb8
[    0.496224][    T1]  device_driver_attach+0x6c/0x78
[    0.496238][    T1]  __driver_attach+0xb0/0xf0
[    0.496253][    T1]  bus_for_each_dev+0x68/0xc8
[    0.496267][    T1]  driver_attach+0x20/0x28
[    0.496281][    T1]  bus_add_driver+0x168/0x1f8
[    0.496296][    T1]  driver_register+0x60/0x110
[    0.496311][    T1]  mipi_dsi_driver_register_full+0x54/0x60
[    0.496328][    T1]  panel_simple_init+0x30/0x44
[    0.496339][    T1]  do_one_initcall+0x48/0x2d8
[    0.496349][    T1]  kernel_init_freeable+0x254/0x2c4
[    0.496365][    T1]  kernel_init+0x10/0x108
[    0.496380][    T1]  ret_from_fork+0x10/0x18

Fixes: d8d8a665cd ("drm/rockchip: vop2: Only register used vp to drm")
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I537b953d5597eeae70110e218892edca1e83a243
2022-07-26 20:56:30 +08:00
Sandy Huang
412baa96f9 drm/rockchip: vop2: add support soft te for mipi cmd mode
some product will use gpio to instead of TE, so we add soft TE for all
vp.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Idb2d8b6a63c17308519761ae986f853b2baf0bc4
2022-07-26 20:56:21 +08:00
Sandy Huang
53cc08bec6 drm/rockchip: vop2: add support mipi dsi cmd mode panel
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I0f54723c5c1c45916e669ce21819a127dc5b415d
2022-07-26 20:55:44 +08:00
Sandy Huang
6663df1563 drm/rockchip: drv: add support soft TE mode to sync with panel ram
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I3d0cc0f6f941da61336f47062a8682210234b803
2022-07-26 20:49:31 +08:00
Andy Yan
0186ddb5d6 drm/rockchip: vop2: Check writeback fifo depth
The fifo depth of RK356X/RK3588 writeback is 1920x4/16.
A fifo_throd larger than this value will cause a empty(zero)
writeback.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: Id67209f7b162608dcba191ab23cf6eec11e3fc08
2022-07-26 20:49:30 +08:00
Jianqun Xu
794ba018b9 drm/rockchip: rockchip_drm_vop2 avoid division by zero
WARN on when the frame time is '0'.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Id949b5b9178f67b54622439e8f95c23236f6f1c9
2022-07-26 20:49:30 +08:00
Sandy Huang
e7becc05fc drm/rockchip: vop2: use fb->format->is_yuv to instead of is_yuv_support()
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I89d13b160cf9fb11ef0af449dc09288f4a920f39
2022-07-26 20:49:30 +08:00
Yiqing Zeng
723b9b41c4 media: i2c: add sensor driver sc3336
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: Ifcf3edab686b1c1fb52d25092797d2a843ce204c
2022-07-26 09:05:32 +08:00
Zefa Chen
4e1836b643 media: i2c: add sensor driver sc4336
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ic9dd56d8ea06fef25ff149cde55821e7794f7566
2022-07-26 09:05:32 +08:00
Yiqing Zeng
9c8d760238 media: rockchip: cif: add RKMODULE_GET_VC_FMT_INFO for get vc format
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I6ac9634859f2b8e7184f6fe4219d6a90e2608008
2022-07-26 09:04:06 +08:00
Sugar Zhang
5ff3028710 ASoC: rockchip: i2s-tdm; Fix frame sync duty cycle
There maybe a risk that FRAME sync is not 50% duty cycle
on TRCM mode, which will cause sound noise.

This patch wraps XFER-start with reset to fix this issue.

- Hold reset
- Enable XFER
- Release reset

e.g. RK3308

Enable TRCM:

  &i2s_8ch_0 {
      assigned-clocks = <&cru SCLK_I2S0_8CH_RX>;
      assigned-clock-parents = <&cru SCLK_I2S0_8CH_TX_MUX>;
      rockchip,clk-trcm = <1>;
  }

StressTest:

  /#!/bin/sh

  count=0

  while true
  do
      yes `echo -en "\x11\x11\x22\x22"` | tr -d '\n' | \
      aplay -D hw:1,0 --period-size=1024 --buffer-size=4096 -r 192000 -c 2 -f s16_le &>/dev/null &
      sleep 2
      rxd=`io -4 0xff300028 | awk '{print $2}'`
      echo "[$count]: $rxd"
      if [ "$rxd" != "22221111" ]; then
          echo "FAIL: mismatch: $rxd, expected: 22221111"
          break
      fi
      count=$((count + 1))
      killall aplay
      sleep 1
  done

Result:

Before:

[35]: 22221111
[36]: 22221111
[37]: 11110888
FAIL: mismatch: 11110888, expected: 22221111

[253]: 22221111
[254]: 22221111
[255]: 11110888
FAIL: mismatch: 11110888, expected: 22221111

[319]: 22221111
[320]: 22221111
[321]: 11110888
FAIL: mismatch: 11110888, expected: 22221111

After this patch:

PASS on 100000+ loop count.

[ 99998]: 22221111
[ 99999]: 22221111
[100000]: 22221111
[100001]: 22221111
...

Change-Id: I77931c529acb43ef0bf7468e2c74ac9ff419218e
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2022-07-25 20:37:12 +08:00
Binyuan Lan
cca13853a2 ASoC: rockchip: rk817-codec: enable mclk when reset
Solve the problem that LRCK level amplitude is not enough

Signed-off-by: Binyuan Lan <lby@rock-chips.com>
Change-Id: Id79df3de70cd525e1d5425d4177d774a514c45da
2022-07-25 14:59:53 +08:00
Jianlong Wang
988ec96181 arm64: configs: add rockchip_linux_docker.config
enable kernel config for docker

make ARCH=arm64 rockchip_linux_defconfig rockchip_linux_docker.config

Signed-off-by: Jianlong Wang <jianlong.wang@rock-chips.com>
Change-Id: Idf52c56a30d6918ea12fb985c14dacccfaeb2583
2022-07-25 10:00:18 +08:00
Tao Huang
61b0645108 video: rockchip: rga3: Fix for CONFIG_ROCKCHIP_FPGA=y
drivers/video/rockchip/rga3/rga_drv.c:1068:1: warning: label 'failed' defined but not used [-Wunused-label]

  MODPOST vmlinux.o
drivers/video/rockchip/rga3/rga_job.o: In function `rga_job_run':
drivers/video/rockchip/rga3/rga_job.c:364: undefined reference to `rga_power_enable'
drivers/video/rockchip/rga3/rga_job.c:403: undefined reference to `rga_power_disable'

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ie8633a6c74b3e684714e7ea71dab7c34a4221071
2022-07-22 14:18:16 +08:00
Nickey Yang
24134d3fea arm64: configs: add rk3568j.config
make ARCH=arm64 rockchip_linux_defconfig rk3568j.config

Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: I00332f2f73741b3cf8cec2c7ab0a660ab7cd324a
2022-07-21 19:08:50 +08:00
Damon Ding
5f535c5dba drm/rockchip: vop: add win2 color_key support for px30
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I8204f52275179d8d65102c8fd71f214e9449ea5a
2022-07-21 14:36:40 +08:00
Zefa Chen
4224568895 media: rockchip: rkcif reset all dev when trigger reset event
move monitor param to rkcif node
ag &rkcif {
	status = "okay";
	rockchip,cif-monitor = <3 200 1000 5 0>;
	/*
	 * index 0: monitor mode
	 *     val: 0 idle
	 *	    1 Continue mode, detect cut of stream or csi2 err
	 *          2 trigger mode, detect csi2 err
	 *	    3 Hotplug, detect hot plug or cut off stream or csi2 err
	 * index 1: monitor cycle
	 *     val: timer of monitor cycle, unit ms
	 * index 2: error interval
	 *     val: time of error keeping, such as 1000,
	 *	    mean atfer one second error still occur,force reset dev,
	 *	    the max timer to wait error stop
	 * index 3: err_ref_cnt:
	 *     val: timer error ref val for reset
	 * index 4: reset_by_user
	 *     val: set val 1 to control reset by user
	 */
};

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: If4da872c7ee3c5140f94e5cf331cab84005361d2
2022-07-20 17:38:15 +08:00
Yiqing Zeng
ae9884bb8d media: i2c: techpoint: tp2815 add D1 and support AHD combine with D1
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: Ibabe54eb6a473bc25e0cbf6663861c59a1f95107
2022-07-19 16:09:25 +08:00
Jon Lin
13508a8b2b drivers: rkflash: Support new devices
GD5F4GQ4UAYIG, F35SQA512M, F35UQA512M, DS35Q1GB, DS35Q4GM
GD25Q40B, GD25Q64C, GD25LQ128, XT25F32F, IS25LP512M, IS25WP512M, BY25Q256FSEIG

Change-Id: Ifb8c6094a167950220cf8e094f333fbde292bcc5
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-07-19 16:09:15 +08:00
Jianqun Xu
ec6c0b81b0 staging: ion: ion_system_heap fix error pool for free buffer pages
Fixes: da6f4621d7 ("staging: ion: ion_system_heap implement ION_FLAG_DMA32")

Change-Id: I05570cc45643921e6aaf1b35c3048450fbc52f60
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2022-07-18 15:11:51 +08:00
Marek Szyprowski
3d9c15bc2e BACKPORT: scatterlist: add generic wrappers for iterating over sgtable objects
struct sg_table is a common structure used for describing a memory
buffer. It consists of a scatterlist with memory pages and DMA addresses
(sgl entry), as well as the number of scatterlist entries: CPU pages
(orig_nents entry) and DMA mapped pages (nents entry).

It turned out that it was a common mistake to misuse nents and orig_nents
entries, calling the scatterlist iterating functions with a wrong number
of the entries.

To avoid such issues, lets introduce a common wrappers operating directly
on the struct sg_table objects, which take care of the proper use of
the nents and orig_nents entries.

While touching this, lets clarify some ambiguities in the comments for
the existing for_each helpers.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
(cherry picked from commit 709d6d73c7)
Change-Id: I62f0a356857420927f11e46ac9f9156e891b4d22
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2022-07-18 11:17:20 +08:00
Sugar Zhang
1d92183842 ASoC: rockchip: i2s-tdm: Fix panic on rockchip_dai_tdm_slot
SError Interrupt on CPU0, code 0xbe000011 -- SError
CPU: 0 PID: 7 Comm: kworker/u16:0 Not tainted 5.10.66 #107
Workqueue: events_unbound deferred_probe_work_func
pstate: 60c00009 (nZCv daif +PAN +UAO -TCO BTYPE=--)
pc : _raw_spin_unlock_irqrestore+0x28/0x60
lr : regmap_unlock_spinlock+0x18/0x28
sp : ffffffc01251b850
x29: ffffffc01251b850 x28: ffffff81039afa80
x27: ffffff810349b1b0 x26: ffffffc011aa5d20
x25: 0000000000000000 x24: ffffff8100023000
x23: 0000000000000030 x22: 0000000000003fff
x21: 0000000000001e7f x20: 0000000000000000
x19: 0000000000000000 x18: ffffffc0123d10c0
x17: 0000000000000080 x16: 00000000000000d8
x15: ffffffc0105db5c8 x14: ffffffc011668c18
x13: 0000000062b0642e x12: 7fffffffffffffff
x11: 0000000000000000 x10: 0000000000000030
x9 : 0000000100000001 x8 : ffffff8100325880
x7 : 0000000000000000 x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000000
x3 : 0000000000003eff x2 : 0000000000001e7f
x1 : 0000000000000000 x0 : ffffff8100023000
Kernel panic - not syncing: Asynchronous SError Interrupt
CPU: 0 PID: 7 Comm: kworker/u16:0 Not tainted 5.10.66 #107
Workqueue: events_unbound deferred_probe_work_func
Call trace:
 dump_backtrace+0x0/0x1c8
 show_stack+0x1c/0x2c
 dump_stack_lvl+0xdc/0x12c
 dump_stack+0x1c/0x64
 panic+0x150/0x3a4
 test_taint+0x0/0x30
 arm64_serror_panic+0x78/0x84
 do_serror+0xe0/0x100
 el1_error+0x94/0x118
 _raw_spin_unlock_irqrestore+0x28/0x60
 regmap_unlock_spinlock+0x18/0x28
 regmap_update_bits_base+0x78/0x9c
 rockchip_dai_tdm_slot+0x5c/0x94
 snd_soc_dai_set_tdm_slot+0xac/0x124
 asoc_simple_init_dai+0x64/0xc4
 asoc_simple_dai_init+0x74/0x178
 snd_soc_link_init+0x28/0x84
 snd_soc_bind_card+0x6b4/0xad0
 snd_soc_register_card+0xf8/0x114
 devm_snd_soc_register_card+0x48/0x90
 asoc_simple_probe+0x2a0/0x348
 ...

Fixes: 2b987b28a8 ("ASoC: rockchip: i2s_tdm: add support for tdm mode")
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ib5ceb2f21bad346285c814aaf4c367e71c44230a
2022-07-18 11:01:22 +08:00
Sugar Zhang
6f28ada495 ASoC: rockchip: i2s-tdm: Update params when it real changed
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I81c8ebb49e995f68c56848fbc5475ad305f50233
2022-07-18 11:01:22 +08:00
Shunhua Lan
6a8a7fa1da ASoC: rockchip: i2s-tdm: Don't do soft reset for slave mode
soft reset works on SCLK, which come from external device
when controller work as slave mode.

When SCLK disabled before reset done, the controller stalled
and can not recovery.

Instead, we do global reset for this issue.

Change-Id: If801aa03a01d42386f7cfa6145cd6d0af7a3b041
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2022-07-18 11:01:22 +08:00
Lian Xu
4e5f538e1e iio: imu: add the icm40605 driver
Change-Id: Iba2a7df01162636cb84bb05e649b1fc9489a8e0f
Signed-off-by: Lian Xu <xu.lian@rock-chips.com>
2022-07-15 15:54:36 +08:00