diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2016-01-14 00:53:35 +0100 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2016-03-21 10:50:55 +0100 |
commit | 5fc9966aad667f7e4649bb8f74a241492fe3458e (patch) | |
tree | d17d2521d64dd345db52bc4a0f2151b1005fc1f6 /arch/arm/mach-tegra/board-apalis_t30.c | |
parent | c8ead507f45de63a125b40096f0d59cb0aaa6780 (diff) |
apalis_t30: ixora: optionally support leds, switch, foff and wdisable
The Ixora carrier board has a few MXM3 pins repurposed as follows:
Functionality MXM3 Pin
LED4_RED 146
LED4_GREEN 162
LED5_RED 156
LED5_GREEN 152
PCIE1_WDISABLE_N 144
SW3 160
UART2_3_RS232_FOFF_N 164
This patch allows uncommenting an IXORA define in the board header file
in order to make use of those repurposed pins.
Please note that those pins are usually used for the 8-bit MMC/SD slot
aka Apalis MMC1 and the SDHCI controller/driver unfortunately changes
the output driver behaviour in a way preventing any regular GPIO use.
This patch therefore explicitly does not register the SDHCI driver on
this controller instance in the Ixora case to avoid this.
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-apalis_t30.c')
-rw-r--r-- | arch/arm/mach-tegra/board-apalis_t30.c | 47 |
1 files changed, 31 insertions, 16 deletions
diff --git a/arch/arm/mach-tegra/board-apalis_t30.c b/arch/arm/mach-tegra/board-apalis_t30.c index 13580ab4c0f3..21f39010e0ad 100644 --- a/arch/arm/mach-tegra/board-apalis_t30.c +++ b/arch/arm/mach-tegra/board-apalis_t30.c @@ -436,27 +436,38 @@ static struct tegra_clk_init_table apalis_t30_clk_init_table[] __initdata = { /* GPIO */ static struct gpio apalis_t30_gpios[] = { - {APALIS_GPIO1, GPIOF_IN, "GPIO1 X1-1"}, - {APALIS_GPIO2, GPIOF_IN, "GPIO2 X1-3"}, - {APALIS_GPIO3, GPIOF_IN, "GPIO3 X1-5"}, - {APALIS_GPIO4, GPIOF_IN, "GPIO4 X1-7"}, + {APALIS_GPIO1, GPIOF_IN, "GPIO1 X1-1"}, + {APALIS_GPIO2, GPIOF_IN, "GPIO2 X1-3"}, + {APALIS_GPIO3, GPIOF_IN, "GPIO3 X1-5"}, + {APALIS_GPIO4, GPIOF_IN, "GPIO4 X1-7"}, #ifndef POWER_GPIO - {APALIS_GPIO5, GPIOF_IN, "GPIO5 X1-9"}, + {APALIS_GPIO5, GPIOF_IN, "GPIO5 X1-9"}, #endif #ifndef FORCE_OFF_GPIO - {APALIS_GPIO6, GPIOF_IN, "GPIO6 X1-11"}, + {APALIS_GPIO6, GPIOF_IN, "GPIO6 X1-11"}, #endif /* GPIO7 is used by PCIe driver on Evaluation board */ -/* {APALIS_GPIO7, GPIOF_IN, "GPIO7 X1-13"}, */ - {APALIS_GPIO8, GPIOF_IN, "GPIO8 X1-15, FAN"}, - {LVDS_MODE, GPIOF_IN, "LVDS: Single/Dual Ch"}, - {LVDS_6B_8B_N, GPIOF_IN, "LVDS: 18/24 Bit Mode"}, - {LVDS_OE, GPIOF_IN, "LVDS: Output Enable"}, - {LVDS_PDWN_N, GPIOF_IN, "LVDS: Power Down"}, - {LVDS_R_F_N, GPIOF_IN, "LVDS: Clock Polarity"}, - {LVDS_MAP, GPIOF_IN, "LVDS: Colour Mapping"}, - {LVDS_RS, GPIOF_IN, "LVDS: Swing Mode"}, - {LVDS_DDR_N, GPIOF_IN, "LVDS: DDRclk Disable"}, +/* {APALIS_GPIO7, GPIOF_IN, "GPIO7 X1-13"}, */ + {APALIS_GPIO8, GPIOF_IN, "GPIO8 X1-15, FAN"}, +#ifdef IXORA + {LED4_GREEN, GPIOF_OUT_INIT_LOW, "Ixora LED4_GREEN"}, + {LED4_RED, GPIOF_OUT_INIT_LOW, "Ixora LED4_RED"}, + {LED5_GREEN, GPIOF_OUT_INIT_LOW, "Ixora LED5_GREEN"}, + {LED5_RED, GPIOF_OUT_INIT_LOW, "Ixora LED5_RED"}, +#endif /* IXORA */ + {LVDS_MODE, GPIOF_IN, "LVDS: Single/Dual Ch"}, + {LVDS_6B_8B_N, GPIOF_IN, "LVDS: 18/24 Bit Mode"}, + {LVDS_OE, GPIOF_IN, "LVDS: Output Enable"}, + {LVDS_PDWN_N, GPIOF_IN, "LVDS: Power Down"}, + {LVDS_R_F_N, GPIOF_IN, "LVDS: Clock Polarity"}, + {LVDS_MAP, GPIOF_IN, "LVDS: Colour Mapping"}, + {LVDS_RS, GPIOF_IN, "LVDS: Swing Mode"}, + {LVDS_DDR_N, GPIOF_IN, "LVDS: DDRclk Disable"}, +#ifdef IXORA + {PCIE1_WDISABLE_N, GPIOF_OUT_INIT_HIGH, "PCIE1_WDISABLE_N"}, + {SW3, GPIOF_IN, "Ixora SW3"}, + {UART2_3_RS232_FOFF_N, GPIOF_OUT_INIT_HIGH, "UART2_3_RS232_FOFF_N"}, +#endif /* IXORA */ }; static void apalis_t30_gpio_init(void) @@ -722,6 +733,7 @@ static struct tegra_sdhci_platform_data apalis_t30_emmc_platform_data = { .wp_gpio = -1, }; +#ifndef IXORA static struct tegra_sdhci_platform_data apalis_t30_mmccard_platform_data = { .cd_gpio = MMC1_CD_N, .ddr_clk_limit = 52000000, @@ -731,6 +743,7 @@ static struct tegra_sdhci_platform_data apalis_t30_mmccard_platform_data = { .wp_gpio = -1, .no_1v8 = 1, }; +#endif /* !IXORA */ static struct tegra_sdhci_platform_data apalis_t30_sdcard_platform_data = { .cd_gpio = SD1_CD_N, @@ -749,11 +762,13 @@ static void __init apalis_t30_sdhci_init(void) &apalis_t30_emmc_platform_data; platform_device_register(&tegra_sdhci_device4); +#ifndef IXORA if (g_sdmmc3_uhs) apalis_t30_mmccard_platform_data.no_1v8 = 0; tegra_sdhci_device3.dev.platform_data = &apalis_t30_mmccard_platform_data; platform_device_register(&tegra_sdhci_device3); +#endif /* !IXORA */ tegra_sdhci_device1.dev.platform_data = &apalis_t30_sdcard_platform_data; |