Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5900175rwl; Mon, 9 Jan 2023 01:07:02 -0800 (PST) X-Google-Smtp-Source: AMrXdXuxLkYYtfxQigVcHdwLkSPoDDADn492hAV5y9JAEkr4/+KZhz/ylwL4Yzdir12fTYRo7A53 X-Received: by 2002:a17:906:700f:b0:7c1:6bd9:571e with SMTP id n15-20020a170906700f00b007c16bd9571emr49259914ejj.13.1673255222616; Mon, 09 Jan 2023 01:07:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673255222; cv=none; d=google.com; s=arc-20160816; b=TZ50tcr2R/ZDa3Vxku3VeNEYegptjtqU5FWfOEvM4I6IywHoG4gtmmM+qFpDNYxMWW dJ2oQePgPSsS2j+iFNWAPtBW2uwwqRtsN7jhiiGyyysIvg1enpuPCEw7LVMhmLxSELle aV/uG6JIfG+2+QfFWyOdHJP3BYxKYzT99HLuHrLtMrK/gLkjhagWTHdh4rAjgLP5NL0V tkAESx84VCNacoXnoVt6g0k95IK23HdoJ4ug03eflss/q454PSjBuJK74vF1Qpr4u5Gy GHKz2ZORPxaxOJ4+vUH3KLCuVZ3zxm5nwOHIYDMs5KbVDACtOwMKe2hjK5sHJwQ+AkWL 2ZAw== 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=YuBntEAB46uq9NIQO1VAT8l/nJZs8T0gBPKThJWSv7I=; b=HinMBuQWfWwdddQKlBNYz9FrZe3OuYB9cRauw/0aLoR254ElEIYpNglRpc3nUvus12 KbIt916+VOMPumJfmYKkXSoHxnTd4Oc/dBma4VySSAeDCIU671/jDQYVA5CRQprRInor FY9A5XVXmGCO+x7Fmu2K0eNp+vTw0ymRt1aJl/kAXkCyBRT4d34xXCSaOd87MKEKDytE poBLbnNFq+M6PqkU8/bpHtjjzTrf062Y0Q56IgaMqYpShPDxsBu20v9aBQpHuTcpeSbS AmVL9ADGbG9WtfBLE/+ys7gnZTEmLGPlPBKlWGxpOrgnY6AVB8Dw9NHMmpcVZT/nnf4y jVWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=iUYEpsOF; 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 dd22-20020a1709069b9600b007c16fdf87c1si9222574ejc.746.2023.01.09.01.06.48; Mon, 09 Jan 2023 01:07:02 -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=iUYEpsOF; 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 S236811AbjAIImr (ORCPT + 54 others); Mon, 9 Jan 2023 03:42:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236641AbjAIIly (ORCPT ); Mon, 9 Jan 2023 03:41:54 -0500 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9540D263B for ; Mon, 9 Jan 2023 00:41:52 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id w3so8766526ply.3 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=E5gSrDKDIeY0uRWlItz/2cxsxAYOcKZmJz0W3NNvoGmhhXugj1PbIFNkJNCSSrpn6K MMqfoFu7mIwzQUgu+MfBBb1hhE+sWQwCFtKo7lbioxGbpA9ptwIcnFG2Wmu+QchTupY7 5dH1WtIMxWjQmNdeYvXlezMjazj83tEzZoJYYav4mXBXvT+mITgNEaO9gJX13kvs45cN zsx3TfacjG2xx3BpM5D9Z1voJivCad/hUGz1Jdji7uZaG1yMUsWKvtOuHvNikLCiJNiE 1rz5o9FA+GC0TkSslhpNr0DhUpUt3yDtwyjwn5zFBQsVM0ol5WnWoV3Gt0u8z9R0IONv 7oSA== X-Gm-Message-State: AFqh2kq13ZVc0E8hg47LYkjfyVwDBgqgPNTya5l1Egk8DUevxRotByx3 5APpdCBwQsBdWIo7Dz0eWS3PPw== 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 Cc: Hsin-Yi Wang , Pin-yen Lin , dri-devel@lists.freedesktop.org, Marek Vasut , Stephen Boyd , AngeloGioacchino Del Regno , Xin Ji , linux-acpi@vger.kernel.org, devicetree@vger.kernel.org, chrome-platform@lists.linux.dev, Thomas Zimmermann , Allen Chen , Javier Martinez Canillas , Lyude Paul , =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= , linux-kernel@vger.kernel.org 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 Content-Transfer-Encoding: 8bit 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 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>; + }; + }; + }; + }; + }; -- 2.39.0.314.g84b9a713c41-goog