arm64: Add initial support for Odroid-N2
Subsystems (2)
v4 cover arm64: Add initial support for Odroid-N2
This patchset adds basic support for :
- Amlogic G12B, which is very similar to G12A
- The HardKernel Odroid-N2 based on the S922X SoC
The Amlogic G12B SoC is very similar with the G12A SoC, sharing most of the features and architecture, but with these differences :
- The first CPU cluster only has 2xCortex-A53 instead of 4
- G12B has a second cluster of 4xCortex-A73
- Both cluster can achieve 2GHz instead of 1,8GHz for G12A
- CPU Clock architecture is difference, thus needing a different compatible to handle this slight difference
- Supports a MIPI CSI input
- Embeds a Mali-G52 instead of a Mali-G31, but integration is the same
Actual support is done in the same way as for the GXM support, including the G12A dtsi and redefining the CPU clusters.
Unlike GXM, the first cluster is different, thus needing to remove the last 2 cpu nodes of the first cluster.
Dependencies :
- Patch 1, 2 : YAML rewrite of amlogic.txt bindings at [7]
- Patch 3 : None since clock + g12b bindings has been acked
Changes since v3 at [8]:
- Dropped arm,armv8
- Dropped eee disable, not needed in further tests
- Add comments about where are connected the regulators pins
- Moved the phy0 regulator to the usb vbus regulator
Changes since v2 at [5]:
- sent the clk patches in standalone at [6]
- rewrote the bindings on top of the YAML rewrite at [7]
- Added MMC, SDCard and Network support to Odroid-N2
Changes since v1 at [3]:
- Renamed the g12b cpu clocks like g12a counterparts
- Rebased clock patches on top of Guillaume's Temperature sensor Clock patches at [4]
- Added AO-CEC-B support to N2 DTS
Changes since RFC at [1]:
- Added bindings review tags
- Moved the fclk_div3 CRITICAL flags to the gate
- Removed invalid CRITICAL flags on the cpu clocks
[1] https://lkml.kernel.org/r/[email protected]
[2] https://lkml.kernel.org/r/[email protected]
[3] https://lkml.kernel.org/r/[email protected]
[4] https://lkml.kernel.org/r/[email protected]
[5] https://lkml.kernel.org/r/[email protected]
[6] https://lkml.kernel.org/r/[email protected]
[7] https://lkml.kernel.org/r/[email protected]
[8] https://lkml.kernel.org/r/[email protected]
Neil Armstrong (3):
dt-bindings: arm: amlogic: add G12B bindings
dt-bindings: arm: amlogic: add Odroid-N2 binding
arm64: dts: meson: Add minimal support for Odroid-N2
.../devicetree/bindings/arm/amlogic.yaml | 6 + arch/arm64/boot/dts/amlogic/Makefile | 1 + .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 288 ++++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-g12b.dtsi | 82 +++++ 4 files changed, 377 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b.dtsi
Signature · 1 line
2.21.0
PATCH v4 1/3 dt-bindings: arm: amlogic: add G12B bindings
Add compatible for the Amlogic G12B SoC, sharing most of the features and architecture with the G12A SoC.
--- Documentation/devicetree/bindings/arm/amlogic.yaml | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/arm/amlogic.yaml +4 -0
@@ -137,4 +137,8 @@ properties: - amlogic,u200 - const: amlogic,g12a + - description: Boards with the Amlogic Meson G12B S922X SoC + items: + - const: amlogic,g12b + ...
Signature · 1 line
2.21.0
PATCH v4 2/3 dt-bindings: arm: amlogic: add Odroid-N2 binding
In reply to Neil ArmstrongAdd compatible for the Amlogic G12B (S922X) SoC based Odroid-N2 SBC from HardKernel.
--- Documentation/devicetree/bindings/arm/amlogic.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/arm/amlogic.yaml +2 -0
@@ -139,6 +139,8 @@ properties: - description: Boards with the Amlogic Meson G12B S922X SoC items: + - enum: + - hardkernel,odroid-n2 - const: amlogic,g12b ...
Signature · 1 line
2.21.0
PATCH v4 3/3 arm64: dts: meson: Add minimal support for Odroid-N2
In reply to Neil ArmstrongThis patch adds basic support for :
- Amlogic G12B, which is very similar to G12A
- The HardKernel Odroid-N2 based on the S922X SoC
The Amlogic G12B SoC is very similar with the G12A SoC, sharing most of the features and architecture, but with these differences :
- The first CPU cluster only has 2xCortex-A53 instead of 4
- G12B has a second cluster of 4xCortex-A73
- Both cluster can achieve 2GHz instead of 1,8GHz for G12A
- CPU Clock architecture is difference, thus needing a different compatible to handle this slight difference
- Supports a MIPI CSI input
- Embeds a Mali-G52 instead of a Mali-G31, but integration is the same
Actual support is done in the same way as for the GXM support, including the G12A dtsi and redefining the CPU clusters.
Unlike GXM, the first cluster is different, thus needing to remove the last 2 cpu nodes of the first cluster.
--- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 288 ++++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-g12b.dtsi | 82 +++++ 3 files changed, 371 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b.dtsi
arch/arm64/boot/dts/amlogic/Makefile +1 -0
@@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-axg-s400.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts new file +288 -0
288 lines not on this page · raw message
arch/arm64/boot/dts/amlogic/meson-g12b.dtsi new file +82 -0
82 lines not on this page · raw message
Signature · 1 line
2.21.0
Re: [PATCH v4 3/3] arm64: dts: meson: Add minimal support for Odroid-N2
Quoted 15 lines · Neil Armstrong
This patch adds basic support for :
- Amlogic G12B, which is very similar to G12A
- The HardKernel Odroid-N2 based on the S922X SoCThe Amlogic G12B SoC is very similar with the G12A SoC, sharing most of the features and architecture, but with these differences :
- The first CPU cluster only has 2xCortex-A53 instead of 4
- G12B has a second cluster of 4xCortex-A73
- Both cluster can achieve 2GHz instead of 1,8GHz for G12A
- CPU Clock architecture is difference, thus needing a different compatible to handle this slight difference
- Supports a MIPI CSI input
- Embeds a Mali-G52 instead of a Mali-G31, but integration is the same
Quoted 6 lines
Actual support is done in the same way as for the GXM support, including the G12A dtsi and redefining the CPU clusters.
Unlike GXM, the first cluster is different, thus needing to remove the last 2 cpu nodes of the first cluster.Signed-off-by Neil Armstrong <[email protected]>
Re: [PATCH v4 3/3] arm64: dts: meson: Add minimal support for Odroid-N2
In reply to Neil ArmstrongQuoted 54 lines · Neil Armstrong
This patch adds basic support for :
- Amlogic G12B, which is very similar to G12A
- The HardKernel Odroid-N2 based on the S922X SoCThe Amlogic G12B SoC is very similar with the G12A SoC, sharing most of the features and architecture, but with these differences :
- The first CPU cluster only has 2xCortex-A53 instead of 4
- G12B has a second cluster of 4xCortex-A73
- Both cluster can achieve 2GHz instead of 1,8GHz for G12A
- CPU Clock architecture is difference, thus needing a different compatible to handle this slight difference
- Supports a MIPI CSI input
- Embeds a Mali-G52 instead of a Mali-G31, but integration is the sameActual support is done in the same way as for the GXM support, including the G12A dtsi and redefining the CPU clusters.
Unlike GXM, the first cluster is different, thus needing to remove the last 2 cpu nodes of the first cluster.Signed-off-by Neil Armstrong <[email protected]>--- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 288 ++++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-g12b.dtsi | 82 +++++ 3 files changed, 371 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b.dtsiarch/arm64/boot/dts/amlogic/Makefile +1
-0@@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-axg-s400.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtbarch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts new file +8
-0@@ -0,0 +1,288 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 BayLibre, SAS + * Author: Neil Armstrong <[email protected]> + */ + +/dts-v1/; +
[...]
Quoted 25 lines
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts new file +25
-0+ + hub_5v: regulator-hub_5v { + compatible = "regulator-fixed"; + regulator-name = "HUB_5V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc_5v>; + + /* Connected to the Hub CHIPENABLE, LOW sets low power state */ + gpio = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + usb_pwr_en: regulator-usb_pwr_en { + compatible = "regulator-fixed"; + regulator-name = "USB_PWR_EN"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&hub_5v>; + + /* Connected to the microUSB port power enable */ + gpio = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +
[...]
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts line 288
Quoted 13 lines
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts new file +13
-0+ +&usb { + status = "okay"; + vbus-supply = <&usb_pwr_en>; +}; + +&usb2_phy0 { + phy-supply = <&vcc_5v>; +}; + +&usb2_phy1 { + phy-supply = <&vcc_5v>; +};
In fact, I need to fixup here :
usb2_phy1 needs &hub_5v and regulator-usb_pwr_en depends on &vcc_5v instead...
@Martin, can I still keep your reviewed-by for v5 ?
Neil
Quoted 7 lines
arch/arm64/boot/dts/amlogic/meson-g12b.dtsi new file +1
-0@@ -0,0 +1,82 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
[...]
Quoted 8 lines
arch/arm64/boot/dts/amlogic/meson-g12b.dtsi new file +7
-0+ }; + }; +}; + +&clkc { + compatible = "amlogic,g12b-clkc"; +};
Martin Blumenstingl
reviewerRe: [PATCH v4 3/3] arm64: dts: meson: Add minimal support for Odroid-N2
Hi Neil,
Quoted 103 lines · Neil Armstrong
Quoted 54 lines · Neil Armstrong
This patch adds basic support for :
- Amlogic G12B, which is very similar to G12A
- The HardKernel Odroid-N2 based on the S922X SoCThe Amlogic G12B SoC is very similar with the G12A SoC, sharing most of the features and architecture, but with these differences :
- The first CPU cluster only has 2xCortex-A53 instead of 4
- G12B has a second cluster of 4xCortex-A73
- Both cluster can achieve 2GHz instead of 1,8GHz for G12A
- CPU Clock architecture is difference, thus needing a different compatible to handle this slight difference
- Supports a MIPI CSI input
- Embeds a Mali-G52 instead of a Mali-G31, but integration is the sameActual support is done in the same way as for the GXM support, including the G12A dtsi and redefining the CPU clusters.
Unlike GXM, the first cluster is different, thus needing to remove the last 2 cpu nodes of the first cluster.Signed-off-by Neil Armstrong <[email protected]>--- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 288 ++++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-g12b.dtsi | 82 +++++ 3 files changed, 371 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b.dtsiarch/arm64/boot/dts/amlogic/Makefile +1
-0@@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-axg-s400.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtbarch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts new file +8
-0@@ -0,0 +1,288 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 BayLibre, SAS + * Author: Neil Armstrong <[email protected]> + */ + +/dts-v1/; +[...]
Quoted 25 lines
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts new file +25
-0+ + hub_5v: regulator-hub_5v { + compatible = "regulator-fixed"; + regulator-name = "HUB_5V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc_5v>; + + /* Connected to the Hub CHIPENABLE, LOW sets low power state */ + gpio = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + usb_pwr_en: regulator-usb_pwr_en { + compatible = "regulator-fixed"; + regulator-name = "USB_PWR_EN"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&hub_5v>; + + /* Connected to the microUSB port power enable */ + gpio = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +[...]
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts line 288
Quoted 13 lines
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts new file +13
-0+ +&usb { + status = "okay"; + vbus-supply = <&usb_pwr_en>; +}; + +&usb2_phy0 { + phy-supply = <&vcc_5v>; +}; + +&usb2_phy1 { + phy-supply = <&vcc_5v>; +};In fact, I need to fixup here :
Quoted 1 line
usb2_phy1needs&hub_5vand regulator-usb_pwr_en depends on&vcc_5vinstead...
sounds fine for me because I don't see a better way for now
Quoted 1 line
@Martin, can I still keep your reviewed-by for v5 ?
yes, you can keep it
when you re-send it: can you please add a comment to the phy-supply in usb2_phy1?
I have this in mind: "enable the hub which is connected to this port" (imho this is a valuable hint together with the "CHIPENABLE" comment that you already have inside &hub_5v and it helps to make it easier to understand without having to test it on physical hardware)
Martin
Re: [PATCH v4 3/3] arm64: dts: meson: Add minimal support for Odroid-N2
Quoted 110 lines · Martin Blumenstingl
Hi Neil,
Quoted 103 lines · Neil Armstrong
Quoted 54 lines · Neil Armstrong
This patch adds basic support for :
- Amlogic G12B, which is very similar to G12A
- The HardKernel Odroid-N2 based on the S922X SoCThe Amlogic G12B SoC is very similar with the G12A SoC, sharing most of the features and architecture, but with these differences :
- The first CPU cluster only has 2xCortex-A53 instead of 4
- G12B has a second cluster of 4xCortex-A73
- Both cluster can achieve 2GHz instead of 1,8GHz for G12A
- CPU Clock architecture is difference, thus needing a different compatible to handle this slight difference
- Supports a MIPI CSI input
- Embeds a Mali-G52 instead of a Mali-G31, but integration is the sameActual support is done in the same way as for the GXM support, including the G12A dtsi and redefining the CPU clusters.
Unlike GXM, the first cluster is different, thus needing to remove the last 2 cpu nodes of the first cluster.Signed-off-by Neil Armstrong <[email protected]>--- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 288 ++++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-g12b.dtsi | 82 +++++ 3 files changed, 371 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b.dtsiarch/arm64/boot/dts/amlogic/Makefile +1
-0@@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-axg-s400.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtbarch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts new file +8
-0@@ -0,0 +1,288 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 BayLibre, SAS + * Author: Neil Armstrong <[email protected]> + */ + +/dts-v1/; +[...]
Quoted 25 lines
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts new file +25
-0+ + hub_5v: regulator-hub_5v { + compatible = "regulator-fixed"; + regulator-name = "HUB_5V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc_5v>; + + /* Connected to the Hub CHIPENABLE, LOW sets low power state */ + gpio = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + usb_pwr_en: regulator-usb_pwr_en { + compatible = "regulator-fixed"; + regulator-name = "USB_PWR_EN"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&hub_5v>; + + /* Connected to the microUSB port power enable */ + gpio = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +[...]
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts line 288
Quoted 13 lines
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts new file +13
-0+ +&usb { + status = "okay"; + vbus-supply = <&usb_pwr_en>; +}; + +&usb2_phy0 { + phy-supply = <&vcc_5v>; +}; + +&usb2_phy1 { + phy-supply = <&vcc_5v>; +};In fact, I need to fixup here :
Quoted 1 line
usb2_phy1needs&hub_5vand regulator-usb_pwr_en depends on&vcc_5vinstead...sounds fine for me because I don't see a better way for now
Quoted 1 line
@Martin, can I still keep your reviewed-by for v5 ?
Quoted 8 lines
yes, you can keep it
when you re-send it: can you please add a comment to the phy-supply in
usb2_phy1?
I have this in mind: "enable the hub which is connected to this port" (imho this is a valuable hint together with the "CHIPENABLE" comment that you already have inside&hub_5vand it helps to make it easier to understand without having to test it on physical hardware)
Sure, thanks !
Neil
Quoted 4 lines
Martin