Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp3951679imc; Sun, 24 Feb 2019 17:39:15 -0800 (PST) X-Google-Smtp-Source: AHgI3IaS1S+bymXKOssMeWnELgVd2paphWXHhBgDMvlYCj6/rvzRyuAOFEjVcDBgDzC4NvZXPEqC X-Received: by 2002:a63:fa48:: with SMTP id g8mr16290855pgk.203.1551058754960; Sun, 24 Feb 2019 17:39:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551058754; cv=none; d=google.com; s=arc-20160816; b=eTdhweyrdrrv3e/Uqbbw/gpXnXy/uZIiT9vhkFFqniOGAyZgxmoG9unDIlIafM8vs8 BUB1hSAZof6X9UHauoB7zbJqEwqDemREh3GJ6fsydXpzRlDjVBlf8knrGCJYq2Bg07Bo gnZPpXlW8VzOpc+mSHGWD6dfVBRIQxiVueoGSPsM/I44hy8q0UmbFMgNOxkFnNq5NmBs 2A48IoZ0pH2rmokYmgwB9E9IHoEDPHhX584J2BQlZXeb/Hlu6cjIM1kxRQC6+vN/Lel8 d3QPTWtRQTQ5SsW7qbzXgvaCRiWLOxcNkfbaoPp6hZ8uSMEIcT647Oe9swS+E29v9goX F3rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=sksCSMDlvoYQ4zTwgRkCD2QpB3e7vp7OB/SVP0gHhX4=; b=hj8g0EQWPdCGf2xHRiRBLeLjmRIF4sKtx50b+EDLk/oyqlRE88ZJRn9EeEZt5BWw3Z KgCdm+ztPsN/DQehpm7keJaKZwkcH4sq1RZaul659uNQusCz2NYLeWcir7Bn/ZH/kxfj 62VKeDqxabOGncubloZXXOwT6HK8nYES+7a0H1WNY9XF9bGwZ5YA1Mx9fkWLZVFd03I6 Zeclc7XD2T/b4YucmtgjDjeZr1XWNa4V7eEcAO0GohUg8HdlM+3B7eknut6+jVTgPHzn hiqUklvRadJFp90bUw6pCrXziMoEUfioQp4GzrnmEX+saGdVNhXVAbW5uFWTLFNihMgo kwUA== 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 t85si8240328pfa.110.2019.02.24.17.38.59; Sun, 24 Feb 2019 17:39:14 -0800 (PST) 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 S1728479AbfBYBgv (ORCPT + 99 others); Sun, 24 Feb 2019 20:36:51 -0500 Received: from Mailgw01.mediatek.com ([1.203.163.78]:47330 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726461AbfBYBgv (ORCPT ); Sun, 24 Feb 2019 20:36:51 -0500 X-UUID: 7fd205b0ed164c14b72a003a086299a1-20190225 X-UUID: 7fd205b0ed164c14b72a003a086299a1-20190225 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1631350980; Mon, 25 Feb 2019 09:36:46 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 25 Feb 2019 09:36:44 +0800 Received: from [10.17.3.153] (172.27.4.253) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 25 Feb 2019 09:36:44 +0800 Message-ID: <1551058604.12020.34.camel@mhfsdcap03> Subject: Re: [PATCH v5 1/6] dt-bindings: usb: musb: Add support for MediaTek musb controller From: Min Guo To: Rob Herring CC: Bin Liu , Greg Kroah-Hartman , Mark Rutland , Matthias Brugger , Alan Stern , , , , , , , , Date: Mon, 25 Feb 2019 09:36:44 +0800 In-Reply-To: <20190222164923.GA26413@bogus> References: <1550561795-31132-1-git-send-email-min.guo@mediatek.com> <1550561795-31132-2-git-send-email-min.guo@mediatek.com> <20190222164923.GA26413@bogus> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, On Fri, 2019-02-22 at 10:49 -0600, Rob Herring wrote: > On Tue, Feb 19, 2019 at 03:36:30PM +0800, min.guo@mediatek.com wrote: > > From: Min Guo > > > > This adds support for MediaTek musb controller in > > host, peripheral and otg mode. > > > > Signed-off-by: Min Guo > > --- > > 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 | 54 ++++++++++++++++++++++ > > 1 file changed, 54 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..0632e6e > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/usb/mediatek,musb.txt > > @@ -0,0 +1,54 @@ > > +MediaTek musb DRD/OTG controller > > +------------------------------------------- > > + > > +Required properties: > > + - compatible : should be one of: > > + "mediatek,mt-2701" > > That looks like a top-level SoC compatible and doesn't match the > example. "mediatek,mt-2701" is an example, just to describe a specific SOC. May I modify compatibel like: compatible : should be "mediatek,mtk-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" > > Not much point in a name when there is only 1. The MUSB core driver has two interrupts, one is for MAC, another for DMA, but on MTK platform, there is only a MAC interrupt, musb core driver uses platform_get_irq_byname(pdev, "mc") to get this interrupt number. > > + - 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 > > + - extcon : for VBUS and ID pin changes detection, needed when > > + supports dual-role mode > > + - 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>; > > + usb_con: connector{ > > + compatible = "usb-b-connector"; > > + label = "micro-USB"; > > + type = "micro"; > > + extcon = <&extcon_usb>; > > The connector node should replace 'extcon'. Add what you need here > directly (e.g. id-gpios). What you add needs to be defined in > usb-connector.txt. OK. > > + vbus-supply = <&usb_vbus>; > > + }; > > +}; > > -- > > 1.9.1 > > Regards, Min.