<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/phy, branch v4.9.5</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.5</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.5'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-11-17T15:25:40Z</updated>
<entry>
<title>phy: twl4030-usb: Fix for musb session bit based PM</title>
<updated>2016-11-17T15:25:40Z</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2016-11-16T19:21:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f7c4a46352b58c04e4d2111df7fe0358ce84546d'/>
<id>urn:sha1:f7c4a46352b58c04e4d2111df7fe0358ce84546d</id>
<content type='text'>
Now with musb driver implementing generic session bit based
PM, we need to have the USB PHYs behaving in a sane way for
platforms implementing PM.

Currently twl4030-usb enables PM in twl4030_phy_power_on()
and then disables it in twl4030_phy_power_off(). This will
block PM runtime for the SoC when no cable is connected.

Fix the issue by moving PM runtime autosuspend call to
happen where it gets called in twl4030_phy_power_on().

Note that this patch should not be backported to anything
before commit 467d5c980709 ("usb: musb: Implement session bit
based runtime PM for musb-core") as before that all the
glue layers implemented their own PM.

Fixes: 467d5c980709 ("usb: musb: Implement session bit based
runtime PM for musb-core")
Tested-by: Ladislav Michl &lt;ladis@linux-mips.org&gt;
Tested-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>phy: sun4i: check PMU presence when poking unknown bit of pmu</title>
<updated>2016-11-05T08:15:02Z</updated>
<author>
<name>Icenowy Zheng</name>
<email>icenowy@aosc.xyz</email>
</author>
<published>2016-10-28T16:27:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4320f9d4c1831fd4d244a9de8f81bc27ea67699c'/>
<id>urn:sha1:4320f9d4c1831fd4d244a9de8f81bc27ea67699c</id>
<content type='text'>
Allwinner SoC's PHY 0, when used as OTG controller, have no pmu part.
The code that poke some unknown bit of PMU for H3/A64 didn't check
the PHY, and will cause kernel oops when PHY 0 is used.

This patch will check whether the pmu is not NULL before poking.

Fixes: b3e0d141ca9f (phy: sun4i: add support for A64 usb phy)

Signed-off-by: Icenowy Zheng &lt;icenowy@aosc.xyz&gt;
Acked-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy-rockchip-pcie: remove deassert of phy_rst from exit callback</title>
<updated>2016-11-05T08:15:02Z</updated>
<author>
<name>Shawn Lin</name>
<email>shawn.lin@rock-chips.com</email>
</author>
<published>2016-10-13T04:42:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=232c260982ab0100cbb29055933e45b928252687'/>
<id>urn:sha1:232c260982ab0100cbb29055933e45b928252687</id>
<content type='text'>
The deassert of phy_rst from exit callback is incorrect as when
doing phy_exit, we expect the phy_rst is on asserted state which was
done by power_off callback, but not deasserted state. Meanwhile when
disabling clk_pciephy_ref, the assert/deassert signal can't actually
take effect on the phy. So let's fix it anyway.

Signed-off-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Reviewed-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy: da8xx-usb: rename the ohci device to ohci-da8xx</title>
<updated>2016-11-05T08:15:02Z</updated>
<author>
<name>Axel Haslam</name>
<email>ahaslam@baylibre.com</email>
</author>
<published>2016-11-03T16:03:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=766325427fdb2a6816778b39331637761bccf13a'/>
<id>urn:sha1:766325427fdb2a6816778b39331637761bccf13a</id>
<content type='text'>
The ohci device name has changed in the board configuraion files,
hence, change the phy lookup table to match the new name.

Signed-off-by: Axel Haslam &lt;ahaslam@baylibre.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy-twl4030-usb: initialize charging-related stuff via pm_runtime</title>
<updated>2016-09-14T05:29:12Z</updated>
<author>
<name>Andreas Kemnade</name>
<email>andreas@kemnade.info</email>
</author>
<published>2016-08-24T22:27:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b78ea84a7d45b9e5ad2eee429a2140065a39d755'/>
<id>urn:sha1:b78ea84a7d45b9e5ad2eee429a2140065a39d755</id>
<content type='text'>
twl4030_phy_power_on() initializes some bits which are required for
charging. As they are not set in twl4030_usb_runtime_resume()
a call to pm_runtime_get_sync() is not sufficient to enable charging.

This patch moves the initialization to twl4030_usb_runtime_resume()
so everything needed for charging is initialized upon
pm_runtime_get_sync().

That also gives improved possibilities to debug problems in that area
because the relevant parts can be checked separately. Charging can be
enabled without having the musb subsystem active.

As a side effect this hides some bugs in musb which causes
unbalanced calls to phy_power_off()/phy_power_on() so that
phy-&gt;power_count becomes -1.

The result is that e.g. the GTA04 phone (dm3730 + twl4030) works
finally as a usb gadget again and charging is working.

Signed-off-by: Andreas Kemnade &lt;andreas@kemnade.info&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy-twl4030-usb: better handle musb_mailbox() failure</title>
<updated>2016-09-14T05:29:11Z</updated>
<author>
<name>Andreas Kemnade</name>
<email>andreas@kemnade.info</email>
</author>
<published>2016-08-22T19:24:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=78489c7c48d462c2a4fa9f388dd091f829573b64'/>
<id>urn:sha1:78489c7c48d462c2a4fa9f388dd091f829573b64</id>
<content type='text'>
setting twl-&gt;linkstat = MUSB_UNKNOWN upon error in musb_mailbox as
introduced in
commit 12b7db2bf8b8 ("usb: musb: Return error value from musb_mailbox")
causes twl4030_usb_irq() to not detect a state change form cable connected
to cable disconnected after such an error so that
pm_runtime_put_autosuspend() will not be called and the usage counter
gets unbalanced. Such errors happen e.g. if the omap2430 module is not
(yet) loaded during plug/unplug events.

This patch introduces a flag instead that indicates whether there is
information for the musb_mailbox pending and calls musb_mailbox() if
that flag is set.

Signed-off-by: Andreas Kemnade &lt;andreas@kemnade.info&gt;
Tested-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy: sun4i-usb: Use spinlock to guard phyctl register access</title>
<updated>2016-09-10T12:13:38Z</updated>
<author>
<name>Chen-Yu Tsai</name>
<email>wens@csie.org</email>
</author>
<published>2016-09-09T03:58:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=919ab2524c52e5f801d8873f09145ce822cdd43a'/>
<id>urn:sha1:919ab2524c52e5f801d8873f09145ce822cdd43a</id>
<content type='text'>
The musb driver calls into this phy driver to disable/enable squelch
detection. This function was introduced in 24fe86a617c5 ("phy: sun4i-usb:
Add a sunxi specific function for setting squelch-detect"). This
function in turn calls sun4i_usb_phy_write, which uses a mutex to
guard the common access register. Unfortunately musb does this
in atomic context, which results in the following warning with lock
debugging enabled:

BUG: sleeping function called from invalid context at kernel/locking/mutex.c:97
in_atomic(): 1, irqs_disabled(): 128, pid: 96, name: kworker/0:2
CPU: 0 PID: 96 Comm: kworker/0:2 Not tainted 4.8.0-rc4-00181-gd502f8ad1c3e #13
Hardware name: Allwinner sun8i Family
Workqueue: events musb_deassert_reset
[&lt;c010bc01&gt;] (unwind_backtrace) from [&lt;c0109237&gt;] (show_stack+0xb/0xc)
[&lt;c0109237&gt;] (show_stack) from [&lt;c02a669b&gt;] (dump_stack+0x67/0x74)
[&lt;c02a669b&gt;] (dump_stack) from [&lt;c05d68c9&gt;] (mutex_lock+0x15/0x2c)
[&lt;c05d68c9&gt;] (mutex_lock) from [&lt;c02c3589&gt;] (sun4i_usb_phy_write+0x39/0xec)
[&lt;c02c3589&gt;] (sun4i_usb_phy_write) from [&lt;c03e6327&gt;] (musb_port_reset+0xfb/0x184)
[&lt;c03e6327&gt;] (musb_port_reset) from [&lt;c03e4917&gt;] (musb_deassert_reset+0x1f/0x2c)
[&lt;c03e4917&gt;] (musb_deassert_reset) from [&lt;c012ecb5&gt;] (process_one_work+0x129/0x2b8)
[&lt;c012ecb5&gt;] (process_one_work) from [&lt;c012f5e3&gt;] (worker_thread+0xf3/0x424)
[&lt;c012f5e3&gt;] (worker_thread) from [&lt;c0132dbd&gt;] (kthread+0xa1/0xb8)
[&lt;c0132dbd&gt;] (kthread) from [&lt;c0105f31&gt;] (ret_from_fork+0x11/0x20)

Since the register access is mmio, we can use a spinlock to guard this
specific access, rather than the mutex that guards the entire phy.

Fixes: ba4bdc9e1dc0 ("PHY: sunxi: Add driver for sunxi usb phy")
Cc: Hans de Goede &lt;hdegoede@redhat.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Chen-Yu Tsai &lt;wens@csie.org&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during wakeup</title>
<updated>2016-09-10T12:01:40Z</updated>
<author>
<name>Randy Li</name>
<email>ayaka@soulik.info</email>
</author>
<published>2016-09-09T18:59:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0f74ab59ce8712e7e2bb1e4517033328e626b27c'/>
<id>urn:sha1:0f74ab59ce8712e7e2bb1e4517033328e626b27c</id>
<content type='text'>
It is a hardware bug in RK3288, the only way to solve it is to
reset the phy.

Signed-off-by: Randy Li &lt;ayaka@soulik.info&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy: Add reset callback</title>
<updated>2016-09-10T12:01:39Z</updated>
<author>
<name>Randy Li</name>
<email>ayaka@soulik.info</email>
</author>
<published>2016-09-09T18:59:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cac18ecb6f44b11bc303d7afbae3887b27938fa4'/>
<id>urn:sha1:cac18ecb6f44b11bc303d7afbae3887b27938fa4</id>
<content type='text'>
The only use for this is for solving a hardware design problem in
usb of Rockchip RK3288.

Signed-off-by: Randy Li &lt;ayaka@soulik.info&gt;
Reviewed-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy-sun4i-usb: Warn when external vbus is detected</title>
<updated>2016-09-10T11:45:19Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2016-09-07T20:20:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=91d6e3b6bcf2625a07fec22a9af37ddbfd91a0df'/>
<id>urn:sha1:91d6e3b6bcf2625a07fec22a9af37ddbfd91a0df</id>
<content type='text'>
Warn when external vbus is detected when we're trying to enable our
own vbus.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
</feed>
