Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5057747iog; Wed, 22 Jun 2022 11:04:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uLWGA+Xd+kAiptt5mBSWLozrSkXGFWa55RsLKB2mFnPUlQCTonY0neb3yZ6dTAkeXk0LOB X-Received: by 2002:a17:903:11c6:b0:167:90e5:59ac with SMTP id q6-20020a17090311c600b0016790e559acmr35464000plh.143.1655921070520; Wed, 22 Jun 2022 11:04:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655921070; cv=none; d=google.com; s=arc-20160816; b=ZHm7oaJm7K3yrshpImWIfBWtm50v5icOguAIxM9Epm5PybxWbOhbgtlgHxT5YoY32a U6qMsBM/v/OEViIMnT3jjbRTCHab0nHz0PQiqmcDKGvaS344fgYzLq8WJy0gcXxzP1BD 31vRC8FcRl/QCIANYaMQp92XQLZZ9Gi4Kx26gezlx3V1Ve7KZxDOi19OR5TvRS6ndjjV jU/+126p81LdQCXR0Jj9OcCtKNSUxCe8i4gV3CzS/AqSmquWuWEFKIa3bkUQfTJU66o1 tj978KcWjSgntnuNIkOOLTG2D4vDN/WMiztkZEUz0U+MjkdvTj55DBM89JFFgjV6gPxA biww== 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=ip37DPD07EETfXOxsfp2/EM6PqDmL5lG+cbJGq8qMS0=; b=SLNvoePCzxU/tAJYQweiyS7/m/BozsJ7kU/ngg867CUIM8jtUxu/hvBY9i9h23Ea3g QywdC73hEb2OgheZ+xA0LBHUKT3MCrkXk3ya5EgQ36JRPdC20dNtI4y8sszWPRNuw/dF XYQghiD5Zm2/I9fqHNPAG36Db2XwJ7oOUxn1D6umDPsDXtOBek80tCXQhIipr6/Sml96 /SCefcjQ0qa/bG3aZRPZGjci55VHx8i2WFREvWATGNgWev6MqyLFneI6O67dcNbw2Exg OCTnjIOwWICaFgbCJ5aUuB3ZHuUBgZw7Vf59WCXoFBX5dUHRTB9MrLEjRbXnN2JkKOSh 75Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ZPHnCjyj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cd17-20020a056a00421100b0051e756bec27si24819203pfb.146.2022.06.22.11.04.18; Wed, 22 Jun 2022 11:04:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ZPHnCjyj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237413AbiFVRhj (ORCPT + 99 others); Wed, 22 Jun 2022 13:37:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236617AbiFVRhe (ORCPT ); Wed, 22 Jun 2022 13:37:34 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4030D3465E for ; Wed, 22 Jun 2022 10:37:32 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id y6so15999882plg.0 for ; Wed, 22 Jun 2022 10:37:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ip37DPD07EETfXOxsfp2/EM6PqDmL5lG+cbJGq8qMS0=; b=ZPHnCjyjvUbujGkd26KmywiDqMZnRn48AeNxI9NqxorRJckmyQ2rnpsqvG9X4vPxNh u1wNPA+vvIAxgPsOKZUUdMFB8CrSxzONRQmtkdNpmliEFOwYNtDAh8RUvR/b3uHqaZt2 h1n/g5chy8zFgcrmI2Y6OwlWY7m9sjIvjyM0w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ip37DPD07EETfXOxsfp2/EM6PqDmL5lG+cbJGq8qMS0=; b=KvGIFGTJBWgM7EgE2K3TrS70fxAXjtc7VqUvRAHeOY6+2pthULJl9hr6zvDLnM4jSt /I3weYRXh3cXx4sFUtazmwW7t2g+6flcLhmpuruZUq1D945x08JHN1E5v7uS1U+g45IP E+WL9FybT/CUMFPXu8i6AIti+/W/x/w1duJhsekRM7HuSW+k6D4VmdP/MA0GlphXHIP/ tyW9yNGseOG3tVUTwR80WZr3nZEWGmHJu6t3mgp1YQtqB/xpZvClylsxnYJ5r8r7+lBd lbBVenMRtSgyMpgbCDhKV/n1MzTyi7hqOr3qdiKfizEU35v9c1v7zRhBg+EdM/gEAMVm g+Ag== X-Gm-Message-State: AJIora/oGdKnij8qMkGwaZgF7T+fB7+wjYipucwBUE8OmM5mFBc6mE7s oC1d/sqVju956LEiE/KKGiSF4DsbB8fdgA== X-Received: by 2002:a17:90a:b703:b0:1dd:1e2f:97d7 with SMTP id l3-20020a17090ab70300b001dd1e2f97d7mr50693283pjr.62.1655919451266; Wed, 22 Jun 2022 10:37:31 -0700 (PDT) Received: from pmalani.c.googlers.com.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id l17-20020a17090b079100b001ece55aec38sm35470pjz.30.2022.06.22.10.37.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jun 2022 10:37:30 -0700 (PDT) From: Prashant Malani To: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Cc: bleung@chromium.org, swboyd@chromium.org, heikki.krogerus@linux.intel.com, Prashant Malani , Krzysztof Kozlowski , AngeloGioacchino Del Regno , =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= , Allen Chen , Andrzej Hajda , Daniel Vetter , David Airlie , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), dri-devel@lists.freedesktop.org (open list:DRM DRIVERS), Greg Kroah-Hartman , Hsin-Yi Wang , Jernej Skrabec , Jonas Karlman , =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= , Krzysztof Kozlowski , Laurent Pinchart , Maxime Ripard , Neil Armstrong , Pin-Yen Lin , Robert Foss , Rob Herring , Sam Ravnborg , Thomas Zimmermann , Xin Ji Subject: [PATCH v5 1/9] dt-bindings: usb: Add Type-C switch binding Date: Wed, 22 Jun 2022 17:34:30 +0000 Message-Id: <20220622173605.1168416-2-pmalani@chromium.org> X-Mailer: git-send-email 2.37.0.rc0.104.g0611611a94-goog In-Reply-To: <20220622173605.1168416-1-pmalani@chromium.org> References: <20220622173605.1168416-1-pmalani@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Introduce a binding which represents a component that can control the routing of USB Type-C data lines as well as address data line orientation (based on CC lines' orientation). Reviewed-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: NĂ­colas F. R. A. Prado Tested-by: NĂ­colas F. R. A. Prado Signed-off-by: Prashant Malani --- Changes since v4: - Added Reviewed-by tags. - Patch moved to 1/9 position (since Patch v4 1/7 and 2/7 were applied to usb-next) Changes since v3: - No changes. Changes since v2: - Added Reviewed-by and Tested-by tags. Changes since v1: - Removed "items" from compatible. - Fixed indentation in example. .../devicetree/bindings/usb/typec-switch.yaml | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/typec-switch.yaml diff --git a/Documentation/devicetree/bindings/usb/typec-switch.yaml b/Documentation/devicetree/bindings/usb/typec-switch.yaml new file mode 100644 index 000000000000..78b0190c8543 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/typec-switch.yaml @@ -0,0 +1,74 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/typec-switch.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: USB Type-C Switch + +maintainers: + - Prashant Malani + +description: + A USB Type-C switch represents a component which routes USB Type-C data + lines to various protocol host controllers (e.g USB, VESA DisplayPort, + Thunderbolt etc.) depending on which mode the Type-C port, port partner + and cable are operating in. It can also modify lane routing based on + the orientation of a connected Type-C peripheral. + +properties: + compatible: + const: typec-switch + + mode-switch: + type: boolean + description: Specify that this switch can handle alternate mode switching. + + orientation-switch: + type: boolean + description: Specify that this switch can handle orientation switching. + + ports: + $ref: /schemas/graph.yaml#/properties/ports + description: OF graph binding modelling data lines to the Type-C switch. + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: Link between the switch and a Type-C connector. + + required: + - port@0 + +required: + - compatible + - ports + +anyOf: + - required: + - mode-switch + - required: + - orientation-switch + +additionalProperties: true + +examples: + - | + drm-bridge { + usb-switch { + compatible = "typec-switch"; + mode-switch; + orientation-switch; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + anx_ep: endpoint { + remote-endpoint = <&typec_controller>; + }; + }; + }; + }; + }; -- 2.37.0.rc0.104.g0611611a94-goog