Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp728360iog; Wed, 15 Jun 2022 10:57:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1slBgMOQZpVUum8HkKERWBBc3S8R8nIyL92DGHipwm29yoYmBzb4aKEOmj5bl1GgKCJ50Uh X-Received: by 2002:a17:90b:503:b0:1e2:f129:5135 with SMTP id r3-20020a17090b050300b001e2f1295135mr677203pjz.22.1655315861489; Wed, 15 Jun 2022 10:57:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655315861; cv=none; d=google.com; s=arc-20160816; b=qVfqXcIqZWUbRb56vc6T2R2L0OJtwaqia0GaAmYB2TyJ1gHX7Dpoa87wAc5MIGHGaW acznLQlifiZeljjkYei08SpBE/4Dw+yQYdb5mx63a84dNztJS3tdDIAIkPd7JFGWEpe0 yt0pj1uZogSmc013fuSEmZ5eoe6w3wcylF2vfjm8S6LKo+2jaDo4GSWCG2P7QoZfByCi yzYdl6wopUqPPkGNwwc9vt+nP4yw6HmdoZcYZEH9T5Zt2A5a9GpfEbynV84CGFNWsSaU F+hFqPG+V3bOtOyD3TeURQ3KG2917/YGORT07SXfktj7d615zdQl2UHSXyrQs0zkiHm6 U4jg== 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=n+O4l98CKUL7yv4rRVYlrIx5OvopY+8TSKj5Ikkq3GM=; b=ZCMm9u+sk099sY0tqkiVBMx4b8feF5HeX4uaNNiGtr9AJB66whPNx2/PqxdX56Agj7 TyTqQvR6yEF63xk2jaKgnMiGYtV00Jr1MQUGiDOdA8b2wcxlHHylYKGr5JHtfZIfW/Iw G0Rnq1cMaZz4On14ogGfYKPCxpZFQkOX+bSG1rKRMxuAwZtM8fMgfVFPYiGwiaOCH1NX I6ij3kYpBY6scb12qtsxy15cHC3OpRtB+Dh7nkzs9T1iKI28fGCexFf+Tb82aj7jnt5P Ec5NYxdd7fI2oRMADLbgT0TYnPUfywN+kbipW3O91/gxIFdnsjLKMNPg+kxJ1oAIGyo0 kfhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gghcg5nU; 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 v4-20020a654604000000b003f5d7e95185si17103516pgq.280.2022.06.15.10.57.29; Wed, 15 Jun 2022 10:57:41 -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=gghcg5nU; 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 S245548AbiFORZb (ORCPT + 99 others); Wed, 15 Jun 2022 13:25:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240567AbiFORZ1 (ORCPT ); Wed, 15 Jun 2022 13:25:27 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E9E439145 for ; Wed, 15 Jun 2022 10:25:26 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id s37so9357514pfg.11 for ; Wed, 15 Jun 2022 10:25:26 -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=n+O4l98CKUL7yv4rRVYlrIx5OvopY+8TSKj5Ikkq3GM=; b=gghcg5nU3xACsIsovR9FpypGdUvez5exCrXgZBOdo7LpwjPJv4H/xILX5Hh5GSy5Vr l8kPxW9GmVc8Ue3y7TtcIORtJWI+zjA9PJn1NSCuqpbQulo3RUP2z0+bPiSRi3JDw73y nnGGTMuH1knVYujxOboX7OYG0H0m+9TaUpjcg= 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=n+O4l98CKUL7yv4rRVYlrIx5OvopY+8TSKj5Ikkq3GM=; b=clgimSTUJVgIVx5i4f4Y9M0oL+OW3ljBXdwpZAJCOr48eO1ZXbTIhlLVLTPplkFvZL hqBhGSkeHqxtNl5Fx6rxe+M1WvKv6WTy8lxvoGFJqb04NqPL7LSeKLfmhp8Ma4mJGKhV WeLN0qOZv4SlbngBzUIxmHYetPsMjI8+NJ8sRQxbviXawFKWlusDYmbt7h1C5AszeOOL NfgzLXT5//89hmKEu5TIfck3+bo4J18i+E41s/kYFYKOypaWhCkBa8+BeogqTg+3s3vT WrYa847aNnJ8CL4KFLiSrIOZS71KD2oDgxPWbOzgpFU9WQm+mRMxSSJ+hQZcX4faSSvi BB2Q== X-Gm-Message-State: AJIora/zfatt9PkDDem4ONi2BR4MOPDrs5mXg3NHXffC/BgBE+2zxN5/ LEGsn3NuQl4RXHs6nP0y4xZCTjMO81BbEg== X-Received: by 2002:a63:ff19:0:b0:403:7c60:ae96 with SMTP id k25-20020a63ff19000000b004037c60ae96mr725428pgi.466.1655313925709; Wed, 15 Jun 2022 10:25:25 -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 d10-20020aa7814a000000b005103abd2fdbsm10147433pfn.206.2022.06.15.10.25.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 10:25:24 -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 , =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= , 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 v4 3/7] dt-bindings: usb: Add Type-C switch binding Date: Wed, 15 Jun 2022 17:20:19 +0000 Message-Id: <20220615172129.1314056-4-pmalani@chromium.org> X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog In-Reply-To: <20220615172129.1314056-1-pmalani@chromium.org> References: <20220615172129.1314056-1-pmalani@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.3 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: NĂ­colas F. R. A. Prado Tested-by: NĂ­colas F. R. A. Prado Signed-off-by: Prashant Malani --- 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.36.1.476.g0c4daa206d-goog