Based on: *2dc8224e37/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c* https://lore.kernel.org/all/20241016-b4-rk3588-bridge-upstream-v10-1-87ef92a6d14e@collabora.com/ *a52dffaa46/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c*a52dffaa46/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c*a52dffaa46/drivers/gpu/drm/rockchip/rockchip_vop2_reg.cSigned-off-by: Liangbin Lian <jjm2473@gmail.com>
298 lines
7.9 KiB
Diff
298 lines
7.9 KiB
Diff
--- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
|
|
+++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
|
|
@@ -378,6 +378,22 @@
|
|
};
|
|
};
|
|
|
|
+ hdmi0_sound: hdmi0-sound {
|
|
+ compatible = "simple-audio-card";
|
|
+ simple-audio-card,format = "i2s";
|
|
+ simple-audio-card,mclk-fs = <128>;
|
|
+ simple-audio-card,name = "hdmi0";
|
|
+ status = "disabled";
|
|
+
|
|
+ simple-audio-card,codec {
|
|
+ sound-dai = <&hdmi0>;
|
|
+ };
|
|
+
|
|
+ simple-audio-card,cpu {
|
|
+ sound-dai = <&i2s5_8ch>;
|
|
+ };
|
|
+ };
|
|
+
|
|
pmu-a55 {
|
|
compatible = "arm,cortex-a55-pmu";
|
|
interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_partition0>;
|
|
@@ -1146,14 +1162,16 @@
|
|
<&cru DCLK_VOP1>,
|
|
<&cru DCLK_VOP2>,
|
|
<&cru DCLK_VOP3>,
|
|
- <&cru PCLK_VOP_ROOT>;
|
|
+ <&cru PCLK_VOP_ROOT>,
|
|
+ <&hdptxphy0>;
|
|
clock-names = "aclk",
|
|
"hclk",
|
|
"dclk_vp0",
|
|
"dclk_vp1",
|
|
"dclk_vp2",
|
|
"dclk_vp3",
|
|
- "pclk_vop";
|
|
+ "pclk_vop",
|
|
+ "pll_hdmiphy0";
|
|
iommus = <&vop_mmu>;
|
|
power-domains = <&power RK3588_PD_VOP>;
|
|
rockchip,grf = <&sys_grf>;
|
|
@@ -1254,6 +1272,48 @@
|
|
status = "disabled";
|
|
};
|
|
|
|
+ hdmi0: hdmi@fde80000 {
|
|
+ compatible = "rockchip,rk3588-dw-hdmi-qp";
|
|
+ reg = <0x0 0xfde80000 0x0 0x20000>;
|
|
+ clocks = <&cru PCLK_HDMITX0>,
|
|
+ <&cru CLK_HDMITX0_EARC>,
|
|
+ <&cru CLK_HDMITX0_REF>,
|
|
+ <&cru MCLK_I2S5_8CH_TX>,
|
|
+ <&cru CLK_HDMIHDP0>,
|
|
+ <&cru HCLK_VO1>;
|
|
+ clock-names = "pclk", "earc", "ref", "aud", "hdp", "hclk_vo1";
|
|
+ interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH 0>,
|
|
+ <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH 0>,
|
|
+ <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH 0>,
|
|
+ <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH 0>,
|
|
+ <GIC_SPI 360 IRQ_TYPE_LEVEL_HIGH 0>;
|
|
+ interrupt-names = "avp", "cec", "earc", "main", "hpd";
|
|
+ phys = <&hdptxphy0>;
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&hdmim0_tx0_cec &hdmim0_tx0_hpd
|
|
+ &hdmim0_tx0_scl &hdmim0_tx0_sda>;
|
|
+ power-domains = <&power RK3588_PD_VO1>;
|
|
+ resets = <&cru SRST_HDMITX0_REF>, <&cru SRST_HDMIHDP0>;
|
|
+ reset-names = "ref", "hdp";
|
|
+ rockchip,grf = <&sys_grf>;
|
|
+ rockchip,vo-grf = <&vo1_grf>;
|
|
+ #sound-dai-cells = <0>;
|
|
+ status = "disabled";
|
|
+
|
|
+ ports {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+
|
|
+ hdmi0_in: port@0 {
|
|
+ reg = <0>;
|
|
+ };
|
|
+
|
|
+ hdmi0_out: port@1 {
|
|
+ reg = <1>;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+
|
|
qos_gpu_m0: qos@fdf35000 {
|
|
compatible = "rockchip,rk3588-qos", "syscon";
|
|
reg = <0x0 0xfdf35000 0x0 0x20>;
|
|
@@ -2657,11 +2717,12 @@
|
|
#dma-cells = <1>;
|
|
};
|
|
|
|
- hdptxphy_hdmi0: phy@fed60000 {
|
|
+ hdptxphy0: phy@fed60000 {
|
|
compatible = "rockchip,rk3588-hdptx-phy";
|
|
reg = <0x0 0xfed60000 0x0 0x2000>;
|
|
clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>, <&cru PCLK_HDPTX0>;
|
|
clock-names = "ref", "apb";
|
|
+ #clock-cells = <0>;
|
|
#phy-cells = <0>;
|
|
resets = <&cru SRST_HDPTX0>, <&cru SRST_P_HDPTX0>,
|
|
<&cru SRST_HDPTX0_INIT>, <&cru SRST_HDPTX0_CMN>,
|
|
--- a/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi
|
|
+++ b/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi
|
|
@@ -7,6 +7,46 @@
|
|
#include "rk3588-extra-pinctrl.dtsi"
|
|
|
|
/ {
|
|
+ hdmi1_sound: hdmi1-sound {
|
|
+ compatible = "simple-audio-card";
|
|
+ simple-audio-card,format = "i2s";
|
|
+ simple-audio-card,mclk-fs = <128>;
|
|
+ simple-audio-card,name = "hdmi1";
|
|
+ status = "disabled";
|
|
+
|
|
+ simple-audio-card,codec {
|
|
+ sound-dai = <&hdmi1>;
|
|
+ };
|
|
+
|
|
+ simple-audio-card,cpu {
|
|
+ sound-dai = <&i2s6_8ch>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ reserved-memory {
|
|
+ #address-cells = <2>;
|
|
+ #size-cells = <2>;
|
|
+ ranges;
|
|
+
|
|
+ /*
|
|
+ * The 4k HDMI capture controller works only with 32bit
|
|
+ * phys addresses and doesn't support IOMMU. HDMI RX CMA
|
|
+ * must be reserved below 4GB.
|
|
+ * The size of 160MB was determined as follows:
|
|
+ * (3840 * 2160 pixels) * (4 bytes/pixel) * (2 frames/buffer) / 10^6 = 66MB
|
|
+ * To ensure sufficient support for practical use-cases,
|
|
+ * we doubled the 66MB value.
|
|
+ */
|
|
+ hdmi_receiver_cma: hdmi-receiver-cma {
|
|
+ compatible = "shared-dma-pool";
|
|
+ alloc-ranges = <0x0 0x0 0x0 0xffffffff>;
|
|
+ size = <0x0 (160 * 0x100000)>; /* 160MiB */
|
|
+ alignment = <0x0 0x40000>; /* 64K */
|
|
+ no-map;
|
|
+ status = "disabled";
|
|
+ };
|
|
+ };
|
|
+
|
|
usb_host1_xhci: usb@fc400000 {
|
|
compatible = "rockchip,rk3588-dwc3", "snps,dwc3";
|
|
reg = <0x0 0xfc400000 0x0 0x400000>;
|
|
@@ -67,6 +107,11 @@
|
|
};
|
|
};
|
|
|
|
+ hdptxphy1_grf: syscon@fd5e4000 {
|
|
+ compatible = "rockchip,rk3588-hdptxphy-grf", "syscon";
|
|
+ reg = <0x0 0xfd5e4000 0x0 0x100>;
|
|
+ };
|
|
+
|
|
i2s8_8ch: i2s@fddc8000 {
|
|
compatible = "rockchip,rk3588-i2s-tdm";
|
|
reg = <0x0 0xfddc8000 0x0 0x1000>;
|
|
@@ -135,6 +180,79 @@
|
|
status = "disabled";
|
|
};
|
|
|
|
+ hdmi1: hdmi@fdea0000 {
|
|
+ compatible = "rockchip,rk3588-dw-hdmi-qp";
|
|
+ reg = <0x0 0xfdea0000 0x0 0x20000>;
|
|
+ clocks = <&cru PCLK_HDMITX1>,
|
|
+ <&cru CLK_HDMITX1_EARC>,
|
|
+ <&cru CLK_HDMITX1_REF>,
|
|
+ <&cru MCLK_I2S6_8CH_TX>,
|
|
+ <&cru CLK_HDMIHDP1>,
|
|
+ <&cru HCLK_VO1>;
|
|
+ clock-names = "pclk", "earc", "ref", "aud", "hdp", "hclk_vo1";
|
|
+ interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH 0>,
|
|
+ <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH 0>,
|
|
+ <GIC_SPI 175 IRQ_TYPE_LEVEL_HIGH 0>,
|
|
+ <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH 0>,
|
|
+ <GIC_SPI 361 IRQ_TYPE_LEVEL_HIGH 0>;
|
|
+ interrupt-names = "avp", "cec", "earc", "main", "hpd";
|
|
+ phys = <&hdptxphy1>;
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&hdmim2_tx1_cec &hdmim0_tx1_hpd
|
|
+ &hdmim1_tx1_scl &hdmim1_tx1_sda>;
|
|
+ power-domains = <&power RK3588_PD_VO1>;
|
|
+ resets = <&cru SRST_HDMITX1_REF>, <&cru SRST_HDMIHDP1>;
|
|
+ reset-names = "ref", "hdp";
|
|
+ rockchip,grf = <&sys_grf>;
|
|
+ rockchip,vo-grf = <&vo1_grf>;
|
|
+ #sound-dai-cells = <0>;
|
|
+ status = "disabled";
|
|
+
|
|
+ ports {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+
|
|
+ hdmi1_in: port@0 {
|
|
+ reg = <0>;
|
|
+ };
|
|
+
|
|
+ hdmi1_out: port@1 {
|
|
+ reg = <1>;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+
|
|
+ hdmi_receiver: hdmi_receiver@fdee0000 {
|
|
+ compatible = "rockchip,rk3588-hdmirx-ctrler", "snps,dw-hdmi-rx";
|
|
+ reg = <0x0 0xfdee0000 0x0 0x6000>;
|
|
+ interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH 0>,
|
|
+ <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH 0>,
|
|
+ <GIC_SPI 179 IRQ_TYPE_LEVEL_HIGH 0>;
|
|
+ interrupt-names = "cec", "hdmi", "dma";
|
|
+ clocks = <&cru ACLK_HDMIRX>,
|
|
+ <&cru CLK_HDMIRX_AUD>,
|
|
+ <&cru CLK_CR_PARA>,
|
|
+ <&cru PCLK_HDMIRX>,
|
|
+ <&cru CLK_HDMIRX_REF>,
|
|
+ <&cru PCLK_S_HDMIRX>,
|
|
+ <&cru HCLK_VO1>;
|
|
+ clock-names = "aclk",
|
|
+ "audio",
|
|
+ "cr_para",
|
|
+ "pclk",
|
|
+ "ref",
|
|
+ "hclk_s_hdmirx",
|
|
+ "hclk_vo1";
|
|
+ memory-region = <&hdmi_receiver_cma>;
|
|
+ power-domains = <&power RK3588_PD_VO1>;
|
|
+ resets = <&cru SRST_A_HDMIRX>, <&cru SRST_P_HDMIRX>,
|
|
+ <&cru SRST_HDMIRX_REF>, <&cru SRST_A_HDMIRX_BIU>;
|
|
+ reset-names = "axi", "apb", "ref", "biu";
|
|
+ rockchip,grf = <&sys_grf>;
|
|
+ rockchip,vo1-grf = <&vo1_grf>;
|
|
+ status = "disabled";
|
|
+ };
|
|
+
|
|
pcie3x4: pcie@fe150000 {
|
|
compatible = "rockchip,rk3588-pcie", "rockchip,rk3568-pcie";
|
|
#address-cells = <3>;
|
|
@@ -360,6 +478,23 @@
|
|
};
|
|
};
|
|
|
|
+ hdptxphy1: phy@fed70000 {
|
|
+ compatible = "rockchip,rk3588-hdptx-phy";
|
|
+ reg = <0x0 0xfed70000 0x0 0x2000>;
|
|
+ clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>, <&cru PCLK_HDPTX1>;
|
|
+ clock-names = "ref", "apb";
|
|
+ #clock-cells = <0>;
|
|
+ #phy-cells = <0>;
|
|
+ resets = <&cru SRST_HDPTX1>, <&cru SRST_P_HDPTX1>,
|
|
+ <&cru SRST_HDPTX1_INIT>, <&cru SRST_HDPTX1_CMN>,
|
|
+ <&cru SRST_HDPTX1_LANE>, <&cru SRST_HDPTX1_ROPLL>,
|
|
+ <&cru SRST_HDPTX1_LCPLL>;
|
|
+ reset-names = "phy", "apb", "init", "cmn", "lane", "ropll",
|
|
+ "lcpll";
|
|
+ rockchip,grf = <&hdptxphy1_grf>;
|
|
+ status = "disabled";
|
|
+ };
|
|
+
|
|
usbdp_phy1: phy@fed90000 {
|
|
compatible = "rockchip,rk3588-usbdp-phy";
|
|
reg = <0x0 0xfed90000 0x0 0x10000>;
|
|
@@ -411,3 +546,24 @@
|
|
status = "disabled";
|
|
};
|
|
};
|
|
+
|
|
+&vop {
|
|
+ clocks = <&cru ACLK_VOP>,
|
|
+ <&cru HCLK_VOP>,
|
|
+ <&cru DCLK_VOP0>,
|
|
+ <&cru DCLK_VOP1>,
|
|
+ <&cru DCLK_VOP2>,
|
|
+ <&cru DCLK_VOP3>,
|
|
+ <&cru PCLK_VOP_ROOT>,
|
|
+ <&hdptxphy0>,
|
|
+ <&hdptxphy1>;
|
|
+ clock-names = "aclk",
|
|
+ "hclk",
|
|
+ "dclk_vp0",
|
|
+ "dclk_vp1",
|
|
+ "dclk_vp2",
|
|
+ "dclk_vp3",
|
|
+ "pclk_vop",
|
|
+ "pll_hdmiphy0",
|
|
+ "pll_hdmiphy1";
|
|
+};
|