ARM: tegra: introduce manual config table for t11x
Andy Park [Wed, 17 Apr 2013 23:43:16 +0000 (16:43 -0700)]
To facilitate and keep track of software changes on pinmux table, manual
configuration table is introduced so that the developers are aware of pinmux
settings that are not in sync with the spreadsheet. Any pinmux configuration
changes made in software side should be upstreamed to spreadsheet.

Some refactorings are done to reduce the redundancy and new macros for gpio and
unused pins are introduced as well to be sync'd with the current autogeneration
tool.

Bug 1256207
Bug 1231210

Change-Id: I39e23cd335d36b8e39a1b7848df65d261ddbd24d
Signed-off-by: Andy Park <andyp@nvidia.com>
Signed-off-by: Ashwini Ghuge <aghuge@nvidia.com>
Reviewed-on: http://git-master/r/220389
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

arch/arm/mach-tegra/board-curacao-pinmux.c
arch/arm/mach-tegra/board-dalmore-pinmux.c
arch/arm/mach-tegra/board-macallan-pinmux.c
arch/arm/mach-tegra/board-pismo-pinmux.c
arch/arm/mach-tegra/board-pluto-pinmux.c
arch/arm/mach-tegra/board-roth-pinmux.c
arch/arm/mach-tegra/include/mach/pinmux-t11.h

index 9ca4fa1..fbd84d5 100644 (file)
 #include <mach/pinmux.h>
 #include <mach/pinmux-t11.h>
 
-#define DEFAULT_DRIVE(_name)                                   \
-       {                                                       \
-               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,       \
-               .hsm = TEGRA_HSM_DISABLE,                       \
-               .schmitt = TEGRA_SCHMITT_ENABLE,                \
-               .drive = TEGRA_DRIVE_DIV_1,                     \
-               .pull_down = TEGRA_PULL_31,                     \
-               .pull_up = TEGRA_PULL_31,                       \
-               .slew_rising = TEGRA_SLEW_SLOWEST,              \
-               .slew_falling = TEGRA_SLEW_SLOWEST,             \
-       }
-
-
 static __initdata struct tegra_drive_pingroup_config curacao_drive_pinmux[] = {
        /* DEFAULT_DRIVE(<pin_group>), */
 };
 
-#define DEFAULT_PINMUX(_pingroup, _mux, _pupd, _tri, _io)      \
-       {                                                       \
-               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
-               .func           = TEGRA_MUX_##_mux,             \
-               .pupd           = TEGRA_PUPD_##_pupd,           \
-               .tristate       = TEGRA_TRI_##_tri,             \
-               .io             = TEGRA_PIN_##_io,              \
-       }
-
 static __initdata struct tegra_pingroup_config curacao_pinmux[] = {
        DEFAULT_PINMUX(ULPI_DATA0,      ULPI,            NORMAL,    NORMAL,     INPUT),
        DEFAULT_PINMUX(ULPI_DATA1,      ULPI,            NORMAL,    NORMAL,     INPUT),
index 3cd6b3f..7421879 100644 (file)
 
 #include <mach/pinmux-t11.h>
 
-#define DEFAULT_DRIVE(_name)                                   \
-       {                                                       \
-               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,       \
-               .hsm = TEGRA_HSM_DISABLE,                       \
-               .schmitt = TEGRA_SCHMITT_ENABLE,                \
-               .drive = TEGRA_DRIVE_DIV_1,                     \
-               .pull_down = TEGRA_PULL_31,                     \
-               .pull_up = TEGRA_PULL_31,                       \
-               .slew_rising = TEGRA_SLEW_SLOWEST,              \
-               .slew_falling = TEGRA_SLEW_SLOWEST,             \
-       }
-/* Setting the drive strength of pins
- * hsm: Enable High speed mode (ENABLE/DISABLE)
- * Schimit: Enable/disable schimit (ENABLE/DISABLE)
- * drive: low power mode (DIV_1, DIV_2, DIV_4, DIV_8)
- * pulldn_drive - drive down (falling edge) - Driver Output Pull-Down drive
- *                strength code. Value from 0 to 31.
- * pullup_drive - drive up (rising edge)  - Driver Output Pull-Up drive
- *                strength code. Value from 0 to 31.
- * pulldn_slew -  Driver Output Pull-Up slew control code  - 2bit code
- *                code 11 is least slewing of signal. code 00 is highest
- *                slewing of the signal.
- *                Value - FASTEST, FAST, SLOW, SLOWEST
- * pullup_slew -  Driver Output Pull-Down slew control code -
- *                code 11 is least slewing of signal. code 00 is highest
- *                slewing of the signal.
- *                Value - FASTEST, FAST, SLOW, SLOWEST
- */
-#define SET_DRIVE(_name, _hsm, _schmitt, _drive, _pulldn_drive, _pullup_drive, _pulldn_slew, _pullup_slew) \
-       {                                               \
-               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,   \
-               .hsm = TEGRA_HSM_##_hsm,                    \
-               .schmitt = TEGRA_SCHMITT_##_schmitt,        \
-               .drive = TEGRA_DRIVE_##_drive,              \
-               .pull_down = TEGRA_PULL_##_pulldn_drive,    \
-               .pull_up = TEGRA_PULL_##_pullup_drive,          \
-               .slew_rising = TEGRA_SLEW_##_pulldn_slew,   \
-               .slew_falling = TEGRA_SLEW_##_pullup_slew,      \
-       }
-
-/* Setting the drive strength of pins
- * hsm: Enable High speed mode (ENABLE/DISABLE)
- * Schimit: Enable/disable schimit (ENABLE/DISABLE)
- * drive: low power mode (DIV_1, DIV_2, DIV_4, DIV_8)
- * pulldn_drive - drive down (falling edge) - Driver Output Pull-Down drive
- *                strength code. Value from 0 to 31.
- * pullup_drive - drive up (rising edge)  - Driver Output Pull-Up drive
- *                strength code. Value from 0 to 31.
- * pulldn_slew -  Driver Output Pull-Up slew control code  - 2bit code
- *                code 11 is least slewing of signal. code 00 is highest
- *                slewing of the signal.
- *                Value - FASTEST, FAST, SLOW, SLOWEST
- * pullup_slew -  Driver Output Pull-Down slew control code -
- *                code 11 is least slewing of signal. code 00 is highest
- *                slewing of the signal.
- *                Value - FASTEST, FAST, SLOW, SLOWEST
- * drive_type - Drive type to be used depending on the resistors.
- */
-
-#define SET_DRIVE_WITH_TYPE(_name, _hsm, _schmitt, _drive, _pulldn_drive,\
-               _pullup_drive, _pulldn_slew, _pullup_slew, _drive_type) \
-       {                                                               \
-               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,               \
-               .hsm = TEGRA_HSM_##_hsm,                                \
-               .schmitt = TEGRA_SCHMITT_##_schmitt,                    \
-               .drive = TEGRA_DRIVE_##_drive,                          \
-                .pull_down = TEGRA_PULL_##_pulldn_drive,               \
-               .pull_up = TEGRA_PULL_##_pullup_drive,                  \
-               .slew_rising = TEGRA_SLEW_##_pulldn_slew,               \
-               .slew_falling = TEGRA_SLEW_##_pullup_slew,              \
-               .drive_type = TEGRA_DRIVE_TYPE_##_drive_type,           \
-       }
-
-#define DEFAULT_PINMUX(_pingroup, _mux, _pupd, _tri, _io)      \
-       {                                                       \
-               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
-               .func           = TEGRA_MUX_##_mux,             \
-               .pupd           = TEGRA_PUPD_##_pupd,           \
-               .tristate       = TEGRA_TRI_##_tri,             \
-               .io             = TEGRA_PIN_##_io,              \
-               .lock           = TEGRA_PIN_LOCK_DEFAULT,       \
-               .od             = TEGRA_PIN_OD_DEFAULT,         \
-               .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
-       }
-
-#define I2C_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _od) \
-       {                                                       \
-               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
-               .func           = TEGRA_MUX_##_mux,             \
-               .pupd           = TEGRA_PUPD_##_pupd,           \
-               .tristate       = TEGRA_TRI_##_tri,             \
-               .io             = TEGRA_PIN_##_io,              \
-               .lock           = TEGRA_PIN_LOCK_##_lock,       \
-               .od             = TEGRA_PIN_OD_##_od,           \
-               .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
-       }
-
-#define DDC_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _rcv_sel) \
-       {                                                       \
-               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
-               .func           = TEGRA_MUX_##_mux,             \
-               .pupd           = TEGRA_PUPD_##_pupd,           \
-               .tristate       = TEGRA_TRI_##_tri,             \
-               .io             = TEGRA_PIN_##_io,              \
-               .lock           = TEGRA_PIN_LOCK_##_lock,       \
-               .rcv_sel        = TEGRA_PIN_RCV_SEL_##_rcv_sel,         \
-               .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
-       }
-
-#define VI_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _ioreset) \
-       {                                                       \
-               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
-               .func           = TEGRA_MUX_##_mux,             \
-               .pupd           = TEGRA_PUPD_##_pupd,           \
-               .tristate       = TEGRA_TRI_##_tri,             \
-               .io             = TEGRA_PIN_##_io,              \
-               .lock           = TEGRA_PIN_LOCK_##_lock,       \
-               .od             = TEGRA_PIN_OD_DEFAULT,         \
-               .ioreset        = TEGRA_PIN_IO_RESET_##_ioreset \
-       }
-
-#define CEC_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _od)   \
-       {                                                               \
-               .pingroup   = TEGRA_PINGROUP_##_pingroup,                   \
-               .func       = TEGRA_MUX_##_mux,                             \
-               .pupd       = TEGRA_PUPD_##_pupd,                           \
-               .tristate   = TEGRA_TRI_##_tri,                             \
-               .io         = TEGRA_PIN_##_io,                              \
-               .lock       = TEGRA_PIN_LOCK_##_lock,                       \
-               .od         = TEGRA_PIN_OD_##_od,                           \
-               .ioreset    = TEGRA_PIN_IO_RESET_DEFAULT,                   \
-       }
-
-#define USB_PINMUX CEC_PINMUX
-
-#define GPIO_INIT_PIN_MODE(_gpio, _is_input, _value)   \
-       {                                       \
-               .gpio_nr        = _gpio,        \
-               .is_input       = _is_input,    \
-               .value          = _value,       \
-       }
-
 static __initdata struct tegra_drive_pingroup_config dalmore_drive_pinmux[] = {
        /* DEFAULT_DRIVE(<pin_group>), */
        /* SDMMC1 */
@@ -262,6 +120,12 @@ static __initdata struct tegra_pingroup_config dalmore_e1611_1001[] = {
        DEFAULT_PINMUX(KB_COL1,       KBC,         NORMAL,   NORMAL, INPUT),
 };
 
+/* THIS IS FOR EXPERIMENTAL OR WORKAROUND PURPOSES. ANYTHING INSIDE THIS TABLE
+ * SHOULD BE CONSIDERED TO BE PUSHED TO PINMUX SPREADSHEET FOR CONSISTENCY
+ */
+static __initdata struct tegra_pingroup_config manual_config_pinmux[] = {
+};
+
 static void __init dalmore_gpio_init_configure(void)
 {
        int len;
@@ -301,5 +165,8 @@ int __init dalmore_pinmux_init(void)
                tegra_pinmux_config_table(dalmore_e1611_1001,
                        ARRAY_SIZE(dalmore_e1611_1001));
 
+       tegra_pinmux_config_table(manual_config_pinmux,
+               ARRAY_SIZE(manual_config_pinmux));
+
        return 0;
 }
index af4fc11..00b12f6 100644 (file)
 
 #include <mach/pinmux-t11.h>
 
-#define DEFAULT_DRIVE(_name)                                   \
-       {                                                       \
-               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,       \
-               .hsm = TEGRA_HSM_DISABLE,                       \
-               .schmitt = TEGRA_SCHMITT_ENABLE,                \
-               .drive = TEGRA_DRIVE_DIV_1,                     \
-               .pull_down = TEGRA_PULL_31,                     \
-               .pull_up = TEGRA_PULL_31,                       \
-               .slew_rising = TEGRA_SLEW_SLOWEST,              \
-               .slew_falling = TEGRA_SLEW_SLOWEST,             \
-       }
-/* Setting the drive strength of pins
- * hsm: Enable High speed mode (ENABLE/DISABLE)
- * Schimit: Enable/disable schimit (ENABLE/DISABLE)
- * drive: low power mode (DIV_1, DIV_2, DIV_4, DIV_8)
- * pulldn_drive - drive down (falling edge) - Driver Output Pull-Down drive
- *                strength code. Value from 0 to 31.
- * pullup_drive - drive up (rising edge)  - Driver Output Pull-Up drive
- *                strength code. Value from 0 to 31.
- * pulldn_slew -  Driver Output Pull-Up slew control code  - 2bit code
- *                code 11 is least slewing of signal. code 00 is highest
- *                slewing of the signal.
- *                Value - FASTEST, FAST, SLOW, SLOWEST
- * pullup_slew -  Driver Output Pull-Down slew control code -
- *                code 11 is least slewing of signal. code 00 is highest
- *                slewing of the signal.
- *                Value - FASTEST, FAST, SLOW, SLOWEST
- */
-#define SET_DRIVE(_name, _hsm, _schmitt, _drive, _pulldn_drive, _pullup_drive, _pulldn_slew, _pullup_slew) \
-       {                                               \
-               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,   \
-               .hsm = TEGRA_HSM_##_hsm,                    \
-               .schmitt = TEGRA_SCHMITT_##_schmitt,        \
-               .drive = TEGRA_DRIVE_##_drive,              \
-               .pull_down = TEGRA_PULL_##_pulldn_drive,    \
-               .pull_up = TEGRA_PULL_##_pullup_drive,          \
-               .slew_rising = TEGRA_SLEW_##_pulldn_slew,   \
-               .slew_falling = TEGRA_SLEW_##_pullup_slew,      \
-       }
-
-/* Setting the drive strength of pins
- * hsm: Enable High speed mode (ENABLE/DISABLE)
- * Schimit: Enable/disable schimit (ENABLE/DISABLE)
- * drive: low power mode (DIV_1, DIV_2, DIV_4, DIV_8)
- * pulldn_drive - drive down (falling edge) - Driver Output Pull-Down drive
- *                strength code. Value from 0 to 31.
- * pullup_drive - drive up (rising edge)  - Driver Output Pull-Up drive
- *                strength code. Value from 0 to 31.
- * pulldn_slew -  Driver Output Pull-Up slew control code  - 2bit code
- *                code 11 is least slewing of signal. code 00 is highest
- *                slewing of the signal.
- *                Value - FASTEST, FAST, SLOW, SLOWEST
- * pullup_slew -  Driver Output Pull-Down slew control code -
- *                code 11 is least slewing of signal. code 00 is highest
- *                slewing of the signal.
- *                Value - FASTEST, FAST, SLOW, SLOWEST
- * drive_type - Drive type to be used depending on the resistors.
- */
-
-#define SET_DRIVE_WITH_TYPE(_name, _hsm, _schmitt, _drive, _pulldn_drive,\
-               _pullup_drive, _pulldn_slew, _pullup_slew, _drive_type) \
-       {                                                               \
-               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,               \
-               .hsm = TEGRA_HSM_##_hsm,                                \
-               .schmitt = TEGRA_SCHMITT_##_schmitt,                    \
-               .drive = TEGRA_DRIVE_##_drive,                          \
-               .pull_down = TEGRA_PULL_##_pulldn_drive,                \
-               .pull_up = TEGRA_PULL_##_pullup_drive,                  \
-               .slew_rising = TEGRA_SLEW_##_pulldn_slew,               \
-               .slew_falling = TEGRA_SLEW_##_pullup_slew,              \
-               .drive_type = TEGRA_DRIVE_TYPE_##_drive_type,           \
-       }
-
-#define DEFAULT_PINMUX(_pingroup, _mux, _pupd, _tri, _io)      \
-       {                                                       \
-               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
-               .func           = TEGRA_MUX_##_mux,             \
-               .pupd           = TEGRA_PUPD_##_pupd,           \
-               .tristate       = TEGRA_TRI_##_tri,             \
-               .io             = TEGRA_PIN_##_io,              \
-               .lock           = TEGRA_PIN_LOCK_DEFAULT,       \
-               .od             = TEGRA_PIN_OD_DEFAULT,         \
-               .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
-       }
-
-#define I2C_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _od) \
-       {                                                       \
-               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
-               .func           = TEGRA_MUX_##_mux,             \
-               .pupd           = TEGRA_PUPD_##_pupd,           \
-               .tristate       = TEGRA_TRI_##_tri,             \
-               .io             = TEGRA_PIN_##_io,              \
-               .lock           = TEGRA_PIN_LOCK_##_lock,       \
-               .od             = TEGRA_PIN_OD_##_od,           \
-               .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
-       }
-
-#define DDC_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _rcv_sel) \
-       {                                                       \
-               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
-               .func           = TEGRA_MUX_##_mux,             \
-               .pupd           = TEGRA_PUPD_##_pupd,           \
-               .tristate       = TEGRA_TRI_##_tri,             \
-               .io             = TEGRA_PIN_##_io,              \
-               .lock           = TEGRA_PIN_LOCK_##_lock,       \
-               .rcv_sel        = TEGRA_PIN_RCV_SEL_##_rcv_sel,         \
-               .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
-       }
-
-#define VI_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _ioreset) \
-       {                                                       \
-               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
-               .func           = TEGRA_MUX_##_mux,             \
-               .pupd           = TEGRA_PUPD_##_pupd,           \
-               .tristate       = TEGRA_TRI_##_tri,             \
-               .io             = TEGRA_PIN_##_io,              \
-               .lock           = TEGRA_PIN_LOCK_##_lock,       \
-               .od             = TEGRA_PIN_OD_DEFAULT,         \
-               .ioreset        = TEGRA_PIN_IO_RESET_##_ioreset \
-       }
-
-#define CEC_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _od)   \
-       {                                                               \
-               .pingroup   = TEGRA_PINGROUP_##_pingroup,                   \
-               .func       = TEGRA_MUX_##_mux,                             \
-               .pupd       = TEGRA_PUPD_##_pupd,                           \
-               .tristate   = TEGRA_TRI_##_tri,                             \
-               .io         = TEGRA_PIN_##_io,                              \
-               .lock       = TEGRA_PIN_LOCK_##_lock,                       \
-               .od         = TEGRA_PIN_OD_##_od,                           \
-               .ioreset    = TEGRA_PIN_IO_RESET_DEFAULT,                   \
-       }
-
-#define GPIO_PINMUX(_pingroup, _pupd, _tri, _io, _od)   \
-       {                                                   \
-               .pingroup   = TEGRA_PINGROUP_##_pingroup,       \
-               .func       = TEGRA_MUX_SAFE,                   \
-               .pupd       = TEGRA_PUPD_##_pupd,               \
-               .tristate   = TEGRA_TRI_##_tri,                 \
-               .io         = TEGRA_PIN_##_io,                  \
-               .lock       = TEGRA_PIN_LOCK_DEFAULT,           \
-               .od         = TEGRA_PIN_OD_##_od,               \
-               .ioreset    = TEGRA_PIN_IO_RESET_DEFAULT,       \
-       }
-
-#define UNUSED_PINMUX(_pingroup)                    \
-       {                                               \
-               .pingroup   = TEGRA_PINGROUP_##_pingroup,   \
-               .func       = TEGRA_MUX_SAFE,               \
-               .pupd       = TEGRA_PUPD_PULL_DOWN,         \
-               .tristate   = TEGRA_TRI_TRISTATE,           \
-               .io         = TEGRA_PIN_OUTPUT,             \
-               .lock       = TEGRA_PIN_LOCK_DEFAULT,       \
-               .od         = TEGRA_PIN_OD_DEFAULT,         \
-               .ioreset    = TEGRA_PIN_IO_RESET_DEFAULT,   \
-       }
-
-#define USB_PINMUX CEC_PINMUX
-
-#define GPIO_INIT_PIN_MODE(_gpio, _is_input, _value)   \
-       {                                       \
-               .gpio_nr        = _gpio,        \
-               .is_input       = _is_input,    \
-               .value          = _value,       \
-       }
-
 static __initdata struct tegra_drive_pingroup_config macallan_drive_pinmux[] = {
        /* DEFAULT_DRIVE(<pin_group>), */
        /* SDMMC1 */
@@ -207,9 +41,9 @@ static __initdata struct tegra_drive_pingroup_config macallan_drive_pinmux[] = {
 
 #include "board-macallan-pinmux-t11x.h"
 
-/* THIS IS FOR TESTING OR WORKAROUND PURPOSES. ANYTHING INSIDE THIS TABLE
- * SHOULD BE PUSHED TO PINMUX SPREADSHEET FOR AUTOGEN OR FIXED
- * */
+/* THIS IS FOR EXPERIMENTAL OR WORKAROUND PURPOSES. ANYTHING INSIDE THIS TABLE
+ * SHOULD BE CONSIDERED TO BE PUSHED TO PINMUX SPREADSHEET FOR CONSISTENCY
+ */
 static __initdata struct tegra_pingroup_config manual_config_pinmux[] = {
 
        /* ULPI SFIOs are not supposed to be supported.
index b0c20b2..c6f30b4 100644 (file)
 
 #include <mach/pinmux-t11.h>
 
-#define DEFAULT_DRIVE(_name)                                   \
-       {                                                       \
-               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,       \
-               .hsm = TEGRA_HSM_DISABLE,                       \
-               .schmitt = TEGRA_SCHMITT_ENABLE,                \
-               .drive = TEGRA_DRIVE_DIV_1,                     \
-               .pull_down = TEGRA_PULL_31,                     \
-               .pull_up = TEGRA_PULL_31,                       \
-               .slew_rising = TEGRA_SLEW_SLOWEST,              \
-               .slew_falling = TEGRA_SLEW_SLOWEST,             \
-       }
-/* Setting the drive strength of pins
- * hsm: Enable High speed mode (ENABLE/DISABLE)
- * Schimit: Enable/disable schimit (ENABLE/DISABLE)
- * drive: low power mode (DIV_1, DIV_2, DIV_4, DIV_8)
- * pulldn_drive - drive down (falling edge) - Driver Output Pull-Down drive
- *                strength code. Value from 0 to 31.
- * pullup_drive - drive up (rising edge)  - Driver Output Pull-Up drive
- *                strength code. Value from 0 to 31.
- * pulldn_slew -  Driver Output Pull-Up slew control code  - 2bit code
- *                code 11 is least slewing of signal. code 00 is highest
- *                slewing of the signal.
- *                Value - FASTEST, FAST, SLOW, SLOWEST
- * pullup_slew -  Driver Output Pull-Down slew control code -
- *                code 11 is least slewing of signal. code 00 is highest
- *                slewing of the signal.
- *                Value - FASTEST, FAST, SLOW, SLOWEST
- */
-#define SET_DRIVE(_name, _hsm, _schmitt, _drive, _pulldn_drive, _pullup_drive, _pulldn_slew, _pullup_slew) \
-       {                                               \
-               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,   \
-               .hsm = TEGRA_HSM_##_hsm,                    \
-               .schmitt = TEGRA_SCHMITT_##_schmitt,        \
-               .drive = TEGRA_DRIVE_##_drive,              \
-               .pull_down = TEGRA_PULL_##_pulldn_drive,    \
-               .pull_up = TEGRA_PULL_##_pullup_drive,          \
-               .slew_rising = TEGRA_SLEW_##_pulldn_slew,   \
-               .slew_falling = TEGRA_SLEW_##_pullup_slew,      \
-       }
-
-/* Setting the drive strength of pins
- * hsm: Enable High speed mode (ENABLE/DISABLE)
- * Schimit: Enable/disable schimit (ENABLE/DISABLE)
- * drive: low power mode (DIV_1, DIV_2, DIV_4, DIV_8)
- * pulldn_drive - drive down (falling edge) - Driver Output Pull-Down drive
- *                strength code. Value from 0 to 31.
- * pullup_drive - drive up (rising edge)  - Driver Output Pull-Up drive
- *                strength code. Value from 0 to 31.
- * pulldn_slew -  Driver Output Pull-Up slew control code  - 2bit code
- *                code 11 is least slewing of signal. code 00 is highest
- *                slewing of the signal.
- *                Value - FASTEST, FAST, SLOW, SLOWEST
- * pullup_slew -  Driver Output Pull-Down slew control code -
- *                code 11 is least slewing of signal. code 00 is highest
- *                slewing of the signal.
- *                Value - FASTEST, FAST, SLOW, SLOWEST
- * drive_type - Drive type to be used depending on the resistors.
- */
-
-#define SET_DRIVE_WITH_TYPE(_name, _hsm, _schmitt, _drive, _pulldn_drive,\
-               _pullup_drive, _pulldn_slew, _pullup_slew, _drive_type) \
-       {                                                               \
-               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,               \
-               .hsm = TEGRA_HSM_##_hsm,                                \
-               .schmitt = TEGRA_SCHMITT_##_schmitt,                    \
-               .drive = TEGRA_DRIVE_##_drive,                          \
-               .pull_down = TEGRA_PULL_##_pulldn_drive,                \
-               .pull_up = TEGRA_PULL_##_pullup_drive,                  \
-               .slew_rising = TEGRA_SLEW_##_pulldn_slew,               \
-               .slew_falling = TEGRA_SLEW_##_pullup_slew,              \
-               .drive_type = TEGRA_DRIVE_TYPE_##_drive_type,           \
-       }
-
-#define DEFAULT_PINMUX(_pingroup, _mux, _pupd, _tri, _io)      \
-       {                                                       \
-               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
-               .func           = TEGRA_MUX_##_mux,             \
-               .pupd           = TEGRA_PUPD_##_pupd,           \
-               .tristate       = TEGRA_TRI_##_tri,             \
-               .io             = TEGRA_PIN_##_io,              \
-               .lock           = TEGRA_PIN_LOCK_DEFAULT,       \
-               .od             = TEGRA_PIN_OD_DEFAULT,         \
-               .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
-       }
-
-#define I2C_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _od) \
-       {                                                       \
-               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
-               .func           = TEGRA_MUX_##_mux,             \
-               .pupd           = TEGRA_PUPD_##_pupd,           \
-               .tristate       = TEGRA_TRI_##_tri,             \
-               .io             = TEGRA_PIN_##_io,              \
-               .lock           = TEGRA_PIN_LOCK_##_lock,       \
-               .od             = TEGRA_PIN_OD_##_od,           \
-               .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
-       }
-
-#define DDC_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _rcv_sel) \
-       {                                                       \
-               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
-               .func           = TEGRA_MUX_##_mux,             \
-               .pupd           = TEGRA_PUPD_##_pupd,           \
-               .tristate       = TEGRA_TRI_##_tri,             \
-               .io             = TEGRA_PIN_##_io,              \
-               .lock           = TEGRA_PIN_LOCK_##_lock,       \
-               .rcv_sel        = TEGRA_PIN_RCV_SEL_##_rcv_sel,         \
-               .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
-       }
-
-#define VI_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _ioreset) \
-       {                                                       \
-               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
-               .func           = TEGRA_MUX_##_mux,             \
-               .pupd           = TEGRA_PUPD_##_pupd,           \
-               .tristate       = TEGRA_TRI_##_tri,             \
-               .io             = TEGRA_PIN_##_io,              \
-               .lock           = TEGRA_PIN_LOCK_##_lock,       \
-               .od             = TEGRA_PIN_OD_DEFAULT,         \
-               .ioreset        = TEGRA_PIN_IO_RESET_##_ioreset \
-       }
-
-#define CEC_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _od)   \
-       {                                                               \
-               .pingroup   = TEGRA_PINGROUP_##_pingroup,                   \
-               .func       = TEGRA_MUX_##_mux,                             \
-               .pupd       = TEGRA_PUPD_##_pupd,                           \
-               .tristate   = TEGRA_TRI_##_tri,                             \
-               .io         = TEGRA_PIN_##_io,                              \
-               .lock       = TEGRA_PIN_LOCK_##_lock,                       \
-               .od         = TEGRA_PIN_OD_##_od,                           \
-               .ioreset    = TEGRA_PIN_IO_RESET_DEFAULT,                   \
-       }
-
-#define USB_PINMUX CEC_PINMUX
-
-#define GPIO_INIT_PIN_MODE(_gpio, _is_input, _value)   \
-       {                                       \
-               .gpio_nr        = _gpio,        \
-               .is_input       = _is_input,    \
-               .value          = _value,       \
-       }
-
 static __initdata struct tegra_drive_pingroup_config pismo_drive_pinmux[] = {
        /* DEFAULT_DRIVE(<pin_group>), */
        /* SDMMC1 */
@@ -252,6 +110,12 @@ static __initdata struct tegra_pingroup_config pismo_pinmux_set_nontristate[] =
 
 #include "board-pismo-pinmux-t11x.h"
 
+/* THIS IS FOR EXPERIMENTAL OR WORKAROUND PURPOSES. ANYTHING INSIDE THIS TABLE
+ * SHOULD BE CONSIDERED TO BE PUSHED TO PINMUX SPREADSHEET FOR CONSISTENCY
+ */
+static __initdata struct tegra_pingroup_config manual_config_pinmux[] = {
+};
+
 static void __init pismo_gpio_init_configure(void)
 {
        int len;
@@ -278,6 +142,8 @@ int __init pismo_pinmux_init(void)
                        ARRAY_SIZE(pismo_pinmux_common));
        tegra_drive_pinmux_config_table(pismo_drive_pinmux,
                                        ARRAY_SIZE(pismo_drive_pinmux));
+       tegra_pinmux_config_table(manual_config_pinmux,
+               ARRAY_SIZE(manual_config_pinmux));
        tegra_pinmux_config_table(unused_pins_lowpower,
                ARRAY_SIZE(unused_pins_lowpower));
 
index 0d5ec7e..f38dd01 100644 (file)
 
 #include <mach/pinmux-t11.h>
 
-#define DEFAULT_DRIVE(_name)                                   \
-       {                                                       \
-               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,       \
-               .hsm = TEGRA_HSM_DISABLE,                       \
-               .schmitt = TEGRA_SCHMITT_ENABLE,                \
-               .drive = TEGRA_DRIVE_DIV_1,                     \
-               .pull_down = TEGRA_PULL_31,                     \
-               .pull_up = TEGRA_PULL_31,                       \
-               .slew_rising = TEGRA_SLEW_SLOWEST,              \
-               .slew_falling = TEGRA_SLEW_SLOWEST,             \
-       }
-/* Setting the drive strength of pins
- * hsm: Enable High speed mode (ENABLE/DISABLE)
- * Schimit: Enable/disable schimit (ENABLE/DISABLE)
- * drive: low power mode (DIV_1, DIV_2, DIV_4, DIV_8)
- * pulldn_drive - drive down (falling edge) - Driver Output Pull-Down drive
- *                strength code. Value from 0 to 31.
- * pullup_drive - drive up (rising edge)  - Driver Output Pull-Up drive
- *                strength code. Value from 0 to 31.
- * pulldn_slew -  Driver Output Pull-Up slew control code  - 2bit code
- *                code 11 is least slewing of signal. code 00 is highest
- *                slewing of the signal.
- *                Value - FASTEST, FAST, SLOW, SLOWEST
- * pullup_slew -  Driver Output Pull-Down slew control code -
- *                code 11 is least slewing of signal. code 00 is highest
- *                slewing of the signal.
- *                Value - FASTEST, FAST, SLOW, SLOWEST
- */
-#define SET_DRIVE(_name, _hsm, _schmitt, _drive, _pulldn_drive, _pullup_drive, _pulldn_slew, _pullup_slew) \
-       {                                               \
-               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,   \
-               .hsm = TEGRA_HSM_##_hsm,                    \
-               .schmitt = TEGRA_SCHMITT_##_schmitt,        \
-               .drive = TEGRA_DRIVE_##_drive,              \
-               .pull_down = TEGRA_PULL_##_pulldn_drive,    \
-               .pull_up = TEGRA_PULL_##_pullup_drive,          \
-               .slew_rising = TEGRA_SLEW_##_pulldn_slew,   \
-               .slew_falling = TEGRA_SLEW_##_pullup_slew,      \
-       }
-
-/* Setting the drive strength of pins
- * hsm: Enable High speed mode (ENABLE/DISABLE)
- * Schimit: Enable/disable schimit (ENABLE/DISABLE)
- * drive: low power mode (DIV_1, DIV_2, DIV_4, DIV_8)
- * pulldn_drive - drive down (falling edge) - Driver Output Pull-Down drive
- *                strength code. Value from 0 to 31.
- * pullup_drive - drive up (rising edge)  - Driver Output Pull-Up drive
- *                strength code. Value from 0 to 31.
- * pulldn_slew -  Driver Output Pull-Up slew control code  - 2bit code
- *                code 11 is least slewing of signal. code 00 is highest
- *                slewing of the signal.
- *                Value - FASTEST, FAST, SLOW, SLOWEST
- * pullup_slew -  Driver Output Pull-Down slew control code -
- *                code 11 is least slewing of signal. code 00 is highest
- *                slewing of the signal.
- *                Value - FASTEST, FAST, SLOW, SLOWEST
- * drive_type - Drive type to be used depending on the resistors.
- */
-
-#define SET_DRIVE_WITH_TYPE(_name, _hsm, _schmitt, _drive, _pulldn_drive,\
-               _pullup_drive, _pulldn_slew, _pullup_slew, _drive_type) \
-       {                                                               \
-               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,               \
-               .hsm = TEGRA_HSM_##_hsm,                                \
-               .schmitt = TEGRA_SCHMITT_##_schmitt,                    \
-               .drive = TEGRA_DRIVE_##_drive,                          \
-               .pull_down = TEGRA_PULL_##_pulldn_drive,                \
-               .pull_up = TEGRA_PULL_##_pullup_drive,                  \
-               .slew_rising = TEGRA_SLEW_##_pulldn_slew,               \
-               .slew_falling = TEGRA_SLEW_##_pullup_slew,              \
-               .drive_type = TEGRA_DRIVE_TYPE_##_drive_type,           \
-       }
-
-#define DEFAULT_PINMUX(_pingroup, _mux, _pupd, _tri, _io)      \
-       {                                                       \
-               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
-               .func           = TEGRA_MUX_##_mux,             \
-               .pupd           = TEGRA_PUPD_##_pupd,           \
-               .tristate       = TEGRA_TRI_##_tri,             \
-               .io             = TEGRA_PIN_##_io,              \
-               .lock           = TEGRA_PIN_LOCK_DEFAULT,       \
-               .od             = TEGRA_PIN_OD_DEFAULT,         \
-               .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
-       }
-
-#define I2C_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _od) \
-       {                                                       \
-               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
-               .func           = TEGRA_MUX_##_mux,             \
-               .pupd           = TEGRA_PUPD_##_pupd,           \
-               .tristate       = TEGRA_TRI_##_tri,             \
-               .io             = TEGRA_PIN_##_io,              \
-               .lock           = TEGRA_PIN_LOCK_##_lock,       \
-               .od             = TEGRA_PIN_OD_##_od,           \
-               .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
-       }
-
-#define VI_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _ioreset) \
-       {                                                       \
-               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
-               .func           = TEGRA_MUX_##_mux,             \
-               .pupd           = TEGRA_PUPD_##_pupd,           \
-               .tristate       = TEGRA_TRI_##_tri,             \
-               .io             = TEGRA_PIN_##_io,              \
-               .lock           = TEGRA_PIN_LOCK_##_lock,       \
-               .od             = TEGRA_PIN_OD_DEFAULT,         \
-               .ioreset        = TEGRA_PIN_IO_RESET_##_ioreset \
-       }
-
-#define CEC_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _od)   \
-       {                                                       \
-               .pingroup   = TEGRA_PINGROUP_##_pingroup,       \
-               .func       = TEGRA_MUX_##_mux,                 \
-               .pupd       = TEGRA_PUPD_##_pupd,               \
-               .tristate   = TEGRA_TRI_##_tri,                 \
-               .io         = TEGRA_PIN_##_io,                  \
-               .lock       = TEGRA_PIN_LOCK_##_lock,           \
-               .od         = TEGRA_PIN_OD_##_od,               \
-               .ioreset    = TEGRA_PIN_IO_RESET_DEFAULT,       \
-       }
-
-#define USB_PINMUX CEC_PINMUX
-
-/* We are disabling this code for now. */
-#define GPIO_INIT_PIN_MODE(_gpio, _is_input, _value)   \
-       {                                       \
-               .gpio_nr        = _gpio,        \
-               .is_input       = _is_input,    \
-               .value          = _value,       \
-       }
-
 static __initdata struct tegra_drive_pingroup_config pluto_drive_pinmux[] = {
        /* DEFAULT_DRIVE(<pin_group>), */
        SET_DRIVE(DAP2, DISABLE, ENABLE, DIV_1, 31, 31, FASTEST, FASTEST),
@@ -271,6 +140,12 @@ static struct tegra_pingroup_config pluto_sleep_pinmux[] = {
 };
 #endif
 
+/* THIS IS FOR EXPERIMENTAL OR WORKAROUND PURPOSES. ANYTHING INSIDE THIS TABLE
+ * SHOULD BE CONSIDERED TO BE PUSHED TO PINMUX SPREADSHEET FOR CONSISTENCY
+ */
+static __initdata struct tegra_pingroup_config manual_config_pinmux[] = {
+};
+
 static void __init pluto_gpio_init_configure(void)
 {
        int len;
@@ -298,6 +173,8 @@ int __init pluto_pinmux_init(void)
                                        ARRAY_SIZE(pluto_drive_pinmux));
        tegra_pinmux_config_table(unused_pins_lowpower,
                ARRAY_SIZE(unused_pins_lowpower));
+       tegra_pinmux_config_table(manual_config_pinmux,
+               ARRAY_SIZE(manual_config_pinmux));
        tegra11x_set_sleep_pinmux(pluto_sleep_pinmux,
                ARRAY_SIZE(pluto_sleep_pinmux));
        return 0;
index f5f4451..deb5dae 100644 (file)
 
 #include <mach/pinmux-t11.h>
 
-#define DEFAULT_DRIVE(_name)                                   \
-       {                                                       \
-               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,       \
-               .hsm = TEGRA_HSM_DISABLE,                       \
-               .schmitt = TEGRA_SCHMITT_ENABLE,                \
-               .drive = TEGRA_DRIVE_DIV_1,                     \
-               .pull_down = TEGRA_PULL_31,                     \
-               .pull_up = TEGRA_PULL_31,                       \
-               .slew_rising = TEGRA_SLEW_SLOWEST,              \
-               .slew_falling = TEGRA_SLEW_SLOWEST,             \
-       }
-/* Setting the drive strength of pins
- * hsm: Enable High speed mode (ENABLE/DISABLE)
- * Schimit: Enable/disable schimit (ENABLE/DISABLE)
- * drive: low power mode (DIV_1, DIV_2, DIV_4, DIV_8)
- * pulldn_drive - drive down (falling edge) - Driver Output Pull-Down drive
- *                strength code. Value from 0 to 31.
- * pullup_drive - drive up (rising edge)  - Driver Output Pull-Up drive
- *                strength code. Value from 0 to 31.
- * pulldn_slew -  Driver Output Pull-Up slew control code  - 2bit code
- *                code 11 is least slewing of signal. code 00 is highest
- *                slewing of the signal.
- *                Value - FASTEST, FAST, SLOW, SLOWEST
- * pullup_slew -  Driver Output Pull-Down slew control code -
- *                code 11 is least slewing of signal. code 00 is highest
- *                slewing of the signal.
- *                Value - FASTEST, FAST, SLOW, SLOWEST
- */
-#define SET_DRIVE(_name, _hsm, _schmitt, _drive, _pulldn_drive, _pullup_drive, _pulldn_slew, _pullup_slew) \
-       {                                               \
-               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,   \
-               .hsm = TEGRA_HSM_##_hsm,                    \
-               .schmitt = TEGRA_SCHMITT_##_schmitt,        \
-               .drive = TEGRA_DRIVE_##_drive,              \
-               .pull_down = TEGRA_PULL_##_pulldn_drive,    \
-               .pull_up = TEGRA_PULL_##_pullup_drive,          \
-               .slew_rising = TEGRA_SLEW_##_pulldn_slew,   \
-               .slew_falling = TEGRA_SLEW_##_pullup_slew,      \
-       }
-
-/* Setting the drive strength of pins
- * hsm: Enable High speed mode (ENABLE/DISABLE)
- * Schimit: Enable/disable schimit (ENABLE/DISABLE)
- * drive: low power mode (DIV_1, DIV_2, DIV_4, DIV_8)
- * pulldn_drive - drive down (falling edge) - Driver Output Pull-Down drive
- *                strength code. Value from 0 to 31.
- * pullup_drive - drive up (rising edge)  - Driver Output Pull-Up drive
- *                strength code. Value from 0 to 31.
- * pulldn_slew -  Driver Output Pull-Up slew control code  - 2bit code
- *                code 11 is least slewing of signal. code 00 is highest
- *                slewing of the signal.
- *                Value - FASTEST, FAST, SLOW, SLOWEST
- * pullup_slew -  Driver Output Pull-Down slew control code -
- *                code 11 is least slewing of signal. code 00 is highest
- *                slewing of the signal.
- *                Value - FASTEST, FAST, SLOW, SLOWEST
- * drive_type - Drive type to be used depending on the resistors.
- */
-
-#define SET_DRIVE_WITH_TYPE(_name, _hsm, _schmitt, _drive, _pulldn_drive,\
-               _pullup_drive, _pulldn_slew, _pullup_slew, _drive_type) \
-       {                                                               \
-               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,               \
-               .hsm = TEGRA_HSM_##_hsm,                                \
-               .schmitt = TEGRA_SCHMITT_##_schmitt,                    \
-               .drive = TEGRA_DRIVE_##_drive,                          \
-                .pull_down = TEGRA_PULL_##_pulldn_drive,               \
-               .pull_up = TEGRA_PULL_##_pullup_drive,                  \
-               .slew_rising = TEGRA_SLEW_##_pulldn_slew,               \
-               .slew_falling = TEGRA_SLEW_##_pullup_slew,              \
-               .drive_type = TEGRA_DRIVE_TYPE_##_drive_type,           \
-       }
-
-#define DEFAULT_PINMUX(_pingroup, _mux, _pupd, _tri, _io)      \
-       {                                                       \
-               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
-               .func           = TEGRA_MUX_##_mux,             \
-               .pupd           = TEGRA_PUPD_##_pupd,           \
-               .tristate       = TEGRA_TRI_##_tri,             \
-               .io             = TEGRA_PIN_##_io,              \
-               .lock           = TEGRA_PIN_LOCK_DEFAULT,       \
-               .od             = TEGRA_PIN_OD_DEFAULT,         \
-               .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
-       }
-
-#define I2C_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _od) \
-       {                                                       \
-               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
-               .func           = TEGRA_MUX_##_mux,             \
-               .pupd           = TEGRA_PUPD_##_pupd,           \
-               .tristate       = TEGRA_TRI_##_tri,             \
-               .io             = TEGRA_PIN_##_io,              \
-               .lock           = TEGRA_PIN_LOCK_##_lock,       \
-               .od             = TEGRA_PIN_OD_##_od,           \
-               .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
-       }
-
-#define DDC_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _rcv_sel) \
-       {                                                       \
-               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
-               .func           = TEGRA_MUX_##_mux,             \
-               .pupd           = TEGRA_PUPD_##_pupd,           \
-               .tristate       = TEGRA_TRI_##_tri,             \
-               .io             = TEGRA_PIN_##_io,              \
-               .lock           = TEGRA_PIN_LOCK_##_lock,       \
-               .rcv_sel        = TEGRA_PIN_RCV_SEL_##_rcv_sel,         \
-               .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
-       }
-
-#define VI_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _ioreset) \
-       {                                                       \
-               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
-               .func           = TEGRA_MUX_##_mux,             \
-               .pupd           = TEGRA_PUPD_##_pupd,           \
-               .tristate       = TEGRA_TRI_##_tri,             \
-               .io             = TEGRA_PIN_##_io,              \
-               .lock           = TEGRA_PIN_LOCK_##_lock,       \
-               .od             = TEGRA_PIN_OD_DEFAULT,         \
-               .ioreset        = TEGRA_PIN_IO_RESET_##_ioreset \
-       }
-
-#define CEC_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _od)   \
-       {                                                               \
-               .pingroup   = TEGRA_PINGROUP_##_pingroup,                   \
-               .func       = TEGRA_MUX_##_mux,                             \
-               .pupd       = TEGRA_PUPD_##_pupd,                           \
-               .tristate   = TEGRA_TRI_##_tri,                             \
-               .io         = TEGRA_PIN_##_io,                              \
-               .lock       = TEGRA_PIN_LOCK_##_lock,                       \
-               .od         = TEGRA_PIN_OD_##_od,                           \
-               .ioreset    = TEGRA_PIN_IO_RESET_DEFAULT,                   \
-       }
-
-#define USB_PINMUX CEC_PINMUX
-
-#define GPIO_INIT_PIN_MODE(_gpio, _is_input, _value)   \
-       {                                       \
-               .gpio_nr        = _gpio,        \
-               .is_input       = _is_input,    \
-               .value          = _value,       \
-       }
-
 static __initdata struct tegra_drive_pingroup_config roth_drive_pinmux[] = {
        /* DEFAULT_DRIVE(<pin_group>), */
        /* SDMMC1 */
@@ -250,6 +108,12 @@ static __initdata struct tegra_pingroup_config roth_pinmux_set_nontristate[] = {
 
 #include "board-roth-pinmux-t11x.h"
 
+/* THIS IS FOR EXPERIMENTAL OR WORKAROUND PURPOSES. ANYTHING INSIDE THIS TABLE
+ * SHOULD BE CONSIDERED TO BE PUSHED TO PINMUX SPREADSHEET FOR CONSISTENCY
+ */
+static __initdata struct tegra_pingroup_config manual_config_pinmux[] = {
+};
+
 static void __init roth_gpio_init_configure(void)
 {
        int len;
@@ -280,6 +144,8 @@ int __init roth_pinmux_init(void)
                                        ARRAY_SIZE(roth_drive_pinmux));
        tegra_pinmux_config_table(unused_pins_lowpower,
                ARRAY_SIZE(unused_pins_lowpower));
+       tegra_pinmux_config_table(manual_config_pinmux,
+               ARRAY_SIZE(manual_config_pinmux));
 
        return 0;
 }
index 4a1308e..6c22200 100644 (file)
 
 #include <mach/pinmux.h>
 
+#define DEFAULT_DRIVE(_name)                                   \
+       {                                                       \
+               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,       \
+               .hsm = TEGRA_HSM_DISABLE,                       \
+               .schmitt = TEGRA_SCHMITT_ENABLE,                \
+               .drive = TEGRA_DRIVE_DIV_1,                     \
+               .pull_down = TEGRA_PULL_31,                     \
+               .pull_up = TEGRA_PULL_31,                       \
+               .slew_rising = TEGRA_SLEW_SLOWEST,              \
+               .slew_falling = TEGRA_SLEW_SLOWEST,             \
+       }
+/* Setting the drive strength of pins
+ * hsm: Enable High speed mode (ENABLE/DISABLE)
+ * Schimit: Enable/disable schimit (ENABLE/DISABLE)
+ * drive: low power mode (DIV_1, DIV_2, DIV_4, DIV_8)
+ * pulldn_drive - drive down (falling edge) - Driver Output Pull-Down drive
+ *                strength code. Value from 0 to 31.
+ * pullup_drive - drive up (rising edge)  - Driver Output Pull-Up drive
+ *                strength code. Value from 0 to 31.
+ * pulldn_slew -  Driver Output Pull-Up slew control code  - 2bit code
+ *                code 11 is least slewing of signal. code 00 is highest
+ *                slewing of the signal.
+ *                Value - FASTEST, FAST, SLOW, SLOWEST
+ * pullup_slew -  Driver Output Pull-Down slew control code -
+ *                code 11 is least slewing of signal. code 00 is highest
+ *                slewing of the signal.
+ *                Value - FASTEST, FAST, SLOW, SLOWEST
+ */
+#define SET_DRIVE(_name, _hsm, _schmitt, _drive, _pulldn_drive, _pullup_drive, _pulldn_slew, _pullup_slew) \
+       {                                               \
+               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,   \
+               .hsm = TEGRA_HSM_##_hsm,                    \
+               .schmitt = TEGRA_SCHMITT_##_schmitt,        \
+               .drive = TEGRA_DRIVE_##_drive,              \
+               .pull_down = TEGRA_PULL_##_pulldn_drive,    \
+               .pull_up = TEGRA_PULL_##_pullup_drive,          \
+               .slew_rising = TEGRA_SLEW_##_pulldn_slew,   \
+               .slew_falling = TEGRA_SLEW_##_pullup_slew,      \
+       }
+
+/* Setting the drive strength of pins
+ * hsm: Enable High speed mode (ENABLE/DISABLE)
+ * Schimit: Enable/disable schimit (ENABLE/DISABLE)
+ * drive: low power mode (DIV_1, DIV_2, DIV_4, DIV_8)
+ * pulldn_drive - drive down (falling edge) - Driver Output Pull-Down drive
+ *                strength code. Value from 0 to 31.
+ * pullup_drive - drive up (rising edge)  - Driver Output Pull-Up drive
+ *                strength code. Value from 0 to 31.
+ * pulldn_slew -  Driver Output Pull-Up slew control code  - 2bit code
+ *                code 11 is least slewing of signal. code 00 is highest
+ *                slewing of the signal.
+ *                Value - FASTEST, FAST, SLOW, SLOWEST
+ * pullup_slew -  Driver Output Pull-Down slew control code -
+ *                code 11 is least slewing of signal. code 00 is highest
+ *                slewing of the signal.
+ *                Value - FASTEST, FAST, SLOW, SLOWEST
+ * drive_type - Drive type to be used depending on the resistors.
+ */
+
+#define SET_DRIVE_WITH_TYPE(_name, _hsm, _schmitt, _drive, _pulldn_drive,\
+               _pullup_drive, _pulldn_slew, _pullup_slew, _drive_type) \
+       {                                                               \
+               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,               \
+               .hsm = TEGRA_HSM_##_hsm,                                \
+               .schmitt = TEGRA_SCHMITT_##_schmitt,                    \
+               .drive = TEGRA_DRIVE_##_drive,                          \
+               .pull_down = TEGRA_PULL_##_pulldn_drive,                \
+               .pull_up = TEGRA_PULL_##_pullup_drive,                  \
+               .slew_rising = TEGRA_SLEW_##_pulldn_slew,               \
+               .slew_falling = TEGRA_SLEW_##_pullup_slew,              \
+               .drive_type = TEGRA_DRIVE_TYPE_##_drive_type,           \
+       }
+
+#define DEFAULT_PINMUX(_pingroup, _mux, _pupd, _tri, _io)      \
+       {                                                       \
+               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
+               .func           = TEGRA_MUX_##_mux,             \
+               .pupd           = TEGRA_PUPD_##_pupd,           \
+               .tristate       = TEGRA_TRI_##_tri,             \
+               .io             = TEGRA_PIN_##_io,              \
+               .lock           = TEGRA_PIN_LOCK_DEFAULT,       \
+               .od             = TEGRA_PIN_OD_DEFAULT,         \
+               .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
+       }
+
+#define I2C_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _od) \
+       {                                                       \
+               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
+               .func           = TEGRA_MUX_##_mux,             \
+               .pupd           = TEGRA_PUPD_##_pupd,           \
+               .tristate       = TEGRA_TRI_##_tri,             \
+               .io             = TEGRA_PIN_##_io,              \
+               .lock           = TEGRA_PIN_LOCK_##_lock,       \
+               .od             = TEGRA_PIN_OD_##_od,           \
+               .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
+       }
+
+#define DDC_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _rcv_sel) \
+       {                                                       \
+               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
+               .func           = TEGRA_MUX_##_mux,             \
+               .pupd           = TEGRA_PUPD_##_pupd,           \
+               .tristate       = TEGRA_TRI_##_tri,             \
+               .io             = TEGRA_PIN_##_io,              \
+               .lock           = TEGRA_PIN_LOCK_##_lock,       \
+               .rcv_sel        = TEGRA_PIN_RCV_SEL_##_rcv_sel,         \
+               .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
+       }
+
+#define VI_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _ioreset) \
+       {                                                       \
+               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
+               .func           = TEGRA_MUX_##_mux,             \
+               .pupd           = TEGRA_PUPD_##_pupd,           \
+               .tristate       = TEGRA_TRI_##_tri,             \
+               .io             = TEGRA_PIN_##_io,              \
+               .lock           = TEGRA_PIN_LOCK_##_lock,       \
+               .od             = TEGRA_PIN_OD_DEFAULT,         \
+               .ioreset        = TEGRA_PIN_IO_RESET_##_ioreset \
+       }
+
+#define CEC_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _od)   \
+       {                                                       \
+               .pingroup   = TEGRA_PINGROUP_##_pingroup,       \
+               .func       = TEGRA_MUX_##_mux,                 \
+               .pupd       = TEGRA_PUPD_##_pupd,               \
+               .tristate   = TEGRA_TRI_##_tri,                 \
+               .io         = TEGRA_PIN_##_io,                  \
+               .lock       = TEGRA_PIN_LOCK_##_lock,           \
+               .od         = TEGRA_PIN_OD_##_od,               \
+               .ioreset    = TEGRA_PIN_IO_RESET_DEFAULT,       \
+       }
+
+#define GPIO_PINMUX(_pingroup, _pupd, _tri, _io, _od)  \
+       {                                                       \
+               .pingroup   = TEGRA_PINGROUP_##_pingroup,       \
+               .func       = TEGRA_MUX_SAFE,                   \
+               .pupd       = TEGRA_PUPD_##_pupd,               \
+               .tristate   = TEGRA_TRI_##_tri,                 \
+               .io         = TEGRA_PIN_##_io,                  \
+               .lock       = TEGRA_PIN_LOCK_DEFAULT,           \
+               .od         = TEGRA_PIN_OD_##_od,               \
+               .ioreset    = TEGRA_PIN_IO_RESET_DEFAULT,       \
+       }
+
+#define UNUSED_PINMUX(_pingroup)       \
+       {                                                       \
+               .pingroup   = TEGRA_PINGROUP_##_pingroup,       \
+               .func       = TEGRA_MUX_SAFE,                   \
+               .pupd       = TEGRA_PUPD_PULL_DOWN,             \
+               .tristate   = TEGRA_TRI_TRISTATE,               \
+               .io         = TEGRA_PIN_OUTPUT,                 \
+               .lock       = TEGRA_PIN_LOCK_DEFAULT,           \
+               .od         = TEGRA_PIN_OD_DEFAULT,             \
+               .ioreset    = TEGRA_PIN_IO_RESET_DEFAULT,       \
+       }
+
+#define USB_PINMUX CEC_PINMUX
+
+#define GPIO_INIT_PIN_MODE(_gpio, _is_input, _value)   \
+       {                                       \
+               .gpio_nr        = _gpio,        \
+               .is_input       = _is_input,    \
+               .value          = _value,       \
+       }
+
 void tegra11x_default_pinmux(void);
 
 enum tegra_pingroup {