xref: /freebsd/sys/contrib/device-tree/Bindings/mux/mux-consumer.yaml (revision e67e85659c0de33e617e5fbf1028c6e8b49eee53)
15956d97fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
25956d97fSEmmanuel Vadot%YAML 1.2
35956d97fSEmmanuel Vadot---
45956d97fSEmmanuel Vadot$id: http://devicetree.org/schemas/mux/mux-consumer.yaml#
55956d97fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
65956d97fSEmmanuel Vadot
75956d97fSEmmanuel Vadottitle: Common multiplexer controller consumer bindings
85956d97fSEmmanuel Vadot
95956d97fSEmmanuel Vadotmaintainers:
105956d97fSEmmanuel Vadot  - Peter Rosin <peda@axentia.se>
115956d97fSEmmanuel Vadot
125956d97fSEmmanuel Vadotdescription: |
135956d97fSEmmanuel Vadot  Mux controller consumers should specify a list of mux controllers that they
145956d97fSEmmanuel Vadot  want to use with a property containing a 'mux-ctrl-list':
155956d97fSEmmanuel Vadot
165956d97fSEmmanuel Vadot    mux-ctrl-list ::= <single-mux-ctrl> [mux-ctrl-list]
175956d97fSEmmanuel Vadot    single-mux-ctrl ::= <mux-ctrl-phandle> [mux-ctrl-specifier]
185956d97fSEmmanuel Vadot    mux-ctrl-phandle : phandle to mux controller node
195956d97fSEmmanuel Vadot    mux-ctrl-specifier : array of #mux-control-cells specifying the
205956d97fSEmmanuel Vadot                         given mux controller (controller specific)
215956d97fSEmmanuel Vadot
225956d97fSEmmanuel Vadot  Mux controller properties should be named "mux-controls". The exact meaning of
235956d97fSEmmanuel Vadot  each mux controller property must be documented in the device tree binding for
245956d97fSEmmanuel Vadot  each consumer. An optional property "mux-control-names" may contain a list of
255956d97fSEmmanuel Vadot  strings to label each of the mux controllers listed in the "mux-controls"
265956d97fSEmmanuel Vadot  property.
275956d97fSEmmanuel Vadot
28*e67e8565SEmmanuel Vadot  If it is required to provide the state that the mux controller needs to
29*e67e8565SEmmanuel Vadot  be set to, the property "mux-states" must be used. An optional property
30*e67e8565SEmmanuel Vadot  "mux-state-names" can be used to provide a list of strings, to label
31*e67e8565SEmmanuel Vadot  each of the multiplixer states listed in the "mux-states" property.
32*e67e8565SEmmanuel Vadot
33*e67e8565SEmmanuel Vadot  Properties "mux-controls" and "mux-states" can be used depending on how
34*e67e8565SEmmanuel Vadot  the consumers want to control the mux controller. If the consumer needs
35*e67e8565SEmmanuel Vadot  needs to set multiple states in a mux controller, then property
36*e67e8565SEmmanuel Vadot  "mux-controls" can be used. If the consumer needs to set the mux
37*e67e8565SEmmanuel Vadot  controller to a given state then property "mux-states" can be used.
38*e67e8565SEmmanuel Vadot
395956d97fSEmmanuel Vadot  mux-ctrl-specifier typically encodes the chip-relative mux controller number.
405956d97fSEmmanuel Vadot  If the mux controller chip only provides a single mux controller, the
415956d97fSEmmanuel Vadot  mux-ctrl-specifier can typically be left out.
425956d97fSEmmanuel Vadot
435956d97fSEmmanuel Vadotselect: true
445956d97fSEmmanuel Vadot
455956d97fSEmmanuel Vadotproperties:
465956d97fSEmmanuel Vadot  mux-controls:
475956d97fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
485956d97fSEmmanuel Vadot
49*e67e8565SEmmanuel Vadot  mux-states:
50*e67e8565SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
51*e67e8565SEmmanuel Vadot
525956d97fSEmmanuel Vadot  mux-control-names:
535956d97fSEmmanuel Vadot    description:
545956d97fSEmmanuel Vadot      Devices that use more than a single mux controller can use the
555956d97fSEmmanuel Vadot      "mux-control-names" property to map the name of the requested mux
565956d97fSEmmanuel Vadot      controller to an index into the list given by the "mux-controls" property.
575956d97fSEmmanuel Vadot
58*e67e8565SEmmanuel Vadot  mux-state-names:
59*e67e8565SEmmanuel Vadot    description:
60*e67e8565SEmmanuel Vadot      Devices that use more than a single multiplexer state can use the
61*e67e8565SEmmanuel Vadot      "mux-state-names" property to map the name of the requested mux
62*e67e8565SEmmanuel Vadot      controller to an index into the list given by the "mux-states"
63*e67e8565SEmmanuel Vadot      property.
64*e67e8565SEmmanuel Vadot
655956d97fSEmmanuel VadotadditionalProperties: true
665956d97fSEmmanuel Vadot
675956d97fSEmmanuel Vadot...
68