Commit Graph

1061410 Commits

Author SHA1 Message Date
Jianwei Fan
a72739e96e media: i2c: tc35874x: fix driver probe level
It will cause this sensor to fail to link to the vicap controller if
used late_initcall_sync. Because the probe level of vicap controller is
late_initcall.

Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I74a4606f0af16d860d7b28ba311b14efeda0c225
2021-12-14 11:01:47 +08:00
Wu Liangqing
42aecd6060 arm64: dts: rockchip: rk3588s-evb1: enabled sdmmc
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Change-Id: Ica4ae16241aa7b57848940043d55fb7b624bdfca
2021-12-14 09:59:06 +08:00
Damon Ding
56102c8698 drm/bridge: sii902x: modify the check of bus-format
Use the definition of MEDIA_BUS_FMT_XXX instead of the
definition of sii902x_bus_format.

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I72b4d92a1704f98f437a80d2a8afe16d9f6b003f
2021-12-14 09:58:24 +08:00
Herman Chen
e026e105c8 video: rockchip: mpp: rkvdec2: fix pagefault on start
Fix pagefault on decoder first task.

[  151.797045][    C0] rk_iommu fdc38700.iommu: Page fault at 0x00000000fefc0000 of type write
[  151.797071][    C0] rk_iommu fdc38700.iommu: iova = 0x00000000fefc0000: dte_index: 0x3fb pte_index: 0x3c0 page_offset: 0x0
[  151.797080][    C0] rk_iommu fdc38700.iommu: mmu_dte_addr: 0x0000000000305000 dte@0x0000000000305fec: 0x34f001 valid: 1 pte@0x000000000034ff00: 0x77aec407 valid: 1 page@0x0000000477aec000 flags: 0x6
[  151.797088][    C0] mpp_rkvdec2 fdc38100.rkvdec: fault addr 0xfefc0000 status 6b
[  151.797094][    C0] rk_vcodec: mpp_task_dump_mem_region:1654: --- dump mem region ---

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I991d86c931cdd07df85a6458cf1351c68ce87007
2021-12-14 09:54:27 +08:00
Herman Chen
99582ba73a video: rockchip: mpp: rkvenc2: Fix dual core issue
The rkvenc2 dual core mode will split one large frame into two tile as
task 0 and 1. The task 0 must be started before task 1 otherwise
hardware will generate error.

So we need some changes:

1. Bind two core into one taskqueue. If each core is binded to one
thread then the real hardware config and start timing is not certain.
NOTE: current mode still has case that one extra task is insert between
task 0 and 1.

2. Record core info and core id when multi-core is attached to the same
taskqueue.

3. Add prepare stage to decide which core is used to run the task and
set the struce mpp_dev *mpp in struct mpp_task.

4. Correspondingly the free task should use the mpp_task->mpp if it is a
multi-core mode task.

5. Remove mpp_iommu_attach in mpp_task_run. The mpp_iommu_attach is for
switching different devices which has shared resource like vpu and
rkhevc in rk3568 and rk312x. These chipsets are not supported on 5.10
kernel.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ide52d59cca3adec44e05ab4bfc5bac7d713ad628
2021-12-14 09:31:06 +08:00
XiaoTan Luo
76c84e0979 ASoC: dt-bindings: rockchip: Document: add headset/headphone jack && keys detect for multicodecs
Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: I4f31d009b3890a886d225eab8aa8717e76333ad9
2021-12-13 15:51:53 +08:00
XiaoTan Luo
524cac67f9 arm64: dts: rockchip: rk3588-evb1-lp4: add headset play/pause key
Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: Iaf7f179f19175d2956de2975b8893993ed9c30ba
2021-12-13 15:51:45 +08:00
XiaoTan Luo
f08221c208 ASoC: rockchip: multicodecs: add headset key button detect
Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: I320546bbb0c9c47695e9614aba4e222ce305299e
2021-12-13 15:51:45 +08:00
Zefa Chen
0e4ca9abc1 media: rockchip: cif support config compact mode during the frame end
in the case of dma capture enable by vicap

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I675580350005fba9567a19666843452c523f9773
2021-12-13 15:22:04 +08:00
Zefa Chen
4ab7d291f9 arm64: dts: rockchip: rk3588 mipi_csi2 remove power-domains
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I71b36f15e4c2583097d3a13c15d8274c7ba0065b
2021-12-13 15:21:08 +08:00
Zefa Chen
7b9b409079 media: rockchip: cif: add pm ctrl in video node open function
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ide54139fabfe7a70d33b14b56b6524ca639a41de
2021-12-13 15:20:58 +08:00
shengfei Xu
52d9400791 mfd: rk806: update rk806 IRQ table
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: Ib00435e710946c6b510c76122ed43ce0b134fe32
2021-12-13 15:02:53 +08:00
Wyon Bi
29bdeacb4b drm/rockchip: dw-dp: Fix bus format for split mode
Fixes: f9e002e86f ("drm/rockchip: dw-dp: Add full output bus format support")
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ib644ce28a5963082989e5345f046aca591c63166
2021-12-13 15:01:12 +08:00
Li Huang
b4874f0b2b video: rockchip: rga3: relax the limit of input resolution
Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: I667d73da2f2de20dc58e84ebc5aa89e06720ff2f
2021-12-13 14:38:41 +08:00
William Wu
c75c894db6 phy: rockchip: inno-usb2: adjust pre-emphasis and DC volt for rk3588
This patch aims to tuning the high speed Tx signal for
4 independent USB2.0 PHYs of RK3588.

1. Adjust the HS DC level voltage from design default
   4'b0110:0 to 4'b1001:+5.89%.

2. Adjust the HS Transmitter pre-emphasis current control
   from design default 2'b00 disabled pre-emphasis to
   2'b10 2x pre-emphasis current.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: If212a606113fd4409d9a33a25a04f8416336f6e4
2021-12-13 14:37:02 +08:00
Zhang Yubing
935c0455fd phy: rockchip: usbdp: fix the aux communication issue
The default aux tx amplitude level can't satisfied some
device, which will cause the aux communication failed.
Enhance the aux tx amplitude to a high level to be
compatible with different devices.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Idcb5cf2fcf91dda5985744acb4ad3e62c99ffba4
2021-12-13 10:55:52 +08:00
Finley Xiao
606e61abb0 arm64: dts: rockchip: rk3588s: Add dus clk for pd npu
The dus clk shouled be enabled before restore qos.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ic981fc6d680a9be4c441c946715bf709c4e83e7b
2021-12-10 21:50:50 +08:00
Huang zhibao
5a6b46c1a2 arm64: rockchip_defconfig: Enable RK860X
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I8fc14b02fbb371e20a486d06d0344081466d4e79
2021-12-10 14:31:28 +08:00
Herman Chen
b4c63fdbc2 video: rockchip: mpp: rkvdec2: change irq print
The rkvdec2 link mode irq print should print both link status and core
status.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I2fffc0935260e6f3dcb788dffc1a467e6be5a7cb
2021-12-10 14:22:49 +08:00
Algea Cao
5989ac192f drm/rockchip: dw_hdmi: Correct incorrect color format configuration
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Id3267a80c0893acbfdbbd64ed06bf4c24fec57ae
2021-12-10 14:20:44 +08:00
Algea Cao
1157a1b1a2 phy: rockchip-samsung-hdptx-hdmi: Support 4K60 tmds mode yuv420 output
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ia3f83bd77b7c7608e785edce9de81097ae7532ae
2021-12-10 14:20:35 +08:00
Wu Liangqing
1ed5987acc arm64: dts: rockchip: rk3588s-evb3: fix vbus5v0_typec gpio error
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Change-Id: I80b773441378b06943e2864fc8a576fe279d9fb6
2021-12-10 14:09:56 +08:00
Andy Yan
ae488c03ab drm: Not mark crtc state as connectors_changed when a writeback connector attatch to a crtc
The drm core will disable than enable a crtc when is marked as
connectors_changed.

But when we attach a writeback connector to a running
crtc, we really don't need this disable/enable, which
will black a running screen.

Change-Id: I636615f27424bc60496ffc487c218f60fb95d719
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-12-10 10:55:24 +08:00
Nickey Yang
356f8cb365 arm64: rockchip_linux_defconfig: Enable CONFIG_CHARGER_BQ25700
Signed-off-by: Hongming Zou <hongming.zou@rock-chips.com>
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: I5a97ac5dfb97a94965c16cea750bde958d242643
2021-12-09 21:07:41 +08:00
Hongming Zou
20a6024495 arm64: rockchip_linux_defconfig: Enable CONFIG_BATTERY_CW2017
Signed-off-by: Hongming Zou <hongming.zou@rock-chips.com>
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: I99acbe287ad2e8accb99160f611e2d2d8c8c8da7
2021-12-09 21:07:41 +08:00
Shawn Lin
17dda312c3 phy: phy-rockchip-snps-pcie3: Move phy mode settings to probe
Calling it from rockchip_p3phy_rk3588_init() will cause a timing
problem that PCIe3 enum and PCIe2 accessing combophy at the same
time which would cause problems. Changing PHY mux and enum devices
at the same time doesn't meet design purpose. So we also need to
move phy mode settings to probe as what comphy driver did.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I8689ed52db002a6eb0429bf528e2303fbf3cc449
2021-12-09 20:25:22 +08:00
Shawn Lin
8a60fab5f1 phy: rockchip: naneng-combphy: Fix pcie1ln-sel setting error
value[3] is the value need to set, but the offset is value[1]
or value[2]. We need offset here.

Fixes: e984bc2a96 ("phy: rockchip: naneng-combphy: Add config option for pcie1ln-sel")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ia5fca2bd4563e9618c52d601a47a28dc44fb48cc
2021-12-09 20:25:13 +08:00
Shawn Lin
0b2688736d Revert "phy: rockchip: naneng-combphy: Fix PCIe system PM"
This reverts commit 33d95b67b3.

As the probe of PCIe controller is threaded. So rockchip_combphy_pcie_init
may change PHY mux settings just between another controller's
signal accessing PHY. This doesn't meet design purpose. We should
keep mux settings ready before everything starts.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Iba59bd39741b97442b5f7fe91314aea3f1d0c533
2021-12-09 20:24:48 +08:00
Xing Zheng
a7878cec55 arm64: configs: rockchip_linux_defconfig: enable ES8326 codec
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I81df184ab2ee8f622b5b2ad738c29deb8fdf144e
2021-12-09 20:23:32 +08:00
Nickey Yang
ce731352ff arm64: dts: rockchip: add rk3588 pc demo board
V2:
  key: remove Non existent key
  panel: use simple-panel driver
  regulator: correct usb gpio
  gpio: add hub_en,camera_en
  fix some typo

V3:
  WIFI/BT: add support

V4:
 remove Makefile for easy rebase

V5:
 fixed wifi_pwren issue
 support pcie ssd
 increase Sdio Driver Strength Selection

V6:
 support es8326/es7243e/pdm sound
 Supports DP dual display
 fixed PINCtrl conflict

V7:
 support sc8886
 disabled pcie now for some board can not boot
 Add the hardware mouse layer

V8:
 support cw2017

Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: Ia516536751ac645b704b5cae9bb275bd48b5aba8
2021-12-09 20:22:49 +08:00
Zain Wang
3a963f10e7 arm64: dts: rockchip: rk3588-evb1-lp4-v10-ipc-6x-linux: remove something useless for ipc
Signed-off-by: Zain Wang <wzz@rock-chips.com>
Change-Id: Ief4fed08cc1945392502d13dafd61afd8ee4b32f
2021-12-09 20:21:02 +08:00
Shawn Lin
274a74d9ea PCI: rockchip: dw: Exit phy if failed to probe
Call phy_power_off and phy_exit if failed, so phy will
be reset and gated.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: If82b86704317e3a27217ab0c6a827af30463e7ba
2021-12-09 16:06:39 +08:00
Guochun Huang
52439761bf phy: rockchip: mipi-dcphy: fix PLL VCO restrictions
Frequency of VCO's output: 2600MHz ≤ Fvco ≤ 6600MHz

Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: Iace886293b9d30d0cedcae4ad56582109c5ee716
2021-12-09 16:04:02 +08:00
Guochun Huang
3278e8cadf phy: rockchip: mipi-dcphy: add init/exit helper
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: Ib045d0882c9ad6a446f104878b76acc7ff11243f
2021-12-09 16:02:06 +08:00
Guochun Huang
9dd3db9ef9 drm/rockchip: dsi2: add loader protect helper for kernel logo
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I8132c8c6146e110a1ec0f559ce9ee426a85dd7e2
2021-12-09 16:01:53 +08:00
Zefa Chen
c1c7e5ac5e arm64: dts: rockchip: fixed vcc_mipidcphy0 name error for rk3588 evb1
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I3f3a6e65e74c828fc7a32c294e642222816b9ba0
2021-12-09 15:56:27 +08:00
David Wu
5a13c9d63b arm64: dts: rockchip: Fix clock order for rk3588 gmac
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Ib4a7a472d8e19e94f97609e0239edf4ae148fafe
2021-12-09 15:46:50 +08:00
David Wu
258bcd24a8 ethernet: stmmac: dwmac: Fix RMII mode for rk3588
Fixes: e7c0f2bf29 ("net: ethernet: stmmac: dwmac-rk: Fix GMAC clock setting for RK3588")
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Id35424d0bf3847b3ad8788d9aca8b9e5f6f4a44e
2021-12-09 15:43:02 +08:00
Elaine Zhang
690f783013 arm64: dts: rockchip: rk3588: remove scmi_spll init
SPLL has been set in SPL and UBOOT.
Kernel resetting causes mipi display jitter.

Note: If without Uboot, SPLL needs to be set in advance.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I59475ce1ea7712069e6c4a445a432d77f19227d5
2021-12-09 15:39:53 +08:00
Li Huang
c82b5d3677 video: rockchip: rga3: Need soft reset after timeout
Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: I9ab0f20ddc645b7f689971d42d41284e2957333a
2021-12-09 15:30:27 +08:00
XiaoTan Luo
e81323a683 arm64: dts: rockchip: rk3588-evb1-lp4: use "multicodecs" instead of "simple-audio-card"
Used to support jack detection events

Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: Ie24eb93fbff9e2dcee12bb6de1ac96dd3e131fb5
2021-12-09 15:20:47 +08:00
XiaoTan Luo
191b628750 ASoC: es8323: remove HP/Headset detect and HP/SPK controls
and to do these in machine driver

Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: Ic95b7329700d65164651b519c9f9bfac81f3e800
2021-12-09 15:20:38 +08:00
William Wu
5ac62b80f7 usb: dwc3: fix runtime pm for rockchip
The default autosuspend delay of runtime pm is 5000ms,
it's too long for the application scenario of hot plug.
If usb plug out and plug in again in 5000ms, it will
fail to do runtime suspend/resume, and also fail to
do usb phy ops. For RK3588 Type-C USB3.1 Gen1, it needs
to do usb3 phy init for normal or flip orientation
during dwc3 runtime process. This patch sets the runtime
autosuspend delay to 100ms for user's normal hotplug
operation.

Given the autosuspend delay 100ms is very short, it may
cause the usb device role fail to connect to usb host
in the following case:

1. Use Type-C to Type-A cable, connenct RK3588 usb to PC.
2. The TCPM set the usb role as PERIPHERAL and call
   dwc3_usb_role_switch_set() -> __dwc3_set_mode() ->
   dwc3_runtime_resume() -> power on u2/u3 phy ->
   delay 100ms -> dwc3_runtime_suspend().
3. In the dwc3_runtime_suspend(), it will check the
   dwc->connected which can only be set to true in the
   dwc3_gadget_reset_interrupt().
4. If the PC usb host doesn't send reset signal within
   100ms, the dwc3 will do dwc3_runtime_suspend() and
   power off u2/u3 phy. This cause usb device not to
   be detected.

So this patch fix the runtime pm mechanism for usb device
role to forbid dwc3 enter runtime suspend if the desired
role is PERIPHERAL. And allow dwc3 to enter runtime suspend
again after the desired role is not PERIPHERAL. For the usb
host role, the xHCI platform driver has forbidden it to
do autosuspend, so we don't care the usb host role here.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I195a5fd7d8264108dd32f56f5b9bdb7f0e83da90
2021-12-09 15:11:47 +08:00
Andy Yan
81d9bd6936 drm/rockchip: vop2: Make sure the primary plane type is DRM_PLANE_TYPE_PRIMARY
Some times we want change a overlay plane defined in vop2_reg
to primary plane.

Change-Id: I5f563fb258a66278255be762ebdfca21b51aabd1
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-12-09 14:22:16 +08:00
shengfei Xu
d74ec4d675 mfd: rk806: update rk806 volatile reg range
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I8b0f8545ba429b33b84b0023c15b9426f979c55f
2021-12-09 14:18:30 +08:00
Huibin Hong
1e6591869b arm64: dts: rockchip: rk3588: fix arm-pmu interrupt number
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: I4667b93817b6035e9ebac98048bd52eef2ced5d0
2021-12-09 11:54:43 +08:00
William Wu
9727315f6e arm64: dts: rockchip: rk3588-evb2: set dr_mode to peripheral
Set the dr_mode to peripheral for rk3588-evb2 and
rk3588s-evb2 which can't support usb mode detection
automatically for the time being.

In the near future, we will support usb device/host
mode switch by software, then we can revert this patch.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I618b7e32eabb2b4106f0f844125fca5c85ce33c8
2021-12-09 11:41:30 +08:00
William Wu
667d2fb962 arm64: dts: rockchip: rk3588-evb: fix dr_mode and max speed for usb3_0
1. Set the dr_mode to otg for rk3588-evb and rk3588s-evb;
2. Remove the maximum-speed hs limit for rk3588s-evb;

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ia6ab7e259207fc33c2e38bd8ae4864f06b4bf3d8
2021-12-09 11:40:53 +08:00
Jianqun Xu
cc655d45d0 video: rockchip: rga2 use dma-buf-cache
Change-Id: Ic1b37308b9fe5d8558ed73eb576398e0f0f05290
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-12-09 10:55:09 +08:00
Jianqun Xu
cd5c6a5b3a drm: rockchip: use dmabuf cache
Change-Id: I6a34a5a4f33e54b7459461bcfa84f03a831d2f65
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-12-09 10:55:09 +08:00