All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6 V2] ARM: tegra: paz00 patches for 2.6.40
@ 2011-05-19 12:08 ` Marc Dietrich
  0 siblings, 0 replies; 22+ messages in thread
From: Marc Dietrich @ 2011-05-19 12:08 UTC (permalink / raw)
  To: Colin Cross
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Olof Johansson,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi Collin, Olof,

the following patches are intended for 2.6.40 merge. They are mostly similar
to the TrimSlice patches sent by Mike a few days ago.

We are still stuggling with the sound codec (alc5632) and the nvec, so there
is nothing to connect to the i2c yet. On the other hand, I'm wondering what's
up with the atd7461 included in most (all?) boards. It's compatible with lm90,
but the driver will never register because of the wrong name.

May I ask if there is some timeline for framebuffer integration? A netbook
without display is of not much use (ok, same holds for keyboard/mouse).

Thanks!

Marc

Changes in V2:
    - add some more blurb to the commit messages
    - change the machine to some neater name (patch 5)
    - enable the wifi board during boot (patch 6)


Marc Dietrich (6):
  ARM: tegra: paz00: whitespace cleanup
  ARM: tegra: paz00: register i2c busses
  ARM: tegra: paz00: enable usb ports
  ARM: tegra: paz00: cleanup sdhci ports
  ARM: tegra: paz00: change the machine name
  ARM: tegra: paz00: enable wifi card

 arch/arm/mach-tegra/board-paz00-pinmux.c |   12 ++--
 arch/arm/mach-tegra/board-paz00.c        |   96 ++++++++++++++++++++++++++----
 arch/arm/mach-tegra/board-paz00.h        |   17 ++++--
 3 files changed, 102 insertions(+), 23 deletions(-)

-- 
1.7.4.2

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

* [PATCH 0/6 V2] ARM: tegra: paz00 patches for 2.6.40
@ 2011-05-19 12:08 ` Marc Dietrich
  0 siblings, 0 replies; 22+ messages in thread
From: Marc Dietrich @ 2011-05-19 12:08 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Collin, Olof,

the following patches are intended for 2.6.40 merge. They are mostly similar
to the TrimSlice patches sent by Mike a few days ago.

We are still stuggling with the sound codec (alc5632) and the nvec, so there
is nothing to connect to the i2c yet. On the other hand, I'm wondering what's
up with the atd7461 included in most (all?) boards. It's compatible with lm90,
but the driver will never register because of the wrong name.

May I ask if there is some timeline for framebuffer integration? A netbook
without display is of not much use (ok, same holds for keyboard/mouse).

Thanks!

Marc

Changes in V2:
    - add some more blurb to the commit messages
    - change the machine to some neater name (patch 5)
    - enable the wifi board during boot (patch 6)


Marc Dietrich (6):
  ARM: tegra: paz00: whitespace cleanup
  ARM: tegra: paz00: register i2c busses
  ARM: tegra: paz00: enable usb ports
  ARM: tegra: paz00: cleanup sdhci ports
  ARM: tegra: paz00: change the machine name
  ARM: tegra: paz00: enable wifi card

 arch/arm/mach-tegra/board-paz00-pinmux.c |   12 ++--
 arch/arm/mach-tegra/board-paz00.c        |   96 ++++++++++++++++++++++++++----
 arch/arm/mach-tegra/board-paz00.h        |   17 ++++--
 3 files changed, 102 insertions(+), 23 deletions(-)

-- 
1.7.4.2

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

* [PATCH 1/6] ARM: tegra: paz00: whitespace cleanup
  2011-05-19 12:08 ` Marc Dietrich
@ 2011-05-19 12:08     ` Marc Dietrich
  -1 siblings, 0 replies; 22+ messages in thread
From: Marc Dietrich @ 2011-05-19 12:08 UTC (permalink / raw)
  To: Colin Cross
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Olof Johansson,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

This patch replaces long sequences of spaces by tabs and tabs by
spaces were appropriate.

Signed-off-by: Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>
---
 arch/arm/mach-tegra/board-paz00-pinmux.c |   12 ++++++------
 arch/arm/mach-tegra/board-paz00.h        |   12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-tegra/board-paz00-pinmux.c b/arch/arm/mach-tegra/board-paz00-pinmux.c
index 2643d1b..d2faa50 100644
--- a/arch/arm/mach-tegra/board-paz00-pinmux.c
+++ b/arch/arm/mach-tegra/board-paz00-pinmux.c
@@ -141,12 +141,12 @@ static struct tegra_pingroup_config paz00_pinmux[] = {
 };
 
 static struct tegra_gpio_table gpio_table[] = {
-	{ .gpio = TEGRA_GPIO_SD1_CD,	.enable = true	},
-	{ .gpio = TEGRA_GPIO_SD1_WP,	.enable = true	},
-	{ .gpio = TEGRA_GPIO_SD1_POWER,	.enable = true	},
-	{ .gpio = TEGRA_GPIO_SD4_CD,	.enable = true	},
-	{ .gpio = TEGRA_GPIO_SD4_WP,	.enable = true	},
-	{ .gpio = TEGRA_GPIO_SD4_POWER,	.enable = true	},
+	{ .gpio = TEGRA_GPIO_SD1_CD,	.enable = true },
+	{ .gpio = TEGRA_GPIO_SD1_WP,	.enable = true },
+	{ .gpio = TEGRA_GPIO_SD1_POWER,	.enable = true },
+	{ .gpio = TEGRA_GPIO_SD4_CD,	.enable = true },
+	{ .gpio = TEGRA_GPIO_SD4_WP,	.enable = true },
+	{ .gpio = TEGRA_GPIO_SD4_POWER,	.enable = true },
 };
 
 void paz00_pinmux_init(void)
diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h
index da193ca7..221ce9c 100644
--- a/arch/arm/mach-tegra/board-paz00.h
+++ b/arch/arm/mach-tegra/board-paz00.h
@@ -17,12 +17,12 @@
 #ifndef _MACH_TEGRA_BOARD_PAZ00_H
 #define _MACH_TEGRA_BOARD_PAZ00_H
 
-#define TEGRA_GPIO_SD1_CD               TEGRA_GPIO_PV5
-#define TEGRA_GPIO_SD1_WP               TEGRA_GPIO_PH1
-#define TEGRA_GPIO_SD1_POWER            TEGRA_GPIO_PT3
-#define TEGRA_GPIO_SD4_CD               TEGRA_GPIO_PH2
-#define TEGRA_GPIO_SD4_WP               TEGRA_GPIO_PH3
-#define TEGRA_GPIO_SD4_POWER            TEGRA_GPIO_PI6
+#define TEGRA_GPIO_SD1_CD		TEGRA_GPIO_PV5
+#define TEGRA_GPIO_SD1_WP		TEGRA_GPIO_PH1
+#define TEGRA_GPIO_SD1_POWER		TEGRA_GPIO_PT3
+#define TEGRA_GPIO_SD4_CD		TEGRA_GPIO_PH2
+#define TEGRA_GPIO_SD4_WP		TEGRA_GPIO_PH3
+#define TEGRA_GPIO_SD4_POWER		TEGRA_GPIO_PI6
 
 void paz00_pinmux_init(void);
 
-- 
1.7.4.2

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

* [PATCH 1/6] ARM: tegra: paz00: whitespace cleanup
@ 2011-05-19 12:08     ` Marc Dietrich
  0 siblings, 0 replies; 22+ messages in thread
From: Marc Dietrich @ 2011-05-19 12:08 UTC (permalink / raw)
  To: linux-arm-kernel

This patch replaces long sequences of spaces by tabs and tabs by
spaces were appropriate.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
---
 arch/arm/mach-tegra/board-paz00-pinmux.c |   12 ++++++------
 arch/arm/mach-tegra/board-paz00.h        |   12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-tegra/board-paz00-pinmux.c b/arch/arm/mach-tegra/board-paz00-pinmux.c
index 2643d1b..d2faa50 100644
--- a/arch/arm/mach-tegra/board-paz00-pinmux.c
+++ b/arch/arm/mach-tegra/board-paz00-pinmux.c
@@ -141,12 +141,12 @@ static struct tegra_pingroup_config paz00_pinmux[] = {
 };
 
 static struct tegra_gpio_table gpio_table[] = {
-	{ .gpio = TEGRA_GPIO_SD1_CD,	.enable = true	},
-	{ .gpio = TEGRA_GPIO_SD1_WP,	.enable = true	},
-	{ .gpio = TEGRA_GPIO_SD1_POWER,	.enable = true	},
-	{ .gpio = TEGRA_GPIO_SD4_CD,	.enable = true	},
-	{ .gpio = TEGRA_GPIO_SD4_WP,	.enable = true	},
-	{ .gpio = TEGRA_GPIO_SD4_POWER,	.enable = true	},
+	{ .gpio = TEGRA_GPIO_SD1_CD,	.enable = true },
+	{ .gpio = TEGRA_GPIO_SD1_WP,	.enable = true },
+	{ .gpio = TEGRA_GPIO_SD1_POWER,	.enable = true },
+	{ .gpio = TEGRA_GPIO_SD4_CD,	.enable = true },
+	{ .gpio = TEGRA_GPIO_SD4_WP,	.enable = true },
+	{ .gpio = TEGRA_GPIO_SD4_POWER,	.enable = true },
 };
 
 void paz00_pinmux_init(void)
diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h
index da193ca7..221ce9c 100644
--- a/arch/arm/mach-tegra/board-paz00.h
+++ b/arch/arm/mach-tegra/board-paz00.h
@@ -17,12 +17,12 @@
 #ifndef _MACH_TEGRA_BOARD_PAZ00_H
 #define _MACH_TEGRA_BOARD_PAZ00_H
 
-#define TEGRA_GPIO_SD1_CD               TEGRA_GPIO_PV5
-#define TEGRA_GPIO_SD1_WP               TEGRA_GPIO_PH1
-#define TEGRA_GPIO_SD1_POWER            TEGRA_GPIO_PT3
-#define TEGRA_GPIO_SD4_CD               TEGRA_GPIO_PH2
-#define TEGRA_GPIO_SD4_WP               TEGRA_GPIO_PH3
-#define TEGRA_GPIO_SD4_POWER            TEGRA_GPIO_PI6
+#define TEGRA_GPIO_SD1_CD		TEGRA_GPIO_PV5
+#define TEGRA_GPIO_SD1_WP		TEGRA_GPIO_PH1
+#define TEGRA_GPIO_SD1_POWER		TEGRA_GPIO_PT3
+#define TEGRA_GPIO_SD4_CD		TEGRA_GPIO_PH2
+#define TEGRA_GPIO_SD4_WP		TEGRA_GPIO_PH3
+#define TEGRA_GPIO_SD4_POWER		TEGRA_GPIO_PI6
 
 void paz00_pinmux_init(void);
 
-- 
1.7.4.2

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

* [PATCH 2/6] ARM: tegra: paz00: register i2c busses
  2011-05-19 12:08 ` Marc Dietrich
@ 2011-05-19 12:08     ` Marc Dietrich
  -1 siblings, 0 replies; 22+ messages in thread
From: Marc Dietrich @ 2011-05-19 12:08 UTC (permalink / raw)
  To: Colin Cross
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Olof Johansson,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

This adds support for the i2c busses on paz00. The 3rd bus is
reserved for the nvec, which acts as master and i2c-tegra has
not yet support for this kind of operation.
The sound codec (alc5632) is connected to the first bus and will
be added once the codec and glue driver is upstream.
The thermal sensor (atd7461) is connected to dvc as usual, but will
not be added now because i2c-tegra still misses probe support
(needs I2C_FUNC_SMBUS_EMUL).

Signed-off-by: Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>
---
 arch/arm/mach-tegra/board-paz00.c |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index 57e50a8..5f1c110 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -25,6 +25,8 @@
 #include <linux/dma-mapping.h>
 #include <linux/pda_power.h>
 #include <linux/io.h>
+#include <linux/i2c.h>
+#include <linux/i2c-tegra.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -70,6 +72,29 @@ static struct platform_device *paz00_devices[] __initdata = {
 	&tegra_sdhci_device4,
 };
 
+static struct tegra_i2c_platform_data paz00_i2c1_platform_data = {
+	.bus_clk_rate   = 400000,
+};
+
+static struct tegra_i2c_platform_data paz00_i2c2_platform_data = {
+	.bus_clk_rate   = 400000,
+};
+
+static struct tegra_i2c_platform_data paz00_dvc_platform_data = {
+	.bus_clk_rate   = 400000,
+};
+
+static void paz00_i2c_init(void)
+{
+	tegra_i2c_device1.dev.platform_data = &paz00_i2c1_platform_data;
+	tegra_i2c_device2.dev.platform_data = &paz00_i2c2_platform_data;
+	tegra_i2c_device4.dev.platform_data = &paz00_dvc_platform_data;
+
+	platform_device_register(&tegra_i2c_device1);
+	platform_device_register(&tegra_i2c_device2);
+	platform_device_register(&tegra_i2c_device4);
+}
+
 static void __init tegra_paz00_fixup(struct machine_desc *desc,
 	struct tag *tags, char **cmdline, struct meminfo *mi)
 {
@@ -115,6 +140,8 @@ static void __init tegra_paz00_init(void)
 	tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4;
 
 	platform_add_devices(paz00_devices, ARRAY_SIZE(paz00_devices));
+
+	paz00_i2c_init();
 }
 
 MACHINE_START(PAZ00, "paz00")
-- 
1.7.4.2

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

* [PATCH 2/6] ARM: tegra: paz00: register i2c busses
@ 2011-05-19 12:08     ` Marc Dietrich
  0 siblings, 0 replies; 22+ messages in thread
From: Marc Dietrich @ 2011-05-19 12:08 UTC (permalink / raw)
  To: linux-arm-kernel

This adds support for the i2c busses on paz00. The 3rd bus is
reserved for the nvec, which acts as master and i2c-tegra has
not yet support for this kind of operation.
The sound codec (alc5632) is connected to the first bus and will
be added once the codec and glue driver is upstream.
The thermal sensor (atd7461) is connected to dvc as usual, but will
not be added now because i2c-tegra still misses probe support
(needs I2C_FUNC_SMBUS_EMUL).

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
---
 arch/arm/mach-tegra/board-paz00.c |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index 57e50a8..5f1c110 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -25,6 +25,8 @@
 #include <linux/dma-mapping.h>
 #include <linux/pda_power.h>
 #include <linux/io.h>
+#include <linux/i2c.h>
+#include <linux/i2c-tegra.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -70,6 +72,29 @@ static struct platform_device *paz00_devices[] __initdata = {
 	&tegra_sdhci_device4,
 };
 
+static struct tegra_i2c_platform_data paz00_i2c1_platform_data = {
+	.bus_clk_rate   = 400000,
+};
+
+static struct tegra_i2c_platform_data paz00_i2c2_platform_data = {
+	.bus_clk_rate   = 400000,
+};
+
+static struct tegra_i2c_platform_data paz00_dvc_platform_data = {
+	.bus_clk_rate   = 400000,
+};
+
+static void paz00_i2c_init(void)
+{
+	tegra_i2c_device1.dev.platform_data = &paz00_i2c1_platform_data;
+	tegra_i2c_device2.dev.platform_data = &paz00_i2c2_platform_data;
+	tegra_i2c_device4.dev.platform_data = &paz00_dvc_platform_data;
+
+	platform_device_register(&tegra_i2c_device1);
+	platform_device_register(&tegra_i2c_device2);
+	platform_device_register(&tegra_i2c_device4);
+}
+
 static void __init tegra_paz00_fixup(struct machine_desc *desc,
 	struct tag *tags, char **cmdline, struct meminfo *mi)
 {
@@ -115,6 +140,8 @@ static void __init tegra_paz00_init(void)
 	tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4;
 
 	platform_add_devices(paz00_devices, ARRAY_SIZE(paz00_devices));
+
+	paz00_i2c_init();
 }
 
 MACHINE_START(PAZ00, "paz00")
-- 
1.7.4.2

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

* [PATCH 3/6] ARM: tegra: paz00: enable usb ports
  2011-05-19 12:08 ` Marc Dietrich
@ 2011-05-19 12:08     ` Marc Dietrich
  -1 siblings, 0 replies; 22+ messages in thread
From: Marc Dietrich @ 2011-05-19 12:08 UTC (permalink / raw)
  To: Colin Cross
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Olof Johansson,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

This patch add support for the second and third ehci bus on paz00.
The first bus needs gadget and nvec support and will be added once
the needed patches are upstream.

Signed-off-by: Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>
---
 arch/arm/mach-tegra/board-paz00-pinmux.c |    1 +
 arch/arm/mach-tegra/board-paz00.c        |   35 +++++++++++++++++++++++++++++-
 arch/arm/mach-tegra/board-paz00.h        |    1 +
 3 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-tegra/board-paz00-pinmux.c b/arch/arm/mach-tegra/board-paz00-pinmux.c
index d2faa50..acee62e 100644
--- a/arch/arm/mach-tegra/board-paz00-pinmux.c
+++ b/arch/arm/mach-tegra/board-paz00-pinmux.c
@@ -147,6 +147,7 @@ static struct tegra_gpio_table gpio_table[] = {
 	{ .gpio = TEGRA_GPIO_SD4_CD,	.enable = true },
 	{ .gpio = TEGRA_GPIO_SD4_WP,	.enable = true },
 	{ .gpio = TEGRA_GPIO_SD4_POWER,	.enable = true },
+	{ .gpio = TEGRA_ULPI_RST,	.enable = true },
 };
 
 void paz00_pinmux_init(void)
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index 5f1c110..e1e1959 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -27,6 +27,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>
@@ -36,6 +37,8 @@
 #include <mach/iomap.h>
 #include <mach/irqs.h>
 #include <mach/sdhci.h>
+#include <mach/usb_phy.h>
+#include <mach/gpio.h>
 
 #include "board.h"
 #include "board-paz00.h"
@@ -95,6 +98,36 @@ static void paz00_i2c_init(void)
 	platform_device_register(&tegra_i2c_device4);
 }
 
+static struct tegra_ulpi_config ulpi_phy_config = {
+		.reset_gpio = TEGRA_ULPI_RST,
+		.clk = "cdev2",
+};
+
+static struct tegra_ehci_platform_data tegra_ehci_pdata[] = {
+		[0] = {
+			.operating_mode = TEGRA_USB_OTG,
+			.power_down_on_bus_suspend = 1,
+		},
+		[1] = {
+			.phy_config = &ulpi_phy_config,
+			.operating_mode = TEGRA_USB_HOST,
+			.power_down_on_bus_suspend = 1,
+		},
+		[2] = {
+			.operating_mode = TEGRA_USB_HOST,
+			.power_down_on_bus_suspend = 1,
+		},
+};
+
+static void paz00_usb_init(void)
+{
+	tegra_ehci2_device.dev.platform_data = &tegra_ehci_pdata[1];
+	tegra_ehci3_device.dev.platform_data = &tegra_ehci_pdata[2];
+
+	platform_device_register(&tegra_ehci2_device);
+	platform_device_register(&tegra_ehci3_device);
+}
+
 static void __init tegra_paz00_fixup(struct machine_desc *desc,
 	struct tag *tags, char **cmdline, struct meminfo *mi)
 {
@@ -109,7 +142,6 @@ static __initdata struct tegra_clk_init_table paz00_clk_init_table[] = {
 	{ NULL,		NULL,		0,		0},
 };
 
-
 static struct tegra_sdhci_platform_data sdhci_pdata1 = {
 	.cd_gpio	= TEGRA_GPIO_SD1_CD,
 	.wp_gpio	= TEGRA_GPIO_SD1_WP,
@@ -142,6 +174,7 @@ static void __init tegra_paz00_init(void)
 	platform_add_devices(paz00_devices, ARRAY_SIZE(paz00_devices));
 
 	paz00_i2c_init();
+	paz00_usb_init();
 }
 
 MACHINE_START(PAZ00, "paz00")
diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h
index 221ce9c..6b0b733 100644
--- a/arch/arm/mach-tegra/board-paz00.h
+++ b/arch/arm/mach-tegra/board-paz00.h
@@ -23,6 +23,7 @@
 #define TEGRA_GPIO_SD4_CD		TEGRA_GPIO_PH2
 #define TEGRA_GPIO_SD4_WP		TEGRA_GPIO_PH3
 #define TEGRA_GPIO_SD4_POWER		TEGRA_GPIO_PI6
+#define TEGRA_ULPI_RST			TEGRA_GPIO_PV0
 
 void paz00_pinmux_init(void);
 
-- 
1.7.4.2

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

* [PATCH 3/6] ARM: tegra: paz00: enable usb ports
@ 2011-05-19 12:08     ` Marc Dietrich
  0 siblings, 0 replies; 22+ messages in thread
From: Marc Dietrich @ 2011-05-19 12:08 UTC (permalink / raw)
  To: linux-arm-kernel

This patch add support for the second and third ehci bus on paz00.
The first bus needs gadget and nvec support and will be added once
the needed patches are upstream.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
---
 arch/arm/mach-tegra/board-paz00-pinmux.c |    1 +
 arch/arm/mach-tegra/board-paz00.c        |   35 +++++++++++++++++++++++++++++-
 arch/arm/mach-tegra/board-paz00.h        |    1 +
 3 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-tegra/board-paz00-pinmux.c b/arch/arm/mach-tegra/board-paz00-pinmux.c
index d2faa50..acee62e 100644
--- a/arch/arm/mach-tegra/board-paz00-pinmux.c
+++ b/arch/arm/mach-tegra/board-paz00-pinmux.c
@@ -147,6 +147,7 @@ static struct tegra_gpio_table gpio_table[] = {
 	{ .gpio = TEGRA_GPIO_SD4_CD,	.enable = true },
 	{ .gpio = TEGRA_GPIO_SD4_WP,	.enable = true },
 	{ .gpio = TEGRA_GPIO_SD4_POWER,	.enable = true },
+	{ .gpio = TEGRA_ULPI_RST,	.enable = true },
 };
 
 void paz00_pinmux_init(void)
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index 5f1c110..e1e1959 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -27,6 +27,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>
@@ -36,6 +37,8 @@
 #include <mach/iomap.h>
 #include <mach/irqs.h>
 #include <mach/sdhci.h>
+#include <mach/usb_phy.h>
+#include <mach/gpio.h>
 
 #include "board.h"
 #include "board-paz00.h"
@@ -95,6 +98,36 @@ static void paz00_i2c_init(void)
 	platform_device_register(&tegra_i2c_device4);
 }
 
+static struct tegra_ulpi_config ulpi_phy_config = {
+		.reset_gpio = TEGRA_ULPI_RST,
+		.clk = "cdev2",
+};
+
+static struct tegra_ehci_platform_data tegra_ehci_pdata[] = {
+		[0] = {
+			.operating_mode = TEGRA_USB_OTG,
+			.power_down_on_bus_suspend = 1,
+		},
+		[1] = {
+			.phy_config = &ulpi_phy_config,
+			.operating_mode = TEGRA_USB_HOST,
+			.power_down_on_bus_suspend = 1,
+		},
+		[2] = {
+			.operating_mode = TEGRA_USB_HOST,
+			.power_down_on_bus_suspend = 1,
+		},
+};
+
+static void paz00_usb_init(void)
+{
+	tegra_ehci2_device.dev.platform_data = &tegra_ehci_pdata[1];
+	tegra_ehci3_device.dev.platform_data = &tegra_ehci_pdata[2];
+
+	platform_device_register(&tegra_ehci2_device);
+	platform_device_register(&tegra_ehci3_device);
+}
+
 static void __init tegra_paz00_fixup(struct machine_desc *desc,
 	struct tag *tags, char **cmdline, struct meminfo *mi)
 {
@@ -109,7 +142,6 @@ static __initdata struct tegra_clk_init_table paz00_clk_init_table[] = {
 	{ NULL,		NULL,		0,		0},
 };
 
-
 static struct tegra_sdhci_platform_data sdhci_pdata1 = {
 	.cd_gpio	= TEGRA_GPIO_SD1_CD,
 	.wp_gpio	= TEGRA_GPIO_SD1_WP,
@@ -142,6 +174,7 @@ static void __init tegra_paz00_init(void)
 	platform_add_devices(paz00_devices, ARRAY_SIZE(paz00_devices));
 
 	paz00_i2c_init();
+	paz00_usb_init();
 }
 
 MACHINE_START(PAZ00, "paz00")
diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h
index 221ce9c..6b0b733 100644
--- a/arch/arm/mach-tegra/board-paz00.h
+++ b/arch/arm/mach-tegra/board-paz00.h
@@ -23,6 +23,7 @@
 #define TEGRA_GPIO_SD4_CD		TEGRA_GPIO_PH2
 #define TEGRA_GPIO_SD4_WP		TEGRA_GPIO_PH3
 #define TEGRA_GPIO_SD4_POWER		TEGRA_GPIO_PI6
+#define TEGRA_ULPI_RST			TEGRA_GPIO_PV0
 
 void paz00_pinmux_init(void);
 
-- 
1.7.4.2

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

* [PATCH 4/6] ARM: tegra: paz00: cleanup sdhci ports
  2011-05-19 12:08 ` Marc Dietrich
@ 2011-05-19 12:08     ` Marc Dietrich
  -1 siblings, 0 replies; 22+ messages in thread
From: Marc Dietrich @ 2011-05-19 12:08 UTC (permalink / raw)
  To: Colin Cross
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Olof Johansson,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

The internal storage has no gpios connected to. Also the second
port is not connected at all, so remove it from the board file.

Signed-off-by: Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>
---
 arch/arm/mach-tegra/board-paz00-pinmux.c |    3 ---
 arch/arm/mach-tegra/board-paz00.c        |   10 +---------
 arch/arm/mach-tegra/board-paz00.h        |    3 ---
 3 files changed, 1 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-tegra/board-paz00-pinmux.c b/arch/arm/mach-tegra/board-paz00-pinmux.c
index acee62e..bdd2627 100644
--- a/arch/arm/mach-tegra/board-paz00-pinmux.c
+++ b/arch/arm/mach-tegra/board-paz00-pinmux.c
@@ -144,9 +144,6 @@ static struct tegra_gpio_table gpio_table[] = {
 	{ .gpio = TEGRA_GPIO_SD1_CD,	.enable = true },
 	{ .gpio = TEGRA_GPIO_SD1_WP,	.enable = true },
 	{ .gpio = TEGRA_GPIO_SD1_POWER,	.enable = true },
-	{ .gpio = TEGRA_GPIO_SD4_CD,	.enable = true },
-	{ .gpio = TEGRA_GPIO_SD4_WP,	.enable = true },
-	{ .gpio = TEGRA_GPIO_SD4_POWER,	.enable = true },
 	{ .gpio = TEGRA_ULPI_RST,	.enable = true },
 };
 
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index e1e1959..7fdc409 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -71,7 +71,6 @@ static struct platform_device debug_uart = {
 static struct platform_device *paz00_devices[] __initdata = {
 	&debug_uart,
 	&tegra_sdhci_device1,
-	&tegra_sdhci_device2,
 	&tegra_sdhci_device4,
 };
 
@@ -148,16 +147,10 @@ static struct tegra_sdhci_platform_data sdhci_pdata1 = {
 	.power_gpio	= TEGRA_GPIO_SD1_POWER,
 };
 
-static struct tegra_sdhci_platform_data sdhci_pdata2 = {
+static struct tegra_sdhci_platform_data sdhci_pdata4 = {
 	.cd_gpio	= -1,
 	.wp_gpio	= -1,
 	.power_gpio	= -1,
-};
-
-static struct tegra_sdhci_platform_data sdhci_pdata4 = {
-	.cd_gpio	= TEGRA_GPIO_SD4_CD,
-	.wp_gpio	= TEGRA_GPIO_SD4_WP,
-	.power_gpio	= TEGRA_GPIO_SD4_POWER,
 	.is_8bit	= 1,
 };
 
@@ -168,7 +161,6 @@ static void __init tegra_paz00_init(void)
 	paz00_pinmux_init();
 
 	tegra_sdhci_device1.dev.platform_data = &sdhci_pdata1;
-	tegra_sdhci_device2.dev.platform_data = &sdhci_pdata2;
 	tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4;
 
 	platform_add_devices(paz00_devices, ARRAY_SIZE(paz00_devices));
diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h
index 6b0b733..d4ff39d 100644
--- a/arch/arm/mach-tegra/board-paz00.h
+++ b/arch/arm/mach-tegra/board-paz00.h
@@ -20,9 +20,6 @@
 #define TEGRA_GPIO_SD1_CD		TEGRA_GPIO_PV5
 #define TEGRA_GPIO_SD1_WP		TEGRA_GPIO_PH1
 #define TEGRA_GPIO_SD1_POWER		TEGRA_GPIO_PT3
-#define TEGRA_GPIO_SD4_CD		TEGRA_GPIO_PH2
-#define TEGRA_GPIO_SD4_WP		TEGRA_GPIO_PH3
-#define TEGRA_GPIO_SD4_POWER		TEGRA_GPIO_PI6
 #define TEGRA_ULPI_RST			TEGRA_GPIO_PV0
 
 void paz00_pinmux_init(void);
-- 
1.7.4.2

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

* [PATCH 4/6] ARM: tegra: paz00: cleanup sdhci ports
@ 2011-05-19 12:08     ` Marc Dietrich
  0 siblings, 0 replies; 22+ messages in thread
From: Marc Dietrich @ 2011-05-19 12:08 UTC (permalink / raw)
  To: linux-arm-kernel

The internal storage has no gpios connected to. Also the second
port is not connected at all, so remove it from the board file.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
---
 arch/arm/mach-tegra/board-paz00-pinmux.c |    3 ---
 arch/arm/mach-tegra/board-paz00.c        |   10 +---------
 arch/arm/mach-tegra/board-paz00.h        |    3 ---
 3 files changed, 1 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-tegra/board-paz00-pinmux.c b/arch/arm/mach-tegra/board-paz00-pinmux.c
index acee62e..bdd2627 100644
--- a/arch/arm/mach-tegra/board-paz00-pinmux.c
+++ b/arch/arm/mach-tegra/board-paz00-pinmux.c
@@ -144,9 +144,6 @@ static struct tegra_gpio_table gpio_table[] = {
 	{ .gpio = TEGRA_GPIO_SD1_CD,	.enable = true },
 	{ .gpio = TEGRA_GPIO_SD1_WP,	.enable = true },
 	{ .gpio = TEGRA_GPIO_SD1_POWER,	.enable = true },
-	{ .gpio = TEGRA_GPIO_SD4_CD,	.enable = true },
-	{ .gpio = TEGRA_GPIO_SD4_WP,	.enable = true },
-	{ .gpio = TEGRA_GPIO_SD4_POWER,	.enable = true },
 	{ .gpio = TEGRA_ULPI_RST,	.enable = true },
 };
 
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index e1e1959..7fdc409 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -71,7 +71,6 @@ static struct platform_device debug_uart = {
 static struct platform_device *paz00_devices[] __initdata = {
 	&debug_uart,
 	&tegra_sdhci_device1,
-	&tegra_sdhci_device2,
 	&tegra_sdhci_device4,
 };
 
@@ -148,16 +147,10 @@ static struct tegra_sdhci_platform_data sdhci_pdata1 = {
 	.power_gpio	= TEGRA_GPIO_SD1_POWER,
 };
 
-static struct tegra_sdhci_platform_data sdhci_pdata2 = {
+static struct tegra_sdhci_platform_data sdhci_pdata4 = {
 	.cd_gpio	= -1,
 	.wp_gpio	= -1,
 	.power_gpio	= -1,
-};
-
-static struct tegra_sdhci_platform_data sdhci_pdata4 = {
-	.cd_gpio	= TEGRA_GPIO_SD4_CD,
-	.wp_gpio	= TEGRA_GPIO_SD4_WP,
-	.power_gpio	= TEGRA_GPIO_SD4_POWER,
 	.is_8bit	= 1,
 };
 
@@ -168,7 +161,6 @@ static void __init tegra_paz00_init(void)
 	paz00_pinmux_init();
 
 	tegra_sdhci_device1.dev.platform_data = &sdhci_pdata1;
-	tegra_sdhci_device2.dev.platform_data = &sdhci_pdata2;
 	tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4;
 
 	platform_add_devices(paz00_devices, ARRAY_SIZE(paz00_devices));
diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h
index 6b0b733..d4ff39d 100644
--- a/arch/arm/mach-tegra/board-paz00.h
+++ b/arch/arm/mach-tegra/board-paz00.h
@@ -20,9 +20,6 @@
 #define TEGRA_GPIO_SD1_CD		TEGRA_GPIO_PV5
 #define TEGRA_GPIO_SD1_WP		TEGRA_GPIO_PH1
 #define TEGRA_GPIO_SD1_POWER		TEGRA_GPIO_PT3
-#define TEGRA_GPIO_SD4_CD		TEGRA_GPIO_PH2
-#define TEGRA_GPIO_SD4_WP		TEGRA_GPIO_PH3
-#define TEGRA_GPIO_SD4_POWER		TEGRA_GPIO_PI6
 #define TEGRA_ULPI_RST			TEGRA_GPIO_PV0
 
 void paz00_pinmux_init(void);
-- 
1.7.4.2

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

* [PATCH 5/6] ARM: tegra: paz00: change the machine name
  2011-05-19 12:08 ` Marc Dietrich
@ 2011-05-19 12:08     ` Marc Dietrich
  -1 siblings, 0 replies; 22+ messages in thread
From: Marc Dietrich @ 2011-05-19 12:08 UTC (permalink / raw)
  To: Colin Cross
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Olof Johansson,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

This renames "paz00" in MACHINE_START macro to a neater string.
PAZ00 seems to have been the Compal internal project name, while
PROCYON looks like Toshiba project name.
Anyway, the AC100 support package in Ubuntu needs the new naming to
identify the machine.

Signed-off-by: Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>
---
 arch/arm/mach-tegra/board-paz00.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index 7fdc409..1b076f6 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -169,7 +169,7 @@ static void __init tegra_paz00_init(void)
 	paz00_usb_init();
 }
 
-MACHINE_START(PAZ00, "paz00")
+MACHINE_START(PAZ00, "Toshiba AC100 / Dynabook AZ")
 	.boot_params	= 0x00000100,
 	.fixup		= tegra_paz00_fixup,
 	.map_io         = tegra_map_common_io,
-- 
1.7.4.2

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

* [PATCH 5/6] ARM: tegra: paz00: change the machine name
@ 2011-05-19 12:08     ` Marc Dietrich
  0 siblings, 0 replies; 22+ messages in thread
From: Marc Dietrich @ 2011-05-19 12:08 UTC (permalink / raw)
  To: linux-arm-kernel

This renames "paz00" in MACHINE_START macro to a neater string.
PAZ00 seems to have been the Compal internal project name, while
PROCYON looks like Toshiba project name.
Anyway, the AC100 support package in Ubuntu needs the new naming to
identify the machine.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
---
 arch/arm/mach-tegra/board-paz00.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index 7fdc409..1b076f6 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -169,7 +169,7 @@ static void __init tegra_paz00_init(void)
 	paz00_usb_init();
 }
 
-MACHINE_START(PAZ00, "paz00")
+MACHINE_START(PAZ00, "Toshiba AC100 / Dynabook AZ")
 	.boot_params	= 0x00000100,
 	.fixup		= tegra_paz00_fixup,
 	.map_io         = tegra_map_common_io,
-- 
1.7.4.2

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

* [PATCH 6/6] ARM: tegra: paz00: enable wifi card
  2011-05-19 12:08 ` Marc Dietrich
@ 2011-05-19 12:08     ` Marc Dietrich
  -1 siblings, 0 replies; 22+ messages in thread
From: Marc Dietrich @ 2011-05-19 12:08 UTC (permalink / raw)
  To: Colin Cross
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Olof Johansson,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

The Wifi card attached to one usb port needs to be unkilled. The
corresponding gpio and also the gpio for the LED are exported to be
controlled by userspace later on.

Signed-off-by: Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>
---
 arch/arm/mach-tegra/board-paz00-pinmux.c |    2 ++
 arch/arm/mach-tegra/board-paz00.c        |   22 ++++++++++++++++++++++
 arch/arm/mach-tegra/board-paz00.h        |    7 +++++++
 3 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-tegra/board-paz00-pinmux.c b/arch/arm/mach-tegra/board-paz00-pinmux.c
index bdd2627..41a6304 100644
--- a/arch/arm/mach-tegra/board-paz00-pinmux.c
+++ b/arch/arm/mach-tegra/board-paz00-pinmux.c
@@ -145,6 +145,8 @@ static struct tegra_gpio_table gpio_table[] = {
 	{ .gpio = TEGRA_GPIO_SD1_WP,	.enable = true },
 	{ .gpio = TEGRA_GPIO_SD1_POWER,	.enable = true },
 	{ .gpio = TEGRA_ULPI_RST,	.enable = true },
+	{ .gpio = TEGRA_WIFI_PWRN,	.enable = true },
+	{ .gpio = TEGRA_WIFI_LED,	.enable = true },
 };
 
 void paz00_pinmux_init(void)
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index 1b076f6..c78ef4c 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -135,6 +135,27 @@ static void __init tegra_paz00_fixup(struct machine_desc *desc,
 	mi->bank[0].size = 448 * SZ_1M;
 }
 
+static void __init paz00_wifi_init(void)
+{
+	int ret;
+
+	/* unlock hw rfkill */
+	ret = gpio_request_one(TEGRA_WIFI_PWRN, GPIOF_OUT_INIT_HIGH,
+			"wifi_pwrn");
+	if(ret) {
+		pr_warning("WIFI: could not request PWRN gpio!\n");
+		return;
+	}
+	gpio_export(TEGRA_WIFI_PWRN, 0);
+
+	/* export wifi led */
+	ret = gpio_request_one(TEGRA_WIFI_LED, GPIOF_OUT_INIT_HIGH,
+			"wifi_led");
+	if(ret)
+		pr_warning("WIFI: could not request LED gpio!\n");
+	gpio_export(TEGRA_WIFI_LED, 0);
+}
+
 static __initdata struct tegra_clk_init_table paz00_clk_init_table[] = {
 	/* name		parent		rate		enabled */
 	{ "uartd",	"pll_p",	216000000,	true },
@@ -167,6 +188,7 @@ static void __init tegra_paz00_init(void)
 
 	paz00_i2c_init();
 	paz00_usb_init();
+	paz00_wifi_init();
 }
 
 MACHINE_START(PAZ00, "Toshiba AC100 / Dynabook AZ")
diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h
index d4ff39d..a49543a 100644
--- a/arch/arm/mach-tegra/board-paz00.h
+++ b/arch/arm/mach-tegra/board-paz00.h
@@ -17,11 +17,18 @@
 #ifndef _MACH_TEGRA_BOARD_PAZ00_H
 #define _MACH_TEGRA_BOARD_PAZ00_H
 
+/* SDMMC */
 #define TEGRA_GPIO_SD1_CD		TEGRA_GPIO_PV5
 #define TEGRA_GPIO_SD1_WP		TEGRA_GPIO_PH1
 #define TEGRA_GPIO_SD1_POWER		TEGRA_GPIO_PT3
+
+/* ULPI */
 #define TEGRA_ULPI_RST			TEGRA_GPIO_PV0
 
+/* Wifi */
+#define TEGRA_WIFI_LED			TEGRA_GPIO_PD0
+#define TEGRA_WIFI_PWRN			TEGRA_GPIO_PK5
+
 void paz00_pinmux_init(void);
 
 #endif
-- 
1.7.4.2

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

* [PATCH 6/6] ARM: tegra: paz00: enable wifi card
@ 2011-05-19 12:08     ` Marc Dietrich
  0 siblings, 0 replies; 22+ messages in thread
From: Marc Dietrich @ 2011-05-19 12:08 UTC (permalink / raw)
  To: linux-arm-kernel

The Wifi card attached to one usb port needs to be unkilled. The
corresponding gpio and also the gpio for the LED are exported to be
controlled by userspace later on.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
---
 arch/arm/mach-tegra/board-paz00-pinmux.c |    2 ++
 arch/arm/mach-tegra/board-paz00.c        |   22 ++++++++++++++++++++++
 arch/arm/mach-tegra/board-paz00.h        |    7 +++++++
 3 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-tegra/board-paz00-pinmux.c b/arch/arm/mach-tegra/board-paz00-pinmux.c
index bdd2627..41a6304 100644
--- a/arch/arm/mach-tegra/board-paz00-pinmux.c
+++ b/arch/arm/mach-tegra/board-paz00-pinmux.c
@@ -145,6 +145,8 @@ static struct tegra_gpio_table gpio_table[] = {
 	{ .gpio = TEGRA_GPIO_SD1_WP,	.enable = true },
 	{ .gpio = TEGRA_GPIO_SD1_POWER,	.enable = true },
 	{ .gpio = TEGRA_ULPI_RST,	.enable = true },
+	{ .gpio = TEGRA_WIFI_PWRN,	.enable = true },
+	{ .gpio = TEGRA_WIFI_LED,	.enable = true },
 };
 
 void paz00_pinmux_init(void)
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index 1b076f6..c78ef4c 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -135,6 +135,27 @@ static void __init tegra_paz00_fixup(struct machine_desc *desc,
 	mi->bank[0].size = 448 * SZ_1M;
 }
 
+static void __init paz00_wifi_init(void)
+{
+	int ret;
+
+	/* unlock hw rfkill */
+	ret = gpio_request_one(TEGRA_WIFI_PWRN, GPIOF_OUT_INIT_HIGH,
+			"wifi_pwrn");
+	if(ret) {
+		pr_warning("WIFI: could not request PWRN gpio!\n");
+		return;
+	}
+	gpio_export(TEGRA_WIFI_PWRN, 0);
+
+	/* export wifi led */
+	ret = gpio_request_one(TEGRA_WIFI_LED, GPIOF_OUT_INIT_HIGH,
+			"wifi_led");
+	if(ret)
+		pr_warning("WIFI: could not request LED gpio!\n");
+	gpio_export(TEGRA_WIFI_LED, 0);
+}
+
 static __initdata struct tegra_clk_init_table paz00_clk_init_table[] = {
 	/* name		parent		rate		enabled */
 	{ "uartd",	"pll_p",	216000000,	true },
@@ -167,6 +188,7 @@ static void __init tegra_paz00_init(void)
 
 	paz00_i2c_init();
 	paz00_usb_init();
+	paz00_wifi_init();
 }
 
 MACHINE_START(PAZ00, "Toshiba AC100 / Dynabook AZ")
diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h
index d4ff39d..a49543a 100644
--- a/arch/arm/mach-tegra/board-paz00.h
+++ b/arch/arm/mach-tegra/board-paz00.h
@@ -17,11 +17,18 @@
 #ifndef _MACH_TEGRA_BOARD_PAZ00_H
 #define _MACH_TEGRA_BOARD_PAZ00_H
 
+/* SDMMC */
 #define TEGRA_GPIO_SD1_CD		TEGRA_GPIO_PV5
 #define TEGRA_GPIO_SD1_WP		TEGRA_GPIO_PH1
 #define TEGRA_GPIO_SD1_POWER		TEGRA_GPIO_PT3
+
+/* ULPI */
 #define TEGRA_ULPI_RST			TEGRA_GPIO_PV0
 
+/* Wifi */
+#define TEGRA_WIFI_LED			TEGRA_GPIO_PD0
+#define TEGRA_WIFI_PWRN			TEGRA_GPIO_PK5
+
 void paz00_pinmux_init(void);
 
 #endif
-- 
1.7.4.2

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

* Re: [PATCH 6/6] ARM: tegra: paz00: enable wifi card
  2011-05-19 12:08     ` Marc Dietrich
@ 2011-05-19 20:06       ` Dmitry Artamonow
  -1 siblings, 0 replies; 22+ messages in thread
From: Dmitry Artamonow @ 2011-05-19 20:06 UTC (permalink / raw)
  To: Marc Dietrich; +Cc: linux-tegra, Olof Johansson, linux-arm-kernel, Colin Cross

On 14:08 Thu 19 May     , Marc Dietrich wrote:
> The Wifi card attached to one usb port needs to be unkilled. The
> corresponding gpio and also the gpio for the LED are exported to be
> controlled by userspace later on.
> 
> Signed-off-by: Marc Dietrich <marvin24@gmx.de>

[snip]

> +static void __init paz00_wifi_init(void)
> +{
> +	int ret;
> +
> +	/* unlock hw rfkill */
> +	ret = gpio_request_one(TEGRA_WIFI_PWRN, GPIOF_OUT_INIT_HIGH,
> +			"wifi_pwrn");
> +	if(ret) {
> +		pr_warning("WIFI: could not request PWRN gpio!\n");
> +		return;
> +	}
> +	gpio_export(TEGRA_WIFI_PWRN, 0);

Although enabling wifi on boot may be OK for now, I think in long term
it would be better and more proper to use rfkill infrastructure for this
instead of just exporting gpio to userspace. There were some patches for
gpio-based rfkill switch floating around lately. This is one the versions:
https://lkml.org/lkml/2011/5/6/372
Not sure about their status and if they are directly suitable for PAZ00, but
you may have a look. Btw, there's also another mostly generic gpio-rfkill
driver in the tree I'm aware of - see arch/arm/mach-pxa/tosa-bt.c

> +
> +	/* export wifi led */
> +	ret = gpio_request_one(TEGRA_WIFI_LED, GPIOF_OUT_INIT_HIGH,
> +			"wifi_led");
> +	if(ret)
> +		pr_warning("WIFI: could not request LED gpio!\n");
> +	gpio_export(TEGRA_WIFI_LED, 0);
For LED I think it's better to register gpio-leds platform device with
something like 'rfkill.0' or 'wifi-rx' or whatever as a default trigger
(not sure about exact names of triggers - you'll need to look up them).
That way you will get a wide choice of led triggers for free, and still
retain possibility of manual driving leds from userspace.

-- 
Best regards,
Dmitry "MAD" Artamonow

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

* [PATCH 6/6] ARM: tegra: paz00: enable wifi card
@ 2011-05-19 20:06       ` Dmitry Artamonow
  0 siblings, 0 replies; 22+ messages in thread
From: Dmitry Artamonow @ 2011-05-19 20:06 UTC (permalink / raw)
  To: linux-arm-kernel

On 14:08 Thu 19 May     , Marc Dietrich wrote:
> The Wifi card attached to one usb port needs to be unkilled. The
> corresponding gpio and also the gpio for the LED are exported to be
> controlled by userspace later on.
> 
> Signed-off-by: Marc Dietrich <marvin24@gmx.de>

[snip]

> +static void __init paz00_wifi_init(void)
> +{
> +	int ret;
> +
> +	/* unlock hw rfkill */
> +	ret = gpio_request_one(TEGRA_WIFI_PWRN, GPIOF_OUT_INIT_HIGH,
> +			"wifi_pwrn");
> +	if(ret) {
> +		pr_warning("WIFI: could not request PWRN gpio!\n");
> +		return;
> +	}
> +	gpio_export(TEGRA_WIFI_PWRN, 0);

Although enabling wifi on boot may be OK for now, I think in long term
it would be better and more proper to use rfkill infrastructure for this
instead of just exporting gpio to userspace. There were some patches for
gpio-based rfkill switch floating around lately. This is one the versions:
https://lkml.org/lkml/2011/5/6/372
Not sure about their status and if they are directly suitable for PAZ00, but
you may have a look. Btw, there's also another mostly generic gpio-rfkill
driver in the tree I'm aware of - see arch/arm/mach-pxa/tosa-bt.c

> +
> +	/* export wifi led */
> +	ret = gpio_request_one(TEGRA_WIFI_LED, GPIOF_OUT_INIT_HIGH,
> +			"wifi_led");
> +	if(ret)
> +		pr_warning("WIFI: could not request LED gpio!\n");
> +	gpio_export(TEGRA_WIFI_LED, 0);
For LED I think it's better to register gpio-leds platform device with
something like 'rfkill.0' or 'wifi-rx' or whatever as a default trigger
(not sure about exact names of triggers - you'll need to look up them).
That way you will get a wide choice of led triggers for free, and still
retain possibility of manual driving leds from userspace.

-- 
Best regards,
Dmitry "MAD" Artamonow

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

* Re: [PATCH 6/6] ARM: tegra: paz00: enable wifi card
  2011-05-19 20:06       ` Dmitry Artamonow
@ 2011-05-20  7:50         ` Marc Dietich
  -1 siblings, 0 replies; 22+ messages in thread
From: Marc Dietich @ 2011-05-20  7:50 UTC (permalink / raw)
  To: Dmitry Artamonow
  Cc: Colin Cross, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Olof Johansson,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r


Hi Dmitry,

> On 14:08 Thu 19 May     , Marc Dietrich wrote:
> > The Wifi card attached to one usb port needs to be unkilled. The
> > corresponding gpio and also the gpio for the LED are exported to be
> > controlled by userspace later on.
> > 
> > Signed-off-by: Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>
> 
> [snip]
> 
> > +static void __init paz00_wifi_init(void)
> > +{
> > +	int ret;
> > +
> > +	/* unlock hw rfkill */
> > +	ret = gpio_request_one(TEGRA_WIFI_PWRN, GPIOF_OUT_INIT_HIGH,
> > +			"wifi_pwrn");
> > +	if(ret) {
> > +		pr_warning("WIFI: could not request PWRN gpio!\n");
> > +		return;
> > +	}
> > +	gpio_export(TEGRA_WIFI_PWRN, 0);
> 
> Although enabling wifi on boot may be OK for now, I think in long term
> it would be better and more proper to use rfkill infrastructure for this
> instead of just exporting gpio to userspace. There were some patches for
> gpio-based rfkill switch floating around lately. This is one the versions:
> https://lkml.org/lkml/2011/5/6/372
> Not sure about their status and if they are directly suitable for PAZ00,
> but you may have a look. Btw, there's also another mostly generic
> gpio-rfkill driver in the tree I'm aware of - see
> arch/arm/mach-pxa/tosa-bt.c

yes, proper rfkill support is on my ToDo list. As it seems, the rt2x00 driver 
which we are using also has some initial support for gpio based rfkill. I guess 
I need some more time to sort this out.

> > +
> > +	/* export wifi led */
> > +	ret = gpio_request_one(TEGRA_WIFI_LED, GPIOF_OUT_INIT_HIGH,
> > +			"wifi_led");
> > +	if(ret)
> > +		pr_warning("WIFI: could not request LED gpio!\n");
> > +	gpio_export(TEGRA_WIFI_LED, 0);
> 
> For LED I think it's better to register gpio-leds platform device with
> something like 'rfkill.0' or 'wifi-rx' or whatever as a default trigger
> (not sure about exact names of triggers - you'll need to look up them).
> That way you will get a wide choice of led triggers for free, and still
> retain possibility of manual driving leds from userspace.

There are surely better ways to do this. Luckily, we got some more time to 
rework this because the tegra board changes were put to "hold" status. Expect 
some new version in a few weeks.

Colin, first sorry that I misspelled your name serveral times. I swear it will 
not happen again. 

Second, please don't apply this patch to the for-next tree. I will resend a new 
version which better integrates into the kernel subsystem.

Thanks for your comments!

Marc

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

* [PATCH 6/6] ARM: tegra: paz00: enable wifi card
@ 2011-05-20  7:50         ` Marc Dietich
  0 siblings, 0 replies; 22+ messages in thread
From: Marc Dietich @ 2011-05-20  7:50 UTC (permalink / raw)
  To: linux-arm-kernel


Hi Dmitry,

> On 14:08 Thu 19 May     , Marc Dietrich wrote:
> > The Wifi card attached to one usb port needs to be unkilled. The
> > corresponding gpio and also the gpio for the LED are exported to be
> > controlled by userspace later on.
> > 
> > Signed-off-by: Marc Dietrich <marvin24@gmx.de>
> 
> [snip]
> 
> > +static void __init paz00_wifi_init(void)
> > +{
> > +	int ret;
> > +
> > +	/* unlock hw rfkill */
> > +	ret = gpio_request_one(TEGRA_WIFI_PWRN, GPIOF_OUT_INIT_HIGH,
> > +			"wifi_pwrn");
> > +	if(ret) {
> > +		pr_warning("WIFI: could not request PWRN gpio!\n");
> > +		return;
> > +	}
> > +	gpio_export(TEGRA_WIFI_PWRN, 0);
> 
> Although enabling wifi on boot may be OK for now, I think in long term
> it would be better and more proper to use rfkill infrastructure for this
> instead of just exporting gpio to userspace. There were some patches for
> gpio-based rfkill switch floating around lately. This is one the versions:
> https://lkml.org/lkml/2011/5/6/372
> Not sure about their status and if they are directly suitable for PAZ00,
> but you may have a look. Btw, there's also another mostly generic
> gpio-rfkill driver in the tree I'm aware of - see
> arch/arm/mach-pxa/tosa-bt.c

yes, proper rfkill support is on my ToDo list. As it seems, the rt2x00 driver 
which we are using also has some initial support for gpio based rfkill. I guess 
I need some more time to sort this out.

> > +
> > +	/* export wifi led */
> > +	ret = gpio_request_one(TEGRA_WIFI_LED, GPIOF_OUT_INIT_HIGH,
> > +			"wifi_led");
> > +	if(ret)
> > +		pr_warning("WIFI: could not request LED gpio!\n");
> > +	gpio_export(TEGRA_WIFI_LED, 0);
> 
> For LED I think it's better to register gpio-leds platform device with
> something like 'rfkill.0' or 'wifi-rx' or whatever as a default trigger
> (not sure about exact names of triggers - you'll need to look up them).
> That way you will get a wide choice of led triggers for free, and still
> retain possibility of manual driving leds from userspace.

There are surely better ways to do this. Luckily, we got some more time to 
rework this because the tegra board changes were put to "hold" status. Expect 
some new version in a few weeks.

Colin, first sorry that I misspelled your name serveral times. I swear it will 
not happen again. 

Second, please don't apply this patch to the for-next tree. I will resend a new 
version which better integrates into the kernel subsystem.

Thanks for your comments!

Marc

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

* Re: [PATCH 0/6 V2] ARM: tegra: paz00 patches for 2.6.40
  2011-05-19 12:08 ` Marc Dietrich
@ 2011-07-10 22:14     ` Colin Cross
  -1 siblings, 0 replies; 22+ messages in thread
From: Colin Cross @ 2011-07-10 22:14 UTC (permalink / raw)
  To: Marc Dietrich
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Olof Johansson,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Thu, May 19, 2011 at 5:08 AM, Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org> wrote:
> Hi Collin, Olof,
>
> the following patches are intended for 2.6.40 merge. They are mostly similar
> to the TrimSlice patches sent by Mike a few days ago.
>
> We are still stuggling with the sound codec (alc5632) and the nvec, so there
> is nothing to connect to the i2c yet. On the other hand, I'm wondering what's
> up with the atd7461 included in most (all?) boards. It's compatible with lm90,
> but the driver will never register because of the wrong name.
>
> May I ask if there is some timeline for framebuffer integration? A netbook
> without display is of not much use (ok, same holds for keyboard/mouse).
>
> Thanks!
>
> Marc
>
> Changes in V2:
>    - add some more blurb to the commit messages
>    - change the machine to some neater name (patch 5)
>    - enable the wifi board during boot (patch 6)
>
>
> Marc Dietrich (6):
>  ARM: tegra: paz00: whitespace cleanup
>  ARM: tegra: paz00: register i2c busses
>  ARM: tegra: paz00: enable usb ports
>  ARM: tegra: paz00: cleanup sdhci ports
>  ARM: tegra: paz00: change the machine name
>  ARM: tegra: paz00: enable wifi card
>
>  arch/arm/mach-tegra/board-paz00-pinmux.c |   12 ++--
>  arch/arm/mach-tegra/board-paz00.c        |   96 ++++++++++++++++++++++++++----
>  arch/arm/mach-tegra/board-paz00.h        |   17 ++++--
>  3 files changed, 102 insertions(+), 23 deletions(-)
>
> --
> 1.7.4.2
>
>

I pushed this series to for-next, except for patch 6 "ARM: tegra:
paz00: enable wifi card".

I have some cleanup patches that go on top to reduce some of the
duplicate platform data added by trimslice and paz00, I'd appreciate a
tested-by once I post those.

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

* [PATCH 0/6 V2] ARM: tegra: paz00 patches for 2.6.40
@ 2011-07-10 22:14     ` Colin Cross
  0 siblings, 0 replies; 22+ messages in thread
From: Colin Cross @ 2011-07-10 22:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 19, 2011 at 5:08 AM, Marc Dietrich <marvin24@gmx.de> wrote:
> Hi Collin, Olof,
>
> the following patches are intended for 2.6.40 merge. They are mostly similar
> to the TrimSlice patches sent by Mike a few days ago.
>
> We are still stuggling with the sound codec (alc5632) and the nvec, so there
> is nothing to connect to the i2c yet. On the other hand, I'm wondering what's
> up with the atd7461 included in most (all?) boards. It's compatible with lm90,
> but the driver will never register because of the wrong name.
>
> May I ask if there is some timeline for framebuffer integration? A netbook
> without display is of not much use (ok, same holds for keyboard/mouse).
>
> Thanks!
>
> Marc
>
> Changes in V2:
> ? ?- add some more blurb to the commit messages
> ? ?- change the machine to some neater name (patch 5)
> ? ?- enable the wifi board during boot (patch 6)
>
>
> Marc Dietrich (6):
> ?ARM: tegra: paz00: whitespace cleanup
> ?ARM: tegra: paz00: register i2c busses
> ?ARM: tegra: paz00: enable usb ports
> ?ARM: tegra: paz00: cleanup sdhci ports
> ?ARM: tegra: paz00: change the machine name
> ?ARM: tegra: paz00: enable wifi card
>
> ?arch/arm/mach-tegra/board-paz00-pinmux.c | ? 12 ++--
> ?arch/arm/mach-tegra/board-paz00.c ? ? ? ?| ? 96 ++++++++++++++++++++++++++----
> ?arch/arm/mach-tegra/board-paz00.h ? ? ? ?| ? 17 ++++--
> ?3 files changed, 102 insertions(+), 23 deletions(-)
>
> --
> 1.7.4.2
>
>

I pushed this series to for-next, except for patch 6 "ARM: tegra:
paz00: enable wifi card".

I have some cleanup patches that go on top to reduce some of the
duplicate platform data added by trimslice and paz00, I'd appreciate a
tested-by once I post those.

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

* Re: [PATCH 0/6 V2] ARM: tegra: paz00 patches for 2.6.40
  2011-07-10 22:14     ` Colin Cross
@ 2011-07-12 10:47         ` Marc Dietrich
  -1 siblings, 0 replies; 22+ messages in thread
From: Marc Dietrich @ 2011-07-12 10:47 UTC (permalink / raw)
  To: Colin Cross
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Olof Johansson,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Collin,

Am Sun, 10 Jul 2011 15:14:33 -0700
schrieb Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>:

> On Thu, May 19, 2011 at 5:08 AM, Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>
> wrote:
> > Hi Collin, Olof,
> >
> > the following patches are intended for 2.6.40 merge. They are
> > mostly similar to the TrimSlice patches sent by Mike a few days ago.
> >
> > ...
> 
> I pushed this series to for-next, except for patch 6 "ARM: tegra:
> paz00: enable wifi card".
> 
> I have some cleanup patches that go on top to reduce some of the
> duplicate platform data added by trimslice and paz00, I'd appreciate a
> tested-by once I post those.

thanks for taking care of this. I'm currently in busy holidays and can't
read my mail frequently. Anyway, I'll try my best to test the cleanup
patches or ask another person from the AC100 team to check.

I also have a replacement for the wifi patch in work which I'll send out
as soon as possible.

Thanks

Marc

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

* [PATCH 0/6 V2] ARM: tegra: paz00 patches for 2.6.40
@ 2011-07-12 10:47         ` Marc Dietrich
  0 siblings, 0 replies; 22+ messages in thread
From: Marc Dietrich @ 2011-07-12 10:47 UTC (permalink / raw)
  To: linux-arm-kernel

Collin,

Am Sun, 10 Jul 2011 15:14:33 -0700
schrieb Colin Cross <ccross@android.com>:

> On Thu, May 19, 2011 at 5:08 AM, Marc Dietrich <marvin24@gmx.de>
> wrote:
> > Hi Collin, Olof,
> >
> > the following patches are intended for 2.6.40 merge. They are
> > mostly similar to the TrimSlice patches sent by Mike a few days ago.
> >
> > ...
> 
> I pushed this series to for-next, except for patch 6 "ARM: tegra:
> paz00: enable wifi card".
> 
> I have some cleanup patches that go on top to reduce some of the
> duplicate platform data added by trimslice and paz00, I'd appreciate a
> tested-by once I post those.

thanks for taking care of this. I'm currently in busy holidays and can't
read my mail frequently. Anyway, I'll try my best to test the cleanup
patches or ask another person from the AC100 team to check.

I also have a replacement for the wifi patch in work which I'll send out
as soon as possible.

Thanks

Marc

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

end of thread, other threads:[~2011-07-12 10:47 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-19 12:08 [PATCH 0/6 V2] ARM: tegra: paz00 patches for 2.6.40 Marc Dietrich
2011-05-19 12:08 ` Marc Dietrich
     [not found] ` <1305806910-3903-1-git-send-email-marvin24-Mmb7MZpHnFY@public.gmane.org>
2011-05-19 12:08   ` [PATCH 1/6] ARM: tegra: paz00: whitespace cleanup Marc Dietrich
2011-05-19 12:08     ` Marc Dietrich
2011-05-19 12:08   ` [PATCH 2/6] ARM: tegra: paz00: register i2c busses Marc Dietrich
2011-05-19 12:08     ` Marc Dietrich
2011-05-19 12:08   ` [PATCH 3/6] ARM: tegra: paz00: enable usb ports Marc Dietrich
2011-05-19 12:08     ` Marc Dietrich
2011-05-19 12:08   ` [PATCH 4/6] ARM: tegra: paz00: cleanup sdhci ports Marc Dietrich
2011-05-19 12:08     ` Marc Dietrich
2011-05-19 12:08   ` [PATCH 5/6] ARM: tegra: paz00: change the machine name Marc Dietrich
2011-05-19 12:08     ` Marc Dietrich
2011-05-19 12:08   ` [PATCH 6/6] ARM: tegra: paz00: enable wifi card Marc Dietrich
2011-05-19 12:08     ` Marc Dietrich
2011-05-19 20:06     ` Dmitry Artamonow
2011-05-19 20:06       ` Dmitry Artamonow
2011-05-20  7:50       ` Marc Dietich
2011-05-20  7:50         ` Marc Dietich
2011-07-10 22:14   ` [PATCH 0/6 V2] ARM: tegra: paz00 patches for 2.6.40 Colin Cross
2011-07-10 22:14     ` Colin Cross
     [not found]     ` <CAMbhsRSH2iyv0_1seVtwSQ7AbHmPbz+VqSVkhfLgsNA8+dOwJA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-07-12 10:47       ` Marc Dietrich
2011-07-12 10:47         ` Marc Dietrich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.