Commit Graph

1073451 Commits

Author SHA1 Message Date
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
Huang zhibao
bd09faf633 arm64: dts: rockchip: rk3588-nvr-demo1: fixed typec config
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I48029b69232fdd6eeaa7e6b96122248c8ff4a7dd
2023-01-11 17:19:57 +08:00
Ding Wei
32f89579b8 video: rockchip: mpp: Add vdpp subdevice refer codes
Change-Id: I8c14025b41bdff188d296d7be0556c3c91cc1328
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2023-01-11 17:13:15 +08:00
Chandler Chen
c87ed86861 arm64: rockchip_defconfig: enable CONFIG_ROCKCHIP_MPP_VDPP
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I4750f32b02a93fe201bafd18945030e1a2408a4c
2023-01-11 17:07:10 +08:00
Chandler Chen
fd1a600e6e video: rockchip: mpp: iep2: fix rk3528 iep2 issue
1.ensure hardware is being off status when task done
2.add soft reset process for iep
3.enable hw timeout
4.disable md_pre when md_lambda == 8

Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I700fffddc9a7a2c37b9790d938a243978fa3abdc
2023-01-11 17:06:46 +08:00
Ding Wei
767709ab16 video: rockchip: mpp: iep2: Add work mode setting
check work mode when irq

Change-Id: I46c772e5c8608d8c7aa7e3bec0331da1af4832d3
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2023-01-11 17:06:38 +08:00
Sandy Huang
0aa485861b drm/rockchip: vop3: update rk3528 dclk_div2 define according new trm
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I23799149469b890397032a3a81874738b380dcdd
2023-01-11 16:34:05 +08:00
Chandler Chen
599f27be79 ARM: dts: rockchip: rk3036: mpp vcodecs combo config
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: If899a109ef1a927499de98019e6719bcf8ead8ff
2023-01-11 15:54:49 +08:00
Chandler Chen
bd67858262 video: rockchip: mpp: workaround for rk3036 hevc & vdpu combo
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I42844249859f3a3dad8013f6ca7dc0f4e9a4e743
2023-01-11 15:54:42 +08:00
Jianqun Xu
76af1962e1 arm64: dts: rockchip: use rk3588s-pinconf.dtsi for rk3588s/rk3588
The rk3588s/rk3588 SoCs have 4 level for io drive-strength
2'b00: 2.5mA 100ohm
2'b01:   5mA  50ohm
2'b10: 7.5mA  33ohm
2'b11:  10mA  25ohm

Use rk3588s-pinconf.dtsi to only define specified drive strength levels.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Ibed41ab49cc0c0f955448dd1d0b75e57ce4cac63
2023-01-11 15:15:24 +08:00
XiaoDong Huang
67d6ff1f86 soc: rockchip: rk_fiq_debugger: fix error option when cpu offline
"cpu_online_mask" hasn't been cleared yet in CPUHP_AP_ONLINE_DYN stage.
So we use cpumask_any_but instead of cpumask_first.

Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: I0a29d18869f50ac584fc545d27045f631045d568
2023-01-11 14:19:30 +08:00
Chandler Chen
63526c3817 video: rockchip: mpp: link mode support for vdpu382
add rkvdec link info for vdpu382 version

Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I7ec36faf021de723257595f0df99cce4722442a0
2023-01-11 11:40:36 +08:00
Chandler Chen
de826e7c62 video: rockchip: mpp: rkvenc2: add hw_info for vepu540c
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: If8190891742e1d45f4c43fdbb1ea745c6949cc5a
2023-01-11 11:40:09 +08:00
Chandler Chen
3f2a30db66 video: rockchip: mpp: Add scaledown idx and change rkvdec reg num
1.add scaledown idx to trans_tbl
    2.change rkvdec reg num

Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I5f2911ce8285cda6159478bf9b02f8fa13361343
2023-01-11 10:55:53 +08:00
Chandler Chen
e585303f5e arm64: dts: rockchip: rk3528: compatible modify for rkvenc & rkvdec
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I4556d5bb659b9e4facabdba5608afe7b4a83ab27
2023-01-11 10:39:13 +08:00
Sandy Huang
1c7ef3aff9 drm/rockchip: dsi: add tv state support
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ib60a3b591d66154f2654a2be5cb046e9a17d66e5
2023-01-11 10:06:21 +08:00
Frank Wang
765b15bf79 usb: typec: tcpm: amend pd negotiated revision
Try to get the maximum PD revision which Type-C controller can
support from DT, and use this value to init the PD negotiated
revision instead of hard coded values 0x0300 (PD3.0).

This can fix at least the following two Type-C controllers issues:

1. FUSB302 failed to response PD Message "Get Source Cap Ext" if
   used the default negotiated revision PD_MAX_REV (PD_REV30)
   with MacBook (test on macOS 12.2.1).

2. ET7301B failed to detect the voltage status of the measured
   CC pin for vRd-3.0 if used the default negotiated revision
   PD_MAX_REV (PD_REV30) with some Type-C DP monitors.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I2c9bcc06ff2b3d678a6eab5013cec7f45cbda3dd
2023-01-11 09:49:04 +08:00
Frank Wang
072eecdf6b dt-bindings: connector: usb: add pd-revision property
This property is used to tell the maximum USB Power Delivery
revision which Type C controller can support.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ibc0b35096ae270cd6d0e67cbdb2e5b85604f43b3
2023-01-11 09:49:04 +08:00
Tao Huang
9b9f560ac9 arm64: rockchip_linux_defconfig: Disable unsupported ARM64 features
-CONFIG_ARM64_PTR_AUTH
-CONFIG_ARM64_AMU_EXTN
-CONFIG_ARM64_TLB_RANGE
-CONFIG_ARM64_BTI
-CONFIG_ARM64_E0PD
-CONFIG_ARCH_RANDOM
-CONFIG_ARM64_MTE
-CONFIG_ARM64_SVE

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iffe91d9bb9fa7154021980bdd2040189eb4380f0
2023-01-10 17:00:37 +08:00
Tao Huang
633e5b4abf arm64: rockchip_linux_defconfig: Disable erratum do not affects rk3588
-CONFIG_ARM64_ERRATUM_1418040
-CONFIG_ARM64_ERRATUM_1165522
-CONFIG_ARM64_ERRATUM_1286807
-CONFIG_ARM64_ERRATUM_1463225
-CONFIG_ARM64_ERRATUM_1542419
-CONFIG_ARM64_ERRATUM_1508412
-CONFIG_ARM64_ERRATUM_2054223
-CONFIG_ARM64_ERRATUM_2067961
-CONFIG_CAVIUM_ERRATUM_27456
-CONFIG_CAVIUM_ERRATUM_30115
-CONFIG_CAVIUM_TX2_ERRATUM_219
-CONFIG_FUJITSU_ERRATUM_010001
-CONFIG_HISILICON_ERRATUM_161600802
-CONFIG_QCOM_FALKOR_ERRATUM_1003
-CONFIG_QCOM_FALKOR_ERRATUM_1009
-CONFIG_QCOM_QDF2400_ERRATUM_0065
-CONFIG_QCOM_FALKOR_ERRATUM_E1041
-CONFIG_SOCIONEXT_SYNQUACER_PREITS

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I830c730289e7ff405c34e5a9c3e80ba38a71193e
2023-01-10 16:57:18 +08:00
Tao Huang
89082b519e arm64: rockchip_defconfig: Disable unsupported ARM64 features
The Cortex-A76 core supports:
The Armv8.2-A extension.
The RAS extension.
The Load acquire (LDAPR) instructions introduced in the Armv8.3-A extension
The Dot Product support instructions introduced in the Armv8.4-A extension.
The PSTATE Speculative Store Bypass Safe (SSBS) bit and the speculation barriers (CSDB, SSBB,
PSSBB) instructions introduced in the Armv8.5-A extension.

Disable follow ARMv8.3/4/5 features:
-CONFIG_ARM64_PTR_AUTH
-CONFIG_ARM64_AMU_EXTN
-CONFIG_ARM64_TLB_RANGE
-CONFIG_ARM64_BTI
-CONFIG_ARM64_E0PD
-CONFIG_ARCH_RANDOM
-CONFIG_ARM64_MTE
-CONFIG_ARM64_SVE

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I34b8af33b9ed64add2a5e17f6bfa4d3c7601c07f
2023-01-10 16:51:28 +08:00
Tao Huang
0e1976c067 arm64: rockchip_defconfig: Disable erratum do not affects rk3588
RK3588 Cortex-A76 version is r4p0.
1188873 Fixed in r3p0.
1165522 Fixed in r3p0.
1286807 Fixed in r3p1.
1463225 Fixed in r4p0.
2054223 Cortex-A710
2067961 Neoverse-N2

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I02b3f71d6b276c6bd1bdce35d8da0838748b954a
2023-01-10 16:47:27 +08:00
David Wu
0ef7394930 arm64: configs: rockchip: Enable RK630PHY config
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I7a1270bd40f5026d064543b52c08e7586a25e28d
2023-01-10 16:47:27 +08:00
David Wu
77f8a69780 net: phy: rk630phy: Fix the compile error
drivers/net/phy/rk630phy.c:97:37: error: incompatible pointer types passing 'int *' to parameter of type 'size_t *' (aka 'unsigned long *') [-Werror,-Wincompatible-pointer-types]
                efuse_buf = nvmem_cell_read(cell, &len);
                                                  ^~~~
./include/linux/nvmem-consumer.h:62:56: note: passing argument to parameter 'len' here
void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len);

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Iee69c589b532b067b57290bcb3e39f3402ea83e7
2023-01-10 16:47:27 +08:00