ARM: dts: sun9i: Switch to the AC100 RTC clock outputs for osc32k
authorChen-Yu Tsai <wens@csie.org>
Fri, 19 Aug 2016 07:42:26 +0000 (15:42 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Mon, 22 Aug 2016 18:39:43 +0000 (20:39 +0200)
The 32.768 kHz clock inside the A80 SoC is fed from an external source,
typically the AC100 RTC module.

Make the osc32k placeholder a fixed-factor clock so board dts files can
specify its source.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
arch/arm/boot/dts/sun9i-a80-cubieboard4.dts
arch/arm/boot/dts/sun9i-a80-optimus.dts
arch/arm/boot/dts/sun9i-a80.dtsi

index cf2f4b72a841abcb68035e76e4d1e4e9f0dfaba9..04b014603659dca3adab9060eba7a44f548496cb 100644 (file)
        allwinner,drive = <SUN4I_PINCTRL_40_MA>;
 };
 
+&osc32k {
+       /* osc32k input is from AC100 */
+       clocks = <&ac100_rtc 0>;
+};
+
 &pio {
        led_pins_cubieboard4: led-pins@0 {
                allwinner,pins = "PH6", "PH17";
index e35c06c162a737d37b7333b82ce0f0ce23ec79b0..fd874ded890ef44608e6dd05052cf5dba18461c1 100644 (file)
        status = "okay";
 };
 
+&osc32k {
+       /* osc32k input is from AC100 */
+       clocks = <&ac100_rtc 0>;
+};
+
 &pio {
        led_pins_optimus: led-pins@0 {
                allwinner,pins = "PH0", "PH1";
index f68b3242b33a09b0ff0c197c817b75525c9d9bb9..24e3cac4f571867b9b21376134c7e90a1819d662 100644 (file)
 
                /*
                 * The 32k clock is from an external source, normally the
-                * AC100 codec/RTC chip. This clock is by default enabled
-                * and clocked at 32768 Hz, from the oscillator connected
-                * to the AC100. It is configurable, but no such driver or
-                * bindings exist yet.
+                * AC100 codec/RTC chip. This serves as a placeholder for
+                * board dts files to specify the source.
                 */
                osc32k: osc32k_clk {
                        #clock-cells = <0>;
-                       compatible = "fixed-clock";
-                       clock-frequency = <32768>;
+                       compatible = "fixed-factor-clock";
+                       clock-div = <1>;
+                       clock-mult = <1>;
                        clock-output-names = "osc32k";
                };