Skip to contentSkip to conversation

arm64: add support for the Khadas VIM3

PATCH In review Neil Armstrong 4 participants 18 messages Jul 31, 2019 – Aug 8, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover arm64: add support for the Khadas VIM3

The Khadas VIM3 uses the Amlogic S922X or A311S SoC, both based on the Amlogic G12B SoC family, on a board with the same form factor as the VIM/VIM2 models. It ships in two variants; basic and
pro which differ in RAM and eMMC size:

- 2GB (basic) or 4GB (pro) LPDDR4 RAM
- 16GB (basic) or 32GB (pro) eMMC 5.1 storage
- 16MB SPI flash
- 10/100/1000 Base-T Ethernet
- AP6398S Wireless (802.11 a/b/g/n/ac, BT5.0)
- HDMI 2.1 video
- 1x USB 2.0 + 1x USB 3.0 ports
- 1x USB-C (power) with USB 2.0 OTG
- 3x LED's (1x red, 1x blue, 1x white)
- 3x buttons (power, function, reset)
- IR receiver
- M2 socket with PCIe, USB, ADC & I2C
- 40pin GPIO Header
- 1x micro SD card slot

First of all, the S922X and A311D are now specified since they differ by some HW features and the capable operating points.

A common meson-g12b-khadas-vim3.dtsi is added to support both S922X and A311D SoCs supported by two variants of the board.

Odroid-N2 is changed to use the s922x.dtsi include.

Dependencies:
- patch 5 & 6: "arm64: g12a: add support for DVFS" at [1]

[1] https://patchwork.kernel.org/cover/11063837/

Christian Hewitt (4):
soc: amlogic: meson-gx-socinfo: add A311D id
dt-bindings: arm: amlogic: add support for the Khadas VIM3
arm64: dts: meson-g12b: support a311d and s922x cpu operating points
arm64: dts: meson-g12b-khadas-vim3: add initial device-tree

Neil Armstrong (2):
dt-bindings: arm: amlogic: add bindings for G12B based S922X SoC
dt-bindings: arm: amlogic: add bindings for the Amlogic G12B based

    A311D SoC
 .../devicetree/bindings/arm/amlogic.yaml      |   9 +
 arch/arm64/boot/dts/amlogic/Makefile          |   2 +
 .../amlogic/meson-g12b-a311d-khadas-vim3.dts  |  15 +
 .../boot/dts/amlogic/meson-g12b-a311d.dtsi    | 149 +++++
 .../dts/amlogic/meson-g12b-khadas-vim3.dtsi   | 542 ++++++++++++++++++
 .../boot/dts/amlogic/meson-g12b-odroid-n2.dts |   2 +-
 .../amlogic/meson-g12b-s922x-khadas-vim3.dts  |  15 +
 .../boot/dts/amlogic/meson-g12b-s922x.dtsi    | 124 ++++
 arch/arm64/boot/dts/amlogic/meson-g12b.dtsi   | 115 ----
 drivers/soc/amlogic/meson-gx-socinfo.c        |   1 +
 10 files changed, 858 insertions(+), 116 deletions(-)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-a311d.dtsi
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-khadas-vim3.dtsi
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-s922x-khadas-vim3.dts
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi
Signature · 1 line
2.22.0
#1 lore raw

PATCH 1/6 soc: amlogic: meson-gx-socinfo: add A311D id

From: Christian Hewitt <[email protected]>

Add the SoC ID for the A311D Amlogic SoC.

---
 drivers/soc/amlogic/meson-gx-socinfo.c | 1 +
 1 file changed, 1 insertion(+)
drivers/soc/amlogic/meson-gx-socinfo.c +1 -0
index bca34954518e..ff86a75939e8 100644
@@ -65,6 +65,7 @@ static const struct meson_gx_package_id {
 	{ "S905D2", 0x28, 0x10, 0xf0 },
 	{ "S905X2", 0x28, 0x40, 0xf0 },
 	{ "S922X", 0x29, 0x40, 0xf0 },
+	{ "A311D", 0x29, 0x10, 0xf0 },
 };
 
 static inline unsigned int socinfo_to_major(u32 socinfo)
Signature · 1 line
2.22.0
#3 lore raw

PATCH 2/6 dt-bindings: arm: amlogic: add bindings for G12B based S922X SoC

In reply to Neil Armstrong

Add a specific compatible for the Amlogic G12B family based S922X SoC to differentiate with the A311D SoC from the same family.

---
 Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/amlogic.yaml +1 -0
index 325c6fd3566d..3c3bc806cd23 100644
@@ -139,6 +139,7 @@ properties:
         items:
           - enum:
               - hardkernel,odroid-n2
+          - const: amlogic,s922x
           - const: amlogic,g12b
 
 ...
Signature · 1 line
2.22.0
maintainer Reviewed-by on v1 2/6
#4 lore raw

Re: [PATCH 2/6] dt-bindings: arm: amlogic: add bindings for G12B based S922X SoC

Quoted 8 lines · Neil Armstrong

Add a specific compatible for the Amlogic G12B family based S922X SoC to differentiate with the A311D SoC from the same family.

---
 Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
 1 file changed, 1 insertion(+)
maintainer
#5 lore raw

Re: [PATCH 2/6] dt-bindings: arm: amlogic: add bindings for G12B based S922X SoC

In reply to Neil Armstrong
Quoted 13 lines · Neil Armstrong

Add a specific compatible for the Amlogic G12B family based S922X SoC to differentiate with the A311D SoC from the same family.

---
 Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/amlogic.yaml +0 -0
index 325c6fd3566d..3c3bc806cd23 100644

Documentation/devicetree/bindings/arm/amlogic.yaml properties: · line 143

Quoted 5 lines
Documentation/devicetree/bindings/arm/amlogic.yaml +1 -0
@@ -139,6 +139,7 @@ properties:
         items:
           - enum:
               - hardkernel,odroid-n2
+          - const: amlogic,s922x
           - const: amlogic,g12b

nit: in previous binding docs, we were trying to keep these sorted alphabetically. I'll reorder the new "s922x" after "g12b" when applying.

Thanks,

Kevin

maintainer
#6 lore raw

Re: [PATCH 2/6] dt-bindings: arm: amlogic: add bindings for G12B based S922X SoC

Quoted 11 lines · Kevin Hilman
Quoted 8 lines · Neil Armstrong

Add a specific compatible for the Amlogic G12B family based S922X SoC to differentiate with the A311D SoC from the same family.

---
 Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
 1 file changed, 1 insertion(+)
Quoted 14 lines

Documentation/devicetree/bindings/arm/amlogic.yaml properties: · line 143

Quoted 10 lines
Documentation/devicetree/bindings/arm/amlogic.yaml +1 -0
index 325c6fd3566d..3c3bc806cd23 100644
@@ -139,6 +139,7 @@ properties:
         items:
           - enum:
               - hardkernel,odroid-n2
+          - const: amlogic,s922x
           - const: amlogic,g12b

nit: in previous binding docs, we were trying to keep these sorted alphabetically. I'll reorder the new "s922x" after "g12b" when applying.

No, this is not documentation ordering. It's the order compatible strings must be in.

Rob

maintainer
#7 lore raw

Re: [PATCH 2/6] dt-bindings: arm: amlogic: add bindings for G12B based S922X SoC

Quoted 28 lines · Rob Herring
Quoted 11 lines · Kevin Hilman
Quoted 8 lines · Neil Armstrong

Add a specific compatible for the Amlogic G12B family based S922X SoC to differentiate with the A311D SoC from the same family.

---
 Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
 1 file changed, 1 insertion(+)
Quoted 14 lines

Documentation/devicetree/bindings/arm/amlogic.yaml properties: · line 143

Quoted 10 lines
Documentation/devicetree/bindings/arm/amlogic.yaml +1 -0
index 325c6fd3566d..3c3bc806cd23 100644
@@ -139,6 +139,7 @@ properties:
         items:
           - enum:
               - hardkernel,odroid-n2
+          - const: amlogic,s922x
           - const: amlogic,g12b

nit: in previous binding docs, we were trying to keep these sorted alphabetically. I'll reorder the new "s922x" after "g12b" when applying.

Quoted 2 lines

No, this is not documentation ordering. It's the order compatible strings must be in.

BTW, you probably should run:

make DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/amlogic.yaml dtbs_check

on your tree regularly. This will catch any errors like this and undocumented boards (but not undocumented SoCs, still too many for me to get that in place).

Rob

maintainer
#8 lore raw

Re: [PATCH 2/6] dt-bindings: arm: amlogic: add bindings for G12B based S922X SoC

In reply to Rob Herring
Quoted 27 lines · Rob Herring
Quoted 11 lines · Kevin Hilman
Quoted 8 lines · Neil Armstrong

Add a specific compatible for the Amlogic G12B family based S922X SoC to differentiate with the A311D SoC from the same family.

---
 Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
 1 file changed, 1 insertion(+)
Quoted 14 lines

Documentation/devicetree/bindings/arm/amlogic.yaml properties: · line 143

Quoted 10 lines
Documentation/devicetree/bindings/arm/amlogic.yaml +1 -0
index 325c6fd3566d..3c3bc806cd23 100644
@@ -139,6 +139,7 @@ properties:
         items:
           - enum:
               - hardkernel,odroid-n2
+          - const: amlogic,s922x
           - const: amlogic,g12b

nit: in previous binding docs, we were trying to keep these sorted alphabetically. I'll reorder the new "s922x" after "g12b" when applying.

Quoted 2 lines

No, this is not documentation ordering. It's the order compatible strings must be in.

Ah, thanks for clarifying,

Kevin

#9 lore raw

PATCH 3/6 dt-bindings: arm: amlogic: add bindings for the Amlogic G12B based A311D SoC

In reply to Neil Armstrong

Add a specific compatible for the Amlogic G12B bases A311D SoC used in the Khadas VIM3.

---
 Documentation/devicetree/bindings/arm/amlogic.yaml | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/arm/amlogic.yaml +5 -0
index 3c3bc806cd23..efa032d12402 100644
@@ -135,6 +135,11 @@ properties:
               - amlogic,u200
           - const: amlogic,g12a
 
+      - description: Boards with the Amlogic Meson G12B A311D SoC
+        items:
+          - const: amlogic,a311d
+          - const: amlogic,g12b
+
       - description: Boards with the Amlogic Meson G12B S922X SoC
         items:
           - enum:
Signature · 1 line
2.22.0
maintainer Reviewed-by on v1 3/6
#10 lore raw

Re: [PATCH 3/6] dt-bindings: arm: amlogic: add bindings for the Amlogic G12B based A311D SoC

Quoted 8 lines · Neil Armstrong

Add a specific compatible for the Amlogic G12B bases A311D SoC used in the Khadas VIM3.

---
 Documentation/devicetree/bindings/arm/amlogic.yaml | 5 +++++
 1 file changed, 5 insertions(+)
#11 lore raw

PATCH 4/6 dt-bindings: arm: amlogic: add support for the Khadas VIM3

In reply to Neil Armstrong

From: Christian Hewitt <[email protected]>

The Khadas VIM3 uses the Amlogic S922X or A311S SoC, both based on the Amlogic G12B SoC family, on a board with the same form factor as the VIM/VIM2 models. It ships in two variants; basic and
pro which differ in RAM and eMMC size:

- 2GB (basic) or 4GB (pro) LPDDR4 RAM
- 16GB (basic) or 32GB (pro) eMMC 5.1 storage
- 16MB SPI flash
- 10/100/1000 Base-T Ethernet
- AP6398S Wireless (802.11 a/b/g/n/ac, BT5.0)
- HDMI 2.1 video
- 1x USB 2.0 + 1x USB 3.0 ports
- 1x USB-C (power) with USB 2.0 OTG
- 3x LED's (1x red, 1x blue, 1x white)
- 3x buttons (power, function, reset)
- IR receiver
- M2 socket with PCIe, USB, ADC & I2C
- 40pin GPIO Header
- 1x micro SD card slot

---
 Documentation/devicetree/bindings/arm/amlogic.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/arm/amlogic.yaml +3 -0
index efa032d12402..04a2b0ef34c6 100644
@@ -137,6 +137,8 @@ properties:
 
       - description: Boards with the Amlogic Meson G12B A311D SoC
         items:
+          - enum:
+              - khadas,vim3
           - const: amlogic,a311d
           - const: amlogic,g12b
 
@@ -144,6 +146,7 @@ properties:
         items:
           - enum:
               - hardkernel,odroid-n2
+              - khadas,vim3
           - const: amlogic,s922x
           - const: amlogic,g12b
 
Signature · 1 line
2.22.0
maintainer Reviewed-by on v1 4/6
#12 lore raw

Re: [PATCH 4/6] dt-bindings: arm: amlogic: add support for the Khadas VIM3

Quoted 23 lines · Neil Armstrong

From: Christian Hewitt <[email protected]>

The Khadas VIM3 uses the Amlogic S922X or A311S SoC, both based on the Amlogic G12B SoC family, on a board with the same form factor as the VIM/VIM2 models. It ships in two variants; basic and
pro which differ in RAM and eMMC size:

- 2GB (basic) or 4GB (pro) LPDDR4 RAM
- 16GB (basic) or 32GB (pro) eMMC 5.1 storage
- 16MB SPI flash
- 10/100/1000 Base-T Ethernet
- AP6398S Wireless (802.11 a/b/g/n/ac, BT5.0)
- HDMI 2.1 video
- 1x USB 2.0 + 1x USB 3.0 ports
- 1x USB-C (power) with USB 2.0 OTG
- 3x LED's (1x red, 1x blue, 1x white)
- 3x buttons (power, function, reset)
- IR receiver
- M2 socket with PCIe, USB, ADC & I2C
- 40pin GPIO Header
- 1x micro SD card slot

Quoted 5 lines
---
 Documentation/devicetree/bindings/arm/amlogic.yaml | 3 +++
 1 file changed, 3 insertions(+)
#13 lore raw

PATCH 5/6 arm64: dts: meson-g12b: support a311d and s922x cpu operating points

In reply to Neil Armstrong

From: Christian Hewitt <[email protected]>

Meson g12b ships with a low-speed (S922X) and high-speed (A311D) variant so remove cpu_opp_table nodes in meson-g12b.dtsi and create two new dtsi that can be included in device-specific dts files. Opp points were taken from the vendor BSP kernel.

Also make meson-g12b-odroid-n2.dts include the new meson-g12b-s922x.dtsi.

---
 .../boot/dts/amlogic/meson-g12b-a311d.dtsi    | 149 ++++++++++++++++++
 .../boot/dts/amlogic/meson-g12b-odroid-n2.dts |   2 +-
 .../boot/dts/amlogic/meson-g12b-s922x.dtsi    | 124 +++++++++++++++
 arch/arm64/boot/dts/amlogic/meson-g12b.dtsi   | 115 --------------
 4 files changed, 274 insertions(+), 116 deletions(-)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-a311d.dtsi
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi
arch/arm64/boot/dts/amlogic/meson-g12b-a311d.dtsi new file +149 -0
new file mode 100644
index 000000000000..d61f43052a34
@@ -0,0 +1,149 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 BayLibre, SAS
+ * Author: Neil Armstrong <[email protected]>
+ */
+
+#include "meson-g12b.dtsi"
+
+/ {
+	cpu_opp_table_0: opp-table-0 {
+		compatible = "operating-points-v2";
+		opp-shared;
+
+		opp-100000000 {
+			opp-hz = /bits/ 64 <100000000>;
+			opp-microvolt = <731000>;
+		};
+
+		opp-250000000 {
+			opp-hz = /bits/ 64 <250000000>;
+			opp-microvolt = <731000>;
+		};
+
+		opp-500000000 {
+			opp-hz = /bits/ 64 <500000000>;
+			opp-microvolt = <731000>;
+		};
+
+		opp-667000000 {
+			opp-hz = /bits/ 64 <667000000>;
+			opp-microvolt = <731000>;
+		};
+
+		opp-1000000000 {
+			opp-hz = /bits/ 64 <1000000000>;
+			opp-microvolt = <761000>;
+		};
+
+		opp-1200000000 {
+			opp-hz = /bits/ 64 <1200000000>;
+			opp-microvolt = <781000>;
+		};
+
+		opp-1398000000 {
+			opp-hz = /bits/ 64 <1398000000>;
+			opp-microvolt = <811000>;
+		};
+
+		opp-1512000000 {
+			opp-hz = /bits/ 64 <1512000000>;
+			opp-microvolt = <861000>;
+		};
+
+		opp-1608000000 {
+			opp-hz = /bits/ 64 <1608000000>;
+			opp-microvolt = <901000>;
+		};
+
+		opp-1704000000 {
+			opp-hz = /bits/ 64 <1704000000>;
+			opp-microvolt = <951000>;
+		};
+
+		opp-1800000000 {
+			opp-hz = /bits/ 64 <1800000000>;
+			opp-microvolt = <1001000>;
+		};
+	};
+
+	cpub_opp_table_1: opp-table-1 {
+		compatible = "operating-points-v2";
+		opp-shared;
+
+		opp-100000000 {
+			opp-hz = /bits/ 64 <100000000>;
+			opp-microvolt = <731000>;
+		};
+
+		opp-250000000 {
+			opp-hz = /bits/ 64 <250000000>;
+			opp-microvolt = <731000>;
+		};
+
+		opp-500000000 {
+			opp-hz = /bits/ 64 <500000000>;
+			opp-microvolt = <731000>;
+		};
+
+		opp-667000000 {
+			opp-hz = /bits/ 64 <667000000>;
+			opp-microvolt = <731000>;
+		};
+
+		opp-1000000000 {
+			opp-hz = /bits/ 64 <1000000000>;
+			opp-microvolt = <731000>;
+		};
+
+		opp-1200000000 {
+			opp-hz = /bits/ 64 <1200000000>;
+			opp-microvolt = <751000>;
+		};
+
+		opp-1398000000 {
+			opp-hz = /bits/ 64 <1398000000>;
+			opp-microvolt = <771000>;
+		};
+
+		opp-1512000000 {
+			opp-hz = /bits/ 64 <1512000000>;
+			opp-microvolt = <771000>;
+		};
+
+		opp-1608000000 {
+			opp-hz = /bits/ 64 <1608000000>;
+			opp-microvolt = <781000>;
+		};
+
+		opp-1704000000 {
+			opp-hz = /bits/ 64 <1704000000>;
+			opp-microvolt = <791000>;
+		};
+
+		opp-1800000000 {
+			opp-hz = /bits/ 64 <1800000000>;
+			opp-microvolt = <831000>;
+		};
+
+                opp-1908000000 {
+                        opp-hz = /bits/ 64 <1908000000>;
+                        opp-microvolt = <861000>;
+                };
+
+                opp-2016000000 {
+                        opp-hz = /bits/ 64 <2016000000>;
+                        opp-microvolt = <911000>;
+                };
+
+                opp-2108000000 {
+                        opp-hz = /bits/ 64 <2108000000>;
+                        opp-microvolt = <951000>;
+                };
+
+                opp-2208000000 {
+                        opp-hz = /bits/ 64 <2208000000>;
+                        opp-microvolt = <1011000>;
+                };
+	};
+};
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts +1 -1
index 777bfb938854..6cfc2c69bb4f 100644
@@ -6,7 +6,7 @@
 
 /dts-v1/;
 
-#include "meson-g12b.dtsi"
+#include "meson-g12b-s922x.dtsi"
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/meson-g12a-gpio.h>
 #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi new file +124 -0

124 lines not on this page · raw message

arch/arm64/boot/dts/amlogic/meson-g12b.dtsi +0 -115

121 lines not on this page · raw message

Signature · 1 line
2.22.0
#14 lore raw

PATCH 6/6 arm64: dts: meson-g12b-khadas-vim3: add initial device-tree

In reply to Neil Armstrong

From: Christian Hewitt <[email protected]>

The Khadas VIM3 uses the Amlogic S922X or A311S SoC, both based on the Amlogic G12B SoC family, on a board with the same form factor as the VIM/VIM2 models. It ships in two variants; basic and
pro which differ in RAM and eMMC size:

- 2GB (basic) or 4GB (pro) LPDDR4 RAM
- 16GB (basic) or 32GB (pro) eMMC 5.1 storage
- 16MB SPI flash
- 10/100/1000 Base-T Ethernet
- AP6398S Wireless (802.11 a/b/g/n/ac, BT5.0)
- HDMI 2.1 video
- 1x USB 2.0 + 1x USB 3.0 ports
- 1x USB-C (power) with USB 2.0 OTG
- 3x LED's (1x red, 1x blue, 1x white)
- 3x buttons (power, function, reset)
- IR receiver
- M2 socket with PCIe, USB, ADC & I2C
- 40pin GPIO Header
- 1x micro SD card slot

A common meson-g12b-khadas-vim3.dtsi is added to support both S922X and A311D SoCs supported by two variants of the board.

---
 arch/arm64/boot/dts/amlogic/Makefile          |   2 +
 .../amlogic/meson-g12b-a311d-khadas-vim3.dts  |  15 +
 .../dts/amlogic/meson-g12b-khadas-vim3.dtsi   | 542 ++++++++++++++++++
 .../amlogic/meson-g12b-s922x-khadas-vim3.dts  |  15 +
 4 files changed, 574 insertions(+)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-khadas-vim3.dtsi
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-s922x-khadas-vim3.dts
arch/arm64/boot/dts/amlogic/Makefile +2 -0
index 07b861fe5fa5..ae5e8d0c08da 100644
@@ -3,6 +3,8 @@ 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-a311d-khadas-vim3.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.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
arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts new file +15 -0
new file mode 100644
index 000000000000..73128ed24361
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 BayLibre, SAS
+ * Author: Neil Armstrong <[email protected]>
+ * Copyright (c) 2019 Christian Hewitt <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "meson-g12b-a311d.dtsi"
+#include "meson-g12b-khadas-vim3.dtsi"
+
+/ {
+	compatible = "khadas,vim3", "amlogic,a311d", "amlogic,g12b";
+};
arch/arm64/boot/dts/amlogic/meson-g12b-khadas-vim3.dtsi new file +542 -0

542 lines not on this page · raw message

arch/arm64/boot/dts/amlogic/meson-g12b-s922x-khadas-vim3.dts new file +15 -0
new file mode 100644
index 000000000000..6bcf972b8bfa
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 BayLibre, SAS
+ * Author: Neil Armstrong <[email protected]>
+ * Copyright (c) 2019 Christian Hewitt <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "meson-g12b-s922x.dtsi"
+#include "meson-g12b-khadas-vim3.dtsi"
+
+/ {
+	compatible = "khadas,vim3", "amlogic,s922x", "amlogic,g12b";
+};
Signature · 1 line
2.22.0
#15 lore raw

Re: [PATCH 6/6] arm64: dts: meson-g12b-khadas-vim3: add initial device-tree

On Wed, Jul 31, 2019 at 2:44 PM Neil Armstrong <[email protected]> wrote:
[...]

arch/arm64/boot/dts/amlogic/meson-g12b-khadas-vim3.dtsi line 27

Quoted 3 lines
arch/arm64/boot/dts/amlogic/meson-g12b-khadas-vim3.dtsi new file +3 -0
+       memory@0 {
+               device_type = "memory";
+               reg = <0x0 0x0 0x0 0x40000000>;

nit-pick: we typically use the memory size used in the board size with the lowest amount of RAM - 2GiB in this case. so I would change it to 0x80000000

[...]

arch/arm64/boot/dts/amlogic/meson-g12b-khadas-vim3.dtsi line 47

Quoted 5 lines
arch/arm64/boot/dts/amlogic/meson-g12b-khadas-vim3.dtsi new file +5 -0
+       leds {
+               compatible = "gpio-leds";
+
+               white {
+                       label = "vim3:white";

downstream sources use label="sys_led"
should we call it vim3:white:sys?

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

#16 lore raw

Re: [PATCH 6/6] arm64: dts: meson-g12b-khadas-vim3: add initial device-tree

Quoted 8 lines · Martin Blumenstingl

On Wed, Jul 31, 2019 at 2:44 PM Neil Armstrong <[email protected]> wrote:
[...]

arch/arm64/boot/dts/amlogic/meson-g12b-khadas-vim3.dtsi line 27

Quoted 3 lines
arch/arm64/boot/dts/amlogic/meson-g12b-khadas-vim3.dtsi new file +3 -0
+       memory@0 {
+               device_type = "memory";
+               reg = <0x0 0x0 0x0 0x40000000>;

nit-pick: we typically use the memory size used in the board size with the lowest amount of RAM - 2GiB in this case. so I would change it to 0x80000000

Right

Quoted 10 lines

[...]

arch/arm64/boot/dts/amlogic/meson-g12b-khadas-vim3.dtsi line 47

Quoted 5 lines
arch/arm64/boot/dts/amlogic/meson-g12b-khadas-vim3.dtsi new file +5 -0
+       leds {
+               compatible = "gpio-leds";
+
+               white {
+                       label = "vim3:white";

downstream sources use label="sys_led"
should we call it vim3:white:sys?

OK, no problem
Thanks for the review.

Neil

maintainer
#17 lore raw
In reply to Neil Armstrong
Quoted 23 lines · Neil Armstrong

The Khadas VIM3 uses the Amlogic S922X or A311S SoC, both based on the Amlogic G12B SoC family, on a board with the same form factor as the VIM/VIM2 models. It ships in two variants; basic and
pro which differ in RAM and eMMC size:

- 2GB (basic) or 4GB (pro) LPDDR4 RAM
- 16GB (basic) or 32GB (pro) eMMC 5.1 storage
- 16MB SPI flash
- 10/100/1000 Base-T Ethernet
- AP6398S Wireless (802.11 a/b/g/n/ac, BT5.0)
- HDMI 2.1 video
- 1x USB 2.0 + 1x USB 3.0 ports
- 1x USB-C (power) with USB 2.0 OTG
- 3x LED's (1x red, 1x blue, 1x white)
- 3x buttons (power, function, reset)
- IR receiver
- M2 socket with PCIe, USB, ADC & I2C
- 40pin GPIO Header
- 1x micro SD card slot

First of all, the S922X and A311D are now specified since they differ by some HW features and the capable operating points.

Quoted 7 lines

A common meson-g12b-khadas-vim3.dtsi is added to support both S922X and A311D SoCs supported by two variants of the board.

Odroid-N2 is changed to use the s922x.dtsi include.

Dependencies:
- patch 5 & 6: "arm64: g12a: add support for DVFS" at [1]

And patch 6 on the clock series (specificly the new CPU_CLKB id)

Quoted 4 lines

[1] https://patchwork.kernel.org/cover/11063837/

Christian Hewitt (4):
soc: amlogic: meson-gx-socinfo: add A311D id

Queued in v5.4/drivers

Quoted 2 lines

dt-bindings: arm: amlogic: add support for the Khadas VIM3
arm64: dts: meson-g12b: support a311d and s922x cpu operating points

Queued in v5.4/dt64

Quoted 1 line

arm64: dts: meson-g12b-khadas-vim3: add initial device-tree

This one I've left off for now due to the clock dependency and some suggestions from Martin.

Quoted 4 lines

Neil Armstrong (2):
dt-bindings: arm: amlogic: add bindings for G12B based S922X SoC
dt-bindings: arm: amlogic: add bindings for the Amlogic G12B based

    A311D SoC

Queued in v5.4/dt64

Kevin