[PATCH 3/3] riscv: dts: spacemit: define a SPI controller node
Yixun Lan
dlan at gentoo.org
Thu Sep 18 08:04:50 PDT 2025
Hi Alex,
On 09:20 Thu 18 Sep , Alex Elder wrote:
> On 9/18/25 9:06 AM, Yixun Lan wrote:
> > Hi Alex,
> >
> > On 08:51 Thu 18 Sep , Alex Elder wrote:
> >> On 9/18/25 8:32 AM, Yixun Lan wrote:
> >>>> + spi3: spi at d401c000 {
> >>>> + compatible = "spacemit,k1-spi";
> >>>> + reg = <0x0 0xd401c000 0x0 0x30>;
> >>>> + #address-cells = <1>;
> >>>> + #size-cells = <0>;
> >>>> + clocks = <&syscon_apbc CLK_SSP3>,
> >>>> + <&syscon_apbc CLK_SSP3_BUS>;
> >>> ..
> >>>> + clock-names = "core",
> >>>> + "bus";
> >>> can you simply put them together in one line? it's kind of tedious to split..
> >>
> >> Sure I can do that. I've seen it both ways.
> >>
> > right, it's merely a coding style I want to enforce, to make it slightly consistent
> >
> >>>> + resets = <&syscon_apbc RESET_SSP3>;
> >>>> + interrupts-extended = <&plic 55>;
> >>> why use interrupts-extended?
> >>
> >> Because it specifies both the controller and interrupt number
> >> explicitly. Why *not* use interrupts-extended?
> >>
> > It's just unnecessary, the SPI node will fall back to find parent node's interrupt
> > which already specific as &plic, brings no benefits
>
> The benefit it brings is that I don't have to search backward to
> see what the interrupt controller is. I realize it's redundant
> but I do prefer interrupts-extended over just interrupts.
>
although both should work fine, I do prefer simple "interrupts" version
for dts wide consistence, at least for SpacemiT
while reading Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
interrupts-extended is useful when there are multi interrupt parents, or need
to specific different one..
Yes, we have different opinion here, let's wait and see what DT maintainer think
--
Yixun Lan (dlan)
More information about the linux-riscv
mailing list