aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s5p
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-s5p')
-rw-r--r--arch/arm/plat-s5p/devs.c97
1 files changed, 97 insertions, 0 deletions
diff --git a/arch/arm/plat-s5p/devs.c b/arch/arm/plat-s5p/devs.c
index 180addc..53de7cf 100644
--- a/arch/arm/plat-s5p/devs.c
+++ b/arch/arm/plat-s5p/devs.c
@@ -34,6 +34,103 @@
#include <plat/fimc.h>
#include <plat/csis.h>
+/* Android Gadget */
+#include <linux/usb/android_composite.h>
+#define S3C_VENDOR_ID 0x18d1
+#define S3C_PRODUCT_ID 0x0001
+#define S3C_ADB_PRODUCT_ID 0x0005
+#define MAX_USB_SERIAL_NUM 17
+
+static char *usb_functions_ums[] = {
+ "usb_mass_storage",
+};
+
+static char *usb_functions_rndis[] = {
+ "rndis",
+};
+
+static char *usb_functions_rndis_adb[] = {
+ "rndis",
+ "adb",
+};
+static char *usb_functions_ums_adb[] = {
+ "usb_mass_storage",
+ "adb",
+};
+
+static char *usb_functions_all[] = {
+#ifdef CONFIG_USB_ANDROID_RNDIS
+ "rndis",
+#endif
+ "usb_mass_storage",
+ "adb",
+#ifdef CONFIG_USB_ANDROID_ACM
+ "acm",
+#endif
+};
+static struct android_usb_product usb_products[] = {
+ {
+ .product_id = S3C_PRODUCT_ID,
+ .num_functions = ARRAY_SIZE(usb_functions_ums),
+ .functions = usb_functions_ums,
+ },
+ {
+ .product_id = S3C_ADB_PRODUCT_ID,
+ .num_functions = ARRAY_SIZE(usb_functions_ums_adb),
+ .functions = usb_functions_ums_adb,
+ },
+ /*
+ {
+ .product_id = S3C_RNDIS_PRODUCT_ID,
+ .num_functions = ARRAY_SIZE(usb_functions_rndis),
+ .functions = usb_functions_rndis,
+ },
+ {
+ .product_id = S3C_RNDIS_ADB_PRODUCT_ID,
+ .num_functions = ARRAY_SIZE(usb_functions_rndis_adb),
+ .functions = usb_functions_rndis_adb,
+ },
+ */
+};
+// serial number should be changed as real device for commercial release
+static char device_serial[MAX_USB_SERIAL_NUM]="0123456789ABCDEF";
+/* standard android USB platform data */
+
+// Information should be changed as real product for commercial release
+static struct android_usb_platform_data android_usb_pdata = {
+ .vendor_id = S3C_VENDOR_ID,
+ .product_id = S3C_PRODUCT_ID,
+ .manufacturer_name = "Android",//"Samsung",
+ .product_name = "Android",//"Samsung SMDKV210",
+ .serial_number = device_serial,
+ .num_products = ARRAY_SIZE(usb_products),
+ .products = usb_products,
+ .num_functions = ARRAY_SIZE(usb_functions_all),
+ .functions = usb_functions_all,
+};
+
+struct platform_device s3c_device_android_usb = {
+ .name = "android_usb",
+ .id = -1,
+ .dev = {
+ .platform_data = &android_usb_pdata,
+ },
+};
+EXPORT_SYMBOL(s3c_device_android_usb);
+
+static struct usb_mass_storage_platform_data ums_pdata = {
+ .vendor = "Android ",//"Samsung",
+ .product = "UMS Composite",//"SMDKV210",
+ .release = 1,
+};
+struct platform_device s3c_device_usb_mass_storage= {
+ .name = "usb_mass_storage",
+ .id = -1,
+ .dev = {
+ .platform_data = &ums_pdata,
+ },
+};
+EXPORT_SYMBOL(s3c_device_usb_mass_storage);
/* RTC */
static struct resource s5p_rtc_resource[] = {
[0] = {