summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/mux
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2022-01-27 11:22:53 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2022-01-28 15:31:59 +0100
commit5f3e773ca4830daf71c7b5eee0c6b1dfe4d09c08 (patch)
tree0634f20e5f75f3d44242af47eebd9ea1ce0163f6 /dts/Bindings/mux
parentdb35548372eaee835fbf9bae68c08362ba59d49d (diff)
downloadbarebox-5f3e773ca4830daf71c7b5eee0c6b1dfe4d09c08.tar.gz
barebox-5f3e773ca4830daf71c7b5eee0c6b1dfe4d09c08.tar.xz
dts: update to v5.17-rc1
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'dts/Bindings/mux')
-rw-r--r--dts/Bindings/mux/gpio-mux.yaml11
-rw-r--r--dts/Bindings/mux/mux-consumer.yaml21
-rw-r--r--dts/Bindings/mux/mux-controller.yaml26
3 files changed, 55 insertions, 3 deletions
diff --git a/dts/Bindings/mux/gpio-mux.yaml b/dts/Bindings/mux/gpio-mux.yaml
index 0a7c8d6498..ee4de9fbaf 100644
--- a/dts/Bindings/mux/gpio-mux.yaml
+++ b/dts/Bindings/mux/gpio-mux.yaml
@@ -26,7 +26,10 @@ properties:
List of gpios used to control the multiplexer, least significant bit first.
'#mux-control-cells':
- const: 0
+ enum: [ 0, 1 ]
+
+ '#mux-state-cells':
+ enum: [ 1, 2 ]
idle-state:
default: -1
@@ -34,7 +37,11 @@ properties:
required:
- compatible
- mux-gpios
- - "#mux-control-cells"
+anyOf:
+ - required:
+ - "#mux-control-cells"
+ - required:
+ - "#mux-state-cells"
additionalProperties: false
diff --git a/dts/Bindings/mux/mux-consumer.yaml b/dts/Bindings/mux/mux-consumer.yaml
index 7af93298ab..d3d8549673 100644
--- a/dts/Bindings/mux/mux-consumer.yaml
+++ b/dts/Bindings/mux/mux-consumer.yaml
@@ -25,6 +25,17 @@ description: |
strings to label each of the mux controllers listed in the "mux-controls"
property.
+ If it is required to provide the state that the mux controller needs to
+ be set to, the property "mux-states" must be used. An optional property
+ "mux-state-names" can be used to provide a list of strings, to label
+ each of the multiplixer states listed in the "mux-states" property.
+
+ Properties "mux-controls" and "mux-states" can be used depending on how
+ the consumers want to control the mux controller. If the consumer needs
+ needs to set multiple states in a mux controller, then property
+ "mux-controls" can be used. If the consumer needs to set the mux
+ controller to a given state then property "mux-states" can be used.
+
mux-ctrl-specifier typically encodes the chip-relative mux controller number.
If the mux controller chip only provides a single mux controller, the
mux-ctrl-specifier can typically be left out.
@@ -35,12 +46,22 @@ properties:
mux-controls:
$ref: /schemas/types.yaml#/definitions/phandle-array
+ mux-states:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+
mux-control-names:
description:
Devices that use more than a single mux controller can use the
"mux-control-names" property to map the name of the requested mux
controller to an index into the list given by the "mux-controls" property.
+ mux-state-names:
+ description:
+ Devices that use more than a single multiplexer state can use the
+ "mux-state-names" property to map the name of the requested mux
+ controller to an index into the list given by the "mux-states"
+ property.
+
additionalProperties: true
...
diff --git a/dts/Bindings/mux/mux-controller.yaml b/dts/Bindings/mux/mux-controller.yaml
index 736a84c3b6..c855fbad38 100644
--- a/dts/Bindings/mux/mux-controller.yaml
+++ b/dts/Bindings/mux/mux-controller.yaml
@@ -25,7 +25,9 @@ description: |
--------------------
Mux controller nodes must specify the number of cells used for the
- specifier using the '#mux-control-cells' property.
+ specifier using the '#mux-control-cells' or '#mux-state-cells' property.
+ The value of '#mux-state-cells' will always be one greater than the value
+ of '#mux-control-cells'.
Optionally, mux controller nodes can also specify the state the mux should
have when it is idle. The idle-state property is used for this. If the
@@ -67,6 +69,8 @@ select:
pattern: '^mux-controller'
- required:
- '#mux-control-cells'
+ - required:
+ - '#mux-state-cells'
properties:
$nodename:
@@ -75,6 +79,9 @@ properties:
'#mux-control-cells':
enum: [ 0, 1 ]
+ '#mux-state-cells':
+ enum: [ 1, 2 ]
+
idle-state:
$ref: /schemas/types.yaml#/definitions/int32
minimum: -2
@@ -179,4 +186,21 @@ examples:
};
};
};
+
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ mux1: mux-controller {
+ compatible = "gpio-mux";
+ #mux-state-cells = <1>;
+ mux-gpios = <&exp_som 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ transceiver4: can-phy4 {
+ compatible = "ti,tcan1042";
+ #phy-cells = <0>;
+ max-bitrate = <5000000>;
+ standby-gpios = <&exp_som 7 GPIO_ACTIVE_HIGH>;
+ mux-states = <&mux1 1>;
+ };
...