linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/1] arm64: dts: tqma8mpql: add USB DR support
@ 2022-09-05  7:37 Alexander Stein
  2022-09-05 12:27 ` Fabio Estevam
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Alexander Stein @ 2022-09-05  7:37 UTC (permalink / raw)
  To: Shawn Guo, Sascha Hauer
  Cc: Alexander Stein, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, devicetree, linux-arm-kernel, Tim Harvey, Jun Li

Add support for USB DR on USB1 interface. Host/Device detection is done
using the usb-role-switch connector.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
Changes in v3:
* Moved pinctrl to USB glue layer node
* Ordered nodes alphabetically

Changes in v2:
* Split from previous series
* For now enable USB OTG only

 .../freescale/imx8mp-tqma8mpql-mba8mpxl.dts   | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts
index d8ca52976170..88579e8ac93b 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts
@@ -139,6 +139,13 @@ reg_vcc_3v3: regulator-3v3 {
 		regulator-max-microvolt = <3300000>;
 	};
 
+	reg_vcc_5v0: regulator-5v0 {
+		compatible = "regulator-fixed";
+		regulator-name = "VCC_5V0";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+	};
+
 	reserved-memory {
 		#address-cells = <2>;
 		#size-cells = <2>;
@@ -445,6 +452,38 @@ &uart4 {
 	status = "okay";
 };
 
+&usb3_0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_usb0>;
+	fsl,over-current-active-low;
+	status = "okay";
+};
+
+&usb3_phy0 {
+	vbus-supply = <&reg_vcc_5v0>;
+	status = "okay";
+};
+
+&usb_dwc3_0 {
+	/* dual role is implemented, but not a full featured OTG */
+	hnp-disable;
+	srp-disable;
+	adp-disable;
+	dr_mode = "otg";
+	usb-role-switch;
+	role-switch-default-mode = "peripheral";
+	status = "okay";
+
+	connector {
+		compatible = "gpio-usb-b-connector", "usb-b-connector";
+		type = "micro";
+		label = "X29";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_usbcon0>;
+		id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+	};
+};
+
 &usdhc2 {
 	pinctrl-names = "default", "state_100mhz", "state_200mhz";
 	pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
@@ -666,6 +705,15 @@ pinctrl_uart4: uart4grp {
 			   <MX8MP_IOMUXC_UART4_TXD__UART4_DCE_TX	0x140>;
 	};
 
+	pinctrl_usb0: usb0grp {
+		fsl,pins = <MX8MP_IOMUXC_GPIO1_IO13__USB1_OTG_OC	0x1c0>,
+			   <MX8MP_IOMUXC_GPIO1_IO12__USB1_OTG_PWR	0x1c0>;
+	};
+
+	pinctrl_usbcon0: usb0congrp {
+		fsl,pins = <MX8MP_IOMUXC_GPIO1_IO10__GPIO1_IO10		0x1c0>;
+	};
+
 	pinctrl_usdhc2: usdhc2grp {
 		fsl,pins = <MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK		0x192>,
 			   <MX8MP_IOMUXC_SD2_CMD__USDHC2_CMD		0x1d2>,
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 1/1] arm64: dts: tqma8mpql: add USB DR support
  2022-09-05  7:37 [PATCH v3 1/1] arm64: dts: tqma8mpql: add USB DR support Alexander Stein
@ 2022-09-05 12:27 ` Fabio Estevam
  2022-09-06  2:10 ` Jun Li
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Fabio Estevam @ 2022-09-05 12:27 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, NXP Linux Team,
	devicetree, linux-arm-kernel, Tim Harvey, Jun Li

On Mon, Sep 5, 2022 at 4:37 AM Alexander Stein
<alexander.stein@ew.tq-group.com> wrote:
>
> Add support for USB DR on USB1 interface. Host/Device detection is done
> using the usb-role-switch connector.
>
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>

Reviewed-by: Fabio Estevam <festevam@gmail.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH v3 1/1] arm64: dts: tqma8mpql: add USB DR support
  2022-09-05  7:37 [PATCH v3 1/1] arm64: dts: tqma8mpql: add USB DR support Alexander Stein
  2022-09-05 12:27 ` Fabio Estevam
@ 2022-09-06  2:10 ` Jun Li
  2022-09-06  2:15 ` Shawn Guo
  2022-10-14 14:18 ` Ahmad Fatoum
  3 siblings, 0 replies; 10+ messages in thread
From: Jun Li @ 2022-09-06  2:10 UTC (permalink / raw)
  To: Alexander Stein, Shawn Guo, Sascha Hauer
  Cc: Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx, devicetree,
	linux-arm-kernel, tharvey



> -----Original Message-----
> From: Alexander Stein <alexander.stein@ew.tq-group.com>
> Sent: Monday, September 5, 2022 3:38 PM
> To: Shawn Guo <shawnguo@kernel.org>; Sascha Hauer <s.hauer@pengutronix.de>
> Cc: Alexander Stein <alexander.stein@ew.tq-group.com>; Pengutronix Kernel
> Team <kernel@pengutronix.de>; Fabio Estevam <festevam@gmail.com>;
> dl-linux-imx <linux-imx@nxp.com>; devicetree@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org; tharvey@gateworks.com; Jun Li
> <jun.li@nxp.com>
> Subject: [PATCH v3 1/1] arm64: dts: tqma8mpql: add USB DR support
> 
> Add support for USB DR on USB1 interface. Host/Device detection is done using
> the usb-role-switch connector.
> 
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>

Reviewed-by: Li Jun <jun.li@nxp.com>

> ---
> Changes in v3:
> * Moved pinctrl to USB glue layer node
> * Ordered nodes alphabetically
> 
> Changes in v2:
> * Split from previous series
> * For now enable USB OTG only
> 
>  .../freescale/imx8mp-tqma8mpql-mba8mpxl.dts   | 48 +++++++++++++++++++
>  1 file changed, 48 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts
> b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts
> index d8ca52976170..88579e8ac93b 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts
> @@ -139,6 +139,13 @@ reg_vcc_3v3: regulator-3v3 {
>  		regulator-max-microvolt = <3300000>;
>  	};
> 
> +	reg_vcc_5v0: regulator-5v0 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "VCC_5V0";
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +	};
> +
>  	reserved-memory {
>  		#address-cells = <2>;
>  		#size-cells = <2>;
> @@ -445,6 +452,38 @@ &uart4 {
>  	status = "okay";
>  };
> 
> +&usb3_0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_usb0>;
> +	fsl,over-current-active-low;
> +	status = "okay";
> +};
> +
> +&usb3_phy0 {
> +	vbus-supply = <&reg_vcc_5v0>;
> +	status = "okay";
> +};
> +
> +&usb_dwc3_0 {
> +	/* dual role is implemented, but not a full featured OTG */
> +	hnp-disable;
> +	srp-disable;
> +	adp-disable;
> +	dr_mode = "otg";
> +	usb-role-switch;
> +	role-switch-default-mode = "peripheral";
> +	status = "okay";
> +
> +	connector {
> +		compatible = "gpio-usb-b-connector", "usb-b-connector";
> +		type = "micro";
> +		label = "X29";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_usbcon0>;
> +		id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
> +	};
> +};
> +
>  &usdhc2 {
>  	pinctrl-names = "default", "state_100mhz", "state_200mhz";
>  	pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>; @@ -666,6
> +705,15 @@ pinctrl_uart4: uart4grp {
>  			   <MX8MP_IOMUXC_UART4_TXD__UART4_DCE_TX	0x140>;
>  	};
> 
> +	pinctrl_usb0: usb0grp {
> +		fsl,pins = <MX8MP_IOMUXC_GPIO1_IO13__USB1_OTG_OC	0x1c0>,
> +			   <MX8MP_IOMUXC_GPIO1_IO12__USB1_OTG_PWR	0x1c0>;
> +	};
> +
> +	pinctrl_usbcon0: usb0congrp {
> +		fsl,pins = <MX8MP_IOMUXC_GPIO1_IO10__GPIO1_IO10		0x1c0>;
> +	};
> +
>  	pinctrl_usdhc2: usdhc2grp {
>  		fsl,pins = <MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK		0x192>,
>  			   <MX8MP_IOMUXC_SD2_CMD__USDHC2_CMD		0x1d2>,
> --
> 2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 1/1] arm64: dts: tqma8mpql: add USB DR support
  2022-09-05  7:37 [PATCH v3 1/1] arm64: dts: tqma8mpql: add USB DR support Alexander Stein
  2022-09-05 12:27 ` Fabio Estevam
  2022-09-06  2:10 ` Jun Li
@ 2022-09-06  2:15 ` Shawn Guo
  2022-10-14 14:18 ` Ahmad Fatoum
  3 siblings, 0 replies; 10+ messages in thread
From: Shawn Guo @ 2022-09-06  2:15 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, devicetree, linux-arm-kernel, Tim Harvey, Jun Li

On Mon, Sep 05, 2022 at 09:37:30AM +0200, Alexander Stein wrote:
> Add support for USB DR on USB1 interface. Host/Device detection is done
> using the usb-role-switch connector.
> 
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>

Applied, thanks!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 1/1] arm64: dts: tqma8mpql: add USB DR support
  2022-09-05  7:37 [PATCH v3 1/1] arm64: dts: tqma8mpql: add USB DR support Alexander Stein
                   ` (2 preceding siblings ...)
  2022-09-06  2:15 ` Shawn Guo
@ 2022-10-14 14:18 ` Ahmad Fatoum
  2022-10-17 19:30   ` Tim Harvey
  3 siblings, 1 reply; 10+ messages in thread
From: Ahmad Fatoum @ 2022-10-14 14:18 UTC (permalink / raw)
  To: Alexander Stein, Shawn Guo, Sascha Hauer
  Cc: devicetree, Tim Harvey, NXP Linux Team, Pengutronix Kernel Team,
	Fabio Estevam, linux-arm-kernel, Jun Li

Hello Alexander,

On 05.09.22 09:37, Alexander Stein wrote:
> +	pinctrl_usb0: usb0grp {
> +		fsl,pins = <MX8MP_IOMUXC_GPIO1_IO13__USB1_OTG_OC	0x1c0>,
> +			   <MX8MP_IOMUXC_GPIO1_IO12__USB1_OTG_PWR	0x1c0>;
> +	};
> +
> +	pinctrl_usbcon0: usb0congrp {
> +		fsl,pins = <MX8MP_IOMUXC_GPIO1_IO10__GPIO1_IO10		0x1c0>;
> +	};

I am wondering: You can mux for MX8MP_IOMUXC_GPIO1_IO10__USB1_OTG_ID,
why did you decide against using the hardware function here?

Cheers,
Ahmad

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 1/1] arm64: dts: tqma8mpql: add USB DR support
  2022-10-14 14:18 ` Ahmad Fatoum
@ 2022-10-17 19:30   ` Tim Harvey
  2022-10-17 19:40     ` Ahmad Fatoum
  2022-10-18  1:58     ` Jun Li
  0 siblings, 2 replies; 10+ messages in thread
From: Tim Harvey @ 2022-10-17 19:30 UTC (permalink / raw)
  To: Ahmad Fatoum
  Cc: Alexander Stein, Shawn Guo, Sascha Hauer, devicetree,
	NXP Linux Team, Pengutronix Kernel Team, Fabio Estevam,
	linux-arm-kernel, Jun Li

On Fri, Oct 14, 2022 at 7:18 AM Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:
>
> Hello Alexander,
>
> On 05.09.22 09:37, Alexander Stein wrote:
> > +     pinctrl_usb0: usb0grp {
> > +             fsl,pins = <MX8MP_IOMUXC_GPIO1_IO13__USB1_OTG_OC        0x1c0>,
> > +                        <MX8MP_IOMUXC_GPIO1_IO12__USB1_OTG_PWR       0x1c0>;
> > +     };
> > +
> > +     pinctrl_usbcon0: usb0congrp {
> > +             fsl,pins = <MX8MP_IOMUXC_GPIO1_IO10__GPIO1_IO10         0x1c0>;
> > +     };
>
> I am wondering: You can mux for MX8MP_IOMUXC_GPIO1_IO10__USB1_OTG_ID,
> why did you decide against using the hardware function here?
>

Ahmad,

The IMX8MP USB OTG_ID pins are internally not connected. I can't
recall where this is mentioned but due to this they can not be used to
select host/device mode.

Best Regards,

Tim

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 1/1] arm64: dts: tqma8mpql: add USB DR support
  2022-10-17 19:30   ` Tim Harvey
@ 2022-10-17 19:40     ` Ahmad Fatoum
  2022-10-18  2:07       ` Jun Li
  2022-10-18  1:58     ` Jun Li
  1 sibling, 1 reply; 10+ messages in thread
From: Ahmad Fatoum @ 2022-10-17 19:40 UTC (permalink / raw)
  To: Tim Harvey
  Cc: Alexander Stein, Shawn Guo, Sascha Hauer, devicetree,
	NXP Linux Team, Pengutronix Kernel Team, Fabio Estevam,
	linux-arm-kernel, Jun Li

Hello Tim,

On 17.10.22 21:30, Tim Harvey wrote:
> On Fri, Oct 14, 2022 at 7:18 AM Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:
>>
>> Hello Alexander,
>>
>> On 05.09.22 09:37, Alexander Stein wrote:
>>> +     pinctrl_usb0: usb0grp {
>>> +             fsl,pins = <MX8MP_IOMUXC_GPIO1_IO13__USB1_OTG_OC        0x1c0>,
>>> +                        <MX8MP_IOMUXC_GPIO1_IO12__USB1_OTG_PWR       0x1c0>;
>>> +     };
>>> +
>>> +     pinctrl_usbcon0: usb0congrp {
>>> +             fsl,pins = <MX8MP_IOMUXC_GPIO1_IO10__GPIO1_IO10         0x1c0>;
>>> +     };
>>
>> I am wondering: You can mux for MX8MP_IOMUXC_GPIO1_IO10__USB1_OTG_ID,
>> why did you decide against using the hardware function here?
>>
> 
> Ahmad,
> 
> The IMX8MP USB OTG_ID pins are internally not connected. I can't
> recall where this is mentioned but due to this they can not be used to
> select host/device mode.

Thanks for the info. Do you know if this issue exists with the i.MX8MN as
well? A colleague had trouble bringing up the OTG_ID HW function and I assume
it may be the same issue. I am unsure though, because the imx8mn-tqma8mqnl-mba8mx.dts
muxes the pad as OTG_ID.

Cheers,
Ahmad

> 
> Best Regards,
> 
> Tim
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH v3 1/1] arm64: dts: tqma8mpql: add USB DR support
  2022-10-17 19:30   ` Tim Harvey
  2022-10-17 19:40     ` Ahmad Fatoum
@ 2022-10-18  1:58     ` Jun Li
  1 sibling, 0 replies; 10+ messages in thread
From: Jun Li @ 2022-10-18  1:58 UTC (permalink / raw)
  To: tharvey, Ahmad Fatoum
  Cc: Alexander Stein, Shawn Guo, Sascha Hauer, devicetree,
	dl-linux-imx, Pengutronix Kernel Team, Fabio Estevam,
	linux-arm-kernel



> -----Original Message-----
> From: Tim Harvey <tharvey@gateworks.com>
> Sent: Tuesday, October 18, 2022 3:31 AM
> To: Ahmad Fatoum <a.fatoum@pengutronix.de>
> Cc: Alexander Stein <alexander.stein@ew.tq-group.com>; Shawn Guo
> <shawnguo@kernel.org>; Sascha Hauer <s.hauer@pengutronix.de>;
> devicetree@vger.kernel.org; dl-linux-imx <linux-imx@nxp.com>; Pengutronix
> Kernel Team <kernel@pengutronix.de>; Fabio Estevam <festevam@gmail.com>;
> linux-arm-kernel@lists.infradead.org; Jun Li <jun.li@nxp.com>
> Subject: Re: [PATCH v3 1/1] arm64: dts: tqma8mpql: add USB DR support
> 
> On Fri, Oct 14, 2022 at 7:18 AM Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:
> >
> > Hello Alexander,
> >
> > On 05.09.22 09:37, Alexander Stein wrote:
> > > +     pinctrl_usb0: usb0grp {
> > > +             fsl,pins = <MX8MP_IOMUXC_GPIO1_IO13__USB1_OTG_OC
> 0x1c0>,
> > > +                        <MX8MP_IOMUXC_GPIO1_IO12__USB1_OTG_PWR
> 0x1c0>;
> > > +     };
> > > +
> > > +     pinctrl_usbcon0: usb0congrp {
> > > +             fsl,pins = <MX8MP_IOMUXC_GPIO1_IO10__GPIO1_IO10
> 0x1c0>;
> > > +     };
> >
> > I am wondering: You can mux for MX8MP_IOMUXC_GPIO1_IO10__USB1_OTG_ID,
> > why did you decide against using the hardware function here?
> >
> 
> Ahmad,
> 
> The IMX8MP USB OTG_ID pins are internally not connected. I can't recall where
> this is mentioned but due to this they can not be used to select host/device
> mode.

There is no *OTG* block in iMX8MP HW due to dwc3 IP upgrade, the OTG ID pin
cannot generate a normal USB irq for host/device selection, instead, we can
use GPIO function to generate ID state change event for it, this is well
supported via usb-conn-gpio.c like this patch is using.

Li Jun
  
> 
> Best Regards,
> 
> Tim
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH v3 1/1] arm64: dts: tqma8mpql: add USB DR support
  2022-10-17 19:40     ` Ahmad Fatoum
@ 2022-10-18  2:07       ` Jun Li
  2022-10-24 13:46         ` Ahmad Fatoum
  0 siblings, 1 reply; 10+ messages in thread
From: Jun Li @ 2022-10-18  2:07 UTC (permalink / raw)
  To: Ahmad Fatoum, tharvey
  Cc: Alexander Stein, Shawn Guo, Sascha Hauer, devicetree,
	dl-linux-imx, Pengutronix Kernel Team, Fabio Estevam,
	linux-arm-kernel



> -----Original Message-----
> From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> Sent: Tuesday, October 18, 2022 3:41 AM
> To: tharvey@gateworks.com
> Cc: Alexander Stein <alexander.stein@ew.tq-group.com>; Shawn Guo
> <shawnguo@kernel.org>; Sascha Hauer <s.hauer@pengutronix.de>;
> devicetree@vger.kernel.org; dl-linux-imx <linux-imx@nxp.com>; Pengutronix
> Kernel Team <kernel@pengutronix.de>; Fabio Estevam <festevam@gmail.com>;
> linux-arm-kernel@lists.infradead.org; Jun Li <jun.li@nxp.com>
> Subject: Re: [PATCH v3 1/1] arm64: dts: tqma8mpql: add USB DR support
> 
> Hello Tim,
> 
> On 17.10.22 21:30, Tim Harvey wrote:
> > On Fri, Oct 14, 2022 at 7:18 AM Ahmad Fatoum <a.fatoum@pengutronix.de>
> wrote:
> >>
> >> Hello Alexander,
> >>
> >> On 05.09.22 09:37, Alexander Stein wrote:
> >>> +     pinctrl_usb0: usb0grp {
> >>> +             fsl,pins = <MX8MP_IOMUXC_GPIO1_IO13__USB1_OTG_OC
> 0x1c0>,
> >>> +                        <MX8MP_IOMUXC_GPIO1_IO12__USB1_OTG_PWR
> 0x1c0>;
> >>> +     };
> >>> +
> >>> +     pinctrl_usbcon0: usb0congrp {
> >>> +             fsl,pins = <MX8MP_IOMUXC_GPIO1_IO10__GPIO1_IO10
> 0x1c0>;
> >>> +     };
> >>
> >> I am wondering: You can mux for MX8MP_IOMUXC_GPIO1_IO10__USB1_OTG_ID,
> >> why did you decide against using the hardware function here?
> >>
> >
> > Ahmad,
> >
> > The IMX8MP USB OTG_ID pins are internally not connected. I can't
> > recall where this is mentioned but due to this they can not be used to
> > select host/device mode.
> 
> Thanks for the info. Do you know if this issue exists with the i.MX8MN as
> well? A colleague had trouble bringing up the OTG_ID HW function and I assume
> it may be the same issue. I am unsure though, because the
> imx8mn-tqma8mqnl-mba8mx.dts muxes the pad as OTG_ID.

No, iMX8MN is completely different IP(USB2 only) than iMX8MP, iMX8MN
has *OTG* inside so the ID functionality should be fine, what's the
trouble you colleague had?

Li Jun
 
> 
> Cheers,
> Ahmad
> 
> >
> > Best Regards,
> >
> > Tim
> >
> 
> 
> --
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       |
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.pe
> ngutronix.de%2F&amp;data=05%7C01%7Cjun.li%40nxp.com%7Cac32a99803dc4e710
> 4d408dab0777a15%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6380163244
> 44837508%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLC
> JBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=4TFBorG%2BucyYuy
> HrwhTDxjz4GV3%2FsCaHzx7i4cdw5Zw%3D&amp;reserved=0  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 1/1] arm64: dts: tqma8mpql: add USB DR support
  2022-10-18  2:07       ` Jun Li
@ 2022-10-24 13:46         ` Ahmad Fatoum
  0 siblings, 0 replies; 10+ messages in thread
From: Ahmad Fatoum @ 2022-10-24 13:46 UTC (permalink / raw)
  To: Jun Li, tharvey
  Cc: devicetree, Alexander Stein, Fabio Estevam, Sascha Hauer,
	dl-linux-imx, Pengutronix Kernel Team, Shawn Guo,
	linux-arm-kernel

Hello,

On 18.10.22 04:07, Jun Li wrote:
>> -----Original Message-----
>> From: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> Thanks for the info. Do you know if this issue exists with the i.MX8MN as
>> well? A colleague had trouble bringing up the OTG_ID HW function and I assume
>> it may be the same issue. I am unsure though, because the
>> imx8mn-tqma8mqnl-mba8mx.dts muxes the pad as OTG_ID.
> 
> No, iMX8MN is completely different IP(USB2 only) than iMX8MP, iMX8MN
> has *OTG* inside so the ID functionality should be fine, what's the
> trouble you colleague had?

I see. Problem was that changes to the OTG pins were not detected
on an i.MX8MN-based board, despite the colleague being sure that
OTG controller registers were set correctly.. I'll have to catch up with
him for more info. My current suspicion is that it may have been
runtime-suspend related.

I'll ask him to test again with your series separating USB/HSIO PDs.

  https://lore.kernel.org/all/1664192735-14313-1-git-send-email-jun.li@nxp.com/

We had a udev rule already, which I tested working on an i.MX8MM:

  SUBSYSTEM=="platform", ACTION=="add", DRIVER=="imx_usb", ATTR{power/control}="on"

But apparently something is still amiss.

Thanks for the help everybody,
Ahmad

> 
> Li Jun
>  
>>
>> Cheers,
>> Ahmad
>>
>>>
>>> Best Regards,
>>>
>>> Tim
>>>
>>
>>
>> --
>> Pengutronix e.K.                           |                             |
>> Steuerwalder Str. 21                       |
>> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.pe
>> ngutronix.de%2F&amp;data=05%7C01%7Cjun.li%40nxp.com%7Cac32a99803dc4e710
>> 4d408dab0777a15%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6380163244
>> 44837508%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLC
>> JBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=4TFBorG%2BucyYuy
>> HrwhTDxjz4GV3%2FsCaHzx7i4cdw5Zw%3D&amp;reserved=0  |
>> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
>> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> 
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-10-24 13:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-05  7:37 [PATCH v3 1/1] arm64: dts: tqma8mpql: add USB DR support Alexander Stein
2022-09-05 12:27 ` Fabio Estevam
2022-09-06  2:10 ` Jun Li
2022-09-06  2:15 ` Shawn Guo
2022-10-14 14:18 ` Ahmad Fatoum
2022-10-17 19:30   ` Tim Harvey
2022-10-17 19:40     ` Ahmad Fatoum
2022-10-18  2:07       ` Jun Li
2022-10-24 13:46         ` Ahmad Fatoum
2022-10-18  1:58     ` Jun Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).