On 09/02/2025 23:06, Alexander Sverdlin wrote: > Make the peripheral device tree re-usable on ARM64 platform by splitting it > into CPU-core specific and peripheral parts. > > Add SOC_PERIPHERAL_IRQ() macro which explicitly maps peripheral nubering > into "plic" interrupt-controller numbering. > > Signed-off-by: Alexander Sverdlin <alexander.sverdlin@xxxxxxxxx> > --- > arch/riscv/boot/dts/sophgo/cv181x.dtsi | 2 +- > arch/riscv/boot/dts/sophgo/cv18xx-periph.dtsi | 313 ++++++++++++++++++ > arch/riscv/boot/dts/sophgo/cv18xx.dtsi | 305 +---------------- > 3 files changed, 317 insertions(+), 303 deletions(-) > create mode 100644 arch/riscv/boot/dts/sophgo/cv18xx-periph.dtsi > > diff --git a/arch/riscv/boot/dts/sophgo/cv181x.dtsi b/arch/riscv/boot/dts/sophgo/cv181x.dtsi > index 5fd14dd1b14f..bbdb30653e9a 100644 > --- a/arch/riscv/boot/dts/sophgo/cv181x.dtsi > +++ b/arch/riscv/boot/dts/sophgo/cv181x.dtsi > @@ -11,7 +11,7 @@ soc { > emmc: mmc@4300000 { > compatible = "sophgo,cv1800b-dwcmshc"; > reg = <0x4300000 0x1000>; > - interrupts = <34 IRQ_TYPE_LEVEL_HIGH>; > + interrupts = <SOC_PERIPHERAL_IRQ(18) IRQ_TYPE_LEVEL_HIGH>; > clocks = <&clk CLK_AXI4_EMMC>, > <&clk CLK_EMMC>; > clock-names = "core", "bus"; > 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@xxxxxxxxxx> > + * Copyright (C) 2023 Inochi Amaoto <inochiama@xxxxxxxxxxx> > + */ > + > +#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. Best regards, Krzysztof