linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sungbo Eo <mans0n@gorani.run>
To: linux-mediatek@lists.infradead.org
Cc: Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>, Bin Liu <b-liu@ti.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Frank Wunderlich <frank-w@public-files.de>,
	devicetree@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Sungbo Eo <mans0n@gorani.run>
Subject: [PATCH v4 1/2] arm: dts: mt7623: add musb device nodes
Date: Tue, 31 Aug 2021 00:59:02 +0900	[thread overview]
Message-ID: <20210830155903.13907-2-mans0n@gorani.run> (raw)
In-Reply-To: <20210830155903.13907-1-mans0n@gorani.run>

MT7623 has an musb controller that is compatible with the one from MT2701.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
---
v4:
* add tested by Frank

v3:
* remove unnecessary status=okay from u2port2

v2:
* rename usb3 label to usb0
* move usb0 & u2phy1 nodes to the right sorted place
* disable u2phy1 by default
* correct u2port2 node name to match its reg address
---
 arch/arm/boot/dts/mt7623.dtsi  | 33 +++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/mt7623a.dtsi |  4 ++++
 2 files changed, 37 insertions(+)

diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi
index 3c11f7cfcc40..21c8a291b74e 100644
--- a/arch/arm/boot/dts/mt7623.dtsi
+++ b/arch/arm/boot/dts/mt7623.dtsi
@@ -585,6 +585,39 @@ spi2: spi@11017000 {
 		status = "disabled";
 	};
 
+	usb0: usb@11200000 {
+		compatible = "mediatek,mt7623-musb",
+			     "mediatek,mtk-musb";
+		reg = <0 0x11200000 0 0x1000>;
+		interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
+		interrupt-names = "mc";
+		phys = <&u2port2 PHY_TYPE_USB2>;
+		dr_mode = "otg";
+		clocks = <&pericfg CLK_PERI_USB0>,
+			 <&pericfg CLK_PERI_USB0_MCU>,
+			 <&pericfg CLK_PERI_USB_SLV>;
+		clock-names = "main","mcu","univpll";
+		power-domains = <&scpsys MT2701_POWER_DOMAIN_IFR_MSC>;
+		status = "disabled";
+	};
+
+	u2phy1: t-phy@11210000 {
+		compatible = "mediatek,mt7623-tphy",
+			     "mediatek,generic-tphy-v1";
+		reg = <0 0x11210000 0 0x0800>;
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+		status = "disabled";
+
+		u2port2: usb-phy@11210800 {
+			reg = <0 0x11210800 0 0x0100>;
+			clocks = <&topckgen CLK_TOP_USB_PHY48M>;
+			clock-names = "ref";
+			#phy-cells = <1>;
+		};
+	};
+
 	audsys: clock-controller@11220000 {
 		compatible = "mediatek,mt7623-audsys",
 			     "mediatek,mt2701-audsys",
diff --git a/arch/arm/boot/dts/mt7623a.dtsi b/arch/arm/boot/dts/mt7623a.dtsi
index 0735a1fb8ad9..d304b62d24b5 100644
--- a/arch/arm/boot/dts/mt7623a.dtsi
+++ b/arch/arm/boot/dts/mt7623a.dtsi
@@ -35,6 +35,10 @@ &scpsys {
 	clock-names = "ethif";
 };
 
+&usb0 {
+	power-domains = <&scpsys MT7623A_POWER_DOMAIN_IFR_MSC>;
+};
+
 &usb1 {
 	power-domains = <&scpsys MT7623A_POWER_DOMAIN_HIF>;
 };
-- 
2.33.0


  reply	other threads:[~2021-08-30 15:59 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-03 15:13 [PATCH 0/2] Add MUSB for MT7623 Sungbo Eo
2021-08-03 15:13 ` [PATCH 1/2] dt-bindings: usb: mtk-musb: add MT7623 compatible Sungbo Eo
2021-08-04 15:01   ` Matthias Brugger
2021-08-03 15:13 ` [PATCH 2/2] arm: dts: mt7623: add musb device nodes Sungbo Eo
2021-08-03 17:15 ` Aw: [PATCH 0/2] Add MUSB for MT7623 Frank Wunderlich
2021-08-04  0:14   ` Sungbo Eo
2021-08-04  8:11     ` Aw: " Frank Wunderlich
2021-08-05  1:34       ` Sungbo Eo
2021-08-04 11:33     ` Frank Wunderlich
2021-08-04 15:01 ` Matthias Brugger
2021-08-05  1:36   ` Sungbo Eo
2021-08-08 12:38 ` [PATCH v2 " Sungbo Eo
2021-08-08 12:38   ` [PATCH v2 1/2] dt-bindings: usb: mtk-musb: add MT7623 compatible Sungbo Eo
2021-08-13 20:49     ` Rob Herring
2021-08-08 12:38   ` [PATCH v2 2/2] arm: dts: mt7623: add musb device nodes Sungbo Eo
2021-08-13 20:48     ` Rob Herring
2021-08-22  4:13   ` [PATCH v3 0/1] Add MUSB for MT7623 Sungbo Eo
2021-08-22  4:13     ` [PATCH v3 1/1] arm: dts: mt7623: add musb device nodes Sungbo Eo
2021-08-30 15:17       ` Aw: " Frank Wunderlich
2021-08-30 15:59     ` [PATCH v4 0/2] Add MUSB for MT7623 Sungbo Eo
2021-08-30 15:59       ` Sungbo Eo [this message]
2021-08-31  6:27         ` [PATCH v4 1/2] arm: dts: mt7623: add musb device nodes Chunfeng Yun (云春峰)
2021-08-31  8:59           ` Frank Wunderlich
2021-08-31 11:02             ` Sungbo Eo
2021-08-31 11:08               ` Aw: " Frank Wunderlich
2021-09-20 10:48         ` Aw: " Frank Wunderlich
2021-09-20 12:01         ` Matthias Brugger
2021-08-30 15:59       ` [PATCH v4 2/2] usb: musb: mediatek: Expose role-switch control to userspace Sungbo Eo
2021-08-31  6:15         ` Chunfeng Yun (云春峰)

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=20210830155903.13907-2-mans0n@gorani.run \
    --to=mans0n@gorani.run \
    --cc=b-liu@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frank-w@public-files.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.org \
    --subject='Re: [PATCH v4 1/2] arm: dts: mt7623: add musb device nodes' \
    /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

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).