<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/phy/phy-generic.c, branch v4.14.217</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.217</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.217'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2016-11-18T11:54:42+00:00</updated>
<entry>
<title>usb: phy: phy-generic: add the implementation of .set_suspend</title>
<updated>2016-11-18T11:54:42+00:00</updated>
<author>
<name>Peter Chen</name>
<email>peter.chen@nxp.com</email>
</author>
<published>2016-10-31T02:18:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a0fe0415e0b2a1d87b54db1a0451e05f59675f0c'/>
<id>urn:sha1:a0fe0415e0b2a1d87b54db1a0451e05f59675f0c</id>
<content type='text'>
Add clock operation at .set_suspend if the PHY has
suspend requirement, it can be benefit of power saving for
phy and the whole system (parent clock may also be disabled).

Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'usb-for-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next</title>
<updated>2016-09-14T18:37:50+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2016-09-14T18:37:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=81522637485dd6ec9de4279c9714d58f884b6091'/>
<id>urn:sha1:81522637485dd6ec9de4279c9714d58f884b6091</id>
<content type='text'>
Felipe writes:

usb: patches for v4.9 merge window

This time around we have 92 non-merge commits. Most
of the changes are in drivers/usb/gadget (40.3%)
with drivers/usb/gadget/function being the most
active directory (27.2%).

As for UDC drivers, only dwc3 (26.5%) and dwc2
(12.7%) have really been active.

The most important changes for dwc3 are better
support for scatterlist and, again, throughput
improvements. While on dwc2 got some minor stability
fixes related to soft reset and FIFO usage.

Felipe Tonello has done some good work fixing up our
f_midi gadget and Tal Shorer has implemented a nice
API change for our ULPI bus.

Apart from these, we have our usual set of
non-critical fixes, spelling fixes, build warning
fixes, etc.
</content>
</entry>
<entry>
<title>usb: phy: phy-generic: Check clk_prepare_enable() error</title>
<updated>2016-09-05T10:39:23+00:00</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@nxp.com</email>
</author>
<published>2016-08-23T01:45:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7c113f7df710df2aed63709815e518608dbd338c'/>
<id>urn:sha1:7c113f7df710df2aed63709815e518608dbd338c</id>
<content type='text'>
clk_prepare_enable() may fail, so we should better check its return
value and propagate it in the case of failure.

Signed-off-by: Fabio Estevam &lt;fabio.estevam@nxp.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: phy: generic: remove the vbus dependency</title>
<updated>2016-08-25T09:13:07+00:00</updated>
<author>
<name>Robert Jarzmik</name>
<email>robert.jarzmik@free.fr</email>
</author>
<published>2016-07-08T20:09:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=77e012ac865037e5a227e69a294326b6ce93f9a4'/>
<id>urn:sha1:77e012ac865037e5a227e69a294326b6ce93f9a4</id>
<content type='text'>
As the last known user, ie. pxa27x_udc relying on calls to
usb_gadget_xxx() was amended to use the phy notifier, remove a bit the
USB stack adherence.

Actually the driver still uses the gadget API for structures definition,
but the implementation of USB gadget specific function usb_gadget_*() is
not necessary anymore.

Signed-off-by: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: phy: generic: cope with initial state</title>
<updated>2016-08-25T09:13:07+00:00</updated>
<author>
<name>Robert Jarzmik</name>
<email>robert.jarzmik@free.fr</email>
</author>
<published>2016-07-08T20:09:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9835a6ef1a96b203278629bbcf5099622070c32b'/>
<id>urn:sha1:9835a6ef1a96b203278629bbcf5099622070c32b</id>
<content type='text'>
In the gpio based case, the status of the phy is known at start by
reading the VBus gpio.

Actually, this is a fix, as this initial state, when not set up,
prevents a gadget to answer to the enumeration phase, as there is no
notification in this case (the VBus is already high when kernel boots)
so no interrupt is triggered, and the flow is :
 - gadget initializes
 - gadget gets its phy-generic with a xxx_get_phy_xxx() call type
 - gadget does a "set_peripheral()" call type
   =&gt; here if the otg-&gt;state is correctly filled, the proper vbus
   handling will be called, and the gadget will be aware it should
   answer enumeration and go forth

Without this fix, the USB cable must be removed and replugged for any
gadget relying on phy-generic and its gpio vbus handling to work.

The problem was seen on a pxa27x architecture based board on a
devicetree build.

Signed-off-by: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: phy: generic: Handle late registration of gadget</title>
<updated>2016-03-04T13:14:47+00:00</updated>
<author>
<name>Maarten ter Huurne</name>
<email>maarten@treewalker.org</email>
</author>
<published>2016-02-28T15:34:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2eafe93b92921308b624466b4c8a99bd1ace6e4f'/>
<id>urn:sha1:2eafe93b92921308b624466b4c8a99bd1ace6e4f</id>
<content type='text'>
It is possible for the VBUS detect GPIO interrupt to occur before
nop_set_peripheral() is called, in which case otg-&gt;gadget is NULL.

Signed-off-by: Maarten ter Huurne &lt;maarten@treewalker.org&gt;
Signed-off-by: Felipe Balbi &lt;balbi@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: phy: phy-generic: Fix reset behaviour on legacy boot</title>
<updated>2015-09-14T15:15:08+00:00</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@ti.com</email>
</author>
<published>2015-08-13T10:28:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=762982db33b23029e98c844611e2e8beeb75bc0d'/>
<id>urn:sha1:762982db33b23029e98c844611e2e8beeb75bc0d</id>
<content type='text'>
The gpio-desc migration done in v4.0 caused a regression
with legacy boots due to reversed reset logic.
e.g. omap3-beagle USB host breaks on legacy boot.

Request the reset GPIO with GPIOF_ACTIVE_LOW flag so that
it matches the driver logic and pin behaviour.

Fixes: e9f2cefb0cdc ("usb: phy: generic: migrate to gpio_desc")
Cc: &lt;stable@vger.kernel.org&gt; # 4.0+
Tested-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: pass flags parameter to gpiod_get functions</title>
<updated>2015-07-29T14:59:19+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2015-07-06T09:09:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=88167fc0b22aac0fe7b9c4fadf9c251a9f864f32'/>
<id>urn:sha1:88167fc0b22aac0fe7b9c4fadf9c251a9f864f32</id>
<content type='text'>
Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions)
which appeared in v3.17-rc1, the gpiod_get* functions take an additional
parameter that allows to specify direction and initial value for output.

Currently this parameter is made optional with the help of a cpp trick.
To allow dropping this hack convert callers to explictly pass a value
for flags.

Acked-by: Felipe Balbi &lt;balbi@ti.com&gt;
Acked-by: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: phy: phy-generic: No need to call gpiod_direction_output() twice</title>
<updated>2015-03-11T15:19:38+00:00</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@freescale.com</email>
</author>
<published>2015-02-03T21:18:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=168bdb88c3ab1f66c061a6220c18939ef20ba42e'/>
<id>urn:sha1:168bdb88c3ab1f66c061a6220c18939ef20ba42e</id>
<content type='text'>
Commit 9eb0797722895f4309b4 ("usb: phy: generic: fix the gpios to be optional")
calls gpiod_direction_output() in the probe function, so there is no need to
call it again, as we can simply call gpiod_set_value() directly.

Also, in usb_gen_phy_shutdown() we can simply put the GPIO directly in its
active level state and this allows us to simplify the nop_reset function to
treat only the reset case.

Signed-off-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: phy: phy-generic: Fix USB PHY gpio reset</title>
<updated>2015-01-30T16:38:51+00:00</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@freescale.com</email>
</author>
<published>2015-01-28T15:19:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=74379991f6eb760c8767a39c60b4a918af30f80b'/>
<id>urn:sha1:74379991f6eb760c8767a39c60b4a918af30f80b</id>
<content type='text'>
Since commit e9f2cefb0cdc2ae ("usb: phy: generic: migrate to gpio_desc") a
kernel hang is observed on imx51-babbage board:

[    1.392824] ci_hdrc ci_hdrc.1: doesn't support gadget
[    1.397975] ci_hdrc ci_hdrc.1: EHCI Host Controller
[    1.403205] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
[    1.422335] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
[    1.432962] hub 1-0:1.0: USB hub found
[    1.437119] hub 1-0:1.0: 1 port detected

This hang happens because the reset GPIO stays at logic level 0.

The USB PHY reset gpio is defined in the dts file as:

reset-gpios = &lt;&amp;gpio2 5 GPIO_ACTIVE_LOW&gt;;

, which means it is active low, so what the gpio reset pin needs to do in this
case is the following:

- Go to logic level 0 to reset the USB PHY
- Stay at 0 for a bit
- Go back to logic level 1

When switching to gpiod API we need to following according to
Documentation/gpio/consumer.txt:

"The first thing a driver must do with a GPIO is setting its direction. If no
direction-setting flags have been given to gpiod_get*(), this is done by
invoking one of the gpiod_direction_*() functions:

	int gpiod_direction_input(struct gpio_desc *desc)
	int gpiod_direction_output(struct gpio_desc *desc, int value)"

Since no direction-setting flags have been given to devm_gpiod_get_optional()
in our case, we need to use gpiod_direction_output to comply with the gpiod API.

With this change the USB PHY reset performs a proper reset, the kernel boots
fine and USB host is functional.

Signed-off-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
</feed>
