Baisc devicetree support for Amlogic A4 and A5
v2 cover Baisc devicetree support for Amlogic A4 and A5
Amlogic A4 and A5 are application processors designed for smart audio and IoT applications.
Add the new A4 SoC/board device tree bindings.
Add the new A5 SoC/board device tree bindings.
Add A4 UART compatible line for documentation.
Add basic support for the A4 based Amlogic AV400 board, which describes the following components: CPU, GIC, IRQ, Timer and UART. These are capable of booting up into the serial console.
Add basic support for the A5 based Amlogic AV400 board, which describes the following components: CPU, GIC, IRQ, Timer and UART. These are capable of booting up into the serial console.
---
Changes in v2:
- Delete bindings for uncommitted boards.
- Add A4 UART compatible line for documentation.
- Use common dtsi for a4 and a5.
- Fix psci version 1.0, and fix some formats.
- Modify secmon reserved memory size 10M(actual using).
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Xianwei Zhao (5):
dt-bindings: arm: amlogic: add A4 support
dt-bindings: arm: amlogic: add A5 support
dt-bindings: serial: amlogic,meson-uart: Add compatible string for A4
arm64: dts: add support for A4 based Amlogic BA400
arm64: dts: add support for A5 based Amlogic AV400
Documentation/devicetree/bindings/arm/amlogic.yaml | 12 ++++ .../bindings/serial/amlogic,meson-uart.yaml | 4 +- arch/arm64/boot/dts/amlogic/Makefile | 2 + .../boot/dts/amlogic/amlogic-a4-a113l2-ba400.dts | 42 ++++++++++++++ arch/arm64/boot/dts/amlogic/amlogic-a4-common.dtsi | 66 ++++++++++++++++++++++ arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi | 40 +++++++++++++ .../boot/dts/amlogic/amlogic-a5-a113x2-av400.dts | 42 ++++++++++++++ arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi | 40 +++++++++++++ 8 files changed, 247 insertions(+), 1 deletion(-)
---
base-commit: 7092cfae086f0bc235baca413d0bd904f182670c
change-id: 20240312-basic_dt-15e47525a413
Best regards,
Signature · 1 line
Xianwei Zhao <[email protected]>
PATCH v2 1/5 dt-bindings: arm: amlogic: add A4 support
Document the new A4 SoC/board device tree bindings.
Amlogic A4 is an application processor designed for smart audio and IoT applications.
--- Documentation/devicetree/bindings/arm/amlogic.yaml | 6 ++++++ 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/arm/amlogic.yaml +6 -0
@@ -201,6 +201,12 @@ properties: - amlogic,ad402 - const: amlogic,a1 + - description: Boards with the Amlogic A4 A113L2 SoC + items: + - enum: + - amlogic,ba400 + - const: amlogic,a4 + - description: Boards with the Amlogic C3 C302X/C308L SoC items: - enum:
Signature · 1 line
2.37.1
PATCH v2 2/5 dt-bindings: arm: amlogic: add A5 support
In reply to Xianwei ZhaoDocument the new A5 SoC/board device tree bindings.
Amlogic A5 is an application processor designed for smart audio and IoT applications.
--- Documentation/devicetree/bindings/arm/amlogic.yaml | 6 ++++++ 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/arm/amlogic.yaml +6 -0
@@ -207,6 +207,12 @@ properties: - amlogic,ba400 - const: amlogic,a4 + - description: Boards with the Amlogic A5 A113X2 SoC + items: + - enum: + - amlogic,av400 + - const: amlogic,a5 + - description: Boards with the Amlogic C3 C302X/C308L SoC items: - enum:
Signature · 1 line
2.37.1
PATCH v2 3/5 dt-bindings: serial: amlogic,meson-uart: Add compatible string for A4
In reply to Xianwei ZhaoAmlogic A4 SoCs uses the same UART controller as S4 SoCs and G12A. There is no need for an extra compatible line in the driver, but add A4 compatible line for documentation.
--- Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +3 -1
@@ -54,7 +54,9 @@ properties: - const: amlogic,meson-gx-uart - description: UART controller on S4 compatible SoCs items: - - const: amlogic,t7-uart + - enum: + - amlogic,t7-uart + - amlogic,a4-uart - const: amlogic,meson-s4-uart reg:
Signature · 1 line
2.37.1
PATCH v2 4/5 arm64: dts: add support for A4 based Amlogic BA400
In reply to Xianwei ZhaoAmlogic 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.
--- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../boot/dts/amlogic/amlogic-a4-a113l2-ba400.dts | 42 ++++++++++++++ arch/arm64/boot/dts/amlogic/amlogic-a4-common.dtsi | 66 ++++++++++++++++++++++ arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi | 40 +++++++++++++ 4 files changed, 149 insertions(+)
arch/arm64/boot/dts/amlogic/Makefile +1 -0
@@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 +dtb-$(CONFIG_ARCH_MESON) += amlogic-a4-a113l2-ba400.dtb dtb-$(CONFIG_ARCH_MESON) += amlogic-c3-c302x-aw409.dtb dtb-$(CONFIG_ARCH_MESON) += amlogic-t7-a311d2-an400.dtb dtb-$(CONFIG_ARCH_MESON) += amlogic-t7-a311d2-khadas-vim4.dtb
arch/arm64/boot/dts/amlogic/amlogic-a4-a113l2-ba400.dts new file +42 -0
42 lines not on this page · raw message
arch/arm64/boot/dts/amlogic/amlogic-a4-common.dtsi new file +66 -0
66 lines not on this page · raw message
arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi new file +40 -0
@@ -0,0 +1,40 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2024 Amlogic, Inc. All rights reserved. + */ + +#include "amlogic-a4-common.dtsi" +/ { + cpus { + #address-cells = <2>; + #size-cells = <0>; + + cpu0: cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0x0 0x0>; + enable-method = "psci"; + }; + + cpu1: cpu@1 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0x0 0x1>; + enable-method = "psci"; + }; + + cpu2: cpu@2 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0x0 0x2>; + enable-method = "psci"; + }; + + cpu3: cpu@3 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0x0 0x3>; + enable-method = "psci"; + }; + }; +};
Signature · 1 line
2.37.1
PATCH v2 5/5 arm64: dts: add support for A5 based Amlogic AV400
In reply to Xianwei ZhaoAmlogic A5 is an application processor designed for smart audio and IoT applications.
Add basic support for the A5 based Amlogic AV400 board, which describes the following components: CPU, GIC, IRQ, Timer and UART. These are capable of booting up into the serial console.
--- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../boot/dts/amlogic/amlogic-a5-a113x2-av400.dts | 42 ++++++++++++++++++++++ arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi | 40 +++++++++++++++++++++ 3 files changed, 83 insertions(+)
arch/arm64/boot/dts/amlogic/Makefile +1 -0
@@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 dtb-$(CONFIG_ARCH_MESON) += amlogic-a4-a113l2-ba400.dtb +dtb-$(CONFIG_ARCH_MESON) += amlogic-a5-a113x2-av400.dtb dtb-$(CONFIG_ARCH_MESON) += amlogic-c3-c302x-aw409.dtb dtb-$(CONFIG_ARCH_MESON) += amlogic-t7-a311d2-an400.dtb dtb-$(CONFIG_ARCH_MESON) += amlogic-t7-a311d2-khadas-vim4.dtb
arch/arm64/boot/dts/amlogic/amlogic-a5-a113x2-av400.dts new file +42 -0
42 lines not on this page · raw message
arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi new file +40 -0
@@ -0,0 +1,40 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2024 Amlogic, Inc. All rights reserved. + */ + +#include "amlogic-a4-common.dtsi" +/ { + cpus { + #address-cells = <2>; + #size-cells = <0>; + + cpu0: cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a55"; + reg = <0x0 0x0>; + enable-method = "psci"; + }; + + cpu1: cpu@100 { + device_type = "cpu"; + compatible = "arm,cortex-a55"; + reg = <0x0 0x100>; + enable-method = "psci"; + }; + + cpu2: cpu@200 { + device_type = "cpu"; + compatible = "arm,cortex-a55"; + reg = <0x0 0x200>; + enable-method = "psci"; + }; + + cpu3: cpu@300 { + device_type = "cpu"; + compatible = "arm,cortex-a55"; + reg = <0x0 0x300>; + enable-method = "psci"; + }; + }; +};
Signature · 1 line
2.37.1
Re: [PATCH v2 3/5] dt-bindings: serial: amlogic,meson-uart: Add compatible string for A4
In reply to Xianwei ZhaoQuoted 16 lines · On 20/03/2024 10:44, Xianwei Zhao via B4 Relay wrote:
From: Xianwei Zhao <[email protected]>
Amlogic A4 SoCs uses the same UART controller as S4 SoCs and G12A. There is no need for an extra compatible line in the driver, but add A4 compatible line for documentation.
Signed-off-by Xianwei Zhao <[email protected]>--- Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +0
-0
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml properties: · line 59
Quoted 7 lines
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +3
-1@@ -54,7 +54,9 @@ properties: - const: amlogic,meson-gx-uart - description: UART controller on S4 compatible SoCs items: - - const: amlogic,t7-uart + - enum: + - amlogic,t7-uart + - amlogic,a4-uart
Keep alphabetical order. Don't add stuff to the end of lists. This comment applies in general, for almost all your patches, so also future submissions.
Best regards,
Krzysztof
Re: [PATCH v2 4/5] arm64: dts: add support for A4 based Amlogic BA400
In reply to Xianwei ZhaoQuoted 35 lines · On 20/03/2024 10:44, Xianwei Zhao via B4 Relay wrote:
From: Xianwei Zhao <[email protected]>
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 <[email protected]>--- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../boot/dts/amlogic/amlogic-a4-a113l2-ba400.dts | 42 ++++++++++++++ arch/arm64/boot/dts/amlogic/amlogic-a4-common.dtsi | 66 ++++++++++++++++++++++ arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi | 40 +++++++++++++ 4 files changed, 149 insertions(+)arch/arm64/boot/dts/amlogic/Makefile +1
-0@@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 +dtb-$(CONFIG_ARCH_MESON) += amlogic-a4-a113l2-ba400.dtb dtb-$(CONFIG_ARCH_MESON) += amlogic-c3-c302x-aw409.dtb dtb-$(CONFIG_ARCH_MESON) += amlogic-t7-a311d2-an400.dtb dtb-$(CONFIG_ARCH_MESON) += amlogic-t7-a311d2-khadas-vim4.dtbarch/arm64/boot/dts/amlogic/amlogic-a4-a113l2-ba400.dts new file +2
-0@@ -0,0 +1,42 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/*
arch/arm64/boot/dts/amlogic/amlogic-a4-a113l2-ba400.dts line 12
Quoted 10 lines
arch/arm64/boot/dts/amlogic/amlogic-a4-a113l2-ba400.dts new file +10
-0+ * Copyright (c) 2024 Amlogic, Inc. All rights reserved. + */ + +/dts-v1/; + +#include "amlogic-a4.dtsi" + +/ { + model = "Amlogic A113L2 ba400 Development Board"; + compatible = "amlogic,ba400","amlogic,a4";
Still missing space.
You received comment about this. Fix entire file, not just one occurrence.
Best regards,
Krzysztof
Re: [PATCH v2 5/5] arm64: dts: add support for A5 based Amlogic AV400
In reply to Xianwei ZhaoQuoted 35 lines · On 20/03/2024 10:44, Xianwei Zhao via B4 Relay wrote:
From: Xianwei Zhao <[email protected]>
Amlogic A5 is an application processor designed for smart audio and IoT applications.
Add basic support for the A5 based Amlogic AV400 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 <[email protected]>--- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../boot/dts/amlogic/amlogic-a5-a113x2-av400.dts | 42 ++++++++++++++++++++++ arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi | 40 +++++++++++++++++++++ 3 files changed, 83 insertions(+)arch/arm64/boot/dts/amlogic/Makefile +1
-0@@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 dtb-$(CONFIG_ARCH_MESON) += amlogic-a4-a113l2-ba400.dtb +dtb-$(CONFIG_ARCH_MESON) += amlogic-a5-a113x2-av400.dtb dtb-$(CONFIG_ARCH_MESON) += amlogic-c3-c302x-aw409.dtb dtb-$(CONFIG_ARCH_MESON) += amlogic-t7-a311d2-an400.dtb dtb-$(CONFIG_ARCH_MESON) += amlogic-t7-a311d2-khadas-vim4.dtbarch/arm64/boot/dts/amlogic/amlogic-a5-a113x2-av400.dts new file +2
-0@@ -0,0 +1,42 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/*
arch/arm64/boot/dts/amlogic/amlogic-a5-a113x2-av400.dts line 12
Quoted 10 lines
arch/arm64/boot/dts/amlogic/amlogic-a5-a113x2-av400.dts new file +10
-0+ * Copyright (c) 2024 Amlogic, Inc. All rights reserved. + */ + +/dts-v1/; + +#include "amlogic-a5.dtsi" + +/ { + model = "Amlogic A113X2 av400 Development Board"; + compatible = "amlogic,av400","amlogic,a5";
Please fix missing space in all your patches.
Best regards,
Krzysztof
Re: [PATCH v2 3/5] dt-bindings: serial: amlogic,meson-uart: Add compatible string for A4
In reply to Krzysztof KozlowskiHi Krzysztof,
Thanks for reply.
Quoted 14 lines · Krzysztof Kozlowski
[ EXTERNAL EMAIL ]
Quoted 11 lines · On 20/03/2024 10:44, Xianwei Zhao via B4 Relay wrote:
From: Xianwei Zhao <[email protected]>
Amlogic A4 SoCs uses the same UART controller as S4 SoCs and G12A. There is no need for an extra compatible line in the driver, but add A4 compatible line for documentation.
Signed-off-by Xianwei Zhao <[email protected]>--- Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 17 lines
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml properties: · line 59
Quoted 12 lines
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +3
-1@@ -54,7 +54,9 @@ properties: - const: amlogic,meson-gx-uart - description: UART controller on S4 compatible SoCs items: - - const: amlogic,t7-uart + - enum: + - amlogic,t7-uart + - amlogic,a4-uartKeep alphabetical order. Don't add stuff to the end of lists. This comment applies in general, for almost all your patches, so also future submissions.
Will do. Thanks, I remembered.
Quoted 3 lines
Best regards,
Krzysztof
Re: [PATCH v2 4/5] arm64: dts: add support for A4 based Amlogic BA400
In reply to Krzysztof KozlowskiHi Krzysztof,
Thanks for your reply.
Quoted 51 lines · Krzysztof Kozlowski
[ EXTERNAL EMAIL ]
Quoted 35 lines · On 20/03/2024 10:44, Xianwei Zhao via B4 Relay wrote:
From: Xianwei Zhao <[email protected]>
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 <[email protected]>--- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../boot/dts/amlogic/amlogic-a4-a113l2-ba400.dts | 42 ++++++++++++++ arch/arm64/boot/dts/amlogic/amlogic-a4-common.dtsi | 66 ++++++++++++++++++++++ arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi | 40 +++++++++++++ 4 files changed, 149 insertions(+)arch/arm64/boot/dts/amlogic/Makefile +1
-0@@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 +dtb-$(CONFIG_ARCH_MESON) += amlogic-a4-a113l2-ba400.dtb dtb-$(CONFIG_ARCH_MESON) += amlogic-c3-c302x-aw409.dtb dtb-$(CONFIG_ARCH_MESON) += amlogic-t7-a311d2-an400.dtb dtb-$(CONFIG_ARCH_MESON) += amlogic-t7-a311d2-khadas-vim4.dtbarch/arm64/boot/dts/amlogic/amlogic-a4-a113l2-ba400.dts new file +2
-0@@ -0,0 +1,42 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/*arch/arm64/boot/dts/amlogic/amlogic-a4-a113l2-ba400.dts line 12
Quoted 10 lines
arch/arm64/boot/dts/amlogic/amlogic-a4-a113l2-ba400.dts new file +10
-0+ * Copyright (c) 2024 Amlogic, Inc. All rights reserved. + */ + +/dts-v1/; + +#include "amlogic-a4.dtsi" + +/ { + model = "Amlogic A113L2 ba400 Development Board"; + compatible = "amlogic,ba400","amlogic,a4";Still missing space.
Quoted 2 lines
You received comment about this. Fix entire file, not just one occurrence.
Will fix. I got it.
Quoted 4 lines
Best regards,
Krzysztof
Re: [PATCH v2 5/5] arm64: dts: add support for A5 based Amlogic AV400
In reply to Krzysztof KozlowskiHi Krzysztof,
Thanks for your reply.
Quoted 42 lines · Krzysztof Kozlowski
[ EXTERNAL EMAIL ]
Quoted 39 lines · On 20/03/2024 10:44, Xianwei Zhao via B4 Relay wrote:
From: Xianwei Zhao <[email protected]>
Amlogic A5 is an application processor designed for smart audio and IoT applications.
Add basic support for the A5 based Amlogic AV400 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 <[email protected]>--- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../boot/dts/amlogic/amlogic-a5-a113x2-av400.dts | 42 ++++++++++++++++++++++ arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi | 40 +++++++++++++++++++++ 3 files changed, 83 insertions(+)arch/arm64/boot/dts/amlogic/Makefile +1
-0@@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 dtb-$(CONFIG_ARCH_MESON) += amlogic-a4-a113l2-ba400.dtb +dtb-$(CONFIG_ARCH_MESON) += amlogic-a5-a113x2-av400.dtb dtb-$(CONFIG_ARCH_MESON) += amlogic-c3-c302x-aw409.dtb dtb-$(CONFIG_ARCH_MESON) += amlogic-t7-a311d2-an400.dtb dtb-$(CONFIG_ARCH_MESON) += amlogic-t7-a311d2-khadas-vim4.dtbarch/arm64/boot/dts/amlogic/amlogic-a5-a113x2-av400.dts new file +6
-0@@ -0,0 +1,42 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2024 Amlogic, Inc. All rights reserved. + */ + +/dts-v1/;
Quoted 9 lines
arch/arm64/boot/dts/amlogic/amlogic-a5-a113x2-av400.dts line 12
Quoted 6 lines
arch/arm64/boot/dts/amlogic/amlogic-a5-a113x2-av400.dts new file +6
-0+ +#include "amlogic-a5.dtsi" + +/ { + model = "Amlogic A113X2 av400 Development Board"; + compatible = "amlogic,av400","amlogic,a5";Please fix missing space in all your patches.
Will fix.
Quoted 5 lines
Best regards,
Krzysztof