MXC: mach_armadillo5x0: Add USB Host support.
Subsystems (2)
PATCH 1/1 MXC: mach_armadillo5x0: Add USB Host support.
This add USB Host capability. The Armadillo 500 board is supplied with two USB Host connectors driven by the USB OTG and USB Host 2 ports, through two NXP isp 1504 transceivers.
---
Sascha, if there aren't problems, can you add this for 2.6.34?
arch/arm/mach-mx3/Kconfig | 1 + arch/arm/mach-mx3/mach-armadillo5x0.c | 128 +++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+), 0 deletions(-)
arch/arm/mach-mx3/Kconfig +1 -0
@@ -95,6 +95,7 @@ config MACH_PCM043 config MACH_ARMADILLO5X0 bool "Support Atmark Armadillo-500 Development Base Board" select ARCH_MX31 + select MXC_ULPI if USB_ULPI help Include support for Atmark Armadillo-500 platform. This includes specific configurations for the board and its peripherals.
arch/arm/mach-mx3/mach-armadillo5x0.c +126 -0
150 lines not on this page · raw message
Signature · 1 line
1.6.3.3
PATCH 1/1 MXC: mach_armadillo5x0: Add USB Host support.
Hi Alberto,
Quoted 59 lines · Alberto Panizzo
This add USB Host capability. The Armadillo 500 board is supplied with two USB Host connectors driven by the USB OTG and USB Host 2 ports, through two NXP isp 1504 transceivers.
Signed-off-by Alberto Panizzo <[email protected]>---
Sascha, if there aren't problems, can you add this for 2.6.34?
arch/arm/mach-mx3/Kconfig | 1 + arch/arm/mach-mx3/mach-armadillo5x0.c | 128 +++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+), 0 deletions(-)arch/arm/mach-mx3/Kconfig +1
-0@@ -95,6 +95,7 @@ config MACH_PCM043 config MACH_ARMADILLO5X0 bool "Support Atmark Armadillo-500 Development Base Board" select ARCH_MX31 + select MXC_ULPI if USB_ULPI help Include support for Atmark Armadillo-500 platform. This includes specific configurations for the board and its peripherals.arch/arm/mach-mx3/mach-armadillo5x0.c +12
-0@@ -36,6 +36,9 @@#include <linux/input.h> #include <linux/gpio_keys.h> #include <linux/i2c.h> +#include <linux/usb/otg.h> +#include <linux/usb/ulpi.h> +#include <linux/delay.h> #include <mach/hardware.h> #include <asm/mach-types.h> @@ -52,6 +55,8 @@#include <mach/ipu.h> #include <mach/mx3fb.h> #include <mach/mxc_nand.h> +#include <mach/mxc_ehci.h> +#include <mach/ulpi.h> #include "devices.h" #include "crm_regs.h" @@ -103,6 +108,118 @@ static int armadillo5x0_pins[] = {/* I2C2 */ MX31_PIN_CSPI2_MOSI__SCL ,MX31_PIN_CSPI2_MISO__SDA , +/* OTG */ +MX31_PIN_USBOTG_DATA0__USBOTG_DATA0 , +MX31_PIN_USBOTG_DATA1__USBOTG_DATA1 , +MX31_PIN_USBOTG_DATA2__USBOTG_DATA2 , +MX31_PIN_USBOTG_DATA3__USBOTG_DATA3 , +MX31_PIN_USBOTG_DATA4__USBOTG_DATA4 , + MX31_PIN_USBOTG_DATA5__USBOTG_DATA5,
arch/arm/mach-mx3/mach-armadillo5x0.c static int armadillo5x0_pins[] = { · line 126
Quoted 10 lines
arch/arm/mach-mx3/mach-armadillo5x0.c +9
-0+MX31_PIN_USBOTG_DATA6__USBOTG_DATA6 , +MX31_PIN_USBOTG_DATA7__USBOTG_DATA7 , +MX31_PIN_USBOTG_CLK__USBOTG_CLK , +MX31_PIN_USBOTG_DIR__USBOTG_DIR , +MX31_PIN_USBOTG_NXT__USBOTG_NXT , +MX31_PIN_USBOTG_STP__USBOTG_STP , +/* USB host 2 */ +IOMUX_MODE (MX31_PIN_USBH2_CLK ,IOMUX_CONFIG_FUNC ), + IOMUX_MODE(MX31_PIN_USBH2_DIR, IOMUX_CONFIG_FUNC),
I think you need to protect all hunks by
#ifdef CONFIG_USB_ULPI
For the pin-setup it's not important, but you must not call otg_ulpi_create if USB_ULPI isn't configured.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 1/1 MXC: mach_armadillo5x0: Add USB Host support.
Hi Uwe,
Quoted 12 lines · Uwe Kleine-K?nig
Hi Alberto,
Quoted 9 lines · Alberto Panizzo
This add USB Host capability. The Armadillo 500 board is supplied with two USB Host connectors driven by the USB OTG and USB Host 2 ports, through two NXP isp 1504 transceivers.
Signed-off-by Alberto Panizzo <[email protected]>---
Sascha, if there aren't problems, can you add this for 2.6.34?
..
Quoted 25 lines
Quoted 12 lines
#include "
crm_regs.h"arch/arm/mach-mx3/mach-armadillo5x0.c +7
-0@@ -103,6 +108,118 @@ static int armadillo5x0_pins[] = {/* I2C2 */ MX31_PIN_CSPI2_MOSI__SCL ,MX31_PIN_CSPI2_MISO__SDA , +/* OTG */ +MX31_PIN_USBOTG_DATA0__USBOTG_DATA0 , +MX31_PIN_USBOTG_DATA1__USBOTG_DATA1 , +MX31_PIN_USBOTG_DATA2__USBOTG_DATA2 , +MX31_PIN_USBOTG_DATA3__USBOTG_DATA3 , +MX31_PIN_USBOTG_DATA4__USBOTG_DATA4 , + MX31_PIN_USBOTG_DATA5__USBOTG_DATA5,arch/arm/mach-mx3/mach-armadillo5x0.c static int armadillo5x0_pins[] = { · line 126
Quoted 10 lines
arch/arm/mach-mx3/mach-armadillo5x0.c +9
-0+MX31_PIN_USBOTG_DATA6__USBOTG_DATA6 , +MX31_PIN_USBOTG_DATA7__USBOTG_DATA7 , +MX31_PIN_USBOTG_CLK__USBOTG_CLK , +MX31_PIN_USBOTG_DIR__USBOTG_DIR , +MX31_PIN_USBOTG_NXT__USBOTG_NXT , +MX31_PIN_USBOTG_STP__USBOTG_STP , +/* USB host 2 */ +IOMUX_MODE (MX31_PIN_USBH2_CLK ,IOMUX_CONFIG_FUNC ), + IOMUX_MODE(MX31_PIN_USBH2_DIR, IOMUX_CONFIG_FUNC),I think you need to protect all hunks by
#ifdefCONFIG_USB_ULPI
Quoted 6 lines
For the pin-setup it's not important, but you must not call
otg_ulpi_createifUSB_ULPIisn't configured.Best regards
Uwe
Ok, I'd seen this protection in pcm037 but I thought that on my board USB will be always enabled.
Sascha, please throw this patch, The From: mail is wrong, sorry..
Alberto!
PATCH 1/1 MXC: mach_armadillo5x0: Add USB Host support.
Hi Alberto,
Quoted 6 lines
Quoted 6 lines
I think you need to protect all hunks by
#ifdefCONFIG_USB_ULPIFor the pin-setup it's not important, but you must not call
otg_ulpi_createifUSB_ULPIisn't configured.
Quoted 6 lines
Quoted 3 lines
Best regards
UweOk, I'd seen this protection in pcm037 but I thought that on my board USB will be always enabled.
This breaks make randconfig, so either (a) add the #ifdefs or (b) select USB_ULPI. IMHO (a) is preferable.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |