<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dissonant.dev/index.php?action=history&amp;feed=atom&amp;title=Mainline%3ABroadcom_Kona%2FUSB_PHY_%28HSOTGCTRL%29</id>
	<title>Mainline:Broadcom Kona/USB PHY (HSOTGCTRL) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dissonant.dev/index.php?action=history&amp;feed=atom&amp;title=Mainline%3ABroadcom_Kona%2FUSB_PHY_%28HSOTGCTRL%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.dissonant.dev/index.php?title=Mainline:Broadcom_Kona/USB_PHY_(HSOTGCTRL)&amp;action=history"/>
	<updated>2026-07-14T06:59:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://wiki.dissonant.dev/index.php?title=Mainline:Broadcom_Kona/USB_PHY_(HSOTGCTRL)&amp;diff=162&amp;oldid=prev</id>
		<title>Knuxify at 05:48, 7 July 2026</title>
		<link rel="alternate" type="text/html" href="https://wiki.dissonant.dev/index.php?title=Mainline:Broadcom_Kona/USB_PHY_(HSOTGCTRL)&amp;diff=162&amp;oldid=prev"/>
		<updated>2026-07-07T05:48:38Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:48, 7 July 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;HSOTGCTRL&amp;#039;&amp;#039;&amp;#039; is the USB2 PHY used in Broadcom Kona chips.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;HSOTGCTRL&amp;#039;&amp;#039;&amp;#039; is the USB2 PHY used in Broadcom Kona chips.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== Drivers ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== Downstream ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Split into two parts:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* {{downstream|baffinlite|arch/arm/plat-kona/bcm-hsotgctrl.c}} which handles all HSOTGCTRL functions;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** {{downstream|baffinlite|arch/arm/plat-kona/bcm-hsotgctrl-phy-mdio.c}} which specifically has [[#MDIO]] setup&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* {{downstream|baffinlite|drivers/usb/otg/bcmpmu59xxx_otg_xceiv.c}} which hooks into Linux&#039;s USB PHY API, calls the HSOTGCTRL functions and also handles some PMU-related bits of the process (mostly related to VBUS control)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== Mainline ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The mainline driver uses the generic PHY framework; it is located in &amp;lt;code&amp;gt;drivers/phy/broadcom/phy-bcm-kona-usb2.c&amp;lt;/code&amp;gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;&quot;&gt;&lt;div&gt;== MDIO ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;&quot;&gt;&lt;div&gt;== MDIO ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key my_wiki-mediawiki-:diff:1.41:old-91:rev-162:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Knuxify</name></author>
	</entry>
	<entry>
		<id>https://wiki.dissonant.dev/index.php?title=Mainline:Broadcom_Kona/USB_PHY_(HSOTGCTRL)&amp;diff=91&amp;oldid=prev</id>
		<title>Knuxify: Created page with &quot;&#039;&#039;&#039;HSOTGCTRL&#039;&#039;&#039; is the USB2 PHY used in Broadcom Kona chips.  == MDIO ==  MDIO most likely stands for [https://en.wikipedia.org/wiki/Management_Data_Input/Output Management Data Input/Output], a PHY management interface used primarily for Ethernet PHYs. While there is a standard for Ethernet MDIO registers, the USB MDIO does not appear to follow it, instead using its own values. Like the Ethernet MDIO, however, both the addresses and values are 16-bit.  MDIO read/write r...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.dissonant.dev/index.php?title=Mainline:Broadcom_Kona/USB_PHY_(HSOTGCTRL)&amp;diff=91&amp;oldid=prev"/>
		<updated>2025-03-09T10:33:50Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;HSOTGCTRL&amp;#039;&amp;#039;&amp;#039; is the USB2 PHY used in Broadcom Kona chips.  == MDIO ==  MDIO most likely stands for [https://en.wikipedia.org/wiki/Management_Data_Input/Output Management Data Input/Output], a PHY management interface used primarily for Ethernet PHYs. While there is a standard for Ethernet MDIO registers, the USB MDIO does not appear to follow it, instead using its own values. Like the Ethernet MDIO, however, both the addresses and values are 16-bit.  MDIO read/write r...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;HSOTGCTRL&amp;#039;&amp;#039;&amp;#039; is the USB2 PHY used in Broadcom Kona chips.&lt;br /&gt;
&lt;br /&gt;
== MDIO ==&lt;br /&gt;
&lt;br /&gt;
MDIO most likely stands for [https://en.wikipedia.org/wiki/Management_Data_Input/Output Management Data Input/Output], a PHY management interface used primarily for Ethernet PHYs. While there is a standard for Ethernet MDIO registers, the USB MDIO does not appear to follow it, instead using its own values. Like the Ethernet MDIO, however, both the addresses and values are 16-bit.&lt;br /&gt;
&lt;br /&gt;
MDIO read/write registers are located in CHIPREGS. There is a single read and write register - which internal MDIO device/address to read is selected by first writing the ID/address to the upper bits of the write register (TODO: write down full sequence). USB MDIO has an ID of 9, and 6 registers are written in downstream (docs taken mostly from &amp;lt;code&amp;gt;arch/arm/plat-kona/bcm_hsotgctrl.c&amp;lt;/code&amp;gt; in Rhea downstream):&lt;br /&gt;
&lt;br /&gt;
* MDIO0 - current reference adjustment (&amp;quot;afe_pll_tst lower 16 bits&amp;quot;)&lt;br /&gt;
* MDIO1 - voltage reference adjustment (&amp;quot;afe_pll_tst upper 16 bits&amp;quot;)&lt;br /&gt;
* MDIO2 - ???; not set in Rhea driver, set to 0x0000 in Hawaii driver&lt;br /&gt;
* MDIO3 - transmitter current; valid values are documented in Hawaii driver. Set to 0x2600 on most devices, 0x0400 on Garnet board; TX current value has mask &amp;lt;code&amp;gt;0x07e0&amp;lt;/code&amp;gt;, what the upper bit does is unknown.&lt;br /&gt;
* MDIO4 - USB PHY receiver sensitivity/squelch (valid values are documented in aforementioned Rhea driver and Hawaii driver).&lt;br /&gt;
* MDIO5 - ???; only set in Hawaii driver, set to 0x0000 on all devices. Might have been included by mistake.&lt;br /&gt;
&lt;br /&gt;
{{todo|Write down MDIO3/4 valid values}}&lt;br /&gt;
&lt;br /&gt;
On at least the Samsung Galaxy Grand Neo, the correct MDIO values are already written by the bootloader.&lt;br /&gt;
&lt;br /&gt;
== USB PHY regs ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Main offset:&amp;#039;&amp;#039;&amp;#039; 0x????&lt;br /&gt;
&lt;br /&gt;
=== USBOTGCONTROL (&amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;) ===&lt;br /&gt;
&lt;br /&gt;
Called &amp;lt;code&amp;gt;OTGCTL&amp;lt;/code&amp;gt; in mainline driver. Controls various settings related to USB handling.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Name&lt;br /&gt;
!Bit&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
| OTGSTAT2, OTGSTAT1&lt;br /&gt;
| 31:30&lt;br /&gt;
| ???; mainline driver clears these bits when powering on.&lt;br /&gt;
|-&lt;br /&gt;
| REG_OTGSTAT2, REG_OTGSTAT1&lt;br /&gt;
| 29:28&lt;br /&gt;
| Controls VBUS valid state; a value of 1 indicates VBUS on, a value of 0 indicates VBUS off. (&amp;lt;code&amp;gt;bcm_hsotgctrl_phy_set_vbus_stat&amp;lt;/code&amp;gt; in downstream)&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Knuxify</name></author>
	</entry>
</feed>