ARM: dts: AM4372: clk: efuse based crystal frequency detect
authorAfzal Mohammed <afzal@ti.com>
Wed, 14 May 2014 11:36:37 +0000 (17:06 +0530)
committerTero Kristo <t-kristo@ti.com>
Fri, 23 May 2014 09:29:38 +0000 (12:29 +0300)
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>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
arch/arm/boot/dts/am43xx-clocks.dtsi

index 579c8233640054dffd08b14d32f450961d872b66..955cac8a2f6dad3cb7120e4e88448839bf05f699 100644 (file)
@@ -9,6 +9,22 @@
  */
 &scrm_clocks {
        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>;