* [PATCH] ARM: dts: AM4372: clk: efuse based crystal frequency detect
@ 2014-05-14 11:36 Sekhar Nori
2014-05-23 11:05 ` Tero Kristo
0 siblings, 1 reply; 2+ messages in thread
From: Sekhar Nori @ 2014-05-14 11:36 UTC (permalink / raw)
To: Tony Lindgren, Benoit Cousson
Cc: Linux OMAP Mailing List, Linux ARM Mailing List,
Device Tree Mailing List, Tero Kristo
From: Afzal Mohammed <afzal@ti.com>
Currently oscillator frequency is determined based on sysboot settings,
it may not be the case always. To determine it properly, efuse settings
also has to be read. CONTROL_STATUS register holds this information.
Bit 31: if 0, frequency to be determined based on sysboot
if 1, frequency to be determined based on efuse
Bit 29,30 - for efuse detection of frequency
Bit 22,23 - for sysboot detection of frequency
Add clock nodes (mux) to determine oscillator frequency as above.
Signed-off-by: Afzal Mohammed <afzal@ti.com>
Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
---
arch/arm/boot/dts/am43xx-clocks.dtsi | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm/boot/dts/am43xx-clocks.dtsi b/arch/arm/boot/dts/am43xx-clocks.dtsi
index 142009c..71b029c 100644
--- a/arch/arm/boot/dts/am43xx-clocks.dtsi
+++ b/arch/arm/boot/dts/am43xx-clocks.dtsi
@@ -11,6 +11,22 @@
sys_clkin_ck: sys_clkin_ck {
#clock-cells = <0>;
compatible = "ti,mux-clock";
+ clocks = <&sysboot_freq_sel_ck>, <&crystal_freq_sel_ck>;
+ ti,bit-shift = <31>;
+ reg = <0x0040>;
+ };
+
+ crystal_freq_sel_ck: crystal_freq_sel_ck {
+ #clock-cells = <0>;
+ compatible = "ti,mux-clock";
+ clocks = <&virt_19200000_ck>, <&virt_24000000_ck>, <&virt_25000000_ck>, <&virt_26000000_ck>;
+ ti,bit-shift = <29>;
+ reg = <0x0040>;
+ };
+
+ sysboot_freq_sel_ck: sysboot_freq_sel_ck@44e10040 {
+ #clock-cells = <0>;
+ compatible = "ti,mux-clock";
clocks = <&virt_19200000_ck>, <&virt_24000000_ck>, <&virt_25000000_ck>, <&virt_26000000_ck>;
ti,bit-shift = <22>;
reg = <0x0040>;
--
1.7.10.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: dts: AM4372: clk: efuse based crystal frequency detect
2014-05-14 11:36 [PATCH] ARM: dts: AM4372: clk: efuse based crystal frequency detect Sekhar Nori
@ 2014-05-23 11:05 ` Tero Kristo
0 siblings, 0 replies; 2+ messages in thread
From: Tero Kristo @ 2014-05-23 11:05 UTC (permalink / raw)
To: Sekhar Nori, Tony Lindgren, Benoit Cousson
Cc: Linux OMAP Mailing List, Linux ARM Mailing List,
Device Tree Mailing List
On 05/14/2014 02:36 PM, Sekhar Nori wrote:
> From: Afzal Mohammed <afzal@ti.com>
>
> Currently oscillator frequency is determined based on sysboot settings,
> it may not be the case always. To determine it properly, efuse settings
> also has to be read. CONTROL_STATUS register holds this information.
> Bit 31: if 0, frequency to be determined based on sysboot
> if 1, frequency to be determined based on efuse
> Bit 29,30 - for efuse detection of frequency
> Bit 22,23 - for sysboot detection of frequency
>
> Add clock nodes (mux) to determine oscillator frequency as above.
>
> Signed-off-by: Afzal Mohammed <afzal@ti.com>
> Acked-by: Tero Kristo <t-kristo@ti.com>
> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Thanks, queued for 3.16.
-Tero
> ---
> arch/arm/boot/dts/am43xx-clocks.dtsi | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/arch/arm/boot/dts/am43xx-clocks.dtsi b/arch/arm/boot/dts/am43xx-clocks.dtsi
> index 142009c..71b029c 100644
> --- a/arch/arm/boot/dts/am43xx-clocks.dtsi
> +++ b/arch/arm/boot/dts/am43xx-clocks.dtsi
> @@ -11,6 +11,22 @@
> sys_clkin_ck: sys_clkin_ck {
> #clock-cells = <0>;
> compatible = "ti,mux-clock";
> + clocks = <&sysboot_freq_sel_ck>, <&crystal_freq_sel_ck>;
> + ti,bit-shift = <31>;
> + reg = <0x0040>;
> + };
> +
> + crystal_freq_sel_ck: crystal_freq_sel_ck {
> + #clock-cells = <0>;
> + compatible = "ti,mux-clock";
> + clocks = <&virt_19200000_ck>, <&virt_24000000_ck>, <&virt_25000000_ck>, <&virt_26000000_ck>;
> + ti,bit-shift = <29>;
> + reg = <0x0040>;
> + };
> +
> + sysboot_freq_sel_ck: sysboot_freq_sel_ck@44e10040 {
> + #clock-cells = <0>;
> + compatible = "ti,mux-clock";
> clocks = <&virt_19200000_ck>, <&virt_24000000_ck>, <&virt_25000000_ck>, <&virt_26000000_ck>;
> ti,bit-shift = <22>;
> reg = <0x0040>;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-23 11:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-14 11:36 [PATCH] ARM: dts: AM4372: clk: efuse based crystal frequency detect Sekhar Nori
2014-05-23 11:05 ` Tero Kristo
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).