linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] enable reset_control_reset for shared reset lines
@ 2016-10-01 15:21 Martin Blumenstingl
  2016-10-01 15:21 ` [PATCH 1/3] reset: allow using reset_control_reset with shared reset Martin Blumenstingl
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Martin Blumenstingl @ 2016-10-01 15:21 UTC (permalink / raw)
  To: linus-amlogic

This patch allows using reset_control_reset on a shared reset line.
There are some restrictions though (all of these only apply to shared
resets):
- reset_control_reset cannot be used after reset_control_assert
- reset_control_assert cannot be used after reset_control_reset
- only the first call to reset_control_reset will be passed to the
  hardware. The only exception is when all consumers of the
  reset_control are gone (reset_control_put)

The idea came up when discussing the reset logic in the
phy-meson8b-usb2 PHY driver, see [0] and [1]

An example where this is needed is the Amlogic Meson8b and GXBB SoCs
where two USB PHYs share one reset line. The reset controller only
supports reset pulses (and thus only implements .reset).
The only workaround so far is to make the reset optional in the
driver and only add the reset to one of the two PHYs, to mimic the
behavior implemented by patch 1.

I also added the Meson USB2 PHY patch to this series to show that this
new functionality can be used with only minimal changes. These patches
can simply be dropped as they depend on the phy-meson8b-usb2 driver
patch, and the dts patch has a runtime-dependency on patch 1 and 2
(otherwise the phy-meson8b-usb2 driver would try to request the reset
line exclusively, preventing the other PHY from initializing).


[0] http://lists.infradead.org/pipermail/linux-amlogic/2016-September/001233.html
[1] http://lists.infradead.org/pipermail/linux-amlogic/2016-September/001197.html


Martin Blumenstingl (3):
  reset: allow using reset_control_reset with shared reset
  phy: meson8b-usb2: request a shared reset line
  ARM64: dts: meson-gxbb: add the USB reset also to the second USB PHY

 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi |  1 +
 drivers/phy/phy-meson8b-usb2.c              |  3 +--
 drivers/reset/core.c                        | 31 +++++++++++++++++++++++------
 3 files changed, 27 insertions(+), 8 deletions(-)

-- 
2.10.0

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-11-22 22:05 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-01 15:21 [PATCH 0/3] enable reset_control_reset for shared reset lines Martin Blumenstingl
2016-10-01 15:21 ` [PATCH 1/3] reset: allow using reset_control_reset with shared reset Martin Blumenstingl
2016-10-04  8:36   ` Philipp Zabel
2016-10-01 15:21 ` [PATCH 2/3] phy: meson8b-usb2: request a shared reset line Martin Blumenstingl
2016-10-01 15:21 ` [PATCH 3/3] ARM64: dts: meson-gxbb: add the USB reset also to the second USB PHY Martin Blumenstingl
2016-11-12 13:13 ` [PATCH 0/3] enable reset_control_reset for shared reset lines Martin Blumenstingl
2016-11-12 13:13   ` [PATCH 1/3] reset: allow using reset_control_reset with shared reset Martin Blumenstingl
2016-11-15 12:48     ` Philipp Zabel
2016-11-12 13:13   ` [PATCH 2/3] phy: meson8b-usb2: request a shared reset line Martin Blumenstingl
2016-11-15 12:54     ` Kishon Vijay Abraham I
2016-11-12 13:13   ` [PATCH 3/3] ARM64: dts: meson-gxbb: add the USB reset also to the second USB PHY Martin Blumenstingl
2016-11-16 21:35     ` Kevin Hilman
2016-11-18 22:35       ` Martin Blumenstingl
2016-11-21 20:15         ` Kevin Hilman
2016-11-22 22:05           ` Martin Blumenstingl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).