Skip to contentSkip to conversation

Misc SOQuartz Enablement

PATCH Applied Nicolas Frattaroli 3 participants 9 messages Nov 12, 2022 – Nov 15, 2022

Subsystems (2)

v2 of 3 Applied Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Misc SOQuartz Enablement

This series enables the following functionality on the SOQuartz CM4 module:

* GPU (patch 1)
* Video output (patch 2)
* HDMI (also patch 2)
* HDMI audio (patch 3)
* PCIe2 (patch 4), CM4IO board
* SOQuartz Blade bindings (patch 5)
* SOQuartz Blade device tree (patch 6)

In V2, we also add the SOQuartz Blade base board and bindings definition. The Blade base board allows mounting a SOQuartz CM4 SoM onto a 1U-rackable board with PoE and and M.2 (PCIe 2 x1) slot.

Changes to v1:
- added pcie-clkreq-h to soquartz pinctrl
- added blade base board (by Andrew "neggles" Powers-Holmes)

Andrew Powers-Holmes (1):
arm64: dts: rockchip: Add SOQuartz blade board

Nicolas Frattaroli (5):
arm64: dts: rockchip: Enable GPU on SOQuartz CM4
arm64: dts: rockchip: Enable video output and HDMI on SOQuartz
arm64: dts: rockchip: Enable HDMI sound on SOQuartz
arm64: dts: rockchip: Enable PCIe 2 on SOQuartz CM4IO
dt-bindings: arm: rockchip: Add SOQuartz Blade

 .../devicetree/bindings/arm/rockchip.yaml     |   1 +
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../dts/rockchip/rk3566-soquartz-blade.dts    | 194 ++++++++++++++++++
 .../boot/dts/rockchip/rk3566-soquartz-cm4.dts |  11 +
 .../boot/dts/rockchip/rk3566-soquartz.dtsi    |  75 +++++++
 5 files changed, 282 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-soquartz-blade.dts
Signature · 1 line
2.38.1
#1 lore raw

PATCH v2 1/6 arm64: dts: rockchip: Enable GPU on SOQuartz CM4

This enables the Mali-G52 GPU on the SOQuartz CM4 module.

---
 arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi +5 -0
index 5bcd4be32964..6e99f049501c 100644
@@ -143,6 +143,11 @@ &gmac1m0_clkinout
 	status = "disabled";
 };
 
+&gpu {
+	mali-supply = <&vdd_gpu>;
+	status = "okay";
+};
+
 &i2c0 {
 	status = "okay";
 
Signature · 1 line
2.38.1
#2 lore raw

PATCH v2 2/6 arm64: dts: rockchip: Enable video output and HDMI on SOQuartz

In reply to Nicolas Frattaroli

This patch adds and enables the necessary device tree nodes to enable video output and HDMI functionality on the SOQuartz module.

---
 .../boot/dts/rockchip/rk3566-soquartz.dtsi    | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)
arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi +47 -0
index 6e99f049501c..0bfb0cea7d6b 100644
@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/soc/rockchip,vop2.h>
 #include "rk3566.dtsi"
 
 / {
@@ -28,6 +29,17 @@ gmac1_clkin: external-gmac1-clock {
 		#clock-cells = <0>;
 	};
 
+	hdmi-con {
+		compatible = "hdmi-connector";
+		type = "a";
+
+		port {
+			hdmi_con_in: endpoint {
+				remote-endpoint = <&hdmi_out_con>;
+			};
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
@@ -148,6 +160,24 @@ &gpu {
 	status = "okay";
 };
 
+&hdmi {
+	avdd-0v9-supply = <&vdda0v9_image>;
+	avdd-1v8-supply = <&vcca1v8_image>;
+	status = "okay";
+};
+
+&hdmi_in {
+	hdmi_in_vp0: endpoint {
+		remote-endpoint = <&vp0_out_hdmi>;
+	};
+};
+
+&hdmi_out {
+	hdmi_out_con: endpoint {
+		remote-endpoint = <&hdmi_con_in>;
+	};
+};
+
 &i2c0 {
 	status = "okay";
 
@@ -619,3 +649,20 @@ &usb2phy0_otg {
 &usb_host0_xhci {
 	status = "disabled";
 };
+
+&vop {
+	assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
+	assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
+	status = "okay";
+};
+
+&vop_mmu {
+	status = "okay";
+};
+
+&vp0 {
+	vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
+		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
+		remote-endpoint = <&hdmi_in_vp0>;
+	};
+};
Signature · 1 line
2.38.1
#3 lore raw

PATCH v2 3/6 arm64: dts: rockchip: Enable HDMI sound on SOQuartz

In reply to Nicolas Frattaroli

This patch enables the i2s0 node on SOQuartz, which is responsible for hdmi audio, and adds an hdmi-sound node to enable said audio.

---
 arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi +8 -0
index 0bfb0cea7d6b..1b975822effa 100644
@@ -178,6 +178,10 @@ hdmi_out_con: endpoint {
 	};
 };
 
+&hdmi_sound {
+	status = "okay";
+};
+
 &i2c0 {
 	status = "okay";
 
@@ -446,6 +450,10 @@ &i2c4 {
 	status = "disabled";
 };
 
+&i2s0_8ch {
+	status = "okay";
+};
+
 /*
  * i2s1_8ch is exposed on CM1 / Module1A
  * pin 24 - i2s1_sdi1_m1
Signature · 1 line
2.38.1
#4 lore raw

PATCH v2 4/6 arm64: dts: rockchip: Enable PCIe 2 on SOQuartz CM4IO

In reply to Nicolas Frattaroli

This patch enables the PCIe2 on the CM4IO board when paired with a SOQuartz CM4 System-on-Module board. combphy2 also needs to be enabled in this case to make the PHY work for this.

---
 .../boot/dts/rockchip/rk3566-soquartz-cm4.dts     | 11 +++++++++++
 arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi | 15 +++++++++++++++
 2 files changed, 26 insertions(+)
arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts +11 -0
index e00568a6be5c..263ce40770dd 100644
@@ -30,6 +30,12 @@ vcc_5v: vcc-5v-regulator {
 	};
 };
 
+/* phy for pcie */
+&combphy2 {
+	phy-supply = <&vcc3v3_sys>;
+	status = "okay";
+};
+
 &gmac1 {
 	status = "okay";
 };
@@ -105,6 +111,11 @@ &led_work {
 	status = "okay";
 };
 
+&pcie2x1 {
+	vpcie3v3-supply = <&vcc_3v3>;
+	status = "okay";
+};
+
 &rgmii_phy1 {
 	status = "okay";
 };
arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi +15 -0
index 1b975822effa..ce7165d7f1a1 100644
@@ -487,6 +487,12 @@ rgmii_phy1: ethernet-phy@0 {
 	};
 };
 
+&pcie2x1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie_reset_h>;
+	reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
+};
+
 &pinctrl {
 	bt {
 		bt_enable_h: bt-enable-h {
@@ -512,6 +518,15 @@ diy_led_enable_h: diy-led-enable-h {
 		};
 	};
 
+	pcie {
+		pcie_clkreq_h: pcie-clkreq-h {
+			rockchip,pins = <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+		pcie_reset_h: pcie-reset-h {
+			rockchip,pins = <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	pmic {
 		pmic_int_l: pmic-int-l {
 			rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
Signature · 1 line
2.38.1
#5 lore raw

PATCH v2 5/6 dt-bindings: arm: rockchip: Add SOQuartz Blade

In reply to Nicolas Frattaroli
---
 Documentation/devicetree/bindings/arm/rockchip.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/rockchip.yaml +1 -0
index 244c42eaae8c..fc5f14fcd007 100644
@@ -579,6 +579,7 @@ properties:
         items:
           - enum:
               - pine64,soquartz-cm4io
+              - pine64,soquartz-blade
           - const: pine64,soquartz
           - const: rockchip,rk3566
 
Signature · 1 line
2.38.1
#6 lore raw

Re: [PATCH v2 5/6] dt-bindings: arm: rockchip: Add SOQuartz Blade

On 12/11/2022 17:04, Nicolas Frattaroli wrote:

You miss commit msg.

Quoted 10 lines
---
 Documentation/devicetree/bindings/arm/rockchip.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/rockchip.yaml +0 -0
index 244c42eaae8c..fc5f14fcd007 100644

Documentation/devicetree/bindings/arm/rockchip.yaml properties: · line 582

Quoted 4 lines
Documentation/devicetree/bindings/arm/rockchip.yaml +1 -0
@@ -579,6 +579,7 @@ properties:
         items:
           - enum:
               - pine64,soquartz-cm4io
+              - pine64,soquartz-blade

Keep alphabetical order,

Best regards,
Krzysztof

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#7 lore raw

PATCH v2 6/6 arm64: dts: rockchip: Add SOQuartz blade board

In reply to Nicolas Frattaroli

From: Andrew Powers-Holmes <[email protected]>

This adds a device tree for the PINE64 SOQuartz blade baseboard, a 1U rack mountable baseboard for the CM4 form factor with PoE support designed for the SOQuartz CM4 System-on-Module.

The board takes power from either PoE or a 5V DC input, and allows for mounting an M.2 SSD.

The board also features one USB 2.0 host port, one HDMI output, a 3.5mm jack for UART, and the aforementioned gigabit networking port.

[rebase, squash, reword, misc fixes]
---
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../dts/rockchip/rk3566-soquartz-blade.dts    | 194 ++++++++++++++++++
 2 files changed, 195 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-soquartz-blade.dts
arch/arm64/boot/dts/rockchip/Makefile +1 -0
index 50942086490d..2157f086c59e 100644
@@ -71,6 +71,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.2.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-a.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-b.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-roc-pc.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-blade.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-cm4.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
arch/arm64/boot/dts/rockchip/rk3566-soquartz-blade.dts new file +194 -0

194 lines not on this page · raw message

Signature · 1 line
2.38.1
maintainer Applied
#8 lore raw

Re: (subset) [PATCH v2 0/6] Misc SOQuartz Enablement

In reply to Nicolas Frattaroli
Quoted 11 lines · Nicolas Frattaroli

This series enables the following functionality on the SOQuartz CM4 module:

* GPU (patch 1)
* Video output (patch 2)
* HDMI (also patch 2)
* HDMI audio (patch 3)
* PCIe2 (patch 4), CM4IO board
* SOQuartz Blade bindings (patch 5)
* SOQuartz Blade device tree (patch 6)

Quoted 1 line

[...]

Applied, thanks!

[1/6] arm64: dts: rockchip: Enable GPU on SOQuartz CM4

      commit: e48824e8a03e5bc3666e9f5461f68d440d9acba0
[2/6] arm64: dts: rockchip: Enable video output and HDMI on SOQuartz
      commit: 36d7a605706d9648526a0574b8e7b0e02fa70c2a
[3/6] arm64: dts: rockchip: Enable HDMI sound on SOQuartz
      commit: 70b620c4ba919a87c607b8d98b08478b213877bd
[4/6] arm64: dts: rockchip: Enable PCIe 2 on SOQuartz CM4IO
      commit: 3736aa7ecc4cd9b4abce30052bad00aba4f0362f

Best regards,

Signature · 1 line
Heiko Stuebner <[email protected]>