Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp718290iol; Thu, 9 Jun 2022 12:24:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTG5XPvPXV9uYGnzQevolF2oFj1vNxVFyUwAFdYNKuebwgTI+PuwjL4fahP/qt4rASWret X-Received: by 2002:a17:902:8492:b0:167:6cbf:145b with SMTP id c18-20020a170902849200b001676cbf145bmr26681446plo.26.1654802650326; Thu, 09 Jun 2022 12:24:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654802650; cv=none; d=google.com; s=arc-20160816; b=C34AlvP8m4EUXnB3XJ8hpzht2ajn+T0Ac/roFezn1ZDRj+KZQj2E1oxR3AwD5s5gJo GW6RjYaEBxtQWV1dVXowINlM+sMMO7XWBlTz19GFofpR5yZ/yJH+FCi2hQf5CGCYgco6 8RQPoscLjCBNomuTZcRJL9e3kCdf6HV7fx6WZQBzguulvvG26fho9cTbYY5/esnmiWKa V8Lir8iDuai9WXlBD/uSo+RG1GjnXYUJ3n7J7hT0kHbdrRGM5CgSMWq7Ibij1J7Qxn1z TjlMMAnJq+fWC4SFJkesKdY5+rSQ/BOirdCg+wAj3WeYHRamFrDdeRwTHp3nLLqeOoRP blYQ== 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=sovrs+mq8Q/Ap++aH+MjECZ+lkKpfvFBf2CG7NL+qc0=; b=Xgjb/lCKkt8kcCcfm98pQ48XUdm2qBUzrnSR2U2vvlpj4/WA8wf57fmz7dP+OnS8Oz xOl3b33y6KC4Rjxvy+lzb14ils3hyYbrSaT1PDEC/TTmg6r9pqEATgqE7b2d4DNqC4lu fXw/k+Rho84Ho+LgGFvYi05Nm40jXBIRkw3/SHO7ou5sX7KscHayT1kxlk/G7pXW25Hn 6Y1OBNeIjn36OnMSjrLcWxeJriFD2+28fyLje4jwzrawtI7fTAgud9pVS43W0FQrn9cx shoMYqc00mW4ofqeOjeLdYtct7Q+3YdxwcR4euDaNMxPDtXas+0l5NHuePNLwZ2bvrnM 6nuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ljGcCwBN; 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 ik14-20020a170902ab0e00b0015830f35108si29476573plb.209.2022.06.09.12.23.56; Thu, 09 Jun 2022 12:24:10 -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=ljGcCwBN; 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 S1344501AbiFISQf (ORCPT + 99 others); Thu, 9 Jun 2022 14:16:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344654AbiFISQd (ORCPT ); Thu, 9 Jun 2022 14:16:33 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD5EBE4B15 for ; Thu, 9 Jun 2022 11:16:31 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id gd1so22059889pjb.2 for ; Thu, 09 Jun 2022 11:16: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=sovrs+mq8Q/Ap++aH+MjECZ+lkKpfvFBf2CG7NL+qc0=; b=ljGcCwBNKuZfCUmbieLH3JlrAHhYdwCrb3aqMfe+5IIZtxQfN9jCdjc0NtdfUhLwkG g4jThX8SzgLeCTdj/6FSiaxG7Zr2SjdYxJN7xzQSjkaK8P+iO3EZ2TDbyQ0UOgZYKQLW HrSCybyHiKNV1Iezy+bJuKEBFqYZAWykJrvoc= 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=sovrs+mq8Q/Ap++aH+MjECZ+lkKpfvFBf2CG7NL+qc0=; b=p4ATbIS9lo9Xlnpi4CQAXU49u3QCyjF0zk+FvZMNEGJZY11fW0ynt6ZBn0+q5O9zSd ChZE+1gQV9dWsx4KeWLYoV0tdir2Im/twlKKD69+EKSZ1UZ5g4pE4EoctEJ0+TI+qFZf YKLtlXQuQRBjPzuKrqetzLP6DBHxVI+J8ZfBhcGPRxYRnpEV1p0FlvwWbkG5LUSGUOuT l9Mz1xL2/o/zIg+MT8ORf8yiyMgrMSyH+GTaUDk0olwb3MFQ4beqM/doCPkGGwJtHhCJ EXcKr6d5IL1TnutRs4kUxM3aVey33z/DQj6OPS2PStPgqBdM9KsMrVXa98jXh+zSk/TE d6Kw== X-Gm-Message-State: AOAM531dPgASp6in4VKB3puaBsRg3Wd3ESFsG8Eim1Ljg6bwV6fXLmiQ H0WS/8+zPIApB1iSiKDh/JUxJ1osxwnjUg== X-Received: by 2002:a17:902:8c93:b0:167:879d:6670 with SMTP id t19-20020a1709028c9300b00167879d6670mr18912302plo.31.1654798591093; Thu, 09 Jun 2022 11:16: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 r14-20020a63ec4e000000b003fb0354c43asm17728049pgj.32.2022.06.09.11.16.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jun 2022 11:16: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 , Andrzej Hajda , AngeloGioacchino Del Regno , 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 , =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Pin-Yen Lin , Robert Foss , Rob Herring , Sam Ravnborg , Thomas Zimmermann , Tzung-Bi Shih , Xin Ji Subject: [PATCH v2 3/7] dt-bindings: usb: Add Type-C switch binding Date: Thu, 9 Jun 2022 18:09:42 +0000 Message-Id: <20220609181106.3695103-4-pmalani@chromium.org> X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog In-Reply-To: <20220609181106.3695103-1-pmalani@chromium.org> References: <20220609181106.3695103-1-pmalani@chromium.org> MIME-Version: 1.0 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,URIBL_BLOCKED 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). Signed-off-by: Prashant Malani --- 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