| xj | b04a402 | 2021-11-25 15:01:52 +0800 | [diff] [blame] | 1 | /* | 
|  | 2 | * Copyright (C) 2009 by Holger Schurig <hs4233@mail.mn-solutions.de> | 
|  | 3 | * | 
|  | 4 | * This program is free software; you can redistribute it and/or | 
|  | 5 | * modify it under the terms of the GNU General Public License | 
|  | 6 | * as published by the Free Software Foundation; either version 2 | 
|  | 7 | * of the License, or (at your option) any later version. | 
|  | 8 | * This program is distributed in the hope that it will be useful, | 
|  | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|  | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|  | 11 | * GNU General Public License for more details. | 
|  | 12 | * | 
|  | 13 | * You should have received a copy of the GNU General Public License | 
|  | 14 | * along with this program; if not, write to the Free Software | 
|  | 15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | 
|  | 16 | * MA 02110-1301, USA. | 
|  | 17 | */ | 
|  | 18 | #ifndef __MACH_IOMUX_MX21_H__ | 
|  | 19 | #define __MACH_IOMUX_MX21_H__ | 
|  | 20 |  | 
|  | 21 | #include "iomux-mx2x.h" | 
|  | 22 | #include "iomux-v1.h" | 
|  | 23 |  | 
|  | 24 | /* Primary GPIO pin functions */ | 
|  | 25 |  | 
|  | 26 | #define PB22_PF_USBH1_BYP	(GPIO_PORTB | GPIO_PF | 22) | 
|  | 27 | #define PB25_PF_USBH1_ON	(GPIO_PORTB | GPIO_PF | 25) | 
|  | 28 | #define PC5_PF_USBOTG_SDA	(GPIO_PORTC | GPIO_PF | 5) | 
|  | 29 | #define PC6_PF_USBOTG_SCL	(GPIO_PORTC | GPIO_PF | 6) | 
|  | 30 | #define PC7_PF_USBOTG_ON	(GPIO_PORTC | GPIO_PF | 7) | 
|  | 31 | #define PC8_PF_USBOTG_FS	(GPIO_PORTC | GPIO_PF | 8) | 
|  | 32 | #define PC9_PF_USBOTG_OE	(GPIO_PORTC | GPIO_PF | 9) | 
|  | 33 | #define PC10_PF_USBOTG_TXDM	(GPIO_PORTC | GPIO_PF | 10) | 
|  | 34 | #define PC11_PF_USBOTG_TXDP	(GPIO_PORTC | GPIO_PF | 11) | 
|  | 35 | #define PC12_PF_USBOTG_RXDM	(GPIO_PORTC | GPIO_PF | 12) | 
|  | 36 | #define PC13_PF_USBOTG_RXDP	(GPIO_PORTC | GPIO_PF | 13) | 
|  | 37 | #define PC16_PF_SAP_FS		(GPIO_PORTC | GPIO_PF | 16) | 
|  | 38 | #define PC17_PF_SAP_RXD		(GPIO_PORTC | GPIO_PF | 17) | 
|  | 39 | #define PC18_PF_SAP_TXD		(GPIO_PORTC | GPIO_PF | 18) | 
|  | 40 | #define PC19_PF_SAP_CLK		(GPIO_PORTC | GPIO_PF | 19) | 
|  | 41 | #define PE0_PF_TEST_WB2		(GPIO_PORTE | GPIO_PF | 0) | 
|  | 42 | #define PE1_PF_TEST_WB1		(GPIO_PORTE | GPIO_PF | 1) | 
|  | 43 | #define PE2_PF_TEST_WB0		(GPIO_PORTE | GPIO_PF | 2) | 
|  | 44 | #define PF1_PF_NFCE		(GPIO_PORTF | GPIO_PF | 1) | 
|  | 45 | #define PF3_PF_NFCLE		(GPIO_PORTF | GPIO_PF | 3) | 
|  | 46 | #define PF7_PF_NFIO0		(GPIO_PORTF | GPIO_PF | 7) | 
|  | 47 | #define PF8_PF_NFIO1		(GPIO_PORTF | GPIO_PF | 8) | 
|  | 48 | #define PF9_PF_NFIO2		(GPIO_PORTF | GPIO_PF | 9) | 
|  | 49 | #define PF10_PF_NFIO3		(GPIO_PORTF | GPIO_PF | 10) | 
|  | 50 | #define PF11_PF_NFIO4		(GPIO_PORTF | GPIO_PF | 11) | 
|  | 51 | #define PF12_PF_NFIO5		(GPIO_PORTF | GPIO_PF | 12) | 
|  | 52 | #define PF13_PF_NFIO6		(GPIO_PORTF | GPIO_PF | 13) | 
|  | 53 | #define PF14_PF_NFIO7		(GPIO_PORTF | GPIO_PF | 14) | 
|  | 54 | #define PF16_PF_RES		(GPIO_PORTF | GPIO_PF | 16) | 
|  | 55 |  | 
|  | 56 | /* Alternate GPIO pin functions */ | 
|  | 57 |  | 
|  | 58 | #define PA5_AF_BMI_CLK_CS	(GPIO_PORTA | GPIO_AF | 5) | 
|  | 59 | #define PA6_AF_BMI_D0		(GPIO_PORTA | GPIO_AF | 6) | 
|  | 60 | #define PA7_AF_BMI_D1		(GPIO_PORTA | GPIO_AF | 7) | 
|  | 61 | #define PA8_AF_BMI_D2		(GPIO_PORTA | GPIO_AF | 8) | 
|  | 62 | #define PA9_AF_BMI_D3		(GPIO_PORTA | GPIO_AF | 9) | 
|  | 63 | #define PA10_AF_BMI_D4		(GPIO_PORTA | GPIO_AF | 10) | 
|  | 64 | #define PA11_AF_BMI_D5		(GPIO_PORTA | GPIO_AF | 11) | 
|  | 65 | #define PA12_AF_BMI_D6		(GPIO_PORTA | GPIO_AF | 12) | 
|  | 66 | #define PA13_AF_BMI_D7		(GPIO_PORTA | GPIO_AF | 13) | 
|  | 67 | #define PA14_AF_BMI_D8		(GPIO_PORTA | GPIO_AF | 14) | 
|  | 68 | #define PA15_AF_BMI_D9		(GPIO_PORTA | GPIO_AF | 15) | 
|  | 69 | #define PA16_AF_BMI_D10		(GPIO_PORTA | GPIO_AF | 16) | 
|  | 70 | #define PA17_AF_BMI_D11		(GPIO_PORTA | GPIO_AF | 17) | 
|  | 71 | #define PA18_AF_BMI_D12		(GPIO_PORTA | GPIO_AF | 18) | 
|  | 72 | #define PA19_AF_BMI_D13		(GPIO_PORTA | GPIO_AF | 19) | 
|  | 73 | #define PA20_AF_BMI_D14		(GPIO_PORTA | GPIO_AF | 20) | 
|  | 74 | #define PA21_AF_BMI_D15		(GPIO_PORTA | GPIO_AF | 21) | 
|  | 75 | #define PA22_AF_BMI_READ_REQ	(GPIO_PORTA | GPIO_AF | 22) | 
|  | 76 | #define PA23_AF_BMI_WRITE	(GPIO_PORTA | GPIO_AF | 23) | 
|  | 77 | #define PA29_AF_BMI_RX_FULL	(GPIO_PORTA | GPIO_AF | 29) | 
|  | 78 | #define PA30_AF_BMI_READ	(GPIO_PORTA | GPIO_AF | 30) | 
|  | 79 |  | 
|  | 80 | /* AIN GPIO pin functions */ | 
|  | 81 |  | 
|  | 82 | #define PC14_AIN_SYS_CLK	(GPIO_PORTC | GPIO_AIN | GPIO_OUT | 14) | 
|  | 83 | #define PD21_AIN_USBH2_FS	(GPIO_PORTD | GPIO_AIN | GPIO_OUT | 21) | 
|  | 84 | #define PD22_AIN_USBH2_OE	(GPIO_PORTD | GPIO_AIN | GPIO_OUT | 22) | 
|  | 85 | #define PD23_AIN_USBH2_TXDM	(GPIO_PORTD | GPIO_AIN | GPIO_OUT | 23) | 
|  | 86 | #define PD24_AIN_USBH2_TXDP	(GPIO_PORTD | GPIO_AIN | GPIO_OUT | 24) | 
|  | 87 | #define PE8_AIN_IR_TXD		(GPIO_PORTE | GPIO_AIN | GPIO_OUT | 8) | 
|  | 88 | #define PF0_AIN_PC_RST		(GPIO_PORTF | GPIO_AIN | GPIO_OUT | 0) | 
|  | 89 | #define PF1_AIN_PC_CE1		(GPIO_PORTF | GPIO_AIN | GPIO_OUT | 1) | 
|  | 90 | #define PF2_AIN_PC_CE2		(GPIO_PORTF | GPIO_AIN | GPIO_OUT | 2) | 
|  | 91 | #define PF3_AIN_PC_POE		(GPIO_PORTF | GPIO_AIN | GPIO_OUT | 3) | 
|  | 92 | #define PF4_AIN_PC_OE		(GPIO_PORTF | GPIO_AIN | GPIO_OUT | 4) | 
|  | 93 | #define PF5_AIN_PC_RW		(GPIO_PORTF | GPIO_AIN | GPIO_OUT | 5) | 
|  | 94 |  | 
|  | 95 | /* BIN GPIO pin functions */ | 
|  | 96 |  | 
|  | 97 | #define PC14_BIN_SYS_CLK	(GPIO_PORTC | GPIO_BIN | GPIO_OUT | 14) | 
|  | 98 | #define PD27_BIN_EXT_DMA_GRANT	(GPIO_PORTD | GPIO_BIN | GPIO_OUT | 27) | 
|  | 99 |  | 
|  | 100 | /* CIN GPIO pin functions */ | 
|  | 101 |  | 
|  | 102 | #define PB26_CIN_USBH1_RXDAT	(GPIO_PORTB | GPIO_CIN | GPIO_OUT | 26) | 
|  | 103 |  | 
|  | 104 | /* AOUT GPIO pin functions */ | 
|  | 105 |  | 
|  | 106 | #define PA29_AOUT_BMI_WAIT	(GPIO_PORTA | GPIO_AOUT | GPIO_IN | 29) | 
|  | 107 | #define PD19_AOUT_USBH2_RXDM	(GPIO_PORTD | GPIO_AOUT | GPIO_IN | 19) | 
|  | 108 | #define PD20_AOUT_USBH2_RXDP	(GPIO_PORTD | GPIO_AOUT | GPIO_IN | 20) | 
|  | 109 | #define PD25_AOUT_EXT_DMAREQ	(GPIO_PORTD | GPIO_AOUT | GPIO_IN | 25) | 
|  | 110 | #define PD26_AOUT_USBOTG_RXDAT	(GPIO_PORTD | GPIO_AOUT | GPIO_IN | 26) | 
|  | 111 | #define PE9_AOUT_IR_RXD		(GPIO_PORTE | GPIO_AOUT | GPIO_IN | 9) | 
|  | 112 | #define PF6_AOUT_PC_BVD2	(GPIO_PORTF | GPIO_AOUT | GPIO_IN | 6) | 
|  | 113 | #define PF7_AOUT_PC_BVD1	(GPIO_PORTF | GPIO_AOUT | GPIO_IN | 7) | 
|  | 114 | #define PF8_AOUT_PC_VS2		(GPIO_PORTF | GPIO_AOUT | GPIO_IN | 8) | 
|  | 115 | #define PF9_AOUT_PC_VS1		(GPIO_PORTF | GPIO_AOUT | GPIO_IN | 9) | 
|  | 116 | #define PF10_AOUT_PC_WP		(GPIO_PORTF | GPIO_AOUT | GPIO_IN | 10) | 
|  | 117 | #define PF11_AOUT_PC_READY	(GPIO_PORTF | GPIO_AOUT | GPIO_IN | 11) | 
|  | 118 | #define PF12_AOUT_PC_WAIT	(GPIO_PORTF | GPIO_AOUT | GPIO_IN | 12) | 
|  | 119 | #define PF13_AOUT_PC_CD2	(GPIO_PORTF | GPIO_AOUT | GPIO_IN | 13) | 
|  | 120 | #define PF14_AOUT_PC_CD1	(GPIO_PORTF | GPIO_AOUT | GPIO_IN | 14) | 
|  | 121 |  | 
|  | 122 | #endif /* ifndef __MACH_IOMUX_MX21_H__ */ |