diff mbox

[1/4] ARM: cfa10036: Add USB0 OTG port

Message ID 1371131025-12200-2-git-send-email-maxime.ripard@free-electrons.com (mailing list archive)
State New, archived
Headers show

Commit Message

Maxime Ripard June 13, 2013, 1:43 p.m. UTC
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 arch/arm/boot/dts/imx28-cfa10036.dts | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

Comments

Arnd Bergmann June 13, 2013, 10:06 p.m. UTC | #1
On Thursday 13 June 2013 15:43:42 Maxime Ripard wrote:
> +
> +       ahb@80080000 {
> +               usb0: usb@80080000 {
> +                       pinctrl-names = "default";
> +                       pinctrl-0 = <&usb0_otg_cfa10036>;
> +                       status = "okay";
>                 };
>         };
> 

The patches all look good, just one trivial comment about the fragment above:

There is already a "usb0" label in the imx28.dtsi file for the same
node. When you refer to the node from a board.dts file, either leave
out the redundant label, or use it to simplify the statements above
to the brief version:

	&usb0 {
		pinctrl-names = "default";
		pinctrl-0 = <&usb0_otg_cfa10036>;
		status = "okay";
	};


	Arnd
Shawn Guo June 14, 2013, 6:30 a.m. UTC | #2
On Fri, Jun 14, 2013 at 12:06:51AM +0200, Arnd Bergmann wrote:
> On Thursday 13 June 2013 15:43:42 Maxime Ripard wrote:
> > +
> > +       ahb@80080000 {
> > +               usb0: usb@80080000 {
> > +                       pinctrl-names = "default";
> > +                       pinctrl-0 = <&usb0_otg_cfa10036>;
> > +                       status = "okay";
> >                 };
> >         };
> > 
> 
> The patches all look good, just one trivial comment about the fragment above:
> 
> There is already a "usb0" label in the imx28.dtsi file for the same
> node. When you refer to the node from a board.dts file, either leave
> out the redundant label, or use it to simplify the statements above
> to the brief version:
> 
> 	&usb0 {
> 		pinctrl-names = "default";
> 		pinctrl-0 = <&usb0_otg_cfa10036>;
> 		status = "okay";
> 	};

Yeah, I moved all imx board level dts files to use this.  But I was told
by Olof that the change does not gain too much and looks like a churn.
That's why I haven't made the same move for mxs.  So I will remove the
redundant label when applying this patch.

Shawn
Shawn Guo June 14, 2013, 6:39 a.m. UTC | #3
On Fri, Jun 14, 2013 at 02:30:53PM +0800, Shawn Guo wrote:
> On Fri, Jun 14, 2013 at 12:06:51AM +0200, Arnd Bergmann wrote:
> > On Thursday 13 June 2013 15:43:42 Maxime Ripard wrote:
> > > +
> > > +       ahb@80080000 {
> > > +               usb0: usb@80080000 {
> > > +                       pinctrl-names = "default";
> > > +                       pinctrl-0 = <&usb0_otg_cfa10036>;
> > > +                       status = "okay";
> > >                 };
> > >         };
> > > 
> > 
> > The patches all look good, just one trivial comment about the fragment above:
> > 
> > There is already a "usb0" label in the imx28.dtsi file for the same
> > node. When you refer to the node from a board.dts file, either leave
> > out the redundant label, or use it to simplify the statements above
> > to the brief version:
> > 
> > 	&usb0 {
> > 		pinctrl-names = "default";
> > 		pinctrl-0 = <&usb0_otg_cfa10036>;
> > 		status = "okay";
> > 	};
> 
> Yeah, I moved all imx board level dts files to use this.  But I was told
> by Olof that the change does not gain too much and looks like a churn.
> That's why I haven't made the same move for mxs.  So I will remove the
> redundant label when applying this patch.

I would have the label stay there, because I found it's there like a
comment telling the controller instance.

Shawn
Maxime Ripard June 14, 2013, 11:02 a.m. UTC | #4
Hi Arnd,

On Fri, Jun 14, 2013 at 12:06:51AM +0200, Arnd Bergmann wrote:
> On Thursday 13 June 2013 15:43:42 Maxime Ripard wrote:
> > +
> > +       ahb@80080000 {
> > +               usb0: usb@80080000 {
> > +                       pinctrl-names = "default";
> > +                       pinctrl-0 = <&usb0_otg_cfa10036>;
> > +                       status = "okay";
> >                 };
> >         };
> > 
> 
> The patches all look good, just one trivial comment about the fragment above:
> 
> There is already a "usb0" label in the imx28.dtsi file for the same
> node. When you refer to the node from a board.dts file, either leave
> out the redundant label, or use it to simplify the statements above
> to the brief version:
> 
> 	&usb0 {
> 		pinctrl-names = "default";
> 		pinctrl-0 = <&usb0_otg_cfa10036>;
> 		status = "okay";
> 	};
> 

Good to know, thanks!

Maxime
diff mbox

Patch

diff --git a/arch/arm/boot/dts/imx28-cfa10036.dts b/arch/arm/boot/dts/imx28-cfa10036.dts
index 1594694..eae9c97 100644
--- a/arch/arm/boot/dts/imx28-cfa10036.dts
+++ b/arch/arm/boot/dts/imx28-cfa10036.dts
@@ -45,6 +45,17 @@ 
 					fsl,voltage = <1>;
 					fsl,pull-up = <0>;
 				};
+
+				usb0_otg_cfa10036: otg-10036@0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						0x0142 /* MX28_PAD_GPMI_READY0__USB0_ID */
+					>;
+					fsl,drive-strength = <0>;
+					fsl,voltage = <1>;
+					fsl,pull-up = <0>;
+				};
+
 			};
 
 			ssp0: ssp@80010000 {
@@ -82,6 +93,18 @@ 
 					reset-gpios = <&gpio2 7 0>;
 				};
 			};
+
+			usbphy0: usbphy@8007c000 {
+				status = "okay";
+			};
+		};
+	};
+
+	ahb@80080000 {
+		usb0: usb@80080000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&usb0_otg_cfa10036>;
+			status = "okay";
 		};
 	};