<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/phy/allwinner, branch v2022.04</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/drivers/phy/allwinner?h=v2022.04</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/drivers/phy/allwinner?h=v2022.04'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2022-01-14T19:36:57Z</updated>
<entry>
<title>phy: Track power-on and init counts in uclass</title>
<updated>2022-01-14T19:36:57Z</updated>
<author>
<name>Alper Nebi Yasak</name>
<email>alpernebiyasak@gmail.com</email>
</author>
<published>2021-12-30T19:36:51Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=226fce6108fe364e35f3eb9a84ff1a7ec93727ce'/>
<id>urn:sha1:226fce6108fe364e35f3eb9a84ff1a7ec93727ce</id>
<content type='text'>
On boards using the RK3399 SoC, the USB OHCI and EHCI controllers share
the same PHY device instance. While these controllers are being stopped
they both attempt to power-off and deinitialize it, but trying to
power-off the deinitialized PHY device results in a hang. This usually
happens just before booting an OS, and can be explicitly triggered by
running "usb start; usb stop" in the U-Boot shell.

Implement a uclass-wide counting mechanism for PHY initialization and
power state change requests, so that we don't power-off/deinitialize a
PHY instance until all of its users want it done. The Allwinner A10 USB
PHY driver does this counting in-driver, remove those parts in favour of
this in-uclass implementation.

The sandbox PHY operations test needs some changes since the uclass will
no longer call into the drivers for actions matching its tracked state
(e.g. powering-off a powered-off PHY). Update that test, and add a new
one which simulates multiple users of a single PHY.

The major complication here is that PHY handles aren't deduplicated per
instance, so the obvious idea of putting the counts in the PHY handles
don't immediately work. It seems possible to bind a child udevice per
PHY instance to the PHY provider and deduplicate the handles in each
child's uclass-private areas, like in the CLK framework. An alternative
approach could be to use those bound child udevices themselves as the
PHY handles. Instead, to avoid the architectural changes those would
require, this patch solves things by dynamically allocating a list of
structs (one per instance) in the provider's uclass-private area.

Signed-off-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Peter Robinson &lt;pbrobinson@gmail.com&gt; - Rock960
</content>
</entry>
<entry>
<title>phy: sun4i-usb: Support VBUS detection via power supply</title>
<updated>2021-10-25T13:49:28Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel@sholland.org</email>
</author>
<published>2021-09-12T14:22:42Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6fa41cdd19b93b27483f071f96da8b66bebd7a37'/>
<id>urn:sha1:6fa41cdd19b93b27483f071f96da8b66bebd7a37</id>
<content type='text'>
The device tree binding provides for getting VBUS state from a device
referenced by phandle, as an optional alternative to using a GPIO. In
U-Boot, where there is no power supply class, this VBUS detection will
be implemented using a regulator device and its get_enable method.
Let's hook this up to the PHY driver.

Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
Acked-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
</content>
</entry>
<entry>
<title>phy: sun4i-usb: Refactor VBUS detection to match Linux</title>
<updated>2021-10-25T13:49:16Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel@sholland.org</email>
</author>
<published>2021-09-12T14:22:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1da7b88cade196434b84e701c1dadcd3b37c97bc'/>
<id>urn:sha1:1da7b88cade196434b84e701c1dadcd3b37c97bc</id>
<content type='text'>
The Linux driver checks the VBUS detection GPIO first; then VBUS power
supply; then finally assumes VBUS is present. When adding VBUS power
supply support, we want to match that order, so we get the same behavior
in case both a GPIO and a power supply are provided in the device tree.

So refactor the function a bit to remove the early return, and use the
same "assume VBUS is present" final fallback.

Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
Acked-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
</content>
</entry>
<entry>
<title>phy: sun4i-usb: Remove a couple of debug messages</title>
<updated>2021-10-25T13:49:07Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel@sholland.org</email>
</author>
<published>2021-09-12T14:22:40Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6617894b6903e1cfc829add1558143be75d6bcd0'/>
<id>urn:sha1:6617894b6903e1cfc829add1558143be75d6bcd0</id>
<content type='text'>
Both of these messages log the GPIO number of the ID detection GPIO,
which is not terribly useful, especially in the VBUS detection function.

Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
Reviewed-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
</content>
</entry>
<entry>
<title>phy: sun50i-usb3: Add a driver for the H6 USB3 PHY</title>
<updated>2021-09-22T19:29:56Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel@sholland.org</email>
</author>
<published>2021-07-05T12:29:01Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7f899da901b001a973a1971d539d77bde2b68b05'/>
<id>urn:sha1:7f899da901b001a973a1971d539d77bde2b68b05</id>
<content type='text'>
This driver is needed for XHCI to work on the Allwinner H6 SoC. The
driver is copied from Linux v5.10.

Reviewed-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
</content>
</entry>
<entry>
<title>phy: sun4i-usb: Fix PHY0 routing and passby configuration for MUSB</title>
<updated>2021-07-10T00:22:09Z</updated>
<author>
<name>Paul Kocialkowski</name>
<email>paul.kocialkowski@bootlin.com</email>
</author>
<published>2019-03-14T10:38:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0d5824cbc9ee1e608c1597117aac1c129c519630'/>
<id>urn:sha1:0d5824cbc9ee1e608c1597117aac1c129c519630</id>
<content type='text'>
Recent Allwinner platforms (starting with the H3) only use the MUSB
controller for peripheral mode and use HCI for host mode. As a result,
extra steps need to be taken to properly route USB signals to one or
the other. More precisely, the following is required:
* Routing the pins to either HCI/MUSB (controlled by PHY);
* Enabling USB PHY passby in HCI mode (controlled by PMU).

The current code will enable passby for each PHY and reroute PHY0 to
MUSB, which is inconsistent and results in broken USB peripheral support.

Passby on PHY0 must only be enabled when we want to use HCI. Since
host/device mode detection is not available from the PHY code and
because U-Boot does not support changing the mode dynamically anyway,
we can just mux the controller to MUSB if it is enabled and mux it to
HCI otherwise.

This fixes USB peripheral support for platforms with PHY0 dual-route,
especially H3/H5 and V3s.

Signed-off-by: Paul Kocialkowski &lt;paul.kocialkowski@bootlin.com&gt;
Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
</content>
</entry>
<entry>
<title>dm: treewide: Rename dev_get_platdata() to dev_get_plat()</title>
<updated>2020-12-13T23:51:09Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-12-03T23:55:20Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c69cda25c9b59e53a6bc8969ada58942549f5b5d'/>
<id>urn:sha1:c69cda25c9b59e53a6bc8969ada58942549f5b5d</id>
<content type='text'>
Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>dm: treewide: Rename 'platdata' variables to just 'plat'</title>
<updated>2020-12-13T23:51:08Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-12-03T23:55:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=caa4daa2ae3dc0a3e516addea5772c9af76abcb0'/>
<id>urn:sha1:caa4daa2ae3dc0a3e516addea5772c9af76abcb0</id>
<content type='text'>
We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>dm: treewide: Rename auto_alloc_size members to be shorter</title>
<updated>2020-12-13T15:00:25Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-12-03T23:55:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=41575d8e4c334df148c4cdd7c40cc825dc0fcaa1'/>
<id>urn:sha1:41575d8e4c334df148c4cdd7c40cc825dc0fcaa1</id>
<content type='text'>
This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>phy: sun4i-usb: Fix not calling dev_err with a device</title>
<updated>2020-09-30T12:53:31Z</updated>
<author>
<name>Sean Anderson</name>
<email>seanga2@gmail.com</email>
</author>
<published>2020-09-15T14:45:04Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=73345173101e870df8b816aadc94651e105b00bc'/>
<id>urn:sha1:73345173101e870df8b816aadc94651e105b00bc</id>
<content type='text'>
This uses phy's device

Signed-off-by: Sean Anderson &lt;seanga2@gmail.com&gt;
Tested-by: Patrick Delaunay &lt;patrick.delaunay@st.com&gt;
</content>
</entry>
</feed>
