diff mbox

[4/4] ARM: dts: Enable the reference clock for timer and watchdog on Armada 375 SoC

Message ID 1413984884-20273-5-git-send-email-ezequiel.garcia@free-electrons.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ezequiel Garcia Oct. 22, 2014, 1:34 p.m. UTC
Now that the timer and watchdog drivers support the Armada 375 usage of
the reference clock, we can enable it in the devicetree.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 arch/arm/boot/dts/armada-375.dtsi | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

Comments

Thomas Petazzoni Oct. 22, 2014, 1:55 p.m. UTC | #1
Dear Ezequiel Garcia,

On Wed, 22 Oct 2014 10:34:44 -0300, Ezequiel Garcia wrote:

> -				clocks = <&coreclk 0>;
> +				clocks = <&refclk>;
> +				clock-names = "fixed";

Why not do like we do on Armada XP, and actually represent the
hardware, by showing that it takes two clocks as input:

                        timer@20300 {
                                compatible = "marvell,armada-xp-timer";
                                clocks = <&coreclk 2>, <&refclk>;
                                clock-names = "nbclk", "fixed";
                        };



>  			watchdog@20300 {
>  				compatible = "marvell,armada-375-wdt";
>  				reg = <0x20300 0x34>, <0x20704 0x4>, <0x18254 0x4>;
> -				clocks = <&coreclk 0>;
> +				clocks = <&refclk>;
> +				clock-names = "fixed";
>  			};

Ditto.

Thomas
Ezequiel Garcia Oct. 22, 2014, 3:27 p.m. UTC | #2
On 10/22/2014 10:55 AM, Thomas Petazzoni wrote:
> Dear Ezequiel Garcia,
> 
> On Wed, 22 Oct 2014 10:34:44 -0300, Ezequiel Garcia wrote:
> 
>> -				clocks = <&coreclk 0>;
>> +				clocks = <&refclk>;
>> +				clock-names = "fixed";
> 
> Why not do like we do on Armada XP, and actually represent the
> hardware, by showing that it takes two clocks as input:
> 

Yes, I guess that would work.
diff mbox

Patch

diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi
index de65714..4d89145 100644
--- a/arch/arm/boot/dts/armada-375.dtsi
+++ b/arch/arm/boot/dts/armada-375.dtsi
@@ -36,6 +36,12 @@ 
 			#clock-cells = <0>;
 			clock-frequency = <2000000000>;
 		};
+		/* 25 MHz reference crystal */
+		refclk: oscillator {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <25000000>;
+		};
 	};
 
 	cpus {
@@ -366,13 +372,15 @@ 
 						      <&gic  GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
 						      <&mpic 5>,
 						      <&mpic 6>;
-				clocks = <&coreclk 0>;
+				clocks = <&refclk>;
+				clock-names = "fixed";
 			};
 
 			watchdog@20300 {
 				compatible = "marvell,armada-375-wdt";
 				reg = <0x20300 0x34>, <0x20704 0x4>, <0x18254 0x4>;
-				clocks = <&coreclk 0>;
+				clocks = <&refclk>;
+				clock-names = "fixed";
 			};
 
 			cpurst@20800 {