Commit 7a9f0604 authored by Fabio Estevam's avatar Fabio Estevam Committed by Shawn Guo

ARM: dts: imx51-babbage: Fix ULPI PHY reset modelling

GPIO2_5 is the reset GPIO for the USB3317 ULPI PHY. Instead of modelling it as
a regulator, the correct approach is to use the 'reset_gpios' property of the
"usb-nop-xceiv" node.

GPIO1_7 is the reset GPIO for the USB2517 USB hub. As we currently don't have
dt bindings to describe a HUB reset, let's keep using the regulator approach.

Rename the regulator to 'reg_hub_reset' to better describe its function and bind
it with the USB host1 port instead.

USB host support has been introduced by commit 9bf206a9 ("ARM: dts:
imx51-babbage: Add USB Host1 support"), which landed in 3.16 and it seems that
USB has only been functional due to previous bootloader initialization.

With this patch applied we can get USB host to work without relying on the
bootloader.

Cc: <stable@vger.kernel.org> # 3.16+
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
parent 7c168ed8
...@@ -127,24 +127,12 @@ regulators { ...@@ -127,24 +127,12 @@ regulators {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
reg_usbh1_vbus: regulator@0 { reg_hub_reset: regulator@0 {
compatible = "regulator-fixed";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbh1reg>;
reg = <0>;
regulator-name = "usbh1_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio2 5 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
reg_usbotg_vbus: regulator@1 {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbotgreg>; pinctrl-0 = <&pinctrl_usbotgreg>;
reg = <1>; reg = <0>;
regulator-name = "usbotg_vbus"; regulator-name = "hub_reset";
regulator-min-microvolt = <5000000>; regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>; regulator-max-microvolt = <5000000>;
gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>; gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>;
...@@ -176,6 +164,7 @@ usbh1phy: usbh1phy@0 { ...@@ -176,6 +164,7 @@ usbh1phy: usbh1phy@0 {
reg = <0>; reg = <0>;
clocks = <&clks IMX5_CLK_DUMMY>; clocks = <&clks IMX5_CLK_DUMMY>;
clock-names = "main_clk"; clock-names = "main_clk";
reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
}; };
}; };
}; };
...@@ -419,7 +408,7 @@ &uart3 { ...@@ -419,7 +408,7 @@ &uart3 {
&usbh1 { &usbh1 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbh1>; pinctrl-0 = <&pinctrl_usbh1>;
vbus-supply = <&reg_usbh1_vbus>; vbus-supply = <&reg_hub_reset>;
fsl,usbphy = <&usbh1phy>; fsl,usbphy = <&usbh1phy>;
phy_type = "ulpi"; phy_type = "ulpi";
status = "okay"; status = "okay";
...@@ -429,7 +418,6 @@ &usbotg { ...@@ -429,7 +418,6 @@ &usbotg {
dr_mode = "otg"; dr_mode = "otg";
disable-over-current; disable-over-current;
phy_type = "utmi_wide"; phy_type = "utmi_wide";
vbus-supply = <&reg_usbotg_vbus>;
status = "okay"; status = "okay";
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment