Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm: sunxi: Add useful information about sunxi clocks

This patch contains useful bits of information about the sunxi clocks
that may help and/or be interesting for current and future developers.

Signed-off-by: Emilio López <emilio@elopez.com.ar>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>

authored by

Emilio López and committed by
Mike Turquette
8eb896ab e874a669

+56
+56
Documentation/arm/sunxi/clocks.txt
··· 1 + Frequently asked questions about the sunxi clock system 2 + ======================================================= 3 + 4 + This document contains useful bits of information that people tend to ask 5 + about the sunxi clock system, as well as accompanying ASCII art when adequate. 6 + 7 + Q: Why is the main 24MHz oscillator gatable? Wouldn't that break the 8 + system? 9 + 10 + A: The 24MHz oscillator allows gating to save power. Indeed, if gated 11 + carelessly the system would stop functioning, but with the right 12 + steps, one can gate it and keep the system running. Consider this 13 + simplified suspend example: 14 + 15 + While the system is operational, you would see something like 16 + 17 + 24MHz 32kHz 18 + | 19 + PLL1 20 + \ 21 + \_ CPU Mux 22 + | 23 + [CPU] 24 + 25 + When you are about to suspend, you switch the CPU Mux to the 32kHz 26 + oscillator: 27 + 28 + 24Mhz 32kHz 29 + | | 30 + PLL1 | 31 + / 32 + CPU Mux _/ 33 + | 34 + [CPU] 35 + 36 + Finally you can gate the main oscillator 37 + 38 + 32kHz 39 + | 40 + | 41 + / 42 + CPU Mux _/ 43 + | 44 + [CPU] 45 + 46 + Q: Were can I learn more about the sunxi clocks? 47 + 48 + A: The linux-sunxi wiki contains a page documenting the clock registers, 49 + you can find it at 50 + 51 + http://linux-sunxi.org/A10/CCM 52 + 53 + The authoritative source for information at this time is the ccmu driver 54 + released by Allwinner, you can find it at 55 + 56 + https://github.com/linux-sunxi/linux-sunxi/tree/sunxi-3.0/arch/arm/mach-sun4i/clock/ccmu