Skip to contentSkip to conversation

dt-bindings: extcon: ptn5150: Document the 'port' node

PATCH In review Fabio Estevam 4 participants 7 messages Apr 4, 2024 – Apr 12, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: extcon: ptn5150: Document the 'port' node

From: Fabio Estevam <[email protected]>

Doument the port node to link the PTN5150 to a TypeC controller.

This fixes the following dt-schema warnings:

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#

---
 .../devicetree/bindings/extcon/extcon-ptn5150.yaml    | 11 +++++++++++
 1 file changed, 11 insertions(+)
Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml +11 -0
index d5cfa32ea52d..3472c69056ac 100644
@@ -36,6 +36,11 @@ properties:
     description:
       GPIO pin (output) used to control VBUS. If skipped, no such control
       takes place.
+  port:
+    $ref: /schemas/graph.yaml#/$defs/port-base
+    description:
+      A port node to link the PTN5150 to a TypeC controller.
+    unevaluatedProperties: false
 
 required:
   - compatible
@@ -58,5 +63,11 @@ examples:
             interrupt-parent = <&msmgpio>;
             interrupts = <78 IRQ_TYPE_LEVEL_HIGH>;
             vbus-gpios = <&msmgpio 148 GPIO_ACTIVE_HIGH>;
+
+            port {
+              ptn5150_out_ep: endpoint {
+                 remote-endpoint = <&dwc3_0_ep>;
+              };
+           };
         };
     };
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Doument the port node to link the PTN5150 to a TypeC controller.

This fixes the following dt-schema warnings:

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#

Thanks, I met the same issue.

Quoted 35 lines
---
 .../devicetree/bindings/extcon/extcon-ptn5150.yaml    | 11 +++++++++++
 1 file changed, 11 insertions(+)
Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml +11 -0
index d5cfa32ea52d..3472c69056ac 100644
@@ -36,6 +36,11 @@ properties:
     description:
       GPIO pin (output) used to control VBUS. If skipped, no such control
       takes place.
+  port:
+    $ref: /schemas/graph.yaml#/$defs/port-base
+    description:
+      A port node to link the PTN5150 to a TypeC controller.
+    unevaluatedProperties: false
 
 required:
   - compatible
@@ -58,5 +63,11 @@ examples:
             interrupt-parent = <&msmgpio>;
             interrupts = <78 IRQ_TYPE_LEVEL_HIGH>;
             vbus-gpios = <&msmgpio 148 GPIO_ACTIVE_HIGH>;
+
+            port {
+              ptn5150_out_ep: endpoint {
+                 remote-endpoint = <&dwc3_0_ep>;
+              };
+           };
         };
     };
Signature · 1 line
2.34.1
#2 lore raw
In reply to Fabio Estevam
Quoted 8 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Doument the port node to link the PTN5150 to a TypeC controller.

This fixes the following dt-schema warnings:

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#

Your patch ends up in spam. Probably

Quoted 11 lines
---
 .../devicetree/bindings/extcon/extcon-ptn5150.yaml    | 11 +++++++++++
 1 file changed, 11 insertions(+)
Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml +0 -0
index d5cfa32ea52d..3472c69056ac 100644

Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml properties: · line 38

Quoted 3 lines
Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml +0 -0
@@ -36,6 +36,11 @@ properties:
     description:
       GPIO pin (output) used to control VBUS. If skipped, no such control
       takes place.

Missing blank line.

Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml properties: · line 40

Quoted 2 lines
Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml +2 -0
+  port:
+    $ref: /schemas/graph.yaml#/$defs/port-base

Why not "$ref: /schemas/graph.yaml#/properties/port"?

But more important, what about USB C connector?

Quoted 7 lines
Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml +3 -0
+    description:
+      A port node to link the PTN5150 to a TypeC controller.
+    unevaluatedProperties: false
 
 required:
   - compatible

Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml examples: · line 70

Quoted 8 lines
Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml +5 -0
@@ -58,5 +63,11 @@ examples:
             interrupt-parent = <&msmgpio>;
             interrupts = <78 IRQ_TYPE_LEVEL_HIGH>;
             vbus-gpios = <&msmgpio 148 GPIO_ACTIVE_HIGH>;
+
+            port {
+              ptn5150_out_ep: endpoint {
+                 remote-endpoint = <&dwc3_0_ep>;
+              };

Messed indentation. Just compare the indentation with what is around. It seems you repeat the same mistake in your recent bindings patches.

Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml examples: · line 73

Quoted 3 lines
Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml +1 -0
+           };
         };
     };

Best regards,
Krzysztof

#3 lore raw
Quoted 1 line · Krzysztof Kozlowski

But more important, what about USB C connector?

In a previous attempt, I tried describing the USB connector:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.9-rc2&id=a4dca89fe8a1585af73e362f5f4e3189a00abf8e

This broke the USB support as reported by Marek, so I had to revert it:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.9-rc2&id=f954785a124e77d4e6bb52cab689a8de447999aa

Would it be OK if I send a v2 without the USB C connector description and address your other comments?

#4 lore raw
Quoted 4 lines · Fabio Estevam
Quoted 1 line · Krzysztof Kozlowski

But more important, what about USB C connector?

Quoted 8 lines

In a previous attempt, I tried describing the USB connector:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.9-rc2&id=a4dca89fe8a1585af73e362f5f4e3189a00abf8e

This broke the USB support as reported by Marek, so I had to revert it:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.9-rc2&id=f954785a124e77d4e6bb52cab689a8de447999aa

Would it be OK if I send a v2 without the USB C connector description and address your other comments?

No, because I think this should be the connector. Look at datasheet of ptn5150 and ptn5110. Aren't both describing similar hardware?

Instead adding some sort of hacked-hardware-representation, please investigate why your previous commit broke things.

Best regards,
Krzysztof

#5 lore raw
Quoted 8 lines · Krzysztof Kozlowski
Quoted 2 lines

Would it be OK if I send a v2 without the USB C connector description and address your other comments?

No, because I think this should be the connector. Look at datasheet of ptn5150 and ptn5110. Aren't both describing similar hardware?

Instead adding some sort of hacked-hardware-representation, please investigate why your previous commit broke things.

Yes, you are right.

I don't have access to any board with a PTN5150, so I can't debug it myself.

#6 lore raw
Quoted 8 lines · Fabio Estevam
Quoted 6 lines · Krzysztof Kozlowski
Quoted 2 lines

Would it be OK if I send a v2 without the USB C connector description and address your other comments?

No, because I think this should be the connector. Look at datasheet of ptn5150 and ptn5110. Aren't both describing similar hardware?

Quoted 6 lines
Quoted 2 lines

Instead adding some sort of hacked-hardware-representation, please investigate why your previous commit broke things.

Yes, you are right.

I don't have access to any board with a PTN5150, so I can't debug it myself.

I have 5150, it is on my list of things to look into, it just might not be right away. I'll revisit this once I get to it.