From de7164db70af94e58dca84426374138cd3a18f34 Mon Sep 17 00:00:00 2001 From: Marc Dietrich Date: Sun, 7 Aug 2011 21:00:51 +0200 Subject: ARM: tegra: paz00: add support serial port on JP1 UART-A is connected to JP1 and used by the bootloader for debugging output while UART-D is connected to the mini-pcie expansion slot. Signed-off-by: Marc Dietrich Signed-off-by: Olof Johansson --- arch/arm/mach-tegra/board-paz00.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'arch/arm/mach-tegra/board-paz00.c') diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c index ea2f79c9879b..f3b737637306 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c @@ -45,6 +45,16 @@ static struct plat_serial8250_port debug_uart_platform_data[] = { { + /* serial port on JP1 */ + .membase = IO_ADDRESS(TEGRA_UARTA_BASE), + .mapbase = TEGRA_UARTA_BASE, + .irq = INT_UARTA, + .flags = UPF_BOOT_AUTOCONF, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = 216000000, + }, { + /* serial port on mini-pcie */ .membase = IO_ADDRESS(TEGRA_UARTD_BASE), .mapbase = TEGRA_UARTD_BASE, .irq = INT_UARTD, @@ -94,6 +104,7 @@ static void __init tegra_paz00_fixup(struct machine_desc *desc, static __initdata struct tegra_clk_init_table paz00_clk_init_table[] = { /* name parent rate enabled */ + { "uarta", "pll_p", 216000000, true }, { "uartd", "pll_p", 216000000, true }, { NULL, NULL, 0, 0}, }; -- cgit v1.2.3 From 9aaa15a739a0a3880922a850573493daa4ee4bcc Mon Sep 17 00:00:00 2001 From: Marc Dietrich Date: Sun, 7 Aug 2011 21:00:52 +0200 Subject: ARM: tegra: paz00: enable rfkill for internal wifi card This patch adds support for controlling the rfkill gpios for the internal WIFI card via the rfkill_gpio driver. Signed-off-by: Marc Dietrich Signed-off-by: Olof Johansson --- arch/arm/mach-tegra/board-paz00-pinmux.c | 2 ++ arch/arm/mach-tegra/board-paz00.c | 17 +++++++++++++++++ arch/arm/mach-tegra/board-paz00.h | 15 +++++++++++---- 3 files changed, 30 insertions(+), 4 deletions(-) (limited to 'arch/arm/mach-tegra/board-paz00.c') diff --git a/arch/arm/mach-tegra/board-paz00-pinmux.c b/arch/arm/mach-tegra/board-paz00-pinmux.c index bdd2627dd87b..70c57101b0b2 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_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 f3b737637306..6b798e760931 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -75,10 +76,26 @@ static struct platform_device debug_uart = { }, }; +static struct rfkill_gpio_platform_data wifi_rfkill_platform_data = { + .name = "wifi_rfkill", + .reset_gpio = TEGRA_WIFI_RST, + .shutdown_gpio = TEGRA_WIFI_PWRN, + .type = RFKILL_TYPE_WLAN, +}; + +static struct platform_device wifi_rfkill_device = { + .name = "rfkill_gpio", + .id = -1, + .dev = { + .platform_data = &wifi_rfkill_platform_data, + }, +}; + static struct platform_device *paz00_devices[] __initdata = { &debug_uart, &tegra_sdhci_device1, &tegra_sdhci_device4, + &wifi_rfkill_device, }; static void paz00_i2c_init(void) diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h index d4ff39ddaeb3..e780f30fcf12 100644 --- a/arch/arm/mach-tegra/board-paz00.h +++ b/arch/arm/mach-tegra/board-paz00.h @@ -17,10 +17,17 @@ #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_ULPI_RST TEGRA_GPIO_PV0 +/* SDCARD */ +#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_PWRN TEGRA_GPIO_PK5 +#define TEGRA_WIFI_RST TEGRA_GPIO_PD1 void paz00_pinmux_init(void); -- cgit v1.2.3 From 8e219ebfa0e3f5d99f01cc57c6b84023343ff22a Mon Sep 17 00:00:00 2001 From: Marc Dietrich Date: Sun, 7 Aug 2011 21:00:53 +0200 Subject: ARM: tegra: paz00: enable wifi led This adds support for the wifi led. It is automaticly triggered by the rfkill0 event. Signed-off-by: Marc Dietrich Signed-off-by: Olof Johansson --- arch/arm/mach-tegra/board-paz00-pinmux.c | 1 + arch/arm/mach-tegra/board-paz00.c | 22 ++++++++++++++++++++++ arch/arm/mach-tegra/board-paz00.h | 1 + 3 files changed, 24 insertions(+) (limited to 'arch/arm/mach-tegra/board-paz00.c') diff --git a/arch/arm/mach-tegra/board-paz00-pinmux.c b/arch/arm/mach-tegra/board-paz00-pinmux.c index 70c57101b0b2..22257697d3ee 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_ULPI_RST, .enable = true }, { .gpio = TEGRA_WIFI_PWRN, .enable = true }, { .gpio = TEGRA_WIFI_RST, .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 6b798e760931..45111f6a5ced 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c @@ -91,11 +91,33 @@ static struct platform_device wifi_rfkill_device = { }, }; +static struct gpio_led gpio_leds[] = { + { + .name = "wifi-led", + .default_trigger = "rfkill0", + .gpio = TEGRA_WIFI_LED, + }, +}; + +static struct gpio_led_platform_data gpio_led_info = { + .leds = gpio_leds, + .num_leds = ARRAY_SIZE(gpio_leds), +}; + +static struct platform_device leds_gpio = { + .name = "leds-gpio", + .id = -1, + .dev = { + .platform_data = &gpio_led_info, + }, +}; + static struct platform_device *paz00_devices[] __initdata = { &debug_uart, &tegra_sdhci_device1, &tegra_sdhci_device4, &wifi_rfkill_device, + &leds_gpio, }; static void paz00_i2c_init(void) diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h index e780f30fcf12..86057c3fb9a0 100644 --- a/arch/arm/mach-tegra/board-paz00.h +++ b/arch/arm/mach-tegra/board-paz00.h @@ -28,6 +28,7 @@ /* WIFI */ #define TEGRA_WIFI_PWRN TEGRA_GPIO_PK5 #define TEGRA_WIFI_RST TEGRA_GPIO_PD1 +#define TEGRA_WIFI_LED TEGRA_GPIO_PD0 void paz00_pinmux_init(void); -- cgit v1.2.3 From 24810cb53c0c66eb2922117c6a53c64c3f7a07a6 Mon Sep 17 00:00:00 2001 From: Marc Dietrich Date: Sun, 7 Aug 2011 21:00:55 +0200 Subject: ARM: tegra: paz00: reorder the SDHCI channel init This reorders the SDHCI channel init order. With this patch, the internal emmc gets the mmcblk0 device while the external sdmmc port gets mmcblk1. This change is only for convenience. Signed-off-by: Marc Dietrich Signed-off-by: Olof Johansson --- arch/arm/mach-tegra/board-paz00.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-tegra/board-paz00.c') diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c index 45111f6a5ced..51d847f7fca9 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c @@ -114,8 +114,8 @@ static struct platform_device leds_gpio = { static struct platform_device *paz00_devices[] __initdata = { &debug_uart, - &tegra_sdhci_device1, &tegra_sdhci_device4, + &tegra_sdhci_device1, &wifi_rfkill_device, &leds_gpio, }; -- cgit v1.2.3 From 11b3adb45da636a839bd2b7c300c616e0e2c38d6 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Mon, 8 Aug 2011 15:01:05 -0600 Subject: ARM: Tegra: Force PORT_TEGRA as the UART type 8250.c recently gained an explicit PORT_TEGRA port type. Specifically request this in all Tegra boards' UART platform data. Signed-off-by: Stephen Warren Signed-off-by: Olof Johansson --- arch/arm/mach-tegra/board-harmony.c | 3 ++- arch/arm/mach-tegra/board-paz00.c | 6 ++++-- arch/arm/mach-tegra/board-seaboard.c | 3 ++- arch/arm/mach-tegra/board-trimslice.c | 3 ++- 4 files changed, 10 insertions(+), 5 deletions(-) (limited to 'arch/arm/mach-tegra/board-paz00.c') diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c index f528a5a192a6..987dab527e8c 100644 --- a/arch/arm/mach-tegra/board-harmony.c +++ b/arch/arm/mach-tegra/board-harmony.c @@ -49,7 +49,8 @@ static struct plat_serial8250_port debug_uart_platform_data[] = { .membase = IO_ADDRESS(TEGRA_UARTD_BASE), .mapbase = TEGRA_UARTD_BASE, .irq = INT_UARTD, - .flags = UPF_BOOT_AUTOCONF, + .flags = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE, + .type = PORT_TEGRA, .iotype = UPIO_MEM, .regshift = 2, .uartclk = 216000000, diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c index 51d847f7fca9..7630c239e7a9 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c @@ -50,7 +50,8 @@ static struct plat_serial8250_port debug_uart_platform_data[] = { .membase = IO_ADDRESS(TEGRA_UARTA_BASE), .mapbase = TEGRA_UARTA_BASE, .irq = INT_UARTA, - .flags = UPF_BOOT_AUTOCONF, + .flags = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE, + .type = PORT_TEGRA, .iotype = UPIO_MEM, .regshift = 2, .uartclk = 216000000, @@ -59,7 +60,8 @@ static struct plat_serial8250_port debug_uart_platform_data[] = { .membase = IO_ADDRESS(TEGRA_UARTD_BASE), .mapbase = TEGRA_UARTD_BASE, .irq = INT_UARTD, - .flags = UPF_BOOT_AUTOCONF, + .flags = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE, + .type = PORT_TEGRA, .iotype = UPIO_MEM, .regshift = 2, .uartclk = 216000000, diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c index 237a94a1f44a..25446df00006 100644 --- a/arch/arm/mach-tegra/board-seaboard.c +++ b/arch/arm/mach-tegra/board-seaboard.c @@ -44,7 +44,8 @@ static struct plat_serial8250_port debug_uart_platform_data[] = { { /* Memory and IRQ filled in before registration */ - .flags = UPF_BOOT_AUTOCONF, + .flags = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE, + .type = PORT_TEGRA, .iotype = UPIO_MEM, .regshift = 2, .uartclk = 216000000, diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c index 89a6d2adc1de..91875b975563 100644 --- a/arch/arm/mach-tegra/board-trimslice.c +++ b/arch/arm/mach-tegra/board-trimslice.c @@ -46,7 +46,8 @@ static struct plat_serial8250_port debug_uart_platform_data[] = { .membase = IO_ADDRESS(TEGRA_UARTA_BASE), .mapbase = TEGRA_UARTA_BASE, .irq = INT_UARTA, - .flags = UPF_BOOT_AUTOCONF, + .flags = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE, + .type = PORT_TEGRA, .iotype = UPIO_MEM, .regshift = 2, .uartclk = 216000000, -- cgit v1.2.3 From ad9f6677575e80ce23cb491d5ffb7b536772552e Mon Sep 17 00:00:00 2001 From: Marc Dietrich Date: Wed, 10 Aug 2011 19:21:56 +0200 Subject: ARM: tegra: paz00: add clocks required for usb operation These clocks are required for usb operation. pll_p_out4 needs to be set to 24 MHz. The other clocks default to "off" in order to save some energy. Signed-off-by: Marc Dietrich Acked-by: Stephen Warren Signed-off-by: Olof Johansson --- arch/arm/mach-tegra/board-paz00.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/arm/mach-tegra/board-paz00.c') diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c index 7630c239e7a9..d161590c99c2 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c @@ -147,6 +147,12 @@ static __initdata struct tegra_clk_init_table paz00_clk_init_table[] = { /* name parent rate enabled */ { "uarta", "pll_p", 216000000, true }, { "uartd", "pll_p", 216000000, true }, + + { "pll_p_out4", "pll_p", 24000000, true }, + { "usbd", "clk_m", 12000000, false }, + { "usb2", "clk_m", 12000000, false }, + { "usb3", "clk_m", 12000000, false }, + { NULL, NULL, 0, 0}, }; -- cgit v1.2.3