public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 0/3] TrimSlice updates for 2.6.40
@ 2011-05-11 11:07 Mike Rapoport
       [not found] ` <cover.1305105580.git.mike-UTxiZqZC01RS1MOuV/RT9w@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Rapoport @ 2011-05-11 11:07 UTC (permalink / raw)
  To: Colin Cross
  Cc: Olof Johansson, linux-tegra, linux-arm-kernel, Erik Gilling,
	Mike Rapoport

Hi Colin,
Please consider pulling TrimSlice updates for 2.6.40 merge window.
These patches add registration of i2c, audio and USB devices.

The following changes since commit 9f381a61f58bb6487c93ce2233bb9992f8ea9211:

  Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 (2011-05-10 17:39:01 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux-tegra.git trimslice/upstream

Mike Rapoport (3):
      ARM: tegra: trimslice: register i2c busses and devices
      ARM: tegra: trimslice: add audio devices and clocks
      ARM: tegra: trimslice: enable USB ports

 arch/arm/mach-tegra/board-trimslice-pinmux.c |    2 +-
 arch/arm/mach-tegra/board-trimslice.c        |   92 ++++++++++++++++++++++++++
 2 files changed, 93 insertions(+), 1 deletions(-)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [GIT PULL 1/3] ARM: tegra: trimslice: register i2c busses and devices
       [not found] ` <cover.1305105580.git.mike-UTxiZqZC01RS1MOuV/RT9w@public.gmane.org>
@ 2011-05-11 11:07   ` Mike Rapoport
       [not found]     ` <afc96d35d332d0293dfb5baf3e1b53045627f6a1.1305105580.git.mike-UTxiZqZC01RS1MOuV/RT9w@public.gmane.org>
  2011-05-11 11:07   ` [GIT PULL 2/3] ARM: tegra: trimslice: add audio devices and clocks Mike Rapoport
  2011-05-11 11:07   ` [GIT PULL 3/3] ARM: tegra: trimslice: enable USB ports Mike Rapoport
  2 siblings, 1 reply; 6+ messages in thread
From: Mike Rapoport @ 2011-05-11 11:07 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] 6+ messages in thread

* [GIT PULL 2/3] ARM: tegra: trimslice: add audio devices and clocks
       [not found] ` <cover.1305105580.git.mike-UTxiZqZC01RS1MOuV/RT9w@public.gmane.org>
  2011-05-11 11:07   ` [GIT PULL 1/3] ARM: tegra: trimslice: register i2c busses and devices Mike Rapoport
@ 2011-05-11 11:07   ` Mike Rapoport
  2011-05-11 11:07   ` [GIT PULL 3/3] ARM: tegra: trimslice: enable USB ports Mike Rapoport
  2 siblings, 0 replies; 6+ messages in thread
From: Mike Rapoport @ 2011-05-11 11:07 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 |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

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] 6+ messages in thread

* [GIT PULL 3/3] ARM: tegra: trimslice: enable USB ports
       [not found] ` <cover.1305105580.git.mike-UTxiZqZC01RS1MOuV/RT9w@public.gmane.org>
  2011-05-11 11:07   ` [GIT PULL 1/3] ARM: tegra: trimslice: register i2c busses and devices Mike Rapoport
  2011-05-11 11:07   ` [GIT PULL 2/3] ARM: tegra: trimslice: add audio devices and clocks Mike Rapoport
@ 2011-05-11 11:07   ` Mike Rapoport
  2 siblings, 0 replies; 6+ messages in thread
From: Mike Rapoport @ 2011-05-11 11:07 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        |   40 ++++++++++++++++++++++++++
 2 files changed, 41 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..301af22 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},
diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c
index a19e90b..827f98b 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,42 @@ static void trimslice_i2c_init(void)
 				ARRAY_SIZE(trimslice_i2c3_board_info));
 }
 
+struct tegra_ulpi_config ehci2_phy_config = {
+	.reset_gpio = TEGRA_GPIO_PV0,
+	.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_gpio_enable(TEGRA_GPIO_PV0);
+	tegra_ehci2_device.dev.platform_data = &ehci_ulpi_data;
+	platform_device_register(&tegra_ehci2_device);
+
+	err = gpio_request_one(TEGRA_GPIO_PV2, GPIOF_OUT_INIT_HIGH, "usb1mode");
+	if (err) {
+		pr_err("TrimSlice: failed to obtain USB1 mode gpio: %d\n", err);
+		return;
+	}
+
+	tegra_gpio_enable(TEGRA_GPIO_PV2);
+	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 +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")
-- 
1.7.3.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* RE: [GIT PULL 1/3] ARM: tegra: trimslice: register i2c busses and devices
       [not found]     ` <afc96d35d332d0293dfb5baf3e1b53045627f6a1.1305105580.git.mike-UTxiZqZC01RS1MOuV/RT9w@public.gmane.org>
@ 2011-05-12 20:26       ` Stephen Warren
       [not found]         ` <74CDBE0F657A3D45AFBB94109FB122FF04986AA405-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Warren @ 2011-05-12 20:26 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 Wednesday, May 11, 2011 5:08 AM:
> 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(-)

I think you also need the following change to board-trimslice-pinmux.c:

-	{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},

Assuming that the CDEV1 clock output from Tegra is used as the codec's
master clock.

-- 
nvpublic

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [GIT PULL 1/3] ARM: tegra: trimslice: register i2c busses and devices
       [not found]         ` <74CDBE0F657A3D45AFBB94109FB122FF04986AA405-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
@ 2011-05-12 21:37           ` mike-UTxiZqZC01RS1MOuV/RT9w
  0 siblings, 0 replies; 6+ messages in thread
From: mike-UTxiZqZC01RS1MOuV/RT9w @ 2011-05-12 21:37 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Colin Cross, Erik Gilling, Olof Johansson,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org

On Thu, May 12, 2011 at 01:26:32PM -0700, Stephen Warren wrote:
> Mike Rapoport wrote at Wednesday, May 11, 2011 5:08 AM:
> > 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(-)
> 
> I think you also need the following change to board-trimslice-pinmux.c:
> 
> -	{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},
> 
> Assuming that the CDEV1 clock output from Tegra is used as the codec's
> master clock.

You're right, I've missed that one. Thanks.

--
Sincerely yours,
Mike.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-05-12 21:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-11 11:07 [GIT PULL 0/3] TrimSlice updates for 2.6.40 Mike Rapoport
     [not found] ` <cover.1305105580.git.mike-UTxiZqZC01RS1MOuV/RT9w@public.gmane.org>
2011-05-11 11:07   ` [GIT PULL 1/3] ARM: tegra: trimslice: register i2c busses and devices Mike Rapoport
     [not found]     ` <afc96d35d332d0293dfb5baf3e1b53045627f6a1.1305105580.git.mike-UTxiZqZC01RS1MOuV/RT9w@public.gmane.org>
2011-05-12 20:26       ` Stephen Warren
     [not found]         ` <74CDBE0F657A3D45AFBB94109FB122FF04986AA405-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-05-12 21:37           ` mike-UTxiZqZC01RS1MOuV/RT9w
2011-05-11 11:07   ` [GIT PULL 2/3] ARM: tegra: trimslice: add audio devices and clocks Mike Rapoport
2011-05-11 11:07   ` [GIT PULL 3/3] ARM: tegra: trimslice: enable USB ports Mike Rapoport

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox