Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp360789imu; Thu, 3 Jan 2019 22:09:53 -0800 (PST) X-Google-Smtp-Source: ALg8bN6RWa3HZ/TLTdivla+Y/+0X+rK9gV7zdERAnX6AY638pTCbgHui2z1BR+KYT3/YZae6EX0j X-Received: by 2002:a63:e302:: with SMTP id f2mr19749523pgh.320.1546582193746; Thu, 03 Jan 2019 22:09:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546582193; cv=none; d=google.com; s=arc-20160816; b=D/doF86OrMfMkMgIWpGUVmDDVu9eI1w+cC6NPs40udYLRVRVoIXgwyf8kkzB/mz4Az iOLmUgN5Apu6YZvJxVwc8Ng9DhPhqpi/d3eTI3jwZLKArmG1IIS3jlrHsKVkM3uZGAQo dgacxul2aiAq5rJ5k0pvrdsIJ4Wfo60gWjoID58fti4qypntlUWqcmI0No5LwWSlEUMh dj46uKSooTvGV0QxBD6GHBjgHCKVtkG0Q3Kx9H28pGGygnBn3DgKO51wvbBbSOab57rk t1lNmzDNE2WGP8zgRh9568SErjigeeyjnGIdcl1qNtCxzsIZIdd2hAMNp8ZOBr4fWhOY g9Og== 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=uFiXYpfZSGkIUgimAlO4fPVPnxpZSRd8fseeprKvcEA=; b=IZeX5tF3dKqphrBFFw9XcrDjzDWmgooZ99ztgO3jBv9XLK0omw9Yk65G2HXYiVC+Vy 8oiJmAA/Vm2KryvFaNBMLEtu2hlXZRjQVNOMEA6i+XRjWoLgBHcmg8DvkTdQ/qOahEJV KJfpHY+O44dOAEUMzuhkvBhmbdAeR5QDiIBREpH2roNWxeiQL7nLKJtDViYJHYqs4BFm dgevdv3JnfkT8dOsQNuoJXWgQEZeZfVA+wXHB7pZLhKfyMjZdW1XrHEE9XpTfPzIg3BA s6Z7rJ+naBp3J6TsV25PrCWXfoDw+L/vw/O69pYMhH4F2ftlPDFHmvIGx9XOyJ3DIoAu XLtg== 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 s13si38780686pgc.509.2019.01.03.22.09.38; Thu, 03 Jan 2019 22:09:53 -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 S1726787AbfADDAV (ORCPT + 99 others); Thu, 3 Jan 2019 22:00:21 -0500 Received: from Mailgw01.mediatek.com ([1.203.163.78]:2405 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726418AbfADDAU (ORCPT ); Thu, 3 Jan 2019 22:00:20 -0500 X-UUID: 2861622142994ba8a73c956defbc61bf-20190104 X-UUID: 2861622142994ba8a73c956defbc61bf-20190104 Received: from mtkcas36.mediatek.inc [(172.27.4.250)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1293402557; Fri, 04 Jan 2019 11:00:10 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 4 Jan 2019 11:00:08 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 4 Jan 2019 11:00:07 +0800 Message-ID: <1546570807.585.31.camel@mhfsdcap03> Subject: Re: [PATCH 1/4] 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: Fri, 4 Jan 2019 11:00:07 +0800 In-Reply-To: <20190103221414.GA14639@bogus> References: <1545896066-897-1-git-send-email-min.guo@mediatek.com> <1545896066-897-2-git-send-email-min.guo@mediatek.com> <20190103221414.GA14639@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 On Thu, 2019-01-03 at 16:14 -0600, Rob Herring wrote: > On Thu, Dec 27, 2018 at 03:34:23PM +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 > > --- > > .../devicetree/bindings/usb/mediatek,musb.txt | 49 ++++++++++++++++++++++ > > 1 file changed, 49 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..e899c9b > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/usb/mediatek,musb.txt > > @@ -0,0 +1,49 @@ > > +MediaTek musb DRC/OTG controller > > +------------------------------------------- > > + > > +Required properties: > > + - compatible : should be "mediatek,-musb", > > + "mediatek,mtk-musb", soc-model is the name of SoC, such as > > + mt2701, when using "mediatek,mtk-musb" compatible string, you > > + need SoC specific ones in addition, one of: > > + - "mediatek,mt2701-musb" > > This isn't very clear. Just drop the > compatible: should be one of: > "mediatek,mt2701-musb" > ... > followed by "mediatek,mtk-musb" I will modify it in the next patch. > > + - reg : specifies physical base address and size of > > + the registers > > + - interrupts : interrupt used by musb controller > > + - interrupt-names : must be "mc" > > -names is pointless when there is only one. The MUSB core driver has two interrupts, one is for MAC, another for DMA, but on MTK platform, there is only a MAC interrupt, here following the binding of MUSB core driver. > > + - phys : PHY specifier for the OTG phy > > + - phy-names : should be "usb2-phy" > > Same here. I will modify it in the next patch. > > + - 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" > > space needed after each comma. I will modify it in the next patch. > > + for clocks of controller > > + > > +Optional properties: > > + - extcon : external connector for VBUS and IDPIN changes detection, > > + needed when supports dual-role mode. > > Don't use extcon for new bindings. The usb-connector binding should be > used instead. This is used to detect the changes of the IDPIN and VBUS, the change events are provided by other drivers, such as extcon-usb-gpio.c, and then switch MUSB controller to host or device mode, but the usb-connector can't detect these changes. > > + - vbus-supply : reference to the VBUS regulator, needed when supports > > + dual-role mode. > > The controller is powered from Vbus? Probably not. This belongs in the > connector or maybe the phy (if the phy is powered from Vbus). The Vbus is used to provide 5V voltage to the connected device when the controller works as host mode. > > + - power-domains : a phandle to USB power domain node to control USB's > > + MTCMOS > > + > > +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>; > > + phy-names = "usb2-phy"; > > + vbus-supply = <&usb_vbus>; > > + extcon = <&extcon_usb>; > > + 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>; > > +}; > > -- > > 1.9.1 > >