From: Steffen Trumtrar <s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Cc: Steffen Trumtrar
<s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
Alessandro Zummo
<a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org>,
Juergen Beisert <jbe-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Subject: [PATCH v2 2/9] ARM: i.MX28: define external RTC crystal in DT
Date: Fri, 8 Mar 2013 10:01:37 +0100 [thread overview]
Message-ID: <1362733304-23037-3-git-send-email-s.trumtrar@pengutronix.de> (raw)
In-Reply-To: <1362733304-23037-1-git-send-email-s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
From: Juergen Beisert <jbe-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
The RTC in the i.MX28 may be clocked with different crystals.
Get the rate of the connected one from the DT.
Signed-off-by: Juergen Beisert <jbe-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Signed-off-by: Steffen Trumtrar <s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
---
Documentation/devicetree/bindings/clock/imx28-clock.txt | 1 +
arch/arm/boot/dts/imx28.dtsi | 6 ++++++
drivers/clk/mxs/clk-imx28.c | 4 +++-
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/clock/imx28-clock.txt b/Documentation/devicetree/bindings/clock/imx28-clock.txt
index e6587af..c3a9d94 100644
--- a/Documentation/devicetree/bindings/clock/imx28-clock.txt
+++ b/Documentation/devicetree/bindings/clock/imx28-clock.txt
@@ -76,6 +76,7 @@ clocks and IDs.
usb0_phy 62
usb1_phy 63
enet_out 64
+ rtc_32k 65
Examples:
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
index b9e3712..0393d3f 100644
--- a/arch/arm/boot/dts/imx28.dtsi
+++ b/arch/arm/boot/dts/imx28.dtsi
@@ -46,6 +46,12 @@
#clock-cells = <0>;
clock-frequency = <24000000>;
};
+
+ osc32k: rtc-oscillator {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <0>;
+ };
};
apb@80000000 {
diff --git a/drivers/clk/mxs/clk-imx28.c b/drivers/clk/mxs/clk-imx28.c
index 01048b5..acf2762 100644
--- a/drivers/clk/mxs/clk-imx28.c
+++ b/drivers/clk/mxs/clk-imx28.c
@@ -141,7 +141,7 @@ enum imx28_clk {
clk32k_div, rtc, lradc, spdif_div, clk32k, pwm, uart, ssp0,
ssp1, ssp2, ssp3, gpmi, spdif, emi, saif0, saif1, lcdif, etm,
fec, can0, can1, usb0, usb1, usb0_phy, usb1_phy, enet_out,
- clk_max
+ rtc_32k, clk_max
};
static struct clk *clks[clk_max];
@@ -167,6 +167,8 @@ int __init mx28_clocks_init(void)
if (of_device_is_compatible(np, "fsl,mxs-system"))
clks[ref_xtal] = mxs_clk_fixed("ref_xtal", rate);
+ else if (!strncmp(np->name, "rtc-oscillator", strlen("rtc-oscillator")))
+ clks[rtc_32k] = mxs_clk_fixed("rtc32k", rate);
}
/* if not set, guess their frequency */
--
1.8.2.rc2
next prev parent reply other threads:[~2013-03-08 9:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-08 9:01 [PATCH v2 0/9] rtc: stmp3xxx: DT bindings and wakealarm Steffen Trumtrar
[not found] ` <1362733304-23037-1-git-send-email-s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2013-03-08 9:01 ` [PATCH v2 1/9] ARM: i.MX28: define osc in DT Steffen Trumtrar
[not found] ` <1362733304-23037-2-git-send-email-s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2013-03-11 4:03 ` Shawn Guo
2013-03-08 9:01 ` Steffen Trumtrar [this message]
2013-03-08 9:01 ` [PATCH v2 3/9] ARM: i.MX28: dts: add clocks for stmp3xxx RTC Steffen Trumtrar
2013-03-08 9:01 ` [PATCH v2 4/9] rtc: stmp3xxx: allow different oscillators Steffen Trumtrar
2013-03-08 9:01 ` [PATCH v2 5/9] rtc: stmp3xxx: enable wakeup functionality Steffen Trumtrar
2013-03-08 9:01 ` [PATCH v2 6/9] rtc: stmp3xxx: add sysfs entries for persistent regs Steffen Trumtrar
2013-03-08 9:01 ` [PATCH v2 7/9] rtc: stmp3xxx: Re-enable active alarm Steffen Trumtrar
2013-03-08 9:01 ` [PATCH v2 8/9] rtc: stmp3xxx: Check copy controller state Steffen Trumtrar
2013-03-08 9:01 ` [PATCH v2 9/9] rtc: stmp3xxx: Replace wait_time function Steffen Trumtrar
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=1362733304-23037-3-git-send-email-s.trumtrar@pengutronix.de \
--to=s.trumtrar-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=jbe-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.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;
as well as URLs for NNTP newsgroup(s).