Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp508791ybg; Fri, 18 Oct 2019 03:15:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVGRV/ixwyOaU/0FlOXmySVzMN5PWa4ytg5OvFMxlZgjJfLMHpydPNS+g7bNCAxiYyMxul X-Received: by 2002:a50:ee12:: with SMTP id g18mr8601149eds.114.1571393738231; Fri, 18 Oct 2019 03:15:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571393738; cv=none; d=google.com; s=arc-20160816; b=YOJpGsSPhqSRI0eNc9RHI8NeKgDXzn7udZhOcMiwo48eZ6ld+WY2W5ASPI4YbIyZ3x 1cLb9Jp90Y5MW2Y9xBi0tE2WTUCqcQ/fcfIumK/fOYeQ0yOjLdudByuF2VKLBm2XYWuu EJkeHHEmFFZnj3zdLWTKKQeUqLhv0XHuvHPVGmqYuOq0V+AQwscAZF+KXkga/VNA1Maz NZSd+CQXWLBJIcoSywpbqEt8umw0S+QKWFU/MsaQYoHiJeZsVh5PjjG1CKvmSpNgMEO0 UCt5yB9FWreVCXq7Z+W6hipOtKnSVkT1bdNmJAS58FIXUs0kJDBfFOR0KNIjMU1F2+MZ jF4A== 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=AHg6lwLGIQZ/2T9SvL3DupKWw6uSJY3h3p3Cvi8WBhg=; b=NyfCMCakz4alizkliQh+AmOevh8bSMp6ilMH8sEmBL3uqjo9zqidyrYHwpTf2Km66L N2zlHJbgpUZ2NMyi9t0tFDuREzfoWCvuuc1P7/ADrYcCBUwuyA8urVnFzjGeVJ2mQN9Y cS2QAPr8LsnFE34qj9M2PsSXiQw2nSMPYotHZcvOxqYDJP+bFJYi3UkPvRPZhBrtWFpT H8DeafLNCF9Z/M/DMibIhQB3Pz8eJZ8csaQo8sYckeTvDoaF6cMRhUGKLO8+LGZwe4FS RY4Jt51lH+anNGWLtmWPfE86zQu1QRvGgp0t2eOyB2zaEWtLrglMv84n1SE3219jdLM9 PPPA== 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 c48si3382837edc.169.2019.10.18.03.15.14; Fri, 18 Oct 2019 03:15:38 -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 S2408260AbfJQI0Z (ORCPT + 99 others); Thu, 17 Oct 2019 04:26:25 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:63404 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2408245AbfJQI0Z (ORCPT ); Thu, 17 Oct 2019 04:26:25 -0400 X-UUID: e47f34c129364d959461b130c31496c1-20191017 X-UUID: e47f34c129364d959461b130c31496c1-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 326889473; Thu, 17 Oct 2019 16:26:12 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 17 Oct 2019 16:26:10 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 17 Oct 2019 16:26:10 +0800 From: To: Bin Liu , Rob Herring CC: Greg Kroah-Hartman , Mark Rutland , Matthias Brugger , Alan Stern , , , , , , , , , Min Guo Subject: [PATCH RESEND v7 1/6] dt-bindings: usb: musb: Add support for MediaTek musb controller Date: Thu, 17 Oct 2019 16:25:49 +0800 Message-ID: <20191017082554.27953-2-min.guo@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20191017082554.27953-1-min.guo@mediatek.com> References: <20191017082554.27953-1-min.guo@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 4ED10C889B902A1A82AC1FD48C18778CAA1FE575CE1BD26985FC9F20878486BE2000: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 --- 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