diff -r -u -N rockbox/apps/main.c rockbox.new/apps/main.c
--- rockbox/apps/main.c	2006-06-17 06:00:25.000000000 +0200
+++ rockbox.new/apps/main.c	2006-07-05 18:25:01.000000000 +0200
@@ -92,6 +92,10 @@
 #include "isp1362.h"
 #endif
 
+#if CONFIG_USBOTG == USBOTG_M5636
+#include "m5636.h"
+#endif
+
 /*#define AUTOROCK*/ /* define this to check for "autostart.rock" on boot */
 
 const char appsversion[]=APPSVERSION;
@@ -282,6 +286,8 @@
     usb_init();
 #if CONFIG_USBOTG == USBOTG_ISP1362
     isp1362_init();
+#elif CONFIG_USBOTG == USBOTG_M5636
+    m5636_init();
 #endif
 
     backlight_init();
diff -r -u -N rockbox/firmware/SOURCES rockbox.new/firmware/SOURCES
--- rockbox/firmware/SOURCES	2006-06-17 06:00:26.000000000 +0200
+++ rockbox.new/firmware/SOURCES	2006-07-01 11:15:35.000000000 +0200
@@ -206,7 +206,9 @@
 #if CONFIG_USBOTG == USBOTG_ISP1362
 drivers/isp1362.c
 #endif
-
+#if CONFIG_USBOTG == USBOTG_M5636
+drivers/m5636.c
+#endif
 
 #ifndef SIMULATOR
 #ifdef IAUDIO_X5
diff -r -u -N rockbox/firmware/drivers/m5636.c rockbox.new/firmware/drivers/m5636.c
--- rockbox/firmware/drivers/m5636.c	1970-01-01 01:00:00.000000000 +0100
+++ rockbox.new/firmware/drivers/m5636.c	2006-07-07 21:02:24.000000000 +0200
@@ -0,0 +1,86 @@
+/***************************************************************************
+ *             __________               __   ___.
+ *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
+ *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
+ *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
+ *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
+ *                     \/            \/     \/    \/            \/
+ * $Id: $
+ *
+ * Copyright (C) 2006 Ulrich Pegelow
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+#include "system.h"
+#include "kernel.h"
+#include "logf.h"
+#include "m5636.h"
+
+/* Disclaimer: This code had to be developed without any documentation for the M5636
+               USBOTG chip, due to the restrictive information policy of its manufacturer.
+               The development is solely based on reverse engineering. Malfunctioning
+               (with the risk of possible damage to the hardware) can not be fully excluded. 
+               USE THIS CODE AT YOUR OWN RISK!
+
+               The following disclaimer from the GNU General Public License is in effect:
+
+               11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 
+               FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 
+               OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 
+               PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 
+               OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
+               MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 
+               TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM 
+               PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR 
+               CORRECTION. 
+
+               12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL 
+               ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE 
+               PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
+               SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY 
+               TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
+               INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
+               TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
+               ADVISED OF THE POSSIBILITY OF SUCH DAMAGES
+            
+*/
+
+
+/* for debugging purposes only */
+void m5636_dump_regs(void)
+{
+    unsigned short *address;
+
+    for (address = (unsigned short *)0xF0004000;
+         address <= (unsigned short *)0xF00040FF;
+         address++)
+    {
+         logf("m5636 A:%08x D:%04x", address, (unsigned)*address);
+    }
+
+    logf("GPIO_INT_EN    %08x", GPIO_INT_EN);
+    logf("GPIO1_OUT      %08x", GPIO1_OUT);
+    logf("GPIO1_ENABLE   %08x", GPIO1_ENABLE);
+    logf("GPIO1_FUNCTION %08x", GPIO1_FUNCTION);
+}
+
+
+/* Init: This currently just puts the M5636 into sleep mode */
+
+void m5636_init(void)
+{
+    and_l(~0x00004000, &GPIO_INT_EN);		/* probably redundant: disable interrupt; just in case ... */
+    and_l(~0x00000004, &GPIO1_OUT);		/* probably redundant: set GPIO34 low */
+    or_l(  0x00000004, &GPIO1_ENABLE);		/* GPIO34 enable (see above) */
+    or_l(  0x00000004, &GPIO1_FUNCTION);	/* GPIO34 function (see above) */
+    or_w(  0x00000003, &M5636_4068);		/* ???? */
+    or_w(  0x00000080, &M5636_4068);		/* ???? */
+    or_w(  0x00000001, &M5636_4078);		/* ???? */
+}
+
diff -r -u -N rockbox/firmware/export/config-iaudiox5.h rockbox.new/firmware/export/config-iaudiox5.h
--- rockbox/firmware/export/config-iaudiox5.h	2006-06-07 06:00:36.000000000 +0200
+++ rockbox.new/firmware/export/config-iaudiox5.h	2006-07-01 15:39:35.000000000 +0200
@@ -102,6 +102,9 @@
 
 #define USB_X5STYLE
 
+/* USB On-the-go */
+#define CONFIG_USBOTG USBOTG_M5636
+
 /* Define this if you have adjustable CPU frequency */
 #define HAVE_ADJUSTABLE_CPU_FREQ
 
diff -r -u -N rockbox/firmware/export/config.h rockbox.new/firmware/export/config.h
--- rockbox/firmware/export/config.h	2006-06-17 06:00:26.000000000 +0200
+++ rockbox.new/firmware/export/config.h	2006-07-01 11:30:36.000000000 +0200
@@ -135,6 +135,7 @@
 
 /* USB On-the-go */
 #define USBOTG_ISP1362 1362
+#define USBOTG_M5636 5636
 
 /* now go and pick yours */
 #if defined(ARCHOS_PLAYER)
diff -r -u -N rockbox/firmware/export/m5636.h rockbox.new/firmware/export/m5636.h
--- rockbox/firmware/export/m5636.h	1970-01-01 01:00:00.000000000 +0100
+++ rockbox.new/firmware/export/m5636.h	2006-07-06 18:42:10.000000000 +0200
@@ -0,0 +1,62 @@
+/***************************************************************************
+ *             __________               __   ___.
+ *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
+ *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
+ *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
+ *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
+ *                     \/            \/     \/    \/            \/
+ * $Id: $
+ *
+ * Copyright (C) 2006 Ulrich Pegelow
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+/* We are currently lacking a datasheet for the M5636. No mnemonics available.
+   The registers are named according to their respective hexadecimal offsets.
+*/
+   
+
+#define M5636_BASE 0xF0000000L		/* Rockbox: 0xF0000000; OF: 0x20000000 */
+#define M5636_4064 (*(volatile unsigned short *)(M5636_BASE + 0x4064L))
+#define M5636_4068 (*(volatile unsigned short *)(M5636_BASE + 0x4068L))
+#define M5636_4078 (*(volatile unsigned short *)(M5636_BASE + 0x4078L))
+
+
+void m5636_init(void);
+void m5636_dump_regs(void);
+
+/* this should go to "system.h" */
+#if defined(CPU_COLDFIRE)
+
+#if !defined(or_w)
+#define or_w(mask, address) \
+  asm                       \
+    ("move.w (%1),%%d0 \n"  \
+     "or.l    %0,%%d0  \n"  \
+     "move.w %%d0,(%1) \n"  \
+     :                      \
+     : /* %0 */ "d"(mask),  \
+       /* %1 */ "a"(address)\
+     : "d0")
+
+#endif
+
+#if !defined(and_w)
+#define and_w(mask, address) \
+  asm                        \
+    ("move.w (%1),%%d0 \n"   \
+     "and.l   %0,%%d0  \n"   \
+     "move.w %%d0,(%1) \n"   \
+     :                       \
+     : /* %0 */ "d"(mask),   \
+       /* %1 */ "a"(address) \
+     : "d0")
+#endif
+
+#endif /* defined(CPU_COLDFIRE) */
