14a5fb1bbSJérôme Pouiller# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 24a5fb1bbSJérôme Pouiller# Copyright (c) 2020, Silicon Laboratories, Inc. 34a5fb1bbSJérôme Pouiller%YAML 1.2 44a5fb1bbSJérôme Pouiller--- 54a5fb1bbSJérôme Pouiller$id: http://devicetree.org/schemas/net/wireless/silabs,wfx.yaml# 64a5fb1bbSJérôme Pouiller$schema: http://devicetree.org/meta-schemas/core.yaml# 74a5fb1bbSJérôme Pouiller 8*a612130cSKrzysztof Kozlowskititle: Silicon Labs WFxxx 94a5fb1bbSJérôme Pouiller 104a5fb1bbSJérôme Pouillermaintainers: 114a5fb1bbSJérôme Pouiller - Jérôme Pouiller <jerome.pouiller@silabs.com> 124a5fb1bbSJérôme Pouiller 134a5fb1bbSJérôme Pouillerdescription: > 144a5fb1bbSJérôme Pouiller Support for the Wifi chip WFxxx from Silicon Labs. Currently, the only device 154a5fb1bbSJérôme Pouiller from the WFxxx series is the WF200 described here: 164a5fb1bbSJérôme Pouiller https://www.silabs.com/documents/public/data-sheets/wf200-datasheet.pdf 174a5fb1bbSJérôme Pouiller 184a5fb1bbSJérôme Pouiller The WF200 can be connected via SPI or via SDIO. 194a5fb1bbSJérôme Pouiller 204a5fb1bbSJérôme Pouiller For SDIO: 214a5fb1bbSJérôme Pouiller 224a5fb1bbSJérôme Pouiller Declaring the WFxxx chip in device tree is mandatory (usually, the VID/PID is 234a5fb1bbSJérôme Pouiller sufficient for the SDIO devices). 244a5fb1bbSJérôme Pouiller 254a5fb1bbSJérôme Pouiller It is recommended to declare a mmc-pwrseq on SDIO host above WFx. Without 264a5fb1bbSJérôme Pouiller it, you may encounter issues during reboot. The mmc-pwrseq should be 274a5fb1bbSJérôme Pouiller compatible with mmc-pwrseq-simple. Please consult 284a5fb1bbSJérôme Pouiller Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml for more 294a5fb1bbSJérôme Pouiller information. 304a5fb1bbSJérôme Pouiller 314a5fb1bbSJérôme Pouillerproperties: 324a5fb1bbSJérôme Pouiller compatible: 334a5fb1bbSJérôme Pouiller items: 344a5fb1bbSJérôme Pouiller - enum: 35ae862183SLinus Torvalds - prt,prtt1c-wfm200 # Protonic PRTT1C Board 364a5fb1bbSJérôme Pouiller - silabs,brd4001a # WGM160P Evaluation Board 374a5fb1bbSJérôme Pouiller - silabs,brd8022a # WF200 Evaluation Board 384a5fb1bbSJérôme Pouiller - silabs,brd8023a # WFM200 Evaluation Board 394a5fb1bbSJérôme Pouiller - const: silabs,wf200 # Chip alone without antenna 404a5fb1bbSJérôme Pouiller 414a5fb1bbSJérôme Pouiller reg: 424a5fb1bbSJérôme Pouiller description: 434a5fb1bbSJérôme Pouiller When used on SDIO bus, <reg> must be set to 1. When used on SPI bus, it is 444a5fb1bbSJérôme Pouiller the chip select address of the device as defined in the SPI devices 454a5fb1bbSJérôme Pouiller bindings. 464a5fb1bbSJérôme Pouiller maxItems: 1 474a5fb1bbSJérôme Pouiller 484a5fb1bbSJérôme Pouiller interrupts: 494a5fb1bbSJérôme Pouiller description: The interrupt line. Should be IRQ_TYPE_EDGE_RISING. When SPI is 504a5fb1bbSJérôme Pouiller used, this property is required. When SDIO is used, the "in-band" 514a5fb1bbSJérôme Pouiller interrupt provided by the SDIO bus is used unless an interrupt is defined 524a5fb1bbSJérôme Pouiller in the Device Tree. 534a5fb1bbSJérôme Pouiller maxItems: 1 544a5fb1bbSJérôme Pouiller 554a5fb1bbSJérôme Pouiller reset-gpios: 564a5fb1bbSJérôme Pouiller description: (SPI only) Phandle of gpio that will be used to reset chip 574a5fb1bbSJérôme Pouiller during probe. Without this property, you may encounter issues with warm 584a5fb1bbSJérôme Pouiller boot. 594a5fb1bbSJérôme Pouiller 604a5fb1bbSJérôme Pouiller For SDIO, the reset gpio should declared using a mmc-pwrseq. 614a5fb1bbSJérôme Pouiller maxItems: 1 624a5fb1bbSJérôme Pouiller 634a5fb1bbSJérôme Pouiller wakeup-gpios: 644a5fb1bbSJérôme Pouiller description: Phandle of gpio that will be used to wake-up chip. Without this 654a5fb1bbSJérôme Pouiller property, driver will disable most of power saving features. 664a5fb1bbSJérôme Pouiller maxItems: 1 674a5fb1bbSJérôme Pouiller 684a5fb1bbSJérôme Pouiller silabs,antenna-config-file: 694a5fb1bbSJérôme Pouiller $ref: /schemas/types.yaml#/definitions/string 704a5fb1bbSJérôme Pouiller description: Use an alternative file for antenna configuration (aka 714a5fb1bbSJérôme Pouiller "Platform Data Set" in Silabs jargon). Default depends of "compatible" 724a5fb1bbSJérôme Pouiller string. For "silabs,wf200", the default is 'wf200.pds'. 734a5fb1bbSJérôme Pouiller 744a5fb1bbSJérôme Pouiller local-mac-address: true 754a5fb1bbSJérôme Pouiller 764a5fb1bbSJérôme Pouiller mac-address: true 774a5fb1bbSJérôme Pouiller 784a5fb1bbSJérôme Pouillerrequired: 794a5fb1bbSJérôme Pouiller - compatible 804a5fb1bbSJérôme Pouiller - reg 814a5fb1bbSJérôme Pouiller 8215273b7bSKrzysztof KozlowskiallOf: 8315273b7bSKrzysztof Kozlowski - $ref: /schemas/spi/spi-peripheral-props.yaml# 8415273b7bSKrzysztof Kozlowski 8515273b7bSKrzysztof KozlowskiunevaluatedProperties: false 8615273b7bSKrzysztof Kozlowski 874a5fb1bbSJérôme Pouillerexamples: 884a5fb1bbSJérôme Pouiller - | 894a5fb1bbSJérôme Pouiller #include <dt-bindings/gpio/gpio.h> 904a5fb1bbSJérôme Pouiller #include <dt-bindings/interrupt-controller/irq.h> 914a5fb1bbSJérôme Pouiller 924a5fb1bbSJérôme Pouiller spi { 934a5fb1bbSJérôme Pouiller #address-cells = <1>; 944a5fb1bbSJérôme Pouiller #size-cells = <0>; 954a5fb1bbSJérôme Pouiller 964a5fb1bbSJérôme Pouiller wifi@0 { 974a5fb1bbSJérôme Pouiller compatible = "silabs,brd8022a", "silabs,wf200"; 984a5fb1bbSJérôme Pouiller pinctrl-names = "default"; 994a5fb1bbSJérôme Pouiller pinctrl-0 = <&wfx_irq &wfx_gpios>; 1004a5fb1bbSJérôme Pouiller reg = <0>; 1014a5fb1bbSJérôme Pouiller interrupts-extended = <&gpio 16 IRQ_TYPE_EDGE_RISING>; 1024a5fb1bbSJérôme Pouiller wakeup-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; 1034a5fb1bbSJérôme Pouiller reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>; 1044a5fb1bbSJérôme Pouiller spi-max-frequency = <42000000>; 1054a5fb1bbSJérôme Pouiller }; 1064a5fb1bbSJérôme Pouiller }; 1074a5fb1bbSJérôme Pouiller 1084a5fb1bbSJérôme Pouiller - | 1094a5fb1bbSJérôme Pouiller #include <dt-bindings/gpio/gpio.h> 1104a5fb1bbSJérôme Pouiller #include <dt-bindings/interrupt-controller/irq.h> 1114a5fb1bbSJérôme Pouiller 1124a5fb1bbSJérôme Pouiller wfx_pwrseq: wfx_pwrseq { 1134a5fb1bbSJérôme Pouiller compatible = "mmc-pwrseq-simple"; 1144a5fb1bbSJérôme Pouiller pinctrl-names = "default"; 1154a5fb1bbSJérôme Pouiller pinctrl-0 = <&wfx_reset>; 1164a5fb1bbSJérôme Pouiller reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>; 1174a5fb1bbSJérôme Pouiller }; 1184a5fb1bbSJérôme Pouiller 1194a5fb1bbSJérôme Pouiller mmc { 1204a5fb1bbSJérôme Pouiller mmc-pwrseq = <&wfx_pwrseq>; 1214a5fb1bbSJérôme Pouiller #address-cells = <1>; 1224a5fb1bbSJérôme Pouiller #size-cells = <0>; 1234a5fb1bbSJérôme Pouiller 1244a5fb1bbSJérôme Pouiller wifi@1 { 1254a5fb1bbSJérôme Pouiller compatible = "silabs,brd8022a", "silabs,wf200"; 1264a5fb1bbSJérôme Pouiller pinctrl-names = "default"; 1274a5fb1bbSJérôme Pouiller pinctrl-0 = <&wfx_wakeup>; 1284a5fb1bbSJérôme Pouiller reg = <1>; 1294a5fb1bbSJérôme Pouiller wakeup-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; 1304a5fb1bbSJérôme Pouiller }; 1314a5fb1bbSJérôme Pouiller }; 1324a5fb1bbSJérôme Pouiller... 133