Message ID | 1390555724-9779-1-git-send-email-ashutosh.s@phytec.in (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Jan 24, 2014 at 09:28:44AM +0000, Ashutosh singh wrote: > This patch adds support for USB_OTG on Phytec phyFLEX-i.MX6 Quad module. > > Signed-off-by: Ashutosh singh <ashutosh.s@phytec.in> > --- > arch/arm/boot/dts/imx6q-phytec-pbab01.dts | 4 ++++ > arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi | 22 ++++++++++++++++++++++ > 2 files changed, 26 insertions(+) > > diff --git a/arch/arm/boot/dts/imx6q-phytec-pbab01.dts b/arch/arm/boot/dts/imx6q-phytec-pbab01.dts > index 7d37ec6..39e69bd 100644 > --- a/arch/arm/boot/dts/imx6q-phytec-pbab01.dts > +++ b/arch/arm/boot/dts/imx6q-phytec-pbab01.dts > @@ -32,3 +32,7 @@ > &usdhc3 { > status = "okay"; > }; > + > +&usbotg { > + status = "okay"; > +}; > diff --git a/arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi b/arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi > index 1a3b50d..dcb1d59 100644 > --- a/arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi > +++ b/arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi > @@ -18,6 +18,19 @@ > memory { > reg = <0x10000000 0x80000000>; > }; > + > + regulators { > + compatible = "simple-bus"; This is _not_ a simple bus. It doesn't have the required ranges property. Why do these need to be in a regulators container node? We don't group dma controllers under a dmas node, or uarts under a uarts node. > + > + reg_usb_otg_vbus: usb_otg_vbus { > + compatible = "regulator-fixed"; > + regulator-name = "usb_otg_vbus"; > + regulator-min-microvolt = <5000000>; > + regulator-max-microvolt = <5000000>; > + gpio = <&gpio4 15 0>; > + enable-active-low; > + }; > + }; > }; Thanks, Mark.
On Fri, Jan 24, 2014 at 11:50:05AM +0000, Mark Rutland wrote: > > @@ -18,6 +18,19 @@ > > memory { > > reg = <0x10000000 0x80000000>; > > }; > > + > > + regulators { > > + compatible = "simple-bus"; > > This is _not_ a simple bus. It doesn't have the required ranges > property. Maybe the real question is that if the required ranges property is missing, why kernel still accepts it as a simple bus and populate the devices under it? > > Why do these need to be in a regulators container node? We don't group > dma controllers under a dmas node, or uarts under a uarts node. Grouping fixed clocks under 'clocks' and fixed regulators under 'regulators' is a common pattern which can be found on most of the ARM dts files. Shawn > > > + > > + reg_usb_otg_vbus: usb_otg_vbus { > > + compatible = "regulator-fixed"; > > + regulator-name = "usb_otg_vbus"; > > + regulator-min-microvolt = <5000000>; > > + regulator-max-microvolt = <5000000>; > > + gpio = <&gpio4 15 0>; > > + enable-active-low; > > + }; > > + }; > > }; > > Thanks, > Mark.
Please add Phytec phyFLEX-i.MX6 to the subject. I assumed some SoC specific changes here. Sascha On Fri, Jan 24, 2014 at 02:58:44PM +0530, Ashutosh singh wrote: > This patch adds support for USB_OTG on Phytec phyFLEX-i.MX6 Quad module. > > Signed-off-by: Ashutosh singh <ashutosh.s@phytec.in> > --- > arch/arm/boot/dts/imx6q-phytec-pbab01.dts | 4 ++++ > arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi | 22 ++++++++++++++++++++++ > 2 files changed, 26 insertions(+) > > diff --git a/arch/arm/boot/dts/imx6q-phytec-pbab01.dts b/arch/arm/boot/dts/imx6q-phytec-pbab01.dts > index 7d37ec6..39e69bd 100644 > --- a/arch/arm/boot/dts/imx6q-phytec-pbab01.dts > +++ b/arch/arm/boot/dts/imx6q-phytec-pbab01.dts > @@ -32,3 +32,7 @@ > &usdhc3 { > status = "okay"; > }; > + > +&usbotg { > + status = "okay"; > +}; > diff --git a/arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi b/arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi > index 1a3b50d..dcb1d59 100644 > --- a/arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi > +++ b/arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi > @@ -18,6 +18,19 @@ > memory { > reg = <0x10000000 0x80000000>; > }; > + > + regulators { > + compatible = "simple-bus"; > + > + reg_usb_otg_vbus: usb_otg_vbus { > + compatible = "regulator-fixed"; > + regulator-name = "usb_otg_vbus"; > + regulator-min-microvolt = <5000000>; > + regulator-max-microvolt = <5000000>; > + gpio = <&gpio4 15 0>; > + enable-active-low; > + }; > + }; > }; > > &ecspi3 { > @@ -134,6 +147,7 @@ > MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000 > MX6QDL_PAD_DISP0_DAT3__GPIO4_IO24 0x80000000 /* SPI NOR chipselect */ > MX6QDL_PAD_DI0_PIN15__GPIO4_IO17 0x80000000 /* PMIC interrupt */ > + MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x80000000 /* USB_OTG_PWR_EN */ > >; > }; > }; > @@ -178,3 +192,11 @@ > wp-gpios = <&gpio1 29 0>; > status = "disabled"; > }; > + > +&usbotg { > + vbus-supply = <®_usb_otg_vbus>; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_usbotg_1>; > + disable-over-current; > + status = "disabled"; > +}; > -- > 1.7.9.5 > > -- > To unsubscribe from this list: send the line "unsubscribe devicetree" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >
diff --git a/arch/arm/boot/dts/imx6q-phytec-pbab01.dts b/arch/arm/boot/dts/imx6q-phytec-pbab01.dts index 7d37ec6..39e69bd 100644 --- a/arch/arm/boot/dts/imx6q-phytec-pbab01.dts +++ b/arch/arm/boot/dts/imx6q-phytec-pbab01.dts @@ -32,3 +32,7 @@ &usdhc3 { status = "okay"; }; + +&usbotg { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi b/arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi index 1a3b50d..dcb1d59 100644 --- a/arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi +++ b/arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi @@ -18,6 +18,19 @@ memory { reg = <0x10000000 0x80000000>; }; + + regulators { + compatible = "simple-bus"; + + reg_usb_otg_vbus: usb_otg_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_otg_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio4 15 0>; + enable-active-low; + }; + }; }; &ecspi3 { @@ -134,6 +147,7 @@ MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000 MX6QDL_PAD_DISP0_DAT3__GPIO4_IO24 0x80000000 /* SPI NOR chipselect */ MX6QDL_PAD_DI0_PIN15__GPIO4_IO17 0x80000000 /* PMIC interrupt */ + MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x80000000 /* USB_OTG_PWR_EN */ >; }; }; @@ -178,3 +192,11 @@ wp-gpios = <&gpio1 29 0>; status = "disabled"; }; + +&usbotg { + vbus-supply = <®_usb_otg_vbus>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbotg_1>; + disable-over-current; + status = "disabled"; +};
This patch adds support for USB_OTG on Phytec phyFLEX-i.MX6 Quad module. Signed-off-by: Ashutosh singh <ashutosh.s@phytec.in> --- arch/arm/boot/dts/imx6q-phytec-pbab01.dts | 4 ++++ arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+)