<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/phy/phy-sun4i-usb.c, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/phy/phy-sun4i-usb.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/phy/phy-sun4i-usb.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2017-06-01T09:58:33Z</updated>
<entry>
<title>phy: Group vendor specific phy drivers</title>
<updated>2017-06-01T09:58:33Z</updated>
<author>
<name>Vivek Gautam</name>
<email>vivek.gautam@codeaurora.org</email>
</author>
<published>2017-05-11T06:47:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0b56e9a7e8358e59b21d8a425e463072bfae523c'/>
<id>urn:sha1:0b56e9a7e8358e59b21d8a425e463072bfae523c</id>
<content type='text'>
Adding vendor specific directories in phy to group
phy drivers under their respective vendor umbrella.

Also updated the MAINTAINERS file to reflect the correct
directory structure for phy drivers.

Signed-off-by: Vivek Gautam &lt;vivek.gautam@codeaurora.org&gt;
Acked-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Acked-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Acked-by: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
Reviewed-by: Jaehoon Chung &lt;jh80.chung@samsung.com&gt;
Cc: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Cc: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: Heiko Stuebner &lt;heiko@sntech.de&gt;
Cc: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Cc: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Cc: Chen-Yu Tsai &lt;wens@csie.org&gt;
Cc: Sylwester Nawrocki &lt;s.nawrocki@samsung.com&gt;
Cc: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Cc: Jaehoon Chung &lt;jh80.chung@samsung.com&gt;
Cc: Stephen Boyd &lt;stephen.boyd@linaro.org&gt;
Cc: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy: sun4i-usb: enable PHY0 dual route switching for A64 USB PHY</title>
<updated>2017-04-10T11:13:40Z</updated>
<author>
<name>Icenowy Zheng</name>
<email>icenowy@aosc.io</email>
</author>
<published>2017-04-04T18:45:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c957b7d236ed4849c2ab4466fb52924006d09cb7'/>
<id>urn:sha1:c957b7d236ed4849c2ab4466fb52924006d09cb7</id>
<content type='text'>
Allwinner A64 SoC features a switchable PHY0 like the one in H3, which
can switch between a MUSB controller and a pair of OHCI/EHCI controller.

Enable PHY0 route auto switching for A64.

Signed-off-by: Icenowy Zheng &lt;icenowy@aosc.io&gt;
Acked-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy: sun4i-usb: support automatically switch PHY0 route to MUSB/HCI</title>
<updated>2017-04-10T11:12:58Z</updated>
<author>
<name>Icenowy Zheng</name>
<email>icenowy@aosc.xyz</email>
</author>
<published>2017-03-25T14:50:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3ecc25e12f0e210d56fcca110a8144e50db05905'/>
<id>urn:sha1:3ecc25e12f0e210d56fcca110a8144e50db05905</id>
<content type='text'>
On newer Allwinner SoCs (H3 and after), the PHY0 node is routed to both
MUSB controller for peripheral and host support (the host support is
slightly broken), and a pair of EHCI/OHCI controllers, which provide a
better support for host mode.

Add support for automatically switch the route of PHY0 according to the
status of dr_mode and id det pin.

Only H3 have this function enabled in this patch, as further SoCs will
be tested later and then have it enabled.

As H5 is reusing the PHY driver of H3, this function is also enabled.

Signed-off-by: Icenowy Zheng &lt;icenowy@aosc.xyz&gt;
Acked-by: Chen-Yu Tsai &lt;wens@csie.org&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy: sun4i-usb: add PHYCTL offset for H3 SoC</title>
<updated>2017-04-10T11:12:57Z</updated>
<author>
<name>Icenowy Zheng</name>
<email>icenowy@aosc.xyz</email>
</author>
<published>2017-03-25T14:50:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=864ebdf0bd4166e64c21e95b72d770eaa33122aa'/>
<id>urn:sha1:864ebdf0bd4166e64c21e95b72d770eaa33122aa</id>
<content type='text'>
The config structure of H3 in phy-sun4i-usb driver have the PHYCTL
register offset missing.

Add it. From the BSP source code, we know that the offset should be
0x10.

Signed-off-by: Icenowy Zheng &lt;icenowy@aosc.xyz&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy: sun4i-usb: change PHYCTL register clearing code</title>
<updated>2017-04-10T11:12:57Z</updated>
<author>
<name>Icenowy Zheng</name>
<email>icenowy@aosc.xyz</email>
</author>
<published>2017-03-25T14:50:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d699c1d0860aa8b3031d56ec861e6c2f2e37df95'/>
<id>urn:sha1:d699c1d0860aa8b3031d56ec861e6c2f2e37df95</id>
<content type='text'>
It seems that all SoCs with the PHYCTL register offset as 0x10 need the
PHYCTL register to be cleared before it's written.

Change PHYCTL register clearing code to judge whether clearing is needed
based on the PHYCTL offset.

Signed-off-by: Icenowy Zheng &lt;icenowy@aosc.xyz&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy: sun4i-usb: Replace the deprecated extcon API</title>
<updated>2017-01-16T11:11:51Z</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2016-12-30T04:11:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=66adb88955e9549707a03bbc1f3d640557ee4d9f'/>
<id>urn:sha1:66adb88955e9549707a03bbc1f3d640557ee4d9f</id>
<content type='text'>
This patch replaces the deprecated extcon API as following:
- extcon_set_cable_state_() -&gt; extcon_set_state_sync()

Cc: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Cc: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Cc: Chen-Yu Tsai &lt;wens@csie.org&gt;
Acked-by: Chen-Yu Tsai &lt;wens@csie.org&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy: sun4i-usb: add support for V3s USB PHY</title>
<updated>2017-01-16T11:11:51Z</updated>
<author>
<name>Icenowy Zheng</name>
<email>icenowy@aosc.xyz</email>
</author>
<published>2017-01-03T15:25:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=16c403614bcdb1227c217da54e5d6683adaddac8'/>
<id>urn:sha1:16c403614bcdb1227c217da54e5d6683adaddac8</id>
<content type='text'>
Allwinner V3s come with a USB PHY controller slightly different to other
SoCs, with only one PHY.

Add support for it.

Signed-off-by: Icenowy Zheng &lt;icenowy@aosc.xyz&gt;
Acked-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy_sun4i_usb: set_mode: Allow using set_mode to force end the current session</title>
<updated>2016-11-18T12:49:16Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2016-09-23T13:40:56Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5d04c883797209f566538e27441b2563afe4e9b9'/>
<id>urn:sha1:5d04c883797209f566538e27441b2563afe4e9b9</id>
<content type='text'>
The sunxi musb has a bug where sometimes it will generate a babble
error on device disconnect instead of a disconnect irq. When this
happens the musb-controller switches from host mode to device mode
(it clears MUSB_DEVCTL_SESSION and sets MUSB_DEVCTL_BDEVICE) and
gets stuck in this state.

Clearing this requires reporting Vbus low for 200 or more ms, but
on some devices Vbus is simply always high (host-only mode, no Vbus
control).

This commit modifies sun4i_usb_phy_set_mode so that it will force
end the current session when called with the current mode, before this
commit calling set_mode with the current mode was a nop since id_det
would stay the same resulting in the detect_work not doing anything.

This allows the sunxi-musb glue to use sun4i_usb_phy_set_mode to force
end the current session without changing the mode, to fixup the stuck
state after a babble error.

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>
<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.zx2c4.com/linux-dev/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: 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.zx2c4.com/linux-dev/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>
</feed>
