Skip to contentSkip to conversation

arm64: dts: imx8mp-verdin: Fix USB connector description

PATCH Superseded Fabio Estevam 3 participants 5 messages Dec 7, 2023 – Dec 13, 2023

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/3 arm64: dts: imx8mp-verdin: Fix USB connector description

From: Fabio Estevam <[email protected]>

The USB connector should not be placed under the dwc3 node.

Move the USB connector out of the SoC level and use port to describe the connection to the dwc3 controller.

This fixes the following dt-schema warning:

imx8mp-verdin-wifi-mallow.dtb: usb@32f10100: usb@38100000: Unevaluated properties are not allowed ('connector' was unexpected)
from schema $id: http://devicetree.org/schemas/usb/fsl,imx8mp-dwc3.yaml#

---
 .../boot/dts/freescale/imx8mp-verdin.dtsi     | 30 +++++++++++++------
 1 file changed, 21 insertions(+), 9 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi +21 -9
index 04f2083c4ab2..c3305f0d4001 100644
@@ -45,6 +45,23 @@ backlight_mezzanine: backlight-mezzanine {
 		status = "disabled";
 	};
 
+	connector {
+		compatible = "gpio-usb-b-connector", "usb-b-connector";
+		id-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
+		label = "Type-C";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_usb_1_id>;
+		self-powered;
+		type = "micro";
+		vbus-supply = <&reg_usb1_vbus>;
+
+		port {
+			usb_dr_connector: endpoint {
+				remote-endpoint = <&usb3_dwc>;
+			};
+		};
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 		pinctrl-names = "default";
@@ -835,15 +852,10 @@ &usb_dwc3_0 {
 	srp-disable;
 	usb-role-switch;
 
-	connector {
-		compatible = "gpio-usb-b-connector", "usb-b-connector";
-		id-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
-		label = "Type-C";
-		pinctrl-names = "default";
-		pinctrl-0 = <&pinctrl_usb_1_id>;
-		self-powered;
-		type = "micro";
-		vbus-supply = <&reg_usb1_vbus>;
+	port {
+		usb3_dwc: endpoint {
+			remote-endpoint = <&usb_dr_connector>;
+		};
 	};
 };
 
Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author reviewer
#1 lore raw

PATCH 2/3 arm64: dts: imx8mp-venice: Fix USB connector description

From: Fabio Estevam <[email protected]>

The USB connector should not be placed under the dwc3 node.

Move the USB connector out of the SoC level and use port to describe the connection to the dwc3 controller.

This fixes the following dt-schema warning:

imx8mp-venice-gw72xx-2x.dtb: usb@38100000: Unevaluated properties are not allowed ('connector' was unexpected)
from schema $id: http://devicetree.org/schemas/usb/snps,dwc3.yaml#

---
 .../dts/freescale/imx8mp-venice-gw71xx.dtsi   | 26 +++++++++++++-----
 .../dts/freescale/imx8mp-venice-gw72xx.dtsi   | 27 ++++++++++++++-----
 .../dts/freescale/imx8mp-venice-gw73xx.dtsi   | 27 ++++++++++++++-----
 .../dts/freescale/imx8mp-venice-gw74xx.dts    | 27 ++++++++++++++-----
 4 files changed, 79 insertions(+), 28 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp-venice-gw71xx.dtsi +19 -7
index bf47b5e9dd8c..0e8d0f3c7ea8 100644
@@ -8,6 +8,21 @@
 #include <dt-bindings/phy/phy-imx8-pcie.h>
 
 / {
+	connector {
+		compatible = "gpio-usb-b-connector", "usb-b-connector";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_usbcon1>;
+		type = "micro";
+		label = "Type-C";
+		id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
+
+		port {
+			usb_dr_connector: endpoint {
+				remote-endpoint = <&usb3_dwc>;
+			};
+		};
+	};
+
 	led-controller {
 		compatible = "gpio-leds";
 		pinctrl-names = "default";
@@ -132,13 +147,10 @@ &usb_dwc3_0 {
 	role-switch-default-mode = "peripheral";
 	status = "okay";
 
-	connector {
-		compatible = "gpio-usb-b-connector", "usb-b-connector";
-		pinctrl-names = "default";
-		pinctrl-0 = <&pinctrl_usbcon1>;
-		type = "micro";
-		label = "Type-C";
-		id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
+	port {
+		usb3_dwc: endpoint {
+			remote-endpoint = <&usb_dr_connector>;
+		};
 	};
 };
 
arch/arm64/boot/dts/freescale/imx8mp-venice-gw72xx.dtsi +20 -7
index 28eb7c00a1d9..f8ad5ea96330 100644
@@ -8,6 +8,22 @@
 #include <dt-bindings/phy/phy-imx8-pcie.h>
 
 / {
+
+	connector {
+		compatible = "gpio-usb-b-connector", "usb-b-connector";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_usbcon1>;
+		type = "micro";
+		label = "otg";
+		id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
+
+		port {
+			usb_dr_connector: endpoint {
+				remote-endpoint = <&usb3_dwc>;
+			};
+		};
+	};
+
 	led-controller {
 		compatible = "gpio-leds";
 		pinctrl-names = "default";
@@ -182,13 +198,10 @@ &usb_dwc3_0 {
 	role-switch-default-mode = "peripheral";
 	status = "okay";
 
-	connector {
-		compatible = "gpio-usb-b-connector", "usb-b-connector";
-		pinctrl-names = "default";
-		pinctrl-0 = <&pinctrl_usbcon1>;
-		type = "micro";
-		label = "otg";
-		id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
+	port {
+		usb3_dwc: endpoint {
+			remote-endpoint = <&usb_dr_connector>;
+		};
 	};
 };
 
arch/arm64/boot/dts/freescale/imx8mp-venice-gw73xx.dtsi +20 -7
index b0d42b18c5ce..0b89aa73998c 100644
@@ -8,6 +8,22 @@
 #include <dt-bindings/phy/phy-imx8-pcie.h>
 
 / {
+
+	connector {
+		compatible = "gpio-usb-b-connector", "usb-b-connector";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_usbcon1>;
+		type = "micro";
+		label = "otg";
+		id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
+
+		port {
+			usb_dr_connector: endpoint {
+				remote-endpoint = <&usb3_dwc>;
+			};
+		};
+	};
+
 	led-controller {
 		compatible = "gpio-leds";
 		pinctrl-names = "default";
@@ -201,13 +217,10 @@ &usb_dwc3_0 {
 	role-switch-default-mode = "peripheral";
 	status = "okay";
 
-	connector {
-		compatible = "gpio-usb-b-connector", "usb-b-connector";
-		pinctrl-names = "default";
-		pinctrl-0 = <&pinctrl_usbcon1>;
-		type = "micro";
-		label = "otg";
-		id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
+	port {
+		usb3_dwc: endpoint {
+			remote-endpoint = <&usb_dr_connector>;
+		};
 	};
 };
 
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts +20 -7
index dcf9bababffc..b323711fa090 100644
@@ -35,6 +35,22 @@ memory@40000000 {
 		reg = <0x0 0x40000000 0 0x80000000>;
 	};
 
+
+	connector {
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_usbcon1>;
+		compatible = "gpio-usb-b-connector", "usb-b-connector";
+		type = "micro";
+		label = "Type-C";
+		id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+
+		port {
+			usb_dr_connector: endpoint {
+				remote-endpoint = <&usb3_dwc>;
+			};
+		};
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 
@@ -692,13 +708,10 @@ &usb_dwc3_0 {
 	role-switch-default-mode = "peripheral";
 	status = "okay";
 
-	connector {
-		pinctrl-names = "default";
-		pinctrl-0 = <&pinctrl_usbcon1>;
-		compatible = "gpio-usb-b-connector", "usb-b-connector";
-		type = "micro";
-		label = "Type-C";
-		id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+	port {
+		usb3_dwc: endpoint {
+			remote-endpoint = <&usb_dr_connector>;
+		};
 	};
 };
 
Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author reviewer
#3 lore raw

PATCH 3/3 arm64: dts: imx8mp-tqma8mpql-mba8mpxl: Fix USB connector description

In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>

The USB connector should not be placed under the dwc3 node.

Move the USB connector out of the SoC level and use port to describe the connection to the dwc3 controller.

This fixes the following dt-schema warning:

imx8mp-tqma8mpql-mba8mpxl.dtb: usb@38100000: Unevaluated properties are not allowed ('connector' was unexpected)
from schema $id: http://devicetree.org/schemas/usb/snps,dwc3.yaml#

---
 .../freescale/imx8mp-tqma8mpql-mba8mpxl.dts   | 26 ++++++++++++++-----
 1 file changed, 19 insertions(+), 7 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts +19 -7
index 4b161564a284..505b70cb2bd7 100644
@@ -55,6 +55,21 @@ clk_xtal25: clk-xtal25 {
 		clock-frequency = <25000000>;
 	};
 
+	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>;
+
+		port {
+			usb_dr_connector: endpoint {
+				remote-endpoint = <&usb3_dwc>;
+			};
+		};
+	};
+
 	fan0: pwm-fan {
 		compatible = "pwm-fan";
 		pinctrl-names = "default";
@@ -625,13 +640,10 @@ &usb_dwc3_0 {
 	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>;
+	port {
+		usb3_dwc: endpoint {
+			remote-endpoint = <&usb_dr_connector>;
+		};
 	};
 };
 
Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Reviewed-by Tested-by on v1 3/3
#4 lore raw

Re: [PATCH 3/3] arm64: dts: imx8mp-tqma8mpql-mba8mpxl: Fix USB connector description

Hi Fabio,

Am Donnerstag, 7. Dezember 2023, 19:55:43 CET schrieb Fabio Estevam:

Quoted 7 lines

From: Fabio Estevam <[email protected]>

The USB connector should not be placed under the dwc3 node.

Move the USB connector out of the SoC level and use port to describe the connection to the dwc3 controller.

Quoted 7 lines

This fixes the following dt-schema warning:

imx8mp-tqma8mpql-mba8mpxl.dtb: usb@38100000: Unevaluated properties are not allowed ('connector' was unexpected) from schema $id:
http://devicetree.org/schemas/usb/snps,dwc3.yaml#

Thanks
Alexander

Quoted 48 lines
---
 .../freescale/imx8mp-tqma8mpql-mba8mpxl.dts   | 26 ++++++++++++++-----
 1 file changed, 19 insertions(+), 7 deletions(-)
(quoted diff) +0 -0

b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts index 4b161564a284..505b70cb2bd7 100644

arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts +19 -7
@@ -55,6 +55,21 @@ clk_xtal25: clk-xtal25 {
 		clock-frequency = <25000000>;
 	};
 
+	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>;
+
+		port {
+			usb_dr_connector: endpoint {
+				remote-endpoint = <&usb3_dwc>;
+			};
+		};
+	};
+
 	fan0: pwm-fan {
 		compatible = "pwm-fan";
 		pinctrl-names = "default";
@@ -625,13 +640,10 @@ &usb_dwc3_0 {
 	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>;
+	port {
+		usb3_dwc: endpoint {
+			remote-endpoint = <&usb_dr_connector>;
+		};
 	};
 };
Signature · 11 lines
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Acked-by on v1 2/3
#2 lore raw

Re: [PATCH 2/3] arm64: dts: imx8mp-venice: Fix USB connector description

In reply to Fabio Estevam
Quoted 5 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

The USB connector should not be placed under the dwc3 node.

Quoted 8 lines

Move the USB connector out of the SoC level and use port to describe the connection to the dwc3 controller.

This fixes the following dt-schema warning:

imx8mp-venice-gw72xx-2x.dtb: usb@38100000: Unevaluated properties are not allowed ('connector' was unexpected)
from schema $id: http://devicetree.org/schemas/usb/snps,dwc3.yaml#

Fabio,

Thank you for this. There is an extra leading blank line before 'connector' that should probably be fixed:

Quoted 57 lines
---
 .../dts/freescale/imx8mp-venice-gw71xx.dtsi   | 26 +++++++++++++-----
 .../dts/freescale/imx8mp-venice-gw72xx.dtsi   | 27 ++++++++++++++-----
 .../dts/freescale/imx8mp-venice-gw73xx.dtsi   | 27 ++++++++++++++-----
 .../dts/freescale/imx8mp-venice-gw74xx.dts    | 27 ++++++++++++++-----
 4 files changed, 79 insertions(+), 28 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp-venice-gw71xx.dtsi +19 -7
index bf47b5e9dd8c..0e8d0f3c7ea8 100644
@@ -8,6 +8,21 @@
 #include <dt-bindings/phy/phy-imx8-pcie.h>
 
 / {
+       connector {
+               compatible = "gpio-usb-b-connector", "usb-b-connector";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usbcon1>;
+               type = "micro";
+               label = "Type-C";
+               id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
+
+               port {
+                       usb_dr_connector: endpoint {
+                               remote-endpoint = <&usb3_dwc>;
+                       };
+               };
+       };
+
        led-controller {
                compatible = "gpio-leds";
                pinctrl-names = "default";
@@ -132,13 +147,10 @@ &usb_dwc3_0 {
        role-switch-default-mode = "peripheral";
        status = "okay";
 
-       connector {
-               compatible = "gpio-usb-b-connector", "usb-b-connector";
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_usbcon1>;
-               type = "micro";
-               label = "Type-C";
-               id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
+       port {
+               usb3_dwc: endpoint {
+                       remote-endpoint = <&usb_dr_connector>;
+               };
        };
 };
 
arch/arm64/boot/dts/freescale/imx8mp-venice-gw72xx.dtsi +0 -0
index 28eb7c00a1d9..f8ad5ea96330 100644

arch/arm64/boot/dts/freescale/imx8mp-venice-gw72xx.dtsi line 11

Quoted 4 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw72xx.dtsi +1 -0
@@ -8,6 +8,22 @@
 #include <dt-bindings/phy/phy-imx8-pcie.h>
 
 / {
+

leading blank line

Quoted 41 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw72xx.dtsi +19 -7
+       connector {
+               compatible = "gpio-usb-b-connector", "usb-b-connector";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usbcon1>;
+               type = "micro";
+               label = "otg";
+               id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
+
+               port {
+                       usb_dr_connector: endpoint {
+                               remote-endpoint = <&usb3_dwc>;
+                       };
+               };
+       };
+
        led-controller {
                compatible = "gpio-leds";
                pinctrl-names = "default";
@@ -182,13 +198,10 @@ &usb_dwc3_0 {
        role-switch-default-mode = "peripheral";
        status = "okay";
 
-       connector {
-               compatible = "gpio-usb-b-connector", "usb-b-connector";
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_usbcon1>;
-               type = "micro";
-               label = "otg";
-               id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
+       port {
+               usb3_dwc: endpoint {
+                       remote-endpoint = <&usb_dr_connector>;
+               };
        };
 };
 
arch/arm64/boot/dts/freescale/imx8mp-venice-gw73xx.dtsi +0 -0
index b0d42b18c5ce..0b89aa73998c 100644

arch/arm64/boot/dts/freescale/imx8mp-venice-gw73xx.dtsi line 11

Quoted 4 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw73xx.dtsi +1 -0
@@ -8,6 +8,22 @@
 #include <dt-bindings/phy/phy-imx8-pcie.h>
 
 / {
+

leading blank line

Quoted 41 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw73xx.dtsi +19 -7
+       connector {
+               compatible = "gpio-usb-b-connector", "usb-b-connector";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usbcon1>;
+               type = "micro";
+               label = "otg";
+               id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
+
+               port {
+                       usb_dr_connector: endpoint {
+                               remote-endpoint = <&usb3_dwc>;
+                       };
+               };
+       };
+
        led-controller {
                compatible = "gpio-leds";
                pinctrl-names = "default";
@@ -201,13 +217,10 @@ &usb_dwc3_0 {
        role-switch-default-mode = "peripheral";
        status = "okay";
 
-       connector {
-               compatible = "gpio-usb-b-connector", "usb-b-connector";
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_usbcon1>;
-               type = "micro";
-               label = "otg";
-               id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
+       port {
+               usb3_dwc: endpoint {
+                       remote-endpoint = <&usb_dr_connector>;
+               };
        };
 };
 
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts +0 -0
index dcf9bababffc..b323711fa090 100644

arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts memory@40000000 { · line 38

Quoted 4 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts +1 -0
@@ -35,6 +35,22 @@ memory@40000000 {
                reg = <0x0 0x40000000 0 0x80000000>;
        };
 
+

leading blank line

Quoted 26 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts +15 -4
+       connector {
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usbcon1>;
+               compatible = "gpio-usb-b-connector", "usb-b-connector";
+               type = "micro";
+               label = "Type-C";
+               id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+
+               port {
+                       usb_dr_connector: endpoint {
+                               remote-endpoint = <&usb3_dwc>;
+                       };
+               };
+       };
+
        gpio-keys {
                compatible = "gpio-keys";
 
@@ -692,13 +708,10 @@ &usb_dwc3_0 {
        role-switch-default-mode = "peripheral";
        status = "okay";
 
-       connector {
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_usbcon1>;
-               compatible = "gpio-usb-b-connector", "usb-b-connector";

arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts &usb_dwc3_0 { · line 717

Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts +4 -3
-               type = "micro";
-               label = "Type-C";
-               id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+       port {
+               usb3_dwc: endpoint {
+                       remote-endpoint = <&usb_dr_connector>;
+               };
        };
 };
 

with those minor changes (if we even care to make them):

Best regards,

Tim

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel