Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp734036ybg; Fri, 18 Oct 2019 06:38:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYXU5/UH5ZAWPhOGOZ/7UOLIzHDxXUYK66f5fTjrnrHMsXY39BDN5A+1c9q8Dznm8aWM+P X-Received: by 2002:a50:ee8f:: with SMTP id f15mr9667334edr.127.1571405919444; Fri, 18 Oct 2019 06:38:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571405919; cv=none; d=google.com; s=arc-20160816; b=JwsizyC1r5hLiVZifk4gXKPjPDjyd//t45YoXJOKTXPHia6g9dSIzWcLkyfeWwr8fv fXmyDKSmX89uMs7XsG/Y8p8CjOO3V9JZ45GW2g8weFtyl6v3ZqYdBNdHWWGbxm8yQqd5 zmh843Kfmw1BYPaazbbqTXeC69avXId2G8wb1Fyft9MB3ivvg8KYRNAUHld4NJ+A3DVX 9zKg2b+dME+tfp90C0ute7lHD7qNNNowSSk9Eil29Kr31wT2z4NQnOBsLgl/L4AwAVG2 TJdILK2yMxUZraaFG7zLwEscZmYwFRoF2avbWxRzz7jDTAd7qv68QfVAVsibuAWaYJkR CGjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=kJ3zby1l6n4M1He1E4Crf0yXbLUqPT0VtBv3aXwZJoU=; b=qzecJAJZhIakA4TDnYiiDiToC6wNtEup1IljEMDIQ+w5ptVwNSG+aQEiYyzQjmH7L7 4xZp96nDwL4WDXTTYKnzkbE60t5u3J3Otndbl1u+yXM3sGfnCu6B0z5YqDlS7exHP9NH JJs/rrCdw8YMDCBaqjWvRwIZrUxwf3dNYchKz3wrxo8xsQg2CA9u3ii2zajnUnX+YpXJ YAa4ZWRfR5067K3gE59+GLlRM5pX0rqSh9raD/Z0zFBDShLohPle2gyiLJKhaTlaSrvz IU4dT+EI0NFurcOw5R6I/esZBTajC9Q1ParuwjHNStLRWGx2aNY6vDaB4dXv/FWJIjME I/Fg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oz20si3273031ejb.436.2019.10.18.06.38.15; Fri, 18 Oct 2019 06:38:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408616AbfJQJl5 (ORCPT + 99 others); Thu, 17 Oct 2019 05:41:57 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:56269 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2439562AbfJQJlo (ORCPT ); Thu, 17 Oct 2019 05:41:44 -0400 X-UUID: 6524f0b8618443828350a297ae84d73c-20191017 X-UUID: 6524f0b8618443828350a297ae84d73c-20191017 Received: from mtkcas35.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 225798706; Thu, 17 Oct 2019 17:41:32 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 17 Oct 2019 17:41:28 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 17 Oct 2019 17:41:28 +0800 From: To: Bin Liu , Rob Herring CC: Greg Kroah-Hartman , Mark Rutland , Matthias Brugger , Alan Stern , , , , , , , , , Min Guo Subject: [PATCH v8 1/6] dt-bindings: usb: musb: Add support for MediaTek musb controller Date: Thu, 17 Oct 2019 17:41:21 +0800 Message-ID: <20191017094126.29045-2-min.guo@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20191017094126.29045-1-min.guo@mediatek.com> References: <20191017094126.29045-1-min.guo@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 4C42AC1DF3E6E64DD7753176B63360E60EEFD50B26B68F67710C7F3377DD046D2000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 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 | 55 ++++++++++++++++++++++ 1 file changed, 55 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 0000000..e53c482 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/mediatek,musb.txt @@ -0,0 +1,55 @@ +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 + +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>; + connector{ + compatible = "gpio-usb-b-connector"; + label = "micro-USB"; + type = "micro"; + id-gpios = <&pio 44 GPIO_ACTIVE_HIGH>; + vbus-supply = <&usb_vbus>; + }; +}; -- 1.9.1