From: Tony Lindgren <tony@atomide.com>
To: linux-kernel@vger.kernel.org
Cc: David Brownell <dbrownell@users.sourceforge.net>,
Tony Lindgren <tony@atomide.com>
Subject: [PATCH 28/90] ARM: OMAP: USB peripheral support on H4
Date: Wed, 4 Apr 2007 14:05:07 -0400 [thread overview]
Message-ID: <11757100403021-git-send-email-tony@atomide.com> (raw)
In-Reply-To: <1175710033286-git-send-email-tony@atomide.com>
From: David Brownell <dbrownell@users.sourceforge.net>
H4 has two peripheral ports, one for "download" and one for OTG.
The one to use is selected through Kconfig.
NOTE: not yet working; I suspect there's a clock still turned off
or something like that, since neither port responds.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/Kconfig | 21 ++++++++++++++++++
arch/arm/mach-omap2/board-h4.c | 46 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 67 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 47c8b57..d4a366d 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -26,6 +26,27 @@ config MACH_OMAP_H4
depends on ARCH_OMAP2 && ARCH_OMAP24XX
select OMAP_DEBUG_DEVICES
+config MACH_OMAP_H4_OTG
+ bool "Use USB OTG connector, not device connector (S1.10)"
+ depends on MACH_OMAP_H4
+ help
+ Set this if you've set S1.10 (on the mainboard) to use the
+ Mini-AB (OTG) connector and OTG transceiver with the USB0
+ port, instead of the Mini-B ("download") connector with its
+ non-OTG transceiver.
+
+ Note that the "download" connector can be used to bootstrap
+ the system from the OMAP mask ROM. Also, since this is a
+ development platform, you can also force the OTG port into
+ a non-OTG operational mode.
+
+config MACH_OMAP2_H4_USB1
+ bool "Use USB1 port, not UART2 (S3.3)"
+ depends on MACH_OMAP_H4
+ help
+ Set this if you've set SW3.3 (on the CPU card) so that the
+ expansion connectors receive USB1 signals instead of UART2.
+
config MACH_OMAP_APOLLON
bool "OMAP 2420 Apollon board"
depends on ARCH_OMAP2 && ARCH_OMAP24XX
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index f125f43..b1cebdd 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -278,7 +278,11 @@ static void __init omap_h4_init_irq(void)
}
static struct omap_uart_config h4_uart_config __initdata = {
+#ifdef CONFIG_MACH_OMAP2_H4_USB1
+ .enabled_uarts = ((1 << 0) | (1 << 1)),
+#else
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
+#endif
};
static struct omap_mmc_config h4_mmc_config __initdata = {
@@ -295,10 +299,44 @@ static struct omap_lcd_config h4_lcd_config __initdata = {
.ctrl_name = "internal",
};
+static struct omap_usb_config h4_usb_config __initdata = {
+#ifdef CONFIG_MACH_OMAP2_H4_USB1
+ /* NOTE: usb1 could also be used with 3 wire signaling */
+ .pins[1] = 4,
+#endif
+
+#ifdef CONFIG_MACH_OMAP_H4_OTG
+ /* S1.10 ON -- USB OTG port
+ * usb0 switched to Mini-AB port and isp1301 transceiver;
+ * S2.POS3 = OFF, S2.POS4 = ON ... to allow battery charging
+ */
+ .otg = 1,
+ .pins[0] = 4,
+#ifdef CONFIG_USB_GADGET_OMAP
+ /* use OTG cable, or standard A-to-MiniB */
+ .hmc_mode = 0x14, /* 0:dev/otg 1:host 2:disable */
+#elif defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
+ /* use OTG cable, or NONSTANDARD (B-to-MiniB) */
+ .hmc_mode = 0x11, /* 0:host 1:host 2:disable */
+#endif /* XX */
+
+#else
+ /* S1.10 OFF -- usb "download port"
+ * usb0 switched to Mini-B port and isp1105 transceiver;
+ * S2.POS3 = ON, S2.POS4 = OFF ... to enable battery charging
+ */
+ .register_dev = 1,
+ .pins[0] = 3,
+// .hmc_mode = 0x14, /* 0:dev 1:host 2:disable */
+ .hmc_mode = 0x00, /* 0:dev|otg 1:disable 2:disable */
+#endif
+};
+
static struct omap_board_config_kernel h4_config[] = {
{ OMAP_TAG_UART, &h4_uart_config },
{ OMAP_TAG_MMC, &h4_mmc_config },
{ OMAP_TAG_LCD, &h4_lcd_config },
+ { OMAP_TAG_USB, &h4_usb_config },
};
static void __init omap_h4_init(void)
@@ -321,6 +359,14 @@ static void __init omap_h4_init(void)
}
#endif
+#ifdef CONFIG_MACH_OMAP2_H4_USB1
+ /* S3.3 controls whether these pins are for UART2 or USB1 */
+ omap_cfg_reg(N14_24XX_USB1_SE0);
+ omap_cfg_reg(P15_24XX_USB1_DAT);
+ omap_cfg_reg(W20_24XX_USB1_TXEN);
+ omap_cfg_reg(V19_24XX_USB1_RCV);
+#endif
+
platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices));
omap_board_config = h4_config;
omap_board_config_size = ARRAY_SIZE(h4_config);
--
1.4.4.2
next prev parent reply other threads:[~2007-04-04 18:34 UTC|newest]
Thread overview: 160+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-04 18:04 [PATCH 9/90] ARM: OMAP: Palm Tungsten E board update Tony Lindgren
2007-04-04 18:04 ` [PATCH 10/90] ARM: OMAP: Implement workaround for GPIO wakeup bug in OMAP2420 silicon Tony Lindgren
2007-04-04 18:04 ` [PATCH 11/90] ARM: OMAP: Add support for Amstrad Delta keypad Tony Lindgren
2007-04-04 18:04 ` [PATCH 12/90] ARM: OMAP: Fix apollon boot Tony Lindgren
2007-04-04 18:04 ` [PATCH 13/90] ARM: OMAP: /sys/kernel/debug/omap_gpio Tony Lindgren
2007-04-04 18:04 ` [PATCH 14/90] ARM: OMAP: omap2/memory.c compile fixes Tony Lindgren
2007-04-04 18:04 ` [PATCH 15/90] ARM: OMAP: 24xx pinmux updates Tony Lindgren
2007-04-04 18:04 ` [PATCH 16/90] ARM: OMAP: omap2/gpmc updates Tony Lindgren
2007-04-04 18:04 ` [PATCH 17/90] ARM: OMAP: Enable DSP clocks for McBSP on omap310 Tony Lindgren
2007-04-04 18:04 ` [PATCH 18/90] ARM: OMAP: PalmZ71 support Tony Lindgren
2007-04-04 18:04 ` [PATCH 19/90] ARM: OMAP: Register tsc2102 on Palm Tungsten E Tony Lindgren
2007-04-04 18:04 ` [PATCH 20/90] ARM: OMAP: gpio init section cleanups Tony Lindgren
2007-04-04 18:05 ` [PATCH 21/90] ARM: OMAP: gpio object shrinkage, cleanup Tony Lindgren
2007-04-04 18:05 ` [PATCH 22/90] ARM: OMAP: Fix Amstrad Delta omap-keypad usage Tony Lindgren
2007-04-04 18:05 ` [PATCH 23/90] ARM: OMAP: PalmZ71 extra brace fix Tony Lindgren
2007-04-04 18:05 ` [PATCH 24/90] ARM: OMAP: Fix typo in gpio Tony Lindgren
2007-04-04 18:05 ` [PATCH 25/90] ARM: OMAP: h4 must have blinky leds!! Tony Lindgren
2007-04-04 18:05 ` [PATCH 26/90] ARM: OMAP: abstract debug card setup (smc, leds) Tony Lindgren
2007-04-04 18:05 ` [PATCH 27/90] ARM: OMAP: Add minimal OMAP2430 support Tony Lindgren
2007-04-04 18:05 ` Tony Lindgren [this message]
2007-04-04 18:05 ` [PATCH 29/90] ARM: OMAP: Palm Tungsten|T support Tony Lindgren
2007-04-04 18:05 ` [PATCH 30/90] ARM: OMAP: Palm Zire71 minor fixes Tony Lindgren
2007-04-04 18:05 ` [PATCH 31/90] ARM: OMAP: plat-omap changes for 2430 SDP Tony Lindgren
2007-04-04 18:05 ` [PATCH 32/90] ARM: OMAP: Basic support for siemens sx1 Tony Lindgren
2007-04-04 18:05 ` [PATCH 33/90] ARM: OMAP: This patch enables I2C-2 support for 2430 SDP Tony Lindgren
2007-04-04 18:05 ` [PATCH 34/90] ARM: OMAP: Set keypad sense delays for the Palms Tony Lindgren
2007-04-04 18:05 ` [PATCH 35/90] ARM: OMAP: speed up gpio irq handling Tony Lindgren
2007-04-04 18:05 ` [PATCH 36/90] ARM: OMAP: Fix typo in board-h4.h Tony Lindgren
2007-04-04 18:05 ` [PATCH 37/90] ARM: OMAP: MPUIO wake updates Tony Lindgren
2007-04-04 18:05 ` [PATCH 38/90] ARM: OMAP: Sync headers with linux-omap Tony Lindgren
2007-04-04 18:05 ` [PATCH 39/90] ARM: OMAP: Sync core code " Tony Lindgren
2007-04-04 18:05 ` [PATCH 40/90] ARM: OMAP: Sync board specific files " Tony Lindgren
2007-04-04 18:05 ` [PATCH 41/90] ARM: OMAP: Avoid updating system time for sub-jiffy interrupts Tony Lindgren
2007-04-04 18:05 ` [PATCH 42/90] ARM: OMAP: Tabify mux.c Tony Lindgren
2007-04-04 18:05 ` [PATCH 43/90] ARM: OMAP: TUSB EVM init Tony Lindgren
2007-04-04 18:05 ` [PATCH 44/90] ARM: OMAP: Add mailbox support for IVA Tony Lindgren
2007-04-04 18:05 ` [PATCH 45/90] ARM: OMAP: Update omap h2 defconfig Tony Lindgren
2007-04-04 18:05 ` [PATCH 46/90] ARM: OMAP: Add omap osk defconfig Tony Lindgren
2007-04-04 18:05 ` [PATCH 47/90] ARM: OMAP: Fix gpmc header Tony Lindgren
2007-04-04 18:05 ` [PATCH 48/90] ARM: OMAP: I2C-1 init fix for 2430 Tony Lindgren
2007-04-04 18:05 ` [PATCH 49/90] ARM: OMAP: update board 2430 file for TWL PIH interrupts Tony Lindgren
2007-04-04 18:05 ` [PATCH 50/90] ARM: OMAP: board-sdp2430.c Remove unnecessary #includes Tony Lindgren
2007-04-04 18:05 ` [PATCH 51/90] ARM: OMAP: osk+mistral backlight, power, board specific Tony Lindgren
2007-04-04 18:05 ` [PATCH 52/90] ARM: OMAP: cleanup apollon board Tony Lindgren
2007-04-04 18:05 ` [PATCH 53/90] ARM: OMAP: Fix warning in timer32k.c Tony Lindgren
2007-04-04 18:05 ` [PATCH 54/90] ARM: OMAP: Update timer32k.c to compile Tony Lindgren
2007-04-04 18:05 ` [PATCH 55/90] ARM: OMAP: H3 workqueue fixes Tony Lindgren
2007-04-04 18:05 ` [PATCH 56/90] ARM: OMAP: Make board-palmz71 compile again Tony Lindgren
2007-04-04 18:05 ` [PATCH 57/90] ARM: OMAP: omap camera builds again; Mistral init and mux Tony Lindgren
2007-04-04 18:05 ` [PATCH 58/90] ARM: OMAP: musb_hdrc: tusb dma patch, minor Tony Lindgren
2007-04-04 18:05 ` [PATCH 59/90] ARM: OMAP: Mostly cosmetic to sync up with linux-omap tree Tony Lindgren
2007-04-04 18:05 ` [PATCH 60/90] ARM: OMAP: Merge gpmc changes from N800 tree Tony Lindgren
2007-04-04 18:05 ` [PATCH 61/90] ARM: OMAP: Merge driver headers " Tony Lindgren
2007-04-04 18:05 ` [PATCH 62/90] ARM: OMAP: Merge board specific files " Tony Lindgren
2007-04-04 18:05 ` [PATCH 63/90] ARM: OMAP: Merge PM code " Tony Lindgren
2007-04-04 18:05 ` [PATCH 64/90] ARM: OMAP: Fix warning in pm.c Tony Lindgren
2007-04-04 18:05 ` [PATCH 65/90] ARM: OMAP: Convert interrupt flags SA_* to IRQF_* Tony Lindgren
2007-04-04 18:05 ` [PATCH 66/90] ARM: OMAP: Sync framebuffer headers with N800 tree Tony Lindgren
2007-04-04 18:05 ` [PATCH 67/90] ARM: OMAP: Replace mach-omap/omap2 with mach-omap2 Tony Lindgren
2007-04-04 18:05 ` [PATCH 68/90] ARM: OMAP: FB sync with N800 tree (support for dynamic SRAM allocations) Tony Lindgren
2007-04-04 18:05 ` [PATCH 69/90] ARM: OMAP: add SoSSI clock Tony Lindgren
2007-04-04 18:05 ` [PATCH 70/90] ARM: OMAP: add SoSSI clock (call propagate_rate for childrens) Tony Lindgren
2007-04-04 18:05 ` [PATCH 71/90] ARM: OMAP: add SoSSI clock (remove manual checking of SoSSI state from idle) Tony Lindgren
2007-04-04 18:05 ` [PATCH 72/90] ARM: OMAP: N770: add missing LCD, LCD controller, touchscreen device registration Tony Lindgren
2007-04-04 18:05 ` [PATCH 73/90] ARM: OMAP: Add onennand board specific support for N800 Tony Lindgren
2007-04-04 18:05 ` [PATCH 74/90] ARM: OMAP: N800: Update board-specific audio support Tony Lindgren
2007-04-04 18:05 ` [PATCH 75/90] ARM: OMAP: 243x: Add mappings for SDRC and SMS Tony Lindgren
2007-04-04 18:05 ` [PATCH 76/90] ARM: OMAP: Device init for OMAP24xx Enhanced Audio Controller Tony Lindgren
2007-04-04 18:05 ` [PATCH 77/90] ARM: OMAP: Add apollon gpio keys using gpio-keys input Tony Lindgren
2007-04-04 18:05 ` [PATCH 78/90] ARM: OMAP: TSC2101: add platform init / registration to board files Tony Lindgren
2007-04-04 18:05 ` [PATCH 79/90] ARM: OMAP: fix H4 dependencies again Tony Lindgren
2007-04-04 18:05 ` [PATCH 80/90] ARM: OMAP: partial LED fixes Tony Lindgren
2007-04-04 18:06 ` [PATCH 81/90] ARM: OMAP: omap2/pm.c build fix Tony Lindgren
2007-04-04 18:06 ` [PATCH 82/90] ARM: OMAP: restore CONFIG_GENERIC_TIME Tony Lindgren
2007-04-04 18:06 ` [PATCH 83/90] ARM: OMAP: Fix GCC-reported compile time bug Tony Lindgren
2007-04-04 18:06 ` [PATCH 84/90] ARM: OMAP: Update changed TSC2301 config names in N800 board files Tony Lindgren
2007-04-04 18:06 ` [PATCH 85/90] ARM: OMAP: Fix PRCM base register usage for 243x Tony Lindgren
2007-04-04 18:06 ` [PATCH 86/90] ARM: OMAP: fix OMAP1 dmtimer build warning Tony Lindgren
2007-04-04 18:06 ` [PATCH 87/90] ARM: OMAP: fix OMAP1 mpuio suspend/resume oops Tony Lindgren
2007-04-04 18:06 ` [PATCH 88/90] ARM: OMAP: OSK led fixes Tony Lindgren
2007-04-04 18:06 ` [PATCH 89/90] ARM: OMAP: Activate MPU retention code in omap2/pm.c Tony Lindgren
2007-04-04 18:06 ` [PATCH 90/90] ARM: OMAP: H2 lcd updates for SPI framework Tony Lindgren
2007-04-05 6:10 ` [PATCH 84/90] ARM: OMAP: Update changed TSC2301 config names in N800 board files Jarkko Nikula
2007-04-05 15:47 ` Tony Lindgren
2007-04-04 20:39 ` [PATCH 73/90] ARM: OMAP: Add onennand board specific support for N800 Randy Dunlap
2007-04-05 15:30 ` Tony Lindgren
2007-04-04 20:52 ` [PATCH 68/90] ARM: OMAP: FB sync with N800 tree (support for dynamic SRAM allocations) Randy Dunlap
2007-04-05 15:39 ` Tony Lindgren
2007-04-05 15:18 ` [PATCH 64/90] ARM: OMAP: Fix warning in pm.c Tony Lindgren
2007-04-04 21:51 ` [PATCH 63/90] ARM: OMAP: Merge PM code from N800 tree Randy Dunlap
2007-04-05 18:20 ` Tony Lindgren
2007-04-04 21:18 ` [PATCH 62/90] ARM: OMAP: Merge board specific files " Randy Dunlap
2007-04-05 19:48 ` Tony Lindgren
2007-04-05 14:43 ` [PATCH 60/90] ARM: OMAP: Merge gpmc changes " Tony Lindgren
2007-04-05 15:17 ` [PATCH 56/90] ARM: OMAP: Make board-palmz71 compile again Tony Lindgren
2007-04-05 15:17 ` [PATCH 55/90] ARM: OMAP: H3 workqueue fixes Tony Lindgren
2007-04-04 19:14 ` [PATCH 53/90] ARM: OMAP: Fix warning in timer32k.c Randy Dunlap
2007-04-05 15:15 ` Tony Lindgren
2007-04-04 19:12 ` [PATCH 51/90] ARM: OMAP: osk+mistral backlight, power, board specific Randy Dunlap
2007-04-05 15:28 ` Tony Lindgren
2007-04-04 18:44 ` [PATCH 43/90] ARM: OMAP: TUSB EVM init Randy Dunlap
2007-04-05 14:42 ` Tony Lindgren
2007-04-06 12:09 ` [PATCH 29/90] ARM: OMAP: Palm Tungsten|T support Pavel Machek
2007-04-08 12:07 ` Russell King
2007-04-08 12:12 ` Pavel Machek
2007-04-08 12:31 ` Dagfinn Ilmari Mannsåker
2007-04-08 13:58 ` Russell King
2007-04-08 14:40 ` Russell King
2007-04-09 11:13 ` Pavel Machek
2007-04-06 12:07 ` [PATCH 28/90] ARM: OMAP: USB peripheral support on H4 Pavel Machek
2007-04-09 21:42 ` Tony Lindgren
2007-04-04 19:00 ` [PATCH 25/90] ARM: OMAP: h4 must have blinky leds!! Randy Dunlap
2007-04-04 19:13 ` David Brownell
2007-04-04 19:22 ` Randy Dunlap
2007-04-04 20:06 ` Jan Engelhardt
2007-04-04 20:42 ` Dmitry Torokhov
2007-04-04 20:51 ` David Brownell
2007-04-04 21:26 ` Randy Dunlap
2007-04-05 2:15 ` Jan Engelhardt
2007-04-05 4:18 ` Randy Dunlap
2007-04-05 18:19 ` David Brownell
2007-04-05 18:29 ` Randy Dunlap
2007-04-05 20:35 ` Jan Engelhardt
2007-04-06 17:29 ` coding style for long conditions (WAS: Re: [PATCH 25/90] ... blinky leds!!) David Brownell
2007-04-06 19:03 ` Stefan Richter
2007-04-06 21:05 ` David Brownell
2007-04-06 21:37 ` Jeremy Fitzhardinge
2007-04-06 21:54 ` David Brownell
2007-04-06 21:38 ` coding style for long conditions Roland Dreier
2007-04-06 21:50 ` Zan Lynx
2007-04-06 22:05 ` David Brownell
2007-04-06 22:07 ` Jan Engelhardt
2007-04-06 22:43 ` David Brownell
2007-04-09 15:45 ` Scott Preece
2007-04-06 21:40 ` coding style for long conditions (WAS: Re: [PATCH 25/90] ... blinky leds!!) Randy Dunlap
2007-04-06 21:46 ` Stefan Richter
2007-04-06 21:53 ` Jan Engelhardt
2007-04-07 0:16 ` Krzysztof Halasa
2007-04-06 22:17 ` Thomas Gleixner
2007-04-06 22:57 ` David Brownell
2007-04-06 23:21 ` Thomas Gleixner
2007-04-06 23:34 ` David Brownell
2007-04-07 8:01 ` coding style for long conditions Junio C Hamano
2007-04-09 15:14 ` David Brownell
2007-04-08 6:19 ` coding style for long conditions (WAS: Re: [PATCH 25/90] ... blinky leds!!) Dmitry Torokhov
2007-04-08 13:24 ` Scott Preece
2007-04-06 19:16 ` Jan Engelhardt
2007-04-06 20:57 ` David Brownell
2007-04-06 22:04 ` Jan Engelhardt
2007-04-06 22:40 ` David Brownell
2007-04-06 23:50 ` Jan Engelhardt
2007-04-04 20:47 ` [PATCH 25/90] ARM: OMAP: h4 must have blinky leds!! Dmitry Torokhov
2007-04-04 20:59 ` David Brownell
2007-04-04 18:29 ` [PATCH 18/90] ARM: OMAP: PalmZ71 support Randy Dunlap
2007-04-05 14:14 ` Tony Lindgren
2007-04-04 18:41 ` [PATCH 12/90] ARM: OMAP: Fix apollon boot Randy Dunlap
2007-04-05 14:24 ` Tony Lindgren
2007-04-04 20:57 ` [PATCH 11/90] ARM: OMAP: Add support for Amstrad Delta keypad Dmitry Torokhov
2007-04-04 22:05 ` Jonathan McDowell
2007-04-05 2:45 ` Dmitry Torokhov
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=11757100403021-git-send-email-tony@atomide.com \
--to=tony@atomide.com \
--cc=dbrownell@users.sourceforge.net \
--cc=linux-kernel@vger.kernel.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