Merge tag 'sched_ext-for-6.12-rc1-fixes-1' of git://git.kernel.org/pub/scm/linux...
[linux-block.git] / Documentation / devicetree / bindings / spi / spi-mux.yaml
CommitLineData
d548ed71
CP
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/spi/spi-mux.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Generic SPI Multiplexer
8
9description: |
10 This binding describes a SPI bus multiplexer to route the SPI chip select
11 signals. This can be used when you need more devices than the SPI controller
12 has chip selects available. An example setup is shown in ASCII art; the actual
13 setting of the multiplexer to a channel needs to be done by a specific SPI mux
14 driver.
15
16 MOSI /--------------------------------+--------+--------+--------\
17 MISO |/------------------------------+|-------+|-------+|-------\|
18 SCL ||/----------------------------+||------+||------+||------\||
19 ||| ||| ||| ||| |||
20 +------------+ ||| ||| ||| |||
21 | SoC ||| | +-+++-+ +-+++-+ +-+++-+ +-+++-+
22 | ||| | | dev | | dev | | dev | | dev |
23 | +--+++-+ | CS-X +------+\ +--+--+ +--+--+ +--+--+ +--+--+
24 | | SPI +-|-------+ Mux |\\ CS-0 | | | |
25 | +------+ | +--+---+\\\-------/ CS-1 | | |
26 | | | \\\----------------/ CS-2 | |
27 | +------+ | | \\-------------------------/ CS-3 |
28 | | ? +-|----------/ \----------------------------------/
29 | +------+ |
30 +------------+
31
32allOf:
99a7fa0e
KK
33 - $ref: /schemas/spi/spi-controller.yaml#
34 - $ref: /schemas/spi/spi-peripheral-props.yaml#
d548ed71
CP
35
36maintainers:
37 - Chris Packham <chris.packham@alliedtelesis.co.nz>
38
39properties:
40 compatible:
41 const: spi-mux
42
43 mux-controls:
44 maxItems: 1
45
46required:
f516fb70
RH
47 - compatible
48 - reg
49 - spi-max-frequency
50 - mux-controls
d548ed71 51
6fdc6e23
RH
52unevaluatedProperties: false
53
d548ed71 54examples:
f516fb70
RH
55 - |
56 #include <dt-bindings/gpio/gpio.h>
57 mux: mux-controller {
58 compatible = "gpio-mux";
59 #mux-control-cells = <0>;
d548ed71 60
f516fb70
RH
61 mux-gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
62 };
d548ed71 63
f516fb70
RH
64 spi {
65 #address-cells = <1>;
66 #size-cells = <0>;
67 spi@0 {
68 compatible = "spi-mux";
69 reg = <0>;
70 #address-cells = <1>;
71 #size-cells = <0>;
72 spi-max-frequency = <100000000>;
d548ed71 73
f516fb70 74 mux-controls = <&mux>;
d548ed71 75
0b07154f 76 flash@0 {
f516fb70
RH
77 compatible = "jedec,spi-nor";
78 reg = <0>;
f516fb70
RH
79 spi-max-frequency = <40000000>;
80 };
d548ed71 81
28ffe8bf
RH
82 sensor@1 {
83 compatible = "bosch,bme680";
f516fb70 84 reg = <1>;
f516fb70
RH
85 spi-max-frequency = <10000000>;
86 };
87 };
88 };