Skip to content

Commit 6ef6330

Browse files
Xianwei Zhaosuperna9999
authored andcommitted
arm64: dts: add support for A4 based Amlogic BA400
Amlogic A4 is an application processor designed for smart audio and IoT applications. Add basic support for the A4 based Amlogic BA400 board, which describes the following components: CPU, GIC, IRQ, Timer and UART. These are capable of booting up into the serial console. Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20240401-basic_dt-v3-4-cb29ae1c16da@amlogic.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
1 parent a652d67 commit 6ef6330

File tree

4 files changed

+149
-0
lines changed

4 files changed

+149
-0
lines changed

arch/arm64/boot/dts/amlogic/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0
2+
dtb-$(CONFIG_ARCH_MESON) += amlogic-a4-a113l2-ba400.dtb
23
dtb-$(CONFIG_ARCH_MESON) += amlogic-c3-c302x-aw409.dtb
34
dtb-$(CONFIG_ARCH_MESON) += amlogic-t7-a311d2-an400.dtb
45
dtb-$(CONFIG_ARCH_MESON) += amlogic-t7-a311d2-khadas-vim4.dtb
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2+
/*
3+
* Copyright (c) 2024 Amlogic, Inc. All rights reserved.
4+
*/
5+
6+
/dts-v1/;
7+
8+
#include "amlogic-a4.dtsi"
9+
10+
/ {
11+
model = "Amlogic A113L2 ba400 Development Board";
12+
compatible = "amlogic,ba400", "amlogic,a4";
13+
interrupt-parent = <&gic>;
14+
#address-cells = <2>;
15+
#size-cells = <2>;
16+
17+
aliases {
18+
serial0 = &uart_b;
19+
};
20+
21+
memory@0 {
22+
device_type = "memory";
23+
reg = <0x0 0x0 0x0 0x40000000>;
24+
};
25+
26+
reserved-memory {
27+
#address-cells = <2>;
28+
#size-cells = <2>;
29+
ranges;
30+
31+
/* 10 MiB reserved for ARM Trusted Firmware */
32+
secmon_reserved: secmon@5000000 {
33+
compatible = "shared-dma-pool";
34+
reg = <0x0 0x05000000 0x0 0xa00000>;
35+
no-map;
36+
};
37+
};
38+
};
39+
40+
&uart_b {
41+
status = "okay";
42+
};
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2+
/*
3+
* Copyright (c) 2024 Amlogic, Inc. All rights reserved.
4+
*/
5+
6+
#include <dt-bindings/interrupt-controller/irq.h>
7+
#include <dt-bindings/interrupt-controller/arm-gic.h>
8+
#include <dt-bindings/gpio/gpio.h>
9+
/ {
10+
timer {
11+
compatible = "arm,armv8-timer";
12+
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
13+
<GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
14+
<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
15+
<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
16+
};
17+
18+
psci {
19+
compatible = "arm,psci-1.0";
20+
method = "smc";
21+
};
22+
23+
xtal: xtal-clk {
24+
compatible = "fixed-clock";
25+
clock-frequency = <24000000>;
26+
clock-output-names = "xtal";
27+
#clock-cells = <0>;
28+
};
29+
30+
soc {
31+
compatible = "simple-bus";
32+
#address-cells = <2>;
33+
#size-cells = <2>;
34+
ranges;
35+
36+
gic: interrupt-controller@fff01000 {
37+
compatible = "arm,gic-400";
38+
reg = <0x0 0xfff01000 0 0x1000>,
39+
<0x0 0xfff02000 0 0x2000>,
40+
<0x0 0xfff04000 0 0x2000>,
41+
<0x0 0xfff06000 0 0x2000>;
42+
#interrupt-cells = <3>;
43+
#address-cells = <0>;
44+
interrupt-controller;
45+
interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
46+
};
47+
48+
apb: bus@fe000000 {
49+
compatible = "simple-bus";
50+
reg = <0x0 0xfe000000 0x0 0x480000>;
51+
#address-cells = <2>;
52+
#size-cells = <2>;
53+
ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x480000>;
54+
55+
uart_b: serial@7a000 {
56+
compatible = "amlogic,a4-uart",
57+
"amlogic,meson-s4-uart";
58+
reg = <0x0 0x7a000 0x0 0x18>;
59+
interrupts = <GIC_SPI 169 IRQ_TYPE_EDGE_RISING>;
60+
clocks = <&xtal>, <&xtal>, <&xtal>;
61+
clock-names = "xtal", "pclk", "baud";
62+
status = "disabled";
63+
};
64+
};
65+
};
66+
};
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2+
/*
3+
* Copyright (c) 2024 Amlogic, Inc. All rights reserved.
4+
*/
5+
6+
#include "amlogic-a4-common.dtsi"
7+
/ {
8+
cpus {
9+
#address-cells = <2>;
10+
#size-cells = <0>;
11+
12+
cpu0: cpu@0 {
13+
device_type = "cpu";
14+
compatible = "arm,cortex-a53";
15+
reg = <0x0 0x0>;
16+
enable-method = "psci";
17+
};
18+
19+
cpu1: cpu@1 {
20+
device_type = "cpu";
21+
compatible = "arm,cortex-a53";
22+
reg = <0x0 0x1>;
23+
enable-method = "psci";
24+
};
25+
26+
cpu2: cpu@2 {
27+
device_type = "cpu";
28+
compatible = "arm,cortex-a53";
29+
reg = <0x0 0x2>;
30+
enable-method = "psci";
31+
};
32+
33+
cpu3: cpu@3 {
34+
device_type = "cpu";
35+
compatible = "arm,cortex-a53";
36+
reg = <0x0 0x3>;
37+
enable-method = "psci";
38+
};
39+
};
40+
};

0 commit comments

Comments
 (0)