160484Sobrien# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 278828Sobrien# Copyright (c) 2020, Silicon Laboratories, Inc. 378828Sobrien%YAML 1.2 460484Sobrien--- 560484Sobrien$id: http://devicetree.org/schemas/net/wireless/silabs,wfx.yaml# 660484Sobrien$schema: http://devicetree.org/meta-schemas/core.yaml# 760484Sobrien 860484Sobrientitle: Silicon Labs WFxxx 960484Sobrien 1060484Sobrienmaintainers: 1160484Sobrien - J��r��me Pouiller <jerome.pouiller@silabs.com> 1260484Sobrien 1360484Sobriendescription: > 1460484Sobrien Support for the Wifi chip WFxxx from Silicon Labs. Currently, the only device 1560484Sobrien from the WFxxx series is the WF200 described here: 1660484Sobrien https://www.silabs.com/documents/public/data-sheets/wf200-datasheet.pdf 1760484Sobrien 1860484Sobrien The WF200 can be connected via SPI or via SDIO. 1960484Sobrien 2060484Sobrien For SDIO: 2160484Sobrien 2260484Sobrien Declaring the WFxxx chip in device tree is mandatory (usually, the VID/PID is 2360484Sobrien sufficient for the SDIO devices). 2460484Sobrien 2577298Sobrien It is recommended to declare a mmc-pwrseq on SDIO host above WFx. Without 2660484Sobrien it, you may encounter issues during reboot. The mmc-pwrseq should be 2760484Sobrien compatible with mmc-pwrseq-simple. Please consult 2860484Sobrien Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml for more 2960484Sobrien information. 3060484Sobrien 3160484Sobrienproperties: 3260484Sobrien compatible: 3360484Sobrien items: 3460484Sobrien - enum: 3560484Sobrien - prt,prtt1c-wfm200 # Protonic PRTT1C Board 36 - silabs,brd4001a # WGM160P Evaluation Board 37 - silabs,brd8022a # WF200 Evaluation Board 38 - silabs,brd8023a # WFM200 Evaluation Board 39 - const: silabs,wf200 # Chip alone without antenna 40 41 reg: 42 description: 43 When used on SDIO bus, <reg> must be set to 1. When used on SPI bus, it is 44 the chip select address of the device as defined in the SPI devices 45 bindings. 46 maxItems: 1 47 48 interrupts: 49 description: The interrupt line. Should be IRQ_TYPE_EDGE_RISING. When SPI is 50 used, this property is required. When SDIO is used, the "in-band" 51 interrupt provided by the SDIO bus is used unless an interrupt is defined 52 in the Device Tree. 53 maxItems: 1 54 55 reset-gpios: 56 description: (SPI only) Phandle of gpio that will be used to reset chip 57 during probe. Without this property, you may encounter issues with warm 58 boot. 59 60 For SDIO, the reset gpio should declared using a mmc-pwrseq. 61 maxItems: 1 62 63 wakeup-gpios: 64 description: Phandle of gpio that will be used to wake-up chip. Without this 65 property, driver will disable most of power saving features. 66 maxItems: 1 67 68 silabs,antenna-config-file: 69 $ref: /schemas/types.yaml#/definitions/string 70 description: Use an alternative file for antenna configuration (aka 71 "Platform Data Set" in Silabs jargon). Default depends of "compatible" 72 string. For "silabs,wf200", the default is 'wf200.pds'. 73 74 local-mac-address: true 75 76 mac-address: true 77 78required: 79 - compatible 80 - reg 81 82allOf: 83 - $ref: /schemas/spi/spi-peripheral-props.yaml# 84 85unevaluatedProperties: false 86 87examples: 88 - | 89 #include <dt-bindings/gpio/gpio.h> 90 #include <dt-bindings/interrupt-controller/irq.h> 91 92 spi { 93 #address-cells = <1>; 94 #size-cells = <0>; 95 96 wifi@0 { 97 compatible = "silabs,brd8022a", "silabs,wf200"; 98 pinctrl-names = "default"; 99 pinctrl-0 = <&wfx_irq &wfx_gpios>; 100 reg = <0>; 101 interrupts-extended = <&gpio 16 IRQ_TYPE_EDGE_RISING>; 102 wakeup-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; 103 reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>; 104 spi-max-frequency = <42000000>; 105 }; 106 }; 107 108 - | 109 #include <dt-bindings/gpio/gpio.h> 110 #include <dt-bindings/interrupt-controller/irq.h> 111 112 wfx_pwrseq: wfx_pwrseq { 113 compatible = "mmc-pwrseq-simple"; 114 pinctrl-names = "default"; 115 pinctrl-0 = <&wfx_reset>; 116 reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>; 117 }; 118 119 mmc { 120 mmc-pwrseq = <&wfx_pwrseq>; 121 #address-cells = <1>; 122 #size-cells = <0>; 123 124 wifi@1 { 125 compatible = "silabs,brd8022a", "silabs,wf200"; 126 pinctrl-names = "default"; 127 pinctrl-0 = <&wfx_wakeup>; 128 reg = <1>; 129 wakeup-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; 130 }; 131 }; 132... 133