ARM64: dts: allwinner: Add devicetree for pineH64 modelB
Subsystems (2)
v5 cover ARM64: dts: allwinner: Add devicetree for pineH64 modelB
Hello
Pineh64 have two existing model (A and B) with some hardware difference and so need two different DT file.
But the current situation has only one file for both.
This serie fix this situation by being more clear on which DT file is needed for both model.
Regards
Changes since v4:
- reverted compatible change for model A
- renamed compatible of model B
Change since v3:
- state the current file is model A and add a new modelB file.
Change since v2:
- Added the HDMI connector node to model A
Changes since v1:
- Added the first patch for stating which model support the sun50i-h6-pine-h64.dts
Corentin Labbe (2):
ARM64: dts: sun50i-h6-pine-h64: state that the DT supports the modelA
ARM64: dts: allwinner: add pineh64 model B
.../devicetree/bindings/arm/sunxi.yaml | 7 ++++++- arch/arm64/boot/dts/allwinner/Makefile | 1 + .../allwinner/sun50i-h6-pine-h64-model-b.dts | 21 +++++++++++++++++++ .../boot/dts/allwinner/sun50i-h6-pine-h64.dts | 17 ++++++++++++--- 4 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64-model-b.dts
Signature · 1 line
2.23.0
PATCH v5 1/2 ARM64: dts: sun50i-h6-pine-h64: state that the DT supports the modelA
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 was 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.
But as asked by the maintainer this patch state this file is for model A. In the process this patch adds the missing compoments to made it work on model A.
--- .../devicetree/bindings/arm/sunxi.yaml | 2 +- .../boot/dts/allwinner/sun50i-h6-pine-h64.dts | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/arm/sunxi.yaml +1 -1
@@ -599,7 +599,7 @@ properties: - const: pine64,pine64-plus - const: allwinner,sun50i-a64 - - description: Pine64 PineH64 + - description: Pine64 PineH64 model A items: - const: pine64,pine-h64 - const: allwinner,sun50i-h6
arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts +14 -3
@@ -10,7 +10,7 @@ #include <dt-bindings/gpio/gpio.h> / { - model = "Pine H64"; + model = "Pine H64 model A"; compatible = "pine64,pine-h64", "allwinner,sun50i-h6"; aliases {
@@ -22,9 +22,10 @@ stdout-path = "serial0:115200n8"; }; - connector { + hdmi_connector: connector { compatible = "hdmi-connector"; type = "a"; + ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */ port { hdmi_con_in: endpoint {
@@ -52,6 +53,16 @@ }; }; + 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; + }; + reg_usb_vbus: vbus { compatible = "regulator-fixed"; regulator-name = "usb-vbus";
@@ -68,7 +79,7 @@ pinctrl-0 = <&ext_rgmii_pins>; phy-mode = "rgmii"; phy-handle = <&ext_rgmii_phy>; - phy-supply = <®_aldo2>; + phy-supply = <®_gmac_3v3>; allwinner,rx-delay-ps = <200>; allwinner,tx-delay-ps = <200>; status = "okay";
Signature · 1 line
2.23.0
PATCH v5 2/2 ARM64: dts: allwinner: add pineh64 model B
In reply to Corentin LabbeThis patch adds the model B of the PineH64.
The model B is smaller than the pine64 model A and has no PCIE slot.
The only devicetree difference with the pineH64 model A, 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-model-b.dts | 21 +++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64-model-b.dts
Documentation/devicetree/bindings/arm/sunxi.yaml +5 -0
@@ -604,6 +604,11 @@ properties: - const: pine64,pine-h64 - const: allwinner,sun50i-h6 + - description: Pine64 PineH64 model B + items: + - const: pine64,pine-h64-model-b + - const: allwinner,sun50i-h6 + - description: Pine64 LTS items: - const: pine64,pine64-lts
arch/arm64/boot/dts/allwinner/Makefile +1 -0
@@ -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-model-b.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6.dtb
arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64-model-b.dts new file +21 -0
@@ -0,0 +1,21 @@ +// 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 B"; + compatible = "pine64,pine-h64-model-b", "allwinner,sun50i-h6"; + + /delete-node/ reg_gmac_3v3; +}; + +&hdmi_connector { + /delete-property/ ddc-en-gpios; +}; + +&emac { + phy-supply = <®_aldo2>; +};
Signature · 1 line
2.23.0
Hi,
Quoted 7 lines · Corentin Labbe
Hello
Pineh64 have two existing model (A and B) with some hardware difference and so need two different DT file.
But the current situation has only one file for both.
This serie fix this situation by being more clear on which DT file is needed for both model.
sorry I didn't tell you on v1, the prefix for arm64 is lowercase (unlike arm where it's uppercase).
I've fixed it while applying, thanks!
Maxime