Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp792792rwl; Fri, 31 Mar 2023 02:24:09 -0700 (PDT) X-Google-Smtp-Source: AKy350YVnthmXJ8ArJ1fnuJJOkg6OeYkrYaSScodx9Fj4NMcAvc1mzndawxOLoLslA0XCTJZvODZ X-Received: by 2002:a05:6402:524e:b0:500:3fd0:25a8 with SMTP id t14-20020a056402524e00b005003fd025a8mr5005725edd.0.1680254649435; Fri, 31 Mar 2023 02:24:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680254649; cv=none; d=google.com; s=arc-20160816; b=ecmQTIx31h+75JS2WiivDa+NLz+YealgTnTgbkmi+pHftYkGmMgHtUYWvDulzM6fj2 gigK2LLOIZSEF97bdZHCt38DMe/Ey7r7jxMquLeRhfzFUDXIaSCO5f/taANAgwIx1xHw Pug754gqzrJ4/3SZPissnI97+5BgISUKJteMj0iLl33U5sBVK2rFrauDpyemzR0LF6uH 32HsZJ+/14oamfhldBGNgQ0Xff9T6TcCTsJfFPeNs7w2sM0u0bhsbmU20f0KxRuMEJfm J/7Ao8Qt3CJP1dGwgbHwlkBJfF63xgm//+GKqFoP5PjS7LMWd4YLnFolCYgi3hYylhJ6 rLaw== 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=FyK1CPVB6DqR0nAAEjV41bJK1IXc0sTxhKP/3Q82dyE=; b=ue+xLd9p9+cwsBCeJGIVPQxHUv9JBvLpWMMjaM3UneeoUyMRFXOiQxXwM/+VAlsLbh mH3mlidW0zEHUJymzLq4BMxLXakehTruJvw+l+uNlKiiPnZbaLAvPq00Bgw9z/gtJGZ0 PUjtZiY9UCxKThR9b+IboLKFA8kD82FWh931Onyl4ZTM2aQPan9Ze0HFG0I8Gv+7o9FW SDA3xskEXvJnkWqn4+47BVpYi+bIy4jCe9+JN7deqbZQvgAhcYei6Eqsy0UpsPtmuw6I SSCTHq0QHbLfg1x/DxjHOx+vhaKQc60ixeehK/BWnyaCUcSbnwVmlLAvuJE2XFsy7B8z f97Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="WhIpVz/H"; 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 j1-20020aa7ca41000000b00501d4810b84si1444252edt.376.2023.03.31.02.23.44; Fri, 31 Mar 2023 02:24:09 -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="WhIpVz/H"; 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 S232000AbjCaJNw (ORCPT + 99 others); Fri, 31 Mar 2023 05:13:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232108AbjCaJNI (ORCPT ); Fri, 31 Mar 2023 05:13:08 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 102011FD2A for ; Fri, 31 Mar 2023 02:12:40 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id y2so14355879pfw.9 for ; Fri, 31 Mar 2023 02:12:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1680253959; 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=FyK1CPVB6DqR0nAAEjV41bJK1IXc0sTxhKP/3Q82dyE=; b=WhIpVz/HKOEKNNdktud5D+1oEgBs0SECdgqf+34ia6JtOpPAv7UXluegNdEqvyCOne Q8YReAVmWSe9Z/uCqn/W9itofUyHveKRiSi5PyulF97VfOErPr1o2oy0kYhS/Rdg9Ut5 cUzoTpGQH92KUNOtwjsXCZr8Ilyif16U10HYM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680253959; 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=FyK1CPVB6DqR0nAAEjV41bJK1IXc0sTxhKP/3Q82dyE=; b=TEGqnAUOYrE4BfGeVCTVZcruTRvDo0ZFzWRaByAU3qMnhA5/qGXjOd1NZ/DPdxBxUP iFnGOSMy+fryJBnmtw82H/JAWqFos+ytohXvflETo5zXajr5lP+9j1YG4UqEfjSIYe9e dCOgAD62jCWTWzckanjeLgv6w9o2HJMDo1vHhovA1ysMuNoHrsm+mbrQ2q9gE7uNs7Be icRfXBi73dhqty4etUz/Nsg5MI01lM0qb2G/YrUPc3FdqcQqa01sAvKb863IKIa+LZRs VNoszLB2m58iYftZnnuhl/ziNVkYX0roJgAKy6fHa1likp4Smu85PXd9ys+P9oAJqZYl dTuQ== X-Gm-Message-State: AAQBX9ezeEWArc2eYE8j0dJZkdOPWmzri+J9IbcZ1fxr4xWaDQceDwUX lwE9fRO6HCDrKFWkxWz1HLncjQ== X-Received: by 2002:aa7:96b1:0:b0:628:cd1:fbbb with SMTP id g17-20020aa796b1000000b006280cd1fbbbmr20435751pfk.27.1680253959450; Fri, 31 Mar 2023 02:12:39 -0700 (PDT) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:ae9d:db7a:8a71:d458]) by smtp.gmail.com with ESMTPSA id n6-20020a62e506000000b006227c3d5e29sm1360905pff.16.2023.03.31.02.12.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 02:12:39 -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 , Marek Vasut , Hsin-Yi Wang , Thomas Zimmermann , AngeloGioacchino Del Regno , Lyude Paul , devicetree@vger.kernel.org, Stephen Boyd , dri-devel@lists.freedesktop.org, linux-acpi@vger.kernel.org, chrome-platform@lists.linux.dev, =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= , Javier Martinez Canillas , Pin-yen Lin , linux-kernel@vger.kernel.org, Allen Chen Subject: [PATCH v15 08/10] dt-bindings: display: bridge: it6505: Add mode-switch support Date: Fri, 31 Mar 2023 17:11:43 +0800 Message-Id: <20230331091145.737305-9-treapking@chromium.org> X-Mailer: git-send-email 2.40.0.348.gf938b09366-goog In-Reply-To: <20230331091145.737305-1-treapking@chromium.org> References: <20230331091145.737305-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 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.348.gf938b09366-goog