https://wiki.st.com/stm32mpu-ecosystem-v1/index.php?title=USBH_device_tree_configuration&feed=atom&action=history
USBH device tree configuration - Revision history
2024-03-29T11:25:41Z
Revision history for this page on the wiki
MediaWiki 1.31.16
https://wiki.st.com/stm32mpu-ecosystem-v1/index.php?title=USBH_device_tree_configuration&diff=61103&oldid=prev
Jean Christophe Trotin at 10:18, 24 September 2019
2019-09-24T10:18:21Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 10:18, 24 September 2019</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l78" >Line 78:</td>
<td colspan="2" class="diff-lineno">Line 78:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>A high-speed hub controller IC is used on the board: no need to enable usbh_ohci, all low-speed and full-speed traffic is managed by the hub.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>A high-speed hub controller IC is used on the board: no need to enable usbh_ohci, all low-speed and full-speed traffic is managed by the hub.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  &usbh_ehci {</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  &usbh_ehci {</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>  phys = {{<del class="diffchange diffchange-inline">LightBlue</del>|<&usbphyc_port0>}};          {{<del class="diffchange diffchange-inline">LightBlue</del>|/* Use USBPHYC HS PHY port #1, mapped on USBH controller */}}</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>  phys = {{<ins class="diffchange diffchange-inline">HighlightParam</ins>|<&usbphyc_port0>}};          {{<ins class="diffchange diffchange-inline">HighlightParam</ins>|/* Use USBPHYC HS PHY port #1, mapped on USBH controller */}}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  phy-names = "usb";</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  phy-names = "usb";</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  status = "okay";</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  status = "okay";</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  };</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  };</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>   </div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>   </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>  {{<del class="diffchange diffchange-inline">LightBlue</del>|/* No need to configure and enable usbh_ohci */}}</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>  {{<ins class="diffchange diffchange-inline">HighlightParam</ins>|/* No need to configure and enable usbh_ohci */}}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==== DT configuration when using port0 ====</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==== DT configuration when using port0 ====</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Below example shows how to configure the USBH when using the physical port 0 (the second physical port is unused, or in use by the [[OTG_device_tree_configuration|OTG]] and no high-speed hub is used).</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Below example shows how to configure the USBH when using the physical port 0 (the second physical port is unused, or in use by the [[OTG_device_tree_configuration|OTG]] and no high-speed hub is used).</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  &usbh_ehci {</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  &usbh_ehci {</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>  phys = {{<del class="diffchange diffchange-inline">LightBlue</del>|<&usbphyc_port0>}};          {{<del class="diffchange diffchange-inline">LightBlue</del>|/* Use USBPHYC HS PHY port #1, mapped on USBH controller */}}</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>  phys = {{<ins class="diffchange diffchange-inline">HighlightParam</ins>|<&usbphyc_port0>}};          {{<ins class="diffchange diffchange-inline">HighlightParam</ins>|/* Use USBPHYC HS PHY port #1, mapped on USBH controller */}}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  phy-names = "usb";</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  phy-names = "usb";</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  status = "okay";</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  status = "okay";</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l94" >Line 94:</td>
<td colspan="2" class="diff-lineno">Line 94:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>   </div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>   </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  &usbh_ohci {</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  &usbh_ohci {</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>  phys = {{<del class="diffchange diffchange-inline">LightBlue</del>|<&usbphyc_port0>}};          {{<del class="diffchange diffchange-inline">LightBlue</del>|/* Use USBPHYC HS PHY port #1, mapped on USBH controller */}}</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>  phys = {{<ins class="diffchange diffchange-inline">HighlightParam</ins>|<&usbphyc_port0>}};          {{<ins class="diffchange diffchange-inline">HighlightParam</ins>|/* Use USBPHYC HS PHY port #1, mapped on USBH controller */}}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  phy-names = "usb";</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  phy-names = "usb";</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  status = "okay";</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  status = "okay";</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l102" >Line 102:</td>
<td colspan="2" class="diff-lineno">Line 102:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Below example shows how to configure the USBH when using the two physical ports.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Below example shows how to configure the USBH when using the two physical ports.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  &usbh_ehci {</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  &usbh_ehci {</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>  phys = {{<del class="diffchange diffchange-inline">LightBlue</del>|<&usbphyc_port0>}}, {{Highlight|<&usbphyc_port1 '''1'''>}};    {{<del class="diffchange diffchange-inline">LightBlue</del>|/* Use USBPHYC HS PHY port #1, mapped on USBH controller */}}</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>  phys = {{<ins class="diffchange diffchange-inline">HighlightParam</ins>|<&usbphyc_port0>}}, {{Highlight|<&usbphyc_port1 '''1'''>}};    {{<ins class="diffchange diffchange-inline">HighlightParam</ins>|/* Use USBPHYC HS PHY port #1, mapped on USBH controller */}}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>                                                           {{Highlight|/* Use USBPHYC HS PHY port #2, '''configure UTMI switch to select USBH controller''' */}}</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>                                                           {{Highlight|/* Use USBPHYC HS PHY port #2, '''configure UTMI switch to select USBH controller''' */}}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  phy-names = "usb", "usb";</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  phy-names = "usb", "usb";</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l109" >Line 109:</td>
<td colspan="2" class="diff-lineno">Line 109:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>   </div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>   </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  &usbh_ohci {</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  &usbh_ohci {</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>  phys = {{<del class="diffchange diffchange-inline">LightBlue</del>|<&usbphyc_port0>}}, {{Highlight|<&usbphyc_port1 '''1'''>}};    {{<del class="diffchange diffchange-inline">LightBlue</del>|/* Use USBPHYC HS PHY port #1, mapped on USBH controller */}}</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>  phys = {{<ins class="diffchange diffchange-inline">HighlightParam</ins>|<&usbphyc_port0>}}, {{Highlight|<&usbphyc_port1 '''1'''>}};    {{<ins class="diffchange diffchange-inline">HighlightParam</ins>|/* Use USBPHYC HS PHY port #1, mapped on USBH controller */}}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>                                                           {{Highlight|/* Use USBPHYC HS PHY port #2, '''configure UTMI switch to select USBH controller''' */}}</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>                                                           {{Highlight|/* Use USBPHYC HS PHY port #2, '''configure UTMI switch to select USBH controller''' */}}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  phy-names = "usb", "usb";</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  phy-names = "usb", "usb";</div></td></tr>
</table>
Jean Christophe Trotin
https://wiki.st.com/stm32mpu-ecosystem-v1/index.php?title=USBH_device_tree_configuration&diff=61002&oldid=prev
Jean Christophe Trotin at 07:06, 24 September 2019
2019-09-24T07:06:11Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 07:06, 24 September 2019</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"><noinclude></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">{{ArticleBasedOnModel | [[Peripheral or framework device tree configuration model]]}}</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">{{ArticleMainWriter | AmelieD}}</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">{{ArticleApprovedVersion | FabriceG | AmelieD | No previous approved version | AlainF - 16Jan'19 - 10337 | 16Jan'19}}</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">[[Category:Device tree configuration]]</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">[[Category:USB|0]]</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></noinclude></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Article purpose ==</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Article purpose ==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This article explains how to configure the [[USBH internal peripheral|'''USBH''' internal peripheral]] when it is assigned to the Linux<sup>&reg;</sup> OS. In that case, it is controlled by the [[USB overview|USB framework]].</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This article explains how to configure the [[USBH internal peripheral|'''USBH''' internal peripheral]] when it is assigned to the Linux<sup>&reg;</sup> OS. In that case, it is controlled by the [[USB overview|USB framework]].</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l131" >Line 131:</td>
<td colspan="2" class="diff-lineno">Line 123:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><references /></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><references /></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><noinclude></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">{{ArticleBasedOnModel | Peripheral or framework device tree configuration model}}</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">{{PublicationRequestId | 10337 (AlainF) | 2019-01-16}}</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:Device tree configuration]]</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:USB|0]]</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></noinclude></ins></div></td></tr>
</table>
Jean Christophe Trotin
https://wiki.st.com/stm32mpu-ecosystem-v1/index.php?title=USBH_device_tree_configuration&diff=61001&oldid=prev
Jean Christophe Trotin at 06:56, 24 September 2019
2019-09-24T06:56:53Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 06:56, 24 September 2019</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l110" >Line 110:</td>
<td colspan="2" class="diff-lineno">Line 110:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Below example shows how to configure the USBH when using the two physical ports.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Below example shows how to configure the USBH when using the two physical ports.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  &usbh_ehci {</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  &usbh_ehci {</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>  phys = {{LightBlue|<&usbphyc_port0>}}, {{<del class="diffchange diffchange-inline">Rose</del>|<&usbphyc_port1 '''1'''>}};    {{LightBlue|/* Use USBPHYC HS PHY port #1, mapped on USBH controller */}}</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>  phys = {{LightBlue|<&usbphyc_port0>}}, {{<ins class="diffchange diffchange-inline">Highlight</ins>|<&usbphyc_port1 '''1'''>}};    {{LightBlue|/* Use USBPHYC HS PHY port #1, mapped on USBH controller */}}</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>                                                           {{<del class="diffchange diffchange-inline">Rose</del>|/* Use USBPHYC HS PHY port #2, '''configure UTMI switch to select USBH controller''' */}}</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>                                                           {{<ins class="diffchange diffchange-inline">Highlight</ins>|/* Use USBPHYC HS PHY port #2, '''configure UTMI switch to select USBH controller''' */}}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  phy-names = "usb", "usb";</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  phy-names = "usb", "usb";</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  status = "okay";</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  status = "okay";</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l117" >Line 117:</td>
<td colspan="2" class="diff-lineno">Line 117:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>   </div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>   </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  &usbh_ohci {</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  &usbh_ohci {</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>  phys = {{LightBlue|<&usbphyc_port0>}}, {{<del class="diffchange diffchange-inline">Rose</del>|<&usbphyc_port1 '''1'''>}};    {{LightBlue|/* Use USBPHYC HS PHY port #1, mapped on USBH controller */}}</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>  phys = {{LightBlue|<&usbphyc_port0>}}, {{<ins class="diffchange diffchange-inline">Highlight</ins>|<&usbphyc_port1 '''1'''>}};    {{LightBlue|/* Use USBPHYC HS PHY port #1, mapped on USBH controller */}}</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>                                                           {{<del class="diffchange diffchange-inline">Rose</del>|/* Use USBPHYC HS PHY port #2, '''configure UTMI switch to select USBH controller''' */}}</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>                                                           {{<ins class="diffchange diffchange-inline">Highlight</ins>|/* Use USBPHYC HS PHY port #2, '''configure UTMI switch to select USBH controller''' */}}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  phy-names = "usb", "usb";</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  phy-names = "usb", "usb";</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  status = "okay";</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>  status = "okay";</div></td></tr>
</table>
Jean Christophe Trotin
https://wiki.st.com/stm32mpu-ecosystem-v1/index.php?title=USBH_device_tree_configuration&diff=49942&oldid=prev
Frq08988: /* How to configure USBH using CubeMX */
2019-01-22T07:45:40Z
<p><span dir="auto"><span class="autocomment">How to configure USBH using CubeMX</span></span></p>
<p><b>New page</b></p><div><noinclude><br />
{{ArticleBasedOnModel | [[Peripheral or framework device tree configuration model]]}}<br />
{{ArticleMainWriter | AmelieD}}<br />
{{ArticleApprovedVersion | FabriceG | AmelieD | No previous approved version | AlainF - 16Jan'19 - 10337 | 16Jan'19}}<br />
[[Category:Device tree configuration]]<br />
[[Category:USB|0]]<br />
</noinclude><br />
<br />
== Article purpose ==<br />
This article explains how to configure the [[USBH internal peripheral|'''USBH''' internal peripheral]] when it is assigned to the Linux<sup>&reg;</sup> OS. In that case, it is controlled by the [[USB overview|USB framework]].<br />
<br />
The configuration is performed using the [[Device tree|device tree]] mechanism.<br />
<br />
It is used by ''USBH Linux drivers'' (EHCI<ref>{{CodeSource | Linux kernel | drivers/usb/host/ehci-platform.c }}, Generic platform ehci driver</ref>, OHCI<ref>{{CodeSource | Linux kernel | drivers/usb/host/ohci-platform.c }}, Generic platform ohci driver</ref>) which register the relevant information in the [[USB overview|USB framework]].<br />
<br />
== DT bindings documentation ==<br />
[[USBH internal peripheral| STM32 USBH internal peripheral]] is a USB Host device, composed of an '''EHCI''' controller and an '''OHCI''' controller.<br />
<br />
Each controller is represented as a separate binding document:<br />
* The generic USB EHCI controller device tree bindings<ref name="ehci_bindings">{{CodeSource | Linux kernel | Documentation/devicetree/bindings/usb/usb-ehci.txt}} Generic USB EHCI controller device tree bindings</ref> document deals with standard EHCI controller core resources (e.g. registers, clock, reset, interrupt, ...).<br />
* The generic USB OHCI controller device tree bindings<ref name="ohci_bindings">{{CodeSource | Linux kernel | Documentation/devicetree/bindings/usb/usb-ohci.txt}} Generic USB OHCI controller device tree bindings</ref> document deals with standard OHCI controller core resources (e.g. registers, clock, reset, interrupt, ...).<br />
<br />
Each controller uses the generic USB Host Controller Device (HCD) properties and generic USB properties, proposed by [[USB overview|USB framework]]:<br />
* The generic USB HCD device tree bindings<ref name="hcd_bindings">{{CodeSource | Linux kernel | Documentation/devicetree/bindings/usb/usb-hcd.txt}} Generic USB HCD (Host Controller Device) device tree bindings</ref> document deals with USB Host Controller PHY resources.<br />
* The generic USB device tree bindings<ref name="generic_bindings">{{CodeSource | Linux kernel | Documentation/devicetree/bindings/usb/generic.txt}} Generic USB device tree bindings</ref> document deals with USB optional properties (e.g. maximum speed, companion, ...).<br />
<br />
== DT configuration ==<br />
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.<br />
<br />
'''STM32CubeMX''' can be used to generate the board device tree. Refer to [[#How_to_configure_the_DT_using_STM32CubeMX|How to configure the DT using STM32CubeMX]] for more details.<br />
<br />
===DT configuration (STM32 level) ===<br />
The '''usbh_ehci''' and '''usbh_ohci''' DT nodes are declared in stm32mp157c.dtsi<ref name="stm32mp157c_dtsi">{{CodeSource | Linux kernel | arch/arm/boot/dts/stm32mp157c.dtsi}}, STM32MP157C device tree file</ref>.<br />
<br />
They are composed of a set of properties, used to describe the [[USBH_internal_peripheral#Features|USBH_EHCI and USBH_OHCI]] controllers: registers address, clocks, resets, interrupts...<br />
<br />
'''usbh_ohci''': usbh-ohci@5800c000 { {{Highlight|/* USBH OHCI controller */}}<br />
compatible = "generic-ohci";<br />
reg = <0x5800c000 0x1000>;<br />
clocks = <&rcc USBH>;<br />
resets = <&rcc USBH_R>;<br />
interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;<br />
status = "disabled";<br />
};<br />
<br />
'''usbh_ehci''': usbh-ehci@5800d000 { {{Highlight|/* USBH EHCI controller */}}<br />
compatible = "generic-ehci";<br />
reg = <0x5800d000 0x1000>;<br />
clocks = <&rcc USBH>;<br />
resets = <&rcc USBH_R>;<br />
interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;<br />
'''companion = <&usbh_ohci>;''' {{Highlight|/* When USBH EHCI controller detects a full or low speed device on a port,}}<br />
status = "disabled"; {{Highlight| * that port is switched over to the USBH OHCI '''companion'''<ref name="generic_bindings">{{CodeSource | Linux kernel | Documentation/devicetree/bindings/usb/generic.txt}} Generic USB device tree bindings</ref> controller */}}<br />
};<br />
{{Warning|This device tree part is related to STM32 microprocessors. It must be kept as is, without being modified by the end-user.}}<br />
<br />
=== DT configuration (board level) ===<br />
Follow the sequences described in the below chapters to configure and enable the USBH on your board.<br />
<br />
[[USBH_internal_peripheral|USBH]] supports up to two physical ports, using on-chip [[USBPHYC_internal_peripheral|USBPHYC]]:<br />
* USBPHYC port#1 is assigned to the USBH<br />
* USBPHYC port#2 can be statically assigned to the USBH or to the [[OTG_internal_peripheral|OTG]]<br />
{{Info|Please refer to [[USBPHYC device tree configuration]] for additional information on the USBPHYC configuration}}<br />
[[USBH_internal_peripheral|USBH]] is composed of EHCI and OHCI controllers:<br />
* high-speed operation is achieved through the EHCI controller<br />
* full-speed and low-speed operation can be achieved by either:<br />
** a high-speed HUB IC wired to the downstream port<br />
** the OHCI controller<br />
<br />
==== DT configuration with external high speed-HUB ====<br />
* Enable the '''usbh_ehci''' by setting '''status = "okay"'''<br />
* Configure the PHY(s) through '''phys''' and '''phy-names'''<br />
{{Info|There's no need to enable '''usbh_ohci''', when all the low-speed and full-speed traffic is managed by the high-speed hub directly connected to the downstream port.}}<br />
<br />
==== DT configuration with OHCI to achieve full-speed and low-speed ====<br />
* Enable the '''usbh_ehci''' by setting '''status = "okay"'''<br />
* Enable the '''usbh_ohci''' by setting '''status = "okay"'''<br />
For both controllers:<br />
* Configure the PHY(s) through '''phys''' and '''phy-names'''<br />
<br />
=== DT configuration examples ===<br />
<br />
==== DT configuration when using port0 with a high-speed hub ====<br />
Below example shows how to configure the USBH when using the physical port 0 (the second physical port is unused).<br />
<br />
A high-speed hub controller IC is used on the board: no need to enable usbh_ohci, all low-speed and full-speed traffic is managed by the hub.<br />
&usbh_ehci {<br />
phys = {{LightBlue|<&usbphyc_port0>}}; {{LightBlue|/* Use USBPHYC HS PHY port #1, mapped on USBH controller */}}<br />
phy-names = "usb";<br />
status = "okay";<br />
};<br />
<br />
{{LightBlue|/* No need to configure and enable usbh_ohci */}}<br />
<br />
==== DT configuration when using port0 ====<br />
Below example shows how to configure the USBH when using the physical port 0 (the second physical port is unused, or in use by the [[OTG_device_tree_configuration|OTG]] and no high-speed hub is used).<br />
&usbh_ehci {<br />
phys = {{LightBlue|<&usbphyc_port0>}}; {{LightBlue|/* Use USBPHYC HS PHY port #1, mapped on USBH controller */}}<br />
phy-names = "usb";<br />
status = "okay";<br />
};<br />
<br />
&usbh_ohci {<br />
phys = {{LightBlue|<&usbphyc_port0>}}; {{LightBlue|/* Use USBPHYC HS PHY port #1, mapped on USBH controller */}}<br />
phy-names = "usb";<br />
status = "okay";<br />
};<br />
<br />
==== DT configuration when using the two physical ports ====<br />
Below example shows how to configure the USBH when using the two physical ports.<br />
&usbh_ehci {<br />
phys = {{LightBlue|<&usbphyc_port0>}}, {{Rose|<&usbphyc_port1 '''1'''>}}; {{LightBlue|/* Use USBPHYC HS PHY port #1, mapped on USBH controller */}}<br />
{{Rose|/* Use USBPHYC HS PHY port #2, '''configure UTMI switch to select USBH controller''' */}}<br />
phy-names = "usb", "usb";<br />
status = "okay";<br />
};<br />
<br />
&usbh_ohci {<br />
phys = {{LightBlue|<&usbphyc_port0>}}, {{Rose|<&usbphyc_port1 '''1'''>}}; {{LightBlue|/* Use USBPHYC HS PHY port #1, mapped on USBH controller */}}<br />
{{Rose|/* Use USBPHYC HS PHY port #2, '''configure UTMI switch to select USBH controller''' */}}<br />
phy-names = "usb", "usb";<br />
status = "okay";<br />
};<br />
<br />
==How to configure the DT using STM32CubeMX==<br />
The [[STM32CubeMX]] tool can be used to configure the STM32MPU device and get the corresponding [[Device_tree#STM32|platform configuration device tree]] files.<br /><br />
The STM32CubeMX may not support all the properties described in the above [[#DT bindings documentation|DT bindings documentation]] paragraph. If so, the tool inserts '''user sections''' in the generated device tree. These sections can then be edited to add some properties and they are preserved from one generation to another. Refer to [[STM32CubeMX]] user manual for further information.<br />
<br />
==References==<br />
Please refer to the following links for full description:<br />
<br />
<references /></div>
Frq08988