Hello. I would like to enable U-Boot to use USB (usbtty) instead of the serial port. I've followed the instructions in U-Boot's README for enabling usbtty; however, I can't get the version of U-Boot supplied with the 137 and 138 to compile when I enable "CONFIG_USB_TTY"
Has anyone been successful in enabling USB console input/output with U-Boot on either the 137 and/or 138? Any help would be appreciated.
Thanks.
JT,
Please provide the error you are getting when enabling CONFIG_USB_TTY.
I would suggest you to use denx latet uboot tree to verify this. You can follow the steps as given below,
Please follow the steps below to enable USBtty in uboot.
/* #define CONFIG_MUSB_HCD */ #define CONFIG_MUSB_UDC 1
Regards,ajay
If my reply answers your question then please click on the green button "Verify Answer"
Ajay,
Thanks for the helpful reply.
Per your instructions, I downloaded the latest version of u-boot from denx. I was using the version of uboot supplied with the L138 board. So, to be clear, has the L138-specific patches been applied to the current u-boot source tree (I can only assume this). I had to add the following to da850evm.h to get a clean build when enabling usbtty:
#define CONFIG_USB_DA8XX // added to resolve "USB Lowlevel not defined" error in usb.h#define CONFIG_MUSB_UDC // added per Ajay#define CONFIG_USB_DEVICE // added per uboot's README#define CONFIG_USB_TTY // added per uboot's README
#define CONFIG_SYS_CONSOLE_IS_IN_ENV // added per uboot's README
FYI, unti I added "CONFIG_USB_DA8XX" to da850evm.h, I was getting the following error at compile time: "USB Lowlevel not defined".
The header file in "include/configs/da850evm.h" from the latest uboot source tree does not contain any USB-specific #defines, as the uboot supplied with the L138 board support package.
At this point, I have an error-free build. I need to test it out on the L138 board.
The latest uboot source tree appears to "support" the #define CONFIG_MUSB_UDC. However, in the version of Uboot provided with the 138 EVM, it is not present. Here are some of the errors I'm seeing when trying to enable USBTTY (uboot supplied with 138):
uboot-03.20.00.06/drivers/serial/usbtty.c:840: undefined reference to `udc_endpoint_write'
uboot-03.20.00.06/drivers/serial/usbtty.c:983: undefined reference to `udc_irq'
uboot-03.20.00.06/drivers/serial/usbtty.c:721: undefined reference to `udc_setup_ep'
uboot-03.20.00.06/drivers/serial/usbtty.c:548: undefined reference to `udc_init'
So, here is the issue:
1) I can enable and build usbtty support using the current UBoot source tree; however, I'm unable to get SPI and Ethernet working;
2) With uboot supplied with 138 EVM, I'm able to rebuild the image and burn onto the EVM, but not enable usbtty
The latest denx uboot tree has all the required USB configs in include/configs/da830evm.h and not yet available at include/configs/da850evm.h. We would require to copy
all the USb configs (below) from da830evm.h to da850evm.h.
-------------------------------------
/* * USB configuration */#define CONFIG_USB_DA8XX /* Platform hookup to MUSB controller */#define CONFIG_MUSB_UDC
#ifdef CONFIG_USB_DA8XX#ifdef CONFIG_MUSB_HCD /* include support for usb host */#define CONFIG_CMD_USB /* include support for usb cmd */#define CONFIG_USB_STORAGE /* MSC class support */#define CONFIG_CMD_STORAGE /* inclue support for usb-storage cmd */#define CONFIG_CMD_FAT /* inclue support for FAT/storage */#define CONFIG_DOS_PARTITION /* inclue support for FAT/storage */#ifdef CONFIG_USB_KEYBOARD /* HID class support */#define CONFIG_SYS_USB_EVENT_POLL#define CONFIG_PREBOOT "usb start"#endif /* CONFIG_USB_KEYBOARD */#endif /* CONFIG_MUSB_HCD */#ifdef CONFIG_MUSB_UDC/* USB device configuration */#define CONFIG_USB_DEVICE 1#define CONFIG_USB_TTY 1#define CONFIG_SYS_CONSOLE_IS_IN_ENV 1/* Change these to suit your needs */#define CONFIG_USBD_VENDORID 0x0451#define CONFIG_USBD_PRODUCTID 0x5678#define CONFIG_USBD_MANUFACTURER "Texas Instruments"#define CONFIG_USBD_PRODUCT_NAME "DA830EVM"#endif /* CONFIG_MUSB_UDC */#endif /* CONFIG_USB_DA8XX */
----------------------------------------------------------
I think the uboot supplied with EVM is older version and thus doesn;t have all the necessary features/fixes.
Can you provide the details of uboot version supplied with EVM ? and also check if there are any new version of TI supported uboot available.
Regards,Ajay
I just submitted below patch to denx list to add this support on DA850. You can use this instead.
http://lists.denx.de/pipermail/u-boot/2010-August/075760.html
I obtained the Davinci PSP 03.20.00.12 Release, which appears to be the latest release. I'm using the uboot per the PSP release notes, per the following table:
When I try to enable #define CONFIG_MUSB_UDC in include/configs/da850evm.h (uboot version v2009.11_DAVINCIPSP_03.20.00.12), I get the followoing compile error:
usbtty.c:125: error: 'EP0_MAX_PACKET_SIZE' undeclared here (not in a function)usbtty.c:218: error: 'UDC_INT_ENDPOINT' undeclared here (not in a function)usbtty.c:221: error: 'UDC_INT_PACKET_SIZE' undeclared here (not in a function)usbtty.c:244: error: 'UDC_OUT_ENDPOINT' undeclared here (not in a function)usbtty.c:248: error: 'UDC_BULK_PACKET_SIZE' undeclared here (not in a function)usbtty.c:255: error: 'UDC_IN_ENDPOINT' undeclared here (not in a function)usbtty.c:327: error: 'UDC_OUT_PACKET_SIZE' undeclared here (not in a function)usbtty.c:337: error: 'UDC_IN_PACKET_SIZE' undeclared here (not in a function)usbtty.c: In function 'usbtty_tstc':usbtty.c:398: warning: implicit declaration of function 'udc_unset_nak'usbtty.c: In function 'usbtty_getc':usbtty.c:423: warning: implicit declaration of function 'udc_set_nak'usbtty.c: In function 'drv_usbtty_init':usbtty.c:552: warning: implicit declaration of function 'udc_init'usbtty.c:557: warning: implicit declaration of function 'udc_startup_events'usbtty.c:558: warning: implicit declaration of function 'udc_connect'usbtty.c: In function 'usbtty_init_instances':usbtty.c:679: warning: implicit declaration of function 'udc_setup_ep'usbtty.c: In function 'write_buffer':usbtty.c:844: warning: implicit declaration of function 'udc_endpoint_write'usbtty.c: In function 'usbtty_poll':usbtty.c:987: warning: implicit declaration of function 'udc_irq'
When I use the latest denx source release, I can get a clean compile when enabling #define CONFIG_MUSB_UDC. However, I'm unable to get the ethernet and SPI flash to work properly. I have used the same SPI Flash and and Ethernet settings as defined in include/configs/da850evm.h per the uboot version v2009.11_DAVINCIPSP_03.20.00.12.
There have obviosly been major changes made to uboot since v2009.11_DAVINCIPSP_03.20.00.12; however, this version seems to work the best (out of the box) with the OMAPL138 EVM. I have no issues using the latest version; however, I'm in a quandry, as version v2009.11_DAVINCIPSP_03.20.00.12 works LESS USBTTY enabled and the latest version allows USBTTY to be compiled, but does not recognize SPI or ethernet.
Suggestions are much appreciated.
Regards,jt
After some additional though/analysis, I noticed the latest (2010.06) u-boot source code contains the musb_udc.c. I therefore updated the uboot usb code for version v2009.11_DAVINCIPSP_03.20.00.12. I'm now able to build u-boot, v2009.11_DAVINCIPSP_03.20.00.12, with USBTTY enabled.
When I set the stdin and stdout to usbtty, on the Linux host (Red Hat Enterprise 4) using the "cu" utility I can see the u-boot prompt. However, I'm unable to interact with the OMAP-L138 via USB. On the Linux Host, I see /dev/ttyACM0 and I can successfully connect to the device.
I've tried minicom, but I get no output.
Any suggestions?
Thanks,
JT
>>When I set the stdin and stdout to usbtty, on the Linux host (Red Hat Enterprise 4) using the "cu" utility I can see the u-boot prompt
You need to set stdin,stdout to usbtty on EVM side. Please follow the steps provided earlier.
Regards,
Ajay
Ajay >>When I set the stdin and stdout to usbtty, on the Linux host (Red Hat Enterprise 4) using the "cu" utility I can see the u-boot prompt You need to set stdin,stdout to usbtty on EVM side. Please follow the steps provided earlier. Regards, Ajay
Sorry, my last post was not clear. I did set stdin and stdout to usbtty on the EVM. In fact, I see the u-boot prompt on the RedHat box after I enter the stdin/stdout to usbtty on the EVM. However, I'm unable to issue any commands vi CU and/or minicom; I only see the u-boot prompt only. It's as if either the EVM is not responding and/or "cu" is not receiving any response.
I've tested various scenarios...
When I set just stdout to usbtty, and leave stdin to go over UART, I'm able to see all "output" go to the host, over USB, via minicom. For example, I would enter commands via TeraTerm and receive the output via minicom, whose device is /dev/ttyUSB0.
So, apparently, stdin appears to be the problem. The EVM board apparently doesn't seem to receive the data via USB for usbtty stdin.
Also, on the EVM, I've got setenv usbtty gserial. I then used modprobe for the EVM board on the Linux host. The linux host seemed to more reliably recognize the EVM when "setenv usbtty" is set to gserial vs cdc_acm.
I've tried setting usbtty environment variable to "cdc_acm" but I get the same issue--there is only the "u-boot" prompt returned from the EVM upon changing stdout/stdin to usbtty. The EVM does not appear to receive data via stdin over usbtty.
Please enable MUSB_DEBUG at drivers/usb/musb/musb_udc.c file and post the logs to denx uboot list for further debugging.
-------
/* #define MUSB_DEBUG */
--------
I'm running into the same problem as JT mentioned and I was wondering if this issue was ever resolved? I enabled MUSB_DEBUG and nothing changed.
I grabbed release 2010.12 of u-boot from denx and had to port forward some changes from the DaVinci PSP 3.20.00.14 version of u-boot to build for the da850. Once I did that I was able to configure for USB and get a clean compile. Once I switched over to usbtty though I was unable to interact. Like JT if I only switched stdout over things worked a bit better. I could enter input to the serial console, and see the output on the usb console. The output on the usb console looked a bit garbled though. I've included a sample below
DA850-evm > printenv
00
rate=115200
boinitrd ip=dhcp
bootdelay=3
bootfile="uImage"
stdout=usbtty
oinitrd ip=dhcp
usbtty=cdc_acm
ver=U-Boot 2010.12 (Feb 09 2011 - 06:50:44)
EDA850-evm > size: 214/65532 bytes
DA850-evm >
*Bump*
Any progress on this? Patches from 3.20.00.xx PSP for u-boot don't seem to have been merged into the mainline u-boot tree so building that for the AM1808 eval kit (da850_omapl138_evm_config) is problematic, and the usb console option doesn't exist for the version of u-boot provided with the dev kit.
It's a requirement for me so I'll have to decide which direction I want to start patching if this hasn't already been addressed.
Seth,
MUSB support in uboot for AM1xx is already merged and available at http://git.denx.de/?p=u-boot.git;a=summary
You can browse the code at drivers/usb/musb/da8xx.c
Ajay, I think you misunderstand what I am asking.
This is what I was talking about in previous posts. I know the usb console drivers appear in mainline, complete with the da8xx driver but clearly some changes were not pushed as I cannot build for a da850_omapl138_evm_config... the config does not exist. So what else is missing is missing on mainline? I had made a quick stab and making the required changes to build for the config I need but the usb console still wasn't working 100% correctly. I was unsure if this was issues with the usb driver or simply that I missed something when reviewing TI's patch list, or if there was some incompatibility I was just unaware of.
In TI's provided version of u-boot the config exists and without enabling usb device support builds and runs well on the evm. However, when attempting to follow the instructions provided above u-boot fails to build. JT did good job of pointing out all the errors (both for compiling TI's u-boot, and mainline's usb tty behavior) in some of his original posts.
So neither version of u-boot (TI or denx) is an ideal solution. Since this has apparently been a problem for some time I thought there was a chance some work had been done to improve this and I didn't want to repeat the effort. Based on your response nothing has been done. TI has not and is not planning to push out a new version with some updates support for usbtty. TI has not and is not planning on pushing back patches to get the da850 config building and running on the mainline. Are those two assumptions correct?