WLAN device tree configuration

Stable: 28.10.2022 - 13:04 / Revision: 28.10.2022 - 13:04

I am here to prevent the first-page-empty bug!

1 Article purpose

The purpose of this article is to explain how to configure the WLAN when the peripheral (or peripheral associated to the framework) is assigned to Linux®OS.

The configuration is performed using the device tree mechanism that provides a hardware description of the WLAN peripheral connected on SDIO bus.

The purpose of this article is to explain Cypress WLAN/BT companion chip[1]device tree node

2 DT bindings documentation

The WLAN[2] tree bindings are composed by :

  • SDIO link configuration[3]
  • WLAN device configuration[4]

3 DT configuration

This hardware description is a combination of the STM32 microprocessor device tree files (.dtsi extension) and board device tree files (.dts extension). See the Device tree for an explanation of the device tree file split.

3.1 DT configuration (STM32 level)

The companion chip uses the SDIO link so the DT is based on the SDMMC peripheral node which is located in stm32mp151.dtsi

  • This is a set of properties that may not vary for given STM32 device, such as: registers address, clock, reset.

The SDMMC DT configuration is explained at SDMMC device tree configuration

Warning white.png Warning
This device tree part is related to STM32 microprocessors. It must be kept as is, without being modified by the end-user.

3.2 DT configuration (board level)

Part of the device tree is used to describe the WLAN hardware used on a given board. The DT node ("sdmmc2") must be filled in:

  • mmc-pwrseq: phandle to the MMC power sequence node
&sdmmc2 {
       ...
       arm,primecell-periphid = <0x10153180>;       /* Mandatory version for SDIO */
       ...
       non-removable;
       st,neg-edge;
       bus-width = <4>;
       vmmc-supply = <&v3v3>;
       mmc-pwrseq = <&wifi_pwrseq>;                 /* phandle to the MMC power sequence node */
       ...
       brcmf: bcrmf@1 {                             /* node of WLAN companion chip */
          reg = <1>;
          compatible = "brcm,bcm4329-fmac";
       }
}

The arm,primecell-periphid property has to be forced to <0x10153180> for SDIO. Setting this version disables the support for Linked List in the SDMMC Internal DMA. Linked List mandates all the blocks in the list (except the last one) are the same size, which cannot be satisfied with SDIO.

4 References


IMPORTANT NOTICE – READ CAREFULLY
STMicroelectronics NV and its subsidiaries ("ST") reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgment.

Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of purchasers’ products.

No license, express or implied, to any intellectual property right is granted by ST herein.

Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.

ST and the ST logo are trademarks of ST. For additional information about ST trademarks, refer to www.st.com/trademarks. All other product or service names are the property of their respective owners.

Information in this document supersedes and replaces information previously supplied in any prior versions of this document.