From patchwork Wed Dec 11 01:54:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Min Guo X-Patchwork-Id: 11283685 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 38DD7138C for ; Wed, 11 Dec 2019 01:55:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1573B2073B for ; Wed, 11 Dec 2019 01:55:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IYT1PRzi"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="Q9nLroBZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1573B2073B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=98KE63Xgke1/e9ZgKRrhTVGZqdQetcKg1esOiAgMhhY=; b=IYT1PRzinmFK0F X7xTjH9VBga8Ac6NY9OmYf2ew03vQftv4zX/EEoRpqWUJ6l7gyARTWvDDJPxcuZsluV2oNFCEhYne cdXhrYJMCv1t0hjDzWb4vQLQeQ4KkkeHiDo679XhtNVxtLAasLbjvZXGkDs+ifUpXnxiDvMFbrXDq KJV4iAwQUldItqbN/k1syBzkggZeq2lSPXfW8AxXfG0BIpqDVLQauj8Sn30s0Px+9oHK1cZmtx04a Eh21c3lLW8N+PxHeD++W49JNxIhfz3n+ICanTAnhybXJ7XCrnxYvXb2/3Ul1YARdt5IjeFbRNy4H4 dvox8dUYN7srFYiR3Ihw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ierDi-0005pQ-U9; Wed, 11 Dec 2019 01:55:18 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ierDW-0004r2-LG; Wed, 11 Dec 2019 01:55:08 +0000 X-UUID: 5b20f7d4331a4128b70a626c610524ed-20191210 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=DTdqGLNreI4e1sJ9dvMRJhExLHYEoJ4Xe55wfAj33vc=; b=Q9nLroBZkZ5vpoA3hQi4E83MuQL+Kv1dgkY9tquHDbcFc2hK1ced5lW5dPCIN+kVugkm3mYfV5/gl8FezwBme/CwRz5kmm+Qox9FLwo0vlvGrnxvpBpwKzpO2wTf/GcbX0xQbSHcB0YdAlSkI/np99PnCfZFv8zmrb7e4UnDLf4=; X-UUID: 5b20f7d4331a4128b70a626c610524ed-20191210 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 76203771; Tue, 10 Dec 2019 17:55:00 -0800 Received: from MTKMBS31DR.mediatek.inc (172.27.6.102) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 10 Dec 2019 17:55:57 -0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 11 Dec 2019 09:54:48 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 11 Dec 2019 09:54:47 +0800 From: To: Bin Liu , Rob Herring Subject: [PATCH v9 1/6] dt-bindings: usb: musb: Add support for MediaTek musb controller Date: Wed, 11 Dec 2019 09:54:41 +0800 Message-ID: <20191211015446.11477-2-min.guo@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20191211015446.11477-1-min.guo@mediatek.com> References: <20191211015446.11477-1-min.guo@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 87FF25A57B59E089C7D4840C86B52E863F4494460E20D7CEF27A07A97310AFC32000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191210_175506_710697_70B5E80B X-CRM114-Status: GOOD ( 13.16 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 MIME_BASE64_TEXT RAW: Message text disguised using base64 encoding -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, hdegoede@redhat.com, tony@atomide.com, Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Matthias Brugger , Alan Stern , Min Guo , chunfeng.yun@mediatek.com, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org From: Min Guo This adds support for MediaTek musb controller in host, peripheral and otg mode. Signed-off-by: Min Guo Reviewed-by: Rob Herring --- changes in v9: 1. Add usb-role-switch 2. Remove label of usb connector child node 3. Change usb connector child node compatible as "gpio-usb-b-connector", "usb-b-connector"; changes in v8: 1. Add reviewed by Rob changes in v7: 1. Modify compatible as - compatible : should be one of: "mediatek,mt2701-musb" ... followed by "mediatek,mtk-musb" 2. Change usb connector child node compatible as "gpio-usb-b-connector" changes in v6: 1. Modify usb connector child node changes in v5: suggested by Rob: 1. Modify compatible as - compatible : should be one of: "mediatek,mt-2701" ... followed by "mediatek,mtk-musb" 2. Add usb connector child node changes in v4: suggested by Sergei: 1. String alignment changes in v3: 1. no changes changes in v2: suggested by Bin: 1. Modify DRC to DRD suggested by Rob: 2. Drop the "-musb" in compatible 3. Remove phy-names 4. Add space after comma in clock-names --- .../devicetree/bindings/usb/mediatek,musb.txt | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/mediatek,musb.txt diff --git a/Documentation/devicetree/bindings/usb/mediatek,musb.txt b/Documentation/devicetree/bindings/usb/mediatek,musb.txt new file mode 100644 index 000000000000..2b8a87c90d9e --- /dev/null +++ b/Documentation/devicetree/bindings/usb/mediatek,musb.txt @@ -0,0 +1,57 @@ +MediaTek musb DRD/OTG controller +------------------------------------------- + +Required properties: + - compatible : should be one of: + "mediatek,mt2701-musb" + ... + followed by "mediatek,mtk-musb" + - reg : specifies physical base address and size of + the registers + - interrupts : interrupt used by musb controller + - interrupt-names : must be "mc" + - phys : PHY specifier for the OTG phy + - dr_mode : should be one of "host", "peripheral" or "otg", + refer to usb/generic.txt + - clocks : a list of phandle + clock-specifier pairs, one for + each entry in clock-names + - clock-names : must contain "main", "mcu", "univpll" + for clocks of controller + +Optional properties: + - power-domains : a phandle to USB power domain node to control USB's + MTCMOS + +Required child nodes: + usb connector node as defined in bindings/connector/usb-connector.txt +Optional properties: + - id-gpios : input GPIO for USB ID pin. + - vbus-gpios : input GPIO for USB VBUS pin. + - vbus-supply : reference to the VBUS regulator, needed when supports + dual-role mode + - usb-role-switch : use USB Role Switch to support dual-role switch, see + usb/generic.txt. + +Example: + +usb2: usb@11200000 { + compatible = "mediatek,mt2701-musb", + "mediatek,mtk-musb"; + reg = <0 0x11200000 0 0x1000>; + interrupts = ; + 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>; + usb-role-switch; + connector{ + compatible = "gpio-usb-b-connector", "usb-b-connector"; + type = "micro"; + id-gpios = <&pio 44 GPIO_ACTIVE_HIGH>; + vbus-supply = <&usb_vbus>; + }; +};