Skip to contentSkip to conversation

arm64: dts: airoha: add AN7589 support

PATCH Superseded John Crispin 1 participant 4 messages Nov 12

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover arm64: dts: airoha: add AN7589 support

The Airoha AN7589 is a quad Cortex-A73 SoC. This series adds its board compatibles, a base SoC dtsi with the CPUs, PSCI, the GICv3, the architected timer and the console UART, and the device tree of the evaluation board with 2 GiB of DRAM.

The remaining blocks follow with the series of their drivers.

The series applies to next-20261105 and has no dependencies.

Changes in v2:
- Patch 1: add Acked-by of Conor.
- Patch 2: set the size of the GICV region to 0x2000 and order the nodes and properties as Documentation/devicetree/bindings/dts-coding-style.rst describes.
- Link to v1: https://lore.kernel.org/r/[email protected]

John Crispin (3):
dt-bindings: arm: airoha: add AN7589
arm64: dts: airoha: add AN7589 SoC dtsi
arm64: dts: airoha: add AN7589 evaluation board

 .../devicetree/bindings/arm/airoha.yaml       |   4 +
 arch/arm64/boot/dts/airoha/Makefile           |   1 +
 arch/arm64/boot/dts/airoha/an7589-evb.dts     |  22 +++
 arch/arm64/boot/dts/airoha/an7589.dtsi        | 134 ++++++++++++++++++
 4 files changed, 161 insertions(+)
 create mode 100644 arch/arm64/boot/dts/airoha/an7589-evb.dts
 create mode 100644 arch/arm64/boot/dts/airoha/an7589.dtsi

base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b

Signature · 1 line
2.34.1
#1 lore raw

PATCH v2 1/3 dt-bindings: arm: airoha: add AN7589

The AN7589 is the next generation Airoha SoC. Document the SoC compatible and the compatible for the Airoha evaluation board.

---
 Documentation/devicetree/bindings/arm/airoha.yaml | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/arm/airoha.yaml +4 -0
index 7c38c08dbf3f..bf432d256882 100644
@@ -26,6 +26,10 @@ properties:
           - enum:
               - airoha,en7581-evb
           - const: airoha,en7581
+      - items:
+          - enum:
+              - airoha,an7589-evb
+          - const: airoha,an7589
 
 additionalProperties: true
 
Signature · 1 line
2.34.1
#2 lore raw

PATCH v2 2/3 arm64: dts: airoha: add AN7589 SoC dtsi

In reply to John Crispin

Add the device tree for the Airoha AN7589 SoC. It describes the four Cortex-A73 cores, which the firmware brings up over PSCI, the GICv3, the architected timer and the console UART.

The UART runs from a fixed 1.8432 MHz clock, so the console works before the SCU clock controller probes. The remaining blocks follow later.

---
Changes in v2:
- Set the size of the GICV region to 0x2000. The virtual CPU interface has two 4 KiB pages, with GICV_DIR in the second page.
- Order the nodes and properties as dts-coding-style.rst describes.

 arch/arm64/boot/dts/airoha/an7589.dtsi | 134 +++++++++++++++++++++++++
 1 file changed, 134 insertions(+)
 create mode 100644 arch/arm64/boot/dts/airoha/an7589.dtsi
arch/arm64/boot/dts/airoha/an7589.dtsi new file +134 -0
new file mode 100644
index 000000000000..70ced7c5a4fd
@@ -0,0 +1,134 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+	interrupt-parent = <&gic>;
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	clk1843200: clock-1843200 {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <1843200>;
+	};
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu-map {
+			cluster0 {
+				core0 {
+					cpu = <&cpu0>;
+				};
+
+				core1 {
+					cpu = <&cpu1>;
+				};
+
+				core2 {
+					cpu = <&cpu2>;
+				};
+
+				core3 {
+					cpu = <&cpu3>;
+				};
+			};
+		};
+
+		cpu0: cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a73";
+			reg = <0x0>;
+			enable-method = "psci";
+			next-level-cache = <&l2>;
+		};
+
+		cpu1: cpu@1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a73";
+			reg = <0x1>;
+			enable-method = "psci";
+			next-level-cache = <&l2>;
+		};
+
+		cpu2: cpu@2 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a73";
+			reg = <0x2>;
+			enable-method = "psci";
+			next-level-cache = <&l2>;
+		};
+
+		cpu3: cpu@3 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a73";
+			reg = <0x3>;
+			enable-method = "psci";
+			next-level-cache = <&l2>;
+		};
+
+		l2: l2-cache {
+			compatible = "cache";
+			cache-size = <0x80000>;
+			cache-line-size = <64>;
+			cache-level = <2>;
+			cache-unified;
+		};
+	};
+
+	psci {
+		compatible = "arm,psci-1.0";
+		method = "smc";
+	};
+
+	reserved-memory {
+		ranges;
+		#address-cells = <2>;
+		#size-cells = <2>;
+
+		atf@80000000 {
+			reg = <0x0 0x80000000 0x0 0x200000>;
+			no-map;
+		};
+	};
+
+	soc {
+		compatible = "simple-bus";
+		ranges;
+		#address-cells = <2>;
+		#size-cells = <2>;
+
+		gic: interrupt-controller@c000000 {
+			compatible = "arm,gic-v3";
+			reg = <0x0 0x0c000000 0x0 0x40000>,
+			      <0x0 0x0c080000 0x0 0x200000>,
+			      <0x0 0x0c400000 0x0 0x2000>,
+			      <0x0 0x0c410000 0x0 0x1000>,
+			      <0x0 0x0c420000 0x0 0x2000>;
+			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_LOW>;
+			interrupt-controller;
+			#interrupt-cells = <3>;
+		};
+
+		uart1: serial@1fbf0000 {
+			compatible = "ns16550";
+			reg = <0x0 0x1fbf0000 0x0 0x30>;
+			reg-io-width = <4>;
+			reg-shift = <2>;
+			interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk1843200>;
+		};
+	};
+
+	timer {
+		compatible = "arm,armv8-timer";
+		interrupt-parent = <&gic>;
+		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
+			     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
+			     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
+			     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
+	};
+};
Signature · 1 line
2.34.1
#3 lore raw

PATCH v2 3/3 arm64: dts: airoha: add AN7589 evaluation board

In reply to John Crispin

Add the device tree for the Airoha AN7589 evaluation board, with 2 GiB of DRAM and the console on UART1.

---
 arch/arm64/boot/dts/airoha/Makefile       |  1 +
 arch/arm64/boot/dts/airoha/an7589-evb.dts | 22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+)
 create mode 100644 arch/arm64/boot/dts/airoha/an7589-evb.dts
arch/arm64/boot/dts/airoha/Makefile +1 -0
index ebea112ce1d7..78146871db77 100644
@@ -1,2 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
+dtb-$(CONFIG_ARCH_AIROHA) += an7589-evb.dtb
 dtb-$(CONFIG_ARCH_AIROHA) += en7581-evb.dtb
arch/arm64/boot/dts/airoha/an7589-evb.dts new file +22 -0
new file mode 100644
index 000000000000..eadba7154350
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+/dts-v1/;
+
+#include "an7589.dtsi"
+
+/ {
+	model = "Airoha AN7589 Evaluation Board";
+	compatible = "airoha,an7589-evb", "airoha,an7589";
+
+	aliases {
+		serial0 = &uart1;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory@80000000 {
+		device_type = "memory";
+		reg = <0x0 0x80000000 0x0 0x80000000>;
+	};
+};
Signature · 1 line
2.34.1