summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/clock/sunxi.txt
blob: 729f52426fe1b16c969ea36a767db802e6a03f99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
Device Tree Clock bindings for arch-sunxi

This binding uses the common clock binding[1].

[1] Documentation/devicetree/bindings/clock/clock-bindings.txt

Required properties:
- compatible : shall be one of the following:
	"allwinner,sun4i-osc-clk" - for a gatable oscillator
	"allwinner,sun4i-pll1-clk" - for the main PLL clock
	"allwinner,sun4i-cpu-clk" - for the CPU multiplexer clock
	"allwinner,sun4i-axi-clk" - for the AXI clock
	"allwinner,sun4i-axi-gates-clk" - for the AXI gates
	"allwinner,sun4i-ahb-clk" - for the AHB clock
	"allwinner,sun4i-ahb-gates-clk" - for the AHB gates
	"allwinner,sun4i-apb0-clk" - for the APB0 clock
	"allwinner,sun4i-apb0-gates-clk" - for the APB0 gates
	"allwinner,sun4i-apb1-clk" - for the APB1 clock
	"allwinner,sun4i-apb1-mux-clk" - for the APB1 clock muxing
	"allwinner,sun4i-apb1-gates-clk" - for the APB1 gates

Required properties for all clocks:
- reg : shall be the control register address for the clock.
- clocks : shall be the input parent clock(s) phandle for the clock
- #clock-cells : from common clock binding; shall be set to 0 except for
	"allwinner,sun4i-*-gates-clk" where it shall be set to 1

Additionally, "allwinner,sun4i-*-gates-clk" clocks require:
- clock-output-names : the corresponding gate names that the clock controls

For example:

osc24M: osc24M@01c20050 {
	#clock-cells = <0>;
	compatible = "allwinner,sun4i-osc-clk";
	reg = <0x01c20050 0x4>;
	clocks = <&osc24M_fixed>;
};

pll1: pll1@01c20000 {
	#clock-cells = <0>;
	compatible = "allwinner,sun4i-pll1-clk";
	reg = <0x01c20000 0x4>;
	clocks = <&osc24M>;
};

cpu: cpu@01c20054 {
	#clock-cells = <0>;
	compatible = "allwinner,sun4i-cpu-clk";
	reg = <0x01c20054 0x4>;
	clocks = <&osc32k>, <&osc24M>, <&pll1>;
};



Gate clock outputs

The "allwinner,sun4i-*-gates-clk" clocks provide several gatable outputs;
their corresponding offsets as present on sun4i are listed below. Note that
some of these gates are not present on sun5i.

  * AXI gates ("allwinner,sun4i-axi-gates-clk")

    DRAM                                                                0

  * AHB gates ("allwinner,sun4i-ahb-gates-clk")

    USB0                                                                0
    EHCI0                                                               1
    OHCI0                                                               2*
    EHCI1                                                               3
    OHCI1                                                               4*
    SS                                                                  5
    DMA                                                                 6
    BIST                                                                7
    MMC0                                                                8
    MMC1                                                                9
    MMC2                                                                10
    MMC3                                                                11
    MS                                                                  12**
    NAND                                                                13
    SDRAM                                                               14

    ACE                                                                 16
    EMAC                                                                17
    TS                                                                  18

    SPI0                                                                20
    SPI1                                                                21
    SPI2                                                                22
    SPI3                                                                23
    PATA                                                                24
    SATA                                                                25**
    GPS                                                                 26*

    VE                                                                  32
    TVD                                                                 33
    TVE0                                                                34
    TVE1                                                                35
    LCD0                                                                36
    LCD1                                                                37

    CSI0                                                                40
    CSI1                                                                41

    HDMI                                                                43
    DE_BE0                                                              44
    DE_BE1                                                              45
    DE_FE0                                                              46
    DE_FE1                                                              47

    MP                                                                  50

    MALI400                                                             52

  * APB0 gates ("allwinner,sun4i-apb0-gates-clk")

    CODEC                                                               0
    SPDIF                                                               1*
    AC97                                                                2
    IIS                                                                 3

    PIO                                                                 5
    IR0                                                                 6
    IR1                                                                 7

    KEYPAD                                                              10

  * APB1 gates ("allwinner,sun4i-apb1-gates-clk")

    I2C0                                                                0
    I2C1                                                                1
    I2C2                                                                2

    CAN                                                                 4
    SCR                                                                 5
    PS20                                                                6
    PS21                                                                7

    UART0                                                               16
    UART1                                                               17
    UART2                                                               18
    UART3                                                               19
    UART4                                                               20
    UART5                                                               21
    UART6                                                               22
    UART7                                                               23

Notation:
 [*]:  The datasheet didn't mention these, but they are present on AW code
 [**]: The datasheet had this marked as "NC" but they are used on AW code