From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC9ACC4363D for ; Thu, 24 Sep 2020 10:09:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5671F2399A for ; Thu, 24 Sep 2020 10:09:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="VYMiEvad" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727374AbgIXKJt (ORCPT ); Thu, 24 Sep 2020 06:09:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726597AbgIXKJt (ORCPT ); Thu, 24 Sep 2020 06:09:49 -0400 Received: from mail-vs1-xe43.google.com (mail-vs1-xe43.google.com [IPv6:2607:f8b0:4864:20::e43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73D52C0613CE for ; Thu, 24 Sep 2020 03:09:49 -0700 (PDT) Received: by mail-vs1-xe43.google.com with SMTP id e2so1768920vsr.7 for ; Thu, 24 Sep 2020 03:09:49 -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=Kn2+qFRHRQOFTB6gfC/64B7vTCRTjfTNnHcSfiSmojw=; b=VYMiEvadE+WuOWqt/EcqxrrkP8QD00ZygSDrvjt8aoyL8sIU14aJa05m1iQk5pz9Iu O8Uh26VAivvoQQqERo8dTYKRAMe1oE9ANoleiHjeO/6lI9plFqHWisfmKJ2pfVTJJvUm Sxr9Sy2h8nHmMXDPxOqiB5s03zHnvUo0DUU+DliKpbTSbkcfIsNFoUyxBrVNpXGNZ1VE 4d86O5wmvGzZWf7ruyX1pCA2FA7mtxp46VXPMS00t5OB5nQc75OgfnIj36idQ8J5TejF 5MPNR1U3AUr+I++LcNQ1jBS0M+l/xRYg9vac3IMvtUNPMu1+NxnEpToZr6/TPdReMmkS 4lLQ== 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=Kn2+qFRHRQOFTB6gfC/64B7vTCRTjfTNnHcSfiSmojw=; b=MMVwcCmx5+du4fiamJqmb+zYGSPmriOo5cuq6pc6f32n5D3RwAThqpNUitRb2eCUul pyfE5VIyUEEVoUqfz9IGary1AAhBhdkSFzggQjZo/71rjSPBlEDUb0dceepAjh6xlZ40 lQ2zo1lwJyOg3ztLtMxhFATK0Srv0MuBMcfpOtceq+IEA0cxeWboZCKC225ge/zUkOII gmCNly1gQ8wdO1DLWsM6mlyb71ar09t1zjAOG8F8dznbGLVM01u2U2CwtBMbb87Nwhcy 6sdsvbeARIesciCgz4CYVC3vE1LTM2sWDz3q6GiJ+LtKi6LpmdRwOWorQuZqdOmK7WCx +3uw== X-Gm-Message-State: AOAM5321ifF2syew6hLw1n0kykVbC5GJsPQXhCt6jVDxM1T/g+X2MnCG BVYb4n/fuq8dJeY5cOfOYSaXS9BV8e6C9A+IG/91dA== X-Google-Smtp-Source: ABdhPJySvYeu90LKO46pZkw8wIQQ250ltBHpKKI1sljR9Dq4TQ44KVfWZV5qMGz+JOJRF1qnnK/GgYtvbzAbI4fPQ8E= X-Received: by 2002:a67:e3d4:: with SMTP id k20mr2925429vsm.60.1600942188382; Thu, 24 Sep 2020 03:09:48 -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: Thu, 24 Sep 2020 03:09:12 -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-usb@vger.kernel.org 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. Perhaps, I should name it sink-frs-typec-current. Does that make sense to you ? 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 cur= rent > > 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-connector.= yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml > > index 9bd52e63c935..1ca8e6a337e5 100644 > > --- a/Documentation/devicetree/bindings/connector/usb-connector.yaml > > +++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml > > @@ -142,6 +142,14 @@ properties: > > required: > > - port@0 > > > > + frs-typec-current: > > + description: Initial current capability of the new source when vSa= fe5V > > + is applied during PD3.0 Fast Role Swap. "Table 6-14 Fixed Supply= 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 Type-= 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 thi= s, 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 Deliver= y Specification Revision 3.0, > > + * Version 1.2" > > + * Initial current capability of the new source when vSafe5V is applie= d. > > + */ > > +#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 > >