[PATCH 1/7] imx: ventana: add part command

Add part command for obtaining info about disk partitions.
Signed-off-by: Tim Harvey tharvey@gateworks.com --- configs/gwventana_emmc_defconfig | 1 + configs/gwventana_gw5904_defconfig | 1 + configs/gwventana_nand_defconfig | 1 + 3 files changed, 3 insertions(+)
diff --git a/configs/gwventana_emmc_defconfig b/configs/gwventana_emmc_defconfig index 9e764f40a2..58abd1d40e 100644 --- a/configs/gwventana_emmc_defconfig +++ b/configs/gwventana_emmc_defconfig @@ -51,6 +51,7 @@ CONFIG_CMD_UNZIP=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y +CONFIG_CMD_PART=y CONFIG_CMD_PCI=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y diff --git a/configs/gwventana_gw5904_defconfig b/configs/gwventana_gw5904_defconfig index bab61e7daa..7d385c2f58 100644 --- a/configs/gwventana_gw5904_defconfig +++ b/configs/gwventana_gw5904_defconfig @@ -51,6 +51,7 @@ CONFIG_CMD_UNZIP=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y +CONFIG_CMD_PART=y CONFIG_CMD_PCI=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y diff --git a/configs/gwventana_nand_defconfig b/configs/gwventana_nand_defconfig index e59efebab7..fbaf6dfc16 100644 --- a/configs/gwventana_nand_defconfig +++ b/configs/gwventana_nand_defconfig @@ -54,6 +54,7 @@ CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_NAND_TRIMFFS=y +CONFIG_CMD_PART=y CONFIG_CMD_PCI=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y

Add watchdog support for U-Boot
Signed-off-by: Tim Harvey tharvey@gateworks.com --- configs/gwventana_emmc_defconfig | 6 +++++- configs/gwventana_gw5904_defconfig | 6 +++++- configs/gwventana_nand_defconfig | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/configs/gwventana_emmc_defconfig b/configs/gwventana_emmc_defconfig index 58abd1d40e..eae41cdfa7 100644 --- a/configs/gwventana_emmc_defconfig +++ b/configs/gwventana_emmc_defconfig @@ -41,7 +41,6 @@ CONFIG_SPL_DMA=y CONFIG_SPL_I2C=y CONFIG_SPL_OS_BOOT=y CONFIG_SPL_POWER=y -CONFIG_SPL_WATCHDOG=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Ventana > " CONFIG_CMD_BOOTZ=y @@ -55,6 +54,7 @@ CONFIG_CMD_PART=y CONFIG_CMD_PCI=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_CMD_WDT=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y @@ -105,6 +105,8 @@ CONFIG_MXC_UART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_MXC_SPI=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_WATCHDOG=y CONFIG_DM_THERMAL=y CONFIG_IMX_THERMAL=y CONFIG_USB=y @@ -129,4 +131,6 @@ CONFIG_DM_VIDEO=y CONFIG_SYS_WHITE_ON_BLACK=y # CONFIG_PANEL is not set CONFIG_VIDEO_IPUV3=y +CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 +CONFIG_IMX_WATCHDOG=y CONFIG_FDT_FIXUP_PARTITIONS=y diff --git a/configs/gwventana_gw5904_defconfig b/configs/gwventana_gw5904_defconfig index 7d385c2f58..fdfc82dc7f 100644 --- a/configs/gwventana_gw5904_defconfig +++ b/configs/gwventana_gw5904_defconfig @@ -41,7 +41,6 @@ CONFIG_SPL_DMA=y CONFIG_SPL_I2C=y CONFIG_SPL_OS_BOOT=y CONFIG_SPL_POWER=y -CONFIG_SPL_WATCHDOG=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Ventana > " CONFIG_CMD_BOOTZ=y @@ -55,6 +54,7 @@ CONFIG_CMD_PART=y CONFIG_CMD_PCI=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_CMD_WDT=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y @@ -109,6 +109,8 @@ CONFIG_MXC_UART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_MXC_SPI=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_WATCHDOG=y CONFIG_DM_THERMAL=y CONFIG_IMX_THERMAL=y CONFIG_USB=y @@ -133,4 +135,6 @@ CONFIG_DM_VIDEO=y CONFIG_SYS_WHITE_ON_BLACK=y # CONFIG_PANEL is not set CONFIG_VIDEO_IPUV3=y +CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 +CONFIG_IMX_WATCHDOG=y CONFIG_FDT_FIXUP_PARTITIONS=y diff --git a/configs/gwventana_nand_defconfig b/configs/gwventana_nand_defconfig index fbaf6dfc16..0265dafbd0 100644 --- a/configs/gwventana_nand_defconfig +++ b/configs/gwventana_nand_defconfig @@ -42,7 +42,6 @@ CONFIG_SPL_I2C=y CONFIG_SPL_NAND_SUPPORT=y CONFIG_SPL_OS_BOOT=y CONFIG_SPL_POWER=y -CONFIG_SPL_WATCHDOG=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Ventana > " CONFIG_CMD_BOOTZ=y @@ -58,6 +57,7 @@ CONFIG_CMD_PART=y CONFIG_CMD_PCI=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_CMD_WDT=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y @@ -111,6 +111,8 @@ CONFIG_MXC_UART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_MXC_SPI=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_WATCHDOG=y CONFIG_DM_THERMAL=y CONFIG_IMX_THERMAL=y CONFIG_USB=y @@ -135,4 +137,6 @@ CONFIG_DM_VIDEO=y CONFIG_SYS_WHITE_ON_BLACK=y # CONFIG_PANEL is not set CONFIG_VIDEO_IPUV3=y +CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 +CONFIG_IMX_WATCHDOG=y CONFIG_FDT_FIXUP_PARTITIONS=y

Add watchdog support for U-Boot Signed-off-by: Tim Harvey tharvey@gateworks.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

We configure network phy configuration for internal delay, LED config, and clock config. If we leave the phy reset gpio defined in dt the kernel may issue a reset to the phy and break these configs. While some may be handled by a kernel phy driver, others may not (typically LED config).
Signed-off-by: Tim Harvey tharvey@gateworks.com --- board/gateworks/gw_ventana/gw_ventana.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c index 79629828d0..16468060f7 100644 --- a/board/gateworks/gw_ventana/gw_ventana.c +++ b/board/gateworks/gw_ventana/gw_ventana.c @@ -1047,6 +1047,14 @@ int ft_board_setup(void *blob, struct bd_info *bd) ft_board_pci_fixup(blob, bd); #endif
+ /* + * remove reset gpio control as we configure the PHY registers + * for internal delay, LED config, and clock config in the bootloader + */ + i = fdt_node_offset_by_compatible(blob, -1, "fsl,imx6q-fec"); + if (i) + fdt_delprop(blob, i, "phy-reset-gpios"); + /* * Peripheral Config: * remove nodes by alias path if EEPROM config tells us the

We configure network phy configuration for internal delay, LED config, and clock config. If we leave the phy reset gpio defined in dt the kernel may issue a reset to the phy and break these configs. While some may be handled by a kernel phy driver, others may not (typically LED config). Signed-off-by: Tim Harvey tharvey@gateworks.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

Enable additional USB ethernet devices.
Signed-off-by: Tim Harvey tharvey@gateworks.com --- configs/gwventana_emmc_defconfig | 5 +++++ configs/gwventana_gw5904_defconfig | 5 +++++ configs/gwventana_nand_defconfig | 5 +++++ 3 files changed, 15 insertions(+)
diff --git a/configs/gwventana_emmc_defconfig b/configs/gwventana_emmc_defconfig index eae41cdfa7..2bb8b903c3 100644 --- a/configs/gwventana_emmc_defconfig +++ b/configs/gwventana_emmc_defconfig @@ -113,6 +113,11 @@ CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y +CONFIG_USB_ETHER_ASIX88179=y +CONFIG_USB_ETHER_LAN75XX=y +CONFIG_USB_ETHER_LAN78XX=y +CONFIG_USB_ETHER_MCS7830=y +CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="Gateworks" diff --git a/configs/gwventana_gw5904_defconfig b/configs/gwventana_gw5904_defconfig index fdfc82dc7f..cd220513bf 100644 --- a/configs/gwventana_gw5904_defconfig +++ b/configs/gwventana_gw5904_defconfig @@ -117,6 +117,11 @@ CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y +CONFIG_USB_ETHER_ASIX88179=y +CONFIG_USB_ETHER_LAN75XX=y +CONFIG_USB_ETHER_LAN78XX=y +CONFIG_USB_ETHER_MCS7830=y +CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="Gateworks" diff --git a/configs/gwventana_nand_defconfig b/configs/gwventana_nand_defconfig index 0265dafbd0..2c264f0132 100644 --- a/configs/gwventana_nand_defconfig +++ b/configs/gwventana_nand_defconfig @@ -119,6 +119,11 @@ CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y +CONFIG_USB_ETHER_ASIX88179=y +CONFIG_USB_ETHER_LAN75XX=y +CONFIG_USB_ETHER_LAN78XX=y +CONFIG_USB_ETHER_MCS7830=y +CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="Gateworks"

Enable additional USB ethernet devices. Signed-off-by: Tim Harvey tharvey@gateworks.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

After mxc_ipuv3 DM_VIDEO conversion showing splash image doesn't work. Fix this by adding new requirements: - splashimage env variable. - CONFIG_SPLASH_SCREEN - CONFIG_CMD_BMP
Signed-off-by: Tim Harvey tharvey@gateworks.com --- configs/gwventana_emmc_defconfig | 3 +++ configs/gwventana_gw5904_defconfig | 3 +++ configs/gwventana_nand_defconfig | 3 +++ include/configs/gw_ventana.h | 1 + 4 files changed, 10 insertions(+)
diff --git a/configs/gwventana_emmc_defconfig b/configs/gwventana_emmc_defconfig index 2bb8b903c3..30ebac72e0 100644 --- a/configs/gwventana_emmc_defconfig +++ b/configs/gwventana_emmc_defconfig @@ -58,6 +58,7 @@ CONFIG_CMD_WDT=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y +CONFIG_CMD_BMP=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y CONFIG_CMD_EXT2=y @@ -136,6 +137,8 @@ CONFIG_DM_VIDEO=y CONFIG_SYS_WHITE_ON_BLACK=y # CONFIG_PANEL is not set CONFIG_VIDEO_IPUV3=y +CONFIG_SPLASH_SCREEN=y +CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 CONFIG_IMX_WATCHDOG=y CONFIG_FDT_FIXUP_PARTITIONS=y diff --git a/configs/gwventana_gw5904_defconfig b/configs/gwventana_gw5904_defconfig index cd220513bf..8f381f3f78 100644 --- a/configs/gwventana_gw5904_defconfig +++ b/configs/gwventana_gw5904_defconfig @@ -58,6 +58,7 @@ CONFIG_CMD_WDT=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y +CONFIG_CMD_BMP=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y CONFIG_CMD_EXT2=y @@ -140,6 +141,8 @@ CONFIG_DM_VIDEO=y CONFIG_SYS_WHITE_ON_BLACK=y # CONFIG_PANEL is not set CONFIG_VIDEO_IPUV3=y +CONFIG_SPLASH_SCREEN=y +CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 CONFIG_IMX_WATCHDOG=y CONFIG_FDT_FIXUP_PARTITIONS=y diff --git a/configs/gwventana_nand_defconfig b/configs/gwventana_nand_defconfig index 2c264f0132..a1a5a04a0b 100644 --- a/configs/gwventana_nand_defconfig +++ b/configs/gwventana_nand_defconfig @@ -61,6 +61,7 @@ CONFIG_CMD_WDT=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y +CONFIG_CMD_BMP=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y CONFIG_CMD_EXT2=y @@ -142,6 +143,8 @@ CONFIG_DM_VIDEO=y CONFIG_SYS_WHITE_ON_BLACK=y # CONFIG_PANEL is not set CONFIG_VIDEO_IPUV3=y +CONFIG_SPLASH_SCREEN=y +CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 CONFIG_IMX_WATCHDOG=y CONFIG_FDT_FIXUP_PARTITIONS=y diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h index 4f27273634..4b71b10021 100644 --- a/include/configs/gw_ventana.h +++ b/include/configs/gw_ventana.h @@ -124,6 +124,7 @@
#define CONFIG_EXTRA_ENV_SETTINGS_COMMON \ "splashpos=m,m\0" \ + "splashimage=" __stringify(CONFIG_LOADADDR) "\0" \ "usb_pgood_delay=2000\0" \ "console=ttymxc1\0" \ "bootdevs=usb mmc sata flash\0" \

After mxc_ipuv3 DM_VIDEO conversion showing splash image doesn't work. Fix this by adding new requirements:
- splashimage env variable.
- CONFIG_SPLASH_SCREEN
- CONFIG_CMD_BMP
Signed-off-by: Tim Harvey tharvey@gateworks.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

Enable LVDS display detection and panel-specific configuration
Make I2C based LVDS detection and configuration model specific: - not all boards support LVDS connectors; fail detection that do not support LVDS to avoid misdetecting an I2C device as a display - GPIO configuration is panel specific; use panel name where needed
Signed-off-by: Tim Harvey tharvey@gateworks.com --- board/gateworks/gw_ventana/gw_ventana.c | 59 ++++++++++++++++++------- 1 file changed, 42 insertions(+), 17 deletions(-)
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c index 16468060f7..1c82bd5067 100644 --- a/board/gateworks/gw_ventana/gw_ventana.c +++ b/board/gateworks/gw_ventana/gw_ventana.c @@ -158,25 +158,54 @@ static void enable_hdmi(struct display_info_t const *dev) imx_enable_hdmi_phy(); }
-static int detect_i2c(struct display_info_t const *dev) +static int detect_lvds(struct display_info_t const *dev) { + /* only the following boards support LVDS connectors */ + switch (board_type) { + case GW52xx: + case GW53xx: + case GW54xx: + case GW560x: + case GW5905: + case GW5909: + break; + default: + return 0; + } + return i2c_set_bus_num(dev->bus) == 0 && i2c_probe(dev->addr) == 0; }
static void enable_lvds(struct display_info_t const *dev) { - struct iomuxc *iomux = (struct iomuxc *) - IOMUXC_BASE_ADDR; + struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR;
/* set CH0 data width to 24bit (IOMUXC_GPR2:5 0=18bit, 1=24bit) */ u32 reg = readl(&iomux->gpr[2]); reg |= IOMUXC_GPR2_DATA_WIDTH_CH0_24BIT; writel(reg, &iomux->gpr[2]);
- /* Enable Backlight */ - gpio_request(IMX_GPIO_NR(1, 10), "bklt_gpio"); - gpio_direction_output(IMX_GPIO_NR(1, 10), 0); + /* Configure GPIO */ + switch (board_type) { + case GW52xx: + case GW53xx: + case GW54xx: + if (!strncmp(dev->mode.name, "Hannstar", 8)) { + SETUP_IOMUX_PAD(PAD_SD2_CLK__GPIO1_IO10 | DIO_PAD_CFG); + gpio_request(IMX_GPIO_NR(1, 10), "cabc"); + gpio_direction_output(IMX_GPIO_NR(1, 10), 0); + } else if (!strncmp(dev->mode.name, "DLC", 3)) { + SETUP_IOMUX_PAD(PAD_SD2_CLK__GPIO1_IO10 | DIO_PAD_CFG); + gpio_request(IMX_GPIO_NR(1, 10), "touch_rst#"); + gpio_direction_output(IMX_GPIO_NR(1, 10), 1); + } + break; + default: + break; + } + + /* Configure backlight */ gpio_request(IMX_GPIO_NR(1, 18), "bklt_en"); SETUP_IOMUX_PAD(PAD_SD1_CMD__GPIO1_IO18 | DIO_PAD_CFG); gpio_direction_output(IMX_GPIO_NR(1, 18), 1); @@ -208,7 +237,7 @@ struct display_info_t const displays[] = {{ .bus = 2, .addr = 0x4, .pixfmt = IPU_PIX_FMT_LVDS666, - .detect = detect_i2c, + .detect = detect_lvds, .enable = enable_lvds, .mode = { .name = "Hannstar-XGA", @@ -228,7 +257,7 @@ struct display_info_t const displays[] = {{ /* DLC700JMG-T-4 */ .bus = 2, .addr = 0x38, - .detect = NULL, + .detect = detect_lvds, .enable = enable_lvds, .pixfmt = IPU_PIX_FMT_LVDS666, .mode = { @@ -247,9 +276,9 @@ struct display_info_t const displays[] = {{ .vmode = FB_VMODE_NONINTERLACED } }, { /* DLC0700XDP21LF-C-1 */ - .bus = 0, - .addr = 0, - .detect = NULL, + .bus = 2, + .addr = 0x38, + .detect = detect_lvds, .enable = enable_lvds, .pixfmt = IPU_PIX_FMT_LVDS666, .mode = { @@ -270,7 +299,7 @@ struct display_info_t const displays[] = {{ /* DLC800FIG-T-3 */ .bus = 2, .addr = 0x14, - .detect = NULL, + .detect = detect_lvds, .enable = enable_lvds, .pixfmt = IPU_PIX_FMT_LVDS666, .mode = { @@ -290,7 +319,7 @@ struct display_info_t const displays[] = {{ } }, { .bus = 2, .addr = 0x5d, - .detect = detect_i2c, + .detect = detect_lvds, .enable = enable_lvds, .pixfmt = IPU_PIX_FMT_LVDS666, .mode = { @@ -358,10 +387,6 @@ static void setup_display(void) | (IOMUXC_GPR3_MUX_SRC_IPU1_DI0 <<IOMUXC_GPR3_LVDS0_MUX_CTL_OFFSET); writel(reg, &iomux->gpr[3]); - - /* LVDS Backlight GPIO on LVDS connector - output low */ - SETUP_IOMUX_PAD(PAD_SD2_CLK__GPIO1_IO10 | DIO_PAD_CFG); - gpio_direction_output(IMX_GPIO_NR(1, 10), 0); } #endif /* CONFIG_VIDEO_IPUV3 */

Enable LVDS display detection and panel-specific configuration Make I2C based LVDS detection and configuration model specific:
- not all boards support LVDS connectors; fail detection that do not support LVDS to avoid misdetecting an I2C device as a display
- GPIO configuration is panel specific; use panel name where needed
Signed-off-by: Tim Harvey tharvey@gateworks.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

Remove board_ehci_hcd_init function that is not used with DM_USB and replace its functionality with device-tree configuraton that treats USB HUB RST# as a gpio enable for the usbh1 vbus regulator.
Signed-off-by: Tim Harvey tharvey@gateworks.com --- arch/arm/dts/imx6qdl-gw53xx.dtsi | 11 +++++++- arch/arm/dts/imx6qdl-gw54xx.dtsi | 11 +++++++- arch/arm/dts/imx6qdl-gw552x.dtsi | 21 ++++++++++++++- arch/arm/dts/imx6qdl-gw560x.dtsi | 3 ++- arch/arm/dts/imx6qdl-gw5904.dtsi | 11 +++++++- arch/arm/dts/imx6qdl-gw5912.dtsi | 11 +++++++- board/gateworks/gw_ventana/gw_ventana.c | 35 ------------------------- 7 files changed, 62 insertions(+), 41 deletions(-)
diff --git a/arch/arm/dts/imx6qdl-gw53xx.dtsi b/arch/arm/dts/imx6qdl-gw53xx.dtsi index 904b228306..77ac103c2d 100644 --- a/arch/arm/dts/imx6qdl-gw53xx.dtsi +++ b/arch/arm/dts/imx6qdl-gw53xx.dtsi @@ -137,7 +137,8 @@ regulator-name = "usb_h1_vbus"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; - regulator-always-on; + gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>; + enable-active-high; };
reg_usb_otg_vbus: regulator-usb-otg-vbus { @@ -550,6 +551,8 @@
&usbh1 { vbus-supply = <®_usb_h1_vbus>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbh1>; status = "okay"; };
@@ -720,6 +723,12 @@ >; };
+ pinctrl_usbh1: usbh1grp { + fsl,pins = < + MX6QDL_PAD_GPIO_9__GPIO1_IO09 0x1b0b0 + >; + }; + pinctrl_usbotg: usbotggrp { fsl,pins = < MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x17059 diff --git a/arch/arm/dts/imx6qdl-gw54xx.dtsi b/arch/arm/dts/imx6qdl-gw54xx.dtsi index ffed4fb550..98c81e9c9b 100644 --- a/arch/arm/dts/imx6qdl-gw54xx.dtsi +++ b/arch/arm/dts/imx6qdl-gw54xx.dtsi @@ -146,7 +146,8 @@ regulator-name = "usb_h1_vbus"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; - regulator-always-on; + gpio = <&gpio1 16 GPIO_ACTIVE_HIGH>; + enable-active-high; };
reg_usb_otg_vbus: regulator@3 { @@ -620,6 +621,8 @@
&usbh1 { vbus-supply = <®_usb_h1_vbus>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbh1>; status = "okay"; };
@@ -815,6 +818,12 @@ >; };
+ pinctrl_usbh1: usbh1grp { + fsl,pins = < + MX6QDL_PAD_SD1_DAT0__GPIO1_IO16 0x1b0b0 + >; + }; + pinctrl_usbotg: usbotggrp { fsl,pins = < MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x17059 diff --git a/arch/arm/dts/imx6qdl-gw552x.dtsi b/arch/arm/dts/imx6qdl-gw552x.dtsi index f6742e5131..b853399aec 100644 --- a/arch/arm/dts/imx6qdl-gw552x.dtsi +++ b/arch/arm/dts/imx6qdl-gw552x.dtsi @@ -121,6 +121,15 @@ regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; }; + + reg_usb_h1_vbus: regulator-usbh1-vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_h1_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; };
&gpmi { @@ -390,9 +399,13 @@ &uart5 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart5>; - status = "okay"; }; + status = "okay"; +};
&usbh1 { + vbus-supply = <®_usb_h1_vbus>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbh1>; status = "okay"; };
@@ -507,6 +520,12 @@ >; };
+ pinctrl_usbh1: usbh1grp { + fsl,pins = < + MX6QDL_PAD_GPIO_9__GPIO1_IO09 0x1b0b0 + >; + }; + pinctrl_usbotg: usbotggrp { fsl,pins = < MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x13059 diff --git a/arch/arm/dts/imx6qdl-gw560x.dtsi b/arch/arm/dts/imx6qdl-gw560x.dtsi index 5da19756e0..1e95267c97 100644 --- a/arch/arm/dts/imx6qdl-gw560x.dtsi +++ b/arch/arm/dts/imx6qdl-gw560x.dtsi @@ -221,7 +221,8 @@ regulator-name = "usb_h1_vbus"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; - regulator-always-on; + gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>; + enable-active-high; };
reg_usb_otg_vbus: regulator-usb-otg-vbus { diff --git a/arch/arm/dts/imx6qdl-gw5904.dtsi b/arch/arm/dts/imx6qdl-gw5904.dtsi index b5ed2d83c1..286c7a9924 100644 --- a/arch/arm/dts/imx6qdl-gw5904.dtsi +++ b/arch/arm/dts/imx6qdl-gw5904.dtsi @@ -176,7 +176,8 @@ regulator-name = "usb_h1_vbus"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; - regulator-always-on; + gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>; + enable-active-high; };
reg_usb_otg_vbus: regulator-usb-otg-vbus { @@ -593,6 +594,8 @@
&usbh1 { vbus-supply = <®_usb_h1_vbus>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbotg>; status = "okay"; };
@@ -753,6 +756,12 @@ >; };
+ pinctrl_usbh1: usbh1grp { + fsl,pins = < + MX6QDL_PAD_GPIO_9__GPIO1_IO09 0x1b0b0 + >; + }; + pinctrl_usbotg: usbotggrp { fsl,pins = < MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x17059 diff --git a/arch/arm/dts/imx6qdl-gw5912.dtsi b/arch/arm/dts/imx6qdl-gw5912.dtsi index 2537288627..8fd8fdb514 100644 --- a/arch/arm/dts/imx6qdl-gw5912.dtsi +++ b/arch/arm/dts/imx6qdl-gw5912.dtsi @@ -120,7 +120,8 @@ regulator-name = "usb_vbus"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; - regulator-always-on; + gpio = <&gpio4 5 GPIO_ACTIVE_HIGH>; + enable-active-high; }; };
@@ -380,6 +381,8 @@
&usbh1 { vbus-supply = <®_usb_vbus>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbh1>; status = "okay"; };
@@ -560,6 +563,12 @@ >; };
+ pinctrl_usbh1: usbh1grp { + fsl,pins = < + MX6QDL_PAD_GPIO_19__GPIO4_IO05 0x1b0b0 + >; + }; + pinctrl_usbotg: usbotggrp { fsl,pins = < MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x13059 diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c index 1c82bd5067..8cf7914670 100644 --- a/board/gateworks/gw_ventana/gw_ventana.c +++ b/board/gateworks/gw_ventana/gw_ventana.c @@ -39,41 +39,6 @@ DECLARE_GLOBAL_DATA_PTR; struct ventana_board_info ventana_info; static int board_type;
-#ifdef CONFIG_USB_EHCI_MX6 -/* toggle USB_HUB_RST# for boards that have it; it is not defined in dt */ -int board_ehci_hcd_init(int port) -{ - int gpio; - - /* USB HUB is always on P1 */ - if (port == 0) - return 0; - - /* Reset USB HUB */ - switch (board_type) { - case GW53xx: - case GW552x: - case GW5906: - gpio = (IMX_GPIO_NR(1, 9)); - break; - case GW54proto: - case GW54xx: - gpio = (IMX_GPIO_NR(1, 16)); - break; - default: - return 0; - } - - /* request and toggle hub rst */ - gpio_request(gpio, "usb_hub_rst#"); - gpio_direction_output(gpio, 0); - mdelay(2); - gpio_set_value(gpio, 1); - - return 0; -} -#endif /* CONFIG_USB_EHCI_MX6 */ - /* configure eth0 PHY board-specific LED behavior */ int board_phy_config(struct phy_device *phydev) {

Remove board_ehci_hcd_init function that is not used with DM_USB and replace its functionality with device-tree configuraton that treats USB HUB RST# as a gpio enable for the usbh1 vbus regulator. Signed-off-by: Tim Harvey tharvey@gateworks.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

Add part command for obtaining info about disk partitions. Signed-off-by: Tim Harvey tharvey@gateworks.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic
participants (2)
-
sbabic@denx.de
-
Tim Harvey