mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: martin.blumenstingl@googlemail.com (Martin Blumenstingl)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH v2 08/10] ARM: dts: meson: add USB support on Meson8 and Meson8b
Date: Thu, 15 Jun 2017 23:33:50 +0200	[thread overview]
Message-ID: <20170615213352.25134-9-martin.blumenstingl@googlemail.com> (raw)
In-Reply-To: <20170615213352.25134-1-martin.blumenstingl@googlemail.com>

This adds the DWC2 USB controller nodes and the corresponding USB2 PHY
nodes to meson.dtsi (as the same - or at least a very similar) IP block
is used on all SoCs (at the same physical address).
Additionally meson8.dtsi and meson8b.dtsi add the required clocks to the
DWC2 and USB2 PHY nodes, otherwise the DWC2 controller cannot be
initialized by the dwc2 driver.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
---
 arch/arm/boot/dts/meson.dtsi   | 38 ++++++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/meson8.dtsi  | 24 ++++++++++++++++++++++++
 arch/arm/boot/dts/meson8b.dtsi | 26 ++++++++++++++++++++++++++
 3 files changed, 88 insertions(+)

diff --git a/arch/arm/boot/dts/meson.dtsi b/arch/arm/boot/dts/meson.dtsi
index bf37606ba82e..15204e44161d 100644
--- a/arch/arm/boot/dts/meson.dtsi
+++ b/arch/arm/boot/dts/meson.dtsi
@@ -132,6 +132,20 @@
 				status = "disabled";
 			};
 
+			usb0_phy: phy at 8800 {
+				compatible = "amlogic,meson-mx-usb2-phy";
+				#phy-cells = <0>;
+				reg = <0x8800 0x20>;
+				status = "disabled";
+			};
+
+			usb1_phy: phy at 8820 {
+				compatible = "amlogic,meson-mx-usb2-phy";
+				#phy-cells = <0>;
+				reg = <0x8820 0x20>;
+				status = "disabled";
+			};
+
 			spifc: spi at 8c80 {
 				compatible = "amlogic,meson6-spifc";
 				reg = <0x8c80 0x80>;
@@ -184,6 +198,30 @@
 			};
 		};
 
+		usb0: usb at c9040000 {
+			compatible = "snps,dwc2";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0xc9040000 0x40000>;
+			interrupts = <GIC_SPI 30 IRQ_TYPE_EDGE_RISING>;
+			phys = <&usb0_phy>;
+			phy-names = "usb2-phy";
+			dr_mode = "host";
+			status = "disabled";
+		};
+
+		usb1: usb at c90c0000 {
+			compatible = "snps,dwc2";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0xc90c0000 0x40000>;
+			interrupts = <GIC_SPI 31 IRQ_TYPE_EDGE_RISING>;
+			phys = <&usb1_phy>;
+			phy-names = "usb2-phy";
+			dr_mode = "host";
+			status = "disabled";
+		};
+
 		ethmac: ethernet at c9410000 {
 			compatible = "amlogic,meson6-dwmac", "snps,dwmac";
 			reg = <0xc9410000 0x10000
diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
index b4c5fdd7b451..17a4c6255589 100644
--- a/arch/arm/boot/dts/meson8.dtsi
+++ b/arch/arm/boot/dts/meson8.dtsi
@@ -292,3 +292,27 @@
 &uart_C {
 	clocks = <&clkc CLKID_CLK81>;
 };
+
+&usb0 {
+	compatible = "amlogic,meson8-usb", "snps,dwc2";
+	clocks = <&clkc CLKID_USB0_DDR_BRIDGE>;
+	clock-names = "otg";
+};
+
+&usb1 {
+	compatible = "amlogic,meson8-usb", "snps,dwc2";
+	clocks = <&clkc CLKID_USB1_DDR_BRIDGE>;
+	clock-names = "otg";
+};
+
+&usb0_phy {
+	compatible = "amlogic,meson8-usb2-phy", "amlogic,meson-mx-usb2-phy";
+	clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB0>;
+	clock-names = "usb_general", "usb";
+};
+
+&usb1_phy {
+	compatible = "amlogic,meson8-usb2-phy", "amlogic,meson-mx-usb2-phy";
+	clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB1>;
+	clock-names = "usb_general", "usb";
+};
diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi
index a9d7074e6369..521be5dfa8ef 100644
--- a/arch/arm/boot/dts/meson8b.dtsi
+++ b/arch/arm/boot/dts/meson8b.dtsi
@@ -206,3 +206,29 @@
 &uart_C {
 	clocks = <&clkc CLKID_CLK81>;
 };
+
+&usb0 {
+	compatible = "amlogic,meson8b-usb", "snps,dwc2";
+	clocks = <&clkc CLKID_USB0_DDR_BRIDGE>;
+	clock-names = "otg";
+};
+
+&usb1 {
+	compatible = "amlogic,meson8b-usb", "snps,dwc2";
+	clocks = <&clkc CLKID_USB1_DDR_BRIDGE>;
+	clock-names = "otg";
+};
+
+&usb0_phy {
+	compatible = "amlogic,meson8b-usb2-phy", "amlogic,meson-mx-usb2-phy";
+	clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB0>;
+	clock-names = "usb_general", "usb";
+	resets = <&reset RESET_USB_OTG>;
+};
+
+&usb1_phy {
+	compatible = "amlogic,meson8b-usb2-phy", "amlogic,meson-mx-usb2-phy";
+	clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB1>;
+	clock-names = "usb_general", "usb";
+	resets = <&reset RESET_USB_OTG>;
+};
-- 
2.13.1

  parent reply	other threads:[~2017-06-15 21:33 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-11 10:16 [PATCH 00/13] add support for more devices " Martin Blumenstingl
2017-06-11 10:16 ` [PATCH 01/13] clk: meson8b: export the SAR ADC clocks Martin Blumenstingl
2017-06-12  7:28   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 02/13] clk: meson8b: export the SDIO clock Martin Blumenstingl
2017-06-12  7:28   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 03/13] clk: meson8b: export the gate clock for the HW random number generator Martin Blumenstingl
2017-06-12  7:28   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 04/13] clk: meson8b: export the USB clocks Martin Blumenstingl
2017-06-12  7:28   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 05/13] clk: meson8b: export the ethernet gate clock Martin Blumenstingl
2017-06-12  7:28   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 06/13] ARM: dts: meson8: add the PWM_E and PWM_F pins Martin Blumenstingl
2017-06-12  7:32   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 07/13] ARM: dts: meson8: add the pins for the SDIO controller Martin Blumenstingl
2017-06-12  7:32   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 08/13] ARM: dts: meson: add the SAR ADC Martin Blumenstingl
2017-06-12  7:33   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 09/13] ARM: dts: meson8: add reserved memory zones Martin Blumenstingl
2017-06-12  7:32   ` Neil Armstrong
2017-06-14 21:46     ` Martin Blumenstingl
2017-06-11 10:16 ` [PATCH 10/13] ARM: dts: meson: add the hardware random number generator Martin Blumenstingl
2017-06-12  7:35   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 11/13] ARM: dts: meson: add USB support on Meson8 and Meson8b Martin Blumenstingl
2017-06-12  7:36   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 12/13] ARM: dts: meson8b: add the SCU device node Martin Blumenstingl
2017-06-12  7:37   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 13/13] ARM: dts: meson: use the real ethernet clock on Meson8 and Meson8b Martin Blumenstingl
2017-06-12  7:37   ` Neil Armstrong
2017-06-12  7:32 ` [PATCH 00/13] add support for more devices " Jerome Brunet
2017-06-14 21:39   ` Martin Blumenstingl
2017-06-15 21:33 ` [PATCH v2 00/10] " Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 01/10] ARM: dts: meson: use C preprocessor friendly include syntax Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 02/10] ARM: dts: meson: use GIC_SPI and IRQ_TYPE_EDGE_RISING macros Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 03/10] ARM: dts: meson8: add the PWM_E and PWM_F pins Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 04/10] ARM: dts: meson8: add the pins for the SDIO controller Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 05/10] ARM: dts: meson: add the SAR ADC Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 06/10] ARM: dts: meson8: add reserved memory zones Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 07/10] ARM: dts: meson: add the hardware random number generator Martin Blumenstingl
2017-06-15 21:33   ` Martin Blumenstingl [this message]
2017-06-15 21:33   ` [PATCH v2 09/10] ARM: dts: meson8b: add the SCU device node Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 10/10] ARM: dts: meson: use the real ethernet clock on Meson8 and Meson8b Martin Blumenstingl
2017-06-16 19:10   ` [PATCH v2 00/10] add support for more devices " Kevin Hilman
2017-06-16 19:12   ` Kevin Hilman
2017-06-16 23:00     ` 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=20170615213352.25134-9-martin.blumenstingl@googlemail.com \
    --to=martin.blumenstingl@googlemail.com \
    --cc=linus-amlogic@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

all inboxes | Powered by JetHome®