Skip to contentSkip to conversation

dt-bindings: extcon: ptn5150: add child node port

PATCH Applied Frank Li 3 participants 3 messages Aug 20, 2024 – Aug 22, 2024

Subsystems (4)
lore
Share & tools
lore

Frank Li

author maintainer
#0 lore raw

PATCH v4 1/1 dt-bindings: extcon: ptn5150: add child node port

Add child node 'port' to allow connect to usb controller to do role-switch if id pin of ptn5150 have not connected to chip's usb ID function pin.

Fix below warning:
arch/arm64/boot/dts/freescale/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

---
Change from v3 to v4
- remove extra empty line
- fix Indentation in example
Change from v2 to v3
- only add port to existed example.
Change from v1 to v2
- add example for id pin have not connect to main chip's id example.
- commit 095b96b2b fix "port" warning, but add new warning "connector" is not exist. And follow commit revert this change.
690085d866f08 Revert "arm64: dts: imx8mn-var-som-symphony: Describe the USB-C connector
- I have not board in hand to debug why "connector" is not work.

---
 .../devicetree/bindings/extcon/extcon-ptn5150.yaml    | 11 +++++++++++
 1 file changed, 11 insertions(+)
Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml +11 -0
index d5cfa32ea52dd..072b3c0c5fd03 100644
@@ -37,6 +37,11 @@ properties:
       GPIO pin (output) used to control VBUS. If skipped, no such control
       takes place.
 
+  port:
+    $ref: /schemas/graph.yaml#/properties/port
+    description:
+      A port node to link the usb controller for the dual role switch.
+
 required:
   - compatible
   - interrupts
@@ -58,5 +63,11 @@ examples:
             interrupt-parent = <&msmgpio>;
             interrupts = <78 IRQ_TYPE_LEVEL_HIGH>;
             vbus-gpios = <&msmgpio 148 GPIO_ACTIVE_HIGH>;
+
+            port {
+                endpoint {
+                    remote-endpoint = <&usb1_drd_sw>;
+                };
+            };
         };
     };
Signature · 1 line
2.34.1
maintainer Reviewed-by on v4 1/1
#1 lore raw
Quoted 7 lines · Frank Li

Add child node 'port' to allow connect to usb controller to do role-switch if id pin of ptn5150 have not connected to chip's usb ID function pin.

Fix below warning:
arch/arm64/boot/dts/freescale/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

Best regards,
Krzysztof

Applied
#2 lore raw
In reply to Frank Li

24. 8. 20. 23:39에 Frank Li 이(가) 쓴 글:

Quoted 42 lines

Add child node 'port' to allow connect to usb controller to do role-switch if id pin of ptn5150 have not connected to chip's usb ID function pin.

Fix below warning:
arch/arm64/boot/dts/freescale/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

---
Change from v3 to v4
- remove extra empty line
- fix Indentation in example
Change from v2 to v3
- only add port to existed example.
Change from v1 to v2
- add example for id pin have not connect to main chip's id example.
- commit 095b96b2b fix "port" warning, but add new warning "connector" is not exist. And follow commit revert this change.
690085d866f08 Revert "arm64: dts: imx8mn-var-som-symphony: Describe the USB-C connector
- I have not board in hand to debug why "connector" is not work.

---
 .../devicetree/bindings/extcon/extcon-ptn5150.yaml    | 11 +++++++++++
 1 file changed, 11 insertions(+)
Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml +5 -0
index d5cfa32ea52dd..072b3c0c5fd03 100644
@@ -37,6 +37,11 @@ properties:
       GPIO pin (output) used to control VBUS. If skipped, no such control
       takes place.
 
+  port:
+    $ref: /schemas/graph.yaml#/properties/port
+    description:
+      A port node to link the usb controller for the dual role switch.
+
 required:
   - compatible
   - interrupts
@@ -58,5 +63,11 @@ examples:
             interrupt-parent = <&msmgpio>;

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

Quoted 10 lines
Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml +6 -0
             interrupts = <78 IRQ_TYPE_LEVEL_HIGH>;
             vbus-gpios = <&msmgpio 148 GPIO_ACTIVE_HIGH>;
+
+            port {
+                endpoint {
+                    remote-endpoint = <&usb1_drd_sw>;
+                };
+            };
         };
     };

Applied it. Thanks.

Signature · 3 lines
Best Regards,
Samsung Electronics
Chanwoo Choi