Skip to contentSkip to conversation

ARM64: dts: sun50i-h6-pine-h64: state that the DT supports the modelB

PATCH Superseded Corentin Labbe 2 participants 4 messages Oct 30, 2019 – Oct 31, 2019 1 message not in the archive

Subsystems (2)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH v3 1/3 ARM64: dts: sun50i-h6-pine-h64: state that the DT supports the modelB

The current sun50i-h6-pine-h64 DT does not specify which model (A or B) it supports.
When this file was created, only modelA was existing, but now both model exists and with the time, this DT drifted to support the model B since it is the most common one.
Furtheremore, some part of the model A does not work with it like ethernet and HDMI connector (as confirmed by Jernej on IRC).

So it is time to settle the issue, and the easiest way is to state that this DT is for model B.
Easiest since only a small name changes is required.
Doing the opposite (stating this file is for model A) will add changes (for ethernet and HDMI) and so, will break too many setup.

---
 Documentation/devicetree/bindings/arm/sunxi.yaml     | 4 ++--
 arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/arm/sunxi.yaml +2 -2
index 972b1e9ee804..9a1e4992b9e9 100644
@@ -594,9 +594,9 @@ properties:
           - const: pine64,pine64-plus
           - const: allwinner,sun50i-a64
 
-      - description: Pine64 PineH64
+      - description: Pine64 PineH64 model B
         items:
-          - const: pine64,pine-h64
+          - const: pine64,pine-h64-modelB
           - const: allwinner,sun50i-h6
 
       - description: Pine64 LTS
arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts +2 -2
index 30102daf83cc..f9070d9e6c43 100644
@@ -10,8 +10,8 @@
 #include <dt-bindings/gpio/gpio.h>
 
 / {
-	model = "Pine H64";
-	compatible = "pine64,pine-h64", "allwinner,sun50i-h6";
+	model = "Pine H64 model B";
+	compatible = "pine64,pine-h64-modelB", "allwinner,sun50i-h6";
 
 	aliases {
 		ethernet0 = &emac;
Signature · 1 line
2.23.0
#2 lore raw
Quoted 10 lines · Corentin Labbe

The current sun50i-h6-pine-h64 DT does not specify which model (A or B) it supports.
When this file was created, only modelA was existing, but now both model exists and with the time, this DT drifted to support the model B since it is the most common one.
Furtheremore, some part of the model A does not work with it like ethernet and HDMI connector (as confirmed by Jernej on IRC).

So it is time to settle the issue, and the easiest way is to state that this DT is for model B.

No, this DT was introduced for model A, and we have to keep that. If some model B changes crept in, that's unfortunate, but it should be reverted, instead of changing the assumptions like this.

Maxime

#3 lore raw

PATCH v3 2/3 ARM64: dts: sun50i-h6-pine-h64: add the hdmi_connector label

In reply to a message not in the archive

For sun50i-h6-pine-h64 model A we will need to modify the connector node, so let's add a label on it.

---
 arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts +1 -1
index f9070d9e6c43..448ccbecf82b 100644
@@ -22,7 +22,7 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	connector {
+	hdmi_connector: connector {
 		compatible = "hdmi-connector";
 		type = "a";
 
Signature · 1 line
2.23.0
#4 lore raw

PATCH v3 3/3 ARM64: dts: allwinner: add pineh64 model A

In reply to a message not in the archive

This patch adds the model A of the PineH64.
The model A has the same size of the pine64 and has a PCIE slot.

The only devicetree difference with the pineH64 model B, is the PHY regulator and the HDMI connector node.

---
 .../devicetree/bindings/arm/sunxi.yaml        |  5 ++++
 arch/arm64/boot/dts/allwinner/Makefile        |  1 +
 .../allwinner/sun50i-h6-pine-h64-modelA.dts   | 30 +++++++++++++++++++
 3 files changed, 36 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64-modelA.dts
Documentation/devicetree/bindings/arm/sunxi.yaml +5 -0
index 9a1e4992b9e9..0059925a3395 100644
@@ -594,6 +594,11 @@ properties:
           - const: pine64,pine64-plus
           - const: allwinner,sun50i-a64
 
+      - description: Pine64 PineH64 model A
+        items:
+          - const: pine64,pine-h64-modelA
+          - const: allwinner,sun50i-h6
+
       - description: Pine64 PineH64 model B
         items:
           - const: pine64,pine-h64-modelB
arch/arm64/boot/dts/allwinner/Makefile +1 -0
index d2418021768b..6bda5d9961c8 100644
@@ -26,4 +26,5 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-3.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-lite2.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-one-plus.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64-modelA.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6.dtb
arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64-modelA.dts new file +30 -0
new file mode 100644
index 000000000000..8c6b8978db1a
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+/*
+ * Copyright (C) 2019 Corentin LABBE <[email protected]>
+ */
+
+#include "sun50i-h6-pine-h64.dts"
+
+/ {
+	model = "Pine H64 model A";
+	compatible = "pine64,pine-h64-modelA", "allwinner,sun50i-h6";
+
+	reg_gmac_3v3: gmac-3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc-gmac-3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		startup-delay-us = <100000>;
+		gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+};
+
+&hdmi_connector {
+	ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
+};
+
+&emac {
+	phy-supply = <&reg_gmac_3v3>;
+};
Signature · 1 line
2.23.0