Skip to content

Commit f025d9d

Browse files
damien-lemoalpalmer-dabbelt
authored andcommitted
riscv: Fix Kendryte K210 device tree
The Kendryte K210 SoC CLINT is compatible with Sifive clint v0 (sifive,clint0). Fix the Kendryte K210 device tree clint entry to be inline with the sifive timer definition documented in Documentation/devicetree/bindings/timer/sifive,clint.yaml. The device tree clint entry is renamed similarly to u-boot device tree definition to improve compatibility with u-boot defined device tree. To ensure correct initialization, the interrup-cells attribute is added and the interrupt-extended attribute definition fixed. This fixes boot failures with Kendryte K210 SoC boards. Note that the clock referenced is kept as K210_CLK_ACLK, which does not necessarilly match the clint MTIME increment rate. This however does not seem to cause any problem for now. Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
1 parent 21190b7 commit f025d9d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

arch/riscv/boot/dts/kendryte/k210.dtsi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,12 @@
9595
#clock-cells = <1>;
9696
};
9797

98-
clint0: interrupt-controller@2000000 {
98+
clint0: clint@2000000 {
99+
#interrupt-cells = <1>;
99100
compatible = "riscv,clint0";
100101
reg = <0x2000000 0xC000>;
101-
interrupts-extended = <&cpu0_intc 3>, <&cpu1_intc 3>;
102+
interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7
103+
&cpu1_intc 3 &cpu1_intc 7>;
102104
clocks = <&sysctl K210_CLK_ACLK>;
103105
};
104106

0 commit comments

Comments
 (0)