Add devicetree support for Amlogic AN400 board based T7 SoC.
Signed-off-by: Xianwei Zhao <[email protected]>
---
arch/arm64/boot/dts/amlogic/Makefile | 1 +
.../dts/amlogic/amlogic-t7-a311d2-an400.dts | 39 +++++++++++++++++++
2 files changed, 40 insertions(+)
create mode 100644 arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dts
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
index 91fa425116ea..8b6f57a94863 100644
--- a/arch/arm64/boot/dts/amlogic/Makefile
+++ b/arch/arm64/boot/dts/amlogic/Makefile
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
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
dtb-$(CONFIG_ARCH_MESON) += meson-a1-ad401.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-axg-jethome-jethub-j100.dtb
diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dts b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dts
new file mode 100644
index 000000000000..d755e1ee108a
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dts
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023 Amlogic, Inc. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include "amlogic-t7.dtsi"
+
+/ {
+ model = "Amlogic A311D2 AN400 Development Board";
+ compatible = "amlogic,an400", "amlogic,a311d2", "amlogic,t7";
+ interrupt-parent = <&gic>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ aliases {
+ serial0 = &uart_a;
+ };
+
+ memory@0 {
+ device_type = "memory";
+ linux,usable-memory = <0x00000000 0x00000000 0x00000000 0xE0000000
+ 0x00000001 0x00000000 0x00000000 0x20000000>;
+ };
+
+ xtal: xtal-clk {
+ compatible = "fixed-clock";
+ clock-frequency = <24000000>;
+ clock-output-names = "xtal";
+ #clock-cells = <0>;
+ };
+};
+
+&uart_a {
+ clocks = <&xtal>, <&xtal>, <&xtal>;
+ clock-names = "xtal", "pclk", "baud";
+ status = "okay";
+};
--
2.37.1
Hi,
On 04/07/2023 05:16, Xianwei Zhao wrote:
> Add devicetree support for Amlogic AN400 board based T7 SoC.
>
> Signed-off-by: Xianwei Zhao <[email protected]>
> ---
> arch/arm64/boot/dts/amlogic/Makefile | 1 +
> .../dts/amlogic/amlogic-t7-a311d2-an400.dts | 39 +++++++++++++++++++
> 2 files changed, 40 insertions(+)
> create mode 100644 arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dts
>
> diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
> index 91fa425116ea..8b6f57a94863 100644
> --- a/arch/arm64/boot/dts/amlogic/Makefile
> +++ b/arch/arm64/boot/dts/amlogic/Makefile
> @@ -1,5 +1,6 @@
> # SPDX-License-Identifier: GPL-2.0
> 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
> dtb-$(CONFIG_ARCH_MESON) += meson-a1-ad401.dtb
> dtb-$(CONFIG_ARCH_MESON) += meson-axg-jethome-jethub-j100.dtb
> diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dts b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dts
> new file mode 100644
> index 000000000000..d755e1ee108a
> --- /dev/null
> +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dts
> @@ -0,0 +1,39 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (c) 2023 Amlogic, Inc. All rights reserved.
> + */
> +
> +/dts-v1/;
> +
> +#include "amlogic-t7.dtsi"
> +
> +/ {
> + model = "Amlogic A311D2 AN400 Development Board";
> + compatible = "amlogic,an400", "amlogic,a311d2", "amlogic,t7";
> + interrupt-parent = <&gic>;
> + #address-cells = <2>;
> + #size-cells = <2>;
> +
> + aliases {
> + serial0 = &uart_a;
> + };
> +
> + memory@0 {
> + device_type = "memory";
> + linux,usable-memory = <0x00000000 0x00000000 0x00000000 0xE0000000
> + 0x00000001 0x00000000 0x00000000 0x20000000>;
Please use "reg =" instead of linux,usable-memory, which is not a documented property
Please use `make CHECK_DTBS=yes amlogic/amlogic-t7-a311d2-an400.dtb` before posting DT patches,
and make sure there's no errors except already in-review bindings like here the UART compatible.
The result here is:
arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dtb: /: memory@0: 'anyOf' conditional failed, one must be fixed:
'reg' is a required property
'ranges' is a required property
From schema: /usr/local/lib/python3.10/dist-packages/dtschema/schemas/root-node.yaml
arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dtb: /: memory@0: 'linux,usable-memory' does not match any of the regexes: 'pinctrl-[0-9]+'
From schema: /usr/local/lib/python3.10/dist-packages/dtschema/schemas/memory.yaml
arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dtb: /: memory@0: 'reg' is a required property
From schema: /usr/local/lib/python3.10/dist-packages/dtschema/schemas/memory.yaml
Please fix this one.
arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dtb: serial@78000: compatible: 'oneOf' conditional failed, one must be fixed:
['amlogic,t7-uart', 'amlogic,meson-s4-uart'] is too short
['amlogic,t7-uart', 'amlogic,meson-s4-uart'] is too long
'amlogic,t7-uart' is not one of ['amlogic,meson6-uart', 'amlogic,meson8-uart', 'amlogic,meson8b-uart', 'amlogic,meson-gx-uart', 'amlogic,meson-s4-uart']
'amlogic,meson-g12a-uart' was expected
'amlogic,meson-ao-uart' was expected
'amlogic,meson-gx-uart' was expected
From schema: Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml
arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dtb: serial@78000: Unevaluated properties are not allowed ('compatible' was unexpected)
From schema: Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml
arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dtb: /soc/bus@fe000000/serial@78000: failed to match any schema with compatible: ['amlogic,t7-uart', 'amlogic,meson-s4-uart']
This one is OK, the UART bindings is reviewed and should be picked up for v6.6
Neil
> + };
> +
> + xtal: xtal-clk {
> + compatible = "fixed-clock";
> + clock-frequency = <24000000>;
> + clock-output-names = "xtal";
> + #clock-cells = <0>;
> + };
> +};
> +
> +&uart_a {
> + clocks = <&xtal>, <&xtal>, <&xtal>;
> + clock-names = "xtal", "pclk", "baud";
> + status = "okay";
> +};
Hi Neil,
Thanks.
On 2023/7/4 16:09, Neil Armstrong wrote:
> [ EXTERNAL EMAIL ]
>
> Hi,
>
> On 04/07/2023 05:16, Xianwei Zhao wrote:
>> Add devicetree support for Amlogic AN400 board based T7 SoC.
>>
>> Signed-off-by: Xianwei Zhao <[email protected]>
>> ---
>> arch/arm64/boot/dts/amlogic/Makefile | 1 +
>> .../dts/amlogic/amlogic-t7-a311d2-an400.dts | 39 +++++++++++++++++++
>> 2 files changed, 40 insertions(+)
>> create mode 100644
>> arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dts
>>
>> diff --git a/arch/arm64/boot/dts/amlogic/Makefile
>> b/arch/arm64/boot/dts/amlogic/Makefile
>> index 91fa425116ea..8b6f57a94863 100644
>> --- a/arch/arm64/boot/dts/amlogic/Makefile
>> +++ b/arch/arm64/boot/dts/amlogic/Makefile
>> @@ -1,5 +1,6 @@
>> # SPDX-License-Identifier: GPL-2.0
>> 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
>> dtb-$(CONFIG_ARCH_MESON) += meson-a1-ad401.dtb
>> dtb-$(CONFIG_ARCH_MESON) += meson-axg-jethome-jethub-j100.dtb
>> diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dts
>> b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dts
>> new file mode 100644
>> index 000000000000..d755e1ee108a
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dts
>> @@ -0,0 +1,39 @@
>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>> +/*
>> + * Copyright (c) 2023 Amlogic, Inc. All rights reserved.
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include "amlogic-t7.dtsi"
>> +
>> +/ {
>> + model = "Amlogic A311D2 AN400 Development Board";
>> + compatible = "amlogic,an400", "amlogic,a311d2", "amlogic,t7";
>> + interrupt-parent = <&gic>;
>> + #address-cells = <2>;
>> + #size-cells = <2>;
>> +
>> + aliases {
>> + serial0 = &uart_a;
>> + };
>> +
>> + memory@0 {
>> + device_type = "memory";
>> + linux,usable-memory = <0x00000000 0x00000000 0x00000000
>> 0xE0000000
>> + 0x00000001 0x00000000 0x00000000
>> 0x20000000>;
>
> Please use "reg =" instead of linux,usable-memory, which is not a
> documented property
>
> Please use `make CHECK_DTBS=yes amlogic/amlogic-t7-a311d2-an400.dtb`
> before posting DT patches,
> and make sure there's no errors except already in-review bindings like
> here the UART compatible.
>
> The result here is:
> arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dtb: /: memory@0:
> 'anyOf' conditional failed, one must be fixed:
> 'reg' is a required property
> 'ranges' is a required property
> From schema:
> /usr/local/lib/python3.10/dist-packages/dtschema/schemas/root-node.yaml
> arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dtb: /: memory@0:
> 'linux,usable-memory' does not match any of the regexes: 'pinctrl-[0-9]+'
> From schema:
> /usr/local/lib/python3.10/dist-packages/dtschema/schemas/memory.yaml
> arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dtb: /: memory@0:
> 'reg' is a required property
> From schema:
> /usr/local/lib/python3.10/dist-packages/dtschema/schemas/memory.yaml
>
> Please fix this one.
>
Will do
> arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dtb: serial@78000:
> compatible: 'oneOf' conditional failed, one must be fixed:
> ['amlogic,t7-uart', 'amlogic,meson-s4-uart'] is too short
> ['amlogic,t7-uart', 'amlogic,meson-s4-uart'] is too long
> 'amlogic,t7-uart' is not one of ['amlogic,meson6-uart',
> 'amlogic,meson8-uart', 'amlogic,meson8b-uart', 'amlogic,meson-gx-uart',
> 'amlogic,meson-s4-uart']
> 'amlogic,meson-g12a-uart' was expected
> 'amlogic,meson-ao-uart' was expected
> 'amlogic,meson-gx-uart' was expected
> From schema:
> Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml
> arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dtb: serial@78000:
> Unevaluated properties are not allowed ('compatible' was unexpected)
> From schema:
> Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml
> arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dtb:
> /soc/bus@fe000000/serial@78000: failed to match any schema with
> compatible: ['amlogic,t7-uart', 'amlogic,meson-s4-uart']
>
> This one is OK, the UART bindings is reviewed and should be picked up
> for v6.6
>
> Neil
>
>> + };
>> +
>> + xtal: xtal-clk {
>> + compatible = "fixed-clock";
>> + clock-frequency = <24000000>;
>> + clock-output-names = "xtal";
>> + #clock-cells = <0>;
>> + };
>> +};
>> +
>> +&uart_a {
>> + clocks = <&xtal>, <&xtal>, <&xtal>;
>> + clock-names = "xtal", "pclk", "baud";
>> + status = "okay";
>> +};
>