diff mbox series

[next,v7,07/10] arm: dts: mt8512: add usb related nodes

Message ID 1600420213-25974-8-git-send-email-chunfeng.yun@mediatek.com
State Superseded
Delegated to: Marek Vasut
Headers show
Series Add support MediaTek USB3 DRD driver | expand

Commit Message

Chunfeng Yun Sept. 18, 2020, 9:10 a.m. UTC
Add usb, usb phy, and fixed regulators nodes

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
v5~v7: no changes

v4: add host related properties, add subnode.

v3: remove unused property mediatek,discth

v2: no changes
---
 arch/arm/dts/mt8512-bm1-emmc.dts | 34 ++++++++++++++++++++++++++++
 arch/arm/dts/mt8512.dtsi         | 49 +++++++++++++++++++++++++++++++++++++++-
 2 files changed, 82 insertions(+), 1 deletion(-)

Comments

Bin Meng Oct. 13, 2020, 2:32 p.m. UTC | #1
On Fri, Sep 18, 2020 at 5:12 PM Chunfeng Yun <chunfeng.yun@mediatek.com> wrote:
>
> Add usb, usb phy, and fixed regulators nodes
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
> v5~v7: no changes
>
> v4: add host related properties, add subnode.
>
> v3: remove unused property mediatek,discth
>
> v2: no changes
> ---
>  arch/arm/dts/mt8512-bm1-emmc.dts | 34 ++++++++++++++++++++++++++++
>  arch/arm/dts/mt8512.dtsi         | 49 +++++++++++++++++++++++++++++++++++++++-
>  2 files changed, 82 insertions(+), 1 deletion(-)
>

LGTM

Acked-by: Bin Meng <bmeng.cn@gmail.com>
diff mbox series

Patch

diff --git a/arch/arm/dts/mt8512-bm1-emmc.dts b/arch/arm/dts/mt8512-bm1-emmc.dts
index 296ed93..12511b5 100644
--- a/arch/arm/dts/mt8512-bm1-emmc.dts
+++ b/arch/arm/dts/mt8512-bm1-emmc.dts
@@ -43,6 +43,25 @@ 
 		regulator-boot-on;
 		regulator-always-on;
 	};
+
+	usb_p0_vbus: regulator@0 {
+		compatible = "regulator-fixed";
+		regulator-name = "p0_vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&gpio 27 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+	usb_p1_vbus: regulator@1 {
+		compatible = "regulator-fixed";
+		regulator-name = "p1_vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&gpio 32 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		regulator-always-on;
+	};
 };
 
 &mmc0 {
@@ -95,6 +114,21 @@ 
 		};
 };
 
+&ssusb {
+	dr_mode = "peripheral";
+	maximum-speed = "high-speed";
+	status = "okay";
+};
+
+&usb3 {
+	vbus-supply = <&usb_p0_vbus>;
+	status = "okay";
+};
+
+&u3phy {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins>;
diff --git a/arch/arm/dts/mt8512.dtsi b/arch/arm/dts/mt8512.dtsi
index 01a02a7..bdb84f8 100644
--- a/arch/arm/dts/mt8512.dtsi
+++ b/arch/arm/dts/mt8512.dtsi
@@ -9,6 +9,7 @@ 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/phy/phy.h>
 
 / {
 	compatible = "mediatek,mt8512";
@@ -100,6 +101,52 @@ 
 		status = "disabled";
 	};
 
+	usb3: usb@11213e00 {
+		compatible = "mediatek,mt8512-mtu3", "mediatek,mtu3";
+		reg = <0x11213e00 0x0100>;
+		reg-names = "ippc";
+		phys = <&u2port0 PHY_TYPE_USB2>, <&u2port1 PHY_TYPE_USB2>;
+		clocks = <&infracfg CLK_INFRA_USB_SYS>,
+			 <&topckgen CLK_TOP_SSUSB_TOP_CK_EN>,
+			 <&infracfg CLK_INFRA_ICUSB>;
+		clock-names = "sys_ck", "ref_ck", "mcu_ck";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+		status = "disabled";
+
+		ssusb: usb@11210000 {
+			compatible = "mediatek,ssusb";
+			reg = <0x11210000 0x3e00>;
+			interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_LOW>;
+			reg-names = "mac";
+			status = "disabled";
+		};
+	};
+
+	u3phy: usb-phy@11cc0000 {
+		compatible = "mediatek,mt8512-tphy",
+			     "mediatek,generic-tphy-v2";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+		status = "disabled";
+
+		u2port0: usb-phy@11cc0000 {
+			reg = <0x11cc0000 0x400>;
+			clocks = <&topckgen CLK_TOP_USB20_48M_EN>;
+			clock-names = "ref";
+			#phy-cells = <1>;
+			status = "okay";
+		};
+
+		u2port1: usb-phy@11c40000 {
+			reg = <0x11c40000 0x400>;
+			#phy-cells = <1>;
+			status = "okay";
+		};
+	};
+
 	mmc0: mmc@11230000 {
 		compatible = "mediatek,mt8512-mmc";
 		reg = <0x11230000 0x1000>,
@@ -112,4 +159,4 @@ 
 		status = "disabled";
 	};
 
-};
\ No newline at end of file
+};