2022-07-05 05:44:53

by Xin Ji

[permalink] [raw]
Subject: [PATCH v13 2/3] dt-bindings: usb: Add analogix anx7411 PD binding

Add analogix PD chip anx7411 device binding

Reviewed-by: Rob Herring <[email protected]>
Signed-off-by: Xin Ji <[email protected]>

---
v12 -> v13 :
1. Drop the quotes for "$id" and "$schema"
2. Remove "allOf" label
3. Change node name from "i2c1" to "i2c"
4. Change node name from "typec" to "usb-typec"
---
.../bindings/usb/analogix,anx7411.yaml | 76 +++++++++++++++++++
1 file changed, 76 insertions(+)
create mode 100644 Documentation/devicetree/bindings/usb/analogix,anx7411.yaml

diff --git a/Documentation/devicetree/bindings/usb/analogix,anx7411.yaml b/Documentation/devicetree/bindings/usb/analogix,anx7411.yaml
new file mode 100644
index 000000000000..57429864d499
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/analogix,anx7411.yaml
@@ -0,0 +1,76 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/analogix,anx7411.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analogix ANX7411 Type-C controller bindings
+
+maintainers:
+ - Xin Ji <[email protected]>
+
+properties:
+ compatible:
+ enum:
+ - analogix,anx7411
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ connector:
+ type: object
+ $ref: ../connector/usb-connector.yaml
+ description:
+ Properties for usb c connector.
+
+ properties:
+ compatible:
+ const: usb-c-connector
+
+ power-role: true
+
+ data-role: true
+
+ try-power-role: true
+
+ required:
+ - compatible
+
+required:
+ - compatible
+ - reg
+ - connector
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ usb-typec: anx7411@2C {
+ compatible = "analogix,anx7411";
+ reg = <0x2C>;
+ interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
+ interrupt-parent = <&gpio0>;
+
+ typec_con: connector {
+ compatible = "usb-c-connector";
+ power-role = "dual";
+ data-role = "dual";
+ try-power-role = "source";
+
+ port {
+ typec_con_ep: endpoint {
+ remote-endpoint = <&usbotg_hs_ep>;
+ };
+ };
+ };
+ };
+ };
+...
--
2.25.1


2022-07-05 14:37:48

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v13 2/3] dt-bindings: usb: Add analogix anx7411 PD binding

On Tue, 05 Jul 2022 13:36:55 +0800, Xin Ji wrote:
> Add analogix PD chip anx7411 device binding
>
> Reviewed-by: Rob Herring <[email protected]>
> Signed-off-by: Xin Ji <[email protected]>
>
> ---
> v12 -> v13 :
> 1. Drop the quotes for "$id" and "$schema"
> 2. Remove "allOf" label
> 3. Change node name from "i2c1" to "i2c"
> 4. Change node name from "typec" to "usb-typec"
> ---
> .../bindings/usb/analogix,anx7411.yaml | 76 +++++++++++++++++++
> 1 file changed, 76 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/usb/analogix,anx7411.yaml
>

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Error: Documentation/devicetree/bindings/usb/analogix,anx7411.example.dts:26.22-23 syntax error
FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:383: Documentation/devicetree/bindings/usb/analogix,anx7411.example.dtb] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1404: dt_binding_check] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.

2022-07-05 14:44:23

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v13 2/3] dt-bindings: usb: Add analogix anx7411 PD binding

On 05/07/2022 07:36, Xin Ji wrote:
> Add analogix PD chip anx7411 device binding
>
> Reviewed-by: Rob Herring <[email protected]>
> Signed-off-by: Xin Ji <[email protected]>
>
> ---
> v12 -> v13 :
> 1. Drop the quotes for "$id" and "$schema"
> 2. Remove "allOf" label
> 3. Change node name from "i2c1" to "i2c"
> 4. Change node name from "typec" to "usb-typec"
> ---
> .../bindings/usb/analogix,anx7411.yaml | 76 +++++++++++++++++++
> 1 file changed, 76 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/usb/analogix,anx7411.yaml
>
> diff --git a/Documentation/devicetree/bindings/usb/analogix,anx7411.yaml b/Documentation/devicetree/bindings/usb/analogix,anx7411.yaml
> new file mode 100644
> index 000000000000..57429864d499
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/analogix,anx7411.yaml
> @@ -0,0 +1,76 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/usb/analogix,anx7411.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analogix ANX7411 Type-C controller bindings
> +
> +maintainers:
> + - Xin Ji <[email protected]>
> +
> +properties:
> + compatible:
> + enum:
> + - analogix,anx7411
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + connector:
> + type: object
> + $ref: ../connector/usb-connector.yaml
> + description:
> + Properties for usb c connector.
> +
> + properties:
> + compatible:
> + const: usb-c-connector
> +
> + power-role: true
> +
> + data-role: true
> +
> + try-power-role: true
> +
> + required:
> + - compatible
> +
> +required:
> + - compatible
> + - reg
> + - connector
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/irq.h>
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + usb-typec: anx7411@2C {

1. node name is still not correct.
2. lowercase hex, so @2c.

> + compatible = "analogix,anx7411";
> + reg = <0x2C>;

lowercase hex

> + interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
> + interrupt-parent = <&gpio0>;
> +
> + typec_con: connector {
> + compatible = "usb-c-connector";
> + power-role = "dual";
> + data-role = "dual";
> + try-power-role = "source";

The DT schema requires ports property and just "port" is not accepted.

> +
> + port {
> + typec_con_ep: endpoint {
> + remote-endpoint = <&usbotg_hs_ep>;
> + };
> + };
> + };
> + };
> + };
> +...


Best regards,
Krzysztof

2022-07-06 03:15:32

by Xin Ji

[permalink] [raw]
Subject: Re: [PATCH v13 2/3] dt-bindings: usb: Add analogix anx7411 PD binding

Hi Krzysztof Kozlowski, thanks for your comment, I'll change it in the
next serial.

Thanks,
Xin

On Tue, Jul 05, 2022 at 04:27:28PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2022 07:36, Xin Ji wrote:
> > Add analogix PD chip anx7411 device binding
> >
> > Reviewed-by: Rob Herring <[email protected]>
> > Signed-off-by: Xin Ji <[email protected]>
> >
> > ---
> > v12 -> v13 :
> > 1. Drop the quotes for "$id" and "$schema"
> > 2. Remove "allOf" label
> > 3. Change node name from "i2c1" to "i2c"
> > 4. Change node name from "typec" to "usb-typec"
> > ---
> > .../bindings/usb/analogix,anx7411.yaml | 76 +++++++++++++++++++
> > 1 file changed, 76 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/usb/analogix,anx7411.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/usb/analogix,anx7411.yaml b/Documentation/devicetree/bindings/usb/analogix,anx7411.yaml
> > new file mode 100644
> > index 000000000000..57429864d499
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/usb/analogix,anx7411.yaml
> > @@ -0,0 +1,76 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > +%YAML 1.2
> > +---
> > +$id: https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fschemas%2Fusb%2Fanalogix%2Canx7411.yaml%23&amp;data=05%7C01%7Cxji%40analogixsemi.com%7Cbb10f7b74a6d4924d7a108da5e928029%7Cb099b0b4f26c4cf59a0fd5be9acab205%7C0%7C0%7C637926280579332615%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=JfpqaGXa6TUI7iOzxcxOuSaQaMHdoWxqH1fTJCuHi%2Fs%3D&amp;reserved=0
> > +$schema: https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fmeta-schemas%2Fcore.yaml%23&amp;data=05%7C01%7Cxji%40analogixsemi.com%7Cbb10f7b74a6d4924d7a108da5e928029%7Cb099b0b4f26c4cf59a0fd5be9acab205%7C0%7C0%7C637926280579332615%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=oK3lhKtiDat%2Bm1u7%2BacAImLuxsQ%2BkYTV9TCtZAweK2A%3D&amp;reserved=0
> > +
> > +title: Analogix ANX7411 Type-C controller bindings
> > +
> > +maintainers:
> > + - Xin Ji <[email protected]>
> > +
> > +properties:
> > + compatible:
> > + enum:
> > + - analogix,anx7411
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + connector:
> > + type: object
> > + $ref: ../connector/usb-connector.yaml
> > + description:
> > + Properties for usb c connector.
> > +
> > + properties:
> > + compatible:
> > + const: usb-c-connector
> > +
> > + power-role: true
> > +
> > + data-role: true
> > +
> > + try-power-role: true
> > +
> > + required:
> > + - compatible
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - connector
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > + #include <dt-bindings/interrupt-controller/irq.h>
> > + i2c {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + usb-typec: anx7411@2C {
>
> 1. node name is still not correct.
> 2. lowercase hex, so @2c.
OK
>
> > + compatible = "analogix,anx7411";
> > + reg = <0x2C>;
>
> lowercase hex
OK
>
> > + interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
> > + interrupt-parent = <&gpio0>;
> > +
> > + typec_con: connector {
> > + compatible = "usb-c-connector";
> > + power-role = "dual";
> > + data-role = "dual";
> > + try-power-role = "source";
>
> The DT schema requires ports property and just "port" is not accepted.
OK
>
> > +
> > + port {
> > + typec_con_ep: endpoint {
> > + remote-endpoint = <&usbotg_hs_ep>;
> > + };
> > + };
> > + };
> > + };
> > + };
> > +...
>
>
> Best regards,
> Krzysztof