Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5885435rwl; Wed, 22 Mar 2023 03:50:00 -0700 (PDT) X-Google-Smtp-Source: AK7set+qY3Z4kF37r9ShLBFl5Ii80x7urMXacPAuxfn7kPiAXsDEEviEu6++9vJ3/wrmOpcaAYsU X-Received: by 2002:a05:6402:7d5:b0:500:50f6:dd33 with SMTP id u21-20020a05640207d500b0050050f6dd33mr7323569edy.2.1679482200119; Wed, 22 Mar 2023 03:50:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679482200; cv=none; d=google.com; s=arc-20160816; b=k9XEAJXxkmn5bodB8khMrTIs5QA06086pJII7ooJ4Nzj9IDdj9vewzq7VMyo1Qnvcc yBvboPxbS8FOWfZ+e/usCuQH0c+PCoqo9VsinrOQTGfirw5AwrjOwOIf/QfgvrHp7yad AleNN9mqeiHI4o9CSBpscB0lSgpJ/I9fl17dgs1DIJJgbHhNVHrhemSXK8D3O25Oh+S5 TzDCwYHjcuDPhlY1M+V/rD9iV3vljKUJVHi/FfrT/VFpHbix/jhY2ByUBWcOT/73yt5/ y/gxGeadq4fZ/cd+GQhzi2wQGwjJ78bhvxRNQ1wpOJTutArAxKM/iorD5cMR8MDs7J9w ObOQ== 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=/8yfn2DmllskdKP/oOcQ9B405UmJOgHc+y1qZoocZy8=; b=xqBXX29XQOz4zqwwHBXZ6chq332d3AOGYLDPapD+wzQoq0rZO0r9kiNZ2ZPycLIp2F xAGnPXomd4ic9T+OhChMy7Sqx9oixz9EH1UMmnTfwx7AJ/wIbOvdWRO5dm6+gT0+IYqA b0gOu6FSEJkogvvPja6dYXr2GjaPPFyEL4krU5M/A/1rBeWavmVGLv5ol6DwqzC8fCBt QVNCAythL2LfgeLCIoZsuO8wF/xgltTFpsReQpUmSVcIMCdSe3LPpxXGUnUzVervDi85 5+oGRewoMQyH9JidpprVjRuQ7SeftB0m29IVy3AePzl8E6nKkixitHJbJpRcNKGoxXDS 9yng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=O5uKHQ9H; 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 tg3-20020a1709078dc300b009333dc25e58si10571656ejc.109.2023.03.22.03.49.36; Wed, 22 Mar 2023 03:50:00 -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=O5uKHQ9H; 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 S230333AbjCVKs7 (ORCPT + 99 others); Wed, 22 Mar 2023 06:48:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230410AbjCVKsJ (ORCPT ); Wed, 22 Mar 2023 06:48:09 -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 204836286F for ; Wed, 22 Mar 2023 03:47:33 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id om3-20020a17090b3a8300b0023efab0e3bfso23056115pjb.3 for ; Wed, 22 Mar 2023 03:47:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1679482053; 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=/8yfn2DmllskdKP/oOcQ9B405UmJOgHc+y1qZoocZy8=; b=O5uKHQ9H+aO2fBv01xe8xdY7oBrreI5ewWbZElSXkWxkPzP2xScs0UAJKKrtPXCVg6 ZQ37l5vdd9fC5HuJgYpgMWtf4riT6buEa2xmSPyxgCnQhVMFSFKZpx8FbzokLNjyLWPu +BCIGjv6+iRWIL/JaBAHVsuEQ+3TT/bJS6s94= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679482053; 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=/8yfn2DmllskdKP/oOcQ9B405UmJOgHc+y1qZoocZy8=; b=gS2Tq8vNy6bY8cPhAwaac6DMRn89IUuAjCxZqqDL8C7wRNYA9O1AvZZDB/tM27YYh7 T5l7DSYG9K/YQZ1KHN1eaUorbDpQmPtdl75LPkFbJ78YNQCHeqJQAj1a+Lxpr2cgH8L7 LnbS+Q60SaughafTI9qYDLdPYn+btbPnrt8mng1N6UDyW7xELhfVlEn2HUXJbebTq4/v A8AXT7vfiXrF2dEX6nMZMc8mEHjlBKCF5tjmGdoj5F7L6WXUdyTHqO6x+woNU+Qo9JcL UzwaT0hfH1HIkJdYvqfV574W2McodtICjDEEczp3GmwX976FoKd4ph57zWUtvZ9Kv3Ej B0ew== X-Gm-Message-State: AO0yUKX8/efndQDsW0r11xErEWWyWE8xlRoZGwfocFIo4/PgRa4e7Hzb DEoSf+2GWXwRdHaqmMvNXD2pCQ== X-Received: by 2002:a17:90a:bc85:b0:23f:d7ea:6212 with SMTP id x5-20020a17090abc8500b0023fd7ea6212mr2746126pjr.38.1679482052774; Wed, 22 Mar 2023 03:47:32 -0700 (PDT) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:343d:79bf:55f9:1da5]) by smtp.gmail.com with ESMTPSA id hg4-20020a17090b300400b002340d317f3esm9508742pjb.52.2023.03.22.03.47.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 03:47:32 -0700 (PDT) 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: Xin Ji , linux-kernel@vger.kernel.org, Thomas Zimmermann , linux-acpi@vger.kernel.org, Javier Martinez Canillas , AngeloGioacchino Del Regno , Pin-yen Lin , Hsin-Yi Wang , Lyude Paul , =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= , Allen Chen , dri-devel@lists.freedesktop.org, Marek Vasut , Stephen Boyd , chrome-platform@lists.linux.dev, devicetree@vger.kernel.org Subject: [PATCH v14 08/10] dt-bindings: display: bridge: it6505: Add mode-switch support Date: Wed, 22 Mar 2023 18:46:37 +0800 Message-Id: <20230322104639.221402-9-treapking@chromium.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230322104639.221402-1-treapking@chromium.org> References: <20230322104639.221402-1-treapking@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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 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 v12) Changes in v12: - Fixed the schema of "data-lanes" property for it6505 - Reworded the description of the mode-switch property Changes in v11: - Updated the description of the endpoints in the bindings - Referenced video-interfaces.yaml instead for the endpoints binding - Removed duplicated definitions from inherited schema 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 | 101 +++++++++++++++--- 1 file changed, 88 insertions(+), 13 deletions(-) diff --git a/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml b/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml index c9a882ee6d98..348b02f26041 100644 --- a/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml +++ b/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml @@ -75,22 +75,49 @@ properties: port@1: $ref: /schemas/graph.yaml#/$defs/port-base unevaluatedProperties: false - description: Video port for DP output + description: + Video port for DP output. Each endpoint connects to a video output + downstream, and the "data-lanes" property is used to describe the pin + connections. 0, 1, 2, 3 in "data-lanes" maps to TX0, TX1, TX2, TX3, + respectively. - properties: - endpoint: - $ref: /schemas/graph.yaml#/$defs/endpoint-base + + patternProperties: + "^endpoint@[01]$": + $ref: /schemas/media/video-interfaces.yaml# unevaluatedProperties: false properties: + reg: true + + remote-endpoint: true + data-lanes: - minItems: 1 - uniqueItems: true - items: - - enum: [ 0, 1 ] - - const: 1 - - const: 2 - - const: 3 + oneOf: + - items: + - enum: [0, 3] + + - items: + - const: 0 + - const: 1 + + - items: + - const: 3 + - const: 2 + + - items: + - const: 0 + - const: 1 + - const: 2 + - const: 3 + + mode-switch: + type: boolean + description: Serves as Type-C mode switch if present. + + required: + - reg + - remote-endpoint required: - port@0 @@ -102,7 +129,6 @@ required: - pwr18-supply - interrupts - reset-gpios - - extcon - ports additionalProperties: false @@ -139,8 +165,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 +177,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 = <3 2>; + remote-endpoint = <&typec_port1>; + }; + }; + }; + }; + }; -- 2.40.0.rc1.284.g88254d51c5-goog