Commit Graph

1073474 Commits

Author SHA1 Message Date
Damon Ding
cc49e88e80 drm/bridge: sii902x: add FIELD2_OFST config
The reg FIELD2_OFST should be half the number of pixel/line
in interlace mode.

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I3b0de9199768d965a945bf5db5a0902f2103e30e
2023-02-01 16:38:06 +08:00
shengfei Xu
83274139e2 arm64: dts: rockchip: rk3588-rk806-dual: fix nldo1/nldo2/nldo3 supply
The input supply is always-on, so this mistake doesn't affect
whether the supply is actually enabled correctly.

Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: Ie6411c6fdcf4865290ba725d8203334f1bf8ad35
2023-02-01 16:12:24 +08:00
Wyon Bi
c4cc8de208 drm/rockchip: dw-dp: Fix a typo
Fixes: 7d048d6dac ("drm/rockchip: dw-dp: Add HDCP function support")
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I5882ae3d54340c7e25cf25b491ed3e6006f01c6c
2023-02-01 07:46:15 +00:00
Jianqun Xu
c36c85bec0 video: rockchip: dvbm: fix a compile warning
drivers/video/rockchip/dvbm/rockchip_dvbm.c: In function 'rk_dvbm_setup_iobuf':
./include/linux/kern_levels.h:5:18: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'dma_addr_t' {aka 'long long unsigned int'} [-Wformat=]

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Ia18c7da7ea47e168741f76365eedc6b9e630e527
2023-02-01 15:17:05 +08:00
Jon Lin
25f0206a15 spi: rockchip: Add print information in case of spi exception
Change-Id: I3c512486ae69b2d155a1f67bdb3ce34996796d90
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-02-01 15:03:53 +08:00
Jon Lin
b5c957981c dt-bindings: spi: spi-rockchip: Add description for rockchip,poll-only property
Change-Id: Ie007e5ec889398f662ac32ab36a668cadda23c61
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-02-01 15:03:53 +08:00
Jon Lin
a35843d230 spi: rockchip: Support cpu polling to complete transmission
The default is DMA and IRQ transmission mode. You can change the
transmission mode to only support cpu polling transmission by adding
"rockchip,poll-only" to the device-tree node.

Change-Id: Icee3f4e899533ee51caab68fb85ec45f64b89d91
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-02-01 15:03:53 +08:00
Jianqun Xu
a3c84f2024 rtc: rockchip: get match data with device_get_match_data
This patch fixes a compile warning as following:

drivers/rtc/rtc-rockchip.c: In function 'rockchip_rtc_probe':
drivers/rtc/rtc-rockchip.c:669:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  669 |  rtc->mode = (unsigned int)of_device_get_match_data(&pdev->dev);
      |              ^

Fixes: 7344989b7e ("rtc: support rockchip rtc")
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I53128355e34c6560ccd652631e67c8fc267928f5
2023-02-01 14:42:56 +08:00
Yu Qiaowei
dd3f143de6 video: rockchip: rga3: support tile8*8 mode
Update driver version to 1.2.24

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I821f4f41da8b446c437027360356b903c8f3000b
2023-02-01 14:27:41 +08:00
Yu Qiaowei
1aa8db89f7 video: rockchip: rga3: support win0 scaling in ABC mode
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I832bf19e899cf5bbe37c061a991fc29ce5aa947c
2023-02-01 14:27:41 +08:00
Finley Xiao
118acb18ba arm64: dts: rockchip: rk1808-evb: Fix supply for pd npu
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I5fbafe045699cf3f4c81234c6588bc2ffde0bab9
2023-01-31 14:46:44 +08:00
Damon Ding
31e2803cc9 FROMLIST: pwm: gpio: Add a generic gpio based PWM driver
This patch adds a bit-banging gpio PWM driver. It makes
use of hrtimers, to allow nano-second resolution, though
it obviously strongly depends on the switching speed of
the gpio pins, hrtimer and system load.

Each pwm node can have 1 or more "pwm-gpio" entries,
which will be treated as pwm's as part of a pwm chip.

Link: https://patchwork.ozlabs.org/project/linux-pwm/patch/1445895161-2317-8-git-send-email-o.schinagl@ultimaker.com/
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Ibdb28eca3239a3a8503c947667117a9b0e9427b9
2023-01-30 14:34:59 +08:00
Huang zhibao
b5dccad7be arm64: dts: rockchip: add RK3588 pcie ep demo board devicetree
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I84e58fb29df580c13467690d3c40addfcd2200a7
2023-01-29 15:28:04 +08:00
ZhiZhan Chen
71e2b90c40 ARM: dts: rockchip: rk3126c-evb-ddr3-v10-linux: disable ldo6 regulator when gt1x suspended
Change-Id: Icd439abe8b4420adf86c94e61c455ff19b006297
Signed-off-by: ZhiZhan Chen <zhizhan.chen@rock-chips.com>
2023-01-16 17:55:32 +08:00
ZhiZhan Chen
0e4da668ca input: touchscreen: gt1x: add support for without rst-gpio and power invert
Change-Id: I6015c19272c34f5dec76ce8172d951f85ea7a24c
Signed-off-by: ZhiZhan Chen <zhizhan.chen@rock-chips.com>
2023-01-16 15:17:22 +08:00
Chandler Chen
f33837ba44 video: rockchip: mpp: iep2: fix irq return err cause by work_mode check
work_mode reg is used for iep+vdpp combo IP to check running task,
which is meaningless and not writable in iep alone IP.
so if work_mode == 0, consider as iep alone IP, otherwise check the
value to determine current work mode.

Fixes: 767709ab16 ("video: rockchip: mpp: iep2: Add work mode setting")
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I4c063e352976170b3c68652e65b0421ef7a82f8f
2023-01-16 11:34:53 +08:00
Zefa Chen
824a24f406 media: rockchip: vicap use tasklet to done buf
when buffer needs to refresh the cache, which takes a lot of time and
is not suitable for execution in an interrupt

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I6b6e54cef62711787430b1b336db3476e3f93e69
2023-01-16 11:32:06 +08:00
Zefa Chen
c69ef7e2ae media: rockchip: vicap creates dummy buffer with the max sensor resolution
fixeds:
rkcif-mipi-lvds2: not active buffer, use dummy buffer, mipi/lvds stream[0]
rk_iommu fdce0800.iommu: Page fault at 0x00000000fc538000 of type write
rk_iommu fdce0800.iommu: iova = 0x00000000fc538000: dte_index: 0x3f1 pte_index: 0x138 page_offset: 0x0
rk_iommu fdce0800.iommu: mmu_dte_addr: 0x0000000000354000 dte@0x0000000000354fc4: 0x318d001 valid: 1 pte@0x000000000318d4e0: 0x000000 valid: 0 page@0x0000000000000000 flags: 0x0
rkcif-mipi-lvds2: ERROR: csi fifo overflow, intstat:0x10000, lastline:4785733!!

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ie66d805d91367eb9ac695788511c6c6cb648d799
2023-01-15 17:42:29 +08:00
Johnson Ding
d3f424655c arm64: dts: rockchip: rk3588: disable auto freq for IEP2, JPEGE and VPU
IP cores whose clock is under aclk_vdpu_low_pre should not be changed
after power on. If one reduce frequence of clock, others will be
affected and will take longer time to finished work.

Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
Change-Id: I631dd9a3f47c5811d6ae27f558a25a98d6022f49
2023-01-15 17:37:39 +08:00
Jon Lin
02af10c45f PCI: rockchip: dw: Support get_dma_status for polling DMA status
1.Support get_dma_status for polling DMA status
2.Remove the struct of dw_pcie from dmatest

Change-Id: Ifef2b9172234e597354d9ae410d3f39be55cc6a8
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-01-15 17:31:34 +08:00
Yandong Lin
a3332199c9 video: rockchip: mpp: fix crash issue causing by mpp->queue is null
Rootcause:

Those devices that do not have multicores but share one mpp_taskqueue,
due to the core_id is default value 0, will fail to attach workqueue.

Thus making mpp->queue = NULL and will crash when use mpp->queue.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I805aeadce1ec47ba18f2410864b83dca947655db
2023-01-15 17:29:08 +08:00
Wangqiang Guo
6ad4e59284 input: touchscreen: gsl3673_800x1280: change input io(sda/int) voltage 1.8v.
Change-Id: Ie39dc83ab67bfbccaf01bb2ebc5c0fe27a32d09c
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
2023-01-15 16:40:57 +08:00
Shawn Lin
8b40685086 PCI: rockchip: dw: Always record ASPM settings when suspend
At the beginning, we skip walking the PCIe bus if the root port is
in L0 to save the suspend time. However, when enabling L1ss, the
threshold from L0 to L1ss is quite longer than from L0 to L0s or L1.
So we may in the middle stage that PCIe link hasn't wait long enough
to do transition from L0 to L1ss, at that moment we may still in L0.
rk_pcie_downstream_dev_to_d0 won't be called in this situation and
we miss all the ASPM settings. Ideally, we should walk the bus and
decide if anyone of them was marked as ASPM enabled in advanced, then
record ASPM settings. But in this way, there is no difference by fixing
it just as leting remove link state judgement.

Fixes: 0a082fd9da ("PCI: rockchip: dw: Save&Restore L1SS in PM")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ic0cdf74271241dc78cfd5d23c6c027e82f35bde2
2023-01-15 16:37:55 +08:00
Yandong Lin
3c7779edf6 video: rockchip: mpp: fix task not proc in time in some abnormal case
If current task finish with soft timeout, the next
task in pending list will not get processing.

So, need to trigger again in mpp_task_timeout_work to
ensure that next task in pending task gets processed in time.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Iefa57c883eda81553c1b4c17be4f18c4dc83c946
2023-01-15 16:13:19 +08:00
Guochun Huang
6ae2a3fab2 drm/bridge: dw-mipi-dsi: support cmd packet send in lp/hs mode
Change-Id: Ib47c417ad1124e621e033781eb64b093bf987594
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2023-01-15 15:28:38 +08:00
XiaoDong Huang
5edc8e8d02 soc: rockchip: rk_fiq_debugger: support use dynamic fiq_sdei_event
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: If49800be5e8fb2f44ec14e4d82634e3f7e421156
2023-01-15 15:11:52 +08:00
XiaoDong Huang
5ac02a81ec firmware: arm_sdei: add sdei_interrupt_bind/sdei_interrupt_release
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: Iebc6ac271dcda9405a8fa6af9c4c501c250e4322
2023-01-15 15:08:41 +08:00
Jake Wu
220a9c553c arm64: rockchip_defconfig: Support usb gadget ncm.
According to gki commit eefebe6467 ("ANDROID: GKI: enabled CONFIG_USB_CONFIGFS_NCM=y").

Change-Id: I327abd68556be8627a3e1b138b4085a416d71395
Signed-off-by: Jake Wu <jake.wu@rock-chips.com>
2023-01-15 15:04:30 +08:00
Zefa Chen
9d9403797e media: rockchip: vicap: support frame skip after rv1106
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I0c43a43866af5c47ab8ae83c136f90264a7a3b85
2023-01-15 11:49:25 +08:00
Zefa Chen
e081a458d2 media: rockchip: vicap fix bug for resolution limit of scale channel
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ie459d4beb56343e39a2aabe8529f9091c9927393
2023-01-15 11:48:38 +08:00
Steven Liu
25c6974420 soc: rockchip: amp: support mcu amp
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I7be2858fae72bec07670cfa25da5a636833cab6b
2023-01-15 11:41:17 +08:00
David Wu
bef1cdaa3e net: phy: motorcomm: Set default value with 0xdcbf for RXCLK
Based on hardware testing, the change could improve the rising
edge and falling edge for RXCLK.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I6779f2c1bcdf0e3b9aaa1553e4456cd581304302
2023-01-15 11:25:22 +08:00
David Wu
a66e59f1ff arm64: dts: rockchip: rk3528: Set default value with level2 for RGMII_TX IO
Based on hardware testing, the change could improve signal quality for RGMII.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Ibba6130308f152922848687bb00c04a41efce5bc
2023-01-15 11:00:26 +08:00
Steven Liu
abfeb26cd6 arm64: rockchip_linux_defconfig: enable Rockchip AMP
Enable the following macros for AMP system:
CONFIG_ROCKCHIP_AMP=y

Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: Ie8335e429d0da4414994df553351611351c24704
2023-01-15 10:56:43 +08:00
Zefa Chen
544caf2af2 media: rockchip: vicap fixed Segment fault while sditf connect fail
Call trace:
  media_entity_remote_pad+0x18/0x48
  rkcif_stop_streaming+0x18/0x24
  __vb2_queue_cancel+0x38/0x274
  vb2_core_streamoff+0x28/0xac
  vb2_ioctl_streamoff+0x5c/0x8c
  v4l_streamoff+0x24/0x30
  __video_do_ioctl+0x2c4/0x3c4
  video_usercopy+0x360/0x6fc
  video_ioctl2+0x18/0x24
  v4l2_ioctl+0x4c/0x5c
  do_video_ioctl+0x7cc/0xb10
  v4l2_compat_ioctl32+0x5c/0x98
  __arm64_compat_sys_ioctl+0x104/0x158
  el0_svc_common+0xac/0x1ac
  do_el0_svc_compat+0x1c/0x28
  el0_svc_compat+0x10/0x1c
  el0_sync_compat_handler+0x60/0x8c
  el0_sync_compat+0x164/0x180

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I5f5224929a484c7a9c4931ccb1547d6036e08322
2023-01-15 10:11:29 +08:00
Finley Xiao
4973c13274 cpufreq: rockchip: Add support to add length
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I71b484902169eccab555bc1935b072e132494acc
2023-01-14 10:59:54 +08:00
Finley Xiao
968a56efdb soc: rockchip: opp_select: Implement rockchip_pvtpll_add_length()
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I3cb717edaf01358a50b4b0b0695214c9ba9981da
2023-01-14 10:59:54 +08:00
Wangqiang Guo
f0913acc7a arm64: rockchip_defconfig: enabled tp gsl3673_800x1280 8inch.
Change-Id: I48985d7821459a828f5f6b953bc3db7faa7f846d
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
2023-01-13 17:22:32 +08:00
Sugar Zhang
0a0a0b7606 ASoC: rockchip: i2s-tdm: Fix FIFO clear error on SLAVE mode
Workaround for FIFO clear on SLAVE mode:

A Suggest to do reset hclk domain and then do mclk
  domain, especially for SLAVE mode without CLK in.
  at last, recovery regmap config.

B Suggest to switch to MASTER, and then do FIFO clr,
  at last, bring back to SLAVE.

Now we choose plan B here.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Iac775ff092c6d16e0240459e60fc8112b54f61c6
2023-01-13 16:41:56 +08:00
Shawn Lin
347d734f2d PCI: rockchip: dw: Remove misleading debug output
Move "missing legacy IRQ resource" to else condition.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I8255c0b9bf878ca85c9cdce41be98fe1334b2f23
2023-01-13 15:39:11 +08:00
Wangqiang Guo
ede94cbc7e input: touchscreen: support tp gsl3673_8inch_800x1280.
Change-Id: I1b2885969a7ebace2494ec3a218808b9e6772b02
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
2023-01-13 06:01:22 +00:00
Cai YiWei
088c0fda47 media: rockchip: isp: fix rgb range for selfpath
Change-Id: Ie517b8d82e4f71856d5ac8aa2b8f19ebaea7089f
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-01-13 08:55:49 +08:00
Cai YiWei
27562c816b media: rockchip: isp: fix first frame loss
Change-Id: Ie00482a5b920425ccf0a655bc3a74595807632f9
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-01-13 08:55:39 +08:00
Sandy Huang
3f23ab2612 drm/rockchip: vop2: fix splash screen when adjust gamma
Fixes: 52c123bfd4 ("drm/rockchip: vop2: Move color cfg to atomic_flush")
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ida8d8ce7edd59015226fd7436c60610f510b5c05
2023-01-12 19:11:57 +08:00
Sandy Huang
ce44d00809 drm/rockchip: vop2: fix pre_scan_htiming error
Fixes: 9cb660cf9c ("drm/rockchip: vop3: sync with kernel 4.19")
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: If9ca7322b3c9ac6fa61b32920d27e5763d35ca72
2023-01-12 19:07:13 +08:00
Dingxian Wen
e9a95d3454 media: rockchip: hdmirx: Enhance stability when signal changes
1. Modify the polarity configuration.
2. Monitor timing changes using VMON_VMEAS/VMON_HMEAS interrupts.
3. Add sip_hdmirx_config operation, cooperate with bl31 reset
controller logic.
4. Configure the HPD low time to 1 second to enhance compatibility.

Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I4f55e0ece74df7c9e82391bae6afb4154fec96d9
2023-01-12 17:04:47 +08:00
XiaoDong Huang
1a07ab4ef3 firmware: rockchip_sip: support hdmirx config
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: I52c18d046b6fee1cf716bb49445952a510a34b5e
2023-01-12 17:04:21 +08:00
Cai YiWei
39b2e121c5 media: rockchip: isp: wait isp0 end for unite mode
Change-Id: Iab845b2439df202d3543883975c13aa9f27fee8e
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-01-12 16:27:09 +08:00
Frank Wang
0d694e35d4 phy: rockchip: inno-usb2: add devm action for otg wake lock
The otg wakelock should be destroyed when the device probe failed
or removed, else may cause the following kernel errors.

  list_add corruption. next->prev should be prev (ffffffc01209d3c8), but
  was 0000000000000000. (next=ffffff800350faf8).
  ------------[ cut here ]------------
  kernel BUG at lib/list_debug.c:25!
  Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
  Modules linked in:
  CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.10.110 #83
  Hardware name: Rockchip RK3562 EVB1 LP4X V10 Board (DT)
  pstate: 60400085 (nZCv daIf +PAN -UAO -TCO BTYPE=--)
  pc : __list_add_valid+0x6c/0x88
  lr : __list_add_valid+0x6c/0x88
  [...]
  Call trace:
   __list_add_valid+0x7c/0x98
   wakeup_source_register+0x120/0x160
   wakeup_source_register+0x120/0x160
   device_init_wakeup+0x60/0xf4
   [...]

So add devm action to fix it.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: If54a299a694414ad759002e4f6c4187448ccdb15
2023-01-12 10:47:56 +08:00
Jon Lin
e856d827c2 spi: rockchip-sfc: Support VER8
Change-Id: Ide16bcbec9056b5ba2b6ed18127d7a33d4b1f7bf
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-01-12 09:19:17 +08:00