From: Joris Offouga Date: Tue, 11 Jun 2019 12:08:50 +0000 (+0200) Subject: pico-imx7d: Enable DM_USB X-Git-Tag: v2019.10-rc1~9^2~26 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e4258ddd595a5c4e46317c91807a59750916f707;p=oweals%2Fu-boot.git pico-imx7d: Enable DM_USB This patch enable usb support with device-tree Signed-off-by: Joris Offouga Reviewed-by: Jun Nie --- diff --git a/arch/arm/dts/imx7d-pico.dtsi b/arch/arm/dts/imx7d-pico.dtsi index 9f1fe683db..7cd8be24c8 100644 --- a/arch/arm/dts/imx7d-pico.dtsi +++ b/arch/arm/dts/imx7d-pico.dtsi @@ -10,6 +10,7 @@ / { aliases { mmc0 = &usdhc3; + usb0 = &usbotg1; }; /* Will be filled by the bootloader */ @@ -296,6 +297,7 @@ &usbotg1 { vbus-supply = <®_usb_otg1_vbus>; + dr_mode = "peripheral"; status = "okay"; }; diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c index e3d75e549a..216475c8de 100644 --- a/board/technexion/pico-imx7d/pico-imx7d.c +++ b/board/technexion/pico-imx7d/pico-imx7d.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include "../../freescale/common/pfuze.h" @@ -328,15 +327,3 @@ int board_ehci_hcd_init(int port) return 0; } -int board_usb_phy_mode(int port) -{ - switch (port) { - case 0: - return USB_INIT_DEVICE; - case 1: - return USB_INIT_HOST; - default: - return -EINVAL; - } - return 0; -} diff --git a/configs/pico-hobbit-imx7d_defconfig b/configs/pico-hobbit-imx7d_defconfig index bc34e995e3..263f8f29a0 100644 --- a/configs/pico-hobbit-imx7d_defconfig +++ b/configs/pico-hobbit-imx7d_defconfig @@ -51,6 +51,7 @@ CONFIG_FASTBOOT_FLASH_MMC_DEV=0 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y CONFIG_DM_GPIO=y CONFIG_DM_MMC=y +CONFIG_DM_USB=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_ESDHC_IMX=y CONFIG_PHYLIB=y diff --git a/configs/pico-imx7d_bl33_defconfig b/configs/pico-imx7d_bl33_defconfig index b609b6d7b9..7c559cfec4 100644 --- a/configs/pico-imx7d_bl33_defconfig +++ b/configs/pico-imx7d_bl33_defconfig @@ -43,6 +43,7 @@ CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DFU_MMC=y CONFIG_DM_GPIO=y CONFIG_DM_MMC=y +CONFIG_DM_USB=y CONFIG_FSL_ESDHC_IMX=y CONFIG_PHYLIB=y CONFIG_MII=y diff --git a/configs/pico-imx7d_defconfig b/configs/pico-imx7d_defconfig index f23bbf7814..09b81e485e 100644 --- a/configs/pico-imx7d_defconfig +++ b/configs/pico-imx7d_defconfig @@ -51,6 +51,7 @@ CONFIG_FASTBOOT_FLASH_MMC_DEV=0 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y CONFIG_DM_GPIO=y CONFIG_DM_MMC=y +CONFIG_DM_USB=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_ESDHC_IMX=y CONFIG_PHYLIB=y diff --git a/configs/pico-pi-imx7d_defconfig b/configs/pico-pi-imx7d_defconfig index 14c0817127..7689242716 100644 --- a/configs/pico-pi-imx7d_defconfig +++ b/configs/pico-pi-imx7d_defconfig @@ -51,6 +51,7 @@ CONFIG_FASTBOOT_FLASH_MMC_DEV=0 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y CONFIG_DM_GPIO=y CONFIG_DM_MMC=y +CONFIG_DM_USB=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_ESDHC_IMX=y CONFIG_PHYLIB=y