* [GIT PULL v2 1/3] ARM: tegra: trimslice: register i2c busses and devices
[not found] ` <cover.1305576864.git.mike-UTxiZqZC01RS1MOuV/RT9w@public.gmane.org>
@ 2011-05-16 20:22 ` Mike Rapoport
2011-05-16 20:22 ` [GIT PULL v2 2/3] ARM: tegra: trimslice: add audio devices and clocks Mike Rapoport
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Mike Rapoport @ 2011-05-16 20:22 UTC (permalink / raw)
To: Colin Cross
Cc: Erik Gilling, Olof Johansson, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mike Rapoport
Signed-off-by: Mike Rapoport <mike-UTxiZqZC01RS1MOuV/RT9w@public.gmane.org>
---
arch/arm/mach-tegra/board-trimslice.c | 39 +++++++++++++++++++++++++++++++++
1 files changed, 39 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c
index cda4cfd..dcf5fc5 100644
--- a/arch/arm/mach-tegra/board-trimslice.c
+++ b/arch/arm/mach-tegra/board-trimslice.c
@@ -23,6 +23,8 @@
#include <linux/platform_device.h>
#include <linux/serial_8250.h>
#include <linux/io.h>
+#include <linux/i2c.h>
+#include <linux/i2c-tegra.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -77,6 +79,41 @@ static struct platform_device *trimslice_devices[] __initdata = {
&tegra_sdhci_device4,
};
+static struct tegra_i2c_platform_data trimslice_i2c1_platform_data = {
+ .bus_clk_rate = 400000,
+};
+
+static struct tegra_i2c_platform_data trimslice_i2c2_platform_data = {
+ .bus_clk_rate = 400000,
+};
+
+static struct tegra_i2c_platform_data trimslice_i2c3_platform_data = {
+ .bus_clk_rate = 400000,
+};
+
+static struct i2c_board_info trimslice_i2c3_board_info[] = {
+ {
+ I2C_BOARD_INFO("tlv320aic23", 0x1a),
+ },
+ {
+ I2C_BOARD_INFO("em3027", 0x56),
+ },
+};
+
+static void trimslice_i2c_init(void)
+{
+ tegra_i2c_device1.dev.platform_data = &trimslice_i2c1_platform_data;
+ tegra_i2c_device2.dev.platform_data = &trimslice_i2c2_platform_data;
+ tegra_i2c_device3.dev.platform_data = &trimslice_i2c3_platform_data;
+
+ platform_device_register(&tegra_i2c_device1);
+ platform_device_register(&tegra_i2c_device2);
+ platform_device_register(&tegra_i2c_device3);
+
+ i2c_register_board_info(2, trimslice_i2c3_board_info,
+ ARRAY_SIZE(trimslice_i2c3_board_info));
+}
+
static void __init tegra_trimslice_fixup(struct machine_desc *desc,
struct tag *tags, char **cmdline, struct meminfo *mi)
{
@@ -112,6 +149,8 @@ static void __init tegra_trimslice_init(void)
tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4;
platform_add_devices(trimslice_devices, ARRAY_SIZE(trimslice_devices));
+
+ trimslice_i2c_init();
}
MACHINE_START(TRIMSLICE, "trimslice")
--
1.7.3.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [GIT PULL v2 2/3] ARM: tegra: trimslice: add audio devices and clocks
[not found] ` <cover.1305576864.git.mike-UTxiZqZC01RS1MOuV/RT9w@public.gmane.org>
2011-05-16 20:22 ` [GIT PULL v2 1/3] ARM: tegra: trimslice: register i2c busses and devices Mike Rapoport
@ 2011-05-16 20:22 ` Mike Rapoport
2011-05-16 20:22 ` [GIT PULL v2 3/3] ARM: tegra: trimslice: enable USB ports Mike Rapoport
2011-05-17 20:41 ` [GIT PULL v2 0/3] TrimSlice updates for 2.6.40 Stephen Warren
3 siblings, 0 replies; 7+ messages in thread
From: Mike Rapoport @ 2011-05-16 20:22 UTC (permalink / raw)
To: Colin Cross
Cc: Erik Gilling, Olof Johansson, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mike Rapoport
Signed-off-by: Mike Rapoport <mike-UTxiZqZC01RS1MOuV/RT9w@public.gmane.org>
---
arch/arm/mach-tegra/board-trimslice-pinmux.c | 2 +-
arch/arm/mach-tegra/board-trimslice.c | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-tegra/board-trimslice-pinmux.c b/arch/arm/mach-tegra/board-trimslice-pinmux.c
index 13534fa..321c610 100644
--- a/arch/arm/mach-tegra/board-trimslice-pinmux.c
+++ b/arch/arm/mach-tegra/board-trimslice-pinmux.c
@@ -29,7 +29,7 @@ static __initdata struct tegra_pingroup_config trimslice_pinmux[] = {
{TEGRA_PINGROUP_ATC, TEGRA_MUX_NAND, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE},
{TEGRA_PINGROUP_ATD, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE},
{TEGRA_PINGROUP_ATE, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE},
- {TEGRA_PINGROUP_CDEV1, TEGRA_MUX_OSC, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL},
+ {TEGRA_PINGROUP_CDEV1, TEGRA_MUX_PLLA_OUT, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL},
{TEGRA_PINGROUP_CDEV2, TEGRA_MUX_PLLP_OUT4, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE},
{TEGRA_PINGROUP_CRTP, TEGRA_MUX_CRT, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE},
{TEGRA_PINGROUP_CSUS, TEGRA_MUX_VI_SENSOR_CLK, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE},
diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c
index dcf5fc5..a19e90b 100644
--- a/arch/arm/mach-tegra/board-trimslice.c
+++ b/arch/arm/mach-tegra/board-trimslice.c
@@ -73,10 +73,19 @@ static struct tegra_sdhci_platform_data sdhci_pdata4 = {
.power_gpio = -1,
};
+static struct platform_device trimslice_audio_device = {
+ .name = "tegra-snd-trimslice",
+ .id = 0,
+};
+
static struct platform_device *trimslice_devices[] __initdata = {
&debug_uart,
&tegra_sdhci_device1,
&tegra_sdhci_device4,
+ &tegra_i2s_device1,
+ &tegra_das_device,
+ &tegra_pcm_device,
+ &trimslice_audio_device,
};
static struct tegra_i2c_platform_data trimslice_i2c1_platform_data = {
@@ -127,6 +136,10 @@ static void __init tegra_trimslice_fixup(struct machine_desc *desc,
static __initdata struct tegra_clk_init_table trimslice_clk_init_table[] = {
/* name parent rate enabled */
{ "uarta", "pll_p", 216000000, true },
+ { "pll_a", "pll_p_out1", 56448000, true },
+ { "pll_a_out0", "pll_a", 11289600, true },
+ { "cdev1", NULL, 0, true },
+ { "i2s1", "pll_a_out0", 11289600, false},
{ NULL, NULL, 0, 0},
};
--
1.7.3.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [GIT PULL v2 3/3] ARM: tegra: trimslice: enable USB ports
[not found] ` <cover.1305576864.git.mike-UTxiZqZC01RS1MOuV/RT9w@public.gmane.org>
2011-05-16 20:22 ` [GIT PULL v2 1/3] ARM: tegra: trimslice: register i2c busses and devices Mike Rapoport
2011-05-16 20:22 ` [GIT PULL v2 2/3] ARM: tegra: trimslice: add audio devices and clocks Mike Rapoport
@ 2011-05-16 20:22 ` Mike Rapoport
2011-05-17 20:41 ` [GIT PULL v2 0/3] TrimSlice updates for 2.6.40 Stephen Warren
3 siblings, 0 replies; 7+ messages in thread
From: Mike Rapoport @ 2011-05-16 20:22 UTC (permalink / raw)
To: Colin Cross
Cc: Erik Gilling, Olof Johansson, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mike Rapoport
Signed-off-by: Mike Rapoport <mike-UTxiZqZC01RS1MOuV/RT9w@public.gmane.org>
---
arch/arm/mach-tegra/board-trimslice-pinmux.c | 5 ++-
arch/arm/mach-tegra/board-trimslice.c | 39 ++++++++++++++++++++++++++
arch/arm/mach-tegra/board-trimslice.h | 3 ++
3 files changed, 46 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-tegra/board-trimslice-pinmux.c b/arch/arm/mach-tegra/board-trimslice-pinmux.c
index 321c610..82646a4 100644
--- a/arch/arm/mach-tegra/board-trimslice-pinmux.c
+++ b/arch/arm/mach-tegra/board-trimslice-pinmux.c
@@ -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},
@@ -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)
diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c
index a19e90b..28190e2 100644
--- a/arch/arm/mach-tegra/board-trimslice.c
+++ b/arch/arm/mach-tegra/board-trimslice.c
@@ -25,6 +25,7 @@
#include <linux/io.h>
#include <linux/i2c.h>
#include <linux/i2c-tegra.h>
+#include <linux/platform_data/tegra_usb.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -32,6 +33,8 @@
#include <mach/iomap.h>
#include <mach/sdhci.h>
+#include <mach/usb_phy.h>
+#include <mach/gpio.h>
#include "board.h"
#include "clock.h"
@@ -123,6 +126,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)
{
@@ -164,6 +202,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")
diff --git a/arch/arm/mach-tegra/board-trimslice.h b/arch/arm/mach-tegra/board-trimslice.h
index e8ef629..7a7dee8 100644
--- a/arch/arm/mach-tegra/board-trimslice.h
+++ b/arch/arm/mach-tegra/board-trimslice.h
@@ -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
--
1.7.3.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* RE: [GIT PULL v2 0/3] TrimSlice updates for 2.6.40
[not found] ` <cover.1305576864.git.mike-UTxiZqZC01RS1MOuV/RT9w@public.gmane.org>
` (2 preceding siblings ...)
2011-05-16 20:22 ` [GIT PULL v2 3/3] ARM: tegra: trimslice: enable USB ports Mike Rapoport
@ 2011-05-17 20:41 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF04986AAB1E-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
3 siblings, 1 reply; 7+ messages in thread
From: Stephen Warren @ 2011-05-17 20:41 UTC (permalink / raw)
To: Mike Rapoport, Colin Cross
Cc: Erik Gilling, Olof Johansson,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Mike Rapoport wrote at Monday, May 16, 2011 2:23 PM:
> Hi Colin,
> Please consider pulling TrimSlice updates for 2.6.40 merge window.
> These patches add registration of i2c, audio and USB devices.
Mike, a comment and a question:
First off, your git branch isn't based on tegra's for-next branch, but
rather something much in the future of it. Hence, the merge brings in a
bunch of unrelated changes. It is a fast-forward though so it's
probably fine?
Second, I tried to test this, but failed. I hit two issues:
1) USB didn't seem to work for me; the following prints continuously:
[ 93.952248] usb 3-1: new high speed USB device number 126 using tegra-ehci
[ 94.022291] hub 3-0:1.0: unable to enumerate USB device on port 1
This means I can't use the built-in SSD as the root filesystem.
I see this problem irrespective of whether I tell U-Boot to initialize
USB before booting or not.
Which branches did you have merged to test this? I did:
* Create a new branch from Tegra's for-next.
* Merge the branch from your pull request.
* Merge ASoC for-2.6.40 branch to pick up the audio driver.
* Cherry-pick a few I2C fixes I've been working on. I don't recall if
they are necessary for Trimslice or not, but shouldn't hurt.
2) I can boot into a recent ChromeOS filesystem on the SD card, and
see e.g. the audio driver initialize OK. However, both speaker-test
and aplay segfault immediately. They work fine on other HW, such as
Seaboard, with this disk image. I know this used to work on Trimslice
a few weeks back, so perhaps I'll go and try an older disk image.
--
nvpublic
^ permalink raw reply [flat|nested] 7+ messages in thread