summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/arch-mx25/imx25-pinmux.h
blob: a4c658b41b82fa5c1cf4f94271e935ac68998a08 (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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
/*
 * iopin settings are controlled by four different sets of registers
 *	iopad mux control
 *	individual iopad setup (voltage select, pull/keep, drive strength ...)
 *	group iopad setup (same as above but for groups of signals)
 *	input select when multiple inputs are possible
 */

/*
 * software pad mux control
 */
/* SW Input On (Loopback) */
#define MX25_PIN_MUX_SION		(1 << 4)
/* MUX Mode (0-7) */
#define MX25_PIN_MUX_MODE(mode)		((mode & 0x7) << 0)
struct iomuxc_mux_ctl {
	u32 gpr1;
	u32 observe_int_mux;
	u32 pad_a10;
	u32 pad_a13;
	u32 pad_a14;
	u32 pad_a15;
	u32 pad_a16;
	u32 pad_a17;
	u32 pad_a18;
	u32 pad_a19;
	u32 pad_a20;
	u32 pad_a21;
	u32 pad_a22;
	u32 pad_a23;
	u32 pad_a24;
	u32 pad_a25;
	u32 pad_eb0;
	u32 pad_eb1;
	u32 pad_oe;
	u32 pad_cs0;
	u32 pad_cs1;
	u32 pad_cs4;
	u32 pad_cs5;
	u32 pad_nf_ce0;
	u32 pad_ecb;
	u32 pad_lba;
	u32 pad_bclk;
	u32 pad_rw;
	u32 pad_nfwe_b;
	u32 pad_nfre_b;
	u32 pad_nfale;
	u32 pad_nfcle;
	u32 pad_nfwp_b;
	u32 pad_nfrb;
	u32 pad_d15;
	u32 pad_d14;
	u32 pad_d13;
	u32 pad_d12;
	u32 pad_d11;
	u32 pad_d10;
	u32 pad_d9;
	u32 pad_d8;
	u32 pad_d7;
	u32 pad_d6;
	u32 pad_d5;
	u32 pad_d4;
	u32 pad_d3;
	u32 pad_d2;
	u32 pad_d1;
	u32 pad_d0;
	u32 pad_ld0;
	u32 pad_ld1;
	u32 pad_ld2;
	u32 pad_ld3;
	u32 pad_ld4;
	u32 pad_ld5;
	u32 pad_ld6;
	u32 pad_ld7;
	u32 pad_ld8;
	u32 pad_ld9;
	u32 pad_ld10;
	u32 pad_ld11;
	u32 pad_ld12;
	u32 pad_ld13;
	u32 pad_ld14;
	u32 pad_ld15;
	u32 pad_hsync;
	u32 pad_vsync;
	u32 pad_lsclk;
	u32 pad_oe_acd;
	u32 pad_contrast;
	u32 pad_pwm;
	u32 pad_csi_d2;
	u32 pad_csi_d3;
	u32 pad_csi_d4;
	u32 pad_csi_d5;
	u32 pad_csi_d6;
	u32 pad_csi_d7;
	u32 pad_csi_d8;
	u32 pad_csi_d9;
	u32 pad_csi_mclk;
	u32 pad_csi_vsync;
	u32 pad_csi_hsync;
	u32 pad_csi_pixclk;
	u32 pad_i2c1_clk;
	u32 pad_i2c1_dat;
	u32 pad_cspi1_mosi;
	u32 pad_cspi1_miso;
	u32 pad_cspi1_ss0;
	u32 pad_cspi1_ss1;
	u32 pad_cspi1_sclk;
	u32 pad_cspi1_rdy;
	u32 pad_uart1_rxd;
	u32 pad_uart1_txd;
	u32 pad_uart1_rts;
	u32 pad_uart1_cts;
	u32 pad_uart2_rxd;
	u32 pad_uart2_txd;
	u32 pad_uart2_rts;
	u32 pad_uart2_cts;
	u32 pad_sd1_cmd;
	u32 pad_sd1_clk;
	u32 pad_sd1_data0;
	u32 pad_sd1_data1;
	u32 pad_sd1_data2;
	u32 pad_sd1_data3;
	u32 pad_kpp_row0;
	u32 pad_kpp_row1;
	u32 pad_kpp_row2;
	u32 pad_kpp_row3;
	u32 pad_kpp_col0;
	u32 pad_kpp_col1;
	u32 pad_kpp_col2;
	u32 pad_kpp_col3;
	u32 pad_fec_mdc;
	u32 pad_fec_mdio;
	u32 pad_fec_tdata0;
	u32 pad_fec_tdata1;
	u32 pad_fec_tx_en;
	u32 pad_fec_rdata0;
	u32 pad_fec_rdata1;
	u32 pad_fec_rx_dv;
	u32 pad_fec_tx_clk;
	u32 pad_rtck;
	u32 pad_de_b;
	u32 pad_gpio_a;
	u32 pad_gpio_b;
	u32 pad_gpio_c;
	u32 pad_gpio_d;
	u32 pad_gpio_e;
	u32 pad_gpio_f;
	u32 pad_ext_armclk;
	u32 pad_upll_bypclk;
	u32 pad_vstby_req;
	u32 pad_vstby_ack;
	u32 pad_power_fail;
	u32 pad_clko;
	u32 pad_boot_mode0;
	u32 pad_boot_mode1;
};

/*
 * software pad control
 */
/* Select 3.3 or 1.8 volts */
#define MX25_PIN_PAD_CTL_DVS_33			(0 << 13)
#define MX25_PIN_PAD_CTL_DVS_18			(1 << 13)
/* Enable hysteresis */
#define MX25_PIN_PAD_CTL_HYS			(1 << 8)
/* Enable pull/keeper */
#define MX25_PIN_PAD_CTL_PKE			(1 << 7)
/* 0 - keeper / 1 - pull */
#define MX25_PIN_PAD_CTL_PUE			(1 << 6)
/* pull up/down strength */
#define MX25_PIN_PAD_CTL_100K_PD		(0 << 4)
#define MX25_PIN_PAD_CTL_47K_PU			(1 << 4)
#define MX25_PIN_PAD_CTL_100K_PU		(2 << 4)
#define MX25_PIN_PAD_CTL_22K_PU			(3 << 4)
/* open drain control */
#define MX25_PIN_PAD_CTL_OD			(1 << 3)
/* drive strength */
#define MX25_PIN_PAD_CTL_DS_NOM			(0 << 1)
#define MX25_PIN_PAD_CTL_DS_HIGH		(1 << 1)
#define MX25_PIN_PAD_CTL_DS_MAX			(2 << 1)
#define MX25_PIN_PAD_CTL_DS_MAX11		(3 << 1)
/* slew rate */
#define MX25_PIN_PAD_CTL_SRE_SLOW		(0 << 0)
#define MX25_PIN_PAD_CTL_SRE_FAST		(1 << 0)
struct  iomuxc_pad_ctl {
	u32 pad_a13;
	u32 pad_a14;
	u32 pad_a15;
	u32 pad_a17;
	u32 pad_a18;
	u32 pad_a19;
	u32 pad_a20;
	u32 pad_a21;
	u32 pad_a23;
	u32 pad_a24;
	u32 pad_a25;
	u32 pad_eb0;
	u32 pad_eb1;
	u32 pad_oe;
	u32 pad_cs4;
	u32 pad_cs5;
	u32 pad_nf_ce0;
	u32 pad_ecb;
	u32 pad_lba;
	u32 pad_rw;
	u32 pad_nfrb;
	u32 pad_d15;
	u32 pad_d14;
	u32 pad_d13;
	u32 pad_d12;
	u32 pad_d11;
	u32 pad_d10;
	u32 pad_d9;
	u32 pad_d8;
	u32 pad_d7;
	u32 pad_d6;
	u32 pad_d5;
	u32 pad_d4;
	u32 pad_d3;
	u32 pad_d2;
	u32 pad_d1;
	u32 pad_d0;
	u32 pad_ld0;
	u32 pad_ld1;
	u32 pad_ld2;
	u32 pad_ld3;
	u32 pad_ld4;
	u32 pad_ld5;
	u32 pad_ld6;
	u32 pad_ld7;
	u32 pad_ld8;
	u32 pad_ld9;
	u32 pad_ld10;
	u32 pad_ld11;
	u32 pad_ld12;
	u32 pad_ld13;
	u32 pad_ld14;
	u32 pad_ld15;
	u32 pad_hsync;
	u32 pad_vsync;
	u32 pad_lsclk;
	u32 pad_oe_acd;
	u32 pad_contrast;
	u32 pad_pwm;
	u32 pad_csi_d2;
	u32 pad_csi_d3;
	u32 pad_csi_d4;
	u32 pad_csi_d5;
	u32 pad_csi_d6;
	u32 pad_csi_d7;
	u32 pad_csi_d8;
	u32 pad_csi_d9;
	u32 pad_csi_mclk;
	u32 pad_csi_vsync;
	u32 pad_csi_hsync;
	u32 pad_csi_pixclk;
	u32 pad_i2c1_clk;
	u32 pad_i2c1_dat;
	u32 pad_cspi1_mosi;
	u32 pad_cspi1_miso;
	u32 pad_cspi1_ss0;
	u32 pad_cspi1_ss1;
	u32 pad_cspi1_sclk;
	u32 pad_cspi1_rdy;
	u32 pad_uart1_rxd;
	u32 pad_uart1_txd;
	u32 pad_uart1_rts;
	u32 pad_uart1_cts;
	u32 pad_uart2_rxd;
	u32 pad_uart2_txd;
	u32 pad_uart2_rts;
	u32 pad_uart2_cts;
	u32 pad_sd1_cmd;
	u32 pad_sd1_clk;
	u32 pad_sd1_data0;
	u32 pad_sd1_data1;
	u32 pad_sd1_data2;
	u32 pad_sd1_data3;
	u32 pad_kpp_row0;
	u32 pad_kpp_row1;
	u32 pad_kpp_row2;
	u32 pad_kpp_row3;
	u32 pad_kpp_col0;
	u32 pad_kpp_col1;
	u32 pad_kpp_col2;
	u32 pad_kpp_col3;
	u32 pad_fec_mdc;
	u32 pad_fec_mdio;
	u32 pad_fec_tdata0;
	u32 pad_fec_tdata1;
	u32 pad_fec_tx_en;
	u32 pad_fec_rdata0;
	u32 pad_fec_rdata1;
	u32 pad_fec_rx_dv;
	u32 pad_fec_tx_clk;
	u32 pad_rtck;
	u32 pad_tdo;
	u32 pad_de_b;
	u32 pad_gpio_a;
	u32 pad_gpio_b;
	u32 pad_gpio_c;
	u32 pad_gpio_d;
	u32 pad_gpio_e;
	u32 pad_gpio_f;
	u32 pad_vstby_req;
	u32 pad_vstby_ack;
	u32 pad_power_fail;
	u32 pad_clko;
};


/*
 * Pad group drive strength and voltage select
 * Same fields as iomuxc_pad_ctl plus ddr type
 */
/* Select DDR type */
#define MX25_PIN_PAD_CTL_DDR_18			(0 << 11)
#define MX25_PIN_PAD_CTL_DDR_33			(1 << 11)
#define MX25_PIN_PAD_CTL_DDR_MAX		(2 << 11)
struct iomuxc_pad_grp_ctl {
	u32 grp_dvs_misc;
	u32 grp_dse_fec;
	u32 grp_dvs_jtag;
	u32 grp_dse_nfc;
	u32 grp_dse_csi;
	u32 grp_dse_weim;
	u32 grp_dse_ddr;
	u32 grp_dvs_crm;
	u32 grp_dse_kpp;
	u32 grp_dse_sdhc1;
	u32 grp_dse_lcd;
	u32 grp_dse_uart;
	u32 grp_dvs_nfc;
	u32 grp_dvs_csi;
	u32 grp_dse_cspi1;
	u32 grp_ddrtype;
	u32 grp_dvs_sdhc1;
	u32 grp_dvs_lcd;
};

/*
 * Pad input select control
 * Select which pad to connect to an input port
 * where multiple pads can function as given input
 */
#define MX25_PAD_INPUT_SELECT_DAISY(in)		((in & 0x7) << 0)
struct iomuxc_pad_input_select {
	u32 audmux_p4_input_da_amx;
	u32 audmux_p4_input_db_amx;
	u32 audmux_p4_input_rxclk_amx;
	u32 audmux_p4_input_rxfs_amx;
	u32 audmux_p4_input_txclk_amx;
	u32 audmux_p4_input_txfs_amx;
	u32 audmux_p7_input_da_amx;
	u32 audmux_p7_input_txfs_amx;
	u32 can1_ipp_ind_canrx;
	u32 can2_ipp_ind_canrx;
	u32 csi_ipp_csi_d_0;
	u32 csi_ipp_csi_d_1;
	u32 cspi1_ipp_ind_ss3_b;
	u32 cspi2_ipp_cspi_clk_in;
	u32 cspi2_ipp_ind_dataready_b;
	u32 cspi2_ipp_ind_miso;
	u32 cspi2_ipp_ind_mosi;
	u32 cspi2_ipp_ind_ss0_b;
	u32 cspi2_ipp_ind_ss1_b;
	u32 cspi3_ipp_cspi_clk_in;
	u32 cspi3_ipp_ind_dataready_b;
	u32 cspi3_ipp_ind_miso;
	u32 cspi3_ipp_ind_mosi;
	u32 cspi3_ipp_ind_ss0_b;
	u32 cspi3_ipp_ind_ss1_b;
	u32 cspi3_ipp_ind_ss2_b;
	u32 cspi3_ipp_ind_ss3_b;
	u32 esdhc1_ipp_dat4_in;
	u32 esdhc1_ipp_dat5_in;
	u32 esdhc1_ipp_dat6_in;
	u32 esdhc1_ipp_dat7_in;
	u32 esdhc2_ipp_card_clk_in;
	u32 esdhc2_ipp_cmd_in;
	u32 esdhc2_ipp_dat0_in;
	u32 esdhc2_ipp_dat1_in;
	u32 esdhc2_ipp_dat2_in;
	u32 esdhc2_ipp_dat3_in;
	u32 esdhc2_ipp_dat4_in;
	u32 esdhc2_ipp_dat5_in;
	u32 esdhc2_ipp_dat6_in;
	u32 esdhc2_ipp_dat7_in;
	u32 fec_fec_col;
	u32 fec_fec_crs;
	u32 fec_fec_rdata_2;
	u32 fec_fec_rdata_3;
	u32 fec_fec_rx_clk;
	u32 fec_fec_rx_er;
	u32 i2c2_ipp_scl_in;
	u32 i2c2_ipp_sda_in;
	u32 i2c3_ipp_scl_in;
	u32 i2c3_ipp_sda_in;
	u32 kpp_ipp_ind_col_4;
	u32 kpp_ipp_ind_col_5;
	u32 kpp_ipp_ind_col_6;
	u32 kpp_ipp_ind_col_7;
	u32 kpp_ipp_ind_row_4;
	u32 kpp_ipp_ind_row_5;
	u32 kpp_ipp_ind_row_6;
	u32 kpp_ipp_ind_row_7;
	u32 sim1_pin_sim_rcvd1_in;
	u32 sim1_pin_sim_simpd1;
	u32 sim1_sim_rcvd1_io;
	u32 sim2_pin_sim_rcvd1_in;
	u32 sim2_pin_sim_simpd1;
	u32 sim2_sim_rcvd1_io;
	u32 uart3_ipp_uart_rts_b;
	u32 uart3_ipp_uart_rxd_mux;
	u32 uart4_ipp_uart_rts_b;
	u32 uart4_ipp_uart_rxd_mux;
	u32 uart5_ipp_uart_rts_b;
	u32 uart5_ipp_uart_rxd_mux;
	u32 usb_top_ipp_ind_otg_usb_oc;
	u32 usb_top_ipp_ind_uh2_usb_oc;
};