xref: /freebsd/sys/contrib/device-tree/Bindings/net/wireless/silabs,wfx.yaml (revision cb7aa33ac6cd46a5434798e50363136e64f3ae98)
1d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2d5b0e70fSEmmanuel Vadot# Copyright (c) 2020, Silicon Laboratories, Inc.
3d5b0e70fSEmmanuel Vadot%YAML 1.2
4d5b0e70fSEmmanuel Vadot---
5d5b0e70fSEmmanuel Vadot$id: http://devicetree.org/schemas/net/wireless/silabs,wfx.yaml#
6d5b0e70fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
7d5b0e70fSEmmanuel Vadot
8*8bab661aSEmmanuel Vadottitle: Silicon Labs WFxxx
9d5b0e70fSEmmanuel Vadot
10d5b0e70fSEmmanuel Vadotmaintainers:
11d5b0e70fSEmmanuel Vadot  - Jérôme Pouiller <jerome.pouiller@silabs.com>
12d5b0e70fSEmmanuel Vadot
13d5b0e70fSEmmanuel Vadotdescription: >
14d5b0e70fSEmmanuel Vadot  Support for the Wifi chip WFxxx from Silicon Labs. Currently, the only device
15d5b0e70fSEmmanuel Vadot  from the WFxxx series is the WF200 described here:
16d5b0e70fSEmmanuel Vadot     https://www.silabs.com/documents/public/data-sheets/wf200-datasheet.pdf
17d5b0e70fSEmmanuel Vadot
18d5b0e70fSEmmanuel Vadot  The WF200 can be connected via SPI or via SDIO.
19d5b0e70fSEmmanuel Vadot
20d5b0e70fSEmmanuel Vadot  For SDIO:
21d5b0e70fSEmmanuel Vadot
22d5b0e70fSEmmanuel Vadot    Declaring the WFxxx chip in device tree is mandatory (usually, the VID/PID is
23d5b0e70fSEmmanuel Vadot    sufficient for the SDIO devices).
24d5b0e70fSEmmanuel Vadot
25d5b0e70fSEmmanuel Vadot    It is recommended to declare a mmc-pwrseq on SDIO host above WFx. Without
26d5b0e70fSEmmanuel Vadot    it, you may encounter issues during reboot. The mmc-pwrseq should be
27d5b0e70fSEmmanuel Vadot    compatible with mmc-pwrseq-simple. Please consult
28d5b0e70fSEmmanuel Vadot    Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml for more
29d5b0e70fSEmmanuel Vadot    information.
30d5b0e70fSEmmanuel Vadot
31d5b0e70fSEmmanuel Vadotproperties:
32d5b0e70fSEmmanuel Vadot  compatible:
33d5b0e70fSEmmanuel Vadot    items:
34d5b0e70fSEmmanuel Vadot      - enum:
35d5b0e70fSEmmanuel Vadot          - prt,prtt1c-wfm200 # Protonic PRTT1C Board
36d5b0e70fSEmmanuel Vadot          - silabs,brd4001a # WGM160P Evaluation Board
37d5b0e70fSEmmanuel Vadot          - silabs,brd8022a # WF200 Evaluation Board
38d5b0e70fSEmmanuel Vadot          - silabs,brd8023a # WFM200 Evaluation Board
39d5b0e70fSEmmanuel Vadot      - const: silabs,wf200 # Chip alone without antenna
40d5b0e70fSEmmanuel Vadot
41d5b0e70fSEmmanuel Vadot  reg:
42d5b0e70fSEmmanuel Vadot    description:
43d5b0e70fSEmmanuel Vadot      When used on SDIO bus, <reg> must be set to 1. When used on SPI bus, it is
44d5b0e70fSEmmanuel Vadot      the chip select address of the device as defined in the SPI devices
45d5b0e70fSEmmanuel Vadot      bindings.
46d5b0e70fSEmmanuel Vadot    maxItems: 1
47d5b0e70fSEmmanuel Vadot
48d5b0e70fSEmmanuel Vadot  interrupts:
49d5b0e70fSEmmanuel Vadot    description: The interrupt line. Should be IRQ_TYPE_EDGE_RISING. When SPI is
50d5b0e70fSEmmanuel Vadot      used, this property is required. When SDIO is used, the "in-band"
51d5b0e70fSEmmanuel Vadot      interrupt provided by the SDIO bus is used unless an interrupt is defined
52d5b0e70fSEmmanuel Vadot      in the Device Tree.
53d5b0e70fSEmmanuel Vadot    maxItems: 1
54d5b0e70fSEmmanuel Vadot
55d5b0e70fSEmmanuel Vadot  reset-gpios:
56d5b0e70fSEmmanuel Vadot    description: (SPI only) Phandle of gpio that will be used to reset chip
57d5b0e70fSEmmanuel Vadot      during probe. Without this property, you may encounter issues with warm
58d5b0e70fSEmmanuel Vadot      boot.
59d5b0e70fSEmmanuel Vadot
60d5b0e70fSEmmanuel Vadot      For SDIO, the reset gpio should declared using a mmc-pwrseq.
61d5b0e70fSEmmanuel Vadot    maxItems: 1
62d5b0e70fSEmmanuel Vadot
63d5b0e70fSEmmanuel Vadot  wakeup-gpios:
64d5b0e70fSEmmanuel Vadot    description: Phandle of gpio that will be used to wake-up chip. Without this
65d5b0e70fSEmmanuel Vadot      property, driver will disable most of power saving features.
66d5b0e70fSEmmanuel Vadot    maxItems: 1
67d5b0e70fSEmmanuel Vadot
68d5b0e70fSEmmanuel Vadot  silabs,antenna-config-file:
69d5b0e70fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string
70d5b0e70fSEmmanuel Vadot    description: Use an alternative file for antenna configuration (aka
71d5b0e70fSEmmanuel Vadot      "Platform Data Set" in Silabs jargon). Default depends of "compatible"
72d5b0e70fSEmmanuel Vadot      string. For "silabs,wf200", the default is 'wf200.pds'.
73d5b0e70fSEmmanuel Vadot
74d5b0e70fSEmmanuel Vadot  local-mac-address: true
75d5b0e70fSEmmanuel Vadot
76d5b0e70fSEmmanuel Vadot  mac-address: true
77d5b0e70fSEmmanuel Vadot
78d5b0e70fSEmmanuel Vadotrequired:
79d5b0e70fSEmmanuel Vadot  - compatible
80d5b0e70fSEmmanuel Vadot  - reg
81d5b0e70fSEmmanuel Vadot
827ef62cebSEmmanuel VadotallOf:
837ef62cebSEmmanuel Vadot  - $ref: /schemas/spi/spi-peripheral-props.yaml#
847ef62cebSEmmanuel Vadot
857ef62cebSEmmanuel VadotunevaluatedProperties: false
867ef62cebSEmmanuel Vadot
87d5b0e70fSEmmanuel Vadotexamples:
88d5b0e70fSEmmanuel Vadot  - |
89d5b0e70fSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
90d5b0e70fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
91d5b0e70fSEmmanuel Vadot
92d5b0e70fSEmmanuel Vadot    spi {
93d5b0e70fSEmmanuel Vadot        #address-cells = <1>;
94d5b0e70fSEmmanuel Vadot        #size-cells = <0>;
95d5b0e70fSEmmanuel Vadot
96d5b0e70fSEmmanuel Vadot        wifi@0 {
97d5b0e70fSEmmanuel Vadot            compatible = "silabs,brd8022a", "silabs,wf200";
98d5b0e70fSEmmanuel Vadot            pinctrl-names = "default";
99d5b0e70fSEmmanuel Vadot            pinctrl-0 = <&wfx_irq &wfx_gpios>;
100d5b0e70fSEmmanuel Vadot            reg = <0>;
101d5b0e70fSEmmanuel Vadot            interrupts-extended = <&gpio 16 IRQ_TYPE_EDGE_RISING>;
102d5b0e70fSEmmanuel Vadot            wakeup-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
103d5b0e70fSEmmanuel Vadot            reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
104d5b0e70fSEmmanuel Vadot            spi-max-frequency = <42000000>;
105d5b0e70fSEmmanuel Vadot        };
106d5b0e70fSEmmanuel Vadot    };
107d5b0e70fSEmmanuel Vadot
108d5b0e70fSEmmanuel Vadot  - |
109d5b0e70fSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
110d5b0e70fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
111d5b0e70fSEmmanuel Vadot
112d5b0e70fSEmmanuel Vadot    wfx_pwrseq: wfx_pwrseq {
113d5b0e70fSEmmanuel Vadot        compatible = "mmc-pwrseq-simple";
114d5b0e70fSEmmanuel Vadot        pinctrl-names = "default";
115d5b0e70fSEmmanuel Vadot        pinctrl-0 = <&wfx_reset>;
116d5b0e70fSEmmanuel Vadot        reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
117d5b0e70fSEmmanuel Vadot    };
118d5b0e70fSEmmanuel Vadot
119d5b0e70fSEmmanuel Vadot    mmc {
120d5b0e70fSEmmanuel Vadot        mmc-pwrseq = <&wfx_pwrseq>;
121d5b0e70fSEmmanuel Vadot        #address-cells = <1>;
122d5b0e70fSEmmanuel Vadot        #size-cells = <0>;
123d5b0e70fSEmmanuel Vadot
124d5b0e70fSEmmanuel Vadot        wifi@1 {
125d5b0e70fSEmmanuel Vadot            compatible = "silabs,brd8022a", "silabs,wf200";
126d5b0e70fSEmmanuel Vadot            pinctrl-names = "default";
127d5b0e70fSEmmanuel Vadot            pinctrl-0 = <&wfx_wakeup>;
128d5b0e70fSEmmanuel Vadot            reg = <1>;
129d5b0e70fSEmmanuel Vadot            wakeup-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
130d5b0e70fSEmmanuel Vadot        };
131d5b0e70fSEmmanuel Vadot    };
132d5b0e70fSEmmanuel Vadot...
133