summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2012-12-12 16:27:08 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2012-12-12 16:27:08 +0100
commit0ffbb693e3494f16574439e07d4387a14055d8fc (patch)
tree53f0f68a52859807b8457a327c9bfedf41668280
parent97f194075b5c332a941751552b467547d7a3ab0a (diff)
colibri_t20: implement DAC power save for Iris carrier board
The Iris carrier board by default uses SODIMM pin 73 as DAC power save. Note: This conflicts with the CAN interrupt on the new EvalBoard v3.1a.
-rw-r--r--arch/arm/mach-tegra/board-colibri_t20-panel.c14
-rw-r--r--arch/arm/mach-tegra/board-colibri_t20.c17
-rw-r--r--arch/arm/mach-tegra/board-colibri_t20.h3
3 files changed, 28 insertions, 6 deletions
diff --git a/arch/arm/mach-tegra/board-colibri_t20-panel.c b/arch/arm/mach-tegra/board-colibri_t20-panel.c
index 6cb83ce29cf5..ef612b1ac5f5 100644
--- a/arch/arm/mach-tegra/board-colibri_t20-panel.c
+++ b/arch/arm/mach-tegra/board-colibri_t20-panel.c
@@ -45,6 +45,9 @@
#define colibri_t20_bl_enb TEGRA_GPIO_PT4 /* BL_ON */
#endif
#define colibri_t20_hdmi_hpd TEGRA_GPIO_PN7 /* HOTPLUG_DETECT */
+#ifdef IRIS
+#define iris_dac_psave TEGRA_GPIO_PA0 /* DAC_PSAVE# */
+#endif
#ifdef CONFIG_TEGRA_DC
static struct regulator *colibri_t20_hdmi_reg = NULL;
@@ -113,11 +116,17 @@ static struct platform_device colibri_t20_backlight_device = {
#ifdef CONFIG_TEGRA_DC
static int colibri_t20_panel_enable(void)
{
+#ifdef IRIS
+ gpio_set_value(iris_dac_psave, 1);
+#endif
return 0;
}
static int colibri_t20_panel_disable(void)
{
+#ifdef IRIS
+ gpio_set_value(iris_dac_psave, 0);
+#endif
return 0;
}
@@ -498,6 +507,11 @@ int __init colibri_t20_panel_init(void)
struct resource __maybe_unused *res;
void __iomem *to_io;
+#ifdef IRIS
+ gpio_request(iris_dac_psave, "Iris DAC_PSAVE#");
+ gpio_direction_output(iris_dac_psave, 1);
+#endif /* IRIS */
+
/* enable hdmi hotplug gpio for hotplug detection */
gpio_request(colibri_t20_hdmi_hpd, "hdmi_hpd");
gpio_direction_input(colibri_t20_hdmi_hpd);
diff --git a/arch/arm/mach-tegra/board-colibri_t20.c b/arch/arm/mach-tegra/board-colibri_t20.c
index 3263a4d35b2d..1f0f9e3faa7c 100644
--- a/arch/arm/mach-tegra/board-colibri_t20.c
+++ b/arch/arm/mach-tegra/board-colibri_t20.c
@@ -14,8 +14,8 @@
*
*/
-#include <asm/mach-types.h>
#include <asm/mach/arch.h>
+#include <asm/mach-types.h>
#include <asm/setup.h>
#include <linux/clk.h>
@@ -143,7 +143,10 @@ static __initdata struct tegra_clk_init_table colibri_t20_clk_init_table[] = {
static struct gpio colibri_t20_gpios[] = {
//conflicts with CAN interrupt on Colibri Evaluation Board and MECS Tellurium xPOD1 CAN
+//conflicts with DAC_PSAVE# on Iris
+#ifndef IRIS
{TEGRA_GPIO_PA0, GPIOF_IN, "SODIMM pin 73"},
+#endif
{TEGRA_GPIO_PA2, GPIOF_IN, "SODIMM pin 186"},
{TEGRA_GPIO_PA3, GPIOF_IN, "SODIMM pin 184"},
{TEGRA_GPIO_PB2, GPIOF_IN, "SODIMM pin 154"},
@@ -160,6 +163,7 @@ static struct gpio colibri_t20_gpios[] = {
{TEGRA_GPIO_PI4, GPIOF_IN, "SODIMM pin 87"},
{TEGRA_GPIO_PI6, GPIOF_IN, "SODIMM pin 132"},
{TEGRA_GPIO_PK0, GPIOF_IN, "SODIMM pin 150"},
+//multiplexed OWR
{TEGRA_GPIO_PK1, GPIOF_IN, "SODIMM pin 152"},
//conflicts with CAN reset on MECS Tellurium xPOD1 CAN
{TEGRA_GPIO_PK4, GPIOF_IN, "SODIMM pin 106"},
@@ -250,7 +254,7 @@ static void colibri_t20_gpio_init(void)
colibri_t20_gpios[i].label);
if (err) {
- pr_warning("gpio_request(%s)failed, err = %d",
+ pr_warning("gpio_request(%s) failed, err = %d",
colibri_t20_gpios[i].label, err);
} else {
gpio_export(colibri_t20_gpios[i].gpio, true);
@@ -367,8 +371,8 @@ static struct gpio_keys_button colibri_t20_keys[] = {
[0] = GPIO_KEY(KEY_FIND, PT3, 0), /* SODIMM pin 77 */
[1] = GPIO_KEY(KEY_HOME, PBB3, 0), /* SODIMM pin 127 */
[2] = GPIO_KEY(KEY_BACK, PBB2, 0), /* SODIMM pin 133, Iris X16-14 */
- [3] = GPIO_KEY(KEY_VOLUMEUP, PBB4, 0), /* SODIMM pin 22 */
- [4] = GPIO_KEY(KEY_VOLUMEDOWN, PBB5, 0),/* SODIMM pin 24 */
+ [3] = GPIO_KEY(KEY_VOLUMEUP, PBB4, 0), /* SODIMM pin 22 */
+ [4] = GPIO_KEY(KEY_VOLUMEDOWN, PBB5, 0), /* SODIMM pin 24 */
[5] = GPIO_KEY(KEY_POWER, PV3, 1), /* SODIMM pin 45, Iris X16-20 */
[6] = GPIO_KEY(KEY_MENU, PK6, 0), /* SODIMM pin 135 */
};
@@ -790,7 +794,7 @@ static struct tegra_usb_platform_data tegra_ehci1_utmi_pdata = {
static void ulpi_link_platform_open(void)
{
- int reset_gpio = TEGRA_GPIO_PV1; /* USB3340 RESETB */
+ int reset_gpio = TEGRA_GPIO_PV1; /* USB3340 RESETB */
gpio_request(reset_gpio, "ulpi_phy_reset");
gpio_direction_output(reset_gpio, 0);
@@ -865,7 +869,7 @@ static struct tegra_usb_platform_data tegra_ehci3_utmi_pdata = {
.hot_plug = true,
.power_off_on_suspend = false,
.remote_wakeup_supported = false,
- .vbus_gpio = TEGRA_GPIO_PW2, /* USBH_PEN */
+ .vbus_gpio = TEGRA_GPIO_PW2, /* USBH_PEN */
.vbus_gpio_inverted = 1,
.vbus_reg = NULL,
},
@@ -962,6 +966,7 @@ static void colibri_t20_usb_init(void)
platform_device_register(&tegra_otg_device);
#endif /* !CONFIG_USB_TEGRA_OTG */
+ /* setup the udc platform data */
tegra_udc_device.dev.platform_data = &tegra_udc_pdata;
platform_device_register(&tegra_udc_device);
diff --git a/arch/arm/mach-tegra/board-colibri_t20.h b/arch/arm/mach-tegra/board-colibri_t20.h
index d185adebcf73..0873f5919b1a 100644
--- a/arch/arm/mach-tegra/board-colibri_t20.h
+++ b/arch/arm/mach-tegra/board-colibri_t20.h
@@ -30,6 +30,9 @@
#define CAMERA_INTERFACE
#endif
+/* Use SODIMM pin 73 as DAC power save on Iris carrier board */
+#define IRIS
+
/* Uncomment for back light and USB hub support on MECS Tellurium carrier board */
//#define MECS_TELLURIUM