devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Sverdlin <alexander.sverdlin@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>, soc@lists.linux.dev
Cc: Chen Wang <unicorn_wang@outlook.com>,
	Inochi Amaoto <inochiama@outlook.com>,
		linux-riscv@lists.infradead.org, devicetree@vger.kernel.org,
	Haylen Chu	 <heylenay@outlook.com>,
	linux-arm-kernel@lists.infradead.org,
	Arnd Bergmann	 <arnd@arndb.de>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski	 <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Subject: Re: [PATCH 03/10] arm64: dts: sophgo: Add initial SG2000 SoC device tree
Date: Mon, 10 Feb 2025 16:01:10 +0100	[thread overview]
Message-ID: <03ff407fe68e46df4844e5dd244e7c609331af71.camel@gmail.com> (raw)
In-Reply-To: <0d5484d1-be83-4f38-befd-94d458b3aaa8@kernel.org>

Hi Krzysztof!

On Mon, 2025-02-10 at 09:45 +0100, Krzysztof Kozlowski wrote:
> On 09/02/2025 23:06, Alexander Sverdlin wrote:
> > Add initial device tree for the SG2000 SoC by SOPHGO (from ARM64 PoV).
> > 
> > Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> > ---
> >   arch/arm64/boot/dts/sophgo/sg2000.dtsi | 79 ++++++++++++++++++++++++++
> >   1 file changed, 79 insertions(+)
> >   create mode 100644 arch/arm64/boot/dts/sophgo/sg2000.dtsi
> > 
> > diff --git a/arch/arm64/boot/dts/sophgo/sg2000.dtsi b/arch/arm64/boot/dts/sophgo/sg2000.dtsi
> > new file mode 100644
> > index 000000000000..4e520486cbe5
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/sophgo/sg2000.dtsi
> > @@ -0,0 +1,79 @@
> > +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> > +
> > +#define SOC_PERIPHERAL_IRQ(nr)		GIC_SPI (nr)
> > +
> > +#include <dt-bindings/interrupt-controller/arm-gic.h>
> > +#include <riscv/sophgo/cv18xx-periph.dtsi>
> > +#include <riscv/sophgo/cv181x.dtsi>
> > +
> > +/ {

[...]

> > +	gic: interrupt-controller@1f01000 {
> 
> MMIO nodes are always in the soc.

I think I've looked a wrong example (or a counter-example)...
$ grep -R -P '^\t\tcompatible = "arm,cortex-a15-gic";' *
arm/boot/dts/intel/axm/axm55xx.dtsi:		compatible = "arm,cortex-a15-gic";
arm/boot/dts/ti/omap/dra7.dtsi:		compatible = "arm,cortex-a15-gic";
arm/boot/dts/ti/omap/omap5.dtsi:		compatible = "arm,cortex-a15-gic";
arm/boot/dts/nvidia/tegra124.dtsi:		compatible = "arm,cortex-a15-gic";
arm/boot/dts/nvidia/tegra114.dtsi:		compatible = "arm,cortex-a15-gic";
arm64/boot/dts/nvidia/tegra132.dtsi:		compatible = "arm,cortex-a15-gic";
arm64/boot/dts/freescale/s32v234.dtsi:		compatible = "arm,cortex-a15-gic";
arm64/boot/dts/apm/apm-storm.dtsi:		compatible = "arm,cortex-a15-gic";
arm64/boot/dts/apm/apm-shadowcat.dtsi:		compatible = "arm,cortex-a15-gic";

But thanks for clarification!

> > +		compatible = "arm,cortex-a15-gic";
> > +		interrupt-controller;
> > +		#interrupt-cells = <3>;
> > +		reg = <0x01f01000 0x1000>,
> > +		      <0x01f02000 0x2000>;
> > +	};
> > +
> > +	soc {
> 
> Override by phandle/label instead of duplicating.
> 
> > +		ranges;
> > +
> > +		pinctrl: pinctrl@3001000 {
> > +			compatible = "sophgo,sg2000-pinctrl";
> > +			reg = <0x03001000 0x1000>,
> > +			      <0x05027000 0x1000>;
> > +			reg-names = "sys", "rtc";
> > +		};
> > +	};
> > +};
> > +
> > +
> > +&clk {
> > +	compatible = "sophgo,sg2000-clk";
> 
> 
> That's discouraged practice. If you need to define compatible, it means
> the block is not shared between designs and must not be in common DTSI.

That doesn't come from my series, that's how original cv18xx.dtsi has been
designed. Same question as before: do I need to rework it if I will not be able to
test the changes (I don't even posess the relevant HW). But if not, I have
to adapt the same pattern into the new sg2000.dtsi.

-- 
Alexander Sverdlin.


  reply	other threads:[~2025-02-10 15:01 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-09 22:06 [PATCH 00/10] arm64 support for Milk-V Duo Module 01 EVB Alexander Sverdlin
2025-02-09 22:06 ` [PATCH 02/10] riscv: dts: sophgo: cv18xx: Split into CPU core and peripheral parts Alexander Sverdlin
2025-02-10  5:24   ` Inochi Amaoto
2025-02-10  8:43   ` Krzysztof Kozlowski
2025-02-10 13:45     ` Alexander Sverdlin
2025-02-11  8:08       ` Krzysztof Kozlowski
2025-02-11  9:14         ` Alexander Sverdlin
2025-02-10 14:26     ` Alexander Sverdlin
2025-02-10 15:31       ` Krzysztof Kozlowski
2025-02-09 22:06 ` [PATCH 03/10] arm64: dts: sophgo: Add initial SG2000 SoC device tree Alexander Sverdlin
2025-02-10  5:05   ` Inochi Amaoto
2025-02-10 14:16     ` Alexander Sverdlin
2025-02-10  5:26   ` Inochi Amaoto
2025-02-10  8:45   ` Krzysztof Kozlowski
2025-02-10 15:01     ` Alexander Sverdlin [this message]
2025-02-11  8:07       ` Krzysztof Kozlowski
2025-02-11  9:22         ` Alexander Sverdlin
2025-02-11 12:12           ` Krzysztof Kozlowski
2025-02-09 22:06 ` [PATCH 04/10] arm64: dts: sophgo: Add Duo Module 01 Alexander Sverdlin
2025-02-10  5:27   ` Inochi Amaoto
2025-02-10  8:47   ` Krzysztof Kozlowski
2025-02-09 22:06 ` [PATCH 05/10] arm64: dts: sophgo: Add Duo Module 01 Evaluation Board Alexander Sverdlin
2025-02-10  8:48   ` Krzysztof Kozlowski
2025-02-09 22:06 ` [PATCH 06/10] dt-bindings: mfd: syscon: Add Cvitek CV18xx rtcsys core and ctrl compatible Alexander Sverdlin
2025-02-10  5:15   ` Inochi Amaoto
2025-02-10  8:48   ` Krzysztof Kozlowski
2025-02-10 20:30     ` Alexander Sverdlin
2025-02-10 20:40       ` Alexander Sverdlin
2025-02-09 22:06 ` [PATCH 07/10] dt-bindings: reset: sophgo: Add CV18xx reset controller Alexander Sverdlin
2025-02-10  5:36   ` Inochi Amaoto
2025-02-10  8:49   ` Krzysztof Kozlowski
2025-02-09 22:06 ` [PATCH 08/10] riscv/arm64: dts: cv18xx: Add sysctl and reset nodes Alexander Sverdlin
2025-02-10  5:13   ` Inochi Amaoto
2025-02-10 11:47     ` Alexander Sverdlin
2025-02-10 12:29       ` Inochi Amaoto
2025-02-10  8:51   ` Krzysztof Kozlowski
2025-02-10  0:02 ` [PATCH 00/10] arm64 support for Milk-V Duo Module 01 EVB Chen Wang
2025-02-10  5:15   ` Inochi Amaoto
2025-02-10  5:33 ` Inochi Amaoto
2025-02-10 12:10   ` Alexander Sverdlin
2025-02-10 20:55   ` Alexander Sverdlin
2025-02-11 19:37     ` Alexander Sverdlin
2025-02-12  0:29       ` Inochi Amaoto
2025-02-12  9:33         ` Alexander Sverdlin
2025-02-10 16:22 ` Rob Herring (Arm)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=03ff407fe68e46df4844e5dd244e7c609331af71.camel@gmail.com \
    --to=alexander.sverdlin@gmail.com \
    --cc=arnd@arndb.de \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=heylenay@outlook.com \
    --cc=inochiama@outlook.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=robh@kernel.org \
    --cc=soc@lists.linux.dev \
    --cc=unicorn_wang@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).