From nobody Thu Nov 14 07:37:00 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2245EC4332F for ; Sun, 6 Nov 2022 08:50:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229700AbiKFIuv (ORCPT ); Sun, 6 Nov 2022 03:50:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229771AbiKFIup (ORCPT ); Sun, 6 Nov 2022 03:50:45 -0500 Received: from mxout4.routing.net (mxout4.routing.net [IPv6:2a03:2900:1:a::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F232495B5; Sun, 6 Nov 2022 01:50:43 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout4.routing.net (Postfix) with ESMTP id DA952100789; Sun, 6 Nov 2022 08:50:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1667724642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G03vcOdgjh4F0jzuXNPNgwCIh0TlY0vXWFSWrckQleQ=; b=GC229auPiPNjmbc0gd5b2XcmOqXP04RZEhzX1Y7fw/CnNWGqNLRb0+US9mxMPSdasmjsWT GOrGTEMpIaF9Dwmjz7lJy5UPYB3AHvPqUlO4h4L/PKaQ0sRJjFL1l0z/Q+WRCM/WSPqa25 C/Q00bjJvwJHN67L4ajUABWajAFdZts= Received: from frank-G5.. (fttx-pool-80.245.79.199.bambit.de [80.245.79.199]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id 1BA9F36054A; Sun, 6 Nov 2022 08:50:41 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sam Shih Subject: [RFC v3 03/11] arm64: dts: mt7986: add usb related device nodes Date: Sun, 6 Nov 2022 09:50:26 +0100 Message-Id: <20221106085034.12582-4-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221106085034.12582-1-linux@fw-web.de> References: <20221106085034.12582-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mail-ID: 2604d3a5-6f37-477f-9c36-8f64f7bb0889 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Sam Shih This patch adds USB support for MT7986. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich --- changes compared to sams original version: - reorder xhci-clocks based on yaml binding --- arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 28 ++++++++++ arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 55 ++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 28 ++++++++++ 3 files changed, 111 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/arch/arm64/boot= /dts/mediatek/mt7986a-rfb.dts index 58f7e6b169bf..de5d771e5251 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts @@ -23,6 +23,24 @@ memory@40000000 { device_type =3D "memory"; reg =3D <0 0x40000000 0 0x40000000>; }; + + reg_3p3v: regulator-3p3v { + compatible =3D "regulator-fixed"; + regulator-name =3D "fixed-3.3V"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + reg_5v: regulator-5v { + compatible =3D "regulator-fixed"; + regulator-name =3D "fixed-5V"; + regulator-min-microvolt =3D <5000000>; + regulator-max-microvolt =3D <5000000>; + regulator-boot-on; + regulator-always-on; + }; }; =20 ð { @@ -136,6 +154,12 @@ &spi1 { status =3D "okay"; }; =20 +&ssusb { + vusb33-supply =3D <®_3p3v>; + vbus-supply =3D <®_5v>; + status =3D "okay"; +}; + &switch { ports { #address-cells =3D <1>; @@ -197,6 +221,10 @@ &uart2 { status =3D "okay"; }; =20 +&usb_phy { + status =3D "okay"; +}; + &wifi { status =3D "okay"; pinctrl-names =3D "default", "dbdc"; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7986a.dtsi index 6d881095d933..58bbecfbab98 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -246,6 +246,61 @@ uart2: serial@11004000 { status =3D "disabled"; }; =20 + ssusb: usb@11200000 { + compatible =3D "mediatek,mt7986-xhci", + "mediatek,mtk-xhci"; + reg =3D <0 0x11200000 0 0x2e00>, + <0 0x11203e00 0 0x0100>; + reg-names =3D "mac", "ippc"; + interrupts =3D ; + clocks =3D <&infracfg CLK_INFRA_IUSB_SYS_CK>, + <&infracfg CLK_INFRA_IUSB_CK>, + <&infracfg CLK_INFRA_IUSB_133_CK>, + <&infracfg CLK_INFRA_IUSB_66M_CK>, + <&topckgen CLK_TOP_U2U3_XHCI_SEL>; + clock-names =3D "sys_ck", + "ref_ck", + "mcu_ck", + "dma_ck", + "xhci_ck"; + phys =3D <&u2port0 PHY_TYPE_USB2>, + <&u3port0 PHY_TYPE_USB3>, + <&u2port1 PHY_TYPE_USB2>; + status =3D "disabled"; + }; + + usb_phy: t-phy@11e10000 { + compatible =3D "mediatek,mt7986-tphy", + "mediatek,generic-tphy-v2"; + #address-cells =3D <2>; + #size-cells =3D <2>; + ranges; + status =3D "disabled"; + + u2port0: usb-phy@11e10000 { + reg =3D <0 0x11e10000 0 0x700>; + clocks =3D <&topckgen CLK_TOP_DA_U2_REFSEL>, + <&topckgen CLK_TOP_DA_U2_CK_1P_SEL>; + clock-names =3D "ref", "da_ref"; + #phy-cells =3D <1>; + }; + + u3port0: usb-phy@11e10700 { + reg =3D <0 0x11e10700 0 0x900>; + clocks =3D <&topckgen CLK_TOP_USB3_PHY_SEL>; + clock-names =3D "ref"; + #phy-cells =3D <1>; + }; + + u2port1: usb-phy@11e11000 { + reg =3D <0 0x11e11000 0 0x700>; + clocks =3D <&topckgen CLK_TOP_DA_U2_REFSEL>, + <&topckgen CLK_TOP_DA_U2_CK_1P_SEL>; + clock-names =3D "ref", "da_ref"; + #phy-cells =3D <1>; + }; + }; + ethsys: syscon@15000000 { #address-cells =3D <1>; #size-cells =3D <1>; diff --git a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts b/arch/arm64/boot= /dts/mediatek/mt7986b-rfb.dts index 7673aa3fa6ae..cd1763fa7f19 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts @@ -23,6 +23,24 @@ memory@40000000 { device_type =3D "memory"; reg =3D <0 0x40000000 0 0x40000000>; }; + + reg_3p3v: regulator-3p3v { + compatible =3D "regulator-fixed"; + regulator-name =3D "fixed-3.3V"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + reg_5v: regulator-5v { + compatible =3D "regulator-fixed"; + regulator-name =3D "fixed-5V"; + regulator-min-microvolt =3D <5000000>; + regulator-max-microvolt =3D <5000000>; + regulator-boot-on; + regulator-always-on; + }; }; =20 ð { @@ -163,10 +181,20 @@ &spi1 { status =3D "okay"; }; =20 +&ssusb { + vusb33-supply =3D <®_3p3v>; + vbus-supply =3D <®_5v>; + status =3D "okay"; +}; + &uart0 { status =3D "okay"; }; =20 +&usb_phy { + status =3D "okay"; +}; + &wifi { status =3D "okay"; pinctrl-names =3D "default", "dbdc"; --=20 2.34.1