Merge tag 'safesetid-5.10' of git://github.com/micah-morton/linux
[linux-2.6-microblaze.git] / drivers / staging / wfx / Documentation / devicetree / bindings / net / wireless / silabs,wfx.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 # Copyright (c) 2020, Silicon Laboratories, Inc.
3 %YAML 1.2
4 ---
5
6 $id: http://devicetree.org/schemas/net/wireless/silabs,wfx.yaml#
7 $schema: http://devicetree.org/meta-schemas/core.yaml#
8
9 title: Silicon Labs WFxxx devicetree bindings
10
11 maintainers:
12   - Jérôme Pouiller <jerome.pouiller@silabs.com>
13
14 description:
15   The WFxxx chip series can be connected via SPI or via SDIO.
16
17   For SDIO':'
18
19     The driver is able to detect a WFxxx chip on SDIO bus by matching its Vendor
20     ID and Product ID. However, driver will only provide limited features in
21     this case. Thus declaring WFxxx chip in device tree is recommended (and may
22     become mandatory in the future).
23
24     In addition, it is recommended to declare a mmc-pwrseq on SDIO host above
25     WFx. Without it, you may encounter issues with warm boot. The mmc-pwrseq
26     should be compatible with mmc-pwrseq-simple. Please consult
27     Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.txt for more
28     information.
29
30   For SPI':'
31
32     In add of the properties below, please consult
33     Documentation/devicetree/bindings/spi/spi-controller.yaml for optional SPI
34     related properties.
35
36   Note that in add of the properties below, the WFx driver also supports
37   `mac-address` and `local-mac-address` as described in
38   Documentation/devicetree/bindings/net/ethernet.txt
39
40 properties:
41   compatible:
42     const: silabs,wf200
43   reg:
44     description:
45       When used on SDIO bus, <reg> must be set to 1. When used on SPI bus, it is
46       the chip select address of the device as defined in the SPI devices
47       bindings.
48     maxItems: 1
49   spi-max-frequency:
50     description: (SPI only) Maximum SPI clocking speed of device in Hz.
51     maxItems: 1
52   interrupts:
53     description: The interrupt line. Triggers IRQ_TYPE_LEVEL_HIGH and
54       IRQ_TYPE_EDGE_RISING are both supported by the chip and the driver. When
55       SPI is used, this property is required. When SDIO is used, the "in-band"
56       interrupt provided by the SDIO bus is used unless an interrupt is defined
57       in the Device Tree.
58     maxItems: 1
59   reset-gpios:
60     description: (SPI only) Phandle of gpio that will be used to reset chip
61       during probe. Without this property, you may encounter issues with warm
62       boot. (For legacy purpose, the gpio in inverted when compatible ==
63       "silabs,wfx-spi")
64
65       For SDIO, the reset gpio should declared using a mmc-pwrseq.
66     maxItems: 1
67   wakeup-gpios:
68     description: Phandle of gpio that will be used to wake-up chip. Without this
69       property, driver will disable most of power saving features.
70     maxItems: 1
71   config-file:
72     description: Use an alternative file as PDS. Default is `wf200.pds`. Only
73       necessary for development/debug purpose.
74     maxItems: 1
75
76 required:
77   - compatible
78   - reg
79
80 examples:
81   - |
82     #include <dt-bindings/gpio/gpio.h>
83     #include <dt-bindings/interrupt-controller/irq.h>
84
85     spi0 {
86         #address-cells = <1>;
87         #size-cells = <0>;
88
89         wfx@0 {
90             compatible = "silabs,wf200";
91             pinctrl-names = "default";
92             pinctrl-0 = <&wfx_irq &wfx_gpios>;
93             reg = <0>;
94             interrupts-extended = <&gpio 16 IRQ_TYPE_EDGE_RISING>;
95             wakeup-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
96             reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
97             spi-max-frequency = <42000000>;
98         };
99     };
100
101   - |
102     #include <dt-bindings/gpio/gpio.h>
103     #include <dt-bindings/interrupt-controller/irq.h>
104
105     wfx_pwrseq: wfx_pwrseq {
106         compatible = "mmc-pwrseq-simple";
107         pinctrl-names = "default";
108         pinctrl-0 = <&wfx_reset>;
109         reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
110     };
111
112     mmc0 {
113         mmc-pwrseq = <&wfx_pwrseq>;
114         #address-cells = <1>;
115         #size-cells = <0>;
116
117         mmc@1 {
118             compatible = "silabs,wf200";
119             pinctrl-names = "default";
120             pinctrl-0 = <&wfx_wakeup>;
121             reg = <1>;
122             wakeup-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
123         };
124     };
125 ...