All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/1] pico-imx7d: Enable DM_USB
@ 2019-06-11 12:08 Joris Offouga
  2019-06-11 12:16 ` jorisoffouga
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Joris Offouga @ 2019-06-11 12:08 UTC (permalink / raw)
  To: u-boot

This patch enable usb support with device-tree

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
---
 arch/arm/dts/imx7d-pico.dtsi             |  2 ++
 board/technexion/pico-imx7d/pico-imx7d.c | 13 -------------
 configs/pico-hobbit-imx7d_defconfig      |  1 +
 configs/pico-imx7d_bl33_defconfig        |  1 +
 configs/pico-imx7d_defconfig             |  1 +
 configs/pico-pi-imx7d_defconfig          |  1 +
 6 files changed, 6 insertions(+), 13 deletions(-)

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 = <&reg_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 <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;
-}
diff --git a/configs/pico-hobbit-imx7d_defconfig b/configs/pico-hobbit-imx7d_defconfig
index 9545d6bbd6..16859d7592 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=y
 CONFIG_PHYLIB=y
diff --git a/configs/pico-imx7d_bl33_defconfig b/configs/pico-imx7d_bl33_defconfig
index 932ed4c489..0d28fd9600 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=y
 CONFIG_PHYLIB=y
 CONFIG_MII=y
diff --git a/configs/pico-imx7d_defconfig b/configs/pico-imx7d_defconfig
index 92ab9c5a50..05c3704d92 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=y
 CONFIG_PHYLIB=y
diff --git a/configs/pico-pi-imx7d_defconfig b/configs/pico-pi-imx7d_defconfig
index 042affe01b..ffb02a7677 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=y
 CONFIG_PHYLIB=y
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 1/1] pico-imx7d: Enable DM_USB
  2019-06-11 12:08 [U-Boot] [PATCH 1/1] pico-imx7d: Enable DM_USB Joris Offouga
@ 2019-06-11 12:16 ` jorisoffouga
  2019-06-13  7:16 ` Jun Nie
  2019-07-20  9:06 ` sbabic at denx.de
  2 siblings, 0 replies; 4+ messages in thread
From: jorisoffouga @ 2019-06-11 12:16 UTC (permalink / raw)
  To: u-boot

+ Jun Nie for pico-imx7d_bl33_defconfig

Le 11/06/2019 à 14:08, Joris Offouga a écrit :
> This patch enable usb support with device-tree
>
> Signed-off-by: Joris Offouga <offougajoris@gmail.com>
> ---
>   arch/arm/dts/imx7d-pico.dtsi             |  2 ++
>   board/technexion/pico-imx7d/pico-imx7d.c | 13 -------------
>   configs/pico-hobbit-imx7d_defconfig      |  1 +
>   configs/pico-imx7d_bl33_defconfig        |  1 +
>   configs/pico-imx7d_defconfig             |  1 +
>   configs/pico-pi-imx7d_defconfig          |  1 +
>   6 files changed, 6 insertions(+), 13 deletions(-)
>
> 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 = <&reg_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 <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;
> -}
> diff --git a/configs/pico-hobbit-imx7d_defconfig b/configs/pico-hobbit-imx7d_defconfig
> index 9545d6bbd6..16859d7592 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=y
>   CONFIG_PHYLIB=y
> diff --git a/configs/pico-imx7d_bl33_defconfig b/configs/pico-imx7d_bl33_defconfig
> index 932ed4c489..0d28fd9600 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=y
>   CONFIG_PHYLIB=y
>   CONFIG_MII=y
> diff --git a/configs/pico-imx7d_defconfig b/configs/pico-imx7d_defconfig
> index 92ab9c5a50..05c3704d92 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=y
>   CONFIG_PHYLIB=y
> diff --git a/configs/pico-pi-imx7d_defconfig b/configs/pico-pi-imx7d_defconfig
> index 042affe01b..ffb02a7677 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=y
>   CONFIG_PHYLIB=y

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 1/1] pico-imx7d: Enable DM_USB
  2019-06-11 12:08 [U-Boot] [PATCH 1/1] pico-imx7d: Enable DM_USB Joris Offouga
  2019-06-11 12:16 ` jorisoffouga
@ 2019-06-13  7:16 ` Jun Nie
  2019-07-20  9:06 ` sbabic at denx.de
  2 siblings, 0 replies; 4+ messages in thread
From: Jun Nie @ 2019-06-13  7:16 UTC (permalink / raw)
  To: u-boot

Joris Offouga <offougajoris@gmail.com> 于2019年6月11日周二 下午8:09写道:
>
> This patch enable usb support with device-tree
>
> Signed-off-by: Joris Offouga <offougajoris@gmail.com>
> ---
>  arch/arm/dts/imx7d-pico.dtsi             |  2 ++
>  board/technexion/pico-imx7d/pico-imx7d.c | 13 -------------
>  configs/pico-hobbit-imx7d_defconfig      |  1 +
>  configs/pico-imx7d_bl33_defconfig        |  1 +
>  configs/pico-imx7d_defconfig             |  1 +
>  configs/pico-pi-imx7d_defconfig          |  1 +
>  6 files changed, 6 insertions(+), 13 deletions(-)
>

Reviewed-by: Jun Nie <jun.nie@linaro.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot]  [PATCH 1/1] pico-imx7d: Enable DM_USB
  2019-06-11 12:08 [U-Boot] [PATCH 1/1] pico-imx7d: Enable DM_USB Joris Offouga
  2019-06-11 12:16 ` jorisoffouga
  2019-06-13  7:16 ` Jun Nie
@ 2019-07-20  9:06 ` sbabic at denx.de
  2 siblings, 0 replies; 4+ messages in thread
From: sbabic at denx.de @ 2019-07-20  9:06 UTC (permalink / raw)
  To: u-boot

> This patch enable usb support with device-tree
> Signed-off-by: Joris Offouga <offougajoris@gmail.com>
> Reviewed-by: Jun Nie <jun.nie@linaro.org>

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-20  9:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-11 12:08 [U-Boot] [PATCH 1/1] pico-imx7d: Enable DM_USB Joris Offouga
2019-06-11 12:16 ` jorisoffouga
2019-06-13  7:16 ` Jun Nie
2019-07-20  9:06 ` sbabic at denx.de

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.