diff mbox series

[v12,01/10] dt-bindings: usb: Maxim type-c controller device tree binding document

Message ID 20201029063138.1429760-2-badhri@google.com
State New
Headers show
Series TCPM support for FRS and AutoDischarge Disconnect | expand

Commit Message

Badhri Jagan Sridharan Oct. 29, 2020, 6:31 a.m. UTC
Add device tree binding document for Maxim 33359 Type-C chip driver

Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Changes since v1:
- Changing patch version to v6 to fix version number confusion.

Changes since v6:
- Migrated to yaml format.

Changes since v7:
- Rebase on usb-next

Changes since v8:
- Fix errors from make dt_binding_check as suggested by
  Rob Herring.

Changes since v9:
- additionalProperties: false as suggested by Rob Herring.

Changes since v10:
- Added the chip number to the binding as suggested by Rob Herring.
- Renamed the filename as well.

Changes since v11:
Addressed comments from Rob Herring to rename from maxim,33359
to maxim,max33359
---
 .../bindings/usb/maxim,max33359.yaml          | 75 +++++++++++++++++++
 1 file changed, 75 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/maxim,max33359.yaml

Comments

Rob Herring Oct. 29, 2020, 3:33 p.m. UTC | #1
On Wed, 28 Oct 2020 23:31:29 -0700, Badhri Jagan Sridharan wrote:
> Add device tree binding document for Maxim 33359 Type-C chip driver

> 

> Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>

> Reviewed-by: Rob Herring <robh@kernel.org>

> ---

> Changes since v1:

> - Changing patch version to v6 to fix version number confusion.

> 

> Changes since v6:

> - Migrated to yaml format.

> 

> Changes since v7:

> - Rebase on usb-next

> 

> Changes since v8:

> - Fix errors from make dt_binding_check as suggested by

>   Rob Herring.

> 

> Changes since v9:

> - additionalProperties: false as suggested by Rob Herring.

> 

> Changes since v10:

> - Added the chip number to the binding as suggested by Rob Herring.

> - Renamed the filename as well.

> 

> Changes since v11:

> Addressed comments from Rob Herring to rename from maxim,33359

> to maxim,max33359

> ---

>  .../bindings/usb/maxim,max33359.yaml          | 75 +++++++++++++++++++

>  1 file changed, 75 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/usb/maxim,max33359.yaml

> 



My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Error: Documentation/devicetree/bindings/usb/maxim,max33359.example.dts:39.53-54 syntax error
FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:342: Documentation/devicetree/bindings/usb/maxim,max33359.example.dt.yaml] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1364: dt_binding_check] Error 2


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

The base for the patch is generally the last rc1. Any dependencies
should be noted.

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.
Badhri Jagan Sridharan Oct. 29, 2020, 8:01 p.m. UTC | #2
Hi Rob,

The error seems to be because the following patch
5ed132db5ad4 dt-bindings: connector: Add property to set initial
current cap for FRS
is in usb-next but not in the rc1 branch yet. To make the bot
recognize that this is a
dependency, Is it suffice to mention the following in the commit description?
This patch depends on patch "dt-bindings: connector: Add property to
set initial current cap for FRS".
Or is there something else that I should do ?

Thanks,
Badhri


On Thu, Oct 29, 2020 at 8:33 AM Rob Herring <robh@kernel.org> wrote:
>
> On Wed, 28 Oct 2020 23:31:29 -0700, Badhri Jagan Sridharan wrote:
> > Add device tree binding document for Maxim 33359 Type-C chip driver
> >
> > Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
> > Reviewed-by: Rob Herring <robh@kernel.org>
> > ---
> > Changes since v1:
> > - Changing patch version to v6 to fix version number confusion.
> >
> > Changes since v6:
> > - Migrated to yaml format.
> >
> > Changes since v7:
> > - Rebase on usb-next
> >
> > Changes since v8:
> > - Fix errors from make dt_binding_check as suggested by
> >   Rob Herring.
> >
> > Changes since v9:
> > - additionalProperties: false as suggested by Rob Herring.
> >
> > Changes since v10:
> > - Added the chip number to the binding as suggested by Rob Herring.
> > - Renamed the filename as well.
> >
> > Changes since v11:
> > Addressed comments from Rob Herring to rename from maxim,33359
> > to maxim,max33359
> > ---
> >  .../bindings/usb/maxim,max33359.yaml          | 75 +++++++++++++++++++
> >  1 file changed, 75 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/usb/maxim,max33359.yaml
> >
>
>
> My bot found errors running 'make dt_binding_check' on your patch:
>
> yamllint warnings/errors:
>
> dtschema/dtc warnings/errors:
> Error: Documentation/devicetree/bindings/usb/maxim,max33359.example.dts:39.53-54 syntax error
> FATAL ERROR: Unable to parse input tree
> make[1]: *** [scripts/Makefile.lib:342: Documentation/devicetree/bindings/usb/maxim,max33359.example.dt.yaml] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make: *** [Makefile:1364: dt_binding_check] Error 2
>
>
> See https://patchwork.ozlabs.org/patch/1389879
>
> The base for the patch is generally the last rc1. Any dependencies
> should be noted.
>
> 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.
>
Greg Kroah-Hartman Nov. 6, 2020, 10:45 a.m. UTC | #3
On Thu, Oct 29, 2020 at 01:01:52PM -0700, Badhri Jagan Sridharan wrote:
> Hi Rob,

> 

> The error seems to be because the following patch

> 5ed132db5ad4 dt-bindings: connector: Add property to set initial

> current cap for FRS

> is in usb-next but not in the rc1 branch yet. To make the bot

> recognize that this is a

> dependency, Is it suffice to mention the following in the commit description?

> This patch depends on patch "dt-bindings: connector: Add property to

> set initial current cap for FRS".

> Or is there something else that I should do ?


This should all be in linux-next, Rob, is that ok?

thanks,

greg k-h
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/maxim,max33359.yaml b/Documentation/devicetree/bindings/usb/maxim,max33359.yaml
new file mode 100644
index 000000000000..93a19eda610b
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/maxim,max33359.yaml
@@ -0,0 +1,75 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/usb/maxim,max33359.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Maxim TCPCI Type-C PD controller DT bindings
+
+maintainers:
+  - Badhri Jagan Sridharan <badhri@google.com>
+
+description: Maxim TCPCI Type-C PD controller
+
+properties:
+  compatible:
+    enum:
+      - maxim,max33359
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  connector:
+    type: object
+    $ref: ../connector/usb-connector.yaml#
+    description:
+      Properties for usb c connector.
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - connector
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/usb/pd.h>
+    i2c0 {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        maxtcpc@25 {
+            compatible = "maxim,max33359";
+            reg = <0x25>;
+            interrupt-parent = <&gpa8>;
+            interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
+
+            connector {
+                compatible = "usb-c-connector";
+                label = "USB-C";
+                data-role = "dual";
+                power-role = "dual";
+                try-power-role = "sink";
+                self-powered;
+                op-sink-microwatt = <2600000>;
+                new-source-frs-typec-current = <FRS_5V_1P5A>;
+                source-pdos = <PDO_FIXED(5000, 900,
+                                         PDO_FIXED_SUSPEND |
+                                         PDO_FIXED_USB_COMM |
+                                         PDO_FIXED_DATA_SWAP |
+                                         PDO_FIXED_DUAL_ROLE)>;
+                sink-pdos = <PDO_FIXED(5000, 3000,
+                                       PDO_FIXED_USB_COMM |
+                                       PDO_FIXED_DATA_SWAP |
+                                       PDO_FIXED_DUAL_ROLE)
+                                       PDO_FIXED(9000, 2000, 0)>;
+            };
+        };
+    };
+...