[PATCH 1/4] dt-bindings: connector: Add typec orientation switch properties

Jun Li jun.li at nxp.com
Tue May 25 04:48:15 PDT 2021


Hi

> -----Original Message-----
> From: Rob Herring <robh at kernel.org>
> Sent: Friday, May 21, 2021 9:31 AM
> To: Jun Li <jun.li at nxp.com>
> Cc: heikki.krogerus at linux.intel.com; shawnguo at kernel.org;
> gregkh at linuxfoundation.org; linux at roeck-us.net;
> linux-usb at vger.kernel.org; dl-linux-imx <linux-imx at nxp.com>;
> devicetree at vger.kernel.org; linux-arm-kernel at lists.infradead.org
> Subject: Re: [PATCH 1/4] dt-bindings: connector: Add typec orientation
> switch properties
> 
> On Wed, May 19, 2021 at 03:14:47PM +0800, Li Jun wrote:
> > Typec orientation switch can be implementaed as a consumer of mux
> > controller, with this way, mux-control-name must be provided with name
> > "typec-orientation-switch", along with its 3 states value array for
> > none(high impedance), cc1, cc2.
> >
> > Signed-off-by: Li Jun <jun.li at nxp.com>
> > ---
> >  .../bindings/connector/usb-connector.yaml     | 21 +++++++++++++++++++
> >  1 file changed, 21 insertions(+)
> >
> > diff --git
> > a/Documentation/devicetree/bindings/connector/usb-connector.yaml
> > b/Documentation/devicetree/bindings/connector/usb-connector.yaml
> > index 32509b98142e..567183e199a3 100644
> > --- a/Documentation/devicetree/bindings/connector/usb-connector.yaml
> > +++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml
> > @@ -111,6 +111,24 @@ properties:
> >        - 1.5A
> >        - 3.0A
> >
> > +  mux-controls:
> > +    description:
> > +      mux controller node to use for orientation switch selection.
> > +    maxItems: 1
> > +
> > +  mux-control-name:
> > +    items:
> > +      - const: typec-orientation-switch
> 
> Don't really need a name with only 1 entry.

Okay, will remove it.

> 
> > +
> > +  mux-control-switch-states:
> 
> Not really part of the 'mux-control' binding, but part of the connector.

Yes, agree.

> So 'typec-orientation-switch-states' or something.

will use typec-orientation-switch-states.

Thanks
Li Jun
> 
> > +    description: |
> > +      An ordered u32 array describing the mux state value for each typec
> > +      orientations: NONE(high impedance), CC1, CC2, if there is no HW mux
> > +      state for NONE, use value of CC1 or CC2 for it,
> > +    minItems: 3
> > +    maxItems: 3
> > +    $ref: /schemas/types.yaml#/definitions/uint32-array
> > +
> >    # The following are optional properties for "usb-c-connector" with power
> >    # delivery support.
> >    source-pdos:
> > @@ -301,6 +319,9 @@ examples:
> >          sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)
> >                       PDO_VAR(5000, 12000, 2000)>;
> >          op-sink-microwatt = <10000000>;
> > +        mux-controls = <&mux>;
> > +        mux-control-names = "typec-orientation-switch";
> > +        mux-control-switch-states = <2>, <0>, <1>;
> >        };
> >      };
> >
> > --
> > 2.25.1
> >



More information about the linux-arm-kernel mailing list