162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci%YAML 1.2
362306a36Sopenharmony_ci---
462306a36Sopenharmony_ci$id: http://devicetree.org/schemas/mux/mux-consumer.yaml#
562306a36Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
662306a36Sopenharmony_ci
762306a36Sopenharmony_cititle: Common multiplexer controller consumer
862306a36Sopenharmony_ci
962306a36Sopenharmony_cimaintainers:
1062306a36Sopenharmony_ci  - Peter Rosin <peda@axentia.se>
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_cidescription: |
1362306a36Sopenharmony_ci  Mux controller consumers should specify a list of mux controllers that they
1462306a36Sopenharmony_ci  want to use with a property containing a 'mux-ctrl-list':
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci    mux-ctrl-list ::= <single-mux-ctrl> [mux-ctrl-list]
1762306a36Sopenharmony_ci    single-mux-ctrl ::= <mux-ctrl-phandle> [mux-ctrl-specifier]
1862306a36Sopenharmony_ci    mux-ctrl-phandle : phandle to mux controller node
1962306a36Sopenharmony_ci    mux-ctrl-specifier : array of #mux-control-cells specifying the
2062306a36Sopenharmony_ci                         given mux controller (controller specific)
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ci  Mux controller properties should be named "mux-controls". The exact meaning of
2362306a36Sopenharmony_ci  each mux controller property must be documented in the device tree binding for
2462306a36Sopenharmony_ci  each consumer. An optional property "mux-control-names" may contain a list of
2562306a36Sopenharmony_ci  strings to label each of the mux controllers listed in the "mux-controls"
2662306a36Sopenharmony_ci  property.
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci  If it is required to provide the state that the mux controller needs to
2962306a36Sopenharmony_ci  be set to, the property "mux-states" must be used. An optional property
3062306a36Sopenharmony_ci  "mux-state-names" can be used to provide a list of strings, to label
3162306a36Sopenharmony_ci  each of the multiplixer states listed in the "mux-states" property.
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci  Properties "mux-controls" and "mux-states" can be used depending on how
3462306a36Sopenharmony_ci  the consumers want to control the mux controller. If the consumer needs
3562306a36Sopenharmony_ci  needs to set multiple states in a mux controller, then property
3662306a36Sopenharmony_ci  "mux-controls" can be used. If the consumer needs to set the mux
3762306a36Sopenharmony_ci  controller to a given state then property "mux-states" can be used.
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci  mux-ctrl-specifier typically encodes the chip-relative mux controller number.
4062306a36Sopenharmony_ci  If the mux controller chip only provides a single mux controller, the
4162306a36Sopenharmony_ci  mux-ctrl-specifier can typically be left out.
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ciselect: true
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ciproperties:
4662306a36Sopenharmony_ci  mux-controls:
4762306a36Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/phandle-array
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ci  mux-states:
5062306a36Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/phandle-array
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_ci  mux-control-names:
5362306a36Sopenharmony_ci    description:
5462306a36Sopenharmony_ci      Devices that use more than a single mux controller can use the
5562306a36Sopenharmony_ci      "mux-control-names" property to map the name of the requested mux
5662306a36Sopenharmony_ci      controller to an index into the list given by the "mux-controls" property.
5762306a36Sopenharmony_ci
5862306a36Sopenharmony_ci  mux-state-names:
5962306a36Sopenharmony_ci    description:
6062306a36Sopenharmony_ci      Devices that use more than a single multiplexer state can use the
6162306a36Sopenharmony_ci      "mux-state-names" property to map the name of the requested mux
6262306a36Sopenharmony_ci      controller to an index into the list given by the "mux-states"
6362306a36Sopenharmony_ci      property.
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ciadditionalProperties: true
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ci...
68