I'm making a dts file by modifying an existing one and it's still hard to understand device tree syntax and meaning with digging the bindings documents. Here is another one I can't understand. Please help me..
In linux-5.15 source, I see in arch/arm64/boot/dts/arm/fvp-base-revc.dts (showing parts),
#include "rtsm_ve-motherboard.dtsi"
#include "rtsm_ve-motherboard-rs2.dtsi"
/ {
model = "FVP Base RevC";
compatible = "arm,fvp-base-revc", "arm,vexpress";
interrupt-parent = <&gic>; <== see this
#address-cells = <2>;
#size-cells = <2>;
...
gic: interrupt-controller@2f000000 {
compatible = "arm,gic-v3";
#interrupt-cells = <3>; <=== see this
#address-cells = <2>;
#size-cells = <2>;
ranges;
interrupt-controller;
....
};
timer {
compatible = "arm,armv8-timer";
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, <== see these lines (3 values per cell)
<GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
<GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
<GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
};
So because gic
has #incterrupt-cells = <3>, (for interrupt type, number and flag), the timer
node generating 4 interrupts has 3 values for each interrupts cell. But in file rtsm_ve-motherboard.dtsi
which is included earlier, I see this lines.
v2m_serial0: serial@90000 {
compatible = "arm,pl011", "arm,primecell";
reg = <0x090000 0x1000>;
interrupts = <5>; <== see this, (1 value per cell, why?)
clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>;
clock-names = "uartclk", "apb_pclk";
};
v2m_serial1: serial@a0000 {
compatible = "arm,pl011", "arm,primecell";
reg = <0x0a0000 0x1000>;
interrupts = <6>; <== see this, (1 value per cell, why?)
clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>;
clock-names = "uartclk", "apb_pclk";
};
Why does the interrupts value has only 1 cell here? (interrupts = <6>) I couldn't find any interrupt controller specifying #interrupt-cells = 1
in the binding documents or existing dts files.
Why does v2m_serial0 node has only one value for interrupts
value?