Skip to contentSkip to conversation

rk3328 and rock64 display support

PATCH Superseded Heiko Stuebner 1 participant 6 messages Sep 10, 2018 – Sep 28, 2018

Subsystems (2)
lore
Share & tools
lore

Heiko Stuebner

author maintainer
#0 lore raw

v3 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 v3:
- drop reg from hdmi port - unneeded with a single vop as suggested by Robin

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      | 67 +++++++++++++++++++
 arch/arm64/configs/defconfig                  |  1 +
 3 files changed, 84 insertions(+)
Signature · 1 line
2.17.0
author maintainer
#1 lore raw

PATCH v3 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.

---
 arch/arm64/boot/dts/rockchip/rk3328.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/rockchip/rk3328.dtsi +14 -0
index 2e3bd93c508c..beebab74ce17 100644
@@ -616,6 +616,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 v3 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 v3:
- drop reg from hdmi-in-port
changes in v2:
- remove trailing 0 from vop irq

---
 arch/arm64/boot/dts/rockchip/rk3328.dtsi | 53 ++++++++++++++++++++++++
 1 file changed, 53 insertions(+)
arch/arm64/boot/dts/rockchip/rk3328.dtsi +53 -0
index beebab74ce17..6b480d723fca 100644
@@ -151,6 +151,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";
@@ -605,6 +610,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>;
@@ -616,6 +643,32 @@
 		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 {
+				hdmi_in_vop: endpoint {
+					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
author maintainer
#3 lore raw

PATCH v3 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 ad82bf39e268..4870c089b6c9 100644
@@ -108,6 +108,14 @@
 	status = "okay";
 };
 
+&hdmi {
+	status = "okay";
+};
+
+&hdmiphy {
+	status = "okay";
+};
+
 &i2c1 {
 	status = "okay";
 
@@ -304,3 +312,11 @@
 	dr_mode = "host";
 	status = "okay";
 };
+
+&vop {
+	status = "okay";
+};
+
+&vop_mmu {
+	status = "okay";
+};
Signature · 1 line
2.17.0
author maintainer
#4 lore raw

PATCH v3 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 db8d364f8476..36ef2dcfa085 100644
@@ -638,6 +638,7 @@ CONFIG_PHY_QCOM_USB_HS=y
 CONFIG_PHY_RCAR_GEN3_USB2=y
 CONFIG_PHY_RCAR_GEN3_USB3=m
 CONFIG_PHY_ROCKCHIP_EMMC=y
+CONFIG_PHY_ROCKCHIP_INNO_HDMI=m
 CONFIG_PHY_ROCKCHIP_INNO_USB2=y
 CONFIG_PHY_ROCKCHIP_PCIE=m
 CONFIG_PHY_ROCKCHIP_TYPEC=y
Signature · 1 line
2.17.0
author maintainer
#5 lore raw

v3 cover rk3328 and rock64 display support

In reply to Heiko Stuebner

Am Montag, 10. September 2018, 11:28:39 CEST schrieb Heiko Stuebner:

Quoted 12 lines

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

changes in v3:
- drop reg from hdmi port - unneeded with a single vop as suggested by Robin

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

Quoted 5 lines

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

with phy and hdmi support being scheduled for 4.20, applied these as well.