From: wens@csie.org (Chen-Yu Tsai)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 4/4] ARM: dts: sun9i: Switch to the AC100 RTC clock outputs for osc32k
Date: Fri, 19 Aug 2016 15:42:26 +0800 [thread overview]
Message-ID: <20160819074226.16636-5-wens@csie.org> (raw)
In-Reply-To: <20160819074226.16636-1-wens@csie.org>
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>
---
Changes since v5:
- Added "clk-div" and "clk-mult" fixed-factor-clock properties to osc32k
placeholder.
Changes since v4: none
Changes since v3: none
Changes since v2: none
Changes since v1: none
---
arch/arm/boot/dts/sun9i-a80-cubieboard4.dts | 5 +++++
arch/arm/boot/dts/sun9i-a80-optimus.dts | 5 +++++
arch/arm/boot/dts/sun9i-a80.dtsi | 11 +++++------
3 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boot/dts/sun9i-a80-cubieboard4.dts b/arch/arm/boot/dts/sun9i-a80-cubieboard4.dts
index cf2f4b72a841..04b014603659 100644
--- a/arch/arm/boot/dts/sun9i-a80-cubieboard4.dts
+++ b/arch/arm/boot/dts/sun9i-a80-cubieboard4.dts
@@ -103,6 +103,11 @@
allwinner,drive = <SUN4I_PINCTRL_40_MA>;
};
+&osc32k {
+ /* osc32k input is from AC100 */
+ clocks = <&ac100_rtc 0>;
+};
+
&pio {
led_pins_cubieboard4: led-pins at 0 {
allwinner,pins = "PH6", "PH17";
diff --git a/arch/arm/boot/dts/sun9i-a80-optimus.dts b/arch/arm/boot/dts/sun9i-a80-optimus.dts
index e35c06c162a7..fd874ded890e 100644
--- a/arch/arm/boot/dts/sun9i-a80-optimus.dts
+++ b/arch/arm/boot/dts/sun9i-a80-optimus.dts
@@ -152,6 +152,11 @@
status = "okay";
};
+&osc32k {
+ /* osc32k input is from AC100 */
+ clocks = <&ac100_rtc 0>;
+};
+
&pio {
led_pins_optimus: led-pins at 0 {
allwinner,pins = "PH0", "PH1";
diff --git a/arch/arm/boot/dts/sun9i-a80.dtsi b/arch/arm/boot/dts/sun9i-a80.dtsi
index f68b3242b33a..24e3cac4f571 100644
--- a/arch/arm/boot/dts/sun9i-a80.dtsi
+++ b/arch/arm/boot/dts/sun9i-a80.dtsi
@@ -148,15 +148,14 @@
/*
* 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";
};
--
2.9.3
next prev parent reply other threads:[~2016-08-19 7:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-19 7:42 [PATCH v6 0/4] ARM: dts: sun9i: Enable X-Powers AC100 RTC Chen-Yu Tsai
2016-08-19 7:42 ` [PATCH v6 1/4] rtc: ac100: support clock-output-names in device tree binding Chen-Yu Tsai
2016-08-31 16:24 ` Alexandre Belloni
2016-08-19 7:42 ` [PATCH v6 2/4] ARM: dts: sun9i: a80-optimus: Add device node for AC100 Chen-Yu Tsai
2016-08-19 7:42 ` [PATCH v6 3/4] ARM: dts: sun9i: cubieboard4: " Chen-Yu Tsai
2016-08-19 7:42 ` Chen-Yu Tsai [this message]
2016-08-22 18:40 ` [PATCH v6 0/4] ARM: dts: sun9i: Enable X-Powers AC100 RTC Maxime Ripard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160819074226.16636-5-wens@csie.org \
--to=wens@csie.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox