From patchwork Thu Jan 12 04:21:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pin-yen Lin X-Patchwork-Id: 42250 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp3687609wrt; Wed, 11 Jan 2023 20:26:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXsvgA5zqxKwQPkFRw29Auj1dpnAIRwyPoEKGAJC6XvjQYBgYLT7XGu0HFmxFwapZIbW/37k X-Received: by 2002:a05:6402:2409:b0:493:597e:2192 with SMTP id t9-20020a056402240900b00493597e2192mr23607322eda.38.1673497595763; Wed, 11 Jan 2023 20:26:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673497595; cv=none; d=google.com; s=arc-20160816; b=xuE1+cGNe2OyxVcVkS59ht4UrzL7ldHL1QlT/7A1Dpr3wGuiRwGo2QlpOrQP2Bn/i3 IvpjQbatQw3GRtKefJchtmxEIEa2yHiilIvSSvhNqaAeFfiKyGS9CnU1gTNG9OyvOFLz pw8LhhlWIXYkxFM1ecJTYv+3G+kBlowuYR/VbYX/SSo61LEnt4O110rL8eEMxc38j6rn t83qbmIiFEVQfSCyJ/R1oRjRoNXabOSMu2I2L7/0T8LmZwotwZ3Gmx7Q+w3p8t2s1KXd 12IaMwS/YRwRXEDv2fYORUG60q2IV2B828HOcjoOiy4hcO5CH/9pgRmN244SgM7RgjUA JNOg== 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=A+W1cXAXq5duK/oGrDudgV2aBiDrEOkk3FJcTdtrXNI=; b=BuG57w8ksMtAco+LwRScrz1nXEfmx+qqFT7rTRlSwB0iAJuaM73jO3MeC3HDTQ6GsQ rdBjEbB3YjSusl+MPjoDtiBgmitS2m7vmvRrYUTYHKV5AUIlGMi7Hbbqzk8bN7U0gIzd Wmj6YL4nmIBaDprlu244hcwmwDQ/an0i39B3XlTpvxxIKVF3yrVwtXIYagoklJLl4gHH fKXEq7PNxJls395qTj9xxKZIugD4tOHC9MBIlbw73215myE027wqkQISaNLEJ82CDDe/ ACkqVMWLmtoE+FhWcOPm7MFrB7oZRsgvDGmgizo8AesqxtJXyQLpqEVTiZmZuCqTXvxJ ZoLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lyCQW6pE; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e20-20020a50fb94000000b00497431159d4si14363906edq.532.2023.01.11.20.26.12; Wed, 11 Jan 2023 20:26:35 -0800 (PST) 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=lyCQW6pE; 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 S239544AbjALEXV (ORCPT + 99 others); Wed, 11 Jan 2023 23:23:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235881AbjALEWH (ORCPT ); Wed, 11 Jan 2023 23:22:07 -0500 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B558F1DF0E for ; Wed, 11 Jan 2023 20:22:05 -0800 (PST) Received: by mail-pj1-x102a.google.com with SMTP id n12so17938744pjp.1 for ; Wed, 11 Jan 2023 20:22:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=A+W1cXAXq5duK/oGrDudgV2aBiDrEOkk3FJcTdtrXNI=; b=lyCQW6pEIVnYKQAwsAKRPrWLr6a0pbfDTbyn0/QZC3RjMznqFU6UexHGwA6k+2Ct5+ ehmFOIHkp7bu5MId/ijQjkoqMOjqc38zKlAN0WQbr8dJp57hi6cGHX55KmfchbU5CkWG 0jUtUp8TKzDU4Nq1y6qPI28wgKjbv1GtMI1IA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A+W1cXAXq5duK/oGrDudgV2aBiDrEOkk3FJcTdtrXNI=; b=M1EE9HndCWWtUEX+FnBYHUU2kyfwz6o1fVEhKmyc+/NtoEqYm0SmgVVi5+8KYX1X5w uqPy9cfELZ4h+Z8DAHU1uBWkyj5EJdXy9Z/SUsVRLSTILHc/nyQWDVygEVdCeCC8RzQw ikb44e1rRHYOkKKoNClxjzTquAiUwhhu9CaUqadVNJm0Bj2CtgotTcPX/qB8N2baHQez AvztPVNfdnB0CFw0+l5+Rbr7uaICnKUDrE/3BanqQxS1kgMYbU4MSkBxNN/E17qvw5qO S4fied9AqZXc5YUpNbuBvOp37nLAzIfoEP+RRpEtRr0nNguV/snrM9BR1RU1n1FHp8I6 Q/kw== X-Gm-Message-State: AFqh2kpmaSFFKQWIJ2muO4lT0OrcLsH/WXPAZ+m9Xet9Dy3T5/KDSOh/ 0G3r2jtTN2dQKo7hljCWFurp0w== X-Received: by 2002:a05:6a20:6f87:b0:b5:46fa:24e8 with SMTP id gv7-20020a056a206f8700b000b546fa24e8mr29390212pzb.38.1673497325247; Wed, 11 Jan 2023 20:22:05 -0800 (PST) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:594f:5484:7591:d074]) by smtp.gmail.com with ESMTPSA id s8-20020aa78bc8000000b00582579cb0e0sm5519478pfd.129.2023.01.11.20.22.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 20:22:04 -0800 (PST) From: Pin-yen Lin To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J . Wysocki" , Prashant Malani , Benson Leung , Guenter Roeck Cc: Stephen Boyd , Pin-yen Lin , =?utf-8?q?N=C3=ADcolas_F_=2E_R_=2E_A_=2E_Prado?= , Marek Vasut , AngeloGioacchino Del Regno , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Javier Martinez Canillas , Lyude Paul , chrome-platform@lists.linux.dev, Xin Ji , Thomas Zimmermann , linux-kernel@vger.kernel.org, Allen Chen , linux-acpi@vger.kernel.org, Hsin-Yi Wang Subject: [PATCH v10 7/9] dt-bindings: display: bridge: it6505: Add mode-switch support Date: Thu, 12 Jan 2023 12:21:02 +0800 Message-Id: <20230112042104.4107253-8-treapking@chromium.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog In-Reply-To: <20230112042104.4107253-1-treapking@chromium.org> References: <20230112042104.4107253-1-treapking@chromium.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754789415039879494?= X-GMAIL-MSGID: =?utf-8?q?1754789415039879494?= ITE IT6505 can be used in systems to switch the DP traffic between two downstreams, which can be USB Type-C DisplayPort alternate mode lane or regular DisplayPort output ports. Update the binding to accommodate this usage by introducing a data-lanes and a mode-switch property on endpoints. Signed-off-by: Pin-yen Lin --- (no changes since v9) Changes in v9: - Fixed subject prefix again - Changed the naming of the example node for it6505 Changes in v8: - Updated bindings for data-lanes property - Fixed subject prefix Changes in v7: - Fixed issues reported by dt_binding_check. - Updated the schema and the example dts for data-lanes. - Changed to generic naming for the example dts node. Changes in v6: - Remove switches node and use endpoints and data-lanes property to describe the connections. .../bindings/display/bridge/ite,it6505.yaml | 93 ++++++++++++++++--- 1 file changed, 82 insertions(+), 11 deletions(-) diff --git a/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml b/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml index b16a9d9127dd..94182f131f86 100644 --- a/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml +++ b/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml @@ -77,20 +77,43 @@ properties: unevaluatedProperties: false description: Video port for DP output - properties: - endpoint: + patternProperties: + "^endpoint@[01]$": $ref: /schemas/graph.yaml#/$defs/endpoint-base unevaluatedProperties: false properties: + reg: + maxItems: 1 + + remote-endpoint: true + data-lanes: - minItems: 1 - uniqueItems: true - items: - - enum: [ 0, 1 ] - - const: 1 - - const: 2 - - const: 3 + oneOf: + - items: + - enum: [0, 1, 2, 3] + + - items: + - const: 0 + - const: 1 + + - items: + - const: 2 + - const: 3 + + - items: + - const: 0 + - const: 1 + - const: 2 + - const: 3 + + mode-switch: + type: boolean + description: Register this node as a Type-C mode switch or not. + + required: + - reg + - remote-endpoint required: - port@0 @@ -102,7 +125,6 @@ required: - pwr18-supply - interrupts - reset-gpios - - extcon - ports additionalProperties: false @@ -139,8 +161,11 @@ examples: }; port@1 { + #address-cells = <1>; + #size-cells = <0>; reg = <1>; - it6505_out: endpoint { + it6505_out: endpoint@0 { + reg = <0>; remote-endpoint = <&dp_in>; data-lanes = <0 1>; }; @@ -148,3 +173,49 @@ examples: }; }; }; + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + dp-bridge@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>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + it6505_dpi_in: endpoint { + remote-endpoint = <&dpi_out>; + }; + }; + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + ite_typec0: endpoint@0 { + reg = <0>; + mode-switch; + data-lanes = <0 1>; + remote-endpoint = <&typec_port0>; + }; + ite_typec1: endpoint@1 { + reg = <1>; + mode-switch; + data-lanes = <2 3>; + remote-endpoint = <&typec_port1>; + }; + }; + }; + }; + };