From: Krzysztof Kozlowski <krzk@kernel.org>
To: Alexander Sverdlin <alexander.sverdlin@gmail.com>, soc@lists.linux.dev
Cc: Inochi Amaoto <inochiama@outlook.com>,
linux-riscv@lists.infradead.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 02/10] riscv: dts: sophgo: cv18xx: Split into CPU core and peripheral parts
Date: Mon, 10 Feb 2025 16:31:45 +0100 [thread overview]
Message-ID: <d3ba0ea5-0491-42d5-a18e-64cf21df696c@kernel.org> (raw)
In-Reply-To: <4d171a4fdf7ce9bfbe6352b36d6b6791584f86c4.camel@gmail.com>
On 10/02/2025 15:26, Alexander Sverdlin wrote:
> Hi Krzysztof!
>
> On Mon, 2025-02-10 at 09:43 +0100, Krzysztof Kozlowski wrote:
>>> diff --git a/arch/riscv/boot/dts/sophgo/cv18xx-periph.dtsi b/arch/riscv/boot/dts/sophgo/cv18xx-periph.dtsi
>>> new file mode 100644
>>> index 000000000000..53834b0658b2
>>> --- /dev/null
>>> +++ b/arch/riscv/boot/dts/sophgo/cv18xx-periph.dtsi
>>> @@ -0,0 +1,313 @@
>>> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
>>> +/*
>>> + * Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org>
>>> + * Copyright (C) 2023 Inochi Amaoto <inochiama@outlook.com>
>>> + */
>>> +
>>> +#include <dt-bindings/clock/sophgo,cv1800.h>
>>> +#include <dt-bindings/gpio/gpio.h>
>>> +#include <dt-bindings/interrupt-controller/irq.h>
>>> +
>>> +/ {
>>> + osc: oscillator {
>>> + compatible = "fixed-clock";
>>
>> I really doubt that external oscillator is a peripheral. This is either
>> part of board or the SoC.
>>
>>
>>> + clock-output-names = "osc_25m";
>>> + #clock-cells = <0>;
>>> + };
>>> +
>>> + soc {
>>> + compatible = "simple-bus";
>>> + #address-cells = <1>;
>>> + #size-cells = <1>;
>>
>> No, override by phandle/label instead of duplicating SoC.
>
> Is this one critical? Otherwise I struggle in v2 to both keep
Yes, because duplicated definition is both pain and confusing. It is IMO
semantically not correct - there is only one soc, not two SoCs. If you
have two, then you miss proper unit address.
> SOC_PERIPHERAL_IRQ() in [a new] cv18xx-cpu.dtsi and reference &soc
SOC_PERIPHERAL_IRQ() does not belong here, but to the base DTSI for your
arch. I would rather recommend not to create fake DTSI structure
reflecting some arbitrary choice. cv18xx-cpu.dtsi is not better - for
example type of interrupts are rather arch or GIC specific, not the CPU.
Unless you meant something else by CPU, but then it is getting more
confusing.
Look how others, e.g. Renesas, defines it - no problem overriding soc,
no problem with SOC_PERIPHERAL_IRQ().
> from cv18xx-cpu.dtsi. It's kind of circular-dependency.
>
Best regards,
Krzysztof
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-02-10 15:42 UTC|newest]
Thread overview: 50+ 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 01/10] arm64: Add SOPHGO SOC family Kconfig support Alexander Sverdlin
2025-02-10 0:38 ` Chen Wang
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 [this message]
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
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-09 22:06 ` [PATCH 09/10] power: reset: cv18xx: New driver Alexander Sverdlin
2025-02-10 8:52 ` Krzysztof Kozlowski
2025-02-09 22:06 ` [PATCH 10/10] arm64: defconfig: Enable rudimentary Sophgo SG2000 support Alexander Sverdlin
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=d3ba0ea5-0491-42d5-a18e-64cf21df696c@kernel.org \
--to=krzk@kernel.org \
--cc=alexander.sverdlin@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=inochiama@outlook.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-riscv@lists.infradead.org \
--cc=soc@lists.linux.dev \
/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