Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1787010iog; Tue, 14 Jun 2022 13:25:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy35LRN/C+ey8P+fbli3tEDPtrkirH4XOaZR9PJwlW7G/6X7HgKUfxz6Y/qafKIwGy0E3MP X-Received: by 2002:a65:6b94:0:b0:3fb:16f4:3620 with SMTP id d20-20020a656b94000000b003fb16f43620mr6024546pgw.464.1655238317054; Tue, 14 Jun 2022 13:25:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655238317; cv=none; d=google.com; s=arc-20160816; b=q3GOsXjlwZk7D1njYKHfZSC0ZiyCtkk0ns8sHWbCjvfMFGQg/7Kd0VrxIJ6yPLv+XU GPLecbq1CqqOBG41ksUhWpodjJZoh0EMovUawPXdBPj8XHtoLFi+vLBr5l17Aux+Z8HM 74fA5VgYiAV0FCNhpOIkuPbYIkUXhEdv0uy3NeztWRCR3KUmjzZVmfxXZw4302lPb4jW YeK53nqiWs5eIQEz0cpAR/gAfTmJDgpZB1YSYkcLYrM2Vffl1kPy/jsdurWCm3Xe8Cbl 92bPXuTI9b9VzyZmq79tfrRXzt9RCqX8V3EwdDO8IVbqqLz5XCt6fGX/n5cBTsCIjc3n x2Lg== 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=X0VVqdmHL6sS9hEqk6salRHIgi0YGLQxnZ3+rG1ANk0=; b=XLr9o3EW248wfxaqX7wg1J1zedjQx4DNgpclHaekM9EYDYSlgftbqtvxRkukMOdXYp EMd4r/mN8N4pLnIFKT/kHIAnnbHBv9RqFnTw+lsd1ky1/e16NZNwBccrv/xj9Pymznno f1NLmIlxWCQGSVX9N5ML6z04hvdMdNSIeIWd3U/itZQ9E0qdCLqZJnN4FBkXfoS79p9x eTHrYo6gGempBhN19ByBVUmyHSheKMnT/1JgvlxsTcL5V/OZ7hYP/q3XQslwdzyQJBCE cM5y8Rxso2hgdWh5kARNMYX97gaGuvQcgJAKiZp2hz4dgCPRes9qXYxJdNQtsDNJZiBt W5Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nWvs21Ep; 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 e19-20020a633713000000b003f5cfa3bbfdsi13662797pga.233.2022.06.14.13.25.05; Tue, 14 Jun 2022 13:25:17 -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=nWvs21Ep; 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 S244276AbiFNTld (ORCPT + 99 others); Tue, 14 Jun 2022 15:41:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235668AbiFNTla (ORCPT ); Tue, 14 Jun 2022 15:41:30 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F32D828984 for ; Tue, 14 Jun 2022 12:41:28 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id cx11so9348336pjb.1 for ; Tue, 14 Jun 2022 12:41:28 -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=X0VVqdmHL6sS9hEqk6salRHIgi0YGLQxnZ3+rG1ANk0=; b=nWvs21EphSCvJZOrZKihN3yIH1Birw2aDoHBG17SftfbdWSlG8i+Ek7XhIF6Z4+bkO IuBt9wrkp0N84N7aXXsMKPs8AWLHS9UgaEAN6YaFNfSZAPEIoMY1JOfgpRKK6bVJnXFe VpX6SzCaV/H0RWMmkQMz1DpC954cW6QRXNJIY= 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=X0VVqdmHL6sS9hEqk6salRHIgi0YGLQxnZ3+rG1ANk0=; b=0pLwviJyx3ZgKAaoO2pdKLYPnUfVEiDwCllZU2w8ApezgP2QgiCscKqOp3Xv1qJ3wD xQiYKCpW8YuFMXP0QBBMA+9rx8dF2FLCVfhqB2Re6UFTYQf2JClAubB31mgrz9vtQHwy AOCXEDH2EHFDle3WA0CUAJMvLU0EEocSI95hCsD4FQUvCXkNWzURCVhJOIfZ0YRn6qRA 9aldhRWvFAwJTfRqWW8eBlMhw0Tz/If17/FIgSQpaVSX/BBbnlIEHZoieDoQlQA7CEXA +hqzKgF284ON53d2WyMv2YoBVW8qqr7Mz0FFvbfG7RFTue0PH/Bss81JwaIo/47cc5lZ nDKQ== X-Gm-Message-State: AJIora+xgUFnKXPZrI4gQW9R+L5/mWWtjDfmkibGB5ZAQxjXGw5b8ZMx rxSWrENbAsWCnxvhmfWTHkUM5Z6L0cKCQw== X-Received: by 2002:a17:902:ed82:b0:158:fef8:b501 with SMTP id e2-20020a170902ed8200b00158fef8b501mr5575175plj.47.1655235688085; Tue, 14 Jun 2022 12:41:28 -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 l21-20020a17090a409500b001df3a251cc2sm10014426pjg.4.2022.06.14.12.41.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jun 2022 12:41:27 -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 v3 3/7] dt-bindings: usb: Add Type-C switch binding Date: Tue, 14 Jun 2022 19:34:37 +0000 Message-Id: <20220614193558.1163205-4-pmalani@chromium.org> X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog In-Reply-To: <20220614193558.1163205-1-pmalani@chromium.org> References: <20220614193558.1163205-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 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