From: Kevin Hilman Date: Fri, 16 Dec 2016 21:08:10 +0000 (-0800) Subject: ARM: imx7s-warp: enable USB gadget ethernet X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=25aaebdb123b1c59c95d5515a06f14537a870855;p=u-boot.git ARM: imx7s-warp: enable USB gadget ethernet Enable USB gadget ethernet by default to have networking capabilities. Tested using DHCP and TFTP to transfer kernel, DT, ramdisk. Cc: Fabio Estevam Signed-off-by: Kevin Hilman --- diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index da9afb4ccd..df8e9da6f9 100644 --- a/board/warp7/warp7.c +++ b/board/warp7/warp7.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include "../freescale/common/pfuze.h" @@ -138,6 +139,19 @@ int power_init_board(void) } #endif +int board_eth_init(bd_t *bis) +{ + int ret = 0; + +#ifdef CONFIG_USB_ETHER + ret = usb_eth_initialize(bis); + if (ret < 0) + printf("Error %d registering USB ether.\n", ret); +#endif + + return ret; +} + int board_init(void) { /* address of boot parameters */ diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index 0f0ec99e50..81acd8ff15 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -35,3 +35,8 @@ CONFIG_G_DNL_MANUFACTURER="FSL" CONFIG_G_DNL_VENDOR_NUM=0x0525 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5 CONFIG_OF_LIBFDT=y + +CONFIG_CMD_NET=y +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_CMD_DHCP=y + diff --git a/include/configs/warp7.h b/include/configs/warp7.h index d3b0c5e0d6..f4a92319eb 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -38,6 +38,7 @@ "script=boot.scr\0" \ "image=zImage\0" \ "console=ttymxc0\0" \ + "ethact=usb_ether\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ "fdt_file=imx7s-warp.dtb\0" \ @@ -145,4 +146,10 @@ #define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_16M #define DFU_DEFAULT_POLL_TIMEOUT 300 +#define CONFIG_USB_ETHER +#define CONFIG_USB_ETH_CDC +#define CONFIG_USB_ETH_RNDIS +#define CONFIG_USBNET_HOST_ADDR "de:ad:be:af:00:00" +#define CONFIG_USBNET_DEV_ADDR "de:ad:be:af:00:01" + #endif