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=-10.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 51ECEC4741F for ; Mon, 9 Nov 2020 16:03:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E056321D7F for ; Mon, 9 Nov 2020 16:03:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604937789; bh=YkEwFfSdMDdq9/clov9ZEns0F1+3sR4zx7EG5cfZhYc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=wOGMjA6b2dEl7pqLX5nc5JvHbh4mL9KgUJiqxbNXC3O7eC2UCrkLrcJULNqgXtbq2 ZRc/PimUVad0Rz+HIPevxzxgsw9nCGhz8tkGLwy9IlwSuifG7tFrgvqNTRye3jiDkz 7lLnm3LtET5c6bqz99cJp3AK0MlsUGnKdiMIMjgI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729791AbgKIQDG (ORCPT ); Mon, 9 Nov 2020 11:03:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:44034 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729658AbgKIQDF (ORCPT ); Mon, 9 Nov 2020 11:03:05 -0500 Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) (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 72E74216C4; Mon, 9 Nov 2020 16:03:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604937784; bh=YkEwFfSdMDdq9/clov9ZEns0F1+3sR4zx7EG5cfZhYc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mRNOOAn5sC8Z//uTsvBQuvVMEaa0ZT/YLDcQyTdt+DxbBFmTDwhhhv49XpsK3Uked 9bpsVbMVj2tcHibCkh1OHn5NfrB/S5Bpfv3V/v4OcjwiTeqrVvqvTTEBrz6qrB6oy1 kBhV9RQvAaf3eWxJmgRMo60qLvA4zIR6i4xXItNo= Received: by mail-oi1-f174.google.com with SMTP id t16so10693797oie.11; Mon, 09 Nov 2020 08:03:04 -0800 (PST) X-Gm-Message-State: AOAM53005avSpymzRA4pAoDaUjogIVXrvnI+2e7mmoQDvic936Iz1XyI n9YLhhkPNd7iJESRYEnOFyV/xiUirT3lQH1T9g== X-Google-Smtp-Source: ABdhPJwUDjegKtKBMpqT91zhRknyIWujIwiGxHoxmVjfzOiuKkE6iJqRiSsYwAylWRatkHNGVt6QBND93MEfLu5Qk+c= X-Received: by 2002:aca:5dc2:: with SMTP id r185mr9674317oib.106.1604937783677; Mon, 09 Nov 2020 08:03:03 -0800 (PST) MIME-Version: 1.0 References: <20201106165805.31534-1-amelie.delaunay@st.com> <20201106165805.31534-2-amelie.delaunay@st.com> In-Reply-To: From: Rob Herring Date: Mon, 9 Nov 2020 10:02:52 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 1/5] dt-bindings: connector: add typec-power-opmode property to usb-connector To: Amelie DELAUNAY Cc: Greg Kroah-Hartman , Maxime Coquelin , Alexandre Torgue , Russell King , Heikki Krogerus , Badhri Jagan Sridharan , Jun Li , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Linux USB List , "moderated list:ARM/STM32 ARCHITECTURE" , linux-arm-kernel , Fabrice Gasnier Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Mon, Nov 9, 2020 at 9:54 AM Amelie DELAUNAY wrote: > > On 11/9/20 4:03 PM, Rob Herring wrote: > > On Fri, Nov 6, 2020 at 10:58 AM Amelie Delaunay wrote: > >> > >> Power operation mode may depends on hardware design, so, add the optional > >> property typec-power-opmode for usb-c connector to select the power > >> operation mode capability. > >> > >> Signed-off-by: Amelie Delaunay > >> --- > >> Hi Bahdri, Rob, > >> > >> I've added the exlusion with FRS property, but new FRS property name > >> should be use here so, be careful. > >> > >> --- > >> .../bindings/connector/usb-connector.yaml | 24 +++++++++++++++++++ > >> 1 file changed, 24 insertions(+) > >> > >> diff --git a/Documentation/devicetree/bindings/connector/usb-connector.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml > >> index 62781518aefc..a84464b3e1f2 100644 > >> --- a/Documentation/devicetree/bindings/connector/usb-connector.yaml > >> +++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml > >> @@ -93,6 +93,24 @@ properties: > >> - device > >> - dual > >> > >> + typec-power-opmode: > >> + description: Determines the power operation mode that the Type C connector > >> + will support and will advertise through CC pins when it has no power > >> + delivery support. > >> + - "default" corresponds to default USB voltage and current defined by the > >> + USB 2.0 and USB 3.2 specifications, 5V 500mA for USB 2.0 ports and > >> + 5V 900mA or 1500mA for USB 3.2 ports in single-lane or dual-lane > >> + operation respectively. > >> + - "1.5A" and "3.0A", 5V 1.5A and 5V 3.0A respectively, as defined in USB > >> + Type-C Cable and Connector specification, when Power Delivery is not > >> + supported. > >> + allOf: > >> + - $ref: /schemas/types.yaml#definitions/string > >> + enum: > >> + - default > >> + - 1.5A > >> + - 3.0A > > > > Use the enums here. Unless you want to define it as actual current as > > a numerical value. > > If I understand your point correctly, I think I should remove allOf here > and stick with what is done to describe power-role and data-role > property. Right ? No, use the numerical values like FRS: + "1" refers to default USB power level as described by "Table 6-14 Fixed Supply PDO - Sink". + "2" refers to 1.5A@5V. + "3" refers to 3.0A@5V. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 2, 3] Rob