From bcef9a68caeea1d6ccaada6a0264bdbaecc5708e Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Fri, 26 Mar 2021 15:08:36 +0100 Subject: [PATCH] tools/litex_json2dts: Fix plic node interrupt-controller@f0c00000: compatible:0: 'sifive,plic-1.0.0' is not one of ['sifive,fu540-c000-plic', 'canaan,k210-plic'] From schema: Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml interrupt-controller@f0c00000: compatible:1: 'sifive,plic-1.0.0' was expected From schema: Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml interrupt-controller@f0c00000: '#address-cells' is a required property From schema: Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml Fix this by correcting the order of the compatible values, and adding the missing #address-cells property. Signed-off-by: Geert Uytterhoeven --- litex/tools/litex_json2dts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litex/tools/litex_json2dts.py b/litex/tools/litex_json2dts.py index c7122de03..2e0769296 100755 --- a/litex/tools/litex_json2dts.py +++ b/litex/tools/litex_json2dts.py @@ -155,8 +155,9 @@ def generate_dts(d, initrd_start=None, initrd_size=None, polling=False): if cpu_name == "vexriscv smp-linux": dts += """ intc0: interrupt-controller@{plic_base:x} {{ - compatible = "sifive,plic-1.0.0", "sifive,fu540-c000-plic"; + compatible = "sifive,fu540-c000-plic", "sifive,plic-1.0.0"; reg = <0x{plic_base:x} 0x400000>; + #address-cells = <0>; #interrupt-cells = <1>; interrupt-controller; interrupts-extended = <