linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <kostap@marvell.com>
To: <linux-arm-kernel@lists.infradead.org>, <devicetree@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <lkundrak@v3.sk>,
	<linux@armlinux.org.uk>, <sebastian.hesselbarth@gmail.com>,
	<gregory.clement@bootlin.com>, <andrew@lunn.ch>,
	<robh+dt@kernel.org>, <vkoul@kernel.org>, <kishon@ti.com>,
	<miquel.raynal@bootlin.com>, <mw@semihalf.com>,
	<jaz@semihalf.com>, <nadavh@marvell.com>, <stefanc@marvell.com>,
	<bpeled@marvell.com>,
	"Konstantin Porotchkin" <kostap@marvell.com>
Subject: [PATCH 2/4] devicetree/bindings: add support for CP110 UTMI driver
Date: Wed, 27 Jan 2021 13:27:17 +0200	[thread overview]
Message-ID: <20210127112719.30632-3-kostap@marvell.com> (raw)
In-Reply-To: <20210127112719.30632-1-kostap@marvell.com>

From: Konstantin Porotchkin <kostap@marvell.com>

Add DTS binding for Marvell CP110 UTMI driver

Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
---
 Documentation/devicetree/bindings/phy/phy-mvebu-utmi.txt | 69 ++++++++++++++++++--
 1 file changed, 63 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/phy-mvebu-utmi.txt b/Documentation/devicetree/bindings/phy/phy-mvebu-utmi.txt
index aa99ceec73b0..109888ba9d2d 100644
--- a/Documentation/devicetree/bindings/phy/phy-mvebu-utmi.txt
+++ b/Documentation/devicetree/bindings/phy/phy-mvebu-utmi.txt
@@ -1,30 +1,61 @@
-MVEBU A3700 UTMI PHY
---------------------
+MVEBU UTMI PHY
+---------------
 
 USB2 UTMI+ PHY controllers can be found on the following Marvell MVEBU SoCs:
 * Armada 3700
+* Armada 7k/8k (on the CP110)
+* Armada CN913x (on the CP115)
 
 On Armada 3700, there are two USB controllers, one is compatible with the USB2
 and USB3 specifications and supports OTG. The other one is USB2 compliant and
 only supports host mode. Both of these controllers come with a slightly
 different UTMI PHY.
 
+On Armada 7k/8k and CN913x, there are two host and one device USB controllers.
+Each of two exiting UTMI PHYs could be connected to either USB host or USB device
+controller.
+The USB device controller can only be connected to a single UTMI PHY port:
+                    0.H----- USB HOST0
+UTMI PHY0  --------/
+                    0.D-----0
+                             \------ USB DEVICE
+                    1.D-----1
+UTMI PHY1  --------\
+                    1.H----- USB HOST1
+
+
 Required Properties:
 
 - compatible: Should be one of:
 	      * "marvell,a3700-utmi-host-phy" for the PHY connected to
-	        the USB2 host-only controller.
+	        the USB2 host-only controller (for Armada3700 only).
 	      * "marvell,a3700-utmi-otg-phy" for the PHY connected to
-	        the USB3 and USB2 OTG capable controller.
+	        the USB3 and USB2 OTG capable controller (for Armada3700 only.
+	      * "marvell,cp110-utmi-phy" (for Armada 7k/8k or CN913x only).
 - reg: PHY IP register range.
 - marvell,usb-misc-reg: handle on the "USB miscellaneous registers" shared
 			region covering registers related to both the host
-			controller and the PHY.
-- #phy-cells: Standard property (Documentation: phy-bindings.txt) Should be 0.
+			controller and the PHY (for Armada3700 only).
+- marvell,system-controller: should contain a phandle to the system
+			     controller node (for Armada 7k/8k or CN913x only)
+- #phy-cells: Standard property (Documentation: phy-bindings.txt.
+		Should be 0 (for Armada3700 only).
+
+
+Required properties (child nodes, for Armada 7k/8k/CN913x only):
+
+- reg: UTMI PHY port ID (0 or 1).
+- #phy-cells : Should be 0.
+
+
+Optional Properties (child nodes, for Armada 7k/8k/CN913x only)::
 
+- marvell,cp110-utmi-device-mode: request the driver to connect the UTMI PHY
+				  port to USB device controller.
 
 Example:
 
+Armada3700
 	usb2_utmi_host_phy: phy@5f000 {
 		compatible = "marvell,armada-3700-utmi-host-phy";
 		reg = <0x5f000 0x800>;
@@ -36,3 +67,29 @@ Example:
 		compatible = "marvell,armada-3700-usb2-host-misc", "syscon";
 		reg = <0x5f800 0x800>;
 	};
+
+Armada 7k/8k/CN913x
+
+	CP11X_LABEL(utmi): utmi@580000 {
+		compatible = "marvell,cp110-utmi-phy";
+		reg = <0x580000 0x2000>;
+		marvell,system-controller = <&CP11X_LABEL(syscon0)>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+
+		CP11X_LABEL(utmi0): phy@0 {
+			/* UTMI PHY port-0 is connected to USB Host controller-0 */
+			reg = <0>;
+			#phy-cells = <0>;
+		};
+
+		CP11X_LABEL(utmi1): phy@1 {
+			/* UTMI PHY port-1 is connected to USB device controller */
+			reg = <1>;
+			#phy-cells = <0>;
+			marvell,cp110-utmi-device-mode;
+		};
+	};
+
+
-- 
2.17.1


  parent reply	other threads:[~2021-01-27 11:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27 11:27 [PATCH 0/4] Add support for CP110 UTMI PHY kostap
2021-01-27 11:27 ` [PATCH 1/4] drivers: phy: add support for Armada " kostap
     [not found]   ` <20210129092849.GA68955@demiurge.local>
     [not found]     ` <20210129100713.GU1551@shell.armlinux.org.uk>
2021-01-29 18:22       ` Lubomir Rintel
2021-01-27 11:27 ` kostap [this message]
     [not found]   ` <20210129093823.GB68955@demiurge.local>
2021-01-31 15:05     ` [PATCH 2/4] devicetree/bindings: add support for CP110 UTMI driver Kostya Porotchkin
2021-01-27 11:27 ` [PATCH 3/4] arch/arm64: dts: add support for Marvell " kostap
2021-01-27 11:27 ` [PATCH 4/4] arch/arm64: dts: enable " kostap

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=20210127112719.30632-3-kostap@marvell.com \
    --to=kostap@marvell.com \
    --cc=andrew@lunn.ch \
    --cc=bpeled@marvell.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregory.clement@bootlin.com \
    --cc=jaz@semihalf.com \
    --cc=kishon@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lkundrak@v3.sk \
    --cc=miquel.raynal@bootlin.com \
    --cc=mw@semihalf.com \
    --cc=nadavh@marvell.com \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=stefanc@marvell.com \
    --cc=vkoul@kernel.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 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).