ARM: dts: AM437x: Add the internal and external clock nodes for rtc
authorKeerthy <j-keerthy@ti.com>
Tue, 18 Aug 2015 09:41:14 +0000 (15:11 +0530)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Sat, 5 Sep 2015 17:37:20 +0000 (19:37 +0200)
rtc can either be supplied from internal 32k clock or external crystal
generated 32k clock. Internal clock is SOC specific and the external
clock is board dependent. Adding the corresponding nodes.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Documentation/devicetree/bindings/rtc/rtc-omap.txt
arch/arm/boot/dts/am4372.dtsi
arch/arm/boot/dts/am437x-gp-evm.dts
arch/arm/boot/dts/am437x-idk-evm.dts
arch/arm/boot/dts/am437x-sk-evm.dts

index 43a83668673aace3e76a029c1629398aeca8244f..bf7d11ae9bea68f107936211d8256203f89a6157 100644 (file)
@@ -16,6 +16,8 @@ Required properties:
 Optional properties:
 - system-power-controller: whether the rtc is controlling the system power
   through pmic_power_en
+- clocks: Any internal or external clocks feeding in to rtc
+- clock-names: Corresponding names of the clocks
 
 Example:
 
@@ -26,4 +28,6 @@ rtc@1c23000 {
                      19>;
        interrupt-parent = <&intc>;
        system-power-controller;
+       clocks = <&clk_32k_rtc>, <&clk_32768_ck>;
+       clock-names = "ext-clk", "int-clk";
 };
index 564900b9fcceb2ca477e78a50e2d815f033ecce4..0447c04a40cc439d90296c0f9d70b541eedf18b8 100644 (file)
                        interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH
                                      GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "rtc";
+                       clocks = <&clk_32768_ck>;
+                       clock-names = "int-clk";
                        status = "disabled";
                };
 
index 215775dc69483dba5b526b69eef58cbde3f697b7..22038f21f2283a30cdac9235f0a6a2171813264e 100644 (file)
                clock-frequency = <12000000>;
        };
 
+       /* fixed 32k external oscillator clock */
+       clk_32k_rtc: clk_32k_rtc {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <32768>;
+       };
+
        sound0: sound@0 {
                compatible = "simple-audio-card";
                simple-audio-card,name = "AM437x-GP-EVM";
        tx-num-evt = <32>;
        rx-num-evt = <32>;
 };
+
+&rtc {
+       clocks = <&clk_32k_rtc>, <&clk_32768_ck>;
+       clock-names = "ext-clk", "int-clk";
+       status = "okay";
+};
index 378344271746f20446cc8654c52fd2ef46c5cda2..af25801418b49ff322279d5147524c069c5ce9b5 100644 (file)
                        gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
                };
        };
+
+       /* fixed 32k external oscillator clock */
+       clk_32k_rtc: clk_32k_rtc {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <32768>;
+       };
 };
 
 &am43xx_pinmux {
 };
 
 &rtc {
+       clocks = <&clk_32k_rtc>, <&clk_32768_ck>;
+       clock-names = "ext-clk", "int-clk";
        status = "okay";
 };
 
index 22af44894c66f77153832a59a8262a65b4d28b8b..7da7c2da4af13b3bc711f15a9098c10da80d56fa 100644 (file)
                display0 = &lcd0;
        };
 
+       /* fixed 32k external oscillator clock */
+       clk_32k_rtc: clk_32k_rtc {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <32768>;
+       };
+
        backlight {
                compatible = "pwm-backlight";
                pwms = <&ecap0 0 50000 PWM_POLARITY_INVERTED>;
 };
 
 &rtc {
+       clocks = <&clk_32k_rtc>, <&clk_32768_ck>;
+       clock-names = "ext-clk", "int-clk";
        status = "okay";
 };