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.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 0A5D6C5517A for ; Wed, 11 Nov 2020 20:26:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8401D206F1 for ; Wed, 11 Nov 2020 20:26:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="C4XBq+KI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8401D206F1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JOzsvHDN0TCCwH0ffYNfzeicgWwbGGsVZgf9Yy7MU1c=; b=C4XBq+KIKCLPcqVqpL0kyR4Gf pkpUTKv+fplT043REWKSYB7iJVo+B0MefWl0c9/6rVktxXZlQ99ju9FSZ/EqtK8ngS7jMo6cR3d+Z V1UI7WacKT35YMYEXS8LotmpPYF3MaGad95PIgFQFB/ysakQv97u3CbCuBk+Wwf6aDogLg46bWpi6 diRm08pn6TYvBkzqa88dIsk5I5vOitSUy1y2aojriuRoGHrS+zS22V/dVpgvzfAV8gbum7C/62ErL BY7GqGkTyCL65n7YjGl+KFlkE+ohHN6FKAwyVl/eHLH8GTIpcUegxF49COM3InjeV+VhQ5fMPuNVj 8m8khUrwQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcwg3-0004Xi-Qi; Wed, 11 Nov 2020 20:25:11 +0000 Received: from mail-oi1-f195.google.com ([209.85.167.195]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcwg0-0004X3-Ni for linux-arm-kernel@lists.infradead.org; Wed, 11 Nov 2020 20:25:10 +0000 Received: by mail-oi1-f195.google.com with SMTP id t16so3613479oie.11 for ; Wed, 11 Nov 2020 12:25:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=d2UhCfR+FPSqXBFp8I37OaKb4IVpY8wcdSKJRwOBPY4=; b=JeAzALHiWvSkXBdbl5sznzQ2ag9RHUSMq36JBpzxJyQyvu3XW0wBn6N7QjlWPuDAkQ k1lV0YjdGhYFXNrfHHqAQqBlSQiIGaUme2Np75cVamJDaEd8eFjTZX9yUe1t/D8EYfSH 5CdN/VMmzyhtDbR51aIr8PywzO2e+CVfEFJbQATeKtztUJobbZ2ZNoUXrO0fs6ohh1vF GdtNygFW726KhBx3k5fIvM+sDDTOVYRbJCJfrjGMFsa/+PWsCN2NU1yq6+fNvcOXTI42 n9WOtT1Ib4krnO2ZZf/H9kjVWae7CZ44Nfy2y58np0HKeJMT3ftJRBIf5CQQrzP2bFnI orag== X-Gm-Message-State: AOAM532ZlaI/zLrNzlWOT9WZ44kblZY7sPtHdNtLQnyBmJeOCNGhCXby EBZwyEpTyFH8K/f1YSmDsw== X-Google-Smtp-Source: ABdhPJwIarYJoYP3z9DEt3WpnwufR8NzTSpJNI9E1JK3YX6Ww4fDqfbKq2zguFglhqIi+It5Da5dLg== X-Received: by 2002:a05:6808:56a:: with SMTP id j10mr3367292oig.121.1605126306388; Wed, 11 Nov 2020 12:25:06 -0800 (PST) Received: from xps15 (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id 132sm660445oid.54.2020.11.11.12.25.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 12:25:05 -0800 (PST) Received: (nullmailer pid 1968388 invoked by uid 1000); Wed, 11 Nov 2020 20:25:04 -0000 Date: Wed, 11 Nov 2020 14:25:04 -0600 From: Rob Herring To: Amelie DELAUNAY Subject: Re: [PATCH v5 1/5] dt-bindings: connector: add typec-power-opmode property to usb-connector Message-ID: <20201111202504.GA1964362@bogus> References: <20201106165805.31534-1-amelie.delaunay@st.com> <20201106165805.31534-2-amelie.delaunay@st.com> <5df74edf-b6f9-3397-4c85-683987dd5743@st.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5df74edf-b6f9-3397-4c85-683987dd5743@st.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201111_152509_147929_B7D217EA X-CRM114-Status: GOOD ( 30.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Heikki Krogerus , Alexandre Torgue , Greg Kroah-Hartman , Linux USB List , Russell King , "linux-kernel@vger.kernel.org" , Badhri Jagan Sridharan , Jun Li , Maxime Coquelin , "moderated list:ARM/STM32 ARCHITECTURE" , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Nov 09, 2020 at 05:10:23PM +0100, Amelie DELAUNAY wrote: > > > On 11/9/20 5:02 PM, Rob Herring wrote: > > 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] > > But it changes the type-c class philosophy. There is already an API to > convert string into enum, the same kind is used for data-role and power-role > properties. > Moveover, FRS values doesn't fit with typec_pwr_opmode enum: > enum typec_pwr_opmode { > TYPEC_PWR_MODE_USB, > TYPEC_PWR_MODE_1_5A, > TYPEC_PWR_MODE_3_0A, > TYPEC_PWR_MODE_PD, > }; Okay, then strings it is I guess. Reviewed-by: Rob Herring _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel