Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2618377yba; Sun, 28 Apr 2019 05:18:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqz9JAnOCPIXvJTCFbBU3REE4ki0quuwIB4aR/ahT4AX1pNZeTlzoP203OXPahki7AkqMbMx X-Received: by 2002:a63:f448:: with SMTP id p8mr53829727pgk.50.1556453903918; Sun, 28 Apr 2019 05:18:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556453903; cv=none; d=google.com; s=arc-20160816; b=j3VcWGnWyTAxdY59blwMvRLbA7d0BWxEmyXCZP9pAkep9hP8myzuu0860S6pIhHDcT 7ho9SL9Mz08FsUlTjS+/q4zYvxCtMRlkuLoCJG+bmTl1POsK+XU81q3z3sfEsXqWHoN3 2OdxmkVg1iXJZMREZp1DUn/da3NvRe2yweb8ns1JIr5O4Zx2Lrht224BovOpLHgqo0fI M2ujggNqLASIuuIVN7qUHvguTGdDP43co/zE4B6CBmGEu085+MHJLKTAwF6ivlYiI0X6 iHOtfWNGG4NyeGrPkt8p8TX7Q3OxyBXVOt3ItN4EA7vxl+P89UZCW9DRi1dXGKKbLXHn 6LUw== 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=bpLspwAB7rqg+O+IAmA3386ChQvZkz2ThBH0QxLVkvY=; b=s+fqWDnDKnY/JTF2Du3JgEW2rgPOwFZAgodCuM7Sp7G0pF4Kyc6YYdmUi+8C8Ryrf6 fGfcU3hWtpQuC3s+7HPyrXEOQzflguHvOM6EgfBMFNSy9+gX5JLuJiM0/KxGheDOxAZq mxjWR7f/2sOADDGp8/Edn7eDYneaHrtIGpw01xqJ0iclwLeKgbWIzaAqYpnabHiceg8e ngzIcK34/JvxmE2TFIvyTy8sDDf3lhUhfasQZwvDEHB9LYBr+LXTDzB6dtoZArLfYZGT AJaFFNbMAXMpV/Fu2T9HR5gJgbfYhOuvRa3iXN9kRAk/YIFm0YYA9K7VbwbuTpFTLHml pMyA== 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 v3si29327453pga.354.2019.04.28.05.17.57; Sun, 28 Apr 2019 05:18:23 -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 S1726674AbfD1MQi (ORCPT + 99 others); Sun, 28 Apr 2019 08:16:38 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:56089 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726480AbfD1MQh (ORCPT ); Sun, 28 Apr 2019 08:16:37 -0400 X-UUID: 1f637e104eea43569a06ec1c775d2b48-20190428 X-UUID: 1f637e104eea43569a06ec1c775d2b48-20190428 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1683014745; Sun, 28 Apr 2019 20:16:30 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sun, 28 Apr 2019 20:16:29 +0800 Received: from [10.17.3.153] (172.27.4.253) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Sun, 28 Apr 2019 20:16:28 +0800 Message-ID: <1556453788.10179.224.camel@mhfsdcap03> Subject: Re: [PATCH v4 3/6] dt-bindings: usb: mtu3: add properties about USB Role Switch From: Chunfeng Yun To: Rob Herring CC: Greg Kroah-Hartman , Heikki Krogerus , Mark Rutland , Matthias Brugger , Adam Thomson , Li Jun , "Badhri Jagan Sridharan" , Hans de Goede , Andy Shevchenko , Min Guo , , , , , , Biju Das , Linus Walleij Date: Sun, 28 Apr 2019 20:16:28 +0800 In-Reply-To: <20190426204906.GB15074@bogus> References: <1556261237-13823-1-git-send-email-chunfeng.yun@mediatek.com> <1556261237-13823-4-git-send-email-chunfeng.yun@mediatek.com> <20190426204906.GB15074@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 Fri, 2019-04-26 at 15:49 -0500, Rob Herring wrote: > On Fri, Apr 26, 2019 at 02:47:14PM +0800, Chunfeng Yun wrote: > > Now the USB Role Switch is supported, so add properties about it > > > > Signed-off-by: Chunfeng Yun > > --- > > v4: no changes > > v3: no changes > > > > v2 changes: > > 1. fix typo > > 2. refer new binding about connector property > > --- > > .../devicetree/bindings/usb/mediatek,mtu3.txt | 10 ++++++++-- > > 1 file changed, 8 insertions(+), 2 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt > > index 3382b5cb471d..6e004c4a89af 100644 > > --- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt > > +++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt > > @@ -27,7 +27,9 @@ Optional properties: > > - ranges : allows valid 1:1 translation between child's address space and > > parent's address space > > - extcon : external connector for vbus and idpin changes detection, needed > > - when supports dual-role mode. > > + when supports dual-role mode; it's consiedered valid for compatibility > > + reasons, and not allowed for new bindings, use the property > > + usb-role-switch instead. > > - vbus-supply : reference to the VBUS regulator, needed when supports > > dual-role mode. > > - pinctrl-names : a pinctrl state named "default" is optional, and need be > > @@ -36,7 +38,8 @@ Optional properties: > > is not set. > > - pinctrl-0 : pin control group > > See: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt > > - > > + - usb-role-switch : use USB Role Switch to support dual-role switch, but > > + not extcon > > Coordinate with the Renesas and HiSilicon folks implementing the same > thing and put this in a common spot. I'll prepare a patch for it, and CC Biju and Yu > However, I think this should not > even be needed as knowing the controller capabilities (based on the > compatible) and knowing the type of connector should be enough > information to tell you if dual role is supported or not. Some Dual-Role controller drivers already used extcon framework to handle role switch, if try to support the new USB Role Switch framework, the driver may want to know which way will be used. Sometimes users also want to use dual-role even use the type-A, such as use sys interface to handle role switch, so only knowing the connector type can't tell driver which way to use > > > - maximum-speed : valid arguments are "super-speed", "high-speed" and > > "full-speed"; refer to usb/generic.txt > > - enable-manual-drd : supports manual dual-role switch via debugfs; usually > > @@ -61,6 +64,9 @@ The xhci should be added as subnode to mtu3 as shown in the following example > > if host mode is enabled. The DT binding details of xhci can be found in: > > Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt > > > > +The port would be added as subnode if use usb-role-switch property > > + see graph.txt > > + > > Example: > > ssusb: usb@11271000 { > > compatible = "mediatek,mt8173-mtu3"; > > -- > > 2.21.0 > >