Difference between revisions of "WLAN device tree configuration"

[quality revision] [quality revision]
m
 

1 Article purpose[edit]

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[edit]

The WLAN[2] tree bindings are composed by :

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

3 DT configuration[edit]

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)[edit]

The companion chip uses the SDIO link so the DT is based on the SDMMC peripheral node which is located in stm32mp157cstm32mp151.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.png 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)[edit]

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
  • keep-power-in-suspend: preserves the card power during a suspend/resume cycle
&sdmmc2 {
       ...
       vmmcarm,primecell-supplyperiphid = <&v3v3><0x10153180>;       /* mmc-pwrseqMandatory = <&wifi_pwrseq>;  version for SDIO */
       ...
      /* phandle to the MMC power sequence node */
 non-removable;
       st,neg-edge;
      ... bus-width = <4>;
    keep-power-in-suspend   vmmc-supply = <&v3v3>;
       mmc-pwrseq = <&wifi_pwrseq>;                 /* preservesphandle to the cardMMC power duringsequence anode suspend*/resume
cycle */      ...
       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[edit]


== Article purpose ==
The purpose of this article is to explain how to configure the [[WLAN and Bluetooth hardware component|WLAN]] when the peripheral ''(or peripheral associated to the framework)'' is assigned to Linux<sup>&reg;</sup> OS'''. 

The configuration is performed using the [[Device tree|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<ref>[http://wireless.murata.com/datasheet?/RFM/data/lbee5kl1dx.pdf], CYW4343W</ref>         [[Device tree|device tree]] node

== DT bindings documentation ==

The ''WLAN''<ref name="WLAN and Bluetooth hardware component"> [[WLAN and Bluetooth hardware component]]</ref> ''' tree bindings are composed by :

* SDIO link configuration<ref>[[SDMMC device tree configuration]]</ref>


* WLAN device configuration<ref>{{CodeSource | Linux kernel | Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt}}</ref>


== 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. 

=== 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 ''stm32mp157cstm32mp151.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|This device tree part is related to STM32 microprocessors. It must be kept as is, without being modified by the end-user.}}

=== DT configuration (board level) ===
Part of the [[Device tree|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* keep-power-in-suspend: preserves the card power during a suspend/resume cycle

 &sdmmc2 {
        ...
        vmmc-supply = <&v3v3>;
        mmc-pwrseq = <&wifi_pwrseq>;                 {{highlight|/* phandle to the MMC power sequence node */}}
        ...
        keep-power-in-suspend;                       {{highlight|/* preserves the card power during a suspend/resume cycle */}}

 &sdmmc2 {
        ...
        arm,primecell-periphid = <0x10153180>;       {{highlight|/* Mandatory version for SDIO */}}
        ...
        non-removable;
        st,neg-edge;
        bus-width = <4>;
        vmmc-supply = <&v3v3>;
        mmc-pwrseq = <&wifi_pwrseq>;                 {{highlight|/* phandle to the MMC power sequence node */}}
        ...brcmf: bcrmf@1 {                             {{highlight|/* 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. 
==References==<references />

<noinclude>

[[Category:Device tree configuration]]
[[Category:WLAN]]
{{PublicationRequestId | 10169 | 2019-01-03 | AlainF}}
{{ArticleBasedOnModel | Peripheral or framework device tree configuration model}}</noinclude>
(3 intermediate revisions by 2 users not shown)
Line 18: Line 18:
   
 
=== DT configuration (STM32 level) ===
 
=== 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 ''stm32mp157c.dtsi''
+
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.
 
* 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]]
 
The SDMMC DT configuration is explained at [[SDMMC device tree configuration]]
Line 26: Line 26:
 
Part of the [[Device tree|device tree]] is used to describe the WLAN hardware used on a given board. The DT node ('''"sdmmc2"''') must be filled in:
 
Part of the [[Device tree|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
 
* mmc-pwrseq: phandle to the MMC power sequence node
* keep-power-in-suspend: preserves the card power during a suspend/resume cycle
 
   
 
  &sdmmc2 {
 
  &sdmmc2 {
 
         ...
 
         ...
  +
        arm,primecell-periphid = <0x10153180>;      {{highlight|/* Mandatory version for SDIO */}}
  +
        ...
  +
        non-removable;
  +
        st,neg-edge;
  +
        bus-width = <4>;
 
         vmmc-supply = <&v3v3>;
 
         vmmc-supply = <&v3v3>;
 
         mmc-pwrseq = <&wifi_pwrseq>;                {{highlight|/* phandle to the MMC power sequence node */}}
 
         mmc-pwrseq = <&wifi_pwrseq>;                {{highlight|/* phandle to the MMC power sequence node */}}
 
         ...
 
         ...
        keep-power-in-suspend;                      {{highlight|/* preserves the card power during a suspend/resume cycle */}}
 
 
         brcmf: bcrmf@1 {                            {{highlight|/* node of WLAN companion chip */}}
 
         brcmf: bcrmf@1 {                            {{highlight|/* node of WLAN companion chip */}}
 
           reg = <1>;
 
           reg = <1>;
Line 39: Line 42:
 
         }
 
         }
 
  }
 
  }
  +
  +
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.
   
 
==References==
 
==References==