Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sh7372.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 Renesas Solutions Corp.
3  *
4  * Kuninori Morimoto <[email protected]>
5  *
6  * This file is subject to the terms and conditions of the GNU General Public
7  * License. See the file "COPYING" in the main directory of this archive
8  * for more details.
9  */
10 
11 #ifndef __ASM_SH7372_H__
12 #define __ASM_SH7372_H__
13 
14 #include <linux/sh_clk.h>
15 #include <linux/pm_domain.h>
16 #include <mach/pm-rmobile.h>
17 
18 /*
19  * Pin Function Controller:
20  * GPIO_FN_xx - GPIO used to select pin function
21  * GPIO_PORTxx - GPIO mapped to real I/O pin on CPU
22  */
23 enum {
24  /* PORT */
27 
30 
33 
36 
39 
42 
45 
48 
51 
54 
57 
60 
63 
66 
69 
72 
75 
78 
81 
83 
84  /* IRQ */
85  GPIO_FN_IRQ0_6, /* PORT 6 */
86  GPIO_FN_IRQ0_162, /* PORT 162 */
87  GPIO_FN_IRQ1, /* PORT 12 */
88  GPIO_FN_IRQ2_4, /* PORT 4 */
89  GPIO_FN_IRQ2_5, /* PORT 5 */
90  GPIO_FN_IRQ3_8, /* PORT 8 */
91  GPIO_FN_IRQ3_16, /* PORT 16 */
92  GPIO_FN_IRQ4_17, /* PORT 17 */
93  GPIO_FN_IRQ4_163, /* PORT 163 */
94  GPIO_FN_IRQ5, /* PORT 18 */
95  GPIO_FN_IRQ6_39, /* PORT 39 */
96  GPIO_FN_IRQ6_164, /* PORT 164 */
97  GPIO_FN_IRQ7_40, /* PORT 40 */
98  GPIO_FN_IRQ7_167, /* PORT 167 */
99  GPIO_FN_IRQ8_41, /* PORT 41 */
100  GPIO_FN_IRQ8_168, /* PORT 168 */
101  GPIO_FN_IRQ9_42, /* PORT 42 */
102  GPIO_FN_IRQ9_169, /* PORT 169 */
103  GPIO_FN_IRQ10, /* PORT 65 */
104  GPIO_FN_IRQ11, /* PORT 67 */
105  GPIO_FN_IRQ12_80, /* PORT 80 */
106  GPIO_FN_IRQ12_137, /* PORT 137 */
107  GPIO_FN_IRQ13_81, /* PORT 81 */
108  GPIO_FN_IRQ13_145, /* PORT 145 */
109  GPIO_FN_IRQ14_82, /* PORT 82 */
110  GPIO_FN_IRQ14_146, /* PORT 146 */
111  GPIO_FN_IRQ15_83, /* PORT 83 */
112  GPIO_FN_IRQ15_147, /* PORT 147 */
113  GPIO_FN_IRQ16_84, /* PORT 84 */
114  GPIO_FN_IRQ16_170, /* PORT 170 */
115  GPIO_FN_IRQ17, /* PORT 85 */
116  GPIO_FN_IRQ18, /* PORT 86 */
117  GPIO_FN_IRQ19, /* PORT 87 */
118  GPIO_FN_IRQ20, /* PORT 92 */
119  GPIO_FN_IRQ21, /* PORT 93 */
120  GPIO_FN_IRQ22, /* PORT 94 */
121  GPIO_FN_IRQ23, /* PORT 95 */
122  GPIO_FN_IRQ24, /* PORT 112 */
123  GPIO_FN_IRQ25, /* PORT 119 */
124  GPIO_FN_IRQ26_121, /* PORT 121 */
125  GPIO_FN_IRQ26_172, /* PORT 172 */
126  GPIO_FN_IRQ27_122, /* PORT 122 */
127  GPIO_FN_IRQ27_180, /* PORT 180 */
128  GPIO_FN_IRQ28_123, /* PORT 123 */
129  GPIO_FN_IRQ28_181, /* PORT 181 */
130  GPIO_FN_IRQ29_129, /* PORT 129 */
131  GPIO_FN_IRQ29_182, /* PORT 182 */
132  GPIO_FN_IRQ30_130, /* PORT 130 */
133  GPIO_FN_IRQ30_183, /* PORT 183 */
134  GPIO_FN_IRQ31_138, /* PORT 138 */
135  GPIO_FN_IRQ31_184, /* PORT 184 */
136 
137  /*
138  * MSIOF0 (PORT 36, 37, 38, 39
139  * 40, 41, 42, 43, 44, 45)
140  */
146 
147  /*
148  * MSIOF1 (PORT 39, 40, 41, 42, 43, 44
149  * 84, 85, 86, 87, 88, 89, 90, 91, 92, 93)
150  */
159 
160  /*
161  * MSIOF2 (PORT 134, 135, 136, 137, 138, 139
162  * 148, 149, 150, 151)
163  */
169 
170  /* MSIOF3 (PORT 76, 77, 78, 79, 80, 81, 82, 83) */
175 
176  /* MSIOF4 (PORT 0, 1, 2, 3) */
179 
180  /* FSI (PORT 4, 5, 6, 7, 8, 9, 10, 11, 15) */
187 
188  /* FMSI (PORT 12, 13, 14, 15, 16, 17, 18, 65) */
195 
196  /* SCIFA0 (PORT 152, 153, 156, 157, 158) */
200 
201  /* SCIFA1 (PORT 154, 155, 159, 160, 161) */
205 
206  /* SCIFA2 (PORT 94, 95, 96, 97, 98) */
210 
211  /* SCIFA3 (PORT 43, 44,
212  140, 141, 142, 143, 144) */
217 
218  /* SCIFA4 (PORT 5, 6) */
220 
221  /* SCIFA5 (PORT 8, 12) */
223 
224  /* SCIFB (PORT 162, 163, 164, 165, 166) */
228 
229  /*
230  * CEU (PORT 16, 17,
231  * 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
232  * 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
233  * 120)
234  */
244 
245  /* USB0 (PORT 113, 114, 115, 116, 117, 167) */
249 
250  /* USB1 (PORT 18, 113, 114, 115, 116, 117, 138, 162, 168) */
256 
257  /* GPIO (PORT 41, 42, 43, 44) */
259 
260  /*
261  * BSC (PORT 19,
262  * 20, 21, 22, 25, 26, 27, 28, 29,
263  * 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
264  * 40, 41, 42, 43, 44, 45,
265  * 62, 63, 64, 65, 66, 67,
266  * 71, 72, 74, 75)
267  */
270 
278 
281 
282  /*
283  * BSC/FLCTL (PORT 23, 24,
284  * 46, 47, 48, 49,
285  * 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
286  * 60, 61, 69, 70)
287  */
296 
297  /*
298  * MMCIF(1) (PORT 84, 85, 86, 87, 88, 89,
299  * 90, 91, 92, 99)
300  */
305 
306  /* MMCIF(2) (PORT 54, 55, 56, 57, 58, 59, 60, 61, 66, 67) */
311 
312  /* SPU2 (PORT 65) */
314 
315  /* FLCTL (PORT 66, 68, 73) */
317 
318  /* HSI (PORT 76, 77, 78, 79, 80, 81, 82, 83) */
322 
323  /*
324  * MFI (PORT 76, 77, 78, 79,
325  * 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
326  * 90, 91, 92, 93, 94, 95, 96, 97, 98, 99)
327  */
328  GPIO_FN_MFIv6, /* see MSEL4CR 6 */
329  GPIO_FN_MFIv4, /* see MSEL4CR 6 */
330 
335 
342 
343  /* SIM (PORT 94, 95, 98) */
345 
346  /* TPU (PORT 93, 99, 112, 160, 161) */
350 
351  /* I2C2 (PORT 110, 111) */
353 
354  /* I2C3(1) (PORT 114, 115) */
356 
357  /* I2C3(2) (PORT 137, 145) */
359 
360  /* I2C4(2) (PORT 116, 117) */
362 
363  /* I2C4(2) (PORT 146, 147) */
365 
366  /*
367  * KEYSC (PORT 121, 122, 123, 124, 125, 126, 127, 128, 129,
368  * 130, 131, 132, 133, 134, 135, 136)
369  */
378 
379  /*
380  * LCDC (PORT 121, 122, 123, 124, 125, 126, 127, 128, 129,
381  * 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
382  * 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
383  * 150, 151)
384  */
385  GPIO_FN_LCDC0_SELECT, /* LCDC 0 */
386  GPIO_FN_LCDC1_SELECT, /* LCDC 1 */
391 
398 
399  /* IRDA (PORT 139, 140, 141, 142) */
402 
403  /* TSIF1 (PORT 156, 157, 158, 159) */
404  GPIO_FN_TS0_1SELECT, /* TSIF0 - 1 select */
405  GPIO_FN_TS0_2SELECT, /* TSIF0 - 2 select */
406  GPIO_FN_TS1_1SELECT, /* TSIF1 - 1 select */
407  GPIO_FN_TS1_2SELECT, /* TSIF1 - 2 select */
408 
411 
412  /* TSIF2 (PORT 137, 145, 146, 147) */
415 
416  /* HDMI (PORT 169, 170) */
418 
419  /* SDHI0 (PORT 171, 172, 173, 174, 175, 176, 177, 178) */
424 
425  /* SDHI1 (PORT 179, 180, 181, 182, 183, 184) */
428 
429  /* SDHI2 (PORT 185, 186, 187, 188, 189, 190) */
432 
433  /* SDENC see MSEL4CR 19 */
436 };
437 
438 /* DMA slave IDs */
439 enum {
469 };
470 
471 extern struct clk sh7372_extal1_clk;
472 extern struct clk sh7372_extal2_clk;
473 extern struct clk sh7372_dv_clki_clk;
474 extern struct clk sh7372_dv_clki_div2_clk;
475 extern struct clk sh7372_pllc2_clk;
476 extern struct clk sh7372_fsiack_clk;
477 extern struct clk sh7372_fsibck_clk;
478 extern struct clk sh7372_fsidiva_clk;
479 extern struct clk sh7372_fsidivb_clk;
480 
481 extern void sh7372_intcs_suspend(void);
482 extern void sh7372_intcs_resume(void);
483 extern void sh7372_intca_suspend(void);
484 extern void sh7372_intca_resume(void);
485 
486 #ifdef CONFIG_PM
487 extern void __init sh7372_init_pm_domains(void);
488 #else
489 static inline void sh7372_init_pm_domains(void) {}
490 #endif
491 
492 extern void __init sh7372_pm_init_late(void);
493 
494 #endif /* __ASM_SH7372_H__ */