Message ID | 20231120224919.2293730-2-dmitry.baryshkov@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp263664vqb; Mon, 20 Nov 2023 14:49:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IEED82wmiy7XU9B4D1v/RizWfxSYt/8eVUWTdeAOiznR2Kn4Jthb6mpWXAT/0nEuvHMHowY X-Received: by 2002:a05:6a20:3d87:b0:189:bf74:19c9 with SMTP id s7-20020a056a203d8700b00189bf7419c9mr10161993pzi.57.1700520595769; Mon, 20 Nov 2023 14:49:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700520595; cv=none; d=google.com; s=arc-20160816; b=RHMBM5aRDy1woNCLV3spLUJldQ8HPfxPIT8ULD4xfagCcOtlUo2cE/x5T0LmO8yyWc KG9whvfdx41P4Pr11FrgCsCiVzV2Xh2S8IdWA12gSHtqfiZsQFbCgCvjGOad/FB1fZen bSPhCLLebrKGw3fZ8aUi/mvsuMI8nLUOS/5VUYLNlmKpYklfNU2EoCpKK8xuSvPhsKtU oWp/w+xgv6C8CbO7SpRTJPeNIiyGQHVrOfmHUYi2i/H5uvTbmhaiNEmrnDExLAWeYzAE f0NO0tbNUuCadMw7DOgljG7JaR5ToiqnDoO6lzvU7QZNvepm8+us4Hig7BK3XtEblUVT T2AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hTZE+Yyh5kIyB1ncprfjmtJf/HhgeQFmAHJ18g9kLYU=; fh=A3blBdamKtq5kPtlpYpz4l6zGyY+ur9G2hKXzMhYY3Y=; b=qZsjgLhREkQ6ZHhX19Ymc0378fNUvhLvzS8WObqb8QNI0bmRqKdI6hA5L0raECXpdK 4hVLbYgQNRp2gamsLxNjCWsJW8K+LZY/XETJvO33TjA5moKwJbcIiwiaENuAuBli192u Y9pNofPuYhnL45MbbRmuobVw2LACBn9+UpZweu7kTa6cxeqOiynZ15GxJFWD6kujgEQF iw+6A1A2MhZYZhZDQwz3yqRa8KNKpabwkKshWCdqiXgC2vx7M2JGEiztJiIE3pbEN5Pq pdj3wbXx7Yt426b6qEeT55nvO2NGgCsSvJEU4FvipvM72EJCoIBgLq/5xpnW7Pok87lf CAPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z+dM2Gfb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id g5-20020a170902c38500b001cc41020674si8706070plg.518.2023.11.20.14.49.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 14:49:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z+dM2Gfb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 8E8308093F47; Mon, 20 Nov 2023 14:49:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232629AbjKTWtb (ORCPT <rfc822;heyuhang3455@gmail.com> + 27 others); Mon, 20 Nov 2023 17:49:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232476AbjKTWt1 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 20 Nov 2023 17:49:27 -0500 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC2AED9 for <linux-kernel@vger.kernel.org>; Mon, 20 Nov 2023 14:49:23 -0800 (PST) Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-507a29c7eefso6998479e87.1 for <linux-kernel@vger.kernel.org>; Mon, 20 Nov 2023 14:49:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700520562; x=1701125362; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hTZE+Yyh5kIyB1ncprfjmtJf/HhgeQFmAHJ18g9kLYU=; b=Z+dM2GfbMb9MkZJGoomW+/RFhjH3ISvghR7CKm28zzYJz62samQIA1mcUk6eMcs1rp hWKE13y/OIO7E1g+Ux+whMdk1lssRtf32iSYuMAtrOUwZcoiSoqoRAuXdPWpjm+Gi0X3 vjeM5TbMh+6DxK2TaWl/n3YkikR6xH1ocB4uOQ99qOwYazFD/G14brbwmEW7CeRV5+/1 98BXGpxqLfwwVs4cmo7KX8oYge9e1D3V7qsQ/SjemFcEJbKJ06cqs2U87nGIxOV8S/AT LXFSWWS4F8v1mAMSHLZZm/eMVcyr5IL9xrto0xOi9Z1ItELqGSOOutsypp/KpetuGDir K3wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700520562; x=1701125362; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hTZE+Yyh5kIyB1ncprfjmtJf/HhgeQFmAHJ18g9kLYU=; b=JsW3wC7lK6VQsPbYQ8mUlT/0n5d+i/jne2lKOl/UPaYpf3VcqRL0E31Oqyd03BO/Pq YF8fm8BJZfUPrEHGg/mcxD7Uy9MtR7IXxOdVw5FbDSM0BXZodZZI5nwuqAJAWQcsLMFn LDjn0FhcmFeXqChcJtmSs8bpCgd79etvW0nNE2+ot/NpQrx82ms+z3Jtv/T1YadC5fMm YfbLHYvCPjsHlbm+N2SxJcbXzE5C6X6D+8sV4AKQSnO7in2p4RLyoyzfTl76p66+V+VA 39a8u0YeZJ5wyVj1PIWg74bzHTH/E7Hsg60UkZBDERNahgL4BJAGUl4TeByT2t3DB+b9 OrCQ== X-Gm-Message-State: AOJu0Yw7dQWHrxD8CVpnOxfcv+3jzApewYD4Z6aEcYyBHppPEL/OoTeZ reXEe3AqL82VGo1ZlV3u31oKtg== X-Received: by 2002:ac2:43a5:0:b0:501:c406:c296 with SMTP id t5-20020ac243a5000000b00501c406c296mr6204735lfl.31.1700520562151; Mon, 20 Nov 2023 14:49:22 -0800 (PST) Received: from eriador.lan (dzdqv0yyyyyyyyyyybcwt-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::8a5]) by smtp.gmail.com with ESMTPSA id c26-20020ac25f7a000000b00503189d8b8csm1297756lfc.198.2023.11.20.14.49.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 14:49:21 -0800 (PST) From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> To: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Hans de Goede <hdegoede@redhat.com>, =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>, Mark Gross <markgross@kernel.org>, Heikki Krogerus <heikki.krogerus@linux.intel.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH v3 1/3] dt-bindings: connector: usb: add altmodes description Date: Tue, 21 Nov 2023 00:00:18 +0200 Message-ID: <20231120224919.2293730-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231120224919.2293730-1-dmitry.baryshkov@linaro.org> References: <20231120224919.2293730-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 20 Nov 2023 14:49:48 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783125084174082233 X-GMAIL-MSGID: 1783125084174082233 |
Series |
dt-bindings: connector: usb: provide bindings for altmodes
|
|
Commit Message
Dmitry Baryshkov
Nov. 20, 2023, 10 p.m. UTC
Add description of the USB-C AltModes supported on the particular USB-C
connector. This is required for devices like Qualcomm Robotics RB5,
which have no other way to express alternative modes supported by the
hardware platform.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
.../bindings/connector/usb-connector.yaml | 29 +++++++++++++++++++
1 file changed, 29 insertions(+)
Comments
On 20/11/2023 23:00, Dmitry Baryshkov wrote: > Add description of the USB-C AltModes supported on the particular USB-C > connector. This is required for devices like Qualcomm Robotics RB5, > which have no other way to express alternative modes supported by the > hardware platform. > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > --- > .../bindings/connector/usb-connector.yaml | 29 +++++++++++++++++++ > 1 file changed, 29 insertions(+) > > diff --git a/Documentation/devicetree/bindings/connector/usb-connector.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml > index 7c8a3e8430d3..c1aaac861d9d 100644 > --- a/Documentation/devicetree/bindings/connector/usb-connector.yaml > +++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml > @@ -171,6 +171,28 @@ properties: > offer the power, Capability Mismatch is set. Required for power sink and > power dual role. > > + altmodes: > + type: object > + description: List of Alternative Modes supported by the schematics on the > + particular device. This is only necessary if there are no other means to > + discover supported alternative modes (e.g. through the UCSI firmware > + interface). > + > + patternProperties: > + "^(displayport)$": This is just a property, so should be under "properties:". The rest looks good to me, but I don't know USB that much to judge. Best regards, Krzysztof
On Tue, 21 Nov 2023 at 10:31, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 20/11/2023 23:00, Dmitry Baryshkov wrote: > > Add description of the USB-C AltModes supported on the particular USB-C > > connector. This is required for devices like Qualcomm Robotics RB5, > > which have no other way to express alternative modes supported by the > > hardware platform. > > > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > --- > > .../bindings/connector/usb-connector.yaml | 29 +++++++++++++++++++ > > 1 file changed, 29 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/connector/usb-connector.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml > > index 7c8a3e8430d3..c1aaac861d9d 100644 > > --- a/Documentation/devicetree/bindings/connector/usb-connector.yaml > > +++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml > > @@ -171,6 +171,28 @@ properties: > > offer the power, Capability Mismatch is set. Required for power sink and > > power dual role. > > > > + altmodes: > > + type: object > > + description: List of Alternative Modes supported by the schematics on the > > + particular device. This is only necessary if there are no other means to > > + discover supported alternative modes (e.g. through the UCSI firmware > > + interface). > > + > > + patternProperties: > > + "^(displayport)$": > > This is just a property, so should be under "properties:". Having it under properties would make adding new altmodes harder. Inherently it should become something like "^(displayport|virtuallink|thunderbolt)$". > > The rest looks good to me, but I don't know USB that much to judge. > > Best regards, > Krzysztof >
On Tue, Nov 21, 2023 at 12:00:18AM +0200, Dmitry Baryshkov wrote: > Add description of the USB-C AltModes supported on the particular USB-C > connector. This is required for devices like Qualcomm Robotics RB5, > which have no other way to express alternative modes supported by the > hardware platform. > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > --- > .../bindings/connector/usb-connector.yaml | 29 +++++++++++++++++++ > 1 file changed, 29 insertions(+) > > diff --git a/Documentation/devicetree/bindings/connector/usb-connector.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml > index 7c8a3e8430d3..c1aaac861d9d 100644 > --- a/Documentation/devicetree/bindings/connector/usb-connector.yaml > +++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml > @@ -171,6 +171,28 @@ properties: > offer the power, Capability Mismatch is set. Required for power sink and > power dual role. > > + altmodes: > + type: object > + description: List of Alternative Modes supported by the schematics on the > + particular device. This is only necessary if there are no other means to > + discover supported alternative modes (e.g. through the UCSI firmware > + interface). Move additionalProperties here. > + > + patternProperties: > + "^(displayport)$": > + type: object > + description: > + A single USB-C Alternative Mode as supported by the USB-C connector logic. Move additionalProperties here. And a blank line > + properties: > + svid: > + $ref: /schemas/types.yaml#/definitions/uint16 > + description: Unique value assigned by USB-IF to the Vendor / AltMode. blank line Since you've constrained the node name, then the only possible value here is 0xff01? OTOH, I don't know that we want to enumerate all possible values here especially if there could be lots of vendor modes. But then again, maybe better to just wait and see if that becomes a problem. With those nits fixed, Reviewed-by: Rob Herring <robh@kernel.org>
diff --git a/Documentation/devicetree/bindings/connector/usb-connector.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml index 7c8a3e8430d3..c1aaac861d9d 100644 --- a/Documentation/devicetree/bindings/connector/usb-connector.yaml +++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml @@ -171,6 +171,28 @@ properties: offer the power, Capability Mismatch is set. Required for power sink and power dual role. + altmodes: + type: object + description: List of Alternative Modes supported by the schematics on the + particular device. This is only necessary if there are no other means to + discover supported alternative modes (e.g. through the UCSI firmware + interface). + + patternProperties: + "^(displayport)$": + type: object + description: + A single USB-C Alternative Mode as supported by the USB-C connector logic. + properties: + svid: + $ref: /schemas/types.yaml#/definitions/uint16 + description: Unique value assigned by USB-IF to the Vendor / AltMode. + vdo: + $ref: /schemas/types.yaml#/definitions/uint32 + description: VDO returned by Discover Modes USB PD command. + additionalProperties: false + additionalProperties: false + port: $ref: /schemas/graph.yaml#/properties/port description: OF graph bindings modeling a data bus to the connector, e.g. @@ -289,6 +311,13 @@ examples: compatible = "usb-c-connector"; label = "USB-C"; + altmodes { + displayport { + svid = /bits/ 16 <0xff01>; + vdo = <0x00001c46>; + }; + }; + ports { #address-cells = <1>; #size-cells = <0>;