k210: dts: align plic node with Linux
authorNiklas Cassel <niklas.cassel@wdc.com>
Tue, 1 Mar 2022 10:35:42 +0000 (10:35 +0000)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Tue, 15 Mar 2022 09:43:11 +0000 (17:43 +0800)
The Linux PLIC interrupt-controller driver actually initializes the hart
context registers in the PLIC driver exactly in the same order as
specified in the interrupts-extended device tree property. See the device
tree binding [1].

The ordering of the interrupts is therefore essential in order to
configure the PLIC correctly.

Fix the order so that we will have sane IRQ behavior when booting Linux
with the u-boot device tree.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
arch/riscv/dts/k210.dtsi

index cf5c236..3cc8379 100644 (file)
                        compatible = "canaan,k210-plic", "sifive,plic-1.0.0", "riscv,plic0";
                        reg = <0xC000000 0x4000000>;
                        interrupt-controller;
-                       interrupts-extended = <&cpu0_intc 9>, <&cpu0_intc 11>,
-                                             <&cpu1_intc 9>, <&cpu1_intc 11>;
+                       interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>,
+                                             <&cpu1_intc 11>, <&cpu1_intc 9>;
                        riscv,ndev = <65>;
                        riscv,max-priority = <7>;
                };