blob: 00a5c26454eb773f4be1496b54d676f09bfcc0f1 [file] [log] [blame]
Emilio Lópeze874a662013-02-25 11:44:26 -03001Device Tree Clock bindings for arch-sunxi
2
3This binding uses the common clock binding[1].
4
5[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
6
7Required properties:
8- compatible : shall be one of the following:
Emilio Lópeze3276992013-03-26 23:39:17 -03009 "allwinner,sun4i-osc-clk" - for a gatable oscillator
10 "allwinner,sun4i-pll1-clk" - for the main PLL clock
Maxime Ripard6a721db2013-07-23 23:34:10 +020011 "allwinner,sun6i-a31-pll1-clk" - for the main PLL clock on A31
Emilio Lópeze3276992013-03-26 23:39:17 -030012 "allwinner,sun4i-cpu-clk" - for the CPU multiplexer clock
13 "allwinner,sun4i-axi-clk" - for the AXI clock
Emilio López13569a72013-03-27 18:20:37 -030014 "allwinner,sun4i-axi-gates-clk" - for the AXI gates
Emilio Lópeze3276992013-03-26 23:39:17 -030015 "allwinner,sun4i-ahb-clk" - for the AHB clock
Maxime Ripard4f985b42013-04-30 11:56:22 +020016 "allwinner,sun4i-ahb-gates-clk" - for the AHB gates on A10
17 "allwinner,sun5i-a13-ahb-gates-clk" - for the AHB gates on A13
Maxime Ripard2371dd82013-07-16 11:21:59 +020018 "allwinner,sun5i-a10s-ahb-gates-clk" - for the AHB gates on A10s
Maxime Ripard1fb2e4a2013-07-25 21:06:56 +020019 "allwinner,sun7i-a20-ahb-gates-clk" - for the AHB gates on A20
Maxime Ripard6a721db2013-07-23 23:34:10 +020020 "allwinner,sun6i-a31-ahb1-mux-clk" - for the AHB1 multiplexer on A31
21 "allwinner,sun6i-a31-ahb1-gates-clk" - for the AHB1 gates on A31
Emilio Lópeze3276992013-03-26 23:39:17 -030022 "allwinner,sun4i-apb0-clk" - for the APB0 clock
Maxime Ripard4f985b42013-04-30 11:56:22 +020023 "allwinner,sun4i-apb0-gates-clk" - for the APB0 gates on A10
24 "allwinner,sun5i-a13-apb0-gates-clk" - for the APB0 gates on A13
Maxime Ripard2371dd82013-07-16 11:21:59 +020025 "allwinner,sun5i-a10s-apb0-gates-clk" - for the APB0 gates on A10s
Maxime Ripard1fb2e4a2013-07-25 21:06:56 +020026 "allwinner,sun7i-a20-apb0-gates-clk" - for the APB0 gates on A20
Emilio Lópeze3276992013-03-26 23:39:17 -030027 "allwinner,sun4i-apb1-clk" - for the APB1 clock
28 "allwinner,sun4i-apb1-mux-clk" - for the APB1 clock muxing
Maxime Ripard4f985b42013-04-30 11:56:22 +020029 "allwinner,sun4i-apb1-gates-clk" - for the APB1 gates on A10
30 "allwinner,sun5i-a13-apb1-gates-clk" - for the APB1 gates on A13
Maxime Ripard2371dd82013-07-16 11:21:59 +020031 "allwinner,sun5i-a10s-apb1-gates-clk" - for the APB1 gates on A10s
Maxime Ripard6a721db2013-07-23 23:34:10 +020032 "allwinner,sun6i-a31-apb1-gates-clk" - for the APB1 gates on A31
Maxime Ripard1fb2e4a2013-07-25 21:06:56 +020033 "allwinner,sun7i-a20-apb1-gates-clk" - for the APB1 gates on A20
Maxime Ripard6a721db2013-07-23 23:34:10 +020034 "allwinner,sun6i-a31-apb2-div-clk" - for the APB2 gates on A31
35 "allwinner,sun6i-a31-apb2-gates-clk" - for the APB2 gates on A31
Emilio Lópeze874a662013-02-25 11:44:26 -030036
37Required properties for all clocks:
38- reg : shall be the control register address for the clock.
39- clocks : shall be the input parent clock(s) phandle for the clock
Emilio López13569a72013-03-27 18:20:37 -030040- #clock-cells : from common clock binding; shall be set to 0 except for
Maxime Ripard4f985b42013-04-30 11:56:22 +020041 "allwinner,*-gates-clk" where it shall be set to 1
Emilio López13569a72013-03-27 18:20:37 -030042
Maxime Ripard4f985b42013-04-30 11:56:22 +020043Additionally, "allwinner,*-gates-clk" clocks require:
Emilio López13569a72013-03-27 18:20:37 -030044- clock-output-names : the corresponding gate names that the clock controls
Emilio Lópeze874a662013-02-25 11:44:26 -030045
Maxime Ripard4f985b42013-04-30 11:56:22 +020046Clock consumers should specify the desired clocks they use with a
47"clocks" phandle cell. Consumers that are using a gated clock should
48provide an additional ID in their clock property. The values of this
49ID are documented in sunxi/<soc>-gates.txt.
50
Emilio Lópeze874a662013-02-25 11:44:26 -030051For example:
52
53osc24M: osc24M@01c20050 {
54 #clock-cells = <0>;
Emilio Lópeze3276992013-03-26 23:39:17 -030055 compatible = "allwinner,sun4i-osc-clk";
Emilio Lópeze874a662013-02-25 11:44:26 -030056 reg = <0x01c20050 0x4>;
57 clocks = <&osc24M_fixed>;
58};
59
60pll1: pll1@01c20000 {
61 #clock-cells = <0>;
Emilio Lópeze3276992013-03-26 23:39:17 -030062 compatible = "allwinner,sun4i-pll1-clk";
Emilio Lópeze874a662013-02-25 11:44:26 -030063 reg = <0x01c20000 0x4>;
64 clocks = <&osc24M>;
65};
66
67cpu: cpu@01c20054 {
68 #clock-cells = <0>;
Emilio Lópeze3276992013-03-26 23:39:17 -030069 compatible = "allwinner,sun4i-cpu-clk";
Emilio Lópeze874a662013-02-25 11:44:26 -030070 reg = <0x01c20054 0x4>;
71 clocks = <&osc32k>, <&osc24M>, <&pll1>;
72};