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=-11.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 BA792C2D0A3 for ; Mon, 9 Nov 2020 16:12:06 +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 5203D206CB for ; Mon, 9 Nov 2020 16:12:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tVHG2FuZ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=st.com header.i=@st.com header.b="SICcsM0b" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5203D206CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=st.com 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-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yAZEjw+tEzLZSfRywmPAkqZLJMzA46JdToPFiwc9gPo=; b=tVHG2FuZCDs9DUYY44/Xs/CQg K0O9EonIvTVC9TGBoDGvg0y/Cy9Hp6A4HMVGmD35lFofa5FEF1Ejq4ybaKxLmtYxQqUoqj2I1bIKl nLgyWIxlXoRfEoh8/nbPRJ2Ub0IxSBocwj6iOGsECekjChl4/Oii8VHQfPzwJgHgj+16Tf0I8liSo k7ZgntAMA1vTvgDxXCf2R8/ioBcIKo/OxdQrULNrBKCXP80VAYBc9dKYmi1JAU8S34vlcqo4Epy0O FuVbQ1h+FpMulGt3/fbJR+tND69lRnBIlitSqH8tc0AlfnG8jgojauhLO4l3mw0iPTcUWsXGP3jFL UyHta4Q/g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kc9ld-0007pY-Uq; Mon, 09 Nov 2020 16:11:41 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kc9la-0007o4-Ch for linux-arm-kernel@lists.infradead.org; Mon, 09 Nov 2020 16:11:39 +0000 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0A9G6gYf018377; Mon, 9 Nov 2020 17:11:24 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=STMicroelectronics; bh=aCuGZs5eFBxNDdr6XK+cc45jKE8mNbTQVuJd3YqSDyI=; b=SICcsM0bDwrICeXlXedAfHnciIycGgN7hgSIfXCDeMFU4Dxqz5LoPxuTTvYD9EbLIISl uCIJzIkU6lBcAT0jYPODRsAwwd5H9m7qGFDvDLBQMnN9VzhB2c4wpKBbg1gj8KKArOy0 6Jjw0GIFa0s2bT1ECTHMvN5UV3x6E8Z3CodtVxXlil4cgh/M6bXJFQMRq5DHPUe62T3s OWK9nxaUWm02GG9Onxc5cH5JMuVxjVdgFqoSI1dei+yQJrwLa9F8kVO4DZTKDR+yDiIU WTjgrheR8f0fkfYN6kOXkgHtNTOzvF/nsYdyTfmXj1tvlImSMDMIU3oyt1OaffDEz9jC +A== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 34nkbmu273-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 09 Nov 2020 17:11:23 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0E36D100034; Mon, 9 Nov 2020 17:11:23 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag3node2.st.com [10.75.127.8]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id E79982397AB; Mon, 9 Nov 2020 17:11:22 +0100 (CET) Received: from lmecxl0995.lme.st.com (10.75.127.44) by SFHDAG3NODE2.st.com (10.75.127.8) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 9 Nov 2020 17:10:23 +0100 Subject: Re: [PATCH v5 1/5] dt-bindings: connector: add typec-power-opmode property to usb-connector To: Rob Herring References: <20201106165805.31534-1-amelie.delaunay@st.com> <20201106165805.31534-2-amelie.delaunay@st.com> From: Amelie DELAUNAY Message-ID: <5df74edf-b6f9-3397-4c85-683987dd5743@st.com> Date: Mon, 9 Nov 2020 17:10:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Originating-IP: [10.75.127.44] X-ClientProxiedBy: SFHDAG3NODE3.st.com (10.75.127.9) To SFHDAG3NODE2.st.com (10.75.127.8) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-11-09_08:2020-11-05, 2020-11-09 signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201109_111138_955705_54C3B1B4 X-CRM114-Status: GOOD ( 22.98 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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, }; Regards Amelie _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel