riscv: dts: microchip: reparent mpfs clocks
authorConor Dooley <conor.dooley@microchip.com>
Wed, 13 Apr 2022 07:58:36 +0000 (08:58 +0100)
committerStephen Boyd <sboyd@kernel.org>
Sat, 23 Apr 2022 01:40:30 +0000 (18:40 -0700)
The 600M clock in the fabric is not the real reference, replace it with
a 125M clock which is the correct value for the icicle kit. Rename the
msspllclk node to mssrefclk since this is now the input to, not the
output of, the msspll clock. Control of the msspll clock has been moved
into the clock configurator, so add the register range for it to the clk
configurator. Finally, add a new output of the clock config block which
will provide the 1M reference clock for the MTIMER and the rtc.

Fixes: 528a5b1f2556 ("riscv: dts: microchip: add new peripherals to icicle kit device tree")
Fixes: 0fa6107eca41 ("RISC-V: Initial DTS for Microchip ICICLE board")
Reviewed-by: Daire McNamara <daire.mcnamara@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20220413075835.3354193-10-conor.dooley@microchip.com
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts
arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi

index cd2fe80..3392153 100644 (file)
@@ -45,7 +45,7 @@
 };
 
 &refclk {
-       clock-frequency = <600000000>;
+       clock-frequency = <125000000>;
 };
 
 &mmuart1 {
index 3b48b7f..746c4d4 100644 (file)
                };
        };
 
-       refclk: msspllclk {
+       refclk: mssrefclk {
                compatible = "fixed-clock";
                #clock-cells = <0>;
        };
 
                clkcfg: clkcfg@20002000 {
                        compatible = "microchip,mpfs-clkcfg";
-                       reg = <0x0 0x20002000 0x0 0x1000>;
+                       reg = <0x0 0x20002000 0x0 0x1000>, <0x0 0x3E001000 0x0 0x1000>;
                        clocks = <&refclk>;
                        #clock-cells = <1>;
                };
                        reg = <0x0 0x20124000 0x0 0x1000>;
                        interrupt-parent = <&plic>;
                        interrupts = <80>, <81>;
-                       clocks = <&clkcfg CLK_RTC>;
-                       clock-names = "rtc";
+                       clocks = <&clkcfg CLK_RTC>, <&clkcfg CLK_RTCREF>;
+                       clock-names = "rtc", "rtcref";
                        status = "disabled";
                };