Skip to content

Commit 2b6190c

Browse files
ConchuODbebarino
authored andcommitted
riscv: dts: microchip: fix usage of fic clocks on mpfs
The fic clocks passed to the pcie controller and other peripherals in the device tree are not the clocks they actually run on. The fics are actually clock domain crossers & the clock config blocks output is the mss/cpu side input to the interconnect. The peripherals are actually clocked by fixed frequency clocks embedded in the fpga fabric. Fix the device tree so that these peripherals use the correct clocks. The fabric side FIC0 & FIC1 inputs both use the same 125 MHz, so only one clock is created for them. Fixes: 528a5b1 ("riscv: dts: microchip: add new peripherals to icicle kit device tree") Reviewed-by: Daire McNamara <[email protected]> Signed-off-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Palmer Dabbelt <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent a2438f8 commit 2b6190c

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

arch/riscv/boot/dts/microchip/microchip-mpfs-fabric.dtsi

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
reg = <0x0 0x41000000 0x0 0xF0>;
88
microchip,sync-update-mask = /bits/ 32 <0>;
99
#pwm-cells = <2>;
10-
clocks = <&clkcfg CLK_FIC3>;
10+
clocks = <&fabric_clk3>;
1111
status = "disabled";
1212
};
1313

@@ -16,10 +16,22 @@
1616
reg = <0x0 0x44000000 0x0 0x1000>;
1717
#address-cells = <1>;
1818
#size-cells = <0>;
19-
clocks = <&clkcfg CLK_FIC3>;
19+
clocks = <&fabric_clk3>;
2020
interrupt-parent = <&plic>;
2121
interrupts = <122>;
2222
clock-frequency = <100000>;
2323
status = "disabled";
2424
};
25+
26+
fabric_clk3: fabric-clk3 {
27+
compatible = "fixed-clock";
28+
#clock-cells = <0>;
29+
clock-frequency = <62500000>;
30+
};
31+
32+
fabric_clk1: fabric-clk1 {
33+
compatible = "fixed-clock";
34+
#clock-cells = <0>;
35+
clock-frequency = <125000000>;
36+
};
2537
};

arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@
424424
<0 0 0 3 &pcie_intc 2>,
425425
<0 0 0 4 &pcie_intc 3>;
426426
interrupt-map-mask = <0 0 0 7>;
427-
clocks = <&clkcfg CLK_FIC0>, <&clkcfg CLK_FIC1>, <&clkcfg CLK_FIC3>;
427+
clocks = <&fabric_clk1>, <&fabric_clk1>, <&fabric_clk3>;
428428
clock-names = "fic0", "fic1", "fic3";
429429
ranges = <0x3000000 0x0 0x8000000 0x20 0x8000000 0x0 0x80000000>;
430430
msi-parent = <&pcie>;

0 commit comments

Comments
 (0)