mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] dt-bindings: usb: richtek,rt1711h: remove .txt binding and fix schema
@ 2026-05-18 16:20 Akash Sukhavasi
  2026-05-18 16:20 ` [PATCH v2 1/2] dt-bindings: usb: richtek,rt1711h: remove deprecated .txt file Akash Sukhavasi
  2026-05-18 16:20 ` [PATCH v2 2/2] dt-bindings: usb: richtek,rt1711h: add missing 'port' property Akash Sukhavasi
  0 siblings, 2 replies; 7+ messages in thread
From: Akash Sukhavasi @ 2026-05-18 16:20 UTC (permalink / raw)
  To: krzk+dt
  Cc: robh, conor+dt, gregkh, gene_chen, linux-usb, devicetree, linux-kernel

The richtek,rt1711h binding has a legacy plain-text file that was
superseded by the YAML schema. Remove it.

The YAML schema also declares 'additionalProperties: false' but
omits the top-level 'port' property used by hi3660-hikey960.dts
to describe the role-switch graph endpoint, causing dtbs_check
to emit:

  hi3660-hikey960.dtb: rt1711h@4e (richtek,rt1711h): 'port' does
  not match any of the regexes: '^pinctrl-[0-9]+$'

Add the missing property referencing /schemas/graph.yaml.

A separate dtbs_check warning on the same node is out of scope
for this series:

  hi3660-hikey960.dtb: rt1711h@4e (richtek,rt1711h):
  connector:ports: 'port@0' is a required property

That one is in the connector subnode and is governed by
usb-connector.yaml, not this binding.

---
Changes in v2:
- Patch 1: No changes.
- Patch 2: Fix port node indentation in example; port is now correctly
  placed as a sibling of connector under rt1711h@4e.

v1: https://lore.kernel.org/all/20260518142901.1747-1-akash.sukhavasi@gmail.com/
 
Akash Sukhavasi (2):
  dt-bindings: usb: richtek,rt1711h: remove deprecated .txt file
  dt-bindings: usb: richtek,rt1711h: add missing 'port' property

 .../bindings/usb/richtek,rt1711h.txt          | 44 -------------------
 .../bindings/usb/richtek,rt1711h.yaml         | 13 ++++++
 2 files changed, 13 insertions(+), 44 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/usb/richtek,rt1711h.txt

-- 
2.54.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/2] dt-bindings: usb: richtek,rt1711h: remove deprecated .txt file
  2026-05-18 16:20 [PATCH v2 0/2] dt-bindings: usb: richtek,rt1711h: remove .txt binding and fix schema Akash Sukhavasi
@ 2026-05-18 16:20 ` Akash Sukhavasi
  2026-05-19  7:53   ` Krzysztof Kozlowski
  2026-05-18 16:20 ` [PATCH v2 2/2] dt-bindings: usb: richtek,rt1711h: add missing 'port' property Akash Sukhavasi
  1 sibling, 1 reply; 7+ messages in thread
From: Akash Sukhavasi @ 2026-05-18 16:20 UTC (permalink / raw)
  To: krzk+dt
  Cc: robh, conor+dt, gregkh, gene_chen, linux-usb, devicetree, linux-kernel

Remove the deprecated .txt binding for richtek,rt1711h. It was
superseded by the YAML schema added in commit a72095ed8e65
("dt-bindings usb: typec: rt1711h: Add binding for Richtek RT1711H").

Signed-off-by: Akash Sukhavasi <akash.sukhavasi@gmail.com>
---
 .../bindings/usb/richtek,rt1711h.txt          | 44 -------------------
 1 file changed, 44 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/usb/richtek,rt1711h.txt

diff --git a/Documentation/devicetree/bindings/usb/richtek,rt1711h.txt b/Documentation/devicetree/bindings/usb/richtek,rt1711h.txt
deleted file mode 100644
index 6f8115db2..000000000
--- a/Documentation/devicetree/bindings/usb/richtek,rt1711h.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-Richtek RT1711H TypeC PD Controller.
-
-Required properties:
- - compatible : Must be "richtek,rt1711h".
- - reg : Must be 0x4e, it's slave address of RT1711H.
- - interrupts : <a b> where a is the interrupt number and b represents an
-   encoding of the sense and level information for the interrupt.
-
-Required sub-node:
-- connector: The "usb-c-connector" attached to the tcpci chip, the bindings
-  of connector node are specified in
-  Documentation/devicetree/bindings/connector/usb-connector.yaml
-
-Example :
-rt1711h@4e {
-	compatible = "richtek,rt1711h";
-	reg = <0x4e>;
-	interrupt-parent = <&gpio26>;
-	interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-
-	usb_con: connector {
-		compatible = "usb-c-connector";
-		label = "USB-C";
-		data-role = "dual";
-		power-role = "dual";
-		try-power-role = "sink";
-		source-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>;
-		sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)
-			     PDO_VAR(5000, 12000, 2000)>;
-		op-sink-microwatt = <10000000>;
-
-		ports {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			port@1 {
-				reg = <1>;
-				usb_con_ss: endpoint {
-					remote-endpoint = <&usb3_data_ss>;
-				};
-			};
-		};
-	};
-};
-- 
2.54.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 2/2] dt-bindings: usb: richtek,rt1711h: add missing 'port' property
  2026-05-18 16:20 [PATCH v2 0/2] dt-bindings: usb: richtek,rt1711h: remove .txt binding and fix schema Akash Sukhavasi
  2026-05-18 16:20 ` [PATCH v2 1/2] dt-bindings: usb: richtek,rt1711h: remove deprecated .txt file Akash Sukhavasi
@ 2026-05-18 16:20 ` Akash Sukhavasi
  2026-05-19  8:08   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 7+ messages in thread
From: Akash Sukhavasi @ 2026-05-18 16:20 UTC (permalink / raw)
  To: krzk+dt
  Cc: robh, conor+dt, gregkh, gene_chen, linux-usb, devicetree, linux-kernel

The schema declares 'additionalProperties: false' but omits the
top-level 'port' property, which hi3660-hikey960.dts uses to
describe the role-switch graph endpoint. This causes dtbs_check
to emit:

  hi3660-hikey960.dtb: rt1711h@4e (richtek,rt1711h): 'port' does
  not match any of the regexes: '^pinctrl-[0-9]+$'

Add the missing property using /schemas/graph.yaml#/properties/port,
following the pattern used by realtek,rts5411.yaml and other USB
controller bindings.

Update the example accordingly.

Signed-off-by: Akash Sukhavasi <akash.sukhavasi@gmail.com>
---
 .../devicetree/bindings/usb/richtek,rt1711h.yaml    | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml b/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml
index 7ded36384..05ffc33a2 100644
--- a/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml
+++ b/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml
@@ -52,6 +52,13 @@ properties:
     description:
       Properties for usb c connector.
 
+  port:
+    $ref: /schemas/graph.yaml#/properties/port
+    description:
+      OF graph port describing the connection to the USB role switch
+      consumer (e.g., a dwc3 controller with usb-role-switch), used to
+      convey type-C data-role changes signaled by the TCPC.
+
 additionalProperties: false
 
 required:
@@ -108,6 +115,12 @@ examples:
             };
           };
         };
+
+        port {
+          endpoint {
+            remote-endpoint = <&usb_role_switch>;
+          };
+        };
       };
     };
 ...
-- 
2.54.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] dt-bindings: usb: richtek,rt1711h: remove deprecated .txt file
  2026-05-18 16:20 ` [PATCH v2 1/2] dt-bindings: usb: richtek,rt1711h: remove deprecated .txt file Akash Sukhavasi
@ 2026-05-19  7:53   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2026-05-19  7:53 UTC (permalink / raw)
  To: Akash Sukhavasi
  Cc: krzk+dt, robh, conor+dt, gregkh, gene_chen, linux-usb,
	devicetree, linux-kernel

On Mon, May 18, 2026 at 11:20:13AM -0500, Akash Sukhavasi wrote:
> Remove the deprecated .txt binding for richtek,rt1711h. It was
> superseded by the YAML schema added in commit a72095ed8e65
> ("dt-bindings usb: typec: rt1711h: Add binding for Richtek RT1711H").
> 
> Signed-off-by: Akash Sukhavasi <akash.sukhavasi@gmail.com>
> ---
>  .../bindings/usb/richtek,rt1711h.txt          | 44 -------------------
>  1 file changed, 44 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/usb/richtek,rt1711h.txt

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] dt-bindings: usb: richtek,rt1711h: add missing 'port' property
  2026-05-18 16:20 ` [PATCH v2 2/2] dt-bindings: usb: richtek,rt1711h: add missing 'port' property Akash Sukhavasi
@ 2026-05-19  8:08   ` Krzysztof Kozlowski
  2026-05-20  4:53     ` Akash Sukhavasi
  0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2026-05-19  8:08 UTC (permalink / raw)
  To: Akash Sukhavasi
  Cc: krzk+dt, robh, conor+dt, gregkh, gene_chen, linux-usb,
	devicetree, linux-kernel

On Mon, May 18, 2026 at 11:20:14AM -0500, Akash Sukhavasi wrote:
> The schema declares 'additionalProperties: false' but omits the
> top-level 'port' property, which hi3660-hikey960.dts uses to
> describe the role-switch graph endpoint. This causes dtbs_check
> to emit:
> 
>   hi3660-hikey960.dtb: rt1711h@4e (richtek,rt1711h): 'port' does
>   not match any of the regexes: '^pinctrl-[0-9]+$'
> 
> Add the missing property using /schemas/graph.yaml#/properties/port,
> following the pattern used by realtek,rts5411.yaml and other USB
> controller bindings.
> 
> Update the example accordingly.
> 
> Signed-off-by: Akash Sukhavasi <akash.sukhavasi@gmail.com>
> ---
>  .../devicetree/bindings/usb/richtek,rt1711h.yaml    | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml b/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml
> index 7ded36384..05ffc33a2 100644
> --- a/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml
> +++ b/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml
> @@ -52,6 +52,13 @@ properties:
>      description:
>        Properties for usb c connector.
>  
> +  port:
> +    $ref: /schemas/graph.yaml#/properties/port
> +    description:
> +      OF graph port describing the connection to the USB role switch
> +      consumer (e.g., a dwc3 controller with usb-role-switch), used to
> +      convey type-C data-role changes signaled by the TCPC.

I don't think this is right. There is no such data link for "role
switch", so this should be part of standard connector ports.

And the only other binding (I found) having these two is
qcom,pmic-typec, which in practice only uses connector in all of DTS
files.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] dt-bindings: usb: richtek,rt1711h: add missing 'port' property
  2026-05-19  8:08   ` Krzysztof Kozlowski
@ 2026-05-20  4:53     ` Akash Sukhavasi
  2026-05-20  7:33       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 7+ messages in thread
From: Akash Sukhavasi @ 2026-05-20  4:53 UTC (permalink / raw)
  To: krzk
  Cc: akash.sukhavasi, conor+dt, devicetree, gene_chen, gregkh,
	krzk+dt, linux-kernel, linux-usb, robh

On Tue, May 19, 2026 at 3:08 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Mon, May 18, 2026 at 11:20:14AM -0500, Akash Sukhavasi wrote:
> > The schema declares 'additionalProperties: false' but omits the
> > top-level 'port' property, which hi3660-hikey960.dts uses to
> > describe the role-switch graph endpoint. This causes dtbs_check
> > to emit:
> >
> >   hi3660-hikey960.dtb: rt1711h@4e (richtek,rt1711h): 'port' does
> >   not match any of the regexes: '^pinctrl-[0-9]+$'
> >
> > Add the missing property using /schemas/graph.yaml#/properties/port,
> > following the pattern used by realtek,rts5411.yaml and other USB
> > controller bindings.
> >
> > Update the example accordingly.
> >
> > Signed-off-by: Akash Sukhavasi <akash.sukhavasi@gmail.com>
> > ---
> >  .../devicetree/bindings/usb/richtek,rt1711h.yaml    | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml b/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml
> > index 7ded36384..05ffc33a2 100644
> > --- a/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml
> > +++ b/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml
> > @@ -52,6 +52,13 @@ properties:
> >      description:
> >        Properties for usb c connector.
> >
> > +  port:
> > +    $ref: /schemas/graph.yaml#/properties/port
> > +    description:
> > +      OF graph port describing the connection to the USB role switch
> > +      consumer (e.g., a dwc3 controller with usb-role-switch), used to
> > +      convey type-C data-role changes signaled by the TCPC.
>
> I don't think this is right. There is no such data link for "role
> switch", so this should be part of standard connector ports.
>
> And the only other binding (I found) having these two is
> qcom,pmic-typec, which in practice only uses connector in all of DTS
> files.

Hi Krzysztof,

Makes sense. I'll take a look at hi3660-hikey960.dts itself since it
also has the port@0 required property warning on the same node. Will
send a separate patch.

Dropping patch 2/2 from this series.

Can patch 1/2 (.txt removal) be applied independently with your Reviewed-by?

Thanks,
Akash

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] dt-bindings: usb: richtek,rt1711h: add missing 'port' property
  2026-05-20  4:53     ` Akash Sukhavasi
@ 2026-05-20  7:33       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2026-05-20  7:33 UTC (permalink / raw)
  To: Akash Sukhavasi
  Cc: conor+dt, devicetree, gene_chen, gregkh, krzk+dt, linux-kernel,
	linux-usb, robh

On 20/05/2026 06:53, Akash Sukhavasi wrote:
> 
> Dropping patch 2/2 from this series.
> 
> Can patch 1/2 (.txt removal) be applied independently with your Reviewed-by?
> 

You should rather send a v2, with only the first patch and with my tag.


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-05-20  7:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-18 16:20 [PATCH v2 0/2] dt-bindings: usb: richtek,rt1711h: remove .txt binding and fix schema Akash Sukhavasi
2026-05-18 16:20 ` [PATCH v2 1/2] dt-bindings: usb: richtek,rt1711h: remove deprecated .txt file Akash Sukhavasi
2026-05-19  7:53   ` Krzysztof Kozlowski
2026-05-18 16:20 ` [PATCH v2 2/2] dt-bindings: usb: richtek,rt1711h: add missing 'port' property Akash Sukhavasi
2026-05-19  8:08   ` Krzysztof Kozlowski
2026-05-20  4:53     ` Akash Sukhavasi
2026-05-20  7:33       ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®