Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: martin.blumenstingl@googlemail.com (Martin Blumenstingl)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] arm64: dts: meson-gxl: add USB support
Date: Sat, 26 Nov 2016 15:56:33 +0100	[thread overview]
Message-ID: <20161126145635.24488-4-martin.blumenstingl@googlemail.com> (raw)
In-Reply-To: <20161126145635.24488-1-martin.blumenstingl@googlemail.com>

This adds USB support the the Meson GXL SoC. On most devices only the
dwc3 controller is used. It has an internal USB hub which provides two
ports. The PHYs for these ports are defined through the USB3 PHY, which
is ensures that all PHYs are using the same mode (because all of them
are used by the same controller).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 49 ++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
index 3af54dc..99ac900 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
@@ -44,9 +44,58 @@
 #include "meson-gx.dtsi"
 #include <dt-bindings/clock/gxbb-clkc.h>
 #include <dt-bindings/gpio/meson-gxl-gpio.h>
+#include <dt-bindings/reset/amlogic,meson-gxbb-reset.h>
 
 / {
 	compatible = "amlogic,meson-gxl";
+
+	soc {
+
+		usb0: usb at c9000000 {
+			compatible = "snps,dwc3";
+			reg = <0x0 0xc9000000 0x0 0x100000>;
+			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+			phys = <&usb3_phy0>;
+			phy-names = "usb3-phy";
+			dr_mode = "host";
+			maximum-speed = "high-speed";
+			snps,dis_u2_susphy_quirk;
+		};
+
+		usb1: usb at c9100000 {
+			compatible = "snps,dwc2";
+			reg = <0x0 0xc9100000 0x0 0x40000>;
+			interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clkc CLKID_USB>;
+			clock-names = "otg";
+			dr_mode = "host";
+			status = "disabled";
+		};
+	};
+};
+
+&apb {
+	usb2_phys: phy at 78000 {
+		compatible = "amlogic,meson-gxl-usb2-phy";
+		#phy-cells = <1>;
+		reg = <0x0 0x78000 0x0 0x80>;
+		clocks = <&clkc CLKID_USB1>, <&clkc CLKID_USB1_DDR_BRIDGE>;
+		clock-names = "usb", "usb_ddr";
+		resets = <&reset RESET_USB_OTG>;
+		status = "disabled";
+	};
+
+	usb3_phy0: phy at 78080 {
+		compatible = "amlogic,meson-gxl-usb3-phy";
+		#phy-cells = <0>;
+		reg = <0x0 0x78080 0x0 0x20>;
+		interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
+
+		/* dwc3 on GXL enables 2 USB ports on the internal hub */
+		phys = <&usb2_phys 0>, <&usb2_phys 1>;
+
+		status = "disabled";
+	};
 };
 
 &ethmac {
-- 
2.10.2

  parent reply	other threads:[~2016-11-26 14:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-26 14:56 [PATCH 0/5] Meson GXL and GXM USB support Martin Blumenstingl
2016-11-26 14:56 ` [PATCH 1/5] Documentation: dt-bindings: Add documentation for Meson GXL USB2/3 PHYs Martin Blumenstingl
2016-11-26 14:56 ` [PATCH 2/5] phy: meson: add USB2 and USB3 PHY support for Meson GXL Martin Blumenstingl
2017-01-16  9:41   ` Kishon Vijay Abraham I
2017-01-16 12:07     ` Martin Blumenstingl
2016-11-26 14:56 ` Martin Blumenstingl [this message]
2016-11-26 14:56 ` [PATCH 4/5] ARM64: dts: meson-gxm: add GXM specific USB configuration Martin Blumenstingl
2016-11-26 14:56 ` [PATCH 5/5] ARM64: dts: meson-gx-p23x-q20x: enable USB on P23x and Q20x boards Martin Blumenstingl
2016-11-27 22:42 ` [PATCH 0/5] Meson GXL and GXM USB support Martin Blumenstingl
2016-11-30 22:22   ` Rob Herring
2016-11-30 22:49     ` Martin Blumenstingl
2016-12-01 15:54       ` Rob Herring
2016-11-28 14:30 ` Neil Armstrong

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=20161126145635.24488-4-martin.blumenstingl@googlemail.com \
    --to=martin.blumenstingl@googlemail.com \
    --cc=linux-arm-kernel@lists.infradead.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