diff mbox series

[v9,03/15] dt-bindings: usb: Maxim type-c controller device tree binding document

Message ID 20200929024004.244992-4-badhri@google.com (mailing list archive)
State Superseded
Headers show
Series TCPM support for FRS and AutoDischarge Disconnect | expand

Commit Message

Badhri Jagan Sridharan Sept. 29, 2020, 2:39 a.m. UTC
Add device tree binding document for Maxim TCPCI based Type-C chip driver

Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
---
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.
---
 .../devicetree/bindings/usb/maxim,tcpci.yaml  | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/maxim,tcpci.yaml

Comments

Rob Herring (Arm) Oct. 5, 2020, 2:46 p.m. UTC | #1
On Mon, Sep 28, 2020 at 07:39:52PM -0700, Badhri Jagan Sridharan wrote:
> Add device tree binding document for Maxim TCPCI based Type-C chip driver
> 
> Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
> ---
> 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.
> ---
>  .../devicetree/bindings/usb/maxim,tcpci.yaml  | 68 +++++++++++++++++++
>  1 file changed, 68 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/usb/maxim,tcpci.yaml
> 
> diff --git a/Documentation/devicetree/bindings/usb/maxim,tcpci.yaml b/Documentation/devicetree/bindings/usb/maxim,tcpci.yaml
> new file mode 100644
> index 000000000000..f4b5f1a09b98
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/maxim,tcpci.yaml
> @@ -0,0 +1,68 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/usb/maxim,tcpci.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,tcpci

Is there a datasheet for this? Searching for 'tcpci' doesn't really come 
up with anything other than this patch. Only chip I found is MAX77958. 
Bindings are for specific h/w devices.

> +
> +  interrupts:
> +    maxItems: 1
> +
> +  connector:
> +    type: object
> +    $ref: ../connector/usb-connector.yaml#
> +    description:
> +      Properties for usb c connector.
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts

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,tcpc";
> +            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>;
> +                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)>;
> +            };
> +        };
> +    };
> +...
> -- 
> 2.28.0.709.gb0816b6eb0-goog
>
Badhri Jagan Sridharan Oct. 8, 2020, 12:42 a.m. UTC | #2
Hi Robb,

Thanks for the reviews ! Responses inline.

Regards,
Badhri

On Mon, Oct 5, 2020 at 7:46 AM Rob Herring <robh@kernel.org> wrote:
>
> On Mon, Sep 28, 2020 at 07:39:52PM -0700, Badhri Jagan Sridharan wrote:
> > Add device tree binding document for Maxim TCPCI based Type-C chip driver
> >
> > Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
> > ---
> > 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.
> > ---
> >  .../devicetree/bindings/usb/maxim,tcpci.yaml  | 68 +++++++++++++++++++
> >  1 file changed, 68 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/usb/maxim,tcpci.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/usb/maxim,tcpci.yaml b/Documentation/devicetree/bindings/usb/maxim,tcpci.yaml
> > new file mode 100644
> > index 000000000000..f4b5f1a09b98
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/usb/maxim,tcpci.yaml
> > @@ -0,0 +1,68 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: "http://devicetree.org/schemas/usb/maxim,tcpci.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,tcpci
>
> Is there a datasheet for this? Searching for 'tcpci' doesn't really come
> up with anything other than this patch. Only chip I found is MAX77958.
> Bindings are for specific h/w devices.

Unfortunately the datasheet cannot be made public yet. Has the datasheet
have to be made public before sending the bindings ?

>
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  connector:
> > +    type: object
> > +    $ref: ../connector/usb-connector.yaml#
> > +    description:
> > +      Properties for usb c connector.
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - interrupts
>
> additionalProperties: false

ACK. Adding to the next version of the patch.

>
> > +
> > +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,tcpc";
> > +            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>;
> > +                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)>;
> > +            };
> > +        };
> > +    };
> > +...
> > --
> > 2.28.0.709.gb0816b6eb0-goog
> >
Rob Herring (Arm) Oct. 13, 2020, 1:43 p.m. UTC | #3
On Wed, Oct 7, 2020 at 7:43 PM Badhri Jagan Sridharan <badhri@google.com> wrote:
>
> Hi Robb,
>
> Thanks for the reviews ! Responses inline.
>
> Regards,
> Badhri
>
> On Mon, Oct 5, 2020 at 7:46 AM Rob Herring <robh@kernel.org> wrote:
> >
> > On Mon, Sep 28, 2020 at 07:39:52PM -0700, Badhri Jagan Sridharan wrote:
> > > Add device tree binding document for Maxim TCPCI based Type-C chip driver
> > >
> > > Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
> > > ---
> > > 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.
> > > ---
> > >  .../devicetree/bindings/usb/maxim,tcpci.yaml  | 68 +++++++++++++++++++
> > >  1 file changed, 68 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/usb/maxim,tcpci.yaml
> > >
> > > diff --git a/Documentation/devicetree/bindings/usb/maxim,tcpci.yaml b/Documentation/devicetree/bindings/usb/maxim,tcpci.yaml
> > > new file mode 100644
> > > index 000000000000..f4b5f1a09b98
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/usb/maxim,tcpci.yaml
> > > @@ -0,0 +1,68 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: "http://devicetree.org/schemas/usb/maxim,tcpci.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,tcpci
> >
> > Is there a datasheet for this? Searching for 'tcpci' doesn't really come
> > up with anything other than this patch. Only chip I found is MAX77958.
> > Bindings are for specific h/w devices.
>
> Unfortunately the datasheet cannot be made public yet. Has the datasheet
> have to be made public before sending the bindings ?

No, but we need a part number or some assurance that 'tcpci' is a specific part.

Rob
Rob Herring (Arm) Oct. 13, 2020, 1:50 p.m. UTC | #4
On Tue, Oct 13, 2020 at 8:43 AM Rob Herring <robh@kernel.org> wrote:
>
> On Wed, Oct 7, 2020 at 7:43 PM Badhri Jagan Sridharan <badhri@google.com> wrote:
> >
> > Hi Robb,
> >
> > Thanks for the reviews ! Responses inline.
> >
> > Regards,
> > Badhri
> >
> > On Mon, Oct 5, 2020 at 7:46 AM Rob Herring <robh@kernel.org> wrote:
> > >
> > > On Mon, Sep 28, 2020 at 07:39:52PM -0700, Badhri Jagan Sridharan wrote:
> > > > Add device tree binding document for Maxim TCPCI based Type-C chip driver
> > > >
> > > > Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
> > > > ---
> > > > 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.
> > > > ---
> > > >  .../devicetree/bindings/usb/maxim,tcpci.yaml  | 68 +++++++++++++++++++
> > > >  1 file changed, 68 insertions(+)
> > > >  create mode 100644 Documentation/devicetree/bindings/usb/maxim,tcpci.yaml
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/usb/maxim,tcpci.yaml b/Documentation/devicetree/bindings/usb/maxim,tcpci.yaml
> > > > new file mode 100644
> > > > index 000000000000..f4b5f1a09b98
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/usb/maxim,tcpci.yaml
> > > > @@ -0,0 +1,68 @@
> > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > > +%YAML 1.2
> > > > +---
> > > > +$id: "http://devicetree.org/schemas/usb/maxim,tcpci.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,tcpci
> > >
> > > Is there a datasheet for this? Searching for 'tcpci' doesn't really come
> > > up with anything other than this patch. Only chip I found is MAX77958.
> > > Bindings are for specific h/w devices.
> >
> > Unfortunately the datasheet cannot be made public yet. Has the datasheet
> > have to be made public before sending the bindings ?
>
> No, but we need a part number or some assurance that 'tcpci' is a specific part.

I guess TCPCI is USB Type-C Port Controller Interface Specification.

That's just a protocol definition, not a chip. DT describes h/w which
is more than just the protocol.

Rob
Badhri Jagan Sridharan Oct. 20, 2020, 6:16 a.m. UTC | #5
Hi Rob,

Apologies for the delay. Was coordinating care for my parents who
caught the COVID bug.

Thanks,
Badhri

On Tue, Oct 13, 2020 at 6:50 AM Rob Herring <robh@kernel.org> wrote:
>
> On Tue, Oct 13, 2020 at 8:43 AM Rob Herring <robh@kernel.org> wrote:
> >
> > On Wed, Oct 7, 2020 at 7:43 PM Badhri Jagan Sridharan <badhri@google.com> wrote:
> > >
> > > Hi Robb,
> > >
> > > Thanks for the reviews ! Responses inline.
> > >
> > > Regards,
> > > Badhri
> > >
> > > On Mon, Oct 5, 2020 at 7:46 AM Rob Herring <robh@kernel.org> wrote:
> > > >
> > > > On Mon, Sep 28, 2020 at 07:39:52PM -0700, Badhri Jagan Sridharan wrote:
> > > > > Add device tree binding document for Maxim TCPCI based Type-C chip driver
> > > > >
> > > > > Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
> > > > > ---
> > > > > 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.
> > > > > ---
> > > > >  .../devicetree/bindings/usb/maxim,tcpci.yaml  | 68 +++++++++++++++++++
> > > > >  1 file changed, 68 insertions(+)
> > > > >  create mode 100644 Documentation/devicetree/bindings/usb/maxim,tcpci.yaml
> > > > >
> > > > > diff --git a/Documentation/devicetree/bindings/usb/maxim,tcpci.yaml b/Documentation/devicetree/bindings/usb/maxim,tcpci.yaml
> > > > > new file mode 100644
> > > > > index 000000000000..f4b5f1a09b98
> > > > > --- /dev/null
> > > > > +++ b/Documentation/devicetree/bindings/usb/maxim,tcpci.yaml
> > > > > @@ -0,0 +1,68 @@
> > > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > > > +%YAML 1.2
> > > > > +---
> > > > > +$id: "http://devicetree.org/schemas/usb/maxim,tcpci.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,tcpci
> > > >
> > > > Is there a datasheet for this? Searching for 'tcpci' doesn't really come
> > > > up with anything other than this patch. Only chip I found is MAX77958.
> > > > Bindings are for specific h/w devices.
> > >
> > > Unfortunately the datasheet cannot be made public yet. Has the datasheet
> > > have to be made public before sending the bindings ?
> >
> > No, but we need a part number or some assurance that 'tcpci' is a specific part.
Sure. Added the part number to the binding and changed the compatible string.
Sending this as part of v11


>
> I guess TCPCI is USB Type-C Port Controller Interface Specification.
>
> That's just a protocol definition, not a chip. DT describes h/w which
> is more than just the protocol.
>
> Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/maxim,tcpci.yaml b/Documentation/devicetree/bindings/usb/maxim,tcpci.yaml
new file mode 100644
index 000000000000..f4b5f1a09b98
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/maxim,tcpci.yaml
@@ -0,0 +1,68 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/usb/maxim,tcpci.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,tcpci
+
+  interrupts:
+    maxItems: 1
+
+  connector:
+    type: object
+    $ref: ../connector/usb-connector.yaml#
+    description:
+      Properties for usb c connector.
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+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,tcpc";
+            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>;
+                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)>;
+            };
+        };
+    };
+...