mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 7/9] at91sam9m10g45ek: add usb support
Date: Mon, 21 Jan 2013 21:09:54 +0100	[thread overview]
Message-ID: <1358798996-26595-7-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1358798996-26595-1-git-send-email-plagnioj@jcrosoft.com>

warning: the ohci work only without MMU

enable:
 - ehci
 - usb strorage
 - usb net asix

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/at91sam9m10g45ek/init.c     |   20 ++++++++++++++++++++
 arch/arm/configs/at91sam9m10g45ek_defconfig |    6 ++++++
 2 files changed, 26 insertions(+)

diff --git a/arch/arm/boards/at91sam9m10g45ek/init.c b/arch/arm/boards/at91sam9m10g45ek/init.c
index d77b2bf..214de96 100644
--- a/arch/arm/boards/at91sam9m10g45ek/init.c
+++ b/arch/arm/boards/at91sam9m10g45ek/init.c
@@ -209,6 +209,25 @@ static void ek_device_add_keyboard(void)
 static void ek_device_add_keyboard(void) {}
 #endif
 
+#if defined(CONFIG_USB_OHCI) || defined(CONFIG_USB_EHCI)
+/*
+ * USB HS Host port (common to OHCI & EHCI)
+ */
+static struct at91_usbh_data ek_usbh_hs_data = {
+	.ports			= 2,
+	.vbus_pin		= {AT91_PIN_PD1, AT91_PIN_PD3},
+	.vbus_pin_active_low	= {1, 1},
+};
+
+static void ek_add_device_usb(void)
+{
+	at91_add_device_usbh_ohci(&ek_usbh_hs_data);
+	at91_add_device_usbh_ehci(&ek_usbh_hs_data);
+}
+#else
+static void ek_add_device_usb(void) {}
+#endif
+
 static int at91sam9m10g45ek_mem_init(void)
 {
 	at91_add_device_sdram(128 * 1024 * 1024);
@@ -222,6 +241,7 @@ static int at91sam9m10g45ek_devices_init(void)
 	ek_add_device_nand();
 	at91_add_device_eth(0, &macb_pdata);
 	ek_add_device_mci();
+	ek_add_device_usb();
 	ek_device_add_leds();
 	ek_device_add_keyboard();
 
diff --git a/arch/arm/configs/at91sam9m10g45ek_defconfig b/arch/arm/configs/at91sam9m10g45ek_defconfig
index 0929f8e..1e35787 100644
--- a/arch/arm/configs/at91sam9m10g45ek_defconfig
+++ b/arch/arm/configs/at91sam9m10g45ek_defconfig
@@ -58,6 +58,8 @@ CONFIG_FS_TFTP=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_NET_MACB=y
+CONFIG_NET_USB=y
+CONFIG_NET_USB_ASIX=y
 # CONFIG_SPI is not set
 CONFIG_MTD=y
 CONFIG_NAND=y
@@ -66,6 +68,10 @@ CONFIG_NAND=y
 # CONFIG_NAND_ECC_HW_NONE is not set
 CONFIG_NAND_ATMEL=y
 CONFIG_UBI=y
+CONFIG_USB=y
+CONFIG_USB_EHCI=y
+CONFIG_USB_EHCI_ATMEL=y
+CONFIG_USB_STORAGE=y
 CONFIG_MCI=y
 CONFIG_MCI_STARTUP=y
 CONFIG_MCI_ATMEL=y
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2013-01-21 20:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-21 20:07 [PATCH 0/9] atmel: add ehci support Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09 ` [PATCH 1/9] usb: add parameters info on usb device Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 2/9] usb: fix for USB_ST_STALLED status reporting in ehci_submit_async() Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 3/9] ehci: if caps ressource is not provided discover it via cr_capbase Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 4/9] ehci: add atmel support Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 5/9] at91: usb: allow to specicfy inverted vbus Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 6/9] at91sam9g45: add ehci support Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2013-01-22  8:30     ` [PATCH 7/9] at91sam9m10g45ek: add usb support Sascha Hauer
2013-01-22 14:15       ` Jean-Christophe PLAGNIOL-VILLARD
2013-01-22 14:24         ` Sascha Hauer
2013-01-22 14:46           ` Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 8/9] at91sam9x5: add ehci support Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 9/9] at91sam9x5ek: add usb support Jean-Christophe PLAGNIOL-VILLARD
2013-01-23 19:28 ` [PATCH 0/9] atmel: add ehci support Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1358798996-26595-7-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox