Skip to contentSkip to conversation

ARM64: amlogic: Add support for GXL SoC Family

PATCH Superseded Neil Armstrong 5 participants 13 messages Sep 3, 2016 – Sep 13, 2016

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover ARM64: amlogic: Add support for GXL SoC Family

The new Amlogic GXL SoCs (S905X and S905D) are part of the Meson GX family and share some common features that can be described in a common GX dtsi file used by the Meson GXBB and Meson GXL Family dtsi.

This patchset introduces the common GX dtsi and switches the GXBB to use the common GX dtsi.
Then it introduces the GXL S905X SoC with the GXL common dtsi, then the S905D dtsi and the p212 board dts.
Finally the GXL S905D SoC is introduced with a S905D dtsi using the GXL common and the p23x Board dtsi for the p231 and p230 development boards.

Changes since RFC v1:
- Merge GX common and GXBB changes in a single patch
- Integrate GXL S905X patch
- Add support for S905D and the p23x boards

Note: This patchset integrates the patch "ARM64: dts: amlogic: Add basic support for Amlogic S905X" [1] from Carlo Caione.

[1] http://lkml.kernel.org/r/1472382113-10754-1-git-send-email-carlo at caione.org

Carlo Caione (1):
ARM64: dts: amlogic: Add basic support for Amlogic S905X

Neil Armstrong (2):
ARM64: dts: amlogic: Add Meson GX dtsi from GXBB
ARM64: dts: amlogic: Add basic support for Amlogic S905D

 Documentation/devicetree/bindings/arm/amlogic.txt  |   8 +
 arch/arm64/boot/dts/amlogic/Makefile               |   3 +
 arch/arm64/boot/dts/amlogic/meson-gx.dtsi          | 181 ++++++++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi        | 320 +++++++--------------
 .../boot/dts/amlogic/meson-gxl-s905d-p230.dts      |  51 ++++
 .../boot/dts/amlogic/meson-gxl-s905d-p231.dts      |  51 ++++
 .../boot/dts/amlogic/meson-gxl-s905d-p23x.dtsi     |  64 +++++
 arch/arm64/boot/dts/amlogic/meson-gxl-s905d.dtsi   |  48 ++++
 .../boot/dts/amlogic/meson-gxl-s905x-p212.dts      |  70 +++++
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x.dtsi   |  48 ++++
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi         |  48 ++++
 11 files changed, 671 insertions(+), 221 deletions(-)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gx.dtsi
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p231.dts
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p23x.dtsi
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d.dtsi
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905x.dtsi
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
Signature · 1 line
2.7.0
#1 lore raw

PATCH 1/3 ARM64: dts: amlogic: Add Meson GX dtsi from GXBB

Move all non-gxbb specific nodes to a common GX dtsi.

---
 arch/arm64/boot/dts/amlogic/meson-gx.dtsi   | 181 ++++++++++++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 320 +++++++++-------------------
 2 files changed, 280 insertions(+), 221 deletions(-)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gx.dtsi
arch/arm64/boot/dts/amlogic/meson-gx.dtsi new file +181 -0
new file mode 100644
index 0000000..fb393e9
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2016 BayLibre, SAS.
+ * Author: Neil Armstrong <[email protected]>
+ *
+ * Copyright (c) 2016 Endless Computers, Inc.
+ * Author: Carlo Caione <[email protected]>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This library is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+	interrupt-parent = <&gic>;
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	cpus {
+		#address-cells = <0x2>;
+		#size-cells = <0x0>;
+
+		cpu0: cpu at 0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53", "arm,armv8";
+			reg = <0x0 0x0>;
+			enable-method = "psci";
+		};
+
+		cpu1: cpu at 1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53", "arm,armv8";
+			reg = <0x0 0x1>;
+			enable-method = "psci";
+		};
+
+		cpu2: cpu at 2 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53", "arm,armv8";
+			reg = <0x0 0x2>;
+			enable-method = "psci";
+		};
+
+		cpu3: cpu at 3 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53", "arm,armv8";
+			reg = <0x0 0x3>;
+			enable-method = "psci";
+		};
+	};
+
+	arm-pmu {
+		compatible = "arm,cortex-a53-pmu";
+		interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
+	};
+
+	psci {
+		compatible = "arm,psci-0.2";
+		method = "smc";
+	};
+
+	timer {
+		compatible = "arm,armv8-timer";
+		interrupts = <GIC_PPI 13
+			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_EDGE_RISING)>,
+			     <GIC_PPI 14
+			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_EDGE_RISING)>,
+			     <GIC_PPI 11
+			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_EDGE_RISING)>,
+			     <GIC_PPI 10
+			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_EDGE_RISING)>;
+	};
+
+	xtal: xtal-clk {
+		compatible = "fixed-clock";
+		clock-frequency = <24000000>;
+		clock-output-names = "xtal";
+		#clock-cells = <0>;
+	};
+
+	soc {
+		compatible = "simple-bus";
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		cbus: cbus at c1100000 {
+			compatible = "simple-bus";
+			reg = <0x0 0xc1100000 0x0 0x100000>;
+			#address-cells = <2>;
+			#size-cells = <2>;
+			ranges = <0x0 0x0 0x0 0xc1100000 0x0 0x100000>;
+
+			uart_A: serial at 84c0 {
+				compatible = "amlogic,meson-uart";
+				reg = <0x0 0x084c0 0x0 0x14>;
+				interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;
+				clocks = <&xtal>;
+				status = "disabled";
+			};
+		};
+
+		gic: interrupt-controller at c4301000 {
+			compatible = "arm,gic-400";
+			reg = <0x0 0xc4301000 0 0x1000>,
+			      <0x0 0xc4302000 0 0x2000>,
+			      <0x0 0xc4304000 0 0x2000>,
+			      <0x0 0xc4306000 0 0x2000>;
+			interrupt-controller;
+			interrupts = <GIC_PPI 9
+				(GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
+			#interrupt-cells = <3>;
+			#address-cells = <0>;
+		};
+
+		aobus: aobus at c8100000 {
+			compatible = "simple-bus";
+			reg = <0x0 0xc8100000 0x0 0x100000>;
+			#address-cells = <2>;
+			#size-cells = <2>;
+			ranges = <0x0 0x0 0x0 0xc8100000 0x0 0x100000>;
+
+			uart_AO: serial at 4c0 {
+				compatible = "amlogic,meson-uart";
+				reg = <0x0 0x004c0 0x0 0x14>;
+				interrupts = <GIC_SPI 193 IRQ_TYPE_EDGE_RISING>;
+				clocks = <&xtal>;
+				status = "disabled";
+			};
+		};
+
+		apb: apb at d0000000 {
+			compatible = "simple-bus";
+			reg = <0x0 0xd0000000 0x0 0x200000>;
+			#address-cells = <2>;
+			#size-cells = <2>;
+			ranges = <0x0 0x0 0x0 0xd0000000 0x0 0x200000>;
+		};
+	};
+};
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +99 -221

343 lines not on this page · raw message

Signature · 1 line
2.7.0
#3 lore raw

PATCH 2/3 ARM64: dts: amlogic: Add basic support for Amlogic S905X

In reply to Neil Armstrong

From: Carlo Caione <[email protected]>

This patch introduces the basic support for the Amlogic S905X (Meson GXL) and for the Amlogic evaluation board P212.
No documentation has been released yet for this SoC, so for now only the bare minimum has been added in the DT.

---
 Documentation/devicetree/bindings/arm/amlogic.txt  |  5 ++
 arch/arm64/boot/dts/amlogic/Makefile               |  1 +
 .../boot/dts/amlogic/meson-gxl-s905x-p212.dts      | 70 ++++++++++++++++++++++
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x.dtsi   | 48 +++++++++++++++
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi         | 48 +++++++++++++++
 5 files changed, 172 insertions(+)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905x.dtsi
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
Documentation/devicetree/bindings/arm/amlogic.txt +5 -0
index fcc6f6c..702c911 100644
@@ -17,6 +17,10 @@ Boards with the Amlogic Meson GXBaby SoC shall have the following properties:
   Required root node property:
     compatible: "amlogic,meson-gxbb";
 
+Boards with the Amlogic Meson GXL SoC shall have the following properties:
+  Required root node property:
+    compatible: "amlogic,meson-gxl-s905x", "amlogic,meson-gxl";
+
 Board compatible values:
   - "geniatech,atv1200" (Meson6)
   - "minix,neo-x8" (Meson8)
@@ -28,3 +32,4 @@ Board compatible values:
   - "hardkernel,odroid-c2" (Meson gxbb)
   - "amlogic,p200" (Meson gxbb)
   - "amlogic,p201" (Meson gxbb)
+  - "amlogic,p212" (Meson gxl s905x)
arch/arm64/boot/dts/amlogic/Makefile +1 -0
index 47ec703..1f78b07 100644
@@ -4,6 +4,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-p201.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-pro.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-meta.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-telos.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb
 
 always		:= $(dtb-y)
 subdir-y	:= $(dts-dirs)
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts new file +70 -0

70 lines not on this page · raw message

arch/arm64/boot/dts/amlogic/meson-gxl-s905x.dtsi new file +48 -0

48 lines not on this page · raw message

arch/arm64/boot/dts/amlogic/meson-gxl.dtsi new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
2.7.0
#11 lore raw

PATCH 3/3 ARM64: dts: amlogic: Add basic support for Amlogic S905D

In reply to Neil Armstrong

This patch introduces the basic support for the Amlogic S905D (MesonGXL) and for the Amlogic evaluation boards P230 and P231.
No documentation has been released yet for this SoC, so for now only the bare minimum has been added in the DT.

---
 Documentation/devicetree/bindings/arm/amlogic.txt  |  3 +
 arch/arm64/boot/dts/amlogic/Makefile               |  2 +
 .../boot/dts/amlogic/meson-gxl-s905d-p230.dts      | 51 +++++++++++++++++
 .../boot/dts/amlogic/meson-gxl-s905d-p231.dts      | 51 +++++++++++++++++
 .../boot/dts/amlogic/meson-gxl-s905d-p23x.dtsi     | 64 ++++++++++++++++++++++
 arch/arm64/boot/dts/amlogic/meson-gxl-s905d.dtsi   | 48 ++++++++++++++++
 6 files changed, 219 insertions(+)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p231.dts
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p23x.dtsi
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d.dtsi
Documentation/devicetree/bindings/arm/amlogic.txt +3 -0
index 702c911..5f0dff5 100644
@@ -20,6 +20,7 @@ Boards with the Amlogic Meson GXBaby SoC shall have the following properties:
 Boards with the Amlogic Meson GXL SoC shall have the following properties:
   Required root node property:
     compatible: "amlogic,meson-gxl-s905x", "amlogic,meson-gxl";
+    compatible: "amlogic,meson-gxl-s905d", "amlogic,meson-gxl";
 
 Board compatible values:
   - "geniatech,atv1200" (Meson6)
@@ -33,3 +34,5 @@ Board compatible values:
   - "amlogic,p200" (Meson gxbb)
   - "amlogic,p201" (Meson gxbb)
   - "amlogic,p212" (Meson gxl s905x)
+  - "amlogic,p230" (Meson gxl s905d)
+  - "amlogic,p231" (Meson gxl s905d)
arch/arm64/boot/dts/amlogic/Makefile +2 -0
index 1f78b07..57e0ae0 100644
@@ -5,6 +5,8 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-pro.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-meta.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-telos.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p230.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p231.dtb
 
 always		:= $(dtb-y)
 subdir-y	:= $(dts-dirs)
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts new file +51 -0

51 lines not on this page · raw message

arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p231.dts new file +51 -0

51 lines not on this page · raw message

arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p23x.dtsi new file +64 -0

64 lines not on this page · raw message

arch/arm64/boot/dts/amlogic/meson-gxl-s905d.dtsi new file +48 -0

48 lines not on this page · raw message

--
2.7.0

maintainer Acked-by on v1 3/3
#12 lore raw

Re: [PATCH 3/3] ARM64: dts: amlogic: Add basic support for Amlogic S905D

Quoted 6 lines · Neil Armstrong

This patch introduces the basic support for the Amlogic S905D (MesonGXL) and for the Amlogic evaluation boards P230 and P231.
No documentation has been released yet for this SoC, so for now only the bare minimum has been added in the DT.

Quoted 12 lines
---
 Documentation/devicetree/bindings/arm/amlogic.txt  |  3 +
 arch/arm64/boot/dts/amlogic/Makefile               |  2 +
 .../boot/dts/amlogic/meson-gxl-s905d-p230.dts      | 51 +++++++++++++++++
 .../boot/dts/amlogic/meson-gxl-s905d-p231.dts      | 51 +++++++++++++++++
 .../boot/dts/amlogic/meson-gxl-s905d-p23x.dtsi     | 64 ++++++++++++++++++++++
 arch/arm64/boot/dts/amlogic/meson-gxl-s905d.dtsi   | 48 ++++++++++++++++
 6 files changed, 219 insertions(+)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p231.dts
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p23x.dtsi
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d.dtsi
#2 lore raw

Re: [PATCH 1/3] ARM64: dts: amlogic: Add Meson GX dtsi from GXBB

In reply to Neil Armstrong

Am 03.09.2016 um 10:22 schrieb Neil Armstrong:

Quoted 15 lines

Move all non-gxbb specific nodes to a common GX dtsi.

---
 arch/arm64/boot/dts/amlogic/meson-gx.dtsi   | 181 ++++++++++++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 320 +++++++++-------------------
 2 files changed, 280 insertions(+), 221 deletions(-)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gx.dtsi
arch/arm64/boot/dts/amlogic/meson-gx.dtsi new file +0 -0
new file mode 100644
index 0000000..fb393e9

arch/arm64/boot/dts/amlogic/meson-gx.dtsi line 6

Quoted 6 lines
arch/arm64/boot/dts/amlogic/meson-gx.dtsi new file +6 -0
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2016 BayLibre, SAS.
+ * Author: Neil Armstrong <[email protected]>
+ *
+ * Copyright (c) 2016 Endless Computers, Inc.
+ * Author: Carlo Caione <[email protected]>

This seems to be lacking my copyright as initial contributor of gxbb.

Regards,
Andreas

Quoted 39 lines
arch/arm64/boot/dts/amlogic/meson-gx.dtsi new file +39 -0
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This library is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */

[...]

arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi

Quoted 4 lines
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +0 -0
index 2ea7bbd..ff20932 100644

/*
* Copyright (c) 2016 Andreas F?rber
*
* This file is dual-licensed: you can use it either under the terms

Regards,
Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
#4 lore raw

Re: [PATCH 2/3] ARM64: dts: amlogic: Add basic support for Amlogic S905X

In reply to Neil Armstrong

Hi,

Am 03.09.2016 um 10:22 schrieb Neil Armstrong:

Quoted 27 lines

From: Carlo Caione <[email protected]>

This patch introduces the basic support for the Amlogic S905X (Meson GXL) and for the Amlogic evaluation board P212.
No documentation has been released yet for this SoC, so for now only the bare minimum has been added in the DT.

---
 Documentation/devicetree/bindings/arm/amlogic.txt  |  5 ++
 arch/arm64/boot/dts/amlogic/Makefile               |  1 +
 .../boot/dts/amlogic/meson-gxl-s905x-p212.dts      | 70 ++++++++++++++++++++++
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x.dtsi   | 48 +++++++++++++++
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi         | 48 +++++++++++++++
 5 files changed, 172 insertions(+)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905x.dtsi
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
Documentation/devicetree/bindings/arm/amlogic.txt +0 -0
index fcc6f6c..702c911 100644

Documentation/devicetree/bindings/arm/amlogic.txt Boards with the Amlogic Meson GXBaby SoC shall have the following properties: · line 22

Quoted 6 lines
Documentation/devicetree/bindings/arm/amlogic.txt +3 -0
@@ -17,6 +17,10 @@ Boards with the Amlogic Meson GXBaby SoC shall have the following properties:
   Required root node property:
     compatible: "amlogic,meson-gxbb";
 
+Boards with the Amlogic Meson GXL SoC shall have the following properties:
+  Required root node property:
+    compatible: "amlogic,meson-gxl-s905x", "amlogic,meson-gxl";

Can we please use "amlogic,s905x", "amlogic,meson-gxl"? No need to complicate the name. Also affects .dtsi and .dts below.

Quoted 9 lines
Documentation/devicetree/bindings/arm/amlogic.txt +2 -0
+
 Board compatible values:
   - "geniatech,atv1200" (Meson6)
   - "minix,neo-x8" (Meson8)
@@ -28,3 +32,4 @@ Board compatible values:
   - "hardkernel,odroid-c2" (Meson gxbb)
   - "amlogic,p200" (Meson gxbb)
   - "amlogic,p201" (Meson gxbb)
+  - "amlogic,p212" (Meson gxl s905x)

[...]

Quoted 46 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts new file +40 -0
new file mode 100644
index 0000000..e0df975
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2016 Endless Computers, Inc.
+ * Author: Carlo Caione <[email protected]>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This library is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR

arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts line 50

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts new file +10 -0
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+
+#include "meson-gxl-s905x.dtsi"
+
+/ {
+	compatible = "amlogic,p212", "amlogic,meson-gxl-s905x", "amlogic,meson-gxl";
+	model = "Amlogic Meson GXL (S905X) P212 Development Board";

Is that its official name? No objection, just wondering whether we need both GXL and S905X in the name, and then again the SoC name at all if the P212 is unique. Haven't compared the previous Pxxx ones.

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts new file +10 -0
+
+	aliases {
+		serial0 = &uart_AO;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory at 0 {

arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts line 70

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts new file +10 -0
+		device_type = "memory";
+		reg = <0x0 0x0 0x0 0x80000000>;
+	};
+};
+
+/* This UART is brought out to the DB9 connector */
+&uart_AO {
+	status = "okay";
+};
+

Trailing white line - please watch out for that, git-am will complain.

Quoted 43 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905x.dtsi new file +37 -0
new file mode 100644
index 0000000..b9e94f1
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2016 Endless Computers, Inc.
+ * Author: Carlo Caione <[email protected]>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This library is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT

arch/arm64/boot/dts/amlogic/meson-gxl-s905x.dtsi line 47

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905x.dtsi new file +10 -0
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "meson-gxl.dtsi"
+
+/ {
+	compatible = "amlogic,meson-gxl", "amlogic,meson-gxl-s905x";

This needs to be reversed.

arch/arm64/boot/dts/amlogic/meson-gxl-s905x.dtsi line 48

Quoted 1 line
arch/arm64/boot/dts/amlogic/meson-gxl-s905x.dtsi new file +1 -0
+};

[snip]

Regards,
Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
#5 lore raw

Re: [PATCH 2/3] ARM64: dts: amlogic: Add basic support for Amlogic S905X

Quoted 6 lines · Andreas F?rber

Documentation/devicetree/bindings/arm/amlogic.txt Boards with the Amlogic Meson GXBaby SoC shall have the following properties: · line 22

Quoted 3 lines
Documentation/devicetree/bindings/arm/amlogic.txt +3 -0
+Boards with the Amlogic Meson GXL SoC shall have the following properties:
+  Required root node property:
+    compatible: "amlogic,meson-gxl-s905x", "amlogic,meson-gxl";

Can we please use "amlogic,s905x", "amlogic,meson-gxl"? No need to complicate the name. Also affects .dtsi and .dts below.

gxl != s905x.

AFAWK to the GXL family belong several different SoCs, like S905X, S905D, etc... (see patch 3/3)
This is why we use meson-gxl-s905x, meson-gxl-s905d, etc...

We could s/meson-gxl-s905x/meson-s905x/ and s/meson-gxl-s905d/meson-s905d/ but I honestly prefer this way because we can clearly see which family the SoC belongs to (the Amlogic naming convention is already messy enough).
I mean, yes it's longer, but it's for the sake of documentation IMO.

[cut]

Quoted 6 lines

arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts line 50

Quoted 2 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts new file +2 -0
+     compatible = "amlogic,p212", "amlogic,meson-gxl-s905x", "amlogic,meson-gxl";
+     model = "Amlogic Meson GXL (S905X) P212 Development Board";

Is that its official name? No objection, just wondering whether we need both GXL and S905X in the name, and then again the SoC name at all if the P212 is unique. Haven't compared the previous Pxxx ones.

P212 is the official name for the S905X Amlogic dev board. It follows the name we used for the other P20x boards.

[cut]

Quoted 8 lines

arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts line 70

Quoted 6 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts new file +6 -0
+
+/* This UART is brought out to the DB9 connector */
+&uart_AO {
+     status = "okay";
+};
+

Trailing white line - please watch out for that, git-am will complain.

Right.

[cut]

Quoted 6 lines

arch/arm64/boot/dts/amlogic/meson-gxl-s905x.dtsi line 47

Quoted 4 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905x.dtsi new file +4 -0
+#include "meson-gxl.dtsi"
+
+/ {
+     compatible = "amlogic,meson-gxl", "amlogic,meson-gxl-s905x";

This needs to be reversed.

Agree.

Cheers,

Signature · 1 line
Carlo Caione
maintainer
#6 lore raw

Re: [PATCH 2/3] ARM64: dts: amlogic: Add basic support for Amlogic S905X

Quoted 6 lines · Carlo Caione
Quoted 4 lines · Andreas F?rber
Quoted 3 lines
Documentation/devicetree/bindings/arm/amlogic.txt +3 -0
+Boards with the Amlogic Meson GXL SoC shall have the following properties:
+  Required root node property:
+    compatible: "amlogic,meson-gxl-s905x", "amlogic,meson-gxl";
Quoted 8 lines
Quoted 2 lines

Can we please use "amlogic,s905x", "amlogic,meson-gxl"? No need to complicate the name. Also affects .dtsi and .dts below.

gxl != s905x.

AFAWK to the GXL family belong several different SoCs, like S905X, S905D, etc... (see patch 3/3)
This is why we use meson-gxl-s905x, meson-gxl-s905d, etc...

Correct.

Quoted 5 lines

We could s/meson-gxl-s905x/meson-s905x/ and s/meson-gxl-s905d/meson-s905d/ but I honestly prefer this way because we can clearly see which family the SoC belongs to (the Amlogic naming convention is already messy enough).
I mean, yes it's longer, but it's for the sake of documentation IMO.

+1

Kevin

#7 lore raw

Re: [PATCH 2/3] ARM64: dts: amlogic: Add basic support for Amlogic S905X

Am 12.09.2016 um 22:43 schrieb Kevin Hilman:

Quoted 11 lines
Quoted 10 lines · Carlo Caione
Quoted 6 lines · Andreas F?rber

Documentation/devicetree/bindings/arm/amlogic.txt Boards with the Amlogic Meson GXBaby SoC shall have the following properties: · line 22

Quoted 3 lines
Documentation/devicetree/bindings/arm/amlogic.txt +3 -0
+Boards with the Amlogic Meson GXL SoC shall have the following properties:
+  Required root node property:
+    compatible: "amlogic,meson-gxl-s905x", "amlogic,meson-gxl";

Can we please use "amlogic,s905x", "amlogic,meson-gxl"? No need to complicate the name. Also affects .dtsi and .dts below.

gxl != s905x.

Huh? You're seemingly completely missing my point...

But you are right that _Neil's_ heading needs to be fixed, too:
Clearly not all GXL SoCs need to have an S905X compatible string! So it should be "Boards with the Amlogic S905X SoC shall ..." or so.

Quoted 2 lines
Quoted 2 lines

AFAWK to the GXL family belong several different SoCs, like S905X, S905D, etc... (see patch 3/3)

Thanks, I already know that, that's why you have two compatible strings instead of just one like for GXBB. We can certainly prepend one for symmetry there, too, if it makes you happier.

Quoted 11 lines
Quoted 1 line

This is why we use meson-gxl-s905x, meson-gxl-s905d, etc...

Correct.

Quoted 5 lines

We could s/meson-gxl-s905x/meson-s905x/ and s/meson-gxl-s905d/meson-s905d/ but I honestly prefer this way because we can clearly see which family the SoC belongs to (the Amlogic naming convention is already messy enough).
I mean, yes it's longer, but it's for the sake of documentation IMO.

+1

I still don't follow that conclusion. The board is called "amlogic,p231" because P231 is a unique identifier within the Amlogic namespace, so why not call the SoC "amlogic,s905x" for the same reason? The documentation is already there in having both "amlogic,s905x" _and_ "amlogic,meson-gxl" - please re-read my post. There is no S905X in GXL family and another S905X in some other Amlogic SoC family, so it's unique and there is no reason to encode any hierarchies into its name other than vendor,name.

I'm not arguing over the file name, where it perfectly makes sense to have a meson-gxl- prefix (already discussed), just about the compatible string where we don't have "amlogic,meson-gxl-s905x-p231" either because it is completely unnecessary and does _not_ add any value.

Not that we're checking this string anywhere anyway... If you want to check for the GXL family you have to use "amlogic,meson-gxl"; if you want to check for the specific SoC you use "amlogic,s905x". Simple. We never match partial strings, so there is no sense in a hardcoded prefix that is duplicating information already available.

Regards,
Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
maintainer
#8 lore raw

Re: [PATCH 2/3] ARM64: dts: amlogic: Add basic support for Amlogic S905X

Quoted 47 lines · Andreas F?rber

Am 12.09.2016 um 22:43 schrieb Kevin Hilman:

Quoted 11 lines
Quoted 10 lines · Carlo Caione
Quoted 6 lines · Andreas F?rber

Documentation/devicetree/bindings/arm/amlogic.txt Boards with the Amlogic Meson GXBaby SoC shall have the following properties: · line 22

Quoted 3 lines
Documentation/devicetree/bindings/arm/amlogic.txt +3 -0
+Boards with the Amlogic Meson GXL SoC shall have the following properties:
+  Required root node property:
+    compatible: "amlogic,meson-gxl-s905x", "amlogic,meson-gxl";

Can we please use "amlogic,s905x", "amlogic,meson-gxl"? No need to complicate the name. Also affects .dtsi and .dts below.

gxl != s905x.

Huh? You're seemingly completely missing my point...

But you are right that _Neil's_ heading needs to be fixed, too:
Clearly not all GXL SoCs need to have an S905X compatible string! So it should be "Boards with the Amlogic S905X SoC shall ..." or so.

Quoted 2 lines
Quoted 2 lines

AFAWK to the GXL family belong several different SoCs, like S905X, S905D, etc... (see patch 3/3)

Thanks, I already know that, that's why you have two compatible strings instead of just one like for GXBB. We can certainly prepend one for symmetry there, too, if it makes you happier.

Quoted 11 lines
Quoted 1 line

This is why we use meson-gxl-s905x, meson-gxl-s905d, etc...

Correct.

Quoted 5 lines

We could s/meson-gxl-s905x/meson-s905x/ and s/meson-gxl-s905d/meson-s905d/ but I honestly prefer this way because we can clearly see which family the SoC belongs to (the Amlogic naming convention is already messy enough).
I mean, yes it's longer, but it's for the sake of documentation IMO.

+1

I still don't follow that conclusion. The board is called "amlogic,p231" because P231 is a unique identifier within the Amlogic namespace, so why not call the SoC "amlogic,s905x" for the same reason? The documentation is already there in having both "amlogic,s905x" _and_ "amlogic,meson-gxl" - please re-read my post. There is no S905X in GXL family and another S905X in some other Amlogic SoC family, so it's unique and there is no reason to encode any hierarchies into its name other than vendor,name.

Quoted 4 lines

I'm not arguing over the file name, where it perfectly makes sense to have a meson-gxl- prefix (already discussed), just about the compatible string where we don't have "amlogic,meson-gxl-s905x-p231" either because it is completely unnecessary and does _not_ add any value.

Sorry, I'm guilty of not fully reading the original post. I was thinking only of the filenames, which it seems were already agreed on to be long.

Quoted 5 lines

Not that we're checking this string anywhere anyway... If you want to check for the GXL family you have to use "amlogic,meson-gxl"; if you want to check for the specific SoC you use "amlogic,s905x". Simple. We never match partial strings, so there is no sense in a hardcoded prefix that is duplicating information already available.

For the compatible strings, I think your proposed shorter (but still unique) forms are fine with me.

Kevin

#9 lore raw

Re: [PATCH 2/3] ARM64: dts: amlogic: Add basic support for Amlogic S905X

In reply to Andreas Färber

On Mon, Sep 12, 2016 at 11:43 PM, Andreas F?rber <[email protected]> wrote:

[cut]

Quoted 10 lines

I'm not arguing over the file name, where it perfectly makes sense to have a meson-gxl- prefix (already discussed), just about the compatible string where we don't have "amlogic,meson-gxl-s905x-p231" either because it is completely unnecessary and does _not_ add any value.

Not that we're checking this string anywhere anyway... If you want to check for the GXL family you have to use "amlogic,meson-gxl"; if you want to check for the specific SoC you use "amlogic,s905x". Simple. We never match partial strings, so there is no sense in a hardcoded prefix that is duplicating information already available.

Ok, then. Fine with me.

Neil, do you want to resend my patch or you can take care of the fixes for the whole patchset?

Thanks,

Signature · 1 line
Carlo Caione
#10 lore raw

Re: [PATCH 2/3] ARM64: dts: amlogic: Add basic support for Amlogic S905X

Quoted 14 lines · Carlo Caione

On Mon, Sep 12, 2016 at 11:43 PM, Andreas F?rber <[email protected]> wrote:

[cut]

Quoted 10 lines

I'm not arguing over the file name, where it perfectly makes sense to have a meson-gxl- prefix (already discussed), just about the compatible string where we don't have "amlogic,meson-gxl-s905x-p231" either because it is completely unnecessary and does _not_ add any value.

Not that we're checking this string anywhere anyway... If you want to check for the GXL family you have to use "amlogic,meson-gxl"; if you want to check for the specific SoC you use "amlogic,s905x". Simple. We never match partial strings, so there is no sense in a hardcoded prefix that is duplicating information already available.

Quoted 7 lines

Ok, then. Fine with me.

Neil, do you want to resend my patch or you can take care of the fixes for the whole patchset?

Thanks,

Ok, I still need to synchronize with kevin for when and where to rebase from.

Neil