diff mbox series

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

Message ID 20240404022943.528293-1-festevam@gmail.com
State Changes Requested
Headers show
Series dt-bindings: extcon: ptn5150: Document the 'port' node | expand

Checks

Context Check Description
robh/checkpatch warning total: 0 errors, 1 warnings, 22 lines checked
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Fabio Estevam April 4, 2024, 2:29 a.m. UTC
From: Fabio Estevam <festevam@denx.de>

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#

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 .../devicetree/bindings/extcon/extcon-ptn5150.yaml    | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Frank Li April 4, 2024, 4:06 a.m. UTC | #1
On Wed, Apr 03, 2024 at 11:29:43PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> 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#
> 
> Signed-off-by: Fabio Estevam <festevam@denx.de>

Thanks, I met the same issue.

Reviewed-by: Frank Li <Frank.Li@nxp.com>

> ---
>  .../devicetree/bindings/extcon/extcon-ptn5150.yaml    | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml b/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
> index d5cfa32ea52d..3472c69056ac 100644
> --- a/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
> +++ b/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
> @@ -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>;
> +              };
> +           };
>          };
>      };
> -- 
> 2.34.1
>
Krzysztof Kozlowski April 5, 2024, 9:24 a.m. UTC | #2
On 04/04/2024 04:29, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> 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
> 
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
>  .../devicetree/bindings/extcon/extcon-ptn5150.yaml    | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml b/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
> index d5cfa32ea52d..3472c69056ac 100644
> --- a/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
> +++ b/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
> @@ -36,6 +36,11 @@ properties:
>      description:
>        GPIO pin (output) used to control VBUS. If skipped, no such control
>        takes place.

Missing blank line.

> +  port:
> +    $ref: /schemas/graph.yaml#/$defs/port-base

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

But more important, what about USB C connector?

> +    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>;
> +              };

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


> +           };
>          };
>      };

Best regards,
Krzysztof
Fabio Estevam April 5, 2024, 7:58 p.m. UTC | #3
On Fri, Apr 5, 2024 at 6:24 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:

> 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?
Krzysztof Kozlowski April 6, 2024, 11:26 a.m. UTC | #4
On 05/04/2024 21:58, Fabio Estevam wrote:
> On Fri, Apr 5, 2024 at 6:24 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> 
>> 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?

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
Fabio Estevam April 8, 2024, 11:58 a.m. UTC | #5
On Sat, Apr 6, 2024 at 8:26 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:

> > 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.
Marek Vasut April 12, 2024, 11:48 a.m. UTC | #6
On 4/8/24 1:58 PM, Fabio Estevam wrote:
> On Sat, Apr 6, 2024 at 8:26 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> 
>>> 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.

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.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml b/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
index d5cfa32ea52d..3472c69056ac 100644
--- a/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
+++ b/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
@@ -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>;
+              };
+           };
         };
     };