From c805c64ea941d0377651a9fa772f0c41a5db5c0d Mon Sep 17 00:00:00 2001
From: Troy Kisky <troy.kisky@boundarydevices.com>
Date: Tue, 23 Jul 2019 13:30:23 -0700
Subject: [PATCH] Revert "bio: use MX8MQ_IOMUXC_GPIO1_IO12_USB1_OTG_PWR instead
 of reg_usb_otg_vbus"

This reverts commit ffbe956956dd5b0c35236c0a7b382ddd7995c874.
---
 arch/arm/dts/imx8mq-bio.dts | 20 +++++++++++++++++++-
 board/boundary/bio/bio.c    |  3 ---
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/arch/arm/dts/imx8mq-bio.dts b/arch/arm/dts/imx8mq-bio.dts
index 7d7b329ca6a..c6256ddf6d9 100644
--- a/arch/arm/dts/imx8mq-bio.dts
+++ b/arch/arm/dts/imx8mq-bio.dts
@@ -233,6 +233,13 @@
 		>;
 	};
 
+	pinctrl_reg_usbotg_vbus: reg-usbotg-vbusgrp {
+		fsl,pins = <
+#define GP_REG_USB_OTG_VBUS	<&gpio1 12 GPIO_ACTIVE_HIGH>
+			MX8MQ_IOMUXC_GPIO1_IO12_GPIO1_IO12	0x16
+		>;
+	};
+
 	pinctrl_reg_wlan_vmmc: reg-wlan-vmmcgrp {
 		fsl,pins = <
 #define GP_REG_WLAN_VMMC	<&gpio3 20 GPIO_ACTIVE_HIGH>
@@ -293,7 +300,6 @@
 
 	pinctrl_usb3_0: usb3-0grp {
 		fsl,pins = <
-			MX8MQ_IOMUXC_GPIO1_IO12_USB1_OTG_PWR		0x16
 			MX8MQ_IOMUXC_GPIO1_IO13_USB1_OTG_OC		0x16
 		>;
 	};
@@ -588,6 +594,17 @@
 #endif
 	};
 
+	reg_usb_otg_vbus: regulator-usb-otg-vbus {
+		compatible = "regulator-fixed";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_reg_usbotg_vbus>;
+		regulator-name = "usb_otg_vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = GP_REG_USB_OTG_VBUS;
+		enable-active-high;
+	};
+
 	reg_vref_0v9: regulator-vref-0v9 {
 		compatible = "regulator-fixed";
 		regulator-name = "vref-0v9";
@@ -1116,6 +1133,7 @@
 	status = "okay";
 #endif
 	dr_mode = "otg";
+	vbus-supply = <&reg_usb_otg_vbus>;
 };
 
 &usb3_phy1 {
diff --git a/board/boundary/bio/bio.c b/board/boundary/bio/bio.c
index d6415f2196f..27ddd6abca2 100644
--- a/board/boundary/bio/bio.c
+++ b/board/boundary/bio/bio.c
@@ -63,9 +63,6 @@ static iomux_v3_cfg_t const init_pads[] = {
 	IMX8MQ_PAD_SAI2_TXC__GPIO4_IO25 | MUX_PAD_CTRL(0x61),
 #define GP_CSI1_MIPI_RESET		IMX_GPIO_NR(4, 24)
 	IMX8MQ_PAD_SAI2_TXFS__GPIO4_IO24 | MUX_PAD_CTRL(0x61),
-
-	IMX8MQ_PAD_GPIO1_IO12__USB1_OTG_PWR | MUX_PAD_CTRL(0x16),
-	IMX8MQ_PAD_GPIO1_IO13__USB1_OTG_OC | MUX_PAD_CTRL(0x16),
 };
 
 int board_early_init_f(void)
-- 
GitLab