Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10068980rwr; Fri, 12 May 2023 03:25:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5acfQl1RVbhshlj1NLywCXp52BRx3bxkHA5evfvkh5C8hQWOghH5Oo6qJtHEK8UeJwmeBj X-Received: by 2002:a05:6a21:3a8b:b0:f3:756e:e116 with SMTP id zv11-20020a056a213a8b00b000f3756ee116mr23706024pzb.38.1683887139700; Fri, 12 May 2023 03:25:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683887139; cv=none; d=google.com; s=arc-20160816; b=grz3pPLTCOUuys4WXfnVoSbouGLOdbHrYtcfbZQ09sL0tmvGu65YMbTuoMaICXVFu8 R6Xzl8to6hLA1b8JFuV9DwWN7tlFcPklsPcsMxX4+OFFiMlpkuFDIVBeGk2uJK810Rl+ E92nB5KJGgVZb7n/PHRrNNyrscpjS3gGS4SlDhi/yv0/Hj5l1XyVaJMeDc1VwTlYVywp VV2/ndShiKgt+aZmivPHpN1MZhQREau+cYA+HeVOMgoEKHQufbuYgksMdsvHqGW9ZR47 tKX7vP/tWZrerFyaYDW7Lu5/JA1sehJrPYNh99WNOFn2N0dXmg++pdYGxFOqQxuMkBJ0 bPHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:references:cc:to:content-language:subject:reply-to :from:user-agent:mime-version:date:message-id:dkim-signature; bh=TSlZKJ919JRC2x/Kcyg1XoCSxvFxqofhm3tIejqbIEw=; b=00I/3G+Ie1P0/qqRKdriuIzMYYSy06OX2+0HxjhZM6huZf3cVtTH304X4+bqk3Y7TS B5QXU1BOwWmNmEpINlEiHbJs49hXlJ7HnQIzQm8kFJwHrAzoeUTQj93If9xoewkj+tvh MELQUMrF6nHfWJQP+k0+MFhuqCk/ETatPG2PMCV1dGA3O8Vv51tH1C8Iv4F5XMVBvgFF 1kJTg+D4cOv53zkvoBNx6jWn1Pgj4WvxxGbpDl8Zty8TjuUv85iOns5xGFpu10gOiuiX wFCF6QfGw9vYZp42ylCpYlh6sfoT0WMMxKZby2T/3qLrO4OTDxNzGQy5Bks6v+14I5uo /Avg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZeRSSQ22; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h70-20020a638349000000b0052c50f8fcc4si9219684pge.51.2023.05.12.03.25.23; Fri, 12 May 2023 03:25:39 -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; dkim=pass header.i=@linaro.org header.s=google header.b=ZeRSSQ22; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240587AbjELKNO (ORCPT + 99 others); Fri, 12 May 2023 06:13:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240493AbjELKND (ORCPT ); Fri, 12 May 2023 06:13:03 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8B1712EAD for ; Fri, 12 May 2023 03:12:34 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3f42711865eso39008345e9.0 for ; Fri, 12 May 2023 03:12:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683886353; x=1686478353; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :content-language:subject:reply-to:from:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=TSlZKJ919JRC2x/Kcyg1XoCSxvFxqofhm3tIejqbIEw=; b=ZeRSSQ22T2vPKZNx8m1VSLUIamkTmCCuTt5yN1ud+13hbzqlf6JgM5E1mQLZSxlAXh Wz7JvkOVQ22QeNP2/RNI9DVXAE3fm3I7eDALbUvc8Q8sS3EY703ARNWsDFE42HztqU7F znUJascx6YQXCwRb8oxjJX4aGP4tnjtKpIY9KdmXc6QSGMq2wyOmey9Ofgw7yja02VA+ WONBRldr4lycA0JWO9hNtEmZHoCpztiFchSQvMvP62veIj6kJggVNp8tz7vW80hZv3yO EGXd4qZLTyz92jC6XOpXnbgKKD2tAplzKpI1ykiKLCLClgx67nsusWXuesVIVP0sNhtV 5G4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683886353; x=1686478353; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :content-language:subject:reply-to:from:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TSlZKJ919JRC2x/Kcyg1XoCSxvFxqofhm3tIejqbIEw=; b=NGxR7KEoIaSstnE9AqnAFnI7CJ40mStgJEFfwxk0hr8F0BiJuOiGbpPXh39V/Egzlo xR+6g6pve4U6JztT7yRlVgmwn+CLGvGPvU/dfAmO+I/NwUaH7DtCKRX29glVxuD3Nv+c 1Sli3QZ/LmF8WAHFTkjXU7riMxy9fqXdVnGEpeev3jtQr7OqufjlWlD3i+2864+/rTYq W6rfNpcR9SskvwQRyVlxkDru+x1C9TV96YAYPs9iJl0MDrKTRLGc675WOftcwB1HqZEq I2u25OuMYFZ+z1nmJH2trz4rRGQBqVAhgxnzny0kNX3De/sOh2mxzAJ2W96Bx3BGiu1O f4kQ== X-Gm-Message-State: AC+VfDxi+FN6DFVkxKZ+oPt7Igp5fuiF3ffM9fEUCaCNKW41Mw7MUNhX pM5EBtQsiMIa3Ki2BSdf7rRNTw== X-Received: by 2002:a5d:5082:0:b0:307:a36b:e7a5 with SMTP id a2-20020a5d5082000000b00307a36be7a5mr8349933wrt.60.1683886352845; Fri, 12 May 2023 03:12:32 -0700 (PDT) Received: from ?IPV6:2a01:e0a:982:cbb0:95e3:a02f:1d34:8191? ([2a01:e0a:982:cbb0:95e3:a02f:1d34:8191]) by smtp.gmail.com with ESMTPSA id k9-20020adfe8c9000000b0030642f5da27sm22872525wrn.37.2023.05.12.03.12.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 May 2023 03:12:32 -0700 (PDT) Message-ID: Date: Fri, 12 May 2023 12:12:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 From: neil.armstrong@linaro.org Reply-To: neil.armstrong@linaro.org Subject: Re: [PATCH V4] arm64: dts: add support for C3 based Amlogic AW409 Content-Language: en-US To: "xianwei.zhao" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org Cc: Catalin Marinas , Will Deacon , Kevin Hilman , Rob Herring , Krzysztof Kozlowski References: <20230510091129.151669-1-xianwei.zhao@amlogic.com> Organization: Linaro Developer Services In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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: X-Mailing-List: linux-kernel@vger.kernel.org On 12/05/2023 09:03, xianwei.zhao wrote: > Hi Neil, >      Thank you for your reply. > > On 2023/5/11 16:39, Neil Armstrong wrote: >> [ EXTERNAL EMAIL ] >> >> Hi, >> >> On 10/05/2023 11:11, Xianwei Zhao wrote: >>> Amlogic C3 is an advanced edge AI processor designed for smart IP camera >>> applications. >>> >>> Add basic support for the C3 based Amlogic AW409 board, which describes >>> the following components: CPU, GIC, IRQ, Timer, UART. It's capable of >>> booting up into the serial console. >>> >>> Signed-off-by: Xianwei Zhao >>> --- >>> Link: https://lore.kernel.org/all/20230407102704.1055152-1-kelvin.zhang@amlogic.com >>> Link: https://lore.kernel.org/all/20230307222651.2106615-2-martin.blumenstingl@googlemail.com >>> >>> V3 -> V4: Move Link under the --- before the changelog. >>> V2 -> V3: Remove '256m' from filename; >>>            Keep alphabetical order of Makefile. >>> V1 -> V2: Remove new arch, and use ARCH_MESON; >>>            Modify node name, and delete superfluous blank line. >>> --- >>>   arch/arm64/boot/dts/amlogic/Makefile          |  1 + >>>   .../dts/amlogic/amlogic-c3-c302x-aw409.dts    | 29 +++++++ >>>   arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi   | 86 +++++++++++++++++++ >>>   3 files changed, 116 insertions(+) >>>   create mode 100644 arch/arm64/boot/dts/amlogic/amlogic-c3-c302x-aw409.dts >>>   create mode 100644 arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi >>> >>> diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile >>> index cd1c5b04890a..6f61798a109f 100644 >>> --- a/arch/arm64/boot/dts/amlogic/Makefile >>> +++ b/arch/arm64/boot/dts/amlogic/Makefile >>> @@ -1,4 +1,5 @@ >>>   # SPDX-License-Identifier: GPL-2.0 >>> +dtb-$(CONFIG_ARCH_MESON) += amlogic-c3-c302x-aw409.dtb >>>   dtb-$(CONFIG_ARCH_MESON) += meson-a1-ad401.dtb >>>   dtb-$(CONFIG_ARCH_MESON) += meson-axg-jethome-jethub-j100.dtb >>>   dtb-$(CONFIG_ARCH_MESON) += meson-axg-jethome-jethub-j110-rev-2.dtb >>> diff --git a/arch/arm64/boot/dts/amlogic/amlogic-c3-c302x-aw409.dts b/arch/arm64/boot/dts/amlogic/amlogic-c3-c302x-aw409.dts >>> new file mode 100644 >>> index 000000000000..edce8850b338 >>> --- /dev/null >>> +++ b/arch/arm64/boot/dts/amlogic/amlogic-c3-c302x-aw409.dts >>> @@ -0,0 +1,29 @@ >>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) >>> +/* >>> + * Copyright (c) 2021 Amlogic, Inc. All rights reserved. >>> + */ >>> + >>> +/dts-v1/; >>> + >>> +#include "amlogic-c3.dtsi" >>> + >>> +/ { >>> +     model = "Amlogic C302 aw409 Development Board"; >>> +     compatible = "amlogic,aw409", "amlogic,c3"; >>> +     interrupt-parent = <&gic>; >>> +     #address-cells = <2>; >>> +     #size-cells = <2>; >>> + >>> +     aliases { >>> +             serial0 = &uart_b; >>> +     }; >>> + >>> +     memory@0 { >>> +             device_type = "memory"; >>> +             reg = <0x0 0x0 0x0 0x10000000>; >>> +     }; >>> +}; >>> + >>> +&uart_b { >>> +     status = "okay"; >>> +}; >>> diff --git a/arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi >>> new file mode 100644 >>> index 000000000000..93b335aef605 >>> --- /dev/null >>> +++ b/arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi >>> @@ -0,0 +1,86 @@ >>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) >>> +/* >>> + * Copyright (c) 2021 Amlogic, Inc. All rights reserved. >>> + */ >>> + >>> +#include >>> +#include >>> +#include >>> + >>> +/ { >>> +     cpus { >>> +             #address-cells = <2>; >>> +             #size-cells = <0>; >>> + >>> +             cpu0: cpu@0 { >>> +                     device_type = "cpu"; >>> +                     compatible = "arm,cortex-a35"; >>> +                     reg = <0x0 0x0>; >>> +                     enable-method = "psci"; >>> +             }; >>> + >>> +             cpu1: cpu@1 { >>> +                     device_type = "cpu"; >>> +                     compatible = "arm,cortex-a35"; >>> +                     reg = <0x0 0x1>; >>> +                     enable-method = "psci"; >>> +             }; >>> +     }; >>> + >>> +     timer { >>> +             compatible = "arm,armv8-timer"; >>> +             interrupts = , >>> +                          , >>> +                          , >>> +                          ; >>> +     }; >>> + >>> +     psci { >>> +             compatible = "arm,psci-1.0"; >>> +             method = "smc"; >>> +     }; >>> + >>> +     xtal: xtal-clk { >>> +             compatible = "fixed-clock"; >>> +             clock-frequency = <24000000>; >>> +             clock-output-names = "xtal"; >>> +             #clock-cells = <0>; >>> +     }; >>> + >>> +     soc { >>> +             compatible = "simple-bus"; >>> +             #address-cells = <2>; >>> +             #size-cells = <2>; >>> +             ranges; >>> + >>> +             gic: interrupt-controller@fff01000 { >>> +                     compatible = "arm,gic-400"; >>> +                     #interrupt-cells = <3>; >>> +                     #address-cells = <0>; >>> +                     interrupt-controller; >>> +                     reg = <0x0 0xfff01000 0 0x1000>, >>> +                           <0x0 0xfff02000 0 0x2000>, >>> +                           <0x0 0xfff04000 0 0x2000>, >>> +                           <0x0 0xfff06000 0 0x2000>; >>> +                     interrupts = ; >>> +             }; >>> + >>> +             apb4: bus@fe000000 { >>> +                     compatible = "simple-bus"; >>> +                     reg = <0x0 0xfe000000 0x0 0x480000>; >>> +                     #address-cells = <2>; >>> +                     #size-cells = <2>; >>> +                     ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x480000>; >>> + >>> +                     uart_b: serial@7a000 { >>> +                             compatible = "amlogic,meson-g12a-uart"; >> >> This should be: >> >>         compatible = "amlogic,meson-g12a-uart", "amlogic,meson-gx-uart" >> >> to match the amlogic,meson-uart.yaml bindings. >> > > I will use strings 'amlogic,meson-s4-uart' instead of these, because of board C3 is only use 12M clock source for serial, the same as s4 series. Sure. Neil > >> Please run : >> make CHECK_DTBS=1 amlogic/amlogic-c3-c302x-aw409.dtb >> >> With that fixed, please add on v5: > > Will do. > >> >> Reviewed-by: Neil Armstrong >> >>> +                             reg = <0x0 0x7a000 0x0 0x18>; >>> +                             interrupts = ; >>> +                             status = "disabled"; >>> +                             clocks = <&xtal>, <&xtal>, <&xtal>; >>> +                             clock-names = "xtal", "pclk", "baud"; >>> +                     }; >>> + >>> +             }; >>> +     }; >>> +}; >>> >>> base-commit: ae68fb187b59bc8645974320808ab2d7c41b1833 >>