From patchwork Mon Jan 9 08:40:59 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: 13093142 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D5070C54EBE for ; Mon, 9 Jan 2023 08:41:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A2B510E379; Mon, 9 Jan 2023 08:41:55 +0000 (UTC) Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9007910E379 for ; Mon, 9 Jan 2023 08:41:52 +0000 (UTC) Received: by mail-pl1-x635.google.com with SMTP id s8so439801plk.5 for ; Mon, 09 Jan 2023 00:41:52 -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=YuBntEAB46uq9NIQO1VAT8l/nJZs8T0gBPKThJWSv7I=; b=iUYEpsOFVpkwHqzDy/fjVHkDanLyXPOt1Soq2FK2phFPaJrYQ0ebAJ/74WqZeulXKz byRYe1O+kkr1hb6NxOsEdX9FRk98PV0Fd1Dji04sHauxJwEDbAut7R+pf2Hhw536LOO5 AOieK5jiddKIvazneu/HxDk5eAY+YX+rdPQxg= 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=YuBntEAB46uq9NIQO1VAT8l/nJZs8T0gBPKThJWSv7I=; b=K7o2bioWoUudQBCEM9WeN5rpHNsU8c1D+znXKW9shP2OlxC/utF5SM2LwH09rKfUtm fHXprHVLhb7123lAqXGc9iWzn88001Ckz4BdCJpjuLFDOqWLGwvAe6aU21y2EpgPBTc0 blDMg64n3FEkX4hFqgeZrAAstuUpFszSk3OP8bAEdjCPnijRC1gBcYgu0h2sOBqx/B5A p/yB0pK9LyejPuVqF2JKyeney0SxrARy2LYRNr6/ri38Y+LZh5S0gD96Sz8XGpg10TR6 ZhcHk3tdXvrKBz64YqvZ15jkWW+2hPuy5GZ0k8yzH0KmDG3RAX+A7tcLT355Z+mVET/U pj6w== X-Gm-Message-State: AFqh2kqDZ4x2MhYOSHhImGMeS2ObsuEtAumiD3nRTRdnXgZQfvFsZPYC fqg4Z11nzarALswvShZ6mUnzDQ== X-Google-Smtp-Source: AMrXdXsHun6pTGfxbeEaDv1ucxGxQtC9/wu6SrP2pEl4cbUx1LLbkOcZWjTR0FAysNpsioOME3E5/g== X-Received: by 2002:a17:902:8208:b0:193:10b9:8fc3 with SMTP id x8-20020a170902820800b0019310b98fc3mr10463870pln.30.1673253712088; Mon, 09 Jan 2023 00:41:52 -0800 (PST) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:801:a736:715:9a15]) by smtp.gmail.com with ESMTPSA id c14-20020a170902d48e00b00186acb14c4asm5568119plg.67.2023.01.09.00.41.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 00:41:51 -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 Subject: [PATCH v9 7/9] dt-bindings: display: bridge: it6505: Add mode-switch support Date: Mon, 9 Jan 2023 16:40:59 +0800 Message-Id: <20230109084101.265664-8-treapking@chromium.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog In-Reply-To: <20230109084101.265664-1-treapking@chromium.org> References: <20230109084101.265664-1-treapking@chromium.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Vasut , devicetree@vger.kernel.org, =?utf-8?q?N?= =?utf-8?q?=C3=ADcolas_F_=2E_R_=2E_A_=2E_Prado?= , linux-acpi@vger.kernel.org, Allen Chen , Javier Martinez Canillas , dri-devel@lists.freedesktop.org, Stephen Boyd , Pin-yen Lin , Thomas Zimmermann , Hsin-Yi Wang , chrome-platform@lists.linux.dev, Xin Ji , linux-kernel@vger.kernel.org, AngeloGioacchino Del Regno Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- 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>; + }; + }; + }; + }; + };