Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix adb over USB for AM35x EVM

This patch modifies the board file and updates the defconfig to
add adb support over USB
  • Loading branch information...
commit fd0914597719a0b00b14637afedfbf53d35f8f68 1 parent d476580
@khasim khasim authored
View
7 arch/arm/configs/am3517_evm_android_defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.32
-# Thu Jul 15 18:56:19 2010
+# Wed Jul 21 17:24:37 2010
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -1492,11 +1492,10 @@ CONFIG_USB_GADGET_DUALSPEED=y
# CONFIG_USB_MIDI_GADGET is not set
# CONFIG_USB_G_PRINTER is not set
CONFIG_USB_ANDROID=y
-CONFIG_USB_ANDROID_ACM=y
+# CONFIG_USB_ANDROID_ACM is not set
CONFIG_USB_ANDROID_ADB=y
CONFIG_USB_ANDROID_MASS_STORAGE=y
-CONFIG_USB_ANDROID_RNDIS=y
-# CONFIG_USB_ANDROID_RNDIS_WCEIS is not set
+# CONFIG_USB_ANDROID_RNDIS is not set
# CONFIG_USB_CDC_COMPOSITE is not set
# CONFIG_USB_G_MULTI is not set
View
61 arch/arm/mach-omap2/board-am3517evm.c
@@ -31,6 +31,7 @@
#include <linux/i2c/pca953x.h>
#include <linux/regulator/machine.h>
#include <linux/can/platform/ti_hecc.h>
+#include <linux/usb/android_composite.h>
#include <mach/hardware.h>
#include <mach/am35xx.h>
@@ -57,6 +58,61 @@
#define NAND_BLOCK_SIZE SZ_128K
+extern struct regulator_consumer_supply twl4030_vmmc1_supply;
+extern struct regulator_consumer_supply twl4030_vsim_supply;
+
+extern struct regulator_init_data vmmc1_data;
+extern struct regulator_init_data vsim_data;
+
+#ifdef CONFIG_USB_ANDROID
+
+#define GOOGLE_VENDOR_ID 0x18d1
+#define GOOGLE_PRODUCT_ID 0x9018
+#define GOOGLE_ADB_PRODUCT_ID 0x9015
+
+static char *usb_functions_adb[] = {
+ "adb",
+};
+
+static char *usb_functions_all[] = {
+ "adb",
+};
+
+static struct android_usb_product usb_products[] = {
+ {
+ .product_id = GOOGLE_PRODUCT_ID,
+ .num_functions = ARRAY_SIZE(usb_functions_adb),
+ .functions = usb_functions_adb,
+ },
+};
+
+static struct android_usb_platform_data android_usb_pdata = {
+ .vendor_id = GOOGLE_VENDOR_ID,
+ .product_id = GOOGLE_PRODUCT_ID,
+ .functions = usb_functions_all,
+ .products = usb_products,
+ .version = 0x0100,
+ .product_name = "rowboat gadget",
+ .manufacturer_name = "rowboat",
+ .serial_number = "20100720",
+ .num_functions = ARRAY_SIZE(usb_functions_all),
+};
+
+static struct platform_device androidusb_device = {
+ .name = "android_usb",
+ .id = -1,
+ .dev = {
+ .platform_data = &android_usb_pdata,
+ },
+};
+
+static void omap3evm_android_gadget_init(void)
+{
+ platform_device_register(&androidusb_device);
+}
+
+#endif
+
static struct mtd_partition am3517evm_nand_partitions[] = {
/* All the partition sizes are listed in terms of NAND block size */
{
@@ -994,6 +1050,11 @@ static void __init am3517_evm_init(void)
/* DSS */
am3517_evm_display_init();
+ /* Android Gadget Driver */
+#ifdef CONFIG_USB_ANDROID
+ omap3evm_android_gadget_init();
+#endif
+
/*Ethernet*/
am3517_evm_ethernet_init(&am3517_evm_emac_pdata);
am3517_evm_hecc_init(&am3517_evm_hecc_pdata);
Please sign in to comment.
Something went wrong with that request. Please try again.