Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3846741yba; Mon, 29 Apr 2019 09:27:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEovBypdFoh2BBW4WqSeKSZuP4siKNxBzWPIJCvv6bq5I6/M3Bh9Ox9plshU6rcoVmlCG4 X-Received: by 2002:a17:902:8d97:: with SMTP id v23mr62521358plo.298.1556555238066; Mon, 29 Apr 2019 09:27:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556555238; cv=none; d=google.com; s=arc-20160816; b=UYW2yik9OP9m2rzyGILXP4I8YgxfhtyjOkMxS/bAcJo1A3lNwuMvGW6MCpmA/hivgB vKvUpFVrd5s9WS0YnX2ou0JJ4xGYtwxztwZk87CiGIFYjoANC2hj0Q6tbREaGxvnlVJ+ 3MMrvLncF4j9HewaeS6rT/ObsySiXxy7hcyY8BiqvClRv5FbrlsX23QpI+X/rBhYOzlf lAFCGL9O0vdsN5C6H8mcb6oEoUy8e0mHwNamRttJX0Hq4YLH5oZRtALVFccW/P6I1/+6 B2obXNkr7s8v8O0v2qSvvTpklmhk4WxpR9ckdcH5u2/6WxjP7T8YVN7etIlSoyqhWxr+ NQcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=if1+nJ1xV54SI6xytvIqpVlz6Dj4sffUjugW97UUJYk=; b=zQ8msKoVNJcSlDJNL/kLDD2SasGRb1OiWfXzQPgUxDxh8Iqt2G2SkTHw1oegLNojWw cU/cXqWVtbYp/3ylb6lTd1y/q6fyxLDeWDC+hszqyQgNs2srskNMuiGjwLW5CblklY5T vyDouUMex+bMfY8oF2JP6tOQjmGN1eywizVngJtinCLDHgA/yAbY2fPJFuhKpwKbQaDt 4gnakVjCSVTG+/2VHulY9uCuFIdVcZQmqZ1A7zRuWtcA3tNJj194nEid9K/T0fx6+LX1 iyjFHo+AEFqsQkcLcAyx67BRxMeAlBuakMZO4njLQmirpGcWDyUmtZ7UblpMz/C/I0r+ ZqiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Yxj4nj4R; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q23si8062630pgg.432.2019.04.29.09.27.00; Mon, 29 Apr 2019 09:27:18 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Yxj4nj4R; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728679AbfD2Q0J (ORCPT + 99 others); Mon, 29 Apr 2019 12:26:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:52118 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728518AbfD2Q0I (ORCPT ); Mon, 29 Apr 2019 12:26:08 -0400 Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E8DC32173E; Mon, 29 Apr 2019 16:26:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556555167; bh=bj7+n3P2zt1GsKkIXPcHMBO06qBROIEGOQ+zCdPaqFs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Yxj4nj4RhtP2Dp8y/Di6Rzz6NsAcd3KJTq9TajPpD+r5Gpv8iiusYuRWYLRP/Ev17 OJkUjzbPoUFvwDC86helwDwR7/ou0qo/ZS3tLiMZsOVx+/oeRBhg1DxHke921YYTcA i+JXFDh2Yjnbl5k3YHlkRVjeV0rA3JZobObf87P8= Received: by mail-qt1-f181.google.com with SMTP id b3so12574269qtc.12; Mon, 29 Apr 2019 09:26:06 -0700 (PDT) X-Gm-Message-State: APjAAAWB39dkjkWlCN0miW3oExTEEUj5vDuePIp7AbFsbaGwXGopUKE9 a0TGQEw5QJXaKeXHRYef15Fl+A8QlTkcjOTcpQ== X-Received: by 2002:a0c:d2f2:: with SMTP id x47mr48617546qvh.90.1556555166043; Mon, 29 Apr 2019 09:26:06 -0700 (PDT) MIME-Version: 1.0 References: <1556261237-13823-1-git-send-email-chunfeng.yun@mediatek.com> <1556261237-13823-4-git-send-email-chunfeng.yun@mediatek.com> <20190426204906.GB15074@bogus> <1556453788.10179.224.camel@mhfsdcap03> In-Reply-To: <1556453788.10179.224.camel@mhfsdcap03> From: Rob Herring Date: Mon, 29 Apr 2019 11:25:54 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 3/6] dt-bindings: usb: mtu3: add properties about USB Role Switch To: Chunfeng Yun Cc: Greg Kroah-Hartman , Heikki Krogerus , Mark Rutland , Matthias Brugger , Adam Thomson , Li Jun , Badhri Jagan Sridharan , Hans de Goede , Andy Shevchenko , Min Guo , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Linux USB List , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "moderated list:ARM/Mediatek SoC support" , Biju Das , Linus Walleij Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 28, 2019 at 7:16 AM Chunfeng Yun wrote: > > 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. Wouldn't it know by presence of 'extcon' property or not? > 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 That use case doesn't sound like something that should be in DT though. That would be possible for any controller that supports dual-role. Though perhaps that requires some specific Vbus wiring? Or a cable with Vbus disconnected. Either way, doesn't sound USB compliant. Rob