On Tuesday 11 March 2003 22:57, Dan Malek wrote:
> I would like to hear the
> results of the message posted earlier today about the proper power up
> of the USB interface on this board :-)
hello!
i got USB to work with the proper power up :)
the builtin usb devices still dont accept a new address (maybe thats ok?), but
i can see the attached usb devices and they are powered. i tested a serial
driver which also loads and detects the device fine. looks good, but i havent
tested any functionality yet.
i attach a patch with the usb power up for the mycable XXS board, which also
defines a new config option for this board. i'm not sure if this is the
correct way to do it, so please correct me...
bruno
--- cvs-linux-mips-2_4/arch/mips/config-shared.in Fri Mar 7 18:29:18 2003
+++ mips-2_4/arch/mips/config-shared.in Thu Mar 13 13:52:47 2003
@@ -29,6 +29,9 @@
fi
dep_bool 'Support for Alchemy PB1100 board' CONFIG_MIPS_PB1100 $CONFIG_MIPS32
dep_bool 'Support for Alchemy PB1500 board' CONFIG_MIPS_PB1500 $CONFIG_MIPS32
+if [ "$CONFIG_MIPS_PB1500" = "y" ]; then
+ bool ' Support for mycable XXS board' CONFIG_MYCABLE_XXS_1500
+fi
dep_bool 'Support for BAGET MIPS series (EXPERIMENTAL)' CONFIG_BAGET_MIPS $CONFIG_MIPS32 $CONFIG_EXPERIMENTAL
bool 'Support for CASIO CASSIOPEIA E-10/15/55/65' CONFIG_CASIO_E55
dep_bool 'Support for Cobalt Server (EXPERIMENTAL)' CONFIG_MIPS_COBALT $CONFIG_EXPERIMENTAL
--- cvs-linux-mips-2_4/arch/mips/au1000/pb1500/setup.c Thu Mar 13 14:00:00 2003
+++ mips-2_4/arch/mips/au1000/pb1500/setup.c Thu Mar 13 14:04:53 2003
@@ -197,8 +197,24 @@
pin_func |= 0x8000;
#endif
au_writel(pin_func, SYS_PINFUNC);
-#endif // defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE)
+#ifdef CONFIG_MYCABLE_XXS_1500
+ // set multiple use pins (UART3/GPIO) to UART (it's used as UART too)
+ pin_func = au_readl(SYS_PINFUNC) & (u32)(~SYS_PF_UR3);
+ pin_func |= SYS_PF_UR3;
+ au_writel(pin_func, SYS_PINFUNC);
+
+ // enable UART
+ au_writel(0x01, UART3_ADDR+UART_MOD_CNTRL); // clock enable (CE)
+ mdelay(10);
+ au_writel(0x03, UART3_ADDR+UART_MOD_CNTRL); // CE and "enable"
+ mdelay(10);
+
+ // enable DTR = USB power up
+ au_writel(0x01, UART3_ADDR+UART_MCR); //? UART_MCR_DTR is 0x01???
+#endif
+
+#endif // defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE)
#ifdef CONFIG_USB_OHCI
// enable host controller and wait for reset done