]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: musb-new: omap2430: OMAP4 MUSB USB controller support
authorPaul Kocialkowski <contact@paulk.fr>
Sat, 27 Feb 2016 18:19:05 +0000 (19:19 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 15 Mar 2016 19:12:51 +0000 (15:12 -0400)
This adds support for the OMAP4 MUSB USB controller, with a matching Linux
compat definition, TWL6030 USB device setup and USBOTGHS register setup.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
drivers/usb/musb-new/linux-compat.h
drivers/usb/musb-new/omap2430.c
drivers/usb/musb-new/omap2430.h

index 46f83d9b36024abc8f2b7b697b52fbdd2177510c..1fc9391b8e0f6951fd81b825a66c8a24c46dd4c6 100644 (file)
@@ -37,4 +37,8 @@
 #define CONFIG_SOC_OMAP3430
 #endif
 
+#ifdef CONFIG_OMAP4430
+#define CONFIG_ARCH_OMAP4
+#endif
+
 #endif /* __LINUX_COMPAT_H__ */
index 9f307e991b21ce9ef1b2fc28e0d0555a4c60c1e8..684ad9539af5ca06b03bb376ecbb7ed23a73d134 100644 (file)
 #include <linux/usb/musb-omap.h>
 #else
 #include <common.h>
+#include <asm/omap_common.h>
 #include <asm/omap_musb.h>
 #include <twl4030.h>
+#include <twl6030.h>
 #include "linux-compat.h"
 #endif
 
@@ -434,6 +436,17 @@ static int omap2430_musb_enable(struct musb *musb)
                                __PRETTY_FUNCTION__);
        }
 #endif
+
+#ifdef CONFIG_TWL6030_POWER
+       twl6030_usb_device_settings();
+#endif
+
+#ifdef CONFIG_OMAP4430
+       u32 *usbotghs_control = (u32 *)((*ctrl)->control_usbotghs_ctrl);
+       *usbotghs_control = USBOTGHS_CONTROL_AVALID |
+               USBOTGHS_CONTROL_VBUSVALID | USBOTGHS_CONTROL_IDDIG;
+#endif
+
        return 0;
 #endif
 }
index 56998c794f24ed81a7e749df758fa525d4c48934..0c3dd8bfd9c00fe6e291e4aa227a01de44f33095 100644 (file)
 #define OTG_FORCESTDBY         0x414
 #      define  ENABLEFORCE             (1 << 0)
 
+/*
+ * OMAP4-specific definitions
+ */
+
+#define USBOTGHS_CONTROL_AVALID                (1 << 0)
+#define USBOTGHS_CONTROL_VBUSVALID     (1 << 2)
+#define USBOTGHS_CONTROL_IDDIG         (1 << 4)
+
 #endif /* __MUSB_OMAP243X_H__ */