Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260586
b: refs/heads/master
c: 4c75599
h: refs/heads/master
v: v3
  • Loading branch information
Mike Rapoport authored and Colin Cross committed Jul 13, 2011
1 parent c155088 commit aafa452
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9504940ae03e0ebe6cfef9cd8914199a42128107
refs/heads/master: 4c755997ea1eb3e3c2df7ef657494d8188d0c120
5 changes: 4 additions & 1 deletion trunk/arch/arm/mach-tegra/board-trimslice-pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static __initdata struct tegra_pingroup_config trimslice_pinmux[] = {
{TEGRA_PINGROUP_SPIH, TEGRA_MUX_SPI2_ALT, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE},
{TEGRA_PINGROUP_UAA, TEGRA_MUX_ULPI, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE},
{TEGRA_PINGROUP_UAB, TEGRA_MUX_ULPI, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE},
{TEGRA_PINGROUP_UAC, TEGRA_MUX_RSVD2, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE},
{TEGRA_PINGROUP_UAC, TEGRA_MUX_RSVD2, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL},
{TEGRA_PINGROUP_UAD, TEGRA_MUX_IRDA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE},
{TEGRA_PINGROUP_UCA, TEGRA_MUX_UARTC, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE},
{TEGRA_PINGROUP_UCB, TEGRA_MUX_UARTC, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE},
Expand All @@ -145,6 +145,9 @@ static __initdata struct tegra_pingroup_config trimslice_pinmux[] = {
static struct tegra_gpio_table gpio_table[] = {
{ .gpio = TRIMSLICE_GPIO_SD4_CD, .enable = true }, /* mmc4 cd */
{ .gpio = TRIMSLICE_GPIO_SD4_WP, .enable = true }, /* mmc4 wp */

{ .gpio = TRIMSLICE_GPIO_USB1_MODE, .enable = true }, /* USB1 mode */
{ .gpio = TRIMSLICE_GPIO_USB2_RST, .enable = true }, /* USB2 PHY rst */
};

void __init trimslice_pinmux_init(void)
Expand Down
40 changes: 40 additions & 0 deletions trunk/arch/arm/mach-tegra/board-trimslice.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@
#include <linux/io.h>
#include <linux/i2c.h>
#include <linux/i2c-tegra.h>
#include <linux/platform_data/tegra_usb.h>
#include <linux/gpio.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/setup.h>

#include <mach/iomap.h>
#include <mach/sdhci.h>
#include <mach/usb_phy.h>
#include <mach/gpio.h>

#include "board.h"
#include "clock.h"
Expand Down Expand Up @@ -123,6 +127,41 @@ static void trimslice_i2c_init(void)
ARRAY_SIZE(trimslice_i2c3_board_info));
}

struct tegra_ulpi_config ehci2_phy_config = {
.reset_gpio = TRIMSLICE_GPIO_USB2_RST,
.clk = "cdev2",
};

static struct tegra_ehci_platform_data ehci_ulpi_data = {
.operating_mode = TEGRA_USB_HOST,
.phy_config = &ehci2_phy_config,
};

static struct tegra_ehci_platform_data ehci_utmi_data = {
.operating_mode = TEGRA_USB_HOST,
};

static void trimslice_usb_init(void)
{
int err;

tegra_ehci3_device.dev.platform_data = &ehci_utmi_data;
platform_device_register(&tegra_ehci3_device);

tegra_ehci2_device.dev.platform_data = &ehci_ulpi_data;
platform_device_register(&tegra_ehci2_device);

err = gpio_request_one(TRIMSLICE_GPIO_USB1_MODE, GPIOF_OUT_INIT_HIGH,
"usb1mode");
if (err) {
pr_err("TrimSlice: failed to obtain USB1 mode gpio: %d\n", err);
return;
}

tegra_ehci1_device.dev.platform_data = &ehci_utmi_data;
platform_device_register(&tegra_ehci1_device);
}

static void __init tegra_trimslice_fixup(struct machine_desc *desc,
struct tag *tags, char **cmdline, struct meminfo *mi)
{
Expand Down Expand Up @@ -164,6 +203,7 @@ static void __init tegra_trimslice_init(void)
platform_add_devices(trimslice_devices, ARRAY_SIZE(trimslice_devices));

trimslice_i2c_init();
trimslice_usb_init();
}

MACHINE_START(TRIMSLICE, "trimslice")
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/arm/mach-tegra/board-trimslice.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
#define TRIMSLICE_GPIO_SD4_CD TEGRA_GPIO_PP1 /* mmc4 cd */
#define TRIMSLICE_GPIO_SD4_WP TEGRA_GPIO_PP2 /* mmc4 wp */

#define TRIMSLICE_GPIO_USB1_MODE TEGRA_GPIO_PV2 /* USB1 mode */
#define TRIMSLICE_GPIO_USB2_RST TEGRA_GPIO_PV0 /* USB2 PHY reset */

void trimslice_pinmux_init(void);

#endif

0 comments on commit aafa452

Please sign in to comment.