Tegra: Pinmux: Fixed up errors about DTV interface
[linux-3.10.git] / arch / arm / mach-tegra / pinmux-tegra30-tables.c
1 /*
2  * linux/arch/arm/mach-tegra/pinmux-tegra30-tables.c
3  *
4  * Common pinmux configurations for Tegra30 SoCs
5  *
6  * Copyright (C) 2010,2011 NVIDIA Corporation
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License.
11  *
12  * This program is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
15  * more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20  */
22 #include <linux/kernel.h>
23 #include <linux/errno.h>
24 #include <linux/spinlock.h>
25 #include <linux/io.h>
26 #include <linux/init.h>
27 #include <linux/string.h>
29 #include <mach/pinmux.h>
30 #include <mach/pinmux-tegra30.h>
32 #include "iomap.h"
33 #include "pm.h"
34 #include "gpio-names.h"
36 #define PINGROUP_REG_A  0x868
37 #define MUXCTL_REG_A    0x3000
39 #define SET_DRIVE_PINGROUP(pg_name, r, drv_down_offset, drv_down_mask, drv_up_offset, drv_up_mask,      \
40         slew_rise_offset, slew_rise_mask, slew_fall_offset, slew_fall_mask)     \
41         [TEGRA_DRIVE_PINGROUP_ ## pg_name] = {                  \
42                 .name = #pg_name,                               \
43                 .reg_bank = 0,                                  \
44                 .reg = ((r) - PINGROUP_REG_A),                  \
45                 .drvup_offset = drv_up_offset,                  \
46                 .drvup_mask = drv_up_mask,                      \
47                 .drvdown_offset = drv_down_offset,              \
48                 .drvdown_mask = drv_down_mask,                  \
49                 .slewrise_offset = slew_rise_offset,            \
50                 .slewrise_mask = slew_rise_mask,                \
51                 .slewfall_offset = slew_fall_offset,            \
52                 .slewfall_mask = slew_fall_mask,                \
53         }
55 #define DEFAULT_DRIVE_PINGROUP(pg_name, r)              \
56         [TEGRA_DRIVE_PINGROUP_ ## pg_name] = {          \
57                 .name = #pg_name,                       \
58                 .reg_bank = 0,                          \
59                 .reg = ((r) - PINGROUP_REG_A),          \
60                 .drvup_offset = 20,                     \
61                 .drvup_mask = 0x1f,                     \
62                 .drvdown_offset = 12,                   \
63                 .drvdown_mask = 0x1f,                   \
64                 .slewrise_offset = 28,                  \
65                 .slewrise_mask = 0x3,                   \
66                 .slewfall_offset = 30,                  \
67                 .slewfall_mask = 0x3,                   \
68         }
70 const struct tegra_drive_pingroup_desc tegra_soc_drive_pingroups[TEGRA_MAX_DRIVE_PINGROUP] = {
71         DEFAULT_DRIVE_PINGROUP(AO1,             0x868),
72         DEFAULT_DRIVE_PINGROUP(AO2,             0x86c),
73         DEFAULT_DRIVE_PINGROUP(AT1,             0x870),
74         DEFAULT_DRIVE_PINGROUP(AT2,             0x874),
75         DEFAULT_DRIVE_PINGROUP(AT3,             0x878),
76         DEFAULT_DRIVE_PINGROUP(AT4,             0x87c),
77         DEFAULT_DRIVE_PINGROUP(AT5,             0x880),
78         DEFAULT_DRIVE_PINGROUP(CDEV1,           0x884),
79         DEFAULT_DRIVE_PINGROUP(CDEV2,           0x888),
80         DEFAULT_DRIVE_PINGROUP(CSUS,            0x88c),
81         DEFAULT_DRIVE_PINGROUP(DAP1,            0x890),
82         DEFAULT_DRIVE_PINGROUP(DAP2,            0x894),
83         DEFAULT_DRIVE_PINGROUP(DAP3,            0x898),
84         DEFAULT_DRIVE_PINGROUP(DAP4,            0x89c),
85         DEFAULT_DRIVE_PINGROUP(DBG,             0x8a0),
86         DEFAULT_DRIVE_PINGROUP(LCD1,            0x8a4),
87         DEFAULT_DRIVE_PINGROUP(LCD2,            0x8a8),
88         SET_DRIVE_PINGROUP(SDIO2,               0x8ac,  12,     0x7f,   20,     0x7f,
89                 28,     0x3,    30,     0x3),
90         SET_DRIVE_PINGROUP(SDIO3,               0x8b0,  12,     0x7f,   20,     0x7f,
91                 28,     0x3,    30,     0x3),
92         DEFAULT_DRIVE_PINGROUP(SPI,             0x8b4),
93         DEFAULT_DRIVE_PINGROUP(UAA,             0x8b8),
94         DEFAULT_DRIVE_PINGROUP(UAB,             0x8bc),
95         DEFAULT_DRIVE_PINGROUP(UART2,           0x8c0),
96         DEFAULT_DRIVE_PINGROUP(UART3,           0x8c4),
97         DEFAULT_DRIVE_PINGROUP(VI1,             0x8c8),
98         SET_DRIVE_PINGROUP(SDIO1,               0x8ec,  12,     0x7f,   20,     0x7f,
99                 28,     0x3,    30,     0x3),
100         DEFAULT_DRIVE_PINGROUP(CRT,             0x8f8),
101         DEFAULT_DRIVE_PINGROUP(DDC,             0x8fc),
102         SET_DRIVE_PINGROUP(GMA,                 0x900,  14,     0x1f,   19,     0x1f,
103                 24,     0xf,    28,     0xf),
104         SET_DRIVE_PINGROUP(GMB,                 0x904,  14,     0x1f,   19,     0x1f,
105                 24,     0xf,    28,     0xf),
106         SET_DRIVE_PINGROUP(GMC,                 0x908,  14,     0x1f,   19,     0x1f,
107                 24,     0xf,    28,     0xf),
108         SET_DRIVE_PINGROUP(GMD,                 0x90c,  14,     0x1f,   19,     0x1f,
109                 24,     0xf,    28,     0xf),
110         DEFAULT_DRIVE_PINGROUP(GME,             0x910),
111         DEFAULT_DRIVE_PINGROUP(GMF,             0x914),
112         DEFAULT_DRIVE_PINGROUP(GMG,             0x918),
113         DEFAULT_DRIVE_PINGROUP(GMH,             0x91c),
114         DEFAULT_DRIVE_PINGROUP(OWR,             0x920),
115         DEFAULT_DRIVE_PINGROUP(UAD,             0x924),
116         DEFAULT_DRIVE_PINGROUP(GPV,             0x928),
117         DEFAULT_DRIVE_PINGROUP(DEV3,            0x92c),
118         DEFAULT_DRIVE_PINGROUP(CEC,             0x938),
119 };
121 #define PINGROUP(pg_name, gpio_nr, vdd, f0, f1, f2, f3, fs, iod, reg)   \
122         [TEGRA_PINGROUP_ ## pg_name] = {                        \
123                 .name = #pg_name,                               \
124                 .vddio = TEGRA_VDDIO_ ## vdd,                   \
125                 .funcs = {                                      \
126                         TEGRA_MUX_ ## f0,                       \
127                         TEGRA_MUX_ ## f1,                       \
128                         TEGRA_MUX_ ## f2,                       \
129                         TEGRA_MUX_ ## f3,                       \
130                 },                                              \
131                 .gpionr = TEGRA_GPIO_ ## gpio_nr,               \
132                 .func_safe = TEGRA_MUX_ ## fs,                  \
133                 .tri_bank = 1,                                  \
134                 .tri_reg = ((reg) - MUXCTL_REG_A),              \
135                 .tri_bit = 4,                                   \
136                 .mux_bank = 1,                                  \
137                 .mux_reg = ((reg) - MUXCTL_REG_A),              \
138                 .mux_bit = 0,                                   \
139                 .pupd_bank = 1,                                 \
140                 .pupd_reg = ((reg) - MUXCTL_REG_A),             \
141                 .pupd_bit = 2,                                  \
142                 .io_default = TEGRA_PIN_ ## iod,                \
143                 .od_bit = 6,                                    \
144                 .lock_bit = 7,                                  \
145                 .ioreset_bit = 8,                               \
146         }
148 /* !!!FIXME!!! FILL IN fSafe COLUMN IN TABLE ....... */
150 #define PINGROUPS       \
151         /*       NAME                   GPIO            VDD             f0              f1              f2              f3              fSafe   io      reg */\
152         PINGROUP(ULPI_DATA0,            PO1,            BB,             SPI3,           HSI,            UARTA,          ULPI,           RSVD,   INPUT,  0x3000),\
153         PINGROUP(ULPI_DATA1,            PO2,            BB,             SPI3,           HSI,            UARTA,          ULPI,           RSVD,   INPUT,  0x3004),\
154         PINGROUP(ULPI_DATA2,            PO3,            BB,             SPI3,           HSI,            UARTA,          ULPI,           RSVD,   INPUT,  0x3008),\
155         PINGROUP(ULPI_DATA3,            PO4,            BB,             SPI3,           HSI,            UARTA,          ULPI,           RSVD,   INPUT,  0x300c),\
156         PINGROUP(ULPI_DATA4,            PO5,            BB,             SPI2,           HSI,            UARTA,          ULPI,           RSVD,   INPUT,  0x3010),\
157         PINGROUP(ULPI_DATA5,            PO6,            BB,             SPI2,           HSI,            UARTA,          ULPI,           RSVD,   INPUT,  0x3014),\
158         PINGROUP(ULPI_DATA6,            PO7,            BB,             SPI2,           HSI,            UARTA,          ULPI,           RSVD,   INPUT,  0x3018),\
159         PINGROUP(ULPI_DATA7,            PO0,            BB,             SPI2,           HSI,            UARTA,          ULPI,           RSVD,   INPUT,  0x301c),\
160         PINGROUP(ULPI_CLK,              PY0,            BB,             SPI1,           RSVD,           UARTD,          ULPI,           RSVD,   INPUT,  0x3020),\
161         PINGROUP(ULPI_DIR,              PY1,            BB,             SPI1,           RSVD,           UARTD,          ULPI,           RSVD,   INPUT,  0x3024),\
162         PINGROUP(ULPI_NXT,              PY2,            BB,             SPI1,           RSVD,           UARTD,          ULPI,           RSVD,   INPUT,  0x3028),\
163         PINGROUP(ULPI_STP,              PY3,            BB,             SPI1,           RSVD,           UARTD,          ULPI,           RSVD,   INPUT,  0x302c),\
164         PINGROUP(DAP3_FS,               PP0,            BB,             I2S2,           RSVD1,          DISPLAYA,       DISPLAYB,       RSVD,   INPUT,  0x3030),\
165         PINGROUP(DAP3_DIN,              PP1,            BB,             I2S2,           RSVD1,          DISPLAYA,       DISPLAYB,       RSVD,   INPUT,  0x3034),\
166         PINGROUP(DAP3_DOUT,             PP2,            BB,             I2S2,           RSVD1,          DISPLAYA,       DISPLAYB,       RSVD,   INPUT,  0x3038),\
167         PINGROUP(DAP3_SCLK,             PP3,            BB,             I2S2,           RSVD1,          DISPLAYA,       DISPLAYB,       RSVD,   INPUT,  0x303c),\
168         PINGROUP(GPIO_PV0,              PV0,            BB,             RSVD,           RSVD,           RSVD,           RSVD,           RSVD,   INPUT,  0x3040),\
169         PINGROUP(GPIO_PV1,              PV1,            BB,             RSVD,           RSVD,           RSVD,           RSVD,           RSVD,   INPUT,  0x3044),\
170         PINGROUP(SDMMC1_CLK,            PZ0,            SDMMC1,         SDIO1,          RSVD1,          RSVD2,          INVALID,        RSVD,   INPUT,  0x3048),\
171         PINGROUP(SDMMC1_CMD,            PZ1,            SDMMC1,         SDIO1,          RSVD1,          RSVD2,          INVALID,        RSVD,   INPUT,  0x304c),\
172         PINGROUP(SDMMC1_DAT3,           PY4,            SDMMC1,         SDIO1,          RSVD1,          UARTE,          INVALID,        RSVD,   INPUT,  0x3050),\
173         PINGROUP(SDMMC1_DAT2,           PY5,            SDMMC1,         SDIO1,          RSVD1,          UARTE,          INVALID,        RSVD,   INPUT,  0x3054),\
174         PINGROUP(SDMMC1_DAT1,           PY6,            SDMMC1,         SDIO1,          RSVD1,          UARTE,          INVALID,        RSVD,   INPUT,  0x3058),\
175         PINGROUP(SDMMC1_DAT0,           PY7,            SDMMC1,         SDIO1,          RSVD1,          UARTE,          INVALID,        RSVD,   INPUT,  0x305c),\
176         PINGROUP(GPIO_PV2,              PV2,            SDMMC1,         OWR,            RSVD1,          RSVD2,          RSVD3,          RSVD,   INPUT,  0x3060),\
177         PINGROUP(GPIO_PV3,              PV3,            SDMMC1,         INVALID,        RSVD1,          RSVD2,          RSVD3,          RSVD,   INPUT,  0x3064),\
178         PINGROUP(CLK2_OUT,              PW5,            SDMMC1,         EXTPERIPH2,     RSVD1,          RSVD2,          RSVD3,          RSVD,   INPUT,  0x3068),\
179         PINGROUP(CLK2_REQ,              PCC5,           SDMMC1,         DAP,            RSVD1,          RSVD2,          RSVD3,          RSVD,   INPUT,  0x306c),\
180         PINGROUP(LCD_PWR1,              PC1,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x3070),\
181         PINGROUP(LCD_PWR2,              PC6,            LCD,            DISPLAYA,       DISPLAYB,       SPI5,           INVALID,        RSVD,   OUTPUT, 0x3074),\
182         PINGROUP(LCD_SDIN,              PZ2,            LCD,            DISPLAYA,       DISPLAYB,       SPI5,           RSVD,           RSVD,   OUTPUT, 0x3078),\
183         PINGROUP(LCD_SDOUT,             PN5,            LCD,            DISPLAYA,       DISPLAYB,       SPI5,           INVALID,        RSVD,   OUTPUT, 0x307c),\
184         PINGROUP(LCD_WR_N,              PZ3,            LCD,            DISPLAYA,       DISPLAYB,       SPI5,           INVALID,        RSVD,   OUTPUT, 0x3080),\
185         PINGROUP(LCD_CS0_N,             PN4,            LCD,            DISPLAYA,       DISPLAYB,       SPI5,           RSVD,           RSVD,   OUTPUT, 0x3084),\
186         PINGROUP(LCD_DC0,               PN6,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x3088),\
187         PINGROUP(LCD_SCK,               PZ4,            LCD,            DISPLAYA,       DISPLAYB,       SPI5,           INVALID,        RSVD,   OUTPUT, 0x308c),\
188         PINGROUP(LCD_PWR0,              PB2,            LCD,            DISPLAYA,       DISPLAYB,       SPI5,           INVALID,        RSVD,   OUTPUT, 0x3090),\
189         PINGROUP(LCD_PCLK,              PB3,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x3094),\
190         PINGROUP(LCD_DE,                PJ1,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x3098),\
191         PINGROUP(LCD_HSYNC,             PJ3,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x309c),\
192         PINGROUP(LCD_VSYNC,             PJ4,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30a0),\
193         PINGROUP(LCD_D0,                PE0,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30a4),\
194         PINGROUP(LCD_D1,                PE1,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30a8),\
195         PINGROUP(LCD_D2,                PE2,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30ac),\
196         PINGROUP(LCD_D3,                PE3,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30b0),\
197         PINGROUP(LCD_D4,                PE4,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30b4),\
198         PINGROUP(LCD_D5,                PE5,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30b8),\
199         PINGROUP(LCD_D6,                PE6,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30bc),\
200         PINGROUP(LCD_D7,                PE7,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30c0),\
201         PINGROUP(LCD_D8,                PF0,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30c4),\
202         PINGROUP(LCD_D9,                PF1,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30c8),\
203         PINGROUP(LCD_D10,               PF2,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30cc),\
204         PINGROUP(LCD_D11,               PF3,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30d0),\
205         PINGROUP(LCD_D12,               PF4,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30d4),\
206         PINGROUP(LCD_D13,               PF5,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30d8),\
207         PINGROUP(LCD_D14,               PF6,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30dc),\
208         PINGROUP(LCD_D15,               PF7,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30e0),\
209         PINGROUP(LCD_D16,               PM0,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30e4),\
210         PINGROUP(LCD_D17,               PM1,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30e8),\
211         PINGROUP(LCD_D18,               PM2,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30ec),\
212         PINGROUP(LCD_D19,               PM3,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30f0),\
213         PINGROUP(LCD_D20,               PM4,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30f4),\
214         PINGROUP(LCD_D21,               PM5,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30f8),\
215         PINGROUP(LCD_D22,               PM6,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x30fc),\
216         PINGROUP(LCD_D23,               PM7,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x3100),\
217         PINGROUP(LCD_CS1_N,             PW0,            LCD,            DISPLAYA,       DISPLAYB,       SPI5,           RSVD2,          RSVD,   OUTPUT, 0x3104),\
218         PINGROUP(LCD_M1,                PW1,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x3108),\
219         PINGROUP(LCD_DC1,               PD2,            LCD,            DISPLAYA,       DISPLAYB,       RSVD1,          RSVD2,          RSVD,   OUTPUT, 0x310c),\
220         PINGROUP(HDMI_INT,              PN7,            LCD,            RSVD,           RSVD,           RSVD,           RSVD,           RSVD,   INPUT,  0x3110),\
221         PINGROUP(DDC_SCL,               PV4,            LCD,            I2C4,           RSVD1,          RSVD2,          RSVD3,          RSVD,   INPUT,  0x3114),\
222         PINGROUP(DDC_SDA,               PV5,            LCD,            I2C4,           RSVD1,          RSVD2,          RSVD3,          RSVD,   INPUT,  0x3118),\
223         PINGROUP(CRT_HSYNC,             PV6,            LCD,            CRT,            RSVD1,          RSVD2,          RSVD3,          RSVD,   INPUT,  0x311c),\
224         PINGROUP(CRT_VSYNC,             PV7,            LCD,            CRT,            RSVD1,          RSVD2,          RSVD3,          RSVD,   INPUT,  0x3120),\
225         PINGROUP(VI_D0,                 PT4,            VI,             INVALID,        RSVD1,          VI,             RSVD2,          RSVD,   INPUT,  0x3124),\
226         PINGROUP(VI_D1,                 PD5,            VI,             INVALID,        SDIO2,          VI,             RSVD1,          RSVD,   INPUT,  0x3128),\
227         PINGROUP(VI_D2,                 PL0,            VI,             INVALID,        SDIO2,          VI,             RSVD1,          RSVD,   INPUT,  0x312c),\
228         PINGROUP(VI_D3,                 PL1,            VI,             INVALID,        SDIO2,          VI,             RSVD1,          RSVD,   INPUT,  0x3130),\
229         PINGROUP(VI_D4,                 PL2,            VI,             INVALID,        SDIO2,          VI,             RSVD1,          RSVD,   INPUT,  0x3134),\
230         PINGROUP(VI_D5,                 PL3,            VI,             INVALID,        SDIO2,          VI,             RSVD1,          RSVD,   INPUT,  0x3138),\
231         PINGROUP(VI_D6,                 PL4,            VI,             INVALID,        SDIO2,          VI,             RSVD1,          RSVD,   INPUT,  0x313c),\
232         PINGROUP(VI_D7,                 PL5,            VI,             INVALID,        SDIO2,          VI,             RSVD1,          RSVD,   INPUT,  0x3140),\
233         PINGROUP(VI_D8,                 PL6,            VI,             INVALID,        SDIO2,          VI,             RSVD1,          RSVD,   INPUT,  0x3144),\
234         PINGROUP(VI_D9,                 PL7,            VI,             INVALID,        SDIO2,          VI,             RSVD1,          RSVD,   INPUT,  0x3148),\
235         PINGROUP(VI_D10,                PT2,            VI,             INVALID,        RSVD1,          VI,             RSVD2,          RSVD,   INPUT,  0x314c),\
236         PINGROUP(VI_D11,                PT3,            VI,             INVALID,        RSVD1,          VI,             RSVD2,          RSVD,   INPUT,  0x3150),\
237         PINGROUP(VI_PCLK,               PT0,            VI,             RSVD1,          SDIO2,          VI,             RSVD2,          RSVD,   INPUT,  0x3154),\
238         PINGROUP(VI_MCLK,               PT1,            VI,             INVALID,        INVALID,        INVALID,        VI,             RSVD,   INPUT,  0x3158),\
239         PINGROUP(VI_VSYNC,              PD6,            VI,             INVALID,        RSVD1,          VI,             RSVD2,          RSVD,   INPUT,  0x315c),\
240         PINGROUP(VI_HSYNC,              PD7,            VI,             INVALID,        RSVD1,          VI,             RSVD2,          RSVD,   INPUT,  0x3160),\
241         PINGROUP(UART2_RXD,             PC3,            UART,           IRDA,           SPDIF,          UARTA,          SPI4,           RSVD,   INPUT,  0x3164),\
242         PINGROUP(UART2_TXD,             PC2,            UART,           IRDA,           SPDIF,          UARTA,          SPI4,           RSVD,   INPUT,  0x3168),\
243         PINGROUP(UART2_RTS_N,           PJ6,            UART,           UARTA,          UARTB,          GMI,            SPI4,           RSVD,   INPUT,  0x316c),\
244         PINGROUP(UART2_CTS_N,           PJ5,            UART,           UARTA,          UARTB,          GMI,            SPI4,           RSVD,   INPUT,  0x3170),\
245         PINGROUP(UART3_TXD,             PW6,            UART,           UARTC,          RSVD1,          GMI,            RSVD2,          RSVD,   INPUT,  0x3174),\
246         PINGROUP(UART3_RXD,             PW7,            UART,           UARTC,          RSVD1,          GMI,            RSVD2,          RSVD,   INPUT,  0x3178),\
247         PINGROUP(UART3_CTS_N,           PA1,            UART,           UARTC,          RSVD1,          GMI,            RSVD2,          RSVD,   INPUT,  0x317c),\
248         PINGROUP(UART3_RTS_N,           PC0,            UART,           UARTC,          PWM0,           GMI,            RSVD2,          RSVD,   INPUT,  0x3180),\
249         PINGROUP(GPIO_PU0,              PU0,            UART,           OWR,            UARTA,          GMI,            RSVD1,          RSVD,   INPUT,  0x3184),\
250         PINGROUP(GPIO_PU1,              PU1,            UART,           RSVD1,          UARTA,          GMI,            RSVD2,          RSVD,   INPUT,  0x3188),\
251         PINGROUP(GPIO_PU2,              PU2,            UART,           RSVD1,          UARTA,          GMI,            RSVD2,          RSVD,   INPUT,  0x318c),\
252         PINGROUP(GPIO_PU3,              PU3,            UART,           PWM0,           UARTA,          GMI,            RSVD1,          RSVD,   INPUT,  0x3190),\
253         PINGROUP(GPIO_PU4,              PU4,            UART,           PWM1,           UARTA,          GMI,            RSVD1,          RSVD,   INPUT,  0x3194),\
254         PINGROUP(GPIO_PU5,              PU5,            UART,           PWM2,           UARTA,          GMI,            RSVD1,          RSVD,   INPUT,  0x3198),\
255         PINGROUP(GPIO_PU6,              PU6,            UART,           PWM3,           UARTA,          GMI,            RSVD1,          RSVD,   INPUT,  0x319c),\
256         PINGROUP(GEN1_I2C_SDA,          PC5,            UART,           I2C,            RSVD1,          RSVD2,          RSVD3,          RSVD,   INPUT,  0x31a0),\
257         PINGROUP(GEN1_I2C_SCL,          PC4,            UART,           I2C,            RSVD1,          RSVD2,          RSVD3,          RSVD,   INPUT,  0x31a4),\
258         PINGROUP(DAP4_FS,               PP4,            UART,           I2S3,           RSVD1,          GMI,            RSVD2,          RSVD,   INPUT,  0x31a8),\
259         PINGROUP(DAP4_DIN,              PP5,            UART,           I2S3,           RSVD1,          GMI,            RSVD2,          RSVD,   INPUT,  0x31ac),\
260         PINGROUP(DAP4_DOUT,             PP6,            UART,           I2S3,           RSVD1,          GMI,            RSVD2,          RSVD,   INPUT,  0x31b0),\
261         PINGROUP(DAP4_SCLK,             PP7,            UART,           I2S3,           RSVD1,          GMI,            RSVD2,          RSVD,   INPUT,  0x31b4),\
262         PINGROUP(CLK3_OUT,              PEE0,           UART,           EXTPERIPH3,     RSVD1,          RSVD2,          RSVD3,          RSVD,   INPUT,  0x31b8),\
263         PINGROUP(CLK3_REQ,              PEE1,           UART,           DEV3,           RSVD1,          RSVD2,          RSVD3,          RSVD,   INPUT,  0x31bc),\
264         PINGROUP(GMI_WP_N,              PC7,            GMI,            RSVD1,          NAND,           GMI,            GMI_ALT,        RSVD,   INPUT,  0x31c0),\
265         PINGROUP(GMI_IORDY,             PI5,            GMI,            RSVD1,          NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x31c4),\
266         PINGROUP(GMI_WAIT,              PI7,            GMI,            RSVD1,          NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x31c8),\
267         PINGROUP(GMI_ADV_N,             PK0,            GMI,            RSVD1,          NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x31cc),\
268         PINGROUP(GMI_CLK,               PK1,            GMI,            RSVD1,          NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x31d0),\
269         PINGROUP(GMI_CS0_N,             PJ0,            GMI,            RSVD1,          NAND,           GMI,            DTV,            RSVD,   INPUT,  0x31d4),\
270         PINGROUP(GMI_CS1_N,             PJ2,            GMI,            RSVD1,          NAND,           GMI,            DTV,            RSVD,   INPUT,  0x31d8),\
271         PINGROUP(GMI_CS2_N,             PK3,            GMI,            RSVD1,          NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x31dc),\
272         PINGROUP(GMI_CS3_N,             PK4,            GMI,            RSVD1,          NAND,           GMI,            GMI_ALT,        RSVD,   INPUT,  0x31e0),\
273         PINGROUP(GMI_CS4_N,             PK2,            GMI,            RSVD1,          NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x31e4),\
274         PINGROUP(GMI_CS6_N,             PI3,            GMI,            NAND,           NAND_ALT,       GMI,            SATA,           RSVD,   INPUT,  0x31e8),\
275         PINGROUP(GMI_CS7_N,             PI6,            GMI,            NAND,           NAND_ALT,       GMI,            GMI_ALT,        RSVD,   INPUT,  0x31ec),\
276         PINGROUP(GMI_AD0,               PG0,            GMI,            RSVD1,          NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x31f0),\
277         PINGROUP(GMI_AD1,               PG1,            GMI,            RSVD1,          NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x31f4),\
278         PINGROUP(GMI_AD2,               PG2,            GMI,            RSVD1,          NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x31f8),\
279         PINGROUP(GMI_AD3,               PG3,            GMI,            RSVD1,          NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x31fc),\
280         PINGROUP(GMI_AD4,               PG4,            GMI,            RSVD1,          NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x3200),\
281         PINGROUP(GMI_AD5,               PG5,            GMI,            RSVD1,          NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x3204),\
282         PINGROUP(GMI_AD6,               PG6,            GMI,            RSVD1,          NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x3208),\
283         PINGROUP(GMI_AD7,               PG7,            GMI,            RSVD1,          NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x320c),\
284         PINGROUP(GMI_AD8,               PH0,            GMI,            PWM0,           NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x3210),\
285         PINGROUP(GMI_AD9,               PH1,            GMI,            PWM1,           NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x3214),\
286         PINGROUP(GMI_AD10,              PH2,            GMI,            PWM2,           NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x3218),\
287         PINGROUP(GMI_AD11,              PH3,            GMI,            PWM3,           NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x321c),\
288         PINGROUP(GMI_AD12,              PH4,            GMI,            RSVD1,          NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x3220),\
289         PINGROUP(GMI_AD13,              PH5,            GMI,            RSVD1,          NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x3224),\
290         PINGROUP(GMI_AD14,              PH6,            GMI,            RSVD1,          NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x3228),\
291         PINGROUP(GMI_AD15,              PH7,            GMI,            RSVD1,          NAND,           GMI,            RSVD2,          RSVD,   INPUT,  0x322c),\
292         PINGROUP(GMI_A16,               PJ7,            GMI,            UARTD,          SPI4,           GMI,            GMI_ALT,        RSVD,   INPUT,  0x3230),\
293         PINGROUP(GMI_A17,               PB0,            GMI,            UARTD,          SPI4,           GMI,            DTV,            RSVD,   INPUT,  0x3234),\
294         PINGROUP(GMI_A18,               PB1,            GMI,            UARTD,          SPI4,           GMI,            DTV,            RSVD,   INPUT,  0x3238),\
295         PINGROUP(GMI_A19,               PK7,            GMI,            UARTD,          SPI4,           GMI,            RSVD3,          RSVD,   INPUT,  0x323c),\
296         PINGROUP(GMI_WR_N,              PI0,            GMI,            RSVD1,          NAND,           GMI,            RSVD3,          RSVD,   INPUT,  0x3240),\
297         PINGROUP(GMI_OE_N,              PI1,            GMI,            RSVD1,          NAND,           GMI,            RSVD3,          RSVD,   INPUT,  0x3244),\
298         PINGROUP(GMI_DQS,               PI2,            GMI,            RSVD1,          NAND,           GMI,            RSVD3,          RSVD,   INPUT,  0x3248),\
299         PINGROUP(GMI_RST_N,             PI4,            GMI,            NAND,           NAND_ALT,       GMI,            RSVD3,          RSVD,   INPUT,  0x324c),\
300         PINGROUP(GEN2_I2C_SCL,          PT5,            GMI,            I2C2,           INVALID,        GMI,            RSVD3,          RSVD,   INPUT,  0x3250),\
301         PINGROUP(GEN2_I2C_SDA,          PT6,            GMI,            I2C2,           INVALID,        GMI,            RSVD3,          RSVD,   INPUT,  0x3254),\
302         PINGROUP(SDMMC4_CLK,            PCC4,           SDMMC4,         INVALID,        NAND,           GMI,            SDIO4,          RSVD,   INPUT,  0x3258),\
303         PINGROUP(SDMMC4_CMD,            PT7,            SDMMC4,         I2C3,           NAND,           GMI,            SDIO4,          RSVD,   INPUT,  0x325c),\
304         PINGROUP(SDMMC4_DAT0,           PAA0,           SDMMC4,         UARTE,          SPI3,           GMI,            SDIO4,          RSVD,   INPUT,  0x3260),\
305         PINGROUP(SDMMC4_DAT1,           PAA1,           SDMMC4,         UARTE,          SPI3,           GMI,            SDIO4,          RSVD,   INPUT,  0x3264),\
306         PINGROUP(SDMMC4_DAT2,           PAA2,           SDMMC4,         UARTE,          SPI3,           GMI,            SDIO4,          RSVD,   INPUT,  0x3268),\
307         PINGROUP(SDMMC4_DAT3,           PAA3,           SDMMC4,         UARTE,          SPI3,           GMI,            SDIO4,          RSVD,   INPUT,  0x326c),\
308         PINGROUP(SDMMC4_DAT4,           PAA4,           SDMMC4,         I2C3,           I2S4,           GMI,            SDIO4,          RSVD,   INPUT,  0x3270),\
309         PINGROUP(SDMMC4_DAT5,           PAA5,           SDMMC4,         VGP3,           I2S4,           GMI,            SDIO4,          RSVD,   INPUT,  0x3274),\
310         PINGROUP(SDMMC4_DAT6,           PAA6,           SDMMC4,         VGP4,           I2S4,           GMI,            SDIO4,          RSVD,   INPUT,  0x3278),\
311         PINGROUP(SDMMC4_DAT7,           PAA7,           SDMMC4,         VGP5,           I2S4,           GMI,            SDIO4,          RSVD,   INPUT,  0x327c),\
312         PINGROUP(SDMMC4_RST_N,          PCC3,           SDMMC4,         VGP6,           RSVD1,          RSVD2,          POPSDMMC4,      RSVD,   INPUT,  0x3280),\
313         PINGROUP(CAM_MCLK,              PCC0,           CAM,            VI,             INVALID,        VI_ALT2,        POPSDMMC4,      RSVD,   INPUT,  0x3284),\
314         PINGROUP(GPIO_PCC1,             PCC1,           CAM,            I2S4,           RSVD1,          RSVD2,          POPSDMMC4,      RSVD,   INPUT,  0x3288),\
315         PINGROUP(GPIO_PBB0,             PBB0,           CAM,            I2S4,           RSVD1,          RSVD2,          POPSDMMC4,      RSVD,   INPUT,  0x328c),\
316         PINGROUP(CAM_I2C_SCL,           PBB1,           CAM,            INVALID,        I2C3,           RSVD2,          POPSDMMC4,      RSVD,   INPUT,  0x3290),\
317         PINGROUP(CAM_I2C_SDA,           PBB2,           CAM,            INVALID,        I2C3,           RSVD2,          POPSDMMC4,      RSVD,   INPUT,  0x3294),\
318         PINGROUP(GPIO_PBB3,             PBB3,           CAM,            VGP3,           DISPLAYA,       DISPLAYB,       POPSDMMC4,      RSVD,   INPUT,  0x3298),\
319         PINGROUP(GPIO_PBB4,             PBB4,           CAM,            VGP4,           DISPLAYA,       DISPLAYB,       POPSDMMC4,      RSVD,   INPUT,  0x329c),\
320         PINGROUP(GPIO_PBB5,             PBB5,           CAM,            VGP5,           DISPLAYA,       DISPLAYB,       POPSDMMC4,      RSVD,   INPUT,  0x32a0),\
321         PINGROUP(GPIO_PBB6,             PBB6,           CAM,            VGP6,           DISPLAYA,       DISPLAYB,       POPSDMMC4,      RSVD,   INPUT,  0x32a4),\
322         PINGROUP(GPIO_PBB7,             PBB7,           CAM,            I2S4,           RSVD1,          RSVD2,          POPSDMMC4,      RSVD,   INPUT,  0x32a8),\
323         PINGROUP(GPIO_PCC2,             PCC2,           CAM,            I2S4,           RSVD1,          RSVD2,          RSVD3,          RSVD,   INPUT,  0x32ac),\
324         PINGROUP(JTAG_RTCK,             PU7,            SYS,            RTCK,           RSVD1,          RSVD2,          RSVD3,          RSVD,   INPUT,  0x32b0),\
325         PINGROUP(PWR_I2C_SCL,           PZ6,            SYS,            I2CPWR,         RSVD1,          RSVD2,          RSVD3,          RSVD,   INPUT,  0x32b4),\
326         PINGROUP(PWR_I2C_SDA,           PZ7,            SYS,            I2CPWR,         RSVD1,          RSVD2,          RSVD3,          RSVD,   INPUT,  0x32b8),\
327         PINGROUP(KB_ROW0,               PR0,            SYS,            KBC,            INVALID,        RSVD2,          RSVD3,          RSVD,   INPUT,  0x32bc),\
328         PINGROUP(KB_ROW1,               PR1,            SYS,            KBC,            INVALID,        RSVD2,          RSVD3,          RSVD,   INPUT,  0x32c0),\
329         PINGROUP(KB_ROW2,               PR2,            SYS,            KBC,            INVALID,        RSVD2,          RSVD3,          RSVD,   INPUT,  0x32c4),\
330         PINGROUP(KB_ROW3,               PR3,            SYS,            KBC,            INVALID,        RSVD2,          INVALID,        RSVD,   INPUT,  0x32c8),\
331         PINGROUP(KB_ROW4,               PR4,            SYS,            KBC,            INVALID,        TRACE,          RSVD3,          RSVD,   INPUT,  0x32cc),\
332         PINGROUP(KB_ROW5,               PR5,            SYS,            KBC,            INVALID,        TRACE,          OWR,            RSVD,   INPUT,  0x32d0),\
333         PINGROUP(KB_ROW6,               PR6,            SYS,            KBC,            INVALID,        SDIO2,          INVALID,        RSVD,   INPUT,  0x32d4),\
334         PINGROUP(KB_ROW7,               PR7,            SYS,            KBC,            INVALID,        SDIO2,          INVALID,        RSVD,   INPUT,  0x32d8),\
335         PINGROUP(KB_ROW8,               PS0,            SYS,            KBC,            INVALID,        SDIO2,          INVALID,        RSVD,   INPUT,  0x32dc),\
336         PINGROUP(KB_ROW9,               PS1,            SYS,            KBC,            INVALID,        SDIO2,          INVALID,        RSVD,   INPUT,  0x32e0),\
337         PINGROUP(KB_ROW10,              PS2,            SYS,            KBC,            INVALID,        SDIO2,          INVALID,        RSVD,   INPUT,  0x32e4),\
338         PINGROUP(KB_ROW11,              PS3,            SYS,            KBC,            INVALID,        SDIO2,          INVALID,        RSVD,   INPUT,  0x32e8),\
339         PINGROUP(KB_ROW12,              PS4,            SYS,            KBC,            INVALID,        SDIO2,          INVALID,        RSVD,   INPUT,  0x32ec),\
340         PINGROUP(KB_ROW13,              PS5,            SYS,            KBC,            INVALID,        SDIO2,          INVALID,        RSVD,   INPUT,  0x32f0),\
341         PINGROUP(KB_ROW14,              PS6,            SYS,            KBC,            INVALID,        SDIO2,          INVALID,        RSVD,   INPUT,  0x32f4),\
342         PINGROUP(KB_ROW15,              PS7,            SYS,            KBC,            INVALID,        SDIO2,          INVALID,        RSVD,   INPUT,  0x32f8),\
343         PINGROUP(KB_COL0,               PQ0,            SYS,            KBC,            INVALID,        TRACE,          INVALID,        RSVD,   INPUT,  0x32fc),\
344         PINGROUP(KB_COL1,               PQ1,            SYS,            KBC,            INVALID,        TRACE,          INVALID,        RSVD,   INPUT,  0x3300),\
345         PINGROUP(KB_COL2,               PQ2,            SYS,            KBC,            INVALID,        TRACE,          RSVD,           RSVD,   INPUT,  0x3304),\
346         PINGROUP(KB_COL3,               PQ3,            SYS,            KBC,            INVALID,        TRACE,          RSVD,           RSVD,   INPUT,  0x3308),\
347         PINGROUP(KB_COL4,               PQ4,            SYS,            KBC,            INVALID,        TRACE,          RSVD,           RSVD,   INPUT,  0x330c),\
348         PINGROUP(KB_COL5,               PQ5,            SYS,            KBC,            INVALID,        TRACE,          RSVD,           RSVD,   INPUT,  0x3310),\
349         PINGROUP(KB_COL6,               PQ6,            SYS,            KBC,            INVALID,        TRACE,          INVALID,        RSVD,   INPUT,  0x3314),\
350         PINGROUP(KB_COL7,               PQ7,            SYS,            KBC,            INVALID,        TRACE,          INVALID,        RSVD,   INPUT,  0x3318),\
351         PINGROUP(CLK_32K_OUT,           PA0,            SYS,            BLINK,          RSVD1,          RSVD2,          RSVD3,          RSVD,   INPUT,  0x331c),\
352         PINGROUP(SYS_CLK_REQ,           PZ5,            SYS,            SYSCLK,         RSVD1,          RSVD2,          RSVD3,          RSVD,   INPUT,  0x3320),\
353         PINGROUP(CORE_PWR_REQ,          INVALID,        SYS,            RSVD,           RSVD,           RSVD,           RSVD,           RSVD,   INPUT,  0x3324),\
354         PINGROUP(CPU_PWR_REQ,           INVALID,        SYS,            RSVD,           RSVD,           RSVD,           RSVD,           RSVD,   INPUT,  0x3328),\
355         PINGROUP(PWR_INT_N,             INVALID,        SYS,            RSVD,           RSVD,           RSVD,           RSVD,           RSVD,   INPUT,  0x332c),\
356         PINGROUP(CLK_32K_IN,            INVALID,        SYS,            RSVD,           RSVD,           RSVD,           RSVD,           RSVD,   INPUT,  0x3330),\
357         PINGROUP(OWR,                   INVALID,        SYS,            OWR,            RSVD,           RSVD,           RSVD,           RSVD,   INPUT,  0x3334),\
358         PINGROUP(DAP1_FS,               PN0,            AUDIO,          I2S0,           HDA,            GMI,            SDIO2,          RSVD,   INPUT,  0x3338),\
359         PINGROUP(DAP1_DIN,              PN1,            AUDIO,          I2S0,           HDA,            GMI,            SDIO2,          RSVD,   INPUT,  0x333c),\
360         PINGROUP(DAP1_DOUT,             PN2,            AUDIO,          I2S0,           HDA,            GMI,            SDIO2,          RSVD,   INPUT,  0x3340),\
361         PINGROUP(DAP1_SCLK,             PN3,            AUDIO,          I2S0,           HDA,            GMI,            SDIO2,          RSVD,   INPUT,  0x3344),\
362         PINGROUP(CLK1_REQ,              PEE2,           AUDIO,          DAP,            HDA,            RSVD2,          RSVD3,          RSVD,   INPUT,  0x3348),\
363         PINGROUP(CLK1_OUT,              PW4,            AUDIO,          EXTPERIPH1,     RSVD1,          RSVD2,          RSVD3,          RSVD,   INPUT,  0x334c),\
364         PINGROUP(SPDIF_IN,              PK6,            AUDIO,          SPDIF,          HDA,            INVALID,        DAPSDMMC2,      RSVD,   INPUT,  0x3350),\
365         PINGROUP(SPDIF_OUT,             PK5,            AUDIO,          SPDIF,          RSVD1,          INVALID,        DAPSDMMC2,      RSVD,   INPUT,  0x3354),\
366         PINGROUP(DAP2_FS,               PA2,            AUDIO,          I2S1,           HDA,            RSVD2,          GMI,            RSVD,   INPUT,  0x3358),\
367         PINGROUP(DAP2_DIN,              PA4,            AUDIO,          I2S1,           HDA,            RSVD2,          GMI,            RSVD,   INPUT,  0x335c),\
368         PINGROUP(DAP2_DOUT,             PA5,            AUDIO,          I2S1,           HDA,            RSVD2,          GMI,            RSVD,   INPUT,  0x3360),\
369         PINGROUP(DAP2_SCLK,             PA3,            AUDIO,          I2S1,           HDA,            RSVD2,          GMI,            RSVD,   INPUT,  0x3364),\
370         PINGROUP(SPI2_MOSI,             PX0,            AUDIO,          SPI6,           SPI2,           INVALID,        GMI,            RSVD,   INPUT,  0x3368),\
371         PINGROUP(SPI2_MISO,             PX1,            AUDIO,          SPI6,           SPI2,           INVALID,        GMI,            RSVD,   INPUT,  0x336c),\
372         PINGROUP(SPI2_CS0_N,            PX3,            AUDIO,          SPI6,           SPI2,           INVALID,        GMI,            RSVD,   INPUT,  0x3370),\
373         PINGROUP(SPI2_SCK,              PX2,            AUDIO,          SPI6,           SPI2,           INVALID,        GMI,            RSVD,   INPUT,  0x3374),\
374         PINGROUP(SPI1_MOSI,             PX4,            AUDIO,          SPI2,           SPI1,           INVALID,        GMI,            RSVD,   INPUT,  0x3378),\
375         PINGROUP(SPI1_SCK,              PX5,            AUDIO,          SPI2,           SPI1,           INVALID,        GMI,            RSVD,   INPUT,  0x337c),\
376         PINGROUP(SPI1_CS0_N,            PX6,            AUDIO,          SPI2,           SPI1,           INVALID,        GMI,            RSVD,   INPUT,  0x3380),\
377         PINGROUP(SPI1_MISO,             PX7,            AUDIO,          INVALID,        SPI1,           INVALID,        RSVD3,          RSVD,   INPUT,  0x3384),\
378         PINGROUP(SPI2_CS1_N,            PW2,            AUDIO,          INVALID,        SPI2,           INVALID,        INVALID,        RSVD,   INPUT,  0x3388),\
379         PINGROUP(SPI2_CS2_N,            PW3,            AUDIO,          INVALID,        SPI2,           INVALID,        INVALID,        RSVD,   INPUT,  0x338c),\
380         PINGROUP(SDMMC3_CLK,            PA6,            SDMMC3,         UARTA,          PWM2,           SDIO3,          INVALID,        RSVD,   INPUT,  0x3390),\
381         PINGROUP(SDMMC3_CMD,            PA7,            SDMMC3,         UARTA,          PWM3,           SDIO3,          INVALID,        RSVD,   INPUT,  0x3394),\
382         PINGROUP(SDMMC3_DAT0,           PB7,            SDMMC3,         RSVD,           RSVD1,          SDIO3,          INVALID,        RSVD,   INPUT,  0x3398),\
383         PINGROUP(SDMMC3_DAT1,           PB6,            SDMMC3,         RSVD,           RSVD1,          SDIO3,          INVALID,        RSVD,   INPUT,  0x339c),\
384         PINGROUP(SDMMC3_DAT2,           PB5,            SDMMC3,         RSVD,           PWM1,           SDIO3,          INVALID,        RSVD,   INPUT,  0x33a0),\
385         PINGROUP(SDMMC3_DAT3,           PB4,            SDMMC3,         RSVD,           PWM0,           SDIO3,          INVALID,        RSVD,   INPUT,  0x33a4),\
386         PINGROUP(SDMMC3_DAT4,           PD1,            SDMMC3,         PWM1,           INVALID,        SDIO3,          INVALID,        RSVD,   INPUT,  0x33a8),\
387         PINGROUP(SDMMC3_DAT5,           PD0,            SDMMC3,         PWM0,           INVALID,        SDIO3,          INVALID,        RSVD,   INPUT,  0x33ac),\
388         PINGROUP(SDMMC3_DAT6,           PD3,            SDMMC3,         SPDIF,          INVALID,        SDIO3,          INVALID,        RSVD,   INPUT,  0x33b0),\
389         PINGROUP(SDMMC3_DAT7,           PD4,            SDMMC3,         SPDIF,          INVALID,        SDIO3,          INVALID,        RSVD,   INPUT,  0x33b4),\
390         PINGROUP(PEX_L0_PRSNT_N,        PDD0,           PEXCTL,         PCIE,           HDA,            RSVD2,          RSVD3,          RSVD,   INPUT,  0x33b8),\
391         PINGROUP(PEX_L0_RST_N,          PDD1,           PEXCTL,         PCIE,           HDA,            RSVD2,          RSVD3,          RSVD,   INPUT,  0x33bc),\
392         PINGROUP(PEX_L0_CLKREQ_N,       PDD2,           PEXCTL,         PCIE,           HDA,            RSVD2,          RSVD3,          RSVD,   INPUT,  0x33c0),\
393         PINGROUP(PEX_WAKE_N,            PDD3,           PEXCTL,         PCIE,           HDA,            RSVD2,          RSVD3,          RSVD,   INPUT,  0x33c4),\
394         PINGROUP(PEX_L1_PRSNT_N,        PDD4,           PEXCTL,         PCIE,           HDA,            RSVD2,          RSVD3,          RSVD,   INPUT,  0x33c8),\
395         PINGROUP(PEX_L1_RST_N,          PDD5,           PEXCTL,         PCIE,           HDA,            RSVD2,          RSVD3,          RSVD,   INPUT,  0x33cc),\
396         PINGROUP(PEX_L1_CLKREQ_N,       PDD6,           PEXCTL,         PCIE,           HDA,            RSVD2,          RSVD3,          RSVD,   INPUT,  0x33d0),\
397         PINGROUP(PEX_L2_PRSNT_N,        PDD7,           PEXCTL,         PCIE,           HDA,            RSVD2,          RSVD3,          RSVD,   INPUT,  0x33d4),\
398         PINGROUP(PEX_L2_RST_N,          PCC6,           PEXCTL,         PCIE,           HDA,            RSVD2,          RSVD3,          RSVD,   INPUT,  0x33d8),\
399         PINGROUP(PEX_L2_CLKREQ_N,       PCC7,           PEXCTL,         PCIE,           HDA,            RSVD2,          RSVD3,          RSVD,   INPUT,  0x33dc),\
400         PINGROUP(HDMI_CEC,              PEE3,           SYS,            CEC,            RSVD1,          RSVD2,          RSVD3,          RSVD,   INPUT,  0x33e0),\
401         /* END OF LIST */
403 static const struct tegra_pingroup_desc tegra_soc_pingroups[TEGRA_MAX_PINGROUP] = {
404         PINGROUPS
405 };
407 #undef PINGROUP
409 #define PINGROUP(pg_name, gpio_nr, vdd, f0, f1, f2, f3, fs, iod, reg)   \
410         [TEGRA_GPIO_##gpio_nr] =  TEGRA_PINGROUP_ ##pg_name\
412 static const int gpio_to_pingroup[TEGRA_MAX_GPIO] = {
413         PINGROUPS
414 };
416 #define SET_DRIVE(_name, _hsm, _schmitt, _drive, _pulldn_drive, _pullup_drive, _pulldn_slew, _pullup_slew) \
417         {                                                       \
418                 .pingroup = TEGRA_DRIVE_PINGROUP_##_name,       \
419                 .hsm = TEGRA_HSM_##_hsm,                        \
420                 .schmitt = TEGRA_SCHMITT_##_schmitt,            \
421                 .drive = TEGRA_DRIVE_##_drive,                  \
422                 .pull_down = TEGRA_PULL_##_pulldn_drive,        \
423                 .pull_up = TEGRA_PULL_##_pullup_drive,          \
424                 .slew_rising = TEGRA_SLEW_##_pulldn_slew,       \
425                 .slew_falling = TEGRA_SLEW_##_pullup_slew,      \
426         }
428 static __initdata struct tegra_drive_pingroup_config t30_def_drive_pinmux[] = {
430 };
432 void tegra30_pinmux_init(const struct tegra_pingroup_desc **pg,
433                 int *pg_max, const struct tegra_drive_pingroup_desc **pgdrive,
434                 int *pgdrive_max, const int **gpiomap, int *gpiomap_max)
435 {
436         *pg = tegra_soc_pingroups;
437         *pg_max = TEGRA_MAX_PINGROUP;
438         *pgdrive = tegra_soc_drive_pingroups;
439         *pgdrive_max = TEGRA_MAX_DRIVE_PINGROUP;
440         *gpiomap = gpio_to_pingroup;
441         *gpiomap_max = TEGRA_MAX_GPIO;
442 }
444 void tegra30_default_pinmux()
445 {
446         tegra_drive_pinmux_config_table(t30_def_drive_pinmux,
447                                         ARRAY_SIZE(t30_def_drive_pinmux));
448 }