From patchwork Mon Sep 14 09:43:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 1363477 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=mediatek.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=mediatek.com header.i=@mediatek.com header.a=rsa-sha256 header.s=dk header.b=b6dcqAFA; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BqhQ71vTxz9sTN for ; Mon, 14 Sep 2020 19:48:47 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 20CB482346; Mon, 14 Sep 2020 11:47:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=mediatek.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=mediatek.com header.i=@mediatek.com header.b="b6dcqAFA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4E7E6822FA; Mon, 14 Sep 2020 11:46:38 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MIME_BASE64_TEXT,RDNS_NONE,SPF_HELO_NONE, UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from mailgw01.mediatek.com (unknown [210.61.82.183]) by phobos.denx.de (Postfix) with ESMTP id 23F10822FF for ; Mon, 14 Sep 2020 11:46:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=mediatek.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=chunfeng.yun@mediatek.com X-UUID: 5548fd111c8a4f238ae8f7ace4836a29-20200914 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=9vIVGuot1LA/m31XjVfnqa/e8MNXWJE2ufnkIHjzIoA=; b=b6dcqAFAk7yUVqDZCxV1FvoS/Z+cbjbIuwUZM7k/Tvc1QnViwSYq1YEqE+sg5Rz8Iu7h4F864N9/ExSEAaRLq//G89sdge/m0a6Tbe2Q7uAEmJN/ZAe6jhqnn+PSm2EHO3FW9vI2mX6rjBBMsyT8pweYnFm5hoOts9scEmhyL3c=; X-UUID: 5548fd111c8a4f238ae8f7ace4836a29-20200914 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1924934214; Mon, 14 Sep 2020 17:46:11 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 14 Sep 2020 17:46:08 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Sep 2020 17:46:07 +0800 From: Chunfeng Yun To: Marek Vasut , Lukasz Majewski , Bin Meng CC: Mingming lee , Ryder Lee , Weijie Gao , Chunfeng Yun , GSS_MTK_Uboot_upstream , Heinrich Schuchardt , Lokesh Vutla , Simon Glass , Stefan Roese , Michal Simek , Stefan Bosch , Alex Nemirovsky , Rayagonda Kokatanur , Patrice Chotard , Sam Protsenko , Priyanka Jain , Amit Singh Tomar , Kever Yang , Jagan Teki , Frank Wang , T Karthik Reddy , Siva Durga Prasad Paladugu , Roger Quadros , , Tom Rini , Frank Wunderlich Subject: [PATCH v6 07/10] arm: dts: mt8512: add usb related nodes Date: Mon, 14 Sep 2020 17:43:48 +0800 Message-ID: <1600076631-5928-8-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1600076631-5928-1-git-send-email-chunfeng.yun@mediatek.com> References: <1600076631-5928-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 894B057CA803E75D3A6C25B9B46FBB3EF5ABE47594F6D2ED5B29D17A6DD1518E2000:8 X-MTK: N X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Add usb, usb phy, and fixed regulators nodes Signed-off-by: Chunfeng Yun --- v5~v6: 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(-) 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 #include #include +#include / { 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 = ; + 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 +};