Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5049496iog; Wed, 22 Jun 2022 10:54:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vYhyOc9jhQVZYYFdDOxN83FrJTSCuLrObr1Vhy+3D2CyEcdYXyBVQ9SUb5LUq0ylRXhzU0 X-Received: by 2002:a05:6a00:278e:b0:525:1aeb:d5a with SMTP id bd14-20020a056a00278e00b005251aeb0d5amr20522013pfb.61.1655920461922; Wed, 22 Jun 2022 10:54:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655920461; cv=none; d=google.com; s=arc-20160816; b=HEnXTfdXObOYiVcnM0ZraO/2s665hOUhLep9Ze/Kv08doiz3Wy7ZOGf0OCc3w5VilI yTovZqGD+OCy4mXVcIqFw7M9LCktwJUUtl+G2Wtope9Tj1SRAN0FpYyNAjctDz6W1g85 1+fVIZAl1bh5CWO0ZsHJI/E4f57CQ6RiF63BIkzH+ctZW5gaVFV08vfWmYpgbMXAoBis bYeb/2w1/pZ0hEznh9381/emJsVQKpG4XCIiAMpYbUguwe6GWZIws4wIKx+YdhC7CCBS LXwEdmSsalm58CbN/8mE1DwO3+xyp+42iXgyFPM0YgnVpjBzv/VOrXlLoILBkBORNDiI TPRg== 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=OYDYAsce/lvf/QfGm3jCkG+AP6MQ1L8nhfe2kq87L58=; b=dhHyBMqjwXAY1JjJ5PP9bLxTpap9FTLTptNoP4486dMkY1itLD3fPHD+eEcD6EG1s+ h+Jz9LZ/f/w18nIa1qPwejO13b8JRrs5hjg4e012kXSLRXfO3/pX0sGZpou4yXPs17rp DHhR4Ph5SES8b2r0vifjje3KwcZKDOYLnj9D0IUKD0HyiUZZ81LcfttNab1k7TtAeQYH rLoHyUcBRndMRNogsK0qGjY98IqOuvdT/O6FDcH7Pt1ZkpN82TJ86Q3le45I4ft8ZKgm WcO36LlZO4TSFciqcifs+syvIxqEmDxv3KlEJtFmlXeHoiHw2uhmPIWX7HGDw2kEnAmx OSXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RaJ3sON5; 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 b18-20020a170903229200b00164ade949b8si3765270plh.301.2022.06.22.10.54.09; Wed, 22 Jun 2022 10:54:21 -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=RaJ3sON5; 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 S1377421AbiFVRod (ORCPT + 99 others); Wed, 22 Jun 2022 13:44:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377384AbiFVRob (ORCPT ); Wed, 22 Jun 2022 13:44:31 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDA7A3465E for ; Wed, 22 Jun 2022 10:44:23 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id w24so8257639pjg.5 for ; Wed, 22 Jun 2022 10:44:23 -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=OYDYAsce/lvf/QfGm3jCkG+AP6MQ1L8nhfe2kq87L58=; b=RaJ3sON5zAZxk49VCqlnWjZ6D/CiNIfYanugUfOUgXy47wCRqi8FawzM30EIoAuqQr Trnk685D9hf5f1zQVJSkepSnxFReFzXW7Rhj72iUpjjAwpYWLeuKvohYlKrK9PfXj8pP f/22wwHIgwY2IfA9Iw6qFGZMoj3u7M+NaI6/8= 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=OYDYAsce/lvf/QfGm3jCkG+AP6MQ1L8nhfe2kq87L58=; b=yS/o2qnH4dBQY4/Hd6fjr/X3CSgoIn0U7oos2WQj5deppDvDhq5zXJtmTgDU8p9OEe CQFFof4FvX2RYzUH7YA+/pOfQT/NkGJ+4mUemQ8h2l+n4AXQluEKPXpSFKWlUHQta+Jh 05yDou6ubSLE6HRXy1LYRuVSvLQwXxDNFkWRVMQOHrdB28I12h4WhFK+IrSuvjiXZx5J yEKig7KOLp80epy/KRL5HXhNgnM7E9nBzUfpqvBp7bEg5n1d1HP3MFM09PMvX/himXTL P5/zzGq/c72bOpu07ZG/6NuB/uiPK3iTeHKcUGWAoc0v7Ga6BPvVhDW9MOja/J7phdZF TfjQ== X-Gm-Message-State: AJIora9e/6Ium332yvrP4i16BtKHFYrBn8G8rxyNWUGwiHMLgJzi0dv1 w/MZfgkHF9EmX1AockW/608Z29Wz69dWIQ== X-Received: by 2002:a17:90b:314b:b0:1e3:1033:f555 with SMTP id ip11-20020a17090b314b00b001e31033f555mr50517081pjb.245.1655919863147; Wed, 22 Jun 2022 10:44:23 -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.44.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jun 2022 10:44:22 -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, Pin-Yen Lin , Prashant Malani , Allen Chen , 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?= , Robert Foss , Rob Herring , Sam Ravnborg , Thomas Zimmermann , Xin Ji Subject: [PATCH v5 6/9] dt/bindings: drm/bridge: it6505: Add mode-switch support Date: Wed, 22 Jun 2022 17:34:35 +0000 Message-Id: <20220622173605.1168416-7-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-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 From: Pin-Yen Lin ITE IT6505 can be used in systems to switch USB Type-C DisplayPort alternate mode lane traffic between 2 Type-C ports. Update the binding to accommodate this usage by introducing a switch property. Signed-off-by: Pin-Yen Lin Signed-off-by: Prashant Malani --- v5 is the first version for this patch. .../bindings/display/bridge/ite,it6505.yaml | 97 ++++++++++++++++++- 1 file changed, 96 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml b/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml index 833d11b2303a..86bb6dc5ae6f 100644 --- a/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml +++ b/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml @@ -56,13 +56,46 @@ properties: $ref: /schemas/graph.yaml#/properties/port description: A port node pointing to DPI host port node + switches: + type: object + description: Set of switches controlling DisplayPort traffic on + outgoing RX/TX lanes to Type C ports. + additionalProperties: false + + properties: + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + patternProperties: + '^switch@[01]$': + $ref: /schemas/usb/typec-switch.yaml# + unevaluatedProperties: false + + properties: + reg: + maxItems: 1 + + required: + - reg + + required: + - switch@0 + required: - compatible - ovdd-supply - pwr18-supply - interrupts - reset-gpios - - extcon + +oneOf: + - required: + - extcon + - required: + - switches additionalProperties: false @@ -92,3 +125,65 @@ examples: }; }; }; + - | + #include + + i2c3 { + #address-cells = <1>; + #size-cells = <0>; + + it6505dptx: it6505dptx@5c { + compatible = "ite,it6505"; + interrupts = <8 IRQ_TYPE_LEVEL_LOW 8 0>; + reg = <0x5c>; + pinctrl-names = "default"; + pinctrl-0 = <&it6505_pins>; + ovdd-supply = <&mt6366_vsim2_reg>; + pwr18-supply = <&pp1800_dpbrdg_dx>; + reset-gpios = <&pio 177 0>; + + port { + it6505_dp_in: endpoint { + remote-endpoint = <&dpi_out>; + }; + }; + + switches { + #address-cells = <1>; + #size-cells = <0>; + switch@0 { + compatible = "typec-switch"; + reg = <0>; + mode-switch; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + ite_typec0: endpoint { + remote-endpoint = <&typec_port0>; + }; + }; + }; + }; + + switch@1 { + compatible = "typec-switch"; + reg = <1>; + mode-switch; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + ite_typec1: endpoint { + remote-endpoint = <&typec_port1>; + }; + }; + }; + }; + }; + }; + }; -- 2.37.0.rc0.104.g0611611a94-goog