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

Rob Herring robh at kernel.org
Thu May 20 18:30:53 PDT 2021


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.

> +
> +  mux-control-switch-states:

Not really part of the 'mux-control' binding, but part of the connector. 
So 'typec-orientation-switch-states' or something.

> +    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