Commit Graph

1060572 Commits

Author SHA1 Message Date
Jon Lin
12eed805a7 arm64: dts: rockchip: Add PCIe definition for rk3588 evb
Change-Id: I79c3eb85a6600aefcdd174b2b0b9d35c95b5b789
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-11-03 14:09:34 +08:00
Ding Wei
78162b4b90 video: rockchip: mpp: mpp_iommu_refresh via rockchip_iommu funcs
reason:
1. might_sleep is called by pm_runtime_xx, thus, it cannot covered by
   rcu_read_lock/unlock which is atomic context.
2. it need use device_links_read_lock/unlock when meets
   dev->links.suppliers. however, device_links_read_lock/unlock are
   not export symbols.
thus use rockchip_iommu_disable/enable instead.

Change-Id: I545eced499533383f6cfbdf81e696064f42b6c3e
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-11-03 11:26:59 +08:00
Wu Liangqing
46dcc1502c arm64: dts: rockchip: rk3588-evb: add rtc hym8563
Change-Id: I7dd35f795d3abb20d38f202787cff385c4db6c6e
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2021-11-03 11:23:43 +08:00
Tao Huang
010d9df4b9 arm64: dts: rockchip: Adjust node name for rk3588 evb
rk_headset -> rk_headset: rk-headset
vbus5v0_typec: vbus-typec-regulator -> vbus5v0_typec: vbus5v0-typec
vcc5v0_host: vcc5v0-host-regulator -> vcc5v0_host: vcc5v0-host

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I888a2adc48efa33310f7c00d0fe90cb14a511801
2021-11-03 10:26:59 +08:00
Shunhua Lan
ea6ea2ba87 arm64: dts: rockchip: adjust sound cards for rk3588-evbx and rk3588s-evbx
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: Ibd874890ae7124b3337ce9817710c657bd1bc6ed
2021-11-03 09:42:19 +08:00
Finley Xiao
ff595b5c1a arm64: dts: rockchip: rk3588s: Fix dependence for some power domains
Because of the signal relationship, PD_VDPU should be power up if
PD_RKVDEC0 or PD_RKVDEC1 wants to work, PD_NVM should be power up if
PD_SDIO wants to work, PD_VOP should be power up if PD_VOP0 wants to
work.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I3b85124dcb979ee154acbc89082b83ed31cdf9ab
2021-11-02 20:23:26 +08:00
Tao Huang
d6c2b5d6e4 arm64: rockchip_defconfig: update by savedefconfig
-CONFIG_MALI_MEMORY_GROUP_MANAGER=y
-CONFIG_TOUCHSCREEN_GSLX6801=y
-CONFIG_TOUCHSCREEN_GSLX680_VR=y
-CONFIG_TOUCHSCREEN_GSL3673_800X1280=y
-CONFIG_TOUCHSCREEN_GSL3676=y
-CONFIG_TOUCHSCREEN_GT9XX=y
-CONFIG_TOUCHSCREEN_HYN_CST2XX=y
-CONFIG_TOUCHSCREEN_WACOM_W9013=y
-CONFIG_TOUCHSCREEN_FTS=y
-CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5=y
-CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEVICETREE_SUPPORT=y
-CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_I2C=y
-CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEVICE_ACCESS=y
-CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_LOADER=y
-CONFIG_DEVFREQ_THERMAL=y
-CONFIG_MALI_BIFROST_DEVFREQ=y
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-# CONFIG_LCD_CLASS_DEVICE is not set
-# CONFIG_BACKLIGHT_GENERIC is not set
-CONFIG_PM_DEVFREQ=y
-CONFIG_PHY_ROCKCHIP_INNO_MIPI_DPHY=y

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I744730358d42051459cadcb2d51e9f9aa037f3a2
2021-11-02 19:23:30 +08:00
Tao Huang
16b9f3e8e1 arm64: rockchip_gki.config: Enable CONFIG_PHY_ROCKCHIP_SAMSUNG_DCPHY
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ia00b7ed9e0148d8456bab9d4efeab4c1962d5940
2021-11-02 18:59:28 +08:00
Tao Huang
d2c5e113e1 arm64: rockchip_defconfig: Enable CONFIG_PHY_ROCKCHIP_SAMSUNG_DCPHY
The driver is used by RK3588.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ib421b9132cf88af90b81168771595b402d805866
2021-11-02 18:59:14 +08:00
Guochun Huang
4cdbce78fa phy: rockchip: mipi-dcphy: add support for rk3588
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I7f7c72147607baf14fa039d033b8e9a64d76d82f
2021-11-02 18:59:06 +08:00
Finley Xiao
10684c3d35 soc: rockchip: power-domain: Avoid adding a domain repeatedly
As one domain may have multiple parent domains, so the domain may
appear multiple times in pmu device node, it will be added repeatedly.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I2d87c265d52c4e767d710f41dac6dd11b91baa69
2021-11-02 18:40:23 +08:00
Andy Yan
77359bd785 drm/rockchip: vop2: Check rotation for cluster window at non-afbc mode
Cluster window only support rotation(x/ymirror, rotation90/270)
at afbc mode.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I6439a59793f724bd5d0e643c2d02486cce733165
2021-11-02 18:30:39 +08:00
Andy Yan
ab4a52e2ee drm/rockchip: vop2: Add port mux translation for rk3588 mipi dsi
The port mux configuration of two mipi dsi hosts on rk3588 break
the direct mapping rules used on other soc and other connector
interfaces. We need add a translation here.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: If3d6ae26c685e40e00e8c783b28856be3ec2d524
2021-11-02 18:30:15 +08:00
Sandy Huang
6711962e5f drm/rockchip: vop: update crtc feature
1. add overscan feature to indicate rk3588 can't support overscan;
2. add more feature info for rk3588;
3. fix some feature character error;

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I708e506db87c36078453232530bfb4d78e779010
2021-11-02 18:27:28 +08:00
Sugar Zhang
85c5befc71 arm64: dts: rockchip: rk3588: Add power-domains for audio device nodes
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Iaa3de6a7481e161a6a0a9441516ed6b1f1dfc867
2021-11-02 18:17:32 +08:00
Huibin Hong
a91e489eea fiq_debugger_arm64: Fix running bt command causes Oops panic
Setting frame.prev_type to STACK_TYPE_UNKNOWN to solve it.
prev_type is new for struct stackframe of linux5.10 arm64.

Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: I6df1d6b860a79f4e15e3ce40f6471aa1de02f986
2021-11-02 18:17:21 +08:00
Sugar Zhang
83c37e606b ASoC: dt-bindings: rockchip: Add compatible string for rk3588
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ieeb917923a2721448915d81caaeb5961d1fb7c30
2021-11-02 18:03:40 +08:00
Sugar Zhang
c804bc7cf4 ASoC: rockchip: i2s-tdm: Add support for rk3588 SoC
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ib613813d75660c8771ed4dc248f8c9837a2a9d53
2021-11-02 18:03:40 +08:00
Elon Zhang
dac5baaa79 ARM: dts: rockchip: add optee node
Add optee node to supply OP-TEE required properties
for Android products which need OP-TEE enable default.

/optee node is supposed to be below /firmware node.

Change-Id: Ie0e483e02336def9feba47bbfbebdd8d8693d480
Signed-off-by: Elon Zhang <zhangzj@rock-chips.com>
2021-11-02 18:03:02 +08:00
Elon Zhang
a42bf32b08 arm64: dts: rockchip: add optee node
Remove default optee node in SoC core devicetree because optee
is not an inherent component in SoC.

Add optee node to supply OP-TEE required properties for Android
products which need OP-TEE enable default.

Change-Id: I0754a3498c5e6d7b7db57bb35c42c3875afd27c9
Signed-off-by: Elon Zhang <zhangzj@rock-chips.com>
2021-11-02 18:03:02 +08:00
Tao Huang
34b8de920b arm64: rockchip_gki.config: Enable CONFIG_SND_SOC_ROCKCHIP_I2S/SPDIFRX
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I6465604705f6c4d03059cdf01275949a6833a64b
2021-11-02 15:26:39 +08:00
Sugar Zhang
0e437bc40b arm64: rockchip_defconfig: Enable i2s/spdifrx config
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ie6e49d1a48acab3e3e1aa74ba8394d7b5df7bd81
2021-11-02 15:25:04 +08:00
Sugar Zhang
0e5036c7b4 ASoC: rockchip: Add support for spdif receiver
The SPDIF receiver is a self-clocking, serial, unidirectional
interface for the interconnection of digital audio equipment
for consumer and professional applications.

Change-Id: Ic73337671b37c8c45352e523a875281edd552d1b
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-11-02 15:24:42 +08:00
William Wu
9228f832cd arm64: dts: rockchip: rk3588: add usb nodes for evbs
This patch add vbus regulator and fusb302 nodes for
rk3588 and rk3588s evbs, and also disable unused usb
controllers and phys node.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I59678e7cd34de76ed09cc55010a1d8533fe58602
2021-11-02 15:15:52 +08:00
Lin Jinhan
b56b10f007 arm64: dts: rockchip: rk3588s: add rng node
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Ifb8964053daa6b593dd2c2c6a3b8caab8526e56d
2021-11-02 15:12:50 +08:00
Lin Jinhan
c6aead9a16 arm64: dts: rockchip: rk3588s: add crypto node
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I516df4d5719f101c92fc39dd7b62af1a80c40777
2021-11-02 15:07:02 +08:00
Jianqun Xu
17e9559f67 arm64: dts: rockchip: rk356x-evb: fix pcie supply to regulator-fixed
The pcie supply design is (rk3566 evb2 example)
DC12V
  -> VCC12V_PCIE(controlled by GPIO0_C2_H)
  -> VCC3V3_PCIE(controlled by GPIO0_C2_H)
  -> VCC5V0_SYS
       -> VCC3V3_PI6C(controlled by GPIO0_C2_H)

The pci phy driver only want to enable or disable the VCC3V3_PCIE power.

Suggested from pcie owner to ignore the VCC12V_PCIE and VCC3V3_PI6C, so
the dts only need to add regulator node for VCC3V3_PCIE.

Most of time we keep the regulator name same as the hardware design, so
the dts node is
    vcc3v3_pcie: gpio-regulator {
        compatible = "regulator-fixed";
        regulator-name = "vcc3v3_pcie";
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
        enable-active-high;
        gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
        vin-supply = <&dc_12v>;
    };

The regulator type is "regulator-fixed" since its voltage always be
3.3v, min and max should be 3300000 make the regulator has a voltage
value.

The regulator can be enabled or disabled by regulator_enable or
regulator_disable function, so make the GPIO0_B7 as "ena_pin" for the
regulator.

The regulator is supplied by DCIN_12V, so add the vin-supply.

Some boards need a delay before enabling trainning for power to be
stable from the measurement.

By measurement, 5ms is enough for power and refclk to be stable.

Change-Id: Iaf70abe9c9e06504af067dc0e3d60b775557c026
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-11-02 14:43:52 +08:00
Jianqun Xu
eff93358f1 pci: dwc: rockchip: fix pci power enable/disable
Change-Id: I4337746b7db995b3c6de29b50b9edc7a6bc10a81
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-11-02 14:38:57 +08:00
Shawn Lin
959a4d84f2 mmc: dw_mmc-rockchip: Improve v2 tuning
v2 tuning has a defect that if invalid space is laid
between 90 and 180, and the PVT might make the invalid
space back and forth. To overcome this weakness, we don't
need to select phase from beginning, and should directly
chose the next one against the last phase selected.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I0cbeb1dba524c2e23a3719d28b868af3ed49e20b
2021-11-02 14:38:57 +08:00
Guochun Huang
a124131bab drm/rockchip: dsi: add to get dsc info from dts
Change-Id: Idbf1503e775a26d24ba1965495d531e30b7cc6c6
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-11-02 10:25:20 +08:00
Sugar Zhang
131a63013b arm64: dts: rockchip: rk3588: Add property for dedicated i2s nodes
These controllers only have playback or capture capability.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I69791088e4fd3e9a623b938279a7580b928dc89a
2021-11-01 20:31:21 +08:00
Sugar Zhang
f3378c3aa6 ASoC: dt-bindings: rockchip: Add compatible for rk3588 codec digital
This patch adds compatible string for rk3588 codec digital.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Iaaceed2f8a9a64e6e6616d5105b3910bb839f13f
2021-11-01 20:30:55 +08:00
Sugar Zhang
b906f67703 ASoC: rk_codec_digital: Add support for rk3588 SoC
This patch adds support for rk3588 SoC.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I8dbd270afce20f6c2f3573a15129c4dff8eb1b12
2021-11-01 20:30:44 +08:00
Sugar Zhang
08e779ab0c ASoC: dt-bindings: rockchip: Add compatible for rk3588 pdm
This patch adds compatible string for rk3588 pdm.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ie64bfb76b5d5776856623c09281a9bd85fe48447
2021-11-01 20:30:27 +08:00
Sugar Zhang
3ce4fe6dca ASoC: rockchip: pdm: Add support for rk3588 pdm
This patch add support for rk3588 pdm which is the same
with rv1126.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I5df248970c9fdfd27e048cc1a6bb60898c50e8f3
2021-11-01 20:30:09 +08:00
Sugar Zhang
8af9719df9 ASoC: dt-bindings: rockchip: Add compatible for rk3588 spdif
This patch adds compatible string for rk3588 spdif.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Id984b337bfbc3dfe92d03b789003fcc0a9612a30
2021-11-01 20:29:42 +08:00
Sugar Zhang
3f861f2110 ASoC: rockchip: spdif: Add support for rk3588 spdif
This patch adds support for rk3588 spdif which is the same
with rk3366.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ia6677fc9281868edd9960337aa9726b36b754e3e
2021-11-01 20:29:42 +08:00
shengfei Xu
5aa669c9f1 arm64: dts: rockchip: rk806: fix the name for the nldo4
the name is consistent with the schematic diagram of the hardware.

Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I97c7bebcf1358e461ab37846e0b0034483e20760
2021-11-01 20:21:24 +08:00
Jianqun Xu
7c8d7f9e36 arm64: dts: rockchip: rk3568-evb fix vcc5v0_usb nodes
Add min/max voltage for usb regulators, also add vin-supply for them.

From rk3568-evb1 hardware design, the power tree about usb is
DC12V
  ->  VCC5V0_USB(controlled by EXT_EN from PMIC)
        ->  VCC5V0_HOST(controlled by GPIO0_A6)
	->  VCC5V0_OTG(controlled by GPIO0_A5)

The EXT_EN from PMIC RK809 is designed for device power off to cut off
the usb 5.0v power, during system on, it keeps always on.

Change-Id: I21e431b4b41022b101b6db92b0769d096679b67c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-11-01 20:12:47 +08:00
ZiHan Huang
18a99b5a86 arm64: dts: rockchip: add rk3588 linux base dts
Signed-off-by: ZiHan Huang <zack.huang@rock-chips.com>
Change-Id: Ib59ec583e110f2fcb0599ca5c591c55e01518e44
2021-11-01 20:10:57 +08:00
Yifeng Zhao
d69e2f24c6 arm64: dts: rockchip: rk3588: modify sdhci compatible to matching drive
Fixes: 0d390428b5 ("arm64: dts: rockchip: Add base dts for rk3588 soc")
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I45699bc7cb24ffe9ccd31e0552835bd005ab8c7f
2021-11-01 18:09:54 +08:00
Cai YiWei
c75bd88eba media: rockchip: ispp: replace iommu detach/attach
Change-Id: I1cf46cb9cba85be418f32d218dd70452c8062d42
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-30 15:49:49 +08:00
Cai YiWei
4aed134bfe media: rockchip: isp: replace iommu detach/attach
fix NULL Pointer when isp to reset
[ 4486.719609]  __iommu_dma_unmap+0x14/0x7c
[ 4486.719968]  iommu_dma_unmap_sg+0x64/0x90
[ 4486.720348]  __iommu_unmap_sg_attrs+0x48/0x5c
[ 4486.720745]  vb2_dma_sg_dmabuf_ops_detach+0x60/0x80
[ 4486.721192]  dma_buf_detach+0x88/0x9c

iommu_detach_device will set domain to null,
and __iommu_dma_unmap using domain but no check.

Change-Id: I3c679565c6a7e67783e1750fc4d028191a9c9fcf
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-30 15:49:49 +08:00
Wyon Bi
f065eedfb5 arm64: dts: rockchip: rk3588: Add aux clock for dp1
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I145d47f35da3b6cc80a0591dcff5cb23ff118db4
2021-10-29 19:10:12 +08:00
Wyon Bi
409ff5b0ce arm64: dts: rockchip: rk3588s: Add aux clock for dp0
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I4f712f94ec2ab15c30cd9d827513cf778743f000
2021-10-29 19:10:02 +08:00
Zhang Yubing
a5a1823c18 arm64: dts: rockchip: rk3588: Add display-subsystem
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I84edbac259ed7f4573139ecb3ed03a7ebb29db23
2021-10-29 19:09:15 +08:00
Finley Xiao
187019e367 arm64: dts: rockchip: rk3568: Add vop-frame-bw-dmc-freq
Fix vop POST_BUF_EMPTY irq err when rotate screen.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I3c0d5c52efa8612ce6bf24f6748ccab7c1c05a57
2021-10-29 19:00:34 +08:00
Finley Xiao
f1123f2aab PM / devfreq: rockchip_dmc: Change frequency according to vop frame bandwidth
Sometimes the vop line bandwidth is not high, the vop also report
buf empty err, and the frame bandwidth is high at this time, so change
ddr frequency according to frame bandwidth can fix the error.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ia893a07def99aaaa4da421b6d619a8fd3eec9745
2021-10-29 19:00:34 +08:00
Sandy Huang
a3d4f6e0df drm/rockchip: vop: add calculate current frame data size
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ie9c92c651b8c379c77aac941d03bf3f772ed7eea
2021-10-29 19:00:34 +08:00
Zhen Chen
a42b57181b MALI: rockchip: upgrade bifrost DDK to g7p1-01bet0, from g6p0-01eac0
Including modifications under drivers/base/ from the new DDK.

Resolve lots of conflicts.

Fix compilation errors when CONFIG_DEBUG_FS is disabled.

Change-Id: I69f9ac87d927441d0b92b8dac8b704922aeb6a0a
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2021-10-29 18:44:22 +08:00