Skip to contentSkip to conversation

rk3328 and rock64 display support

PATCH Superseded Heiko Stuebner 2 participants 6 messages May 15, 2018

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Heiko Stuebner

author maintainer
#0 lore raw

v2 cover rk3328 and rock64 display support

Companion series for the display modifications adding the necessary devicetree stuff for display support on the rk3328-rock64.

changes in v2:
- add defconfig addition for the phy driver
- adapt to changed reference clock names
- remove trailing 0 from vop irq

Heiko Stuebner (4):
arm64: dts: rockchip: add Innosilicon hdmi phy node to rk3328
arm64: dts: rockchip: add rk3328 display nodes
arm64: dts: rockchip: enable display nodes on rk3328-rock64
arm64: defconfig: enable Rockchip Innosilicon hdmiphy

 .../arm64/boot/dts/rockchip/rk3328-rock64.dts | 16 +++++
 arch/arm64/boot/dts/rockchip/rk3328.dtsi      | 70 +++++++++++++++++++
 arch/arm64/configs/defconfig                  |  1 +
 3 files changed, 87 insertions(+)
Signature · 1 line
2.17.0
author maintainer
#1 lore raw

PATCH v2 1/4 arm64: dts: rockchip: add Innosilicon hdmi phy node to rk3328

The rk3328 uses a hdmiphy from Innosilicon, so add the necessary node to the rk3328 soc devicetree.

---
changes in v2:
- adapt to changed clock names

 arch/arm64/boot/dts/rockchip/rk3328.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/rockchip/rk3328.dtsi +14 -0
index 60b3ed5918e7..04d81ea0924e 100644
@@ -645,6 +645,20 @@
 		status = "disabled";
 	};
 
+	hdmiphy: phy at ff430000 {
+		compatible = "rockchip,rk3328-hdmi-phy";
+		reg = <0x0 0xff430000 0x0 0x10000>;
+		interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cru PCLK_HDMIPHY>, <&xin24m>, <&cru DCLK_HDMIPHY>;
+		clock-names = "sysclk", "refoclk", "refpclk";
+		clock-output-names = "hdmi_phy";
+		#clock-cells = <0>;
+		nvmem-cells = <&efuse_cpu_version>;
+		nvmem-cell-names = "cpu-version";
+		#phy-cells = <0>;
+		status = "disabled";
+	};
+
 	cru: clock-controller at ff440000 {
 		compatible = "rockchip,rk3328-cru", "rockchip,cru", "syscon";
 		reg = <0x0 0xff440000 0x0 0x1000>;
Signature · 1 line
2.17.0
author maintainer
#2 lore raw

PATCH v2 2/4 arm64: dts: rockchip: add rk3328 display nodes

In reply to Heiko Stuebner

Add the chain of display nodes from the core display-subsystem through the one vop to the dw-hdmi output.

---
changes in v2:
- remove trailing 0 from vop irq

 arch/arm64/boot/dts/rockchip/rk3328.dtsi | 56 ++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
arch/arm64/boot/dts/rockchip/rk3328.dtsi +56 -0
index 04d81ea0924e..16e7cf210875 100644
@@ -185,6 +185,11 @@
 		interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
 	};
 
+	display_subsystem: display-subsystem {
+		compatible = "rockchip,display-subsystem";
+		ports = <&vop_out>;
+	};
+
 	psci {
 		compatible = "arm,psci-1.0", "arm,psci-0.2";
 		method = "smc";
@@ -634,6 +639,28 @@
 		status = "disabled";
 	};
 
+	vop: vop at ff370000 {
+		compatible = "rockchip,rk3328-vop";
+		reg = <0x0 0xff370000 0x0 0x3efc>;
+		interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cru ACLK_VOP>, <&cru DCLK_LCDC>, <&cru HCLK_VOP>;
+		clock-names = "aclk_vop", "dclk_vop", "hclk_vop";
+		resets = <&cru SRST_VOP_A>, <&cru SRST_VOP_H>, <&cru SRST_VOP_D>;
+		reset-names = "axi", "ahb", "dclk";
+		iommus = <&vop_mmu>;
+		status = "disabled";
+
+		vop_out: port {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			vop_out_hdmi: endpoint at 0 {
+				reg = <0>;
+				remote-endpoint = <&hdmi_in_vop>;
+			};
+		};
+	};
+
 	vop_mmu: iommu at ff373f00 {
 		compatible = "rockchip,iommu";
 		reg = <0x0 0xff373f00 0x0 0x100>;
@@ -645,6 +672,35 @@
 		status = "disabled";
 	};
 
+	hdmi: hdmi at ff3c0000 {
+		compatible = "rockchip,rk3328-dw-hdmi";
+		reg = <0x0 0xff3c0000 0x0 0x20000>;
+		reg-io-width = <4>;
+		interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cru PCLK_HDMI>,
+			 <&cru SCLK_HDMI_SFC>;
+		clock-names = "iahb",
+			      "isfr";
+		phys = <&hdmiphy>;
+		phy-names = "hdmi";
+		pinctrl-names = "default";
+		pinctrl-0 = <&hdmi_cec &hdmii2c_xfer &hdmi_hpd>;
+		rockchip,grf = <&grf>;
+		status = "disabled";
+
+		ports {
+			hdmi_in: port {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				hdmi_in_vop: endpoint at 0 {
+					reg = <0>;
+					remote-endpoint = <&vop_out_hdmi>;
+				};
+			};
+		};
+	};
+
 	hdmiphy: phy at ff430000 {
 		compatible = "rockchip,rk3328-hdmi-phy";
 		reg = <0x0 0xff430000 0x0 0x10000>;
Signature · 1 line
2.17.0
#3 lore raw

PATCH v2 2/4 arm64: dts: rockchip: add rk3328 display nodes

Hi Heiko,

Just a trivial nit I failed to consider last time...

Quoted 72 lines · Heiko Stuebner

Add the chain of display nodes from the core display-subsystem through the one vop to the dw-hdmi output.

---
changes in v2:
- remove trailing 0 from vop irq

  arch/arm64/boot/dts/rockchip/rk3328.dtsi | 56 ++++++++++++++++++++++++
  1 file changed, 56 insertions(+)
arch/arm64/boot/dts/rockchip/rk3328.dtsi +38 -0
index 04d81ea0924e..16e7cf210875 100644
@@ -185,6 +185,11 @@
  		interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
  	};
 
+	display_subsystem: display-subsystem {
+		compatible = "rockchip,display-subsystem";
+		ports = <&vop_out>;
+	};
+
  	psci {
  		compatible = "arm,psci-1.0", "arm,psci-0.2";
  		method = "smc";
@@ -634,6 +639,28 @@
  		status = "disabled";
  	};
 
+	vop: vop at ff370000 {
+		compatible = "rockchip,rk3328-vop";
+		reg = <0x0 0xff370000 0x0 0x3efc>;
+		interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cru ACLK_VOP>, <&cru DCLK_LCDC>, <&cru HCLK_VOP>;
+		clock-names = "aclk_vop", "dclk_vop", "hclk_vop";
+		resets = <&cru SRST_VOP_A>, <&cru SRST_VOP_H>, <&cru SRST_VOP_D>;
+		reset-names = "axi", "ahb", "dclk";
+		iommus = <&vop_mmu>;
+		status = "disabled";
+
+		vop_out: port {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			vop_out_hdmi: endpoint at 0 {
+				reg = <0>;
+				remote-endpoint = <&hdmi_in_vop>;
+			};
+		};
+	};
+
  	vop_mmu: iommu at ff373f00 {
  		compatible = "rockchip,iommu";
  		reg = <0x0 0xff373f00 0x0 0x100>;
@@ -645,6 +672,35 @@
  		status = "disabled";
  	};
 
+	hdmi: hdmi at ff3c0000 {
+		compatible = "rockchip,rk3328-dw-hdmi";
+		reg = <0x0 0xff3c0000 0x0 0x20000>;
+		reg-io-width = <4>;
+		interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cru PCLK_HDMI>,
+			 <&cru SCLK_HDMI_SFC>;
+		clock-names = "iahb",
+			      "isfr";
+		phys = <&hdmiphy>;

arch/arm64/boot/dts/rockchip/rk3328.dtsi line 695

Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328.dtsi +10 -0
+		phy-names = "hdmi";
+		pinctrl-names = "default";
+		pinctrl-0 = <&hdmi_cec &hdmii2c_xfer &hdmi_hpd>;
+		rockchip,grf = <&grf>;
+		status = "disabled";
+
+		ports {
+			hdmi_in: port {
+				#address-cells = <1>;
+				#size-cells = <0>;

FWIW I think we could just drop these (along with the reg and unit address below), since with a single VOP instance I guess there can only ever be one remote endpoint here.

(I assume the VOP itself has a potential second endpoint at the video DAC, so there's some argument for explicit numbering there)

Robin.

Quoted 12 lines
arch/arm64/boot/dts/rockchip/rk3328.dtsi +8 -0
+				hdmi_in_vop: endpoint at 0 {
+					reg = <0>;
+					remote-endpoint = <&vop_out_hdmi>;
+				};
+			};
+		};
+	};
+
  	hdmiphy: phy at ff430000 {
  		compatible = "rockchip,rk3328-hdmi-phy";
  		reg = <0x0 0xff430000 0x0 0x10000>;
author maintainer
#4 lore raw

PATCH v2 3/4 arm64: dts: rockchip: enable display nodes on rk3328-rock64

In reply to Heiko Stuebner

Enable necessary nodes to get output on the hdmi port of the board.

---
 arch/arm64/boot/dts/rockchip/rk3328-rock64.dts | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +16 -0
index 5c43a61d3178..ca48be13dee7 100644
@@ -145,6 +145,14 @@
 	status = "okay";
 };
 
+&hdmi {
+	status = "okay";
+};
+
+&hdmiphy {
+	status = "okay";
+};
+
 &i2c1 {
 	status = "okay";
 
@@ -341,3 +349,11 @@
 	dr_mode = "host";
 	status = "okay";
 };
+
+&vop {
+	status = "okay";
+};
+
+&vop_mmu {
+	status = "okay";
+};
Signature · 1 line
2.17.0
author maintainer
#5 lore raw

PATCH v2 4/4 arm64: defconfig: enable Rockchip Innosilicon hdmiphy

In reply to Heiko Stuebner

The rk3228 and rk3328 socs use an MMIO-connected hdmi-phy from Innosilicon. So enable the necessary driver as module.

---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
index 74abf140e332..dff3de45cc04 100644
@@ -604,6 +604,7 @@ CONFIG_PHY_SUN4I_USB=y
 CONFIG_PHY_MVEBU_CP110_COMPHY=y
 CONFIG_PHY_ROCKCHIP_INNO_USB2=y
 CONFIG_PHY_ROCKCHIP_EMMC=y
+CONFIG_PHY_ROCKCHIP_INNO_HDMI=m
 CONFIG_PHY_ROCKCHIP_PCIE=m
 CONFIG_PHY_ROCKCHIP_TYPEC=y
 CONFIG_PHY_XGENE=y
Signature · 1 line
2.17.0