Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3469822pxk; Mon, 28 Sep 2020 19:46:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywCPpI8vPEV2Qn5xnSQ606tTlI/Ych2cR0CiXswxpw+g0yEtKK7KT9/Ph/abCy0IGkD3i7 X-Received: by 2002:a05:6402:10c6:: with SMTP id p6mr1017381edu.76.1601347585116; Mon, 28 Sep 2020 19:46:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601347585; cv=none; d=google.com; s=arc-20160816; b=MRkzE04v5f+N1yVoPIcS1MVZTorshD+TGlrGXXXT119laCzj+sDsx56i7oVWjHuQHp umCkVXtY8XWfe4ZEek6jwAEiAV5UopXMylDRVH7woja2kDgxOac2M06j9kLHZSqlTnie fpG6yD8CXxEs2V2P6gwlut5264J0+Jf+NZmBWvoqFUI9C+LT6q5EPIZKYIp9QWoPD6La tenkeVtJuJllCU4qSO6I65eO+rxlph87XtrDqNe72UtPE3kjyIcvJ4BS41mqFKdV1buq GPzUjWwkBk5v6Y72GzV7DAcoa0sM2TQslEzVsxtjgSvMV7bAIyX718Wrxs49bOXbuo+V 8uxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=du0LpYhMc2coaa2W/VPPJIZfYKYeR/Zd26zfBJn6HZU=; b=Y3h5yzjcPUKyXc6eLcce1wjuIHo7fwIcDkrkbf+TgonSUhZq6vxcr7l0E9oue+e4Si Cqtvr5W54ey4+ugt1F+eqXczXv3+1ctIBJYCOd2g6xuMvDKS9ri48nqV5KT6wa3rnm+r uecimqLr2gXdNurgOr4qjJXlSUZgkfh8jCU0Dhl9WCXztgDoX3cAZEzWELkwEZzpOyhU ysCYN9IvrGpLcpn7TY9ULIa881JvPXIuv88wU7aupVBGuYGwUu3CgbBYYdnPoDH8Pdir +LllGiB9u30CYxmV3Bu6c5Xyvbu5m591K70AMHO/roOlhPTYfUZi5FRt6ACsuihHZQYR +LGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=JdnGypDG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lh12si546929ejb.343.2020.09.28.19.45.55; Mon, 28 Sep 2020 19:46:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=JdnGypDG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726924AbgI2Co0 (ORCPT + 99 others); Mon, 28 Sep 2020 22:44:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727268AbgI2Co0 (ORCPT ); Mon, 28 Sep 2020 22:44:26 -0400 Received: from mail-vs1-xe41.google.com (mail-vs1-xe41.google.com [IPv6:2607:f8b0:4864:20::e41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 082B2C0613CF for ; Mon, 28 Sep 2020 19:44:25 -0700 (PDT) Received: by mail-vs1-xe41.google.com with SMTP id 5so2060330vsu.5 for ; Mon, 28 Sep 2020 19:44:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=du0LpYhMc2coaa2W/VPPJIZfYKYeR/Zd26zfBJn6HZU=; b=JdnGypDGchYfJUMn1e0y03eunpjNQD8EeW9dWpN6m6OH4q643xScWrJ4ztkoE/UEbY /RDGlkO1+SBZdthpGWjWQhnLhMQMKHy1EaEL/73WKbJfk/FNJ9OLXq85jVx0/NiBEiW6 q1RTdglBdll/nk0pYJw0QVatuYy0QzvvdgtURcFp/SsA85n7ieVlz13Zw++ghfu7Y8ym moF2uRzpiA9/T6DpE9FEI8hPN72z1C/TvSfHU1EX8l3L22y9GC4p6GJHLDEyQH4wLCTT PTAg+UpvknampBCRlaAZlnJEgkIT0XB4IUiJsic20XI0Pe3y/17O/rCWEdY4z81im1KZ aOsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=du0LpYhMc2coaa2W/VPPJIZfYKYeR/Zd26zfBJn6HZU=; b=o5e7Q0VIt2dec4X6zl/Q2Xoc7qh8D0OhPuFOtXAt3ybSeHmPoYeoFbLLjFycarR1Qa ensJTY0/OKajahEmooyvhw0SqNpgC/dnlDve7UQf8D4EYkuU/ktaKbnKHbAX0PIpbbMF k4K8uNBcyMHOLyoinmkyyZK4nRD6hYqJIPK/uKfrKlnctkwUu4hb2kGYvJ0t4bNqZ269 WU3OKXnE5Yq0KEbTOFbC0GfNLVOTsOZ/bPRAF/IzVOX9sbbzWaJQSyels6r5oHa3xEF0 MNOvFYV4d+9rBz2AVrfZL/dx5+9szHHGWZvqX/hdD/ZFccLzs36b5a4TxEVV3XkQH/Qu 8ZRg== X-Gm-Message-State: AOAM531LKmwZiPDtO8aDbN2/fu+FtH+7sIG7yVTf0v1iULxh9yF/YRD9 pUWTHb3y1tT+55MtlF9PZFtOCNeWhkFtje4cLSPgoQ== X-Received: by 2002:a67:c398:: with SMTP id s24mr1619426vsj.58.1601347464908; Mon, 28 Sep 2020 19:44:24 -0700 (PDT) MIME-Version: 1.0 References: <20200921195555.1050731-1-badhri@google.com> <20200921195555.1050731-5-badhri@google.com> In-Reply-To: From: Badhri Jagan Sridharan Date: Mon, 28 Sep 2020 19:43:48 -0700 Message-ID: Subject: Re: [PATCH v8 05/11] dt-bindings: connector: Add property to set initial current cap for FRS To: Jun Li Cc: Guenter Roeck , Heikki Krogerus , Greg Kroah-Hartman , Rob Herring , Lee Jones , Mark Brown , Maxime Ripard , Alexandre Belloni , Thierry Reding , Prashant Malani , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , lkml , Linux USB List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 28, 2020 at 1:57 AM Jun Li wrote: > > Badhri Jagan Sridharan =E4=BA=8E2020=E5=B9=B49=E6=9C= =8824=E6=97=A5=E5=91=A8=E5=9B=9B =E4=B8=8B=E5=8D=886:09=E5=86=99=E9=81=93= =EF=BC=9A > > > > Hi Jun, > > > > Thanks for the feedback ! > > The sink PDO from current source reflects the current source's(i.e. > > transmitter of the FRS signal) power requirement during fr swap. > > The current sink (i.e. receiver of the FRS signal) should check if it > > will be able to satisfy the current source's > > requirement during frswap before enabling the frs signal reception. > > The property in this patch refers to maximum current capability > > that the current sink can satisfy. > > In this case I agree a new property is required. > > Rob mentioned another similar property for typec[1], which is > for typec source(without power delivery) to define its power > capability to present its Rp, so a different usage. > > [1]https://lore.kernel.org/linux-arm-kernel/20200902075707.9052-2-amelie.= delaunay@st.com/ > > > Perhaps, I should name it > > sink-frs-typec-current. Does that make sense to you ? > > it looks better, thanks. Ended up naming it new-source-frs-type-ccurrent and have sent the v9 version of the patch. Thanks for you reviews ! > > Li Jun > > > > Thanks, > > Badhri > > > > On Wed, Sep 23, 2020 at 3:43 AM Jun Li wrote: > > > > > > Badhri Jagan Sridharan =E4=BA=8E2020=E5=B9=B49=E6= =9C=8822=E6=97=A5=E5=91=A8=E4=BA=8C =E4=B8=8A=E5=8D=883:57=E5=86=99=E9=81= =93=EF=BC=9A > > > > > > > > This change adds frs-typec-current which allows setting the initial= current > > > > capability of the new source when vSafe5V is applied during PD3.0 > > > > sink Fast Role Swap. > > > > > > > > Signed-off-by: Badhri Jagan Sridharan > > > > --- > > > > Changes since v1: > > > > - Changing patch version to v6 to fix version number confusion. > > > > > > > > Changes since v6: > > > > - Removed the redundant usb-connector.txt that I created by mistake= . > > > > - Moved to yaml. > > > > > > > > Changes since v7: > > > > - Rebase > > > > --- > > > > .../devicetree/bindings/connector/usb-connector.yaml | 8 ++++++= ++ > > > > include/dt-bindings/usb/pd.h | 10 ++++++= ++++ > > > > 2 files changed, 18 insertions(+) > > > > > > > > diff --git a/Documentation/devicetree/bindings/connector/usb-connec= tor.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml > > > > index 9bd52e63c935..1ca8e6a337e5 100644 > > > > --- a/Documentation/devicetree/bindings/connector/usb-connector.yam= l > > > > +++ b/Documentation/devicetree/bindings/connector/usb-connector.yam= l > > > > @@ -142,6 +142,14 @@ properties: > > > > required: > > > > - port@0 > > > > > > > > + frs-typec-current: > > > > + description: Initial current capability of the new source when= vSafe5V > > > > + is applied during PD3.0 Fast Role Swap. "Table 6-14 Fixed Su= pply PDO - Sink" > > > > + of "USB Power Delivery Specification Revision 3.0, Version 1= .2" provides the > > > > + different power levels and "6.4.1.3.1.6 Fast Role Swap USB T= ype-C Current" > > > > + provides a detailed description of the field. > > > > + $ref: /schemas/types.yaml#/definitions/uint32 > > > > > > If it's a part of sink PDO, I think you don't need a new property for= this, just > > > define it directly into sink-pdos by adding a new PDO define for PD 3= .0, > > > something like: > > > > > > sink-pdos =3D ; > > > > > > Li Jun > > > > + > > > > required: > > > > - compatible > > > > > > > > diff --git a/include/dt-bindings/usb/pd.h b/include/dt-bindings/usb= /pd.h > > > > index 985f2bbd4d24..db1ad4532197 100644 > > > > --- a/include/dt-bindings/usb/pd.h > > > > +++ b/include/dt-bindings/usb/pd.h > > > > @@ -35,6 +35,16 @@ > > > > > > > > #define VSAFE5V 5000 /* mv units */ > > > > > > > > +/* > > > > + * Based on "Table 6-14 Fixed Supply PDO - Sink" of "USB Power Del= ivery Specification Revision 3.0, > > > > + * Version 1.2" > > > > + * Initial current capability of the new source when vSafe5V is ap= plied. > > > > + */ > > > > +#define FRS_NOT_SUPPORTED 0 > > > > +#define FRS_DEFAULT_POWER 1 > > > > +#define FRS_5V_1P5A 2 > > > > +#define FRS_5V_3A 3 > > > > + > > > > #define PDO_BATT_MAX_VOLT_SHIFT 20 /* 50mV units */ > > > > #define PDO_BATT_MIN_VOLT_SHIFT 10 /* 50mV units */ > > > > #define PDO_BATT_MAX_PWR_SHIFT 0 /* 250mW units */ > > > > -- > > > > 2.28.0.681.g6f77f65b4e-goog > > > >