All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Blumenstingl <martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org,
	khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org,
	kishon-l0cyMroinI0@public.gmane.org,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: mark.rutland-5wv7dgnIgG8@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Martin Blumenstingl
	<martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Subject: [PATCH 0/2] Meson GXL USB2 PHY driver
Date: Sat,  4 Mar 2017 23:22:29 +0100	[thread overview]
Message-ID: <20170304222231.14496-1-martin.blumenstingl@googlemail.com> (raw)

This series adds a driver for the USB2 PHYs found in Amlogic Meson GXL
(and GXM) SoCs.
Devicetree changes are intentionally missing in this series because of
various other problems that need to be resolved before we get USB host
support working.

As usual we unfortunately don't have any documentation available. The
register definitions were taken from the vendor's GPL kernel sources
(see [5] if you are really interested). Translation to human readable
names is done using the "best effort" algorithm.

The USB situation on GXL and GXM is a bit special:
the SoCs include both, a dwc3 and a dwc2 controller. The dwc3 controller
IP only supports host-mode, while the dwc2 controller IP only supports
device mode.
The dwc3 controller has all USB3 ports disabled. GXL has two USB2 ports
enabled on dwc3's internal hub, while GXM has three USB2 ports enabled.
This makes the initialization a bit special: to enable any of the dwc3
controller's USB2 ports *ALL* PHYs have to be initialized (probably due
to the hub's routing logic).
The first USB2 PHY (hardware-wise) also supports OTG mode. The vendor
kernel implements this through the USB3 PHY by re-routing the first
USB2 PHY from the dwc3 controller to the dwc2 controller (which is
disabled by default, but if the USB3 PHY detects that the port should
enter device mode it enables the dwc2 controller).

To get USB host mode working the following steps are needed:
- xhci-plat must be able to manage more than one PHY for a controller,
  this is work-in-progress, see [0]
- there are some DMA handling issues in dwc3 and the rest of the USB
  stack, this is solved by the "sysdev" patches from [1]
- adding all USB related bits to meson-gxl.dtsi - this is work in
  progress but depends on the previous TODOs, see [2] and [3]

This supersedes my previous series "Meson GXL and GXM USB support" [4].

[0] https://www.spinics.net/lists/linux-usb/msg151837.html
[1] http://www.mail-archive.com/linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org/msg87077.html
[2] https://github.com/xdarklight/linux/commit/e2b83785687fe859ae4bba8da8bb2fb2d7e32bfb
[3] https://github.com/xdarklight/linux/commit/203ab9ea5d1bea0bf066b6738010c8072b821d87
[4] http://lists.infradead.org/pipermail/linux-amlogic/2016-November/001721.html
[5] https://github.com/khadas/linux/blob/76fd19ac41bb774e396ce8009ff665f29c26c535/include/linux/amlogic/usb-gxl.h

Martin Blumenstingl (2):
  Documentation: dt-bindings: Add documentation for the Meson GXL USB2
    PHY
  phy: meson: add USB2 PHY support for Meson GXL and GXM

 .../devicetree/bindings/phy/meson-gxl-usb2-phy.txt |  17 ++
 drivers/phy/Kconfig                                |  13 +
 drivers/phy/Makefile                               |   1 +
 drivers/phy/phy-meson-gxl-usb2.c                   | 263 +++++++++++++++++++++
 4 files changed, 294 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/meson-gxl-usb2-phy.txt
 create mode 100644 drivers/phy/phy-meson-gxl-usb2.c

-- 
2.12.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: martin.blumenstingl@googlemail.com (Martin Blumenstingl)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/2] Meson GXL USB2 PHY driver
Date: Sat,  4 Mar 2017 23:22:29 +0100	[thread overview]
Message-ID: <20170304222231.14496-1-martin.blumenstingl@googlemail.com> (raw)

This series adds a driver for the USB2 PHYs found in Amlogic Meson GXL
(and GXM) SoCs.
Devicetree changes are intentionally missing in this series because of
various other problems that need to be resolved before we get USB host
support working.

As usual we unfortunately don't have any documentation available. The
register definitions were taken from the vendor's GPL kernel sources
(see [5] if you are really interested). Translation to human readable
names is done using the "best effort" algorithm.

The USB situation on GXL and GXM is a bit special:
the SoCs include both, a dwc3 and a dwc2 controller. The dwc3 controller
IP only supports host-mode, while the dwc2 controller IP only supports
device mode.
The dwc3 controller has all USB3 ports disabled. GXL has two USB2 ports
enabled on dwc3's internal hub, while GXM has three USB2 ports enabled.
This makes the initialization a bit special: to enable any of the dwc3
controller's USB2 ports *ALL* PHYs have to be initialized (probably due
to the hub's routing logic).
The first USB2 PHY (hardware-wise) also supports OTG mode. The vendor
kernel implements this through the USB3 PHY by re-routing the first
USB2 PHY from the dwc3 controller to the dwc2 controller (which is
disabled by default, but if the USB3 PHY detects that the port should
enter device mode it enables the dwc2 controller).

To get USB host mode working the following steps are needed:
- xhci-plat must be able to manage more than one PHY for a controller,
  this is work-in-progress, see [0]
- there are some DMA handling issues in dwc3 and the rest of the USB
  stack, this is solved by the "sysdev" patches from [1]
- adding all USB related bits to meson-gxl.dtsi - this is work in
  progress but depends on the previous TODOs, see [2] and [3]

This supersedes my previous series "Meson GXL and GXM USB support" [4].

[0] https://www.spinics.net/lists/linux-usb/msg151837.html
[1] http://www.mail-archive.com/linux-usb at vger.kernel.org/msg87077.html
[2] https://github.com/xdarklight/linux/commit/e2b83785687fe859ae4bba8da8bb2fb2d7e32bfb
[3] https://github.com/xdarklight/linux/commit/203ab9ea5d1bea0bf066b6738010c8072b821d87
[4] http://lists.infradead.org/pipermail/linux-amlogic/2016-November/001721.html
[5] https://github.com/khadas/linux/blob/76fd19ac41bb774e396ce8009ff665f29c26c535/include/linux/amlogic/usb-gxl.h

Martin Blumenstingl (2):
  Documentation: dt-bindings: Add documentation for the Meson GXL USB2
    PHY
  phy: meson: add USB2 PHY support for Meson GXL and GXM

 .../devicetree/bindings/phy/meson-gxl-usb2-phy.txt |  17 ++
 drivers/phy/Kconfig                                |  13 +
 drivers/phy/Makefile                               |   1 +
 drivers/phy/phy-meson-gxl-usb2.c                   | 263 +++++++++++++++++++++
 4 files changed, 294 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/meson-gxl-usb2-phy.txt
 create mode 100644 drivers/phy/phy-meson-gxl-usb2.c

-- 
2.12.0

WARNING: multiple messages have this Message-ID (diff)
From: martin.blumenstingl@googlemail.com (Martin Blumenstingl)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH 0/2] Meson GXL USB2 PHY driver
Date: Sat,  4 Mar 2017 23:22:29 +0100	[thread overview]
Message-ID: <20170304222231.14496-1-martin.blumenstingl@googlemail.com> (raw)

This series adds a driver for the USB2 PHYs found in Amlogic Meson GXL
(and GXM) SoCs.
Devicetree changes are intentionally missing in this series because of
various other problems that need to be resolved before we get USB host
support working.

As usual we unfortunately don't have any documentation available. The
register definitions were taken from the vendor's GPL kernel sources
(see [5] if you are really interested). Translation to human readable
names is done using the "best effort" algorithm.

The USB situation on GXL and GXM is a bit special:
the SoCs include both, a dwc3 and a dwc2 controller. The dwc3 controller
IP only supports host-mode, while the dwc2 controller IP only supports
device mode.
The dwc3 controller has all USB3 ports disabled. GXL has two USB2 ports
enabled on dwc3's internal hub, while GXM has three USB2 ports enabled.
This makes the initialization a bit special: to enable any of the dwc3
controller's USB2 ports *ALL* PHYs have to be initialized (probably due
to the hub's routing logic).
The first USB2 PHY (hardware-wise) also supports OTG mode. The vendor
kernel implements this through the USB3 PHY by re-routing the first
USB2 PHY from the dwc3 controller to the dwc2 controller (which is
disabled by default, but if the USB3 PHY detects that the port should
enter device mode it enables the dwc2 controller).

To get USB host mode working the following steps are needed:
- xhci-plat must be able to manage more than one PHY for a controller,
  this is work-in-progress, see [0]
- there are some DMA handling issues in dwc3 and the rest of the USB
  stack, this is solved by the "sysdev" patches from [1]
- adding all USB related bits to meson-gxl.dtsi - this is work in
  progress but depends on the previous TODOs, see [2] and [3]

This supersedes my previous series "Meson GXL and GXM USB support" [4].

[0] https://www.spinics.net/lists/linux-usb/msg151837.html
[1] http://www.mail-archive.com/linux-usb at vger.kernel.org/msg87077.html
[2] https://github.com/xdarklight/linux/commit/e2b83785687fe859ae4bba8da8bb2fb2d7e32bfb
[3] https://github.com/xdarklight/linux/commit/203ab9ea5d1bea0bf066b6738010c8072b821d87
[4] http://lists.infradead.org/pipermail/linux-amlogic/2016-November/001721.html
[5] https://github.com/khadas/linux/blob/76fd19ac41bb774e396ce8009ff665f29c26c535/include/linux/amlogic/usb-gxl.h

Martin Blumenstingl (2):
  Documentation: dt-bindings: Add documentation for the Meson GXL USB2
    PHY
  phy: meson: add USB2 PHY support for Meson GXL and GXM

 .../devicetree/bindings/phy/meson-gxl-usb2-phy.txt |  17 ++
 drivers/phy/Kconfig                                |  13 +
 drivers/phy/Makefile                               |   1 +
 drivers/phy/phy-meson-gxl-usb2.c                   | 263 +++++++++++++++++++++
 4 files changed, 294 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/meson-gxl-usb2-phy.txt
 create mode 100644 drivers/phy/phy-meson-gxl-usb2.c

-- 
2.12.0

             reply	other threads:[~2017-03-04 22:22 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-04 22:22 Martin Blumenstingl [this message]
2017-03-04 22:22 ` [PATCH 0/2] Meson GXL USB2 PHY driver Martin Blumenstingl
2017-03-04 22:22 ` Martin Blumenstingl
     [not found] ` <20170304222231.14496-1-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-03-04 22:22   ` [PATCH 1/2] Documentation: dt-bindings: Add documentation for the Meson GXL USB2 PHY Martin Blumenstingl
2017-03-04 22:22     ` Martin Blumenstingl
2017-03-04 22:22     ` Martin Blumenstingl
     [not found]     ` <20170304222231.14496-2-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-03-15 19:59       ` Rob Herring
2017-03-15 19:59         ` Rob Herring
2017-03-15 19:59         ` Rob Herring
2017-03-04 22:22   ` [PATCH 2/2] phy: meson: add USB2 PHY support for Meson GXL and GXM Martin Blumenstingl
2017-03-04 22:22     ` Martin Blumenstingl
2017-03-04 22:22     ` Martin Blumenstingl
2017-03-06  8:50     ` Hendrik v. Raven
2017-03-06  8:50       ` Hendrik v. Raven
2017-03-06  8:50       ` Hendrik v. Raven
     [not found]     ` <20170304222231.14496-3-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-03-09  8:27       ` Kishon Vijay Abraham I
2017-03-09  8:27         ` Kishon Vijay Abraham I
2017-03-09  8:27         ` Kishon Vijay Abraham I
     [not found]         ` <58C11204.902-l0cyMroinI0@public.gmane.org>
2017-03-09 19:44           ` Martin Blumenstingl
2017-03-09 19:44             ` Martin Blumenstingl
2017-03-09 19:44             ` Martin Blumenstingl
2017-03-10 13:09             ` Kishon Vijay Abraham I
2017-03-10 13:09               ` Kishon Vijay Abraham I
2017-03-10 13:09               ` Kishon Vijay Abraham I
2017-03-18 13:00 ` [PATCH v2 0/2] Meson GXL USB2 PHY driver Martin Blumenstingl
2017-03-18 13:00   ` Martin Blumenstingl
2017-03-18 13:00   ` Martin Blumenstingl
2017-03-18 13:00   ` [PATCH v2 1/2] Documentation: dt-bindings: Add documentation for the Meson GXL USB2 PHY Martin Blumenstingl
2017-03-18 13:00     ` Martin Blumenstingl
2017-03-18 13:00     ` Martin Blumenstingl
2017-03-18 13:00   ` [PATCH v2 2/2] phy: meson: add USB2 PHY support for Meson GXL and GXM Martin Blumenstingl
2017-03-18 13:00     ` Martin Blumenstingl
2017-03-18 13:00     ` Martin Blumenstingl
     [not found]     ` <20170318130013.20771-3-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-03-28 21:33       ` Martin Blumenstingl
2017-03-28 21:33         ` Martin Blumenstingl
2017-03-28 21:33         ` Martin Blumenstingl
     [not found]         ` <CAFBinCCBkdADVX_9g54Lz2K3oPux2TnjPuotf1pz0mu6h6phTA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-29 10:56           ` Kishon Vijay Abraham I
2017-03-29 10:56             ` Kishon Vijay Abraham I
2017-03-29 10:56             ` Kishon Vijay Abraham I
     [not found]             ` <82edc36e-80ae-3aa2-cd45-664b26a21e4a-l0cyMroinI0@public.gmane.org>
2017-04-01  9:37               ` Martin Blumenstingl
2017-04-01  9:37                 ` Martin Blumenstingl
2017-04-01  9:37                 ` Martin Blumenstingl
2017-04-04 13:20                 ` Kishon Vijay Abraham I
2017-04-04 13:20                   ` Kishon Vijay Abraham I
2017-04-04 13:20                   ` Kishon Vijay Abraham I
     [not found]   ` <20170318130013.20771-1-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-04-17 19:11     ` [PATCH v3 0/2] Meson GXL USB2 PHY driver Martin Blumenstingl
2017-04-17 19:11       ` Martin Blumenstingl
2017-04-17 19:11       ` Martin Blumenstingl
     [not found]       ` <20170417191142.26099-1-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-04-17 19:11         ` [PATCH v3 1/2] Documentation: dt-bindings: Add documentation for the Meson GXL USB2 PHY Martin Blumenstingl
2017-04-17 19:11           ` Martin Blumenstingl
2017-04-17 19:11           ` Martin Blumenstingl
2017-04-17 19:11         ` [PATCH v3 2/2] phy: meson: add USB2 PHY support for Meson GXL and GXM Martin Blumenstingl
2017-04-17 19:11           ` Martin Blumenstingl
2017-04-17 19:11           ` Martin Blumenstingl
     [not found]           ` <20170417191142.26099-3-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-05-04 18:08             ` Martin Blumenstingl
2017-05-04 18:08               ` Martin Blumenstingl
2017-05-04 18:08               ` Martin Blumenstingl
     [not found]               ` <CAFBinCCWKeGZ_Eh7=6xAY3gFiaj-OZCG7R9wzoNb46+_NOn89w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-08 12:21                 ` Kishon Vijay Abraham I
2017-05-08 12:21                   ` Kishon Vijay Abraham I
2017-05-08 12:21                   ` Kishon Vijay Abraham I
     [not found]                   ` <4c311c7f-9ffd-00ab-0cc0-8e1c27caa340-l0cyMroinI0@public.gmane.org>
2017-05-09  4:47                     ` Vivek Gautam
2017-05-09  4:47                       ` Vivek Gautam
2017-05-09  4:47                       ` Vivek Gautam
2017-05-09  5:15                       ` Kishon Vijay Abraham I
2017-05-09  5:15                         ` Kishon Vijay Abraham I
2017-05-09  5:15                         ` Kishon Vijay Abraham I
2017-05-20 13:50         ` [PATCH v4 0/2] Meson GXL USB2 PHY driver Martin Blumenstingl
2017-05-20 13:50           ` Martin Blumenstingl
2017-05-20 13:50           ` Martin Blumenstingl
     [not found]           ` <20170520135041.25679-1-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-05-20 13:50             ` [PATCH v4 1/2] Documentation: dt-bindings: Add documentation for the Meson GXL USB2 PHY Martin Blumenstingl
2017-05-20 13:50               ` Martin Blumenstingl
2017-05-20 13:50               ` Martin Blumenstingl
2017-06-06  8:54               ` Kishon Vijay Abraham I
2017-06-06  8:54                 ` Kishon Vijay Abraham I
2017-06-06  8:54                 ` Kishon Vijay Abraham I
     [not found]                 ` <00dbbfb5-72ce-c056-8d36-7cdebf8b6712-l0cyMroinI0@public.gmane.org>
2017-06-06 18:17                   ` Martin Blumenstingl
2017-06-06 18:17                     ` Martin Blumenstingl
2017-06-06 18:17                     ` Martin Blumenstingl
2017-05-20 13:50             ` [PATCH v4 2/2] phy: meson: add USB2 PHY support for Meson GXL and GXM Martin Blumenstingl
2017-05-20 13:50               ` Martin Blumenstingl
2017-05-20 13:50               ` Martin Blumenstingl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170304222231.14496-1-martin.blumenstingl@googlemail.com \
    --to=martin.blumenstingl-gm/ye1e23mwn+bqq9rbeug@public.gmane.org \
    --cc=carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
    --cc=kishon-l0cyMroinI0@public.gmane.org \
    --cc=linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.