cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Voyager
Voyager
393 Views
Registered: ‎09-14-2016

U-boot download Image trough TFPT with USB gadget

Hello,

 

Could you please give information about TFTP boot with usb gadget ?

I only find about ethernet or USB.

 

Thanks,

Trigger

0 Kudos
Reply
5 Replies
Highlighted
Contributor
Contributor
328 Views
Registered: ‎10-08-2018

Typically you would use DFU (device firmware update) to send images to u-boot over USB.  Does your application require TFTP over USB-ethernet?


Nathan Sullivan - Senior Embedded Software Engineer - www.designlinxhs.com
0 Kudos
Reply
Highlighted
Voyager
Voyager
321 Views
Registered: ‎09-14-2016

Yes the purpose is to use Ethernet over USB with tfpt boot. We use the same from Linux without any issue.

 

But I'm not able to find the good uboot defconfig or I have miss something ...

 

Any idea to debug that ?

Thanks,

Trigger.

0 Kudos
Reply
Highlighted
Contributor
Contributor
221 Views
Registered: ‎10-08-2018

Looking at the source, uboot has the USB gadget drivers (device-side drivers like ethernet and mass storage) from Linux, however I have not personally used them.  DFU uses the same framework, so I believe the Zynq/Zynq Ultrascale+ drivers do support gadget mode, you just need to enable ethernet from the u-boot config menu (make menuconfig).  You will also need the USB controller to be set in gadget/device mode in the device tree, of course.


Nathan Sullivan - Senior Embedded Software Engineer - www.designlinxhs.com
0 Kudos
Reply
Highlighted
Contributor
Contributor
213 Views
Registered: ‎10-08-2018

Sorry, forgot to mention - you also need to call usb_eth_initialize from your board file, similar to what is done in beagle.c.  I'm not sure why uboot is set up this way but you need custom code to use the ethernet gadget, unlike DFU which works by default so long as the USB controller is in device mode.


Nathan Sullivan - Senior Embedded Software Engineer - www.designlinxhs.com
0 Kudos
Reply
Highlighted
Voyager
Voyager
186 Views
Registered: ‎09-14-2016

Hello @nsullivan ,

 

First of all tank you for reapply.

 

I have set all I have found in u-boot menuconfig:

CONFIG_ARM=y
CONFIG_SYS_CONFIG_NAME="zynq_thor256"
CONFIG_ARCH_ZYNQ=y
CONFIG_SYS_TEXT_BASE=0x4000000
CONFIG_ENV_SIZE=0x40000
CONFIG_ENV_OFFSET=0x500000
CONFIG_LOCALVERSION="[thor256 V3.0]"
CONFIG_ENV_IS_IN_NAND=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
CONFIG_BOOTCOMMAND="run custboot"
CONFIG_SYS_PROMPT="U-boot> "
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_FPGA_LOADBP=y
CONFIG_CMD_FPGA_LOADFS=y
CONFIG_CMD_FPGA_LOADMK=y
CONFIG_CMD_FPGA_LOADP=y
CONFIG_CMD_MTD=y
CONFIG_CMD_USB=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_MTDPARTS=y
CONFIG_OF_EMBED=y
CONFIG_DEFAULT_DEVICE_TREE="zynq-thor256"
# CONFIG_NET is not set
CONFIG_BLK=y
CONFIG_FPGA_XILINX=y
CONFIG_FPGA_ZYNQPL=y
CONFIG_DM_GPIO=y
# CONFIG_MMC is not set
CONFIG_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_ZYNQ=y
CONFIG_DM_ETH=y
CONFIG_ZYNQ_SERIAL=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_ULPI_VIEWPORT=y
CONFIG_USB_ULPI=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_MANUFACTURER="Xilinx"
CONFIG_USB_GADGET_VENDOR_NUM=0x03fd
CONFIG_USB_GADGET_PRODUCT_NUM=0x0300
CONFIG_CI_UDC=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_USB_FUNCTION_THOR=y
CONFIG_SPL_OF_LIBFDT=y

CONFIG_CMD_NET=y
CONFIG_CMD_BOOTP=y
CONFIG_CMD_DHCP=y
CONFIG_BOOTP_BOOTPATH=y
CONFIG_BOOTP_DNS=y
# CONFIG_BOOTP_DNS2 is not set
CONFIG_BOOTP_GATEWAY=y
CONFIG_BOOTP_HOSTNAME=y
# CONFIG_BOOTP_PREFER_SERVERIP is not set
CONFIG_BOOTP_SUBNETMASK=y
# CONFIG_BOOTP_NTPSERVER is not set
# CONFIG_CMD_PCAP is not set
CONFIG_BOOTP_PXE=y
CONFIG_BOOTP_PXE_CLIENTARCH=0x15
CONFIG_BOOTP_VCI_STRING="U-Boot.armv7"
CONFIG_CMD_TFTPBOOT=y
# CONFIG_CMD_TFTPPUT is not set
# CONFIG_CMD_TFTPSRV is not set
CONFIG_NET_TFTP_VARS=y
# CONFIG_CMD_RARP is not set
CONFIG_CMD_NFS=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
# CONFIG_CMD_CDP is not set
# CONFIG_CMD_SNTP is not set
# CONFIG_CMD_DNS is not set
# CONFIG_CMD_LINK_LOCAL is not set
# CONFIG_CMD_ETHSW is not set
CONFIG_CMD_PXE=y
# CONFIG_CMD_WOL is not set
CONFIG_NET=y
# CONFIG_NET_RANDOM_ETHADDR is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_IP_DEFRAG is not set
CONFIG_TFTP_BLOCKSIZE=1468
# CONFIG_UDP_FUNCTION_FASTBOOT is not set
# CONFIG_PHYLIB is not set
CONFIG_NETDEVICES=y
# CONFIG_PHY_GIGE is not set
# CONFIG_ALTERA_TSE is not set
# CONFIG_BCM_SF2_ETH is not set
# CONFIG_DWC_ETH_QOS is not set
# CONFIG_E1000 is not set
# CONFIG_ETH_DESIGNWARE is not set
# CONFIG_ETHOC is not set
# CONFIG_FMAN_ENET is not set
# CONFIG_FTMAC100 is not set
# CONFIG_FTGMAC100 is not set
# CONFIG_MACB is not set
# CONFIG_RGMII is not set
# CONFIG_MII is not set
# CONFIG_RTL8139 is not set
# CONFIG_RTL8169 is not set
# CONFIG_SMC911X is not set
# CONFIG_SUN7I_GMAC is not set
# CONFIG_SUN4I_EMAC is not set
# CONFIG_SUN8I_EMAC is not set
# CONFIG_SH_ETHER is not set
# CONFIG_DRIVER_TI_CPSW is not set
# CONFIG_DRIVER_TI_EMAC is not set
# CONFIG_DRIVER_TI_KEYSTONE_NET is not set
# CONFIG_XILINX_AXIEMAC is not set
# CONFIG_XILINX_EMACLITE is not set
# CONFIG_ZYNQ_GEM is not set
# CONFIG_SYS_DPAA_QBMAN is not set
# CONFIG_TSEC_ENET is not set
# CONFIG_MEDIATEK_ETH is not set
# CONFIG_HIGMACV300_ETH is not set
# CONFIG_USB_GADGET_DOWNLOAD is not set
CONFIG_USB_ETHER=y
# CONFIG_USB_ETH_CDC is not set
CONFIG_USB_ETH_RNDIS=y
CONFIG_USBNET_DEVADDR="de:ad:be:ef:00:01"
CONFIG_USBNET_HOST_ADDR="de:ad:be:ef:00:00"

 

No i'm double checking DTS entry.

I keep in touch.

 

Cheers,

Trigger

0 Kudos
Reply