Message ID | 20230704031636.3215838-3-xianwei.zhao@amlogic.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp947296vqx; Mon, 3 Jul 2023 20:36:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5fvq3ecT0TtJn2ajfYrQMz5wQGjun5ML6RW339tGo0pXclKaUxkCNG+MuW00xwYPFPsLI+ X-Received: by 2002:a17:90a:130d:b0:261:cce:d1c2 with SMTP id h13-20020a17090a130d00b002610cced1c2mr23449859pja.11.1688441796728; Mon, 03 Jul 2023 20:36:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688441796; cv=none; d=google.com; s=arc-20160816; b=buFZRT/scf+3aX5exqQ5b+oTwLLKPGECNHrJxEIwzQ3psEMKOqo/BYo7pONqIfjaWN DCSHKZXWQd5QrSEXU64UOQyygzh+miLr/A3eH3HO952a+15RB2hVrfN0dJ9FCFdcI71F 05kSbaPatGX5txLeu7U1pEmLxIobmRKZMPQElqH1viljsHFkVTET+Doq69481Q2o7Rkt dXn4Or6gXQo8L3mbfSxitpnn1a08xHQmf6gkL/4dAMQQxOraWy3Kh/eEV3qjhUUiaIRi +Xma2dJeBURdp8UzM/b7+Khp225xUu4FYJX1yY+dn0XVUoB7UFUpHqn/4rlsVw50Xz+t KWig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=9mjFIJH+R9bifSjJzyCPU8lTKdk/xmRh6BZ0yPJd7jk=; fh=fDu4phjj3Kd5v9eUQrOXvEpWfoeaojR6TUARK8xL7Uo=; b=euU1pzlDxR+2v9kA8NBcdxFLngL8YMUwjalHsPdGkra3KJp3ROayUwtF03dxnCR+2W nnBEeRh1ai/rAYZEueJKqtZ+l76OKmaEv956Gow3kq2QQepbzKYjbfvpUYV+BV6Dk7N/ DVOH17mDzkNVRje4HgtHBsRQ8M+LkluBLGNh96YzryNrm00jxHm31D+s8oCwkxJ6XegI TJnPVWIe5rOyv+4HkQhzByvNDQhHYpvyR5iJuOZDzuwxtbdBWKUSKWInO1BFWPvoWM0E SMingpXTBzEUxfc6VUoVy8tso24y/GXxh7r/ScprLmRfjuR4nPCGkfbi4MrDhT+ULWqh xrBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amlogic.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q4-20020a17090a304400b002634cad1d64si10787200pjl.75.2023.07.03.20.36.23; Mon, 03 Jul 2023 20:36:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amlogic.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230329AbjGDDRe (ORCPT <rfc822;gnulinuxfreebsd@gmail.com> + 99 others); Mon, 3 Jul 2023 23:17:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230246AbjGDDR2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Jul 2023 23:17:28 -0400 Received: from mail-sh.amlogic.com (mail-sh.amlogic.com [58.32.228.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15DFD130; Mon, 3 Jul 2023 20:16:45 -0700 (PDT) Received: from droid01-cd.amlogic.com (10.98.11.200) by mail-sh.amlogic.com (10.18.11.5) with Microsoft SMTP Server id 15.1.2507.13; Tue, 4 Jul 2023 11:16:36 +0800 From: Xianwei Zhao <xianwei.zhao@amlogic.com> To: <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <linux-amlogic@lists.infradead.org>, <devicetree@vger.kernel.org> CC: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Neil Armstrong <neil.armstrong@linaro.org>, Kevin Hilman <khilman@baylibre.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Xianwei Zhao <xianwei.zhao@amlogic.com> Subject: [PATCH 2/2] arm64: dts: add board AN400 Date: Tue, 4 Jul 2023 11:16:36 +0800 Message-ID: <20230704031636.3215838-3-xianwei.zhao@amlogic.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230704031636.3215838-1-xianwei.zhao@amlogic.com> References: <20230704031636.3215838-1-xianwei.zhao@amlogic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.98.11.200] X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770459545488618669?= X-GMAIL-MSGID: =?utf-8?q?1770459545488618669?= |
Series |
Devicetree for board AN400 based Amlogic T7 SoC
|
|
Commit Message
Xianwei Zhao
July 4, 2023, 3:16 a.m. UTC
Add devicetree support for Amlogic AN400 board based T7 SoC.
Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
---
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
Comments
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 <xianwei.zhao@amlogic.com> > --- > 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 <xianwei.zhao@amlogic.com> >> --- >> 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"; >> +}; >
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"; +};