pico-imx7d: Enable DM_USB
authorJoris Offouga <offougajoris@gmail.com>
Tue, 11 Jun 2019 12:08:50 +0000 (14:08 +0200)
committerStefano Babic <sbabic@denx.de>
Fri, 19 Jul 2019 18:14:50 +0000 (20:14 +0200)
This patch enable usb support with device-tree

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
arch/arm/dts/imx7d-pico.dtsi
board/technexion/pico-imx7d/pico-imx7d.c
configs/pico-hobbit-imx7d_defconfig
configs/pico-imx7d_bl33_defconfig
configs/pico-imx7d_defconfig
configs/pico-pi-imx7d_defconfig

index 9f1fe683db3a506f43ceb121ac4570f9063338ca..7cd8be24c874f5b48b7815c6e9d7c1031d0ea2a0 100644 (file)
@@ -10,6 +10,7 @@
 / {
        aliases {
                mmc0 = &usdhc3;
+               usb0 = &usbotg1;
        };
 
        /* Will be filled by the bootloader */
 
 &usbotg1 {
        vbus-supply = <&reg_usb_otg1_vbus>;
+       dr_mode = "peripheral";
        status = "okay";
 };
 
index e3d75e549a6da098d580348eb8ca929728fa7e37..216475c8dec15fa9d30d5549996b23cdd4a1a62b 100644 (file)
@@ -16,7 +16,6 @@
 #include <i2c.h>
 #include <miiphy.h>
 #include <netdev.h>
-#include <usb.h>
 #include <power/pmic.h>
 #include <power/pfuze3000_pmic.h>
 #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;
-}
index bc34e995e3a3020c62b3332d62344de709d883e8..263f8f29a023ca835b894efa9877324087fb6678 100644 (file)
@@ -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
index b609b6d7b904dcd8863699c0c24543d671a7b1cd..7c559cfec4f34e6810e62794b0cb5d5cb1a1dc19 100644 (file)
@@ -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
index f23bbf7814461fb6256784c69f1c5b9022e6c467..09b81e485e98d532c7b6b83e49d3eb5e6f915936 100644 (file)
@@ -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
index 14c0817127446c939224c3193489a24ff55079ff..7689242716a0481987600dfd6d05e3366e05824e 100644 (file)
@@ -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