Skip to content

Commit

Permalink
riscv: Fix Kendryte K210 device tree
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Palmer Dabbelt <[email protected]>
  • Loading branch information
damien-lemoal authored and palmer-dabbelt committed Sep 19, 2020
1 parent 21190b7 commit f025d9d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/riscv/boot/dts/kendryte/k210.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,12 @@
#clock-cells = <1>;
};

clint0: interrupt-controller@2000000 {
clint0: clint@2000000 {
#interrupt-cells = <1>;
compatible = "riscv,clint0";
reg = <0x2000000 0xC000>;
interrupts-extended = <&cpu0_intc 3>, <&cpu1_intc 3>;
interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7
&cpu1_intc 3 &cpu1_intc 7>;
clocks = <&sysctl K210_CLK_ACLK>;
};

Expand Down

0 comments on commit f025d9d

Please sign in to comment.