[PATCH v5 1/7] riscv: dts: sophgo: cv18xx: Move RiscV-specific part into SoCs' .dtsi files

Alexander Sverdlin alexander.sverdlin at gmail.com
Tue Apr 29 12:10:57 PDT 2025


Hi Inochi,

On Tue, 2025-04-29 at 06:35 +0800, Inochi Amaoto wrote:
> > Make the peripheral device tree re-usable on ARM64 platform by moving CPU
> > core and interrupt controllers' parts into new cv18xx-cpu.dtsi and
> > cv18xx-intc.dtsi.
> > 
> > Add SOC_PERIPHERAL_IRQ() macro which explicitly maps peripheral nubering
> > into "plic" interrupt-controller numbering.
> > 
> > Signed-off-by: Alexander Sverdlin <alexander.sverdlin at gmail.com>
> > ---
> > Changelog:
> > v5:
> > v4:
> > - cleanups dropped
> > - cv18xx-cpu-intc.dtsi instead of cv18xx-cpu.dtsi+cv18xx-intc.dtsi
> > v3:
> > - &cpus node has been moved into cv18xx-cpu.dtsi, &plic and &clint nodes
> > were moved into cv18xx-intc.dtsi to reduce code duplication;
> > v2:
> > - instead of carving out peripherals' part, carve out ARCH-specifics (CPU
> > core, interrupt controllers) and spread them among 3 SoC .dtsi files which
> > included cv18xx.dtsi;
> > - define a label for the "soc" node and use it in the newly introduced DTs;
> > 
> >   arch/riscv/boot/dts/sophgo/cv1800b.dtsi       |  5 +
> >   arch/riscv/boot/dts/sophgo/cv1812h.dtsi       |  5 +
> >   arch/riscv/boot/dts/sophgo/cv181x.dtsi        |  2 +-
> >   .../boot/dts/sophgo/cv18xx-cpu-intc.dtsi      | 54 +++++++++++
> >   arch/riscv/boot/dts/sophgo/cv18xx.dtsi        | 91 +++++--------------
> >   arch/riscv/boot/dts/sophgo/sg2002.dtsi        |  5 +
> >   6 files changed, 93 insertions(+), 69 deletions(-)
> >   create mode 100644 arch/riscv/boot/dts/sophgo/cv18xx-cpu-intc.dtsi
> > 
> 
> It is a hard time for now to do some change across the cv18xx 
> series, and it has become a mess. Due to the fact, I think it
> is time to do some work like split some device (clk, pinctrl,
> plic, intc) from cv18xx.dtsi to avoid override, and make room
> for arm64 device.
> 
> Since this change contains some change similar to this patch. 
> Would you mind me to take content of this patch, and add you
> as the a co-author?

thanks for looking into this!
Either way is good for me!

-- 
Alexander Sverdlin.



More information about the linux-riscv mailing list