Commit 60d148b9 authored by Stephen Warren's avatar Stephen Warren

ARM: tegra: don't hard-code USB ULPI PHY reset_gpio

Not all boards use GPIO_PV0 as the ULPI PHY reset signal. Instead of
hard-coding this GPIO into devices.c, make the board files set it
explicitly. This will allow the PHY code to differentiate between set and
unset values, and hence know when to read the value from device tree.
Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
parent 9abafa02
...@@ -159,6 +159,8 @@ static void paz00_i2c_init(void) ...@@ -159,6 +159,8 @@ static void paz00_i2c_init(void)
static void paz00_usb_init(void) static void paz00_usb_init(void)
{ {
tegra_ehci2_ulpi_phy_config.reset_gpio = TEGRA_ULPI_RST;
platform_device_register(&tegra_ehci2_device); platform_device_register(&tegra_ehci2_device);
platform_device_register(&tegra_ehci3_device); platform_device_register(&tegra_ehci3_device);
} }
......
...@@ -117,6 +117,8 @@ static void trimslice_usb_init(void) ...@@ -117,6 +117,8 @@ static void trimslice_usb_init(void)
pdata = tegra_ehci1_device.dev.platform_data; pdata = tegra_ehci1_device.dev.platform_data;
pdata->vbus_gpio = TRIMSLICE_GPIO_USB1_MODE; pdata->vbus_gpio = TRIMSLICE_GPIO_USB1_MODE;
tegra_ehci2_ulpi_phy_config.reset_gpio = TEGRA_GPIO_PV0;
platform_device_register(&tegra_ehci3_device); platform_device_register(&tegra_ehci3_device);
platform_device_register(&tegra_ehci2_device); platform_device_register(&tegra_ehci2_device);
platform_device_register(&tegra_ehci1_device); platform_device_register(&tegra_ehci1_device);
......
...@@ -439,9 +439,8 @@ static struct resource tegra_usb3_resources[] = { ...@@ -439,9 +439,8 @@ static struct resource tegra_usb3_resources[] = {
}, },
}; };
static struct tegra_ulpi_config tegra_ehci2_ulpi_phy_config = { struct tegra_ulpi_config tegra_ehci2_ulpi_phy_config = {
/* All existing boards use GPIO PV0 for phy reset */ .reset_gpio = -1,
.reset_gpio = TEGRA_GPIO_PV0,
.clk = "cdev2", .clk = "cdev2",
}; };
......
...@@ -22,6 +22,10 @@ ...@@ -22,6 +22,10 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/platform_data/tegra_usb.h> #include <linux/platform_data/tegra_usb.h>
#include <mach/usb_phy.h>
extern struct tegra_ulpi_config tegra_ehci2_ulpi_phy_config;
extern struct tegra_ehci_platform_data tegra_ehci1_pdata; extern struct tegra_ehci_platform_data tegra_ehci1_pdata;
extern struct tegra_ehci_platform_data tegra_ehci2_pdata; extern struct tegra_ehci_platform_data tegra_ehci2_pdata;
extern struct tegra_ehci_platform_data tegra_ehci3_pdata; extern struct tegra_ehci_platform_data tegra_ehci3_pdata;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment