Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1775101rwb; Fri, 2 Dec 2022 00:33:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf4c4sfvuQQ38zgefLf+JWPbD1hvQzVKg3cBWeFClpOqcMcUODHrdCDY0NjDBEdFEVeqzPHl X-Received: by 2002:a17:906:6403:b0:7b2:9667:241e with SMTP id d3-20020a170906640300b007b29667241emr60280397ejm.115.1669970035520; Fri, 02 Dec 2022 00:33:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669970035; cv=pass; d=google.com; s=arc-20160816; b=xnt8rBRBPQF42IS7U1jW24HqTOw4HqngCyIEkteC/ttes7tbbumKqNuba2cKNze4aR CztJfF0nnjeLt1HJQDW+wo+Vgz2iU3lHJKwQbvA8QKj3YOm6LJPdAXFOqMxUAxxc6sb5 KSHm+XPBM9EhA7DCrzMLXdfZvwliuX1W/AuP692s22hc+/WGDmeuooZQ+APCYrsByjmJ Nnh8kklNonhfT1XMgd7yIkAhiQfPa6PB3e6qIUMIZNCzErSE5LEW7S4VM1mDZVos3VBy WfGMAhGIm0PpWOHqUv8FkvKyGgyU3KNvIAHvmn1GmOvzA/nP+EGSMiYm659+c8/k6wNI JYjA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:organization:references:in-reply-to:date :cc:to:from:subject:message-id:dkim-signature; bh=QKJjRg+TFMrDUXn3W6BnSgamQp8z40egqO35KV5JwBc=; b=IUnl3u+tefJZiNmgrdMvMTZ4C4yl4U/SDFwZlYibrugO5Ty0ZmJGMaJOrHD+QlqyBT UIV09XFw8VSLBz+7EbKx+i3C3h2cvqarKdCY42B4WGhVhOv4Lwo8jzYaZCzLF4qdvJbH oQYL8leNph9Lp03JnLVkB9KLtzHLGNqwCZLGSaKCB87Wgc+0GH79PjZCTHVibkKOuV5/ jrrsGry8sVHFjoHT+UKYUOjXlINgqiyc1gztuyEWwlHw3JjWXlJe0WfP9okHDW8Cc7ve KisYU4hY2iQXEkKSzk7a1NlpmS+sKvD+K7mvumJHvLaxnHfZWSy4jWXw5YLoUGV/BjSj HZWA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@icenowy.me header.s=zmail header.b=fRboHy8w; arc=pass (i=1 spf=pass spfdomain=icenowy.me dkim=pass dkdomain=icenowy.me dmarc=pass fromdomain=icenowy.me>); 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o9-20020a170906974900b00791994dfb9esi6338672ejy.491.2022.12.02.00.33.35; Fri, 02 Dec 2022 00:33:55 -0800 (PST) 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=@icenowy.me header.s=zmail header.b=fRboHy8w; arc=pass (i=1 spf=pass spfdomain=icenowy.me dkim=pass dkdomain=icenowy.me dmarc=pass fromdomain=icenowy.me>); 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231386AbiLBIaz (ORCPT + 82 others); Fri, 2 Dec 2022 03:30:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232446AbiLBI3W (ORCPT ); Fri, 2 Dec 2022 03:29:22 -0500 Received: from sender4-op-o18.zoho.com (sender4-op-o18.zoho.com [136.143.188.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 861382CE0B; Fri, 2 Dec 2022 00:27:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669969654; cv=none; d=zohomail.com; s=zohoarc; b=Um7bLjMJkRzzGMWjDwOiZM7Q4Zr7Ff+nuz5l/iFK/JNF+0ZovQCa1Kbjs8pkQIt0dTDRsRvQAJWDQq8e/rEKwoRzdxvBOrNJ4NQiQ+Wum9zcGwvPS8jWeSWo+wTrhD0w1S97+qSCP51YXzX+AQkMU1I6YXsdcw3ydjSp+0trONE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669969654; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=QKJjRg+TFMrDUXn3W6BnSgamQp8z40egqO35KV5JwBc=; b=kZo75enxAj+NBcU0ug9nHc7X7z1QXllK2apZH9Qvc4cRbREFPe+CUAeNHJ0WqJ3HRCbFW5LYRcQ3YsGWc+TwzqbFzAv6+9Y3//EjS4y0MNPOlzPopqF5XlX9Yc+tE8x9f/wAIzXkjL3puamR3r7jRQYk2nFV+j3Nf5dxIN7uChs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=icenowy.me; spf=pass smtp.mailfrom=uwu@icenowy.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1669969654; s=zmail; d=icenowy.me; i=uwu@icenowy.me; h=Message-ID:Subject:Subject:From:From:To:To:Cc:Cc:Date:Date:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:MIME-Version:Message-Id:Reply-To; bh=QKJjRg+TFMrDUXn3W6BnSgamQp8z40egqO35KV5JwBc=; b=fRboHy8wzAAEegZvuWhEkMLFDSeDl+tcJjEVq2ywfQ8zEUM7A8Q2yYc/DOY5CW3H TlxIaKCqNMyiePJGCVBqBuFx2Od557WAjw7N2hxXliBJXKmZJSAR44ILLskFDueGv1k RZjkF4GpphuSII4YU6X89wqgQZKaze+E68G1+lSo= Received: from edelgard.fodlan.icenowy.me (120.85.99.229 [120.85.99.229]) by mx.zohomail.com with SMTPS id 1669969653716805.4032075516008; Fri, 2 Dec 2022 00:27:33 -0800 (PST) Message-ID: Subject: Re: [PATCH v2 04/12] riscv: dts: allwinner: Add the D1/D1s SoC devicetree From: Icenowy Zheng To: Conor Dooley , Samuel Holland Cc: Chen-Yu Tsai , Jernej Skrabec , linux-sunxi@lists.linux.dev, Palmer Dabbelt , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, Krzysztof Kozlowski , Rob Herring , Heiko Stuebner , Jisheng Zhang , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Andre Przywara , Albert Ou , Anup Patel , Atish Patra , Christian Hewitt , Conor Dooley , Guo Ren , Heinrich Schuchardt , Linus Walleij , Paul Walmsley , Stanislav Jakubek Date: Fri, 02 Dec 2022 16:27:25 +0800 In-Reply-To: References: <20221125234656.47306-1-samuel@sholland.org> <20221125234656.47306-5-samuel@sholland.org> Organization: Anthon Open-Source Community Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 MIME-Version: 1.0 X-ZohoMailClient: External X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLACK autolearn=no 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 =E5=9C=A8 2022-11-26=E6=98=9F=E6=9C=9F=E5=85=AD=E7=9A=84 16:03 +0000=EF=BC= =8CConor Dooley=E5=86=99=E9=81=93=EF=BC=9A > On Fri, Nov 25, 2022 at 05:46:48PM -0600, Samuel Holland wrote: > > D1 (aka D1-H), D1s (aka F133), R528, and T113 are a family of SoCs > > based > > on a single die, or at a pair of dies derived from the same design. > >=20 > > D1 and D1s contain a single T-HEAD Xuantie C906 CPU, whereas R528 > > and > > T113 contain a pair of Cortex-A7's. >=20 > Is this "additionally contain" or a case of the D1 is the R528 but > with > s/arm/riscv/? It's the latter, right? Technically they're the same die, but the CPU cores are selectively enabled, and at least what Allwinner says is that D1 contains only RV and R528 contains only ARM. >=20 > > D1 and R528 are the full version of > > the chip with a BGA package, whereas D1s and T113 are low-pin-count > > QFP > > variants. > >=20 > > Because the original design supported both ARM and RISC-V CPUs, > > some > > peripherals are duplicated. In addition, all variants except D1s > > contain > > a HiFi 4 DSP with its own set of peripherals. > >=20 > > The devicetrees are organized to minimize duplication: > > =C2=A0- Common perhiperals are described in sunxi-d1s-t113.dtsi > > =C2=A0- DSP-related peripherals are described in sunxi-d1-t113.dtsi > > =C2=A0- RISC-V specific hardware is described in sun20i-d1s.dtsi > > =C2=A0- Functionality unique to the D1 variant is described in sun20i- > > d1.dtsi > >=20 > > The SOC_PERIPHERAL_IRQ macro handles the different #interrupt-cells > > values between the ARM (GIC) and RISC-V (PLIC) versions of the SoC. >=20 > Modulo the warnings I replied to the cover with & one minor comment > below: > Reviewed-by: Conor Dooley >=20 > > Signed-off-by: Samuel Holland > > --- > >=20 > > Changes in v2: > > =C2=A0- Split into separate files for sharing with D1s/R528/T113 > > =C2=A0- Use SOC_PERIPHERAL_IRQ macro for interrupts > > =C2=A0- Rename osc24M to dcxo and move the frequency to the board DTs > > =C2=A0- Drop analog LDOs due to the missing binding > > =C2=A0- Correct tcon_top DSI clock reference > > =C2=A0- Add DMIC, DSI controller, and DPHY (bindings are in linux-next) > > =C2=A0- Add CPU OPP table > >=20 > > =C2=A0arch/riscv/boot/dts/allwinner/sun20i-d1.dtsi=C2=A0 |=C2=A0 66 ++ > > =C2=A0arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi |=C2=A0 76 ++ > > =C2=A0.../boot/dts/allwinner/sunxi-d1-t113.dtsi=C2=A0=C2=A0=C2=A0=C2=A0= |=C2=A0 15 + > > =C2=A0.../boot/dts/allwinner/sunxi-d1s-t113.dtsi=C2=A0=C2=A0=C2=A0 | 84= 4 > > ++++++++++++++++++ > > =C2=A04 files changed, 1001 insertions(+) > > =C2=A0create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-d1.dtsi > > =C2=A0create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi > > =C2=A0create mode 100644 arch/riscv/boot/dts/allwinner/sunxi-d1- > > t113.dtsi > > =C2=A0create mode 100644 arch/riscv/boot/dts/allwinner/sunxi-d1s- > > t113.dtsi >=20 >=20 > > diff --git a/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi > > b/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi > > new file mode 100644 > > index 000000000000..c8815cbf0b46 > > --- /dev/null > > +++ b/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi > > @@ -0,0 +1,844 @@ > > +// SPDX-License-Identifier: (GPL-2.0+ or MIT) > > +// Copyright (C) 2021-2022 Samuel Holland > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +/ { > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0#address-cells =3D <1>; > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0#size-cells =3D <1>; > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0dcxo: dcxo-clk { > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0compatible =3D "fixed-clock"; > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0/* This value must be overridden by the board */ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0clock-frequency =3D <0>; >=20 > Since this is a "must", can you drop the clock-frequency =3D <0> here > so > that if someone doesn't override it in their board dt-validate > complains? >=20 > Thanks, > Conor. >=20 > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0clock-output-names =3D "dcxo"; > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0#clock-cells =3D <0>; > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0}; > > + > =C2=A0 >=20