* [PATCH 2/3] arm64: dts: imx8mn-var-som-symphony: Describe the USB-C connector
2023-12-12 11:27 [PATCH 1/3] dt-bindings: extcon: ptn5150: Describe the USB connector Fabio Estevam
@ 2023-12-12 11:27 ` Fabio Estevam
2023-12-12 11:27 ` [PATCH 3/3] arm64: dts: imx8mp-dhcom-pdk3: " Fabio Estevam
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2023-12-12 11:27 UTC (permalink / raw)
To: cw00.choi
Cc: myungjoo.ham, robh+dt, krzysztof.kozlowski, conor+dt, devicetree,
shawnguo, marex, hvilleneuve, linux-arm-kernel, Fabio Estevam
From: Fabio Estevam <festevam@denx.de>
Describe the PTN5150 USB-C connector to improve the devicetree description
and fix the following dt-schema warning:
imx8mn-var-som-symphony.dtb: typec@3d: 'port' does not match any of the regexes: 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/extcon/extcon-ptn5150.yaml#
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
.../boot/dts/freescale/imx8mn-var-som-symphony.dts | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8mn-var-som-symphony.dts b/arch/arm64/boot/dts/freescale/imx8mn-var-som-symphony.dts
index a6b94d1957c9..f38ee2266b25 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn-var-som-symphony.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mn-var-som-symphony.dts
@@ -128,9 +128,14 @@ extcon_usbotg1: typec@3d {
pinctrl-0 = <&pinctrl_ptn5150>;
status = "okay";
- port {
- typec1_dr_sw: endpoint {
- remote-endpoint = <&usb1_drd_sw>;
+ connector {
+ compatible = "usb-c-connector";
+ label = "USB-C";
+
+ port {
+ typec1_dr_sw: endpoint {
+ remote-endpoint = <&usb1_drd_sw>;
+ };
};
};
};
--
2.34.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] 5+ messages in thread* [PATCH 3/3] arm64: dts: imx8mp-dhcom-pdk3: Describe the USB-C connector
2023-12-12 11:27 [PATCH 1/3] dt-bindings: extcon: ptn5150: Describe the USB connector Fabio Estevam
2023-12-12 11:27 ` [PATCH 2/3] arm64: dts: imx8mn-var-som-symphony: Describe the USB-C connector Fabio Estevam
@ 2023-12-12 11:27 ` Fabio Estevam
2023-12-12 17:33 ` [PATCH 1/3] dt-bindings: extcon: ptn5150: Describe the USB connector Conor Dooley
2024-01-13 22:06 ` Marek Vasut
3 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2023-12-12 11:27 UTC (permalink / raw)
To: cw00.choi
Cc: myungjoo.ham, robh+dt, krzysztof.kozlowski, conor+dt, devicetree,
shawnguo, marex, hvilleneuve, linux-arm-kernel, Fabio Estevam
From: Fabio Estevam <festevam@denx.de>
Describe the PTN5150 USB-C connector to improve the devicetree description
and fix the following dt-schema warning:
imx8mp-dhcom-pdk3.dtb: typec@3d: 'port' does not match any of the regexes: 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/extcon/extcon-ptn5150.yaml#
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
arch/arm64/boot/dts/freescale/imx8mp-dhcom-pdk3.dts | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-dhcom-pdk3.dts b/arch/arm64/boot/dts/freescale/imx8mp-dhcom-pdk3.dts
index b749e28e5ede..fea67a9282f0 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-dhcom-pdk3.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-dhcom-pdk3.dts
@@ -175,10 +175,14 @@ typec@3d {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ptn5150>;
- port {
-
- ptn5150_out_ep: endpoint {
- remote-endpoint = <&dwc3_0_ep>;
+ connector {
+ compatible = "usb-c-connector";
+ label = "USB-C";
+
+ port {
+ ptn5150_out_ep: endpoint {
+ remote-endpoint = <&dwc3_0_ep>;
+ };
};
};
};
--
2.34.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] 5+ messages in thread* Re: [PATCH 1/3] dt-bindings: extcon: ptn5150: Describe the USB connector
2023-12-12 11:27 [PATCH 1/3] dt-bindings: extcon: ptn5150: Describe the USB connector Fabio Estevam
2023-12-12 11:27 ` [PATCH 2/3] arm64: dts: imx8mn-var-som-symphony: Describe the USB-C connector Fabio Estevam
2023-12-12 11:27 ` [PATCH 3/3] arm64: dts: imx8mp-dhcom-pdk3: " Fabio Estevam
@ 2023-12-12 17:33 ` Conor Dooley
2024-01-13 22:06 ` Marek Vasut
3 siblings, 0 replies; 5+ messages in thread
From: Conor Dooley @ 2023-12-12 17:33 UTC (permalink / raw)
To: Fabio Estevam
Cc: cw00.choi, myungjoo.ham, robh+dt, krzysztof.kozlowski, conor+dt,
devicetree, shawnguo, marex, hvilleneuve, linux-arm-kernel,
Fabio Estevam
[-- Attachment #1.1: Type: text/plain, Size: 1319 bytes --]
On Tue, Dec 12, 2023 at 08:27:27AM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
>
> PTN5150 supports USB Type-C connector, so improve the bindings by
> allowing to describe the connector like it is done on nxp,ptn5110.yaml.
>
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
> Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml b/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
> index d5cfa32ea52d..3837da7416e9 100644
> --- a/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
> +++ b/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
> @@ -37,6 +37,11 @@ properties:
> GPIO pin (output) used to control VBUS. If skipped, no such control
> takes place.
>
> + connector:
> + type: object
> + $ref: /schemas/connector/usb-connector.yaml#
> + unevaluatedProperties: false
FWIW, neither the type nor the uneval properties should be needed here,
the referenced schema has additionalProperties: False.
Otherwise,
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Cheers,
Conor.
> +
> required:
> - compatible
> - interrupts
> --
> 2.34.1
>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
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] 5+ messages in thread
* Re: [PATCH 1/3] dt-bindings: extcon: ptn5150: Describe the USB connector
2023-12-12 11:27 [PATCH 1/3] dt-bindings: extcon: ptn5150: Describe the USB connector Fabio Estevam
` (2 preceding siblings ...)
2023-12-12 17:33 ` [PATCH 1/3] dt-bindings: extcon: ptn5150: Describe the USB connector Conor Dooley
@ 2024-01-13 22:06 ` Marek Vasut
3 siblings, 0 replies; 5+ messages in thread
From: Marek Vasut @ 2024-01-13 22:06 UTC (permalink / raw)
To: Fabio Estevam, cw00.choi
Cc: myungjoo.ham, robh+dt, krzysztof.kozlowski, conor+dt, devicetree,
shawnguo, hvilleneuve, linux-arm-kernel, Fabio Estevam
On 12/12/23 12:27, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
>
> PTN5150 supports USB Type-C connector, so improve the bindings by
> allowing to describe the connector like it is done on nxp,ptn5110.yaml.
>
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
> Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml b/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
> index d5cfa32ea52d..3837da7416e9 100644
> --- a/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
> +++ b/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
> @@ -37,6 +37,11 @@ properties:
> GPIO pin (output) used to control VBUS. If skipped, no such control
> takes place.
>
> + connector:
> + type: object
> + $ref: /schemas/connector/usb-connector.yaml#
> + unevaluatedProperties: false
> +
If I read drivers/usb/roles/class.c usb_role_switch_get() implementation
right, that function is doing an OF graph look up and expects a port {}
subnode for that purpose. The drivers/extcon/extcon-ptn5150.c
ptn5150_i2c_probe() calls usb_role_switch_get(), so I would expect the
ptn5150 DT node should contain a port {} subnode, not a connector subnode.
I think that's what should be done here -- update this PTN5150 binding
document and describe the port {} subnode. The two DT patches are not
needed and are in fact wrong ; at least the PDK3 one breaks PDK3 USB-C
operation as the usb_role_switch_get() look up fails in the PTN5150
driver with that DT patch applied.
_______________________________________________
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] 5+ messages in thread