aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHiroshi Doyu <hdoyu@nvidia.com>2013-05-22 12:45:33 -0400
committerStephen Warren <swarren@nvidia.com>2013-05-28 18:10:53 -0400
commit9513109df85184ab5c4a20c939a0eeea92422118 (patch)
tree39b103013f030c1a4457008b1b3a5b2dd4e80f64
parentec23ad67f641b09673d337e80b7fb6afe424f621 (diff)
ARM: tegra30: create a DT header defining CLK IDs
Create a header file to define the clock IDs used by the Tegra30 clock binding. Remove the list of definitions from the binding documentation, and refer the reader to the header file. This will allow the same header to be used by both device tree files, and drivers implementing this binding, which guarantees that the two stay in sync. This also makes device trees more readable by using names instead of magic numbers. Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> [swarren, add header to clock/ instead of clk/ to match binding location] Signed-off-by: Stephen Warren <swarren@nvidia.com>
-rw-r--r--Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt211
-rw-r--r--include/dt-bindings/clock/tegra30-car.h265
2 files changed, 269 insertions, 207 deletions
diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt
index f3da3be5fcad..0f714081e986 100644
--- a/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt
+++ b/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt
@@ -12,212 +12,9 @@ Required properties :
12- clocks : Should contain phandle and clock specifiers for two clocks: 12- clocks : Should contain phandle and clock specifiers for two clocks:
13 the 32 KHz "32k_in", and the board-specific oscillator "osc". 13 the 32 KHz "32k_in", and the board-specific oscillator "osc".
14- #clock-cells : Should be 1. 14- #clock-cells : Should be 1.
15 In clock consumers, this cell represents the clock ID exposed by the CAR. 15 In clock consumers, this cell represents the clock ID exposed by the
16 16 CAR. The assignments may be found in header file
17 The first 130 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB 17 <dt-bindings/clock/tegra30-car.h>.
18 registers. These IDs often match those in the CAR's RST_DEVICES registers,
19 but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In
20 this case, those clocks are assigned IDs above 160 in order to highlight
21 this issue. Implementations that interpret these clock IDs as bit values
22 within the CLK_OUT_ENB or RST_DEVICES registers should be careful to
23 explicitly handle these special cases.
24
25 The balance of the clocks controlled by the CAR are assigned IDs of 160 and
26 above.
27
28 0 cpu
29 1 unassigned
30 2 unassigned
31 3 unassigned
32 4 rtc
33 5 timer
34 6 uarta
35 7 unassigned (register bit affects uartb and vfir)
36 8 gpio
37 9 sdmmc2
38 10 unassigned (register bit affects spdif_in and spdif_out)
39 11 i2s1
40 12 i2c1
41 13 ndflash
42 14 sdmmc1
43 15 sdmmc4
44 16 unassigned
45 17 pwm
46 18 i2s2
47 19 epp
48 20 unassigned (register bit affects vi and vi_sensor)
49 21 2d
50 22 usbd
51 23 isp
52 24 3d
53 25 unassigned
54 26 disp2
55 27 disp1
56 28 host1x
57 29 vcp
58 30 i2s0
59 31 cop_cache
60
61 32 mc
62 33 ahbdma
63 34 apbdma
64 35 unassigned
65 36 kbc
66 37 statmon
67 38 pmc
68 39 unassigned (register bit affects fuse and fuse_burn)
69 40 kfuse
70 41 sbc1
71 42 nor
72 43 unassigned
73 44 sbc2
74 45 unassigned
75 46 sbc3
76 47 i2c5
77 48 dsia
78 49 unassigned (register bit affects cve and tvo)
79 50 mipi
80 51 hdmi
81 52 csi
82 53 tvdac
83 54 i2c2
84 55 uartc
85 56 unassigned
86 57 emc
87 58 usb2
88 59 usb3
89 60 mpe
90 61 vde
91 62 bsea
92 63 bsev
93
94 64 speedo
95 65 uartd
96 66 uarte
97 67 i2c3
98 68 sbc4
99 69 sdmmc3
100 70 pcie
101 71 owr
102 72 afi
103 73 csite
104 74 pciex
105 75 avpucq
106 76 la
107 77 unassigned
108 78 unassigned
109 79 dtv
110 80 ndspeed
111 81 i2cslow
112 82 dsib
113 83 unassigned
114 84 irama
115 85 iramb
116 86 iramc
117 87 iramd
118 88 cram2
119 89 unassigned
120 90 audio_2x a/k/a audio_2x_sync_clk
121 91 unassigned
122 92 csus
123 93 cdev2
124 94 cdev1
125 95 unassigned
126
127 96 cpu_g
128 97 cpu_lp
129 98 3d2
130 99 mselect
131 100 tsensor
132 101 i2s3
133 102 i2s4
134 103 i2c4
135 104 sbc5
136 105 sbc6
137 106 d_audio
138 107 apbif
139 108 dam0
140 109 dam1
141 110 dam2
142 111 hda2codec_2x
143 112 atomics
144 113 audio0_2x
145 114 audio1_2x
146 115 audio2_2x
147 116 audio3_2x
148 117 audio4_2x
149 118 audio5_2x
150 119 actmon
151 120 extern1
152 121 extern2
153 122 extern3
154 123 sata_oob
155 124 sata
156 125 hda
157 127 se
158 128 hda2hdmi
159 129 sata_cold
160
161 160 uartb
162 161 vfir
163 162 spdif_in
164 163 spdif_out
165 164 vi
166 165 vi_sensor
167 166 fuse
168 167 fuse_burn
169 168 cve
170 169 tvo
171
172 170 clk_32k
173 171 clk_m
174 172 clk_m_div2
175 173 clk_m_div4
176 174 pll_ref
177 175 pll_c
178 176 pll_c_out1
179 177 pll_m
180 178 pll_m_out1
181 179 pll_p
182 180 pll_p_out1
183 181 pll_p_out2
184 182 pll_p_out3
185 183 pll_p_out4
186 184 pll_a
187 185 pll_a_out0
188 186 pll_d
189 187 pll_d_out0
190 188 pll_d2
191 189 pll_d2_out0
192 190 pll_u
193 191 pll_x
194 192 pll_x_out0
195 193 pll_e
196 194 spdif_in_sync
197 195 i2s0_sync
198 196 i2s1_sync
199 197 i2s2_sync
200 198 i2s3_sync
201 199 i2s4_sync
202 200 vimclk
203 201 audio0
204 202 audio1
205 203 audio2
206 204 audio3
207 205 audio4
208 206 audio5
209 207 clk_out_1 (extern1)
210 208 clk_out_2 (extern2)
211 209 clk_out_3 (extern3)
212 210 sclk
213 211 blink
214 212 cclk_g
215 213 cclk_lp
216 214 twd
217 215 cml0
218 216 cml1
219 217 hclk
220 218 pclk
221 18
222Example SoC include file: 19Example SoC include file:
223 20
@@ -229,7 +26,7 @@ Example SoC include file:
229 }; 26 };
230 27
231 usb@c5004000 { 28 usb@c5004000 {
232 clocks = <&tegra_car 58>; /* usb2 */ 29 clocks = <&tegra_car TEGRA30_CLK_USB2>;
233 }; 30 };
234}; 31};
235 32
diff --git a/include/dt-bindings/clock/tegra30-car.h b/include/dt-bindings/clock/tegra30-car.h
new file mode 100644
index 000000000000..e40fae8f9a8d
--- /dev/null
+++ b/include/dt-bindings/clock/tegra30-car.h
@@ -0,0 +1,265 @@
1/*
2 * This header provides constants for binding nvidia,tegra30-car.
3 *
4 * The first 130 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB
5 * registers. These IDs often match those in the CAR's RST_DEVICES registers,
6 * but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In
7 * this case, those clocks are assigned IDs above 160 in order to highlight
8 * this issue. Implementations that interpret these clock IDs as bit values
9 * within the CLK_OUT_ENB or RST_DEVICES registers should be careful to
10 * explicitly handle these special cases.
11 *
12 * The balance of the clocks controlled by the CAR are assigned IDs of 160 and
13 * above.
14 */
15
16#ifndef _DT_BINDINGS_CLOCK_TEGRA30_CAR_H
17#define _DT_BINDINGS_CLOCK_TEGRA30_CAR_H
18
19#define TEGRA30_CLK_CPU 0
20/* 1 */
21/* 2 */
22/* 3 */
23#define TEGRA30_CLK_RTC 4
24#define TEGRA30_CLK_TIMER 5
25#define TEGRA30_CLK_UARTA 6
26/* 7 (register bit affects uartb and vfir) */
27#define TEGRA30_CLK_GPIO 8
28#define TEGRA30_CLK_SDMMC2 9
29/* 10 (register bit affects spdif_in and spdif_out) */
30#define TEGRA30_CLK_I2S1 11
31#define TEGRA30_CLK_I2C1 12
32#define TEGRA30_CLK_NDFLASH 13
33#define TEGRA30_CLK_SDMMC1 14
34#define TEGRA30_CLK_SDMMC4 15
35/* 16 */
36#define TEGRA30_CLK_PWM 17
37#define TEGRA30_CLK_I2S2 18
38#define TEGRA30_CLK_EPP 19
39/* 20 (register bit affects vi and vi_sensor) */
40#define TEGRA30_CLK_GR2D 21
41#define TEGRA30_CLK_USBD 22
42#define TEGRA30_CLK_ISP 23
43#define TEGRA30_CLK_GR3D 24
44/* 25 */
45#define TEGRA30_CLK_DISP2 26
46#define TEGRA30_CLK_DISP1 27
47#define TEGRA30_CLK_HOST1X 28
48#define TEGRA30_CLK_VCP 29
49#define TEGRA30_CLK_I2S0 30
50#define TEGRA30_CLK_COP_CACHE 31
51
52#define TEGRA30_CLK_MC 32
53#define TEGRA30_CLK_AHBDMA 33
54#define TEGRA30_CLK_APBDMA 34
55/* 35 */
56#define TEGRA30_CLK_KBC 36
57#define TEGRA30_CLK_STATMON 37
58#define TEGRA30_CLK_PMC 38
59/* 39 (register bit affects fuse and fuse_burn) */
60#define TEGRA30_CLK_KFUSE 40
61#define TEGRA30_CLK_SBC1 41
62#define TEGRA30_CLK_NOR 42
63/* 43 */
64#define TEGRA30_CLK_SBC2 44
65/* 45 */
66#define TEGRA30_CLK_SBC3 46
67#define TEGRA30_CLK_I2C5 47
68#define TEGRA30_CLK_DSIA 48
69/* 49 (register bit affects cve and tvo) */
70#define TEGRA30_CLK_MIPI 50
71#define TEGRA30_CLK_HDMI 51
72#define TEGRA30_CLK_CSI 52
73#define TEGRA30_CLK_TVDAC 53
74#define TEGRA30_CLK_I2C2 54
75#define TEGRA30_CLK_UARTC 55
76/* 56 */
77#define TEGRA30_CLK_EMC 57
78#define TEGRA30_CLK_USB2 58
79#define TEGRA30_CLK_USB3 59
80#define TEGRA30_CLK_MPE 60
81#define TEGRA30_CLK_VDE 61
82#define TEGRA30_CLK_BSEA 62
83#define TEGRA30_CLK_BSEV 63
84
85#define TEGRA30_CLK_SPEEDO 64
86#define TEGRA30_CLK_UARTD 65
87#define TEGRA30_CLK_UARTE 66
88#define TEGRA30_CLK_I2C3 67
89#define TEGRA30_CLK_SBC4 68
90#define TEGRA30_CLK_SDMMC3 69
91#define TEGRA30_CLK_PCIE 70
92#define TEGRA30_CLK_OWR 71
93#define TEGRA30_CLK_AFI 72
94#define TEGRA30_CLK_CSITE 73
95#define TEGRA30_CLK_PCIEX 74
96#define TEGRA30_CLK_AVPUCQ 75
97#define TEGRA30_CLK_LA 76
98/* 77 */
99/* 78 */
100#define TEGRA30_CLK_DTV 79
101#define TEGRA30_CLK_NDSPEED 80
102#define TEGRA30_CLK_I2CSLOW 81
103#define TEGRA30_CLK_DSIB 82
104/* 83 */
105#define TEGRA30_CLK_IRAMA 84
106#define TEGRA30_CLK_IRAMB 85
107#define TEGRA30_CLK_IRAMC 86
108#define TEGRA30_CLK_IRAMD 87
109#define TEGRA30_CLK_CRAM2 88
110/* 89 */
111#define TEGRA30_CLK_AUDIO_2X 90 /* a/k/a audio_2x_sync_clk */
112/* 91 */
113#define TEGRA30_CLK_CSUS 92
114#define TEGRA30_CLK_CDEV2 93
115#define TEGRA30_CLK_CDEV1 94
116/* 95 */
117
118#define TEGRA30_CLK_CPU_G 96
119#define TEGRA30_CLK_CPU_LP 97
120#define TEGRA30_CLK_GR3D2 98
121#define TEGRA30_CLK_MSELECT 99
122#define TEGRA30_CLK_TSENSOR 100
123#define TEGRA30_CLK_I2S3 101
124#define TEGRA30_CLK_I2S4 102
125#define TEGRA30_CLK_I2C4 103
126#define TEGRA30_CLK_SBC5 104
127#define TEGRA30_CLK_SBC6 105
128#define TEGRA30_CLK_D_AUDIO 106
129#define TEGRA30_CLK_APBIF 107
130#define TEGRA30_CLK_DAM0 108
131#define TEGRA30_CLK_DAM1 109
132#define TEGRA30_CLK_DAM2 110
133#define TEGRA30_CLK_HDA2CODEC_2X 111
134#define TEGRA30_CLK_ATOMICS 112
135#define TEGRA30_CLK_AUDIO0_2X 113
136#define TEGRA30_CLK_AUDIO1_2X 114
137#define TEGRA30_CLK_AUDIO2_2X 115
138#define TEGRA30_CLK_AUDIO3_2X 116
139#define TEGRA30_CLK_AUDIO4_2X 117
140#define TEGRA30_CLK_SPDIF_2X 118
141#define TEGRA30_CLK_ACTMON 119
142#define TEGRA30_CLK_EXTERN1 120
143#define TEGRA30_CLK_EXTERN2 121
144#define TEGRA30_CLK_EXTERN3 122
145#define TEGRA30_CLK_SATA_OOB 123
146#define TEGRA30_CLK_SATA 124
147#define TEGRA30_CLK_HDA 125
148/* 126 */
149#define TEGRA30_CLK_SE 127
150
151#define TEGRA30_CLK_HDA2HDMI 128
152#define TEGRA30_CLK_SATA_COLD 129
153/* 130 */
154/* 131 */
155/* 132 */
156/* 133 */
157/* 134 */
158/* 135 */
159/* 136 */
160/* 137 */
161/* 138 */
162/* 139 */
163/* 140 */
164/* 141 */
165/* 142 */
166/* 143 */
167/* 144 */
168/* 145 */
169/* 146 */
170/* 147 */
171/* 148 */
172/* 149 */
173/* 150 */
174/* 151 */
175/* 152 */
176/* 153 */
177/* 154 */
178/* 155 */
179/* 156 */
180/* 157 */
181/* 158 */
182/* 159 */
183
184#define TEGRA30_CLK_UARTB 160
185#define TEGRA30_CLK_VFIR 161
186#define TEGRA30_CLK_SPDIF_IN 162
187#define TEGRA30_CLK_SPDIF_OUT 163
188#define TEGRA30_CLK_VI 164
189#define TEGRA30_CLK_VI_SENSOR 165
190#define TEGRA30_CLK_FUSE 166
191#define TEGRA30_CLK_FUSE_BURN 167
192#define TEGRA30_CLK_CVE 168
193#define TEGRA30_CLK_TVO 169
194#define TEGRA30_CLK_CLK_32K 170
195#define TEGRA30_CLK_CLK_M 171
196#define TEGRA30_CLK_CLK_M_DIV2 172
197#define TEGRA30_CLK_CLK_M_DIV4 173
198#define TEGRA30_CLK_PLL_REF 174
199#define TEGRA30_CLK_PLL_C 175
200#define TEGRA30_CLK_PLL_C_OUT1 176
201#define TEGRA30_CLK_PLL_M 177
202#define TEGRA30_CLK_PLL_M_OUT1 178
203#define TEGRA30_CLK_PLL_P 179
204#define TEGRA30_CLK_PLL_P_OUT1 180
205#define TEGRA30_CLK_PLL_P_OUT2 181
206#define TEGRA30_CLK_PLL_P_OUT3 182
207#define TEGRA30_CLK_PLL_P_OUT4 183
208#define TEGRA30_CLK_PLL_A 184
209#define TEGRA30_CLK_PLL_A_OUT0 185
210#define TEGRA30_CLK_PLL_D 186
211#define TEGRA30_CLK_PLL_D_OUT0 187
212#define TEGRA30_CLK_PLL_D2 188
213#define TEGRA30_CLK_PLL_D2_OUT0 189
214#define TEGRA30_CLK_PLL_U 190
215#define TEGRA30_CLK_PLL_X 191
216
217#define TEGRA30_CLK_PLL_X_OUT0 192
218#define TEGRA30_CLK_PLL_E 193
219#define TEGRA30_CLK_SPDIF_IN_SYNC 194
220#define TEGRA30_CLK_I2S0_SYNC 195
221#define TEGRA30_CLK_I2S1_SYNC 196
222#define TEGRA30_CLK_I2S2_SYNC 197
223#define TEGRA30_CLK_I2S3_SYNC 198
224#define TEGRA30_CLK_I2S4_SYNC 199
225#define TEGRA30_CLK_VIMCLK_SYNC 200
226#define TEGRA30_CLK_AUDIO0 201
227#define TEGRA30_CLK_AUDIO1 202
228#define TEGRA30_CLK_AUDIO2 203
229#define TEGRA30_CLK_AUDIO3 204
230#define TEGRA30_CLK_AUDIO4 205
231#define TEGRA30_CLK_SPDIF 206
232#define TEGRA30_CLK_CLK_OUT_1 207 /* (extern1) */
233#define TEGRA30_CLK_CLK_OUT_2 208 /* (extern2) */
234#define TEGRA30_CLK_CLK_OUT_3 209 /* (extern3) */
235#define TEGRA30_CLK_SCLK 210
236#define TEGRA30_CLK_BLINK 211
237#define TEGRA30_CLK_CCLK_G 212
238#define TEGRA30_CLK_CCLK_LP 213
239#define TEGRA30_CLK_TWD 214
240#define TEGRA30_CLK_CML0 215
241#define TEGRA30_CLK_CML1 216
242#define TEGRA30_CLK_HCLK 217
243#define TEGRA30_CLK_PCLK 218
244/* 219 */
245/* 220 */
246/* 221 */
247/* 222 */
248/* 223 */
249
250/* 288 */
251/* 289 */
252/* 290 */
253/* 291 */
254/* 292 */
255/* 293 */
256/* 294 */
257/* 295 */
258/* 296 */
259/* 297 */
260/* 298 */
261/* 299 */
262#define TEGRA30_CLK_CLK_OUT_1_MUX 300
263#define TEGRA30_CLK_CLK_MAX 301
264
265#endif /* _DT_BINDINGS_CLOCK_TEGRA30_CAR_H */