Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp445241rwe; Wed, 19 Apr 2023 00:51:19 -0700 (PDT) X-Google-Smtp-Source: AKy350ZMASDzsgVgC6imPcFA1W0/eBHJ5kI9E5G4EqY+dQS3ylk+PvjjtByUhyczWqDm3krcg3qF X-Received: by 2002:a05:6870:d20a:b0:187:a766:be5f with SMTP id g10-20020a056870d20a00b00187a766be5fmr3216934oac.2.1681890679294; Wed, 19 Apr 2023 00:51:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681890679; cv=none; d=google.com; s=arc-20160816; b=r5TuFnOV8RzWHpv+rANU/81OGQAI2PMKMsBK+HgdBPVU9ohxNA+W+BSiZl7BN8gryZ Pkm0lr6rMDwghQoWUJBkYXqfyFIAVihwwEEpsSX6JKISXMzcBloeH0AimS8QDsDDVSqX WM1zc33Xv9obCXX//zAmDm60Q21Ye9P8w6wgLo/k9sqdAC0gfz+GuaIRL/2I0MYlAXpk 39CSBNMoBq+KFEb0p67YmiP9t0XVJQiIXzSXHW1HXhwowu5joBqBEJYuZL51MQo7JbfD EX0Sz8sKs120EuYtOK1uvDTiIXNs+TIQ7dybnhWb5YXvrtl2bM+TbHZH5fia45VbvCaP RG7Q== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=agSZbKqp8B+BLFTMYJTpSAUFC27L20Z+bg36x+eCgwQ=; b=wbx8x4SI7TQfBaD0xBJLtTSwMQmYy/BxCs7jEY8ifPq5lIHNfqIdKFIC8hymdCQ1zZ jT/PEin0rS84z+/SeDYukmrrIHRKWMKDUflVp3KdA5ewoKy0VSwjnpxV+J5slkhoP2CA r4B8hJhT8EuUv0809ag8SEfnypWfil9ooAdmla44SEgFLWR78qBrmZtybwaIrNJDdyrp MCEVGVp0oXw1oi1y1sQ8Tqam1fBz969kaQmNwl4ChLuzH6WguMiIDOo/zPuy6n8JZ4W9 lUyodaq9/VPOPrYY24ZbTAXs+rh9mb+ClXcBhDq+YX+QZsazrCZAkMAGN2LScSlnWzVh WdOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=G+EZMie2; 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 a38-20020a05687046a600b00163490b25ecsi16193280oap.286.2023.04.19.00.51.06; Wed, 19 Apr 2023 00:51:19 -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=G+EZMie2; 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 S231362AbjDSHsk (ORCPT + 99 others); Wed, 19 Apr 2023 03:48:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231309AbjDSHsj (ORCPT ); Wed, 19 Apr 2023 03:48:39 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B23E97 for ; Wed, 19 Apr 2023 00:48:37 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id dx24so35304708ejb.11 for ; Wed, 19 Apr 2023 00:48:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681890515; x=1684482515; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=agSZbKqp8B+BLFTMYJTpSAUFC27L20Z+bg36x+eCgwQ=; b=G+EZMie2NNYAU/ddcmxIwr8z1uFQzA3jx34H/gQIR4jO7rIgvTZi/vMd7RkwCTtRBw eMggNJlkhwDQiCl+e95aCGkz3rjxIM5YBMRL0PMi0nsb00RT3SPOm1s7EqdQddEsGxpF H9V/kuPDXjyC398XCBOrt95Tmi/X+6Xow3o7UFwXCjkS4erxa9uqFsCFvQ77xxHBCCbj DHRByiGyo9ZtHft2Z48OK4YbRnQvfr+D0NuOHmLIzv1rh4ERu1tISpceOErdRzBGoRMF o6GZ4hPhSnmOOOPrVOvPlH5HF2RL8ZfQ1Z8NOrs38YDwepbOaBtDtKItLF1eyP9/go0d F8uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681890515; x=1684482515; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=agSZbKqp8B+BLFTMYJTpSAUFC27L20Z+bg36x+eCgwQ=; b=GKcDIvBgUWiIGHGm41wx4jf69PCqwjEFZbPjicKtrgdDyBFFi96Fs1hAfygveXuMNr JHw2IAIjPgS4bZNy6dgJflwKUuVrgdTd/BAZm3N/+rEWbC4tt4JnJ+ZhuyDigJAzDCsY pV1xW6vyo5hgZ3QzmBgt7v0imToBgHPJEX0woXeFsEkt5tR1nt4IWV78/puE06unlCDq LYLaAWx1DuZbLKaRkDcmtb/02omQuJYjZ8rDFZsnMBALymjE9UZHqBBgulr6ulx/Avj5 UMQw/AAR6GsXHV2uZLpNsmF062H3kBzN2ayfmQbSfRZYweuDtU0TuQgJ+p5G4Jj1dEPH wmzw== X-Gm-Message-State: AAQBX9coSLLsEuFWIfLxpFrvEAstjW9DJ2yZsyh3tIeLhPeoWb7GSgMX KYK76wrsONzZPiveTRkQ7N1xKw== X-Received: by 2002:a17:906:2c14:b0:91f:b13f:a028 with SMTP id e20-20020a1709062c1400b0091fb13fa028mr13114900ejh.34.1681890515615; Wed, 19 Apr 2023 00:48:35 -0700 (PDT) Received: from ?IPV6:2a02:810d:15c0:828:62f5:eb43:f726:5fee? ([2a02:810d:15c0:828:62f5:eb43:f726:5fee]) by smtp.gmail.com with ESMTPSA id q17-20020a1709066ad100b0094f6f45b2c1sm4240673ejs.156.2023.04.19.00.48.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Apr 2023 00:48:35 -0700 (PDT) Message-ID: <4e6469e5-0f6c-4150-4709-7459597f06cc@linaro.org> Date: Wed, 19 Apr 2023 09:48:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [RFC PATCH 2/2] 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 , Neil Armstrong , Kevin Hilman , Rob Herring , Krzysztof Kozlowski References: <20230419073834.972273-1-xianwei.zhao@amlogic.com> <20230419073834.972273-3-xianwei.zhao@amlogic.com> From: Krzysztof Kozlowski In-Reply-To: <20230419073834.972273-3-xianwei.zhao@amlogic.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.7 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=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: X-Mailing-List: linux-kernel@vger.kernel.org On 19/04/2023 09:38, =Xianwei Zhao wrote: > From: Xianwei Zhao > > 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 > --- > arch/arm64/boot/dts/amlogic/Makefile | 1 + > .../amlogic/amlogic-c3-c302x-aw409-256m.dts | 30 +++++++ > arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi | 87 +++++++++++++++++++ > 3 files changed, 118 insertions(+) > create mode 100644 arch/arm64/boot/dts/amlogic/amlogic-c3-c302x-aw409-256m.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..d2b5d0d750bc 100644 > --- a/arch/arm64/boot/dts/amlogic/Makefile > +++ b/arch/arm64/boot/dts/amlogic/Makefile > @@ -74,3 +74,4 @@ dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-hc4.dtb > dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb > dtb-$(CONFIG_ARCH_MESON) += meson-sm1-x96-air-gbit.dtb > dtb-$(CONFIG_ARCH_MESON) += meson-sm1-x96-air.dtb > +dtb-$(CONFIG_ARCH_AMLIPC) += amlogic-c3-c302x-aw409-256m.dtb > diff --git a/arch/arm64/boot/dts/amlogic/amlogic-c3-c302x-aw409-256m.dts b/arch/arm64/boot/dts/amlogic/amlogic-c3-c302x-aw409-256m.dts > new file mode 100644 > index 000000000000..38ca98a32181 > --- /dev/null > +++ b/arch/arm64/boot/dts/amlogic/amlogic-c3-c302x-aw409-256m.dts > @@ -0,0 +1,30 @@ > +// 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"; Undocumented compatibles. Run checkpatch and fix all warnings. Anyway, I am not sure this warrants separate architecture. Isn't C3 standard Meson SoC? > + interrupt-parent = <&gic>; > + #address-cells = <2>; > + #size-cells = <2>; > + > + aliases { > + serial0 = &uart_B; > + }; > + > + memory@0 { > + device_type = "memory"; > + reg = <0x0 0x0 0x0 0x10000000>; > + }; > + Drop stray blank lines. > +}; > + > +&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..c69072ac57f5 > --- /dev/null > +++ b/arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi > @@ -0,0 +1,87 @@ > +// 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"; > + }; > + Everywhere... > + }; > + > + 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: apb4@fe000000 { Node names should be generic. https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > + 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 { lowercase for labels > + compatible = "amlogic,meson-g12a-uart"; So this is just meson? Drop new ARCH, no need for it. Anyway, you need SoC specific compatible. Best regards, Krzysztof