diff options
Diffstat (limited to 'arch/arm/mach-tegra/board-harmony-pinmux.c')
-rw-r--r-- | arch/arm/mach-tegra/board-harmony-pinmux.c | 266 |
1 files changed, 126 insertions, 140 deletions
diff --git a/arch/arm/mach-tegra/board-harmony-pinmux.c b/arch/arm/mach-tegra/board-harmony-pinmux.c index 1af85bccc0f1..83d420fbc58c 100644 --- a/arch/arm/mach-tegra/board-harmony-pinmux.c +++ b/arch/arm/mach-tegra/board-harmony-pinmux.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * arch/arm/mach-tegra/board-harmony-pinmux.c | 2 | * arch/arm/mach-tegra/board-harmony-pinmux.c |
3 | * | 3 | * |
4 | * Copyright (C) 2010 Google, Inc. | 4 | * Copyright (C) 2010 Google, Inc. |
5 | * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. | ||
5 | * | 6 | * |
6 | * This software is licensed under the terms of the GNU General Public | 7 | * This software is licensed under the terms of the GNU General Public |
7 | * License version 2, as published by the Free Software Foundation, and | 8 | * License version 2, as published by the Free Software Foundation, and |
@@ -15,153 +16,138 @@ | |||
15 | */ | 16 | */ |
16 | 17 | ||
17 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
18 | #include <linux/gpio.h> | ||
19 | #include <linux/of.h> | ||
20 | 19 | ||
21 | #include <mach/pinmux.h> | ||
22 | #include <mach/pinmux-tegra20.h> | ||
23 | |||
24 | #include "gpio-names.h" | ||
25 | #include "board-harmony.h" | 20 | #include "board-harmony.h" |
26 | #include "board-pinmux.h" | 21 | #include "board-pinmux.h" |
27 | 22 | ||
28 | static struct tegra_pingroup_config harmony_pinmux[] = { | 23 | static struct pinctrl_map harmony_map[] = { |
29 | {TEGRA_PINGROUP_ATA, TEGRA_MUX_IDE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 24 | TEGRA_MAP_MUXCONF("ata", "ide", none, driven), |
30 | {TEGRA_PINGROUP_ATB, TEGRA_MUX_SDIO4, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 25 | TEGRA_MAP_MUXCONF("atb", "sdio4", none, driven), |
31 | {TEGRA_PINGROUP_ATC, TEGRA_MUX_NAND, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 26 | TEGRA_MAP_MUXCONF("atc", "nand", none, driven), |
32 | {TEGRA_PINGROUP_ATD, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 27 | TEGRA_MAP_MUXCONF("atd", "gmi", none, driven), |
33 | {TEGRA_PINGROUP_ATE, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 28 | TEGRA_MAP_MUXCONF("ate", "gmi", none, driven), |
34 | {TEGRA_PINGROUP_CDEV1, TEGRA_MUX_PLLA_OUT, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 29 | TEGRA_MAP_MUXCONF("cdev1", "plla_out", none, driven), |
35 | {TEGRA_PINGROUP_CDEV2, TEGRA_MUX_PLLP_OUT4, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE}, | 30 | TEGRA_MAP_MUXCONF("cdev2", "pllp_out4", down, tristate), |
36 | {TEGRA_PINGROUP_CRTP, TEGRA_MUX_CRT, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, | 31 | TEGRA_MAP_MUXCONF("crtp", "crt", none, tristate), |
37 | {TEGRA_PINGROUP_CSUS, TEGRA_MUX_VI_SENSOR_CLK, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE}, | 32 | TEGRA_MAP_MUXCONF("csus", "vi_sensor_clk", down, tristate), |
38 | {TEGRA_PINGROUP_DAP1, TEGRA_MUX_DAP1, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 33 | TEGRA_MAP_MUXCONF("dap1", "dap1", none, driven), |
39 | {TEGRA_PINGROUP_DAP2, TEGRA_MUX_DAP2, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, | 34 | TEGRA_MAP_MUXCONF("dap2", "dap2", none, tristate), |
40 | {TEGRA_PINGROUP_DAP3, TEGRA_MUX_DAP3, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, | 35 | TEGRA_MAP_MUXCONF("dap3", "dap3", none, tristate), |
41 | {TEGRA_PINGROUP_DAP4, TEGRA_MUX_DAP4, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, | 36 | TEGRA_MAP_MUXCONF("dap4", "dap4", none, tristate), |
42 | {TEGRA_PINGROUP_DDC, TEGRA_MUX_I2C2, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, | 37 | TEGRA_MAP_MUXCONF("ddc", "i2c2", up, driven), |
43 | {TEGRA_PINGROUP_DTA, TEGRA_MUX_SDIO2, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, | 38 | TEGRA_MAP_MUXCONF("dta", "sdio2", up, driven), |
44 | {TEGRA_PINGROUP_DTB, TEGRA_MUX_RSVD1, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 39 | TEGRA_MAP_MUXCONF("dtb", "rsvd1", none, driven), |
45 | {TEGRA_PINGROUP_DTC, TEGRA_MUX_RSVD1, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, | 40 | TEGRA_MAP_MUXCONF("dtc", "rsvd1", none, tristate), |
46 | {TEGRA_PINGROUP_DTD, TEGRA_MUX_SDIO2, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, | 41 | TEGRA_MAP_MUXCONF("dtd", "sdio2", up, driven), |
47 | {TEGRA_PINGROUP_DTE, TEGRA_MUX_RSVD1, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, | 42 | TEGRA_MAP_MUXCONF("dte", "rsvd1", none, tristate), |
48 | {TEGRA_PINGROUP_DTF, TEGRA_MUX_I2C3, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, | 43 | TEGRA_MAP_MUXCONF("dtf", "i2c3", none, tristate), |
49 | {TEGRA_PINGROUP_GMA, TEGRA_MUX_SDIO4, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 44 | TEGRA_MAP_MUXCONF("gma", "sdio4", none, driven), |
50 | {TEGRA_PINGROUP_GMB, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 45 | TEGRA_MAP_MUXCONF("gmb", "gmi", none, driven), |
51 | {TEGRA_PINGROUP_GMC, TEGRA_MUX_UARTD, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 46 | TEGRA_MAP_MUXCONF("gmc", "uartd", none, driven), |
52 | {TEGRA_PINGROUP_GMD, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 47 | TEGRA_MAP_MUXCONF("gmd", "gmi", none, driven), |
53 | {TEGRA_PINGROUP_GME, TEGRA_MUX_SDIO4, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 48 | TEGRA_MAP_MUXCONF("gme", "sdio4", none, driven), |
54 | {TEGRA_PINGROUP_GPU, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, | 49 | TEGRA_MAP_MUXCONF("gpu", "gmi", none, tristate), |
55 | {TEGRA_PINGROUP_GPU7, TEGRA_MUX_RTCK, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 50 | TEGRA_MAP_MUXCONF("gpu7", "rtck", none, driven), |
56 | {TEGRA_PINGROUP_GPV, TEGRA_MUX_PCIE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 51 | TEGRA_MAP_MUXCONF("gpv", "pcie", none, driven), |
57 | {TEGRA_PINGROUP_HDINT, TEGRA_MUX_HDMI, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 52 | TEGRA_MAP_MUXCONF("hdint", "hdmi", na, tristate), |
58 | {TEGRA_PINGROUP_I2CP, TEGRA_MUX_I2C, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 53 | TEGRA_MAP_MUXCONF("i2cp", "i2cp", none, driven), |
59 | {TEGRA_PINGROUP_IRRX, TEGRA_MUX_UARTA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 54 | TEGRA_MAP_MUXCONF("irrx", "uarta", up, tristate), |
60 | {TEGRA_PINGROUP_IRTX, TEGRA_MUX_UARTA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 55 | TEGRA_MAP_MUXCONF("irtx", "uarta", up, tristate), |
61 | {TEGRA_PINGROUP_KBCA, TEGRA_MUX_KBC, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, | 56 | TEGRA_MAP_MUXCONF("kbca", "kbc", up, driven), |
62 | {TEGRA_PINGROUP_KBCB, TEGRA_MUX_KBC, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, | 57 | TEGRA_MAP_MUXCONF("kbcb", "kbc", up, driven), |
63 | {TEGRA_PINGROUP_KBCC, TEGRA_MUX_KBC, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, | 58 | TEGRA_MAP_MUXCONF("kbcc", "kbc", up, driven), |
64 | {TEGRA_PINGROUP_KBCD, TEGRA_MUX_KBC, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, | 59 | TEGRA_MAP_MUXCONF("kbcd", "kbc", up, driven), |
65 | {TEGRA_PINGROUP_KBCE, TEGRA_MUX_KBC, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, | 60 | TEGRA_MAP_MUXCONF("kbce", "kbc", up, driven), |
66 | {TEGRA_PINGROUP_KBCF, TEGRA_MUX_KBC, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, | 61 | TEGRA_MAP_MUXCONF("kbcf", "kbc", up, driven), |
67 | {TEGRA_PINGROUP_LCSN, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 62 | TEGRA_MAP_MUXCONF("lcsn", "displaya", na, tristate), |
68 | {TEGRA_PINGROUP_LD0, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 63 | TEGRA_MAP_MUXCONF("ld0", "displaya", na, driven), |
69 | {TEGRA_PINGROUP_LD1, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 64 | TEGRA_MAP_MUXCONF("ld1", "displaya", na, driven), |
70 | {TEGRA_PINGROUP_LD10, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 65 | TEGRA_MAP_MUXCONF("ld10", "displaya", na, driven), |
71 | {TEGRA_PINGROUP_LD11, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 66 | TEGRA_MAP_MUXCONF("ld11", "displaya", na, driven), |
72 | {TEGRA_PINGROUP_LD12, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 67 | TEGRA_MAP_MUXCONF("ld12", "displaya", na, driven), |
73 | {TEGRA_PINGROUP_LD13, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 68 | TEGRA_MAP_MUXCONF("ld13", "displaya", na, driven), |
74 | {TEGRA_PINGROUP_LD14, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 69 | TEGRA_MAP_MUXCONF("ld14", "displaya", na, driven), |
75 | {TEGRA_PINGROUP_LD15, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 70 | TEGRA_MAP_MUXCONF("ld15", "displaya", na, driven), |
76 | {TEGRA_PINGROUP_LD16, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 71 | TEGRA_MAP_MUXCONF("ld16", "displaya", na, driven), |
77 | {TEGRA_PINGROUP_LD17, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 72 | TEGRA_MAP_MUXCONF("ld17", "displaya", na, driven), |
78 | {TEGRA_PINGROUP_LD2, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 73 | TEGRA_MAP_MUXCONF("ld2", "displaya", na, driven), |
79 | {TEGRA_PINGROUP_LD3, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 74 | TEGRA_MAP_MUXCONF("ld3", "displaya", na, driven), |
80 | {TEGRA_PINGROUP_LD4, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 75 | TEGRA_MAP_MUXCONF("ld4", "displaya", na, driven), |
81 | {TEGRA_PINGROUP_LD5, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 76 | TEGRA_MAP_MUXCONF("ld5", "displaya", na, driven), |
82 | {TEGRA_PINGROUP_LD6, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 77 | TEGRA_MAP_MUXCONF("ld6", "displaya", na, driven), |
83 | {TEGRA_PINGROUP_LD7, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 78 | TEGRA_MAP_MUXCONF("ld7", "displaya", na, driven), |
84 | {TEGRA_PINGROUP_LD8, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 79 | TEGRA_MAP_MUXCONF("ld8", "displaya", na, driven), |
85 | {TEGRA_PINGROUP_LD9, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 80 | TEGRA_MAP_MUXCONF("ld9", "displaya", na, driven), |
86 | {TEGRA_PINGROUP_LDC, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 81 | TEGRA_MAP_MUXCONF("ldc", "displaya", na, tristate), |
87 | {TEGRA_PINGROUP_LDI, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 82 | TEGRA_MAP_MUXCONF("ldi", "displaya", na, driven), |
88 | {TEGRA_PINGROUP_LHP0, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 83 | TEGRA_MAP_MUXCONF("lhp0", "displaya", na, driven), |
89 | {TEGRA_PINGROUP_LHP1, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 84 | TEGRA_MAP_MUXCONF("lhp1", "displaya", na, driven), |
90 | {TEGRA_PINGROUP_LHP2, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 85 | TEGRA_MAP_MUXCONF("lhp2", "displaya", na, driven), |
91 | {TEGRA_PINGROUP_LHS, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, | 86 | TEGRA_MAP_MUXCONF("lhs", "displaya", na, driven), |
92 | {TEGRA_PINGROUP_LM0, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, | 87 | TEGRA_MAP_MUXCONF("lm0", "displaya", na, driven), |
93 | {TEGRA_PINGROUP_LM1, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 88 | TEGRA_MAP_MUXCONF("lm1", "displaya", na, tristate), |
94 | {TEGRA_PINGROUP_LPP, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 89 | TEGRA_MAP_MUXCONF("lpp", "displaya", na, driven), |
95 | {TEGRA_PINGROUP_LPW0, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, | 90 | TEGRA_MAP_MUXCONF("lpw0", "displaya", na, driven), |
96 | {TEGRA_PINGROUP_LPW1, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 91 | TEGRA_MAP_MUXCONF("lpw1", "displaya", na, tristate), |
97 | {TEGRA_PINGROUP_LPW2, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, | 92 | TEGRA_MAP_MUXCONF("lpw2", "displaya", na, driven), |
98 | {TEGRA_PINGROUP_LSC0, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, | 93 | TEGRA_MAP_MUXCONF("lsc0", "displaya", na, driven), |
99 | {TEGRA_PINGROUP_LSC1, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 94 | TEGRA_MAP_MUXCONF("lsc1", "displaya", na, tristate), |
100 | {TEGRA_PINGROUP_LSCK, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 95 | TEGRA_MAP_MUXCONF("lsck", "displaya", na, tristate), |
101 | {TEGRA_PINGROUP_LSDA, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 96 | TEGRA_MAP_MUXCONF("lsda", "displaya", na, tristate), |
102 | {TEGRA_PINGROUP_LSDI, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 97 | TEGRA_MAP_MUXCONF("lsdi", "displaya", na, tristate), |
103 | {TEGRA_PINGROUP_LSPI, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, | 98 | TEGRA_MAP_MUXCONF("lspi", "displaya", na, driven), |
104 | {TEGRA_PINGROUP_LVP0, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 99 | TEGRA_MAP_MUXCONF("lvp0", "displaya", na, tristate), |
105 | {TEGRA_PINGROUP_LVP1, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 100 | TEGRA_MAP_MUXCONF("lvp1", "displaya", na, driven), |
106 | {TEGRA_PINGROUP_LVS, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, | 101 | TEGRA_MAP_MUXCONF("lvs", "displaya", na, driven), |
107 | {TEGRA_PINGROUP_OWC, TEGRA_MUX_RSVD2, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 102 | TEGRA_MAP_MUXCONF("owc", "rsvd2", na, tristate), |
108 | {TEGRA_PINGROUP_PMC, TEGRA_MUX_PWR_ON, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 103 | TEGRA_MAP_MUXCONF("pmc", "pwr_on", na, driven), |
109 | {TEGRA_PINGROUP_PTA, TEGRA_MUX_HDMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 104 | TEGRA_MAP_MUXCONF("pta", "hdmi", none, driven), |
110 | {TEGRA_PINGROUP_RM, TEGRA_MUX_I2C, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 105 | TEGRA_MAP_MUXCONF("rm", "i2c1", none, driven), |
111 | {TEGRA_PINGROUP_SDB, TEGRA_MUX_PWM, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, | 106 | TEGRA_MAP_MUXCONF("sdb", "pwm", na, tristate), |
112 | {TEGRA_PINGROUP_SDC, TEGRA_MUX_PWM, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, | 107 | TEGRA_MAP_MUXCONF("sdc", "pwm", up, driven), |
113 | {TEGRA_PINGROUP_SDD, TEGRA_MUX_PWM, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 108 | TEGRA_MAP_MUXCONF("sdd", "pwm", up, tristate), |
114 | {TEGRA_PINGROUP_SDIO1, TEGRA_MUX_SDIO1, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, | 109 | TEGRA_MAP_MUXCONF("sdio1", "sdio1", none, tristate), |
115 | {TEGRA_PINGROUP_SLXA, TEGRA_MUX_PCIE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 110 | TEGRA_MAP_MUXCONF("slxa", "pcie", none, driven), |
116 | {TEGRA_PINGROUP_SLXC, TEGRA_MUX_SPDIF, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, | 111 | TEGRA_MAP_MUXCONF("slxc", "spdif", none, tristate), |
117 | {TEGRA_PINGROUP_SLXD, TEGRA_MUX_SPDIF, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, | 112 | TEGRA_MAP_MUXCONF("slxd", "spdif", none, tristate), |
118 | {TEGRA_PINGROUP_SLXK, TEGRA_MUX_PCIE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 113 | TEGRA_MAP_MUXCONF("slxk", "pcie", none, driven), |
119 | {TEGRA_PINGROUP_SPDI, TEGRA_MUX_RSVD2, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, | 114 | TEGRA_MAP_MUXCONF("spdi", "rsvd2", none, tristate), |
120 | {TEGRA_PINGROUP_SPDO, TEGRA_MUX_RSVD2, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, | 115 | TEGRA_MAP_MUXCONF("spdo", "rsvd2", none, tristate), |
121 | {TEGRA_PINGROUP_SPIA, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 116 | TEGRA_MAP_MUXCONF("spia", "gmi", none, driven), |
122 | {TEGRA_PINGROUP_SPIB, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 117 | TEGRA_MAP_MUXCONF("spib", "gmi", none, driven), |
123 | {TEGRA_PINGROUP_SPIC, TEGRA_MUX_GMI, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 118 | TEGRA_MAP_MUXCONF("spic", "gmi", up, tristate), |
124 | {TEGRA_PINGROUP_SPID, TEGRA_MUX_SPI1, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE}, | 119 | TEGRA_MAP_MUXCONF("spid", "spi1", down, tristate), |
125 | {TEGRA_PINGROUP_SPIE, TEGRA_MUX_SPI1, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 120 | TEGRA_MAP_MUXCONF("spie", "spi1", up, tristate), |
126 | {TEGRA_PINGROUP_SPIF, TEGRA_MUX_SPI1, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE}, | 121 | TEGRA_MAP_MUXCONF("spif", "spi1", down, tristate), |
127 | {TEGRA_PINGROUP_SPIG, TEGRA_MUX_SPI2_ALT, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, | 122 | TEGRA_MAP_MUXCONF("spig", "spi2_alt", none, tristate), |
128 | {TEGRA_PINGROUP_SPIH, TEGRA_MUX_SPI2_ALT, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 123 | TEGRA_MAP_MUXCONF("spih", "spi2_alt", up, tristate), |
129 | {TEGRA_PINGROUP_UAA, TEGRA_MUX_ULPI, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 124 | TEGRA_MAP_MUXCONF("uaa", "ulpi", up, tristate), |
130 | {TEGRA_PINGROUP_UAB, TEGRA_MUX_ULPI, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 125 | TEGRA_MAP_MUXCONF("uab", "ulpi", up, tristate), |
131 | {TEGRA_PINGROUP_UAC, TEGRA_MUX_RSVD2, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, | 126 | TEGRA_MAP_MUXCONF("uac", "rsvd2", none, tristate), |
132 | {TEGRA_PINGROUP_UAD, TEGRA_MUX_IRDA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 127 | TEGRA_MAP_MUXCONF("uad", "irda", up, tristate), |
133 | {TEGRA_PINGROUP_UCA, TEGRA_MUX_UARTC, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 128 | TEGRA_MAP_MUXCONF("uca", "uartc", up, tristate), |
134 | {TEGRA_PINGROUP_UCB, TEGRA_MUX_UARTC, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 129 | TEGRA_MAP_MUXCONF("ucb", "uartc", up, tristate), |
135 | {TEGRA_PINGROUP_UDA, TEGRA_MUX_ULPI, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, | 130 | TEGRA_MAP_MUXCONF("uda", "ulpi", none, tristate), |
136 | {TEGRA_PINGROUP_CK32, TEGRA_MUX_NONE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 131 | TEGRA_MAP_CONF("ck32", none, na), |
137 | {TEGRA_PINGROUP_DDRC, TEGRA_MUX_NONE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 132 | TEGRA_MAP_CONF("ddrc", none, na), |
138 | {TEGRA_PINGROUP_PMCA, TEGRA_MUX_NONE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 133 | TEGRA_MAP_CONF("pmca", none, na), |
139 | {TEGRA_PINGROUP_PMCB, TEGRA_MUX_NONE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 134 | TEGRA_MAP_CONF("pmcb", none, na), |
140 | {TEGRA_PINGROUP_PMCC, TEGRA_MUX_NONE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 135 | TEGRA_MAP_CONF("pmcc", none, na), |
141 | {TEGRA_PINGROUP_PMCD, TEGRA_MUX_NONE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 136 | TEGRA_MAP_CONF("pmcd", none, na), |
142 | {TEGRA_PINGROUP_PMCE, TEGRA_MUX_NONE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 137 | TEGRA_MAP_CONF("pmce", none, na), |
143 | {TEGRA_PINGROUP_XM2C, TEGRA_MUX_NONE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 138 | TEGRA_MAP_CONF("xm2c", none, na), |
144 | {TEGRA_PINGROUP_XM2D, TEGRA_MUX_NONE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 139 | TEGRA_MAP_CONF("xm2d", none, na), |
145 | }; | 140 | TEGRA_MAP_CONF("ls", up, na), |
146 | 141 | TEGRA_MAP_CONF("lc", up, na), | |
147 | static struct tegra_gpio_table gpio_table[] = { | 142 | TEGRA_MAP_CONF("ld17_0", down, na), |
148 | { .gpio = TEGRA_GPIO_SD2_CD, .enable = true }, | 143 | TEGRA_MAP_CONF("ld19_18", down, na), |
149 | { .gpio = TEGRA_GPIO_SD2_WP, .enable = true }, | 144 | TEGRA_MAP_CONF("ld21_20", down, na), |
150 | { .gpio = TEGRA_GPIO_SD2_POWER, .enable = true }, | 145 | TEGRA_MAP_CONF("ld23_22", down, na), |
151 | { .gpio = TEGRA_GPIO_SD4_CD, .enable = true }, | ||
152 | { .gpio = TEGRA_GPIO_SD4_WP, .enable = true }, | ||
153 | { .gpio = TEGRA_GPIO_SD4_POWER, .enable = true }, | ||
154 | { .gpio = TEGRA_GPIO_CDC_IRQ, .enable = true }, | ||
155 | { .gpio = TEGRA_GPIO_HP_DET, .enable = true }, | ||
156 | { .gpio = TEGRA_GPIO_INT_MIC_EN, .enable = true }, | ||
157 | { .gpio = TEGRA_GPIO_EXT_MIC_EN, .enable = true }, | ||
158 | }; | 146 | }; |
159 | 147 | ||
160 | static struct tegra_board_pinmux_conf conf = { | 148 | static struct tegra_board_pinmux_conf conf = { |
161 | .pgs = harmony_pinmux, | 149 | .maps = harmony_map, |
162 | .pg_count = ARRAY_SIZE(harmony_pinmux), | 150 | .map_count = ARRAY_SIZE(harmony_map), |
163 | .gpios = gpio_table, | ||
164 | .gpio_count = ARRAY_SIZE(gpio_table), | ||
165 | }; | 151 | }; |
166 | 152 | ||
167 | void harmony_pinmux_init(void) | 153 | void harmony_pinmux_init(void) |