ARM: dts: AM4372: clk: efuse based crystal frequency detect
PATCH 1/1 ARM: dts: AM4372: clk: efuse based crystal frequency detect
From: Afzal Mohammed <[email protected]>
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.
--- arch/arm/boot/dts/am43xx-clocks.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
arch/arm/boot/dts/am43xx-clocks.dtsi +16 -0
@@ -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 at 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>;
Signature · 1 line
1.7.10.1
PATCH 1/1 ARM: dts: AM4372: clk: efuse based crystal frequency detect
Quoted 10 lines · Sekhar Nori
From: Afzal Mohammed <[email protected]>
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_STATUSregister 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
Quoted 5 lines
Add clock nodes (mux) to determine oscillator frequency as above.
Signed-off-by Afzal Mohammed <[email protected]>Acked-by Tero Kristo <[email protected]>Signed-off-by Sekhar Nori <[email protected]>
Thanks, queued for 3.16.
-Tero
Quoted 32 lines
--- arch/arm/boot/dts/am43xx-clocks.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)arch/arm/boot/dts/am43xx-clocks.dtsi +16
-0@@ -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>;