15956d97fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 25956d97fSEmmanuel Vadot%YAML 1.2 35956d97fSEmmanuel Vadot--- 45956d97fSEmmanuel Vadot$id: http://devicetree.org/schemas/iio/multiplexer/io-channel-mux.yaml# 55956d97fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 65956d97fSEmmanuel Vadot 7*8bab661aSEmmanuel Vadottitle: I/O channel multiplexer 85956d97fSEmmanuel Vadot 95956d97fSEmmanuel Vadotmaintainers: 105956d97fSEmmanuel Vadot - Peter Rosin <peda@axentia.se> 115956d97fSEmmanuel Vadot 125956d97fSEmmanuel Vadotdescription: | 135956d97fSEmmanuel Vadot If a multiplexer is used to select which hardware signal is fed to 145956d97fSEmmanuel Vadot e.g. an ADC channel, these bindings describe that situation. 155956d97fSEmmanuel Vadot 165956d97fSEmmanuel Vadot For each non-empty string in the channels property, an io-channel will be 175956d97fSEmmanuel Vadot created. The number of this io-channel is the same as the index into the list 185956d97fSEmmanuel Vadot of strings in the channels property, and also matches the mux controller 195956d97fSEmmanuel Vadot state. The mux controller state is described in 205956d97fSEmmanuel Vadot Documentation/devicetree/bindings/mux/mux-controller.yaml 215956d97fSEmmanuel Vadot 225956d97fSEmmanuel Vadotproperties: 235956d97fSEmmanuel Vadot 245956d97fSEmmanuel Vadot compatible: 255956d97fSEmmanuel Vadot const: io-channel-mux 265956d97fSEmmanuel Vadot 275956d97fSEmmanuel Vadot io-channels: 285956d97fSEmmanuel Vadot maxItems: 1 295956d97fSEmmanuel Vadot description: Channel node of the parent channel that has multiplexed input. 305956d97fSEmmanuel Vadot 315956d97fSEmmanuel Vadot io-channel-names: 325956d97fSEmmanuel Vadot const: parent 335956d97fSEmmanuel Vadot 345956d97fSEmmanuel Vadot mux-controls: true 355956d97fSEmmanuel Vadot mux-control-names: true 365956d97fSEmmanuel Vadot 375956d97fSEmmanuel Vadot channels: 388cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/non-unique-string-array 395956d97fSEmmanuel Vadot description: 408cc087a1SEmmanuel Vadot List of strings, labeling the mux controller states. An empty 418cc087a1SEmmanuel Vadot string for a state means that the channel is not available. 428cc087a1SEmmanuel Vadot 438cc087a1SEmmanuel Vadot settle-time-us: 448cc087a1SEmmanuel Vadot default: 0 458cc087a1SEmmanuel Vadot description: 468cc087a1SEmmanuel Vadot Time required for analog signals to settle after muxing. 478cc087a1SEmmanuel Vadot 488cc087a1SEmmanuel Vadot "#io-channel-cells": 498cc087a1SEmmanuel Vadot const: 1 505956d97fSEmmanuel Vadot 515956d97fSEmmanuel Vadotrequired: 525956d97fSEmmanuel Vadot - compatible 535956d97fSEmmanuel Vadot - io-channels 545956d97fSEmmanuel Vadot - io-channel-names 555956d97fSEmmanuel Vadot - mux-controls 565956d97fSEmmanuel Vadot - channels 575956d97fSEmmanuel Vadot 585956d97fSEmmanuel VadotadditionalProperties: false 595956d97fSEmmanuel Vadot 605956d97fSEmmanuel Vadotexamples: 615956d97fSEmmanuel Vadot - | 625956d97fSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 635956d97fSEmmanuel Vadot mux: mux-controller { 645956d97fSEmmanuel Vadot compatible = "gpio-mux"; 655956d97fSEmmanuel Vadot #mux-control-cells = <0>; 665956d97fSEmmanuel Vadot 675956d97fSEmmanuel Vadot mux-gpios = <&pioA 0 GPIO_ACTIVE_HIGH>, 685956d97fSEmmanuel Vadot <&pioA 1 GPIO_ACTIVE_HIGH>; 695956d97fSEmmanuel Vadot }; 705956d97fSEmmanuel Vadot 715956d97fSEmmanuel Vadot adc-mux { 725956d97fSEmmanuel Vadot compatible = "io-channel-mux"; 735956d97fSEmmanuel Vadot io-channels = <&adc 0>; 745956d97fSEmmanuel Vadot io-channel-names = "parent"; 755956d97fSEmmanuel Vadot 765956d97fSEmmanuel Vadot mux-controls = <&mux>; 775956d97fSEmmanuel Vadot channels = "sync", "in", "system-regulator"; 785956d97fSEmmanuel Vadot }; 795956d97fSEmmanuel Vadot... 80