Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7183678imu; Tue, 22 Jan 2019 01:38:26 -0800 (PST) X-Google-Smtp-Source: ALg8bN5cJNL/bkmyG0XBqplN+8CQSjSahk2T5j4MGEPb+2uiyJoA6+EM0c/MGX+VXuGQvj1JcuOp X-Received: by 2002:a62:5ec5:: with SMTP id s188mr32281839pfb.145.1548149906230; Tue, 22 Jan 2019 01:38:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548149906; cv=none; d=google.com; s=arc-20160816; b=XSu/IpiG1A9XTBwFXugxyJfU45OnVpKCUZcyCx+VEbpNNAch5mid4961B51u2L0kVK eyIG1ZEbfl/WWdy3iga+uGASL8nMZhyrspgAj52lS9xVxdb7xXeSK3S753tgZba7GYja f/5j7i0jt+gaHZBRhA2E24umq+Y9HOzPBikGhQjeXz4SqURXlLP3kFaSPCdQsir7LcYA FDdEfLo1Xd3LxKIcZalCjZcV0IIcdcjf6L8xkPD7rcAmPsEgdQvKIiF+OserO8v+xjgR 691TE1RdpDEIPZJ2fwUGLeBdRPwW80g9aQtqIgFNdUXggCwDI7VPbObX6HbPCUtu9lFJ qW5A== 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=P16oyeH9/MzFihqU0pxPfz/XzD+FeflJLv7kHCWFtow=; b=BGX18mD/W2zJnMxNl+DmDwnJmqVKE/EYwk3s5/FoNVDQXbHGw8SwQG7z9o0Tr2rg4O xtYa7UoGFZ5peKacZEyUhzcXHiujwTAOn8tMArj/dyxRlxwbhDiWaYRgj8snZIvE5R6K lHFvaXjYuHoZrHNye6kFCoz1NHAX42tL5Wb+DorKf/kIImPVQKKGtOFtESyljoz+7ECA yGOobxbyAX1LeAM9J7pMJ/XAHfIS3HKa8gwecwG+WgTxcjNSY5eKRediUjWC4X3x3+Jy D+C0fzGZ8ZzTBLdabDPfweq30M6dqXoE/hsPCaPU9/HK8Qt/sSUx4NDAESZe1cNMgQUi bYUQ== 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 j7si3967265plb.91.2019.01.22.01.38.10; Tue, 22 Jan 2019 01:38:26 -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 S1727846AbfAVJgW (ORCPT + 99 others); Tue, 22 Jan 2019 04:36:22 -0500 Received: from mailgw02.mediatek.com ([1.203.163.81]:22898 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727332AbfAVJgV (ORCPT ); Tue, 22 Jan 2019 04:36:21 -0500 X-UUID: 77f2512ae73b451db95e1ea4fdd29c38-20190122 X-UUID: 77f2512ae73b451db95e1ea4fdd29c38-20190122 Received: from mtkcas36.mediatek.inc [(172.27.4.250)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 271746080; Tue, 22 Jan 2019 17:36:15 +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; Tue, 22 Jan 2019 17:36:13 +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; Tue, 22 Jan 2019 17:36:13 +0800 Message-ID: <1548149773.4433.284.camel@mhfsdcap03> Subject: Re: [PATCH v4 1/6] dt-bindings: usb: musb: Add support for MediaTek musb controller From: Min Guo To: Rob Herring , Bin Liu CC: Mark Rutland , , , , Greg Kroah-Hartman , , , Matthias Brugger , Alan Stern , , , Date: Tue, 22 Jan 2019 17:36:13 +0800 In-Reply-To: <20190121151417.GA19238@bogus> References: <1548073351-13739-1-git-send-email-min.guo@mediatek.com> <1548073351-13739-2-git-send-email-min.guo@mediatek.com> <20190121151417.GA19238@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 Bin, Sorry to bother you again, I encounter a problem about the extcon property. I don't find a common driver describing the usb-connector. Is there any driver that I can refer to, specially the way to switch MUSB controller between host and device mode? If it needs to implement by myself, is it possible to emulate an usb-connector driver by extcon-usb-gpio, and also use the notifier mechanism or can you give me some advices? Hi Rob, On Mon, 2019-01-21 at 09:14 -0600, Rob Herring wrote: > On Mon, Jan 21, 2019 at 08:22:26PM +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 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 > > This is not what I said. I gave you the exact text to put. Sorry to misunderstood your meaning last time, I will modify it in next patch. compatible: should be one of "mediatek,mt2701-musb"...,followed by "mediatek,mtk-musb" > > 3. Remove phy-names > > 4. Add space after comma in clock-names > > --- > > .../devicetree/bindings/usb/mediatek,musb.txt | 43 ++++++++++++++++++++++ > > 1 file changed, 43 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..4305770 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/usb/mediatek,musb.txt > > @@ -0,0 +1,43 @@ > > +MediaTek musb DRD/OTG controller > > +------------------------------------------- > > + > > +Required properties: > > + - compatible : should be "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: > > + - extcon : external connector for VBUS and ID pin changes detection, > > + needed when supports dual-role mode > > Again, do not use extcon in new bindings. Thanks, ok. > > + - vbus-supply : reference to the VBUS regulator, needed when supports > > + dual-role 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>; > > + 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 > > > > > > _______________________________________________ > > linux-arm-kernel mailing list > > linux-arm-kernel@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel Regards, Min.