Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5301059ybi; Tue, 4 Jun 2019 04:41:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzcfHyjZE+hSC3N8TZEb8klZoH90qVrCnOuoPgqOglIUVnP2xc2BmLKBgn0jZ6EBv0vA6cq X-Received: by 2002:a17:902:8696:: with SMTP id g22mr11922784plo.249.1559648480281; Tue, 04 Jun 2019 04:41:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559648480; cv=none; d=google.com; s=arc-20160816; b=QF2EJ+9USN8ZExYfWQIMVQW/soxxeML/aK8sGGYs5jhV1f0VkbG+fi8hPR+Exj9nj4 eIz/J+PA2bH40MPsLZIn7/x+OZlGlOVzU3+GhChE15FSgROnh99KOPiUFROwD8Yzt9Tx wWIf85Ltv1YA5fg3BLQyd/hRKs+6oc0aogRJP6vaF+nl2v4LpEQWCmjtdQq9fPAoXNpy k8zXxZDhy1cSi/g59y6JQbaEc/Kza08r2zGcMFVrCOJoeZVAljLA57tndw8Mc5yCOPLN V4s46Nf5VsMlKvcdDdftA55ZlcRDgfoZBpisH1oaXBpLMrlM5s+P4g9eqNTcBlRnajQm 3PZw== 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=+Pe/RcBnkjYgh5JdLSicOkdAO4rTWW5bK8pWC3SpzR8=; b=uk5AwaKPXe5f+4j7JKQy770Imako0TO5cV7QsMY1dSuFSPzHIkdAtQh9z/XM4d6YuK ctN/NHaz1UrkitxwiIevMjAsW4NFhFf7MMvkqZWOo236uD+YQXpmlHIJRk8zr3pYhydo 1ZJJE+/Tn4sdOdgnOEurOtQLa9EkyZg6vxklCYd9tBpOdVAXTaZjkvzNv/h/VbRHWO76 UzT2ZTxGECbdZnjEHb3BrtxZokWI3MX2afmgqYLlOkpNT7TaDKRD/jq2xd61LIS0ToC2 E1oWcmyFl7kPmba/wg6KQyjFLAHy8m71HZuHh+7RTsMPV5fLkHYyJMhroLpPHpzg5Egg Ox6A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s11si22217656pgp.326.2019.06.04.04.41.01; Tue, 04 Jun 2019 04:41:20 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727444AbfFDLjr (ORCPT + 99 others); Tue, 4 Jun 2019 07:39:47 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:20786 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727280AbfFDLjq (ORCPT ); Tue, 4 Jun 2019 07:39:46 -0400 X-UUID: 3a6d083df8354eb2b87c3666194088d0-20190604 X-UUID: 3a6d083df8354eb2b87c3666194088d0-20190604 Received: from mtkcas35.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 2027787116; Tue, 04 Jun 2019 19:39:37 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 4 Jun 2019 19:39:34 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 4 Jun 2019 19:39:33 +0800 From: To: Bin Liu , Rob Herring CC: Greg Kroah-Hartman , Mark Rutland , Matthias Brugger , Alan Stern , , , , , , , , , Min Guo Subject: [PATCH v6 1/6] dt-bindings: usb: musb: Add support for MediaTek musb controller Date: Tue, 4 Jun 2019 19:39:14 +0800 Message-ID: <1559648359-6569-2-git-send-email-min.guo@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1559648359-6569-1-git-send-email-min.guo@mediatek.com> References: <1559648359-6569-1-git-send-email-min.guo@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain 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 --- 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..7434299 --- /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,mt-2701" + ... + 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 = "linux,typeb-conn-gpio", "usb-b-connector"; + label = "micro-USB"; + type = "micro"; + id-gpios = <&pio 44 GPIO_ACTIVE_HIGH>; + vbus-supply = <&usb_vbus>; + }; +}; -- 1.9.1