Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
r8a7740.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2011 Renesas Solutions Corp.
3  * Copyright (C) 2011 Kuninori Morimoto <[email protected]>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; version 2 of the License.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #ifndef __ASM_R8A7740_H__
20 #define __ASM_R8A7740_H__
21 
22 #include <mach/pm-rmobile.h>
23 
24 /*
25  * MD_CKx pin
26  */
27 #define MD_CK2 (1 << 2)
28 #define MD_CK1 (1 << 1)
29 #define MD_CK0 (1 << 0)
30 
31 /*
32  * Pin Function Controller:
33  * GPIO_FN_xx - GPIO used to select pin function
34  * GPIO_PORTxx - GPIO mapped to real I/O pin on CPU
35  */
36 enum {
37  /* PORT */
40 
43 
46 
49 
52 
55 
58 
61 
64 
67 
70 
73 
76 
79 
82 
85 
88 
91 
94 
97 
100 
102 
103  /* IRQ */
136 
137  /* Function */
138 
139  /* DBGT */
143 
144  /* FSI-A */
145  GPIO_FN_FSIAISLD_PORT0, /* FSIAISLD Port 0/5 */
147  GPIO_FN_FSIASPDIF_PORT9, /* FSIASPDIF Port 9/18 */
154 
155  /* FSI-B */
157 
158  /* FMSI */
159  GPIO_FN_FMSISLD_PORT1, /* FMSISLD Port 1/6 */
167 
168  /* SCIFA0 */
172 
173  /* SCIFA1 */
177 
178  /* SCIFA2 */
179  GPIO_FN_SCIFA2_SCK_PORT22, /* SCIFA2_SCK Port 22/199 */
183 
184  /* SCIFA3 */
185  GPIO_FN_SCIFA3_RTS_PORT105, /* MSEL5CR_8_0 */
190 
191  GPIO_FN_SCIFA3_RTS_PORT161, /* MSEL5CR_8_1 */
196 
197  /* SCIFA4 */
198  GPIO_FN_SCIFA4_RXD_PORT12, /* MSEL5CR[12:11] = 00 */
200 
201  GPIO_FN_SCIFA4_RXD_PORT204, /* MSEL5CR[12:11] = 01 */
203 
204  GPIO_FN_SCIFA4_RXD_PORT94, /* MSEL5CR[12:11] = 10 */
206 
207  GPIO_FN_SCIFA4_SCK_PORT21, /* SCIFA4_SCK Port 21/205 */
209 
210  /* SCIFA5 */
211  GPIO_FN_SCIFA5_TXD_PORT20, /* MSEL5CR[15:14] = 00 */
213 
214  GPIO_FN_SCIFA5_RXD_PORT207, /* MSEL5CR[15:14] = 01 */
216 
217  GPIO_FN_SCIFA5_TXD_PORT91, /* MSEL5CR[15:14] = 10 */
219 
220  GPIO_FN_SCIFA5_SCK_PORT23, /* SCIFA5_SCK Port 23/206 */
222 
223  /* SCIFA6 */
225 
226  /* SCIFA7 */
228 
229  /* SCIFAB */
230  GPIO_FN_SCIFB_SCK_PORT190, /* MSEL5CR_17_0 */
235 
236  GPIO_FN_SCIFB_SCK_PORT2, /* MSEL5CR_17_1 */
241 
242  /* LCD0 */
251 
254 
257 
261  GPIO_FN_LCD0_LCLK_PORT165, /* MSEL5CR_6_1 */
262 
266  GPIO_FN_LCD0_LCLK_PORT102, /* MSEL5CR_6_0 */
267 
268  /* LCD1 */
280 
283 
286 
287  /* RSPI */
292 
293  /* VIO CKO */
298 
299  /* VIO0 */
306 
307  GPIO_FN_VIO0_D13_PORT26, /* MSEL5CR_27_0 */
310 
311  GPIO_FN_VIO0_D13_PORT22, /* MSEL5CR_27_1 */
314 
315  /* VIO1 */
320 
321  /* TPU0 */
324  GPIO_FN_TPU0TO2_PORT66, /* TPU0TO2 Port 66/202 */
326 
327  /* SSP1 0 */
332 
333  /* SSP1 1 */
337 
338  GPIO_FN_STP1_IPD0_PORT186, /* MSEL5CR_23_0 */
340 
341  GPIO_FN_STP1_IPD0_PORT194, /* MSEL5CR_23_1 */
343 
344  /* SIM */
346  GPIO_FN_SIM_D_PORT22, /* SIM_D Port 22/199 */
348 
349  /* SDHI0 */
353 
354  /* SDHI1 */
358 
359  /* SDHI2 */
362 
363  GPIO_FN_SDHI2_CD_PORT24, /* MSEL5CR_19_0 */
365 
366  GPIO_FN_SDHI2_WP_PORT177, /* MSEL5CR_19_1 */
368 
369  /* MSIOF2 */
374 
375  /* KEYSC */
381 
382  GPIO_FN_KEYIN0_PORT43, /* MSEL4CR_18_0 */
386 
387  GPIO_FN_KEYIN0_PORT58, /* MSEL4CR_18_1 */
391 
392  /* VOU */
400 
401  /* MEMC */
409 
410  GPIO_FN_MEMC_CS1, /* MSEL4CR_6_0 */
414 
415  GPIO_FN_MEMC_A1, /* MSEL4CR_6_1 */
419 
420  /* MMC */
426  GPIO_FN_MMC0_CMD_PORT67, /* MSEL4CR_15_0 */
427 
433  GPIO_FN_MMC1_CMD_PORT104, /* MSEL4CR_15_1 */
434 
435  /* MSIOF0 */
441 
442  /* MSIOF1 */
445 
449  GPIO_FN_MSIOF1_TSCK_PORT121, /* MSEL4CR_10_0 */
450 
454  GPIO_FN_MSIOF1_SS2_PORT202, /* MSEL4CR_10_1 */
455 
456  /* GPIO */
459 
460  /* USB0 */
462 
463  /* USB1 */
465 
466  /* BBIF1 */
470 
471  /* BBIF2 */
472  GPIO_FN_BBIF2_TXD2_PORT5, /* MSEL5CR_0_0 */
476 
477  GPIO_FN_BBIF2_RXD2_PORT90, /* MSEL5CR_0_1 */
481 
482  /* BSC / FLCTL / PCMCIA */
485  GPIO_FN_CS5A_PORT105, /* CS5A PORT 19/105 */
487  GPIO_FN_IOIS16, /* ? */
488 
490  GPIO_FN_A4_FOE, /* share with FLCTL */
491  GPIO_FN_A5_FCDE, /* share with FLCTL */
498 
499  GPIO_FN_D0_NAF0, GPIO_FN_D1_NAF1, /* share with FLCTL */
500  GPIO_FN_D2_NAF2, GPIO_FN_D3_NAF3, /* share with FLCTL */
501  GPIO_FN_D4_NAF4, GPIO_FN_D5_NAF5, /* share with FLCTL */
502  GPIO_FN_D6_NAF6, GPIO_FN_D7_NAF7, /* share with FLCTL */
503  GPIO_FN_D8_NAF8, GPIO_FN_D9_NAF9, /* share with FLCTL */
504  GPIO_FN_D10_NAF10, GPIO_FN_D11_NAF11, /* share with FLCTL */
505  GPIO_FN_D12_NAF12, GPIO_FN_D13_NAF13, /* share with FLCTL */
506  GPIO_FN_D14_NAF14, GPIO_FN_D15_NAF15, /* share with FLCTL */
507 
512 
513  GPIO_FN_WE0_FWE, /* share with FLCTL */
515  GPIO_FN_WE2_ICIORD, /* share with PCMCIA */
516  GPIO_FN_WE3_ICIOWR, /* share with PCMCIA */
518  GPIO_FN_RD_FSC, /* share with FLCTL */
519  GPIO_FN_WAIT_PORT177, /* WAIT Port 90/177 */
521 
523 
524  /* IRDA */
526 
527  /* ATAPI */
538 
539  /* RMII */
543  GPIO_FN_RMII_REF50CK, /* for RMII */
544  GPIO_FN_RMII_REF125CK, /* for GMII */
545 
546  /* GEther */
561 
562  /* DMA0 */
564 
565  /* DMA1 */
567 
568  /* SYSC */
572 
573  /* HDMI */
576 
577  /* SDENC */
580 
581  /* IRREM */
583 
584  /* DEBUG */
587 
591 };
592 
593 /* DMA slave IDs */
594 enum {
607 };
608 
609 #ifdef CONFIG_PM
610 extern void __init r8a7740_init_pm_domains(void);
611 #else
612 static inline void r8a7740_init_pm_domains(void) {}
613 #endif /* CONFIG_PM */
614 
615 #endif /* __ASM_R8A7740_H__ */