xref: /openbmc/linux/Documentation/devicetree/bindings/mux/mux-consumer.yaml (revision 7ae9fb1b7ecbb5d85d07857943f677fd1a559b18)
19b358af7SRob Herring# SPDX-License-Identifier: GPL-2.0
29b358af7SRob Herring%YAML 1.2
39b358af7SRob Herring---
49b358af7SRob Herring$id: http://devicetree.org/schemas/mux/mux-consumer.yaml#
59b358af7SRob Herring$schema: http://devicetree.org/meta-schemas/core.yaml#
69b358af7SRob Herring
7*84e85359SKrzysztof Kozlowskititle: Common multiplexer controller consumer
89b358af7SRob Herring
99b358af7SRob Herringmaintainers:
109b358af7SRob Herring  - Peter Rosin <peda@axentia.se>
119b358af7SRob Herring
129b358af7SRob Herringdescription: |
139b358af7SRob Herring  Mux controller consumers should specify a list of mux controllers that they
149b358af7SRob Herring  want to use with a property containing a 'mux-ctrl-list':
159b358af7SRob Herring
169b358af7SRob Herring    mux-ctrl-list ::= <single-mux-ctrl> [mux-ctrl-list]
179b358af7SRob Herring    single-mux-ctrl ::= <mux-ctrl-phandle> [mux-ctrl-specifier]
189b358af7SRob Herring    mux-ctrl-phandle : phandle to mux controller node
199b358af7SRob Herring    mux-ctrl-specifier : array of #mux-control-cells specifying the
209b358af7SRob Herring                         given mux controller (controller specific)
219b358af7SRob Herring
229b358af7SRob Herring  Mux controller properties should be named "mux-controls". The exact meaning of
239b358af7SRob Herring  each mux controller property must be documented in the device tree binding for
249b358af7SRob Herring  each consumer. An optional property "mux-control-names" may contain a list of
259b358af7SRob Herring  strings to label each of the mux controllers listed in the "mux-controls"
269b358af7SRob Herring  property.
279b358af7SRob Herring
288f2cade5SAswath Govindraju  If it is required to provide the state that the mux controller needs to
298f2cade5SAswath Govindraju  be set to, the property "mux-states" must be used. An optional property
308f2cade5SAswath Govindraju  "mux-state-names" can be used to provide a list of strings, to label
318f2cade5SAswath Govindraju  each of the multiplixer states listed in the "mux-states" property.
328f2cade5SAswath Govindraju
338f2cade5SAswath Govindraju  Properties "mux-controls" and "mux-states" can be used depending on how
348f2cade5SAswath Govindraju  the consumers want to control the mux controller. If the consumer needs
358f2cade5SAswath Govindraju  needs to set multiple states in a mux controller, then property
368f2cade5SAswath Govindraju  "mux-controls" can be used. If the consumer needs to set the mux
378f2cade5SAswath Govindraju  controller to a given state then property "mux-states" can be used.
388f2cade5SAswath Govindraju
399b358af7SRob Herring  mux-ctrl-specifier typically encodes the chip-relative mux controller number.
409b358af7SRob Herring  If the mux controller chip only provides a single mux controller, the
419b358af7SRob Herring  mux-ctrl-specifier can typically be left out.
429b358af7SRob Herring
439b358af7SRob Herringselect: true
449b358af7SRob Herring
459b358af7SRob Herringproperties:
469b358af7SRob Herring  mux-controls:
479b358af7SRob Herring    $ref: /schemas/types.yaml#/definitions/phandle-array
489b358af7SRob Herring
498f2cade5SAswath Govindraju  mux-states:
508f2cade5SAswath Govindraju    $ref: /schemas/types.yaml#/definitions/phandle-array
518f2cade5SAswath Govindraju
529b358af7SRob Herring  mux-control-names:
539b358af7SRob Herring    description:
549b358af7SRob Herring      Devices that use more than a single mux controller can use the
559b358af7SRob Herring      "mux-control-names" property to map the name of the requested mux
569b358af7SRob Herring      controller to an index into the list given by the "mux-controls" property.
579b358af7SRob Herring
588f2cade5SAswath Govindraju  mux-state-names:
598f2cade5SAswath Govindraju    description:
608f2cade5SAswath Govindraju      Devices that use more than a single multiplexer state can use the
618f2cade5SAswath Govindraju      "mux-state-names" property to map the name of the requested mux
628f2cade5SAswath Govindraju      controller to an index into the list given by the "mux-states"
638f2cade5SAswath Govindraju      property.
648f2cade5SAswath Govindraju
659b358af7SRob HerringadditionalProperties: true
669b358af7SRob Herring
679b358af7SRob Herring...
68