Skip to contentSkip to conversation

ARM: mstar: MPLL mop up

PATCH Applied Daniel Palmer 2 participants 5 messages Mar 1, 2021 – Apr 1, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover ARM: mstar: MPLL mop up

This series is just 3 small patches that got left behind when the MPLL driver was merged.

Daniel Palmer (3):
ARM: mstar: Select MSTAR_MSC313_MPLL
ARM: mstar: Add the external clocks to the base dsti
ARM: mstar: Add mpll to base dtsi

 arch/arm/boot/dts/mstar-v7.dtsi | 23 +++++++++++++++++++++++
 arch/arm/mach-mstar/Kconfig     |  1 +
 2 files changed, 24 insertions(+)
Signature · 1 line
2.30.1
#1 lore raw

PATCH 1/3 ARM: mstar: Select MSTAR_MSC313_MPLL

All of the ARCH_MSTARV7 chips have an MPLL as the source for peripheral clocks so select MSTAR_MSC313_MPLL.

---
 arch/arm/mach-mstar/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-mstar/Kconfig +1 -0
index 576d1ab293c8..cd300eeedc20 100644
@@ -4,6 +4,7 @@ menuconfig ARCH_MSTARV7
 	select ARM_GIC
 	select ARM_HEAVY_MB
 	select MST_IRQ
+	select MSTAR_MSC313_MPLL
 	help
 	  Support for newer MStar/Sigmastar SoC families that are
 	  based on Armv7 cores like the Cortex A7 and share the same
Signature · 1 line
2.30.1
#2 lore raw

PATCH 2/3 ARM: mstar: Add the external clocks to the base dsti

In reply to Daniel Palmer

All of the currently known MStar/SigmaStar ARMv7 SoCs have an "xtal" clock input that is usually 24MHz and an "RTC xtal" that is usually 32KHz.

The xtal input has to be connected to something so it's enabled by default.

The MSC313 and MSC313E do not bring the RTC clock input out to the pins so it's impossible to connect it. The SSC8336 does bring the input out to the pins but it's not always actually connected to something.

The RTC node needs to always be present because in the future the nodes for the clock muxes will refer to it even if it's not usable.

The RTC node is disabled by default and should be enabled at the board level if the RTC input is wired up.

---
 arch/arm/boot/dts/mstar-v7.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm/boot/dts/mstar-v7.dtsi +15 -0
index b0a21b0b731f..889c3804c251 100644
@@ -46,6 +46,21 @@ pmu: pmu {
 		interrupt-affinity = <&cpu0>;
 	};
 
+	clocks: clocks {
+		xtal: xtal {
+			#clock-cells = <0>;
+			compatible = "fixed-clock";
+			clock-frequency = <24000000>;
+		};
+
+		rtc_xtal: rtc_xtal {
+			#clock-cells = <0>;
+			compatible = "fixed-clock";
+			clock-frequency = <32768>;
+			status = "disabled";
+		};
+	};
+
 	soc: soc {
 		compatible = "simple-bus";
 		#address-cells = <1>;
Signature · 1 line
2.30.1
#3 lore raw

PATCH 3/3 ARM: mstar: Add mpll to base dtsi

In reply to Daniel Palmer

All of the currently known MStar/SigmaStar ARMv7 SoCs have at least one MPLL and it seems to always be at the same place so add it to the base dtsi.

---
 arch/arm/boot/dts/mstar-v7.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/mstar-v7.dtsi +8 -0
index 889c3804c251..075d583d6f40 100644
@@ -6,6 +6,7 @@
 
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/clock/mstar-msc313-mpll.h>
 
 / {
 	#address-cells = <1>;
@@ -124,6 +125,13 @@ l3bridge: l3bridge@204400 {
 				reg = <0x204400 0x200>;
 			};
 
+			mpll: mpll@206000 {
+				compatible = "mstar,msc313-mpll";
+				#clock-cells = <1>;
+				reg = <0x206000 0x200>;
+				clocks = <&xtal>;
+			};
+
 			gpio: gpio@207800 {
 				#gpio-cells = <2>;
 				reg = <0x207800 0x200>;
Signature · 1 line
2.30.1
#4 lore raw
In reply to Daniel Palmer

From: Arnd Bergmann <[email protected]>

Quoted 11 lines · Daniel Palmer

This series is just 3 small patches that got left behind when the MPLL driver was merged.

Daniel Palmer (3):
ARM: mstar: Select MSTAR_MSC313_MPLL
ARM: mstar: Add the external clocks to the base dsti
ARM: mstar: Add mpll to base dtsi

[...]

Applied to arm/dt, thanks!

[1/3] ARM: mstar: Select MSTAR_MSC313_MPLL

      commit: de73b5a97bba1538f065e1e90d8eeac399db7510
[2/3] ARM: mstar: Add the external clocks to the base dsti
      commit: a93cf651df08c370e622c3aea456bc729b352437
[3/3] ARM: mstar: Add mpll to base dtsi
      commit: f374f25aab6f10ba5e442d8f81dd94d960276cb5

       Arnd