Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp65414rwr; Wed, 19 Apr 2023 03:33:21 -0700 (PDT) X-Google-Smtp-Source: AKy350ZRqC3DzWdbLPZsSEu28EiRydJmqXfPjVQGPkddGWtmhYx684jNe7BwNyh4HX6/pFuu+3WH X-Received: by 2002:a05:6a20:734b:b0:f0:eb30:d49e with SMTP id v11-20020a056a20734b00b000f0eb30d49emr3466169pzc.39.1681900401220; Wed, 19 Apr 2023 03:33:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681900401; cv=none; d=google.com; s=arc-20160816; b=o8qRY7D5GNylMDUqUVWvqf13gu+Kp6TPwkAuhc8VlXfGrZn6KWRXNbfo/DKBN9rSil Yu25zrm512Ou+SPazWAoYTfua/1fgH8kNBrIRtfkN+I1PhQ9QMbRGLbtdfAiXIhtiVKi HjxBINbSGxYTJLO7gMby2eRX5SwmbZubjTEgPMmsTrJ5pl0UTiMVNeTAHIh5Vkz43HSq +GXgxZpsKt+al3oGPsFRaSfPWL3L5oE3kf+lQoweMlkRxIXT9AA/D9WJgB+wBweLRhN+ qPZeTI1op1tNrNcKBUDeKOUzIdvxc0NRKZvj+e2iq61SL5pg5ltcl5Qpr3a3Shll8Nnc ExjA== 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=3ioAyY8RGrXbjvCXiCKBcEBzSxxEkaY/2GP7GDNgr34=; b=v5vKEKjHjizqKGwDwh75bWKBDHznHK+Tf7S4ad1u7kUIPLbGgD+sAbyWlW7HI60uJk kdNEPj8xgrk8H1yAW29f1T7/zPHZX8vj2D7MIksrbxGRYtMaclbbYgSae0stvtYtXQBs mG63CETnNwL5uzIYBxO9tVotQ1xrqAfHj+ZXGET7jbZOrtE3uTMD0du1Xu9U+SxIFZbI lXz11idM7pMafptapQcGCou5CMU1CG7kBxDjRC7jz7qI5YSfP+M2QjuO6GhCyIzt3fSA O2yAWl6DNMzQBGt+UXG7EinB0u9581Y9NQ87UUCPtwSFOZEmhl48mowq9rWKY8MugIGM 5sYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nsrGj2Ho; 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 m16-20020a637110000000b0051f92af4956si3025711pgc.112.2023.04.19.03.33.09; Wed, 19 Apr 2023 03:33:21 -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=nsrGj2Ho; 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 S232561AbjDSKXV (ORCPT + 99 others); Wed, 19 Apr 2023 06:23:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232327AbjDSKXS (ORCPT ); Wed, 19 Apr 2023 06:23:18 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A97872A8 for ; Wed, 19 Apr 2023 03:23:16 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-3f182d74658so82755e9.0 for ; Wed, 19 Apr 2023 03:23:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681899794; x=1684491794; 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=3ioAyY8RGrXbjvCXiCKBcEBzSxxEkaY/2GP7GDNgr34=; b=nsrGj2Ho0buyoG7/Xfags+aOJIgs3ohO9hSfyzyLrrWZZ2OWBJZ5CuWGclXKPBau3c KDa3qmjifYUMDsRJCrhk6x8qAkRV8kIstzFLEiYN38upAyNjG++iRUhLG1bJ/SUp8Ue7 2WoHcgBBPPOU8uODXDGjtwVuUW45rPiOf+NfS58TvGlyqaW4DZ9N/VWC38V2a1Mo0owh Wk+LjKx2MuNCg4hGSgq/Hcyo+jyYqbFyHx2f+KajU0kxnSDbJGpB5wlDrkX/fbxQcMvH rBeI0YZrIt17/LLJTMK4VrzjV2l2gJp82Lmek6UVPKmGdh+odM0rGjbwolePJzf0f7xN AH5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681899794; x=1684491794; 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=3ioAyY8RGrXbjvCXiCKBcEBzSxxEkaY/2GP7GDNgr34=; b=EUOijhtPMAVuZBJDkWhIdPwMK0/T9hd46EYBbVxDQd7kva2GqW4Cg/85q8R5mvyCoI 1wbnN51pZNltwBMCQ/aH3ySdXmTXACCvppcnFLVjmGShzawP8FcHxyLhUsUeG5NFbbVR 9sqx9n1+CUvttzFxj1P4slP/yxdwt/3okuak6fPQq+HfH1EbXDacuje+6/8ojy1V3zGH JWbJALSLM0MvsipHpAAevsQPqnF7HD+BaLGD1TAu4vVcfRdV+UPzTUwuF7+nBUdjnt+o pTFuMnnYWNjn/mhP2yTGwWhLfuhRCDGluuAIfnTFnnxumfvnQc/fcqn2xI0T2tb5LOTj 8ObQ== X-Gm-Message-State: AAQBX9fqj1MTbY0jnwjakST9OB1vvJcVDcSbZCle3WZzo8+f+ycjD/Ut ZHBsMoe7YTMIGdro5mXvbOA/oQ== X-Received: by 2002:a05:6000:1a52:b0:2f6:c5bd:ba13 with SMTP id t18-20020a0560001a5200b002f6c5bdba13mr3763450wry.42.1681899794695; Wed, 19 Apr 2023 03:23:14 -0700 (PDT) Received: from ?IPV6:2a01:e0a:982:cbb0:1360:9fbb:dfd6:2db4? ([2a01:e0a:982:cbb0:1360:9fbb:dfd6:2db4]) by smtp.gmail.com with ESMTPSA id j13-20020a5d452d000000b002fe33e42c85sm2952144wra.72.2023.04.19.03.23.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Apr 2023 03:23:14 -0700 (PDT) Message-ID: <022c40f9-b102-8fbb-4d9a-55b8f1c520ad@linaro.org> Date: Wed, 19 Apr 2023 12:23:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 From: Neil Armstrong Reply-To: neil.armstrong@linaro.org 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 , Kevin Hilman , Rob Herring , Krzysztof Kozlowski References: <20230419073834.972273-1-xianwei.zhao@amlogic.com> <20230419073834.972273-3-xianwei.zhao@amlogic.com> Organization: Linaro Developer Services In-Reply-To: <20230419073834.972273-3-xianwei.zhao@amlogic.com> Content-Type: text/plain; charset=UTF-8; format=flowed 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 It's pointless to only build the c3 DTs here. Neil > 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"; > + 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..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"; > + }; > + > + }; > + > + 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 { > + 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"; > + reg = <0x0 0x7a000 0x0 0x18>; > + interrupts = ; > + status = "disabled"; > + clocks = <&xtal>, <&xtal>, <&xtal>; > + clock-names = "xtal", "pclk", "baud"; > + }; > + > + }; > + }; > +};