diff mbox series

[v4,4/4] doc: usb: ci-hdrc-usb2: Add pinctrl properties for HSIC pin groups

Message ID 20181209053746.24967-5-peter.chen@nxp.com
State Changes Requested, archived
Headers show
Series usb: chipidea: imx: add HSIC support | expand

Checks

Context Check Description
robh/checkpatch success

Commit Message

Peter Chen Dec. 9, 2018, 5:40 a.m. UTC
For USB HSIC, the data and strobe pin needs to be pulled down
at default, we consider it as "idle" state. When the USB host
is ready to be used, the strobe pin needs to be pulled up,
we consider it as "active" state.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 .../devicetree/bindings/usb/ci-hdrc-usb2.txt       | 34 +++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)

Comments

Frieder Schrempf Dec. 10, 2018, 8:09 a.m. UTC | #1
Hi Peter,

On 09.12.18 06:40, Peter Chen wrote:
> For USB HSIC, the data and strobe pin needs to be pulled down
> at default, we consider it as "idle" state. When the USB host
> is ready to be used, the strobe pin needs to be pulled up,
> we consider it as "active" state.
> 
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
>   .../devicetree/bindings/usb/ci-hdrc-usb2.txt       | 34 +++++++++++++++++++++-
>   1 file changed, 33 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
> index 529e51879fb2..a6c66f05601c 100644
> --- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
> +++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
> @@ -80,7 +80,10 @@ Optional properties:
>     controller. It's expected that a mux state of 0 indicates device mode and a
>     mux state of 1 indicates host mode.
>   - mux-control-names: Shall be "usb_switch" if mux-controls is specified.
> -- pinctrl-names: Names for optional pin modes in "default", "host", "device"
> +- pinctrl-names: Names for optional pin modes in "default", "host", "device".
> +  In case of HSIC-mode, "idle" and "active" pin modes are mandatory. In this
> +  case, the "idle" state needs to pull down the data and strobe pin
> +  and the "active" state needs to pull up the strobe pin.
>   - pinctrl-n: alternate pin modes
>   
>   i.mx specific properties
> @@ -110,4 +113,33 @@ Example:
>   		phy-clkgate-delay-us = <400>;
>   		mux-controls = <&usb_switch>;
>   		mux-control-names = "usb_switch";
> +		pinctrl-names = "idle", "active";
> +		pinctrl-0 = <&pinctrl_usbh2_1>;
> +		pinctrl-1 = <&pinctrl_usbh2_2>;
> +	};

With a separate example for HSIC, we should probably leave the standard 
example unchanged (I think that was one of the reasons for adding a 
separate example).

Regards,
Frieder

> +
> +Example for HSIC:
> +
> +	usb@2184400 {
> +		compatible = "fsl,imx6q-usb", "fsl,imx27-usb";
> +		reg = <0x02184400 0x200>;
> +		interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&clks IMX6QDL_CLK_USBOH3>;
> +		fsl,usbphy = <&usbphynop1>;
> +		fsl,usbmisc = <&usbmisc 2>;
> +		phy_type = "hsic";
> +		dr_mode = "host";
> +		ahb-burst-config = <0x0>;
> +		tx-burst-size-dword = <0x10>;
> +		rx-burst-size-dword = <0x10>;
> +		pinctrl-names = "idle", "active";
> +		pinctrl-0 = <&pinctrl_usbh2_idle>;
> +		pinctrl-1 = <&pinctrl_usbh2_active>;
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		usbnet: smsc@1 {
> +			compatible = "usb424,9730";
> +			reg = <1>;
> +		};
>   	};
>
Fabio Estevam Dec. 10, 2018, 10:01 a.m. UTC | #2
On Mon, Dec 10, 2018 at 6:09 AM Schrempf Frieder
<frieder.schrempf@kontron.de> wrote:

> With a separate example for HSIC, we should probably leave the standard
> example unchanged (I think that was one of the reasons for adding a
> separate example).

Yes, I agree. That would make the binding doc clearer.

Thanks
Peter Chen Dec. 11, 2018, 1:14 a.m. UTC | #3
> 
> On Mon, Dec 10, 2018 at 6:09 AM Schrempf Frieder
> <frieder.schrempf@kontron.de> wrote:
> 
> > With a separate example for HSIC, we should probably leave the
> > standard example unchanged (I think that was one of the reasons for
> > adding a separate example).
> 
> Yes, I agree. That would make the binding doc clearer.
> 
> Thanks

My fault, I forgot delete the old changes.

Peter
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
index 529e51879fb2..a6c66f05601c 100644
--- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
+++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
@@ -80,7 +80,10 @@  Optional properties:
   controller. It's expected that a mux state of 0 indicates device mode and a
   mux state of 1 indicates host mode.
 - mux-control-names: Shall be "usb_switch" if mux-controls is specified.
-- pinctrl-names: Names for optional pin modes in "default", "host", "device"
+- pinctrl-names: Names for optional pin modes in "default", "host", "device".
+  In case of HSIC-mode, "idle" and "active" pin modes are mandatory. In this
+  case, the "idle" state needs to pull down the data and strobe pin
+  and the "active" state needs to pull up the strobe pin.
 - pinctrl-n: alternate pin modes
 
 i.mx specific properties
@@ -110,4 +113,33 @@  Example:
 		phy-clkgate-delay-us = <400>;
 		mux-controls = <&usb_switch>;
 		mux-control-names = "usb_switch";
+		pinctrl-names = "idle", "active";
+		pinctrl-0 = <&pinctrl_usbh2_1>;
+		pinctrl-1 = <&pinctrl_usbh2_2>;
+	};
+
+Example for HSIC:
+
+	usb@2184400 {
+		compatible = "fsl,imx6q-usb", "fsl,imx27-usb";
+		reg = <0x02184400 0x200>;
+		interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&clks IMX6QDL_CLK_USBOH3>;
+		fsl,usbphy = <&usbphynop1>;
+		fsl,usbmisc = <&usbmisc 2>;
+		phy_type = "hsic";
+		dr_mode = "host";
+		ahb-burst-config = <0x0>;
+		tx-burst-size-dword = <0x10>;
+		rx-burst-size-dword = <0x10>;
+		pinctrl-names = "idle", "active";
+		pinctrl-0 = <&pinctrl_usbh2_idle>;
+		pinctrl-1 = <&pinctrl_usbh2_active>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		usbnet: smsc@1 {
+			compatible = "usb424,9730";
+			reg = <1>;
+		};
 	};