diff options
author | Emilio López <emilio@elopez.com.ar> | 2013-02-25 09:44:26 -0500 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2013-03-27 11:35:34 -0400 |
commit | e874a6697710f52fa8ab29487a99034d5d96fdcc (patch) | |
tree | 1743abc90ee2d604fe5f8a0f4b69f171179ced31 /Documentation/devicetree/bindings/clock/sunxi.txt | |
parent | b54891685162e09c4292cd38f067ca118604353c (diff) |
clk: arm: sunxi: Add a new clock driver for sunxi SOCs
This commit implements the base CPU clocks for sunxi devices. It has
been tested using a slightly modified cpufreq driver from the
linux-sunxi 3.0 tree.
Additionally, document the new bindings introduced by this patch.
Idling:
/ # cat /sys/kernel/debug/clk/clk_summary
clock enable_cnt prepare_cnt rate
---------------------------------------------------------------------
osc32k 0 0 32768
osc24M_fixed 0 0 24000000
osc24M 0 0 24000000
apb1_mux 0 0 24000000
apb1 0 0 24000000
pll1 0 0 60000000
cpu 0 0 60000000
axi 0 0 60000000
ahb 0 0 60000000
apb0 0 0 30000000
dummy 0 0 0
After "yes >/dev/null &":
/ # cat /sys/kernel/debug/clk/clk_summary
clock enable_cnt prepare_cnt rate
---------------------------------------------------------------------
osc32k 0 0 32768
osc24M_fixed 0 0 24000000
osc24M 0 0 24000000
apb1_mux 0 0 24000000
apb1 0 0 24000000
pll1 0 0 1008000000
cpu 0 0 1008000000
axi 0 0 336000000
ahb 0 0 168000000
apb0 0 0 84000000
dummy 0 0 0
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>
Diffstat (limited to 'Documentation/devicetree/bindings/clock/sunxi.txt')
-rw-r--r-- | Documentation/devicetree/bindings/clock/sunxi.txt | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt new file mode 100644 index 000000000000..b23cfbdbcd6d --- /dev/null +++ b/Documentation/devicetree/bindings/clock/sunxi.txt | |||
@@ -0,0 +1,44 @@ | |||
1 | Device Tree Clock bindings for arch-sunxi | ||
2 | |||
3 | This binding uses the common clock binding[1]. | ||
4 | |||
5 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
6 | |||
7 | Required properties: | ||
8 | - compatible : shall be one of the following: | ||
9 | "allwinner,sunxi-osc-clk" - for a gatable oscillator | ||
10 | "allwinner,sunxi-pll1-clk" - for the main PLL clock | ||
11 | "allwinner,sunxi-cpu-clk" - for the CPU multiplexer clock | ||
12 | "allwinner,sunxi-axi-clk" - for the sunxi AXI clock | ||
13 | "allwinner,sunxi-ahb-clk" - for the sunxi AHB clock | ||
14 | "allwinner,sunxi-apb0-clk" - for the sunxi APB0 clock | ||
15 | "allwinner,sunxi-apb1-clk" - for the sunxi APB1 clock | ||
16 | "allwinner,sunxi-apb1-mux-clk" - for the sunxi APB1 clock muxing | ||
17 | |||
18 | Required properties for all clocks: | ||
19 | - reg : shall be the control register address for the clock. | ||
20 | - clocks : shall be the input parent clock(s) phandle for the clock | ||
21 | - #clock-cells : from common clock binding; shall be set to 0. | ||
22 | |||
23 | For example: | ||
24 | |||
25 | osc24M: osc24M@01c20050 { | ||
26 | #clock-cells = <0>; | ||
27 | compatible = "allwinner,sunxi-osc-clk"; | ||
28 | reg = <0x01c20050 0x4>; | ||
29 | clocks = <&osc24M_fixed>; | ||
30 | }; | ||
31 | |||
32 | pll1: pll1@01c20000 { | ||
33 | #clock-cells = <0>; | ||
34 | compatible = "allwinner,sunxi-pll1-clk"; | ||
35 | reg = <0x01c20000 0x4>; | ||
36 | clocks = <&osc24M>; | ||
37 | }; | ||
38 | |||
39 | cpu: cpu@01c20054 { | ||
40 | #clock-cells = <0>; | ||
41 | compatible = "allwinner,sunxi-cpu-clk"; | ||
42 | reg = <0x01c20054 0x4>; | ||
43 | clocks = <&osc32k>, <&osc24M>, <&pll1>; | ||
44 | }; | ||