[PATCH 2/2] ARM: dts: imx6q-udoo: Add USB host support

2013-11-13 Thread Fabio Estevam
From: Fabio Estevam 

Udoo board has USBH1 port connected to a USB2514 hub.

Add support for it.

Signed-off-by: Fabio Estevam 
---
 arch/arm/boot/dts/imx6q-udoo.dts | 34 ++
 1 file changed, 34 insertions(+)

diff --git a/arch/arm/boot/dts/imx6q-udoo.dts b/arch/arm/boot/dts/imx6q-udoo.dts
index 1c7f7a1..109b997 100644
--- a/arch/arm/boot/dts/imx6q-udoo.dts
+++ b/arch/arm/boot/dts/imx6q-udoo.dts
@@ -19,6 +19,23 @@
memory {
reg = <0x1000 0x4000>;
};
+
+   regulators {
+   compatible = "simple-bus";
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   reg_usb_h1_vbus: regulator@0 {
+   compatible = "regulator-fixed";
+   reg = <0>;
+   regulator-name = "usb_h1_vbus";
+   regulator-min-microvolt = <500>;
+   regulator-max-microvolt = <500>;
+   enable-active-high;
+   startup-delay-us = <2>; /* USB2415 requires a POR of 1 
us minimum */
+   gpio = <&gpio7 12 0>;
+   };
+   };
 };
 
 &fec {
@@ -29,7 +46,17 @@
 };
 
 &iomuxc {
+   pinctrl-names = "default";
+   pinctrl-0 = <&pinctrl_hog>;
+
imx6q-udoo {
+   pinctrl_hog: hoggrp {
+   fsl,pins = <
+   MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x8000
+   MX6QDL_PAD_NANDF_CS2__CCM_CLKO2 0x130b0
+   >;
+   };
+
pinctrl_enet: enetgrp {
fsl,pins = ;
};
@@ -54,6 +81,13 @@
status = "okay";
 };
 
+&usbh1 {
+   vbus-supply = <®_usb_h1_vbus>;
+   clocks = <&clks 201>;
+   clock-names = "phy";
+   status = "okay";
+};
+
 &usdhc3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc3>;
-- 
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] ARM: dts: imx6q-udoo: Add USB host support

2013-12-02 Thread Mark Rutland
On Thu, Nov 14, 2013 at 02:09:47AM +, Fabio Estevam wrote:
> From: Fabio Estevam 
> 
> Udoo board has USBH1 port connected to a USB2514 hub.
> 
> Add support for it.
> 
> Signed-off-by: Fabio Estevam 
> ---
>  arch/arm/boot/dts/imx6q-udoo.dts | 34 ++
>  1 file changed, 34 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/imx6q-udoo.dts 
> b/arch/arm/boot/dts/imx6q-udoo.dts
> index 1c7f7a1..109b997 100644
> --- a/arch/arm/boot/dts/imx6q-udoo.dts
> +++ b/arch/arm/boot/dts/imx6q-udoo.dts
> @@ -19,6 +19,23 @@
>   memory {
>   reg = <0x1000 0x4000>;
>   };
> +
> + regulators {
> + compatible = "simple-bus";
> + #address-cells = <1>;
> + #size-cells = <0>;
> +

This should have a ranges property, or it's not a simple-bus.

Why do you even need this anyway? The regulators can live under the root
quite happily.

Thanks,
Mark.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] ARM: dts: imx6q-udoo: Add USB host support

2013-12-02 Thread Shawn Guo
On Mon, Dec 02, 2013 at 11:53:03AM +, Mark Rutland wrote:
> On Thu, Nov 14, 2013 at 02:09:47AM +, Fabio Estevam wrote:
> > From: Fabio Estevam 
> > 
> > Udoo board has USBH1 port connected to a USB2514 hub.
> > 
> > Add support for it.
> > 
> > Signed-off-by: Fabio Estevam 
> > ---
> >  arch/arm/boot/dts/imx6q-udoo.dts | 34 ++
> >  1 file changed, 34 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/imx6q-udoo.dts 
> > b/arch/arm/boot/dts/imx6q-udoo.dts
> > index 1c7f7a1..109b997 100644
> > --- a/arch/arm/boot/dts/imx6q-udoo.dts
> > +++ b/arch/arm/boot/dts/imx6q-udoo.dts
> > @@ -19,6 +19,23 @@
> > memory {
> > reg = <0x1000 0x4000>;
> > };
> > +
> > +   regulators {
> > +   compatible = "simple-bus";
> > +   #address-cells = <1>;
> > +   #size-cells = <0>;
> > +
> 
> This should have a ranges property, or it's not a simple-bus.

You're right.  It's not a real bus.  We're having node 'regulators' be a
container for all those fixed regulators, so that we can put them
together and name them in the generic regulator@num way.

Since kernel does not refuse to probe 'simple-bus' that does not have
the 'ranges' property, we forgot about it.  This is the common pattern
used by a lot of existing DTS files.  If we want to improve the thing,
we may need to consider it as a global move.

Shawn

> 
> Why do you even need this anyway? The regulators can live under the root
> quite happily.

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html