From patchwork Thu Nov 24 10:20:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pin-yen Lin X-Patchwork-Id: 1708616 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=h0Y+v3Wt; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4NHvF21PPJz23mg for ; Thu, 24 Nov 2022 21:22:14 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229757AbiKXKWM (ORCPT ); Thu, 24 Nov 2022 05:22:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230023AbiKXKVt (ORCPT ); Thu, 24 Nov 2022 05:21:49 -0500 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9F1115B4D0 for ; Thu, 24 Nov 2022 02:21:45 -0800 (PST) Received: by mail-pj1-x102d.google.com with SMTP id g5so1034452pjd.4 for ; Thu, 24 Nov 2022 02:21:45 -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=nI+gZT0pcePdydFoBeIT1UIcJJFwcuKGSk5zJ0RL4tU=; b=h0Y+v3WtWtEa8b3ysBdsgKHNq8g5LNo8YXyeBfLFNKlHmk2xzqlJdZf8/dacjprErY tqXVFAUTRiP5vbsey1w3Bn7mDO1Aj5qfei74MJMrTMNQGNjyKJFzy0/VEY2MFVV/zBrN g0H+3UT1NOjdvCDGiisvDtceQxOMvoHjs9rpo= 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=nI+gZT0pcePdydFoBeIT1UIcJJFwcuKGSk5zJ0RL4tU=; b=CU1wExhxUvc6Rs+G71cJvn2Rr7/n+zS78OO/BCPVLfl2mu0h8OZALfWZKV9iH2RaCy TtNFR/Z4PnCMFtmPIzk+vgM1VxyUVPSm/I9go49v430J3EjxIxJODcJgQ8UIHjy0Vjzx uOJxp6moHO5QSmN2CNVWrIaJXLPpj+xDetU7vwEwEHV5gnBh2bScCnfr21JOIqgZY5J/ H2o7jBFE3jcAeUHD/4G8iDFDHlJXlgxN65qWsubslHXbRHJkk6m4v2l+W9EsVLzTqMoK uml3jCcUPmE65pxbiJ09HSUWiQ02xUQBRZaierOiT/yjECd+3EpypMKWk8npwfz+CVEk Ycfg== X-Gm-Message-State: ANoB5plKP7XG3vl/vXuCnNXrgFuAKrWwUtuRh4giw47CmtnbigpzWrZe LpE/dkuUyF8R4Gs+jKWaaQbvbQ== X-Google-Smtp-Source: AA0mqf7hh4W9Fkbv8iFQguyRhGwjrTAFkMKQsz1viXpfZVWTjFkqR6ffAp9vqXowTDad2gm63u4YVA== X-Received: by 2002:a17:902:b613:b0:181:9900:18df with SMTP id b19-20020a170902b61300b00181990018dfmr13219005pls.70.1669285305357; Thu, 24 Nov 2022 02:21:45 -0800 (PST) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:d446:708:8556:dfee]) by smtp.gmail.com with ESMTPSA id t123-20020a625f81000000b005747b59fc54sm854584pfb.172.2022.11.24.02.21.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Nov 2022 02:21:44 -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: Javier Martinez Canillas , Stephen Boyd , dri-devel@lists.freedesktop.org, Hsin-Yi Wang , Thomas Zimmermann , devicetree@vger.kernel.org, Pin-yen Lin , chrome-platform@lists.linux.dev, linux-acpi@vger.kernel.org, Marek Vasut , Xin Ji , Lyude Paul , =?utf-8?q?N=C3=ADcolas_F_=2E_R_=2E_A_=2E_Pra?= =?utf-8?q?do?= , AngeloGioacchino Del Regno , linux-kernel@vger.kernel.org, Allen Chen Subject: [PATCH v6 6/7] dt/bindings: drm/bridge: it6505: Add mode-switch support Date: Thu, 24 Nov 2022 18:20:55 +0800 Message-Id: <20221124102056.393220-7-treapking@chromium.org> X-Mailer: git-send-email 2.38.1.584.g0f3c55d4c2-goog In-Reply-To: <20221124102056.393220-1-treapking@chromium.org> References: <20221124102056.393220-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=ham 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: devicetree@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 v6: - Remove switches node and use endpoints and data-lanes property to describe the connections. .../bindings/display/bridge/ite,it6505.yaml | 94 ++++++++++++++++++- 1 file changed, 90 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml b/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml index 833d11b2303a..b4b9881c7759 100644 --- a/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml +++ b/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml @@ -52,9 +52,53 @@ properties: maxItems: 1 description: extcon specifier for the Power Delivery - port: - $ref: /schemas/graph.yaml#/properties/port - description: A port node pointing to DPI host port node + data-lanes: + maxItems: 1 + description: restrict the dp output data-lanes with value of 1-4 + + max-pixel-clock-khz: + maxItems: 1 + description: restrict max pixel clock + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: A port node pointing to DPI host port node + + port@1: + $ref: /schemas/graph.yaml#/properties/port-base + description: + Video port for panel or connector. + + patternProperties: + "^endpoint@[01]$": + $ref: /schemas/media/video-interfaces.yaml# + type: object + unevaluatedProperties: false + + properties: + reg: + maxItems: 1 + + remote-endpoint: true + + data-lanes: + minItems: 1 + uniqueItems: true + items: + - enum: [ 0, 1, 2, 3] + + mode-switch: + type: boolean + description: Register this node as a Type-C mode switch or not. + + required: + - reg + - remote-endpoint required: - compatible @@ -62,7 +106,7 @@ required: - pwr18-supply - interrupts - reset-gpios - - extcon + - ports additionalProperties: false @@ -92,3 +136,45 @@ examples: }; }; }; + - | + #include + + &i2c3 { + clock-frequency = <100000>; + + it6505dptx: it6505dptx@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>; + hpd-gpios = <&pio 10 0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + it6505_in: endpoint { + remote-endpoint = <&dpi_out>; + }; + }; + port@1 { + reg = <1>; + ite_typec0: endpoint@0 { + mode-switch; + data-lanes = <0 1>; + remote-endpoint = <&typec_port0>; + }; + ite_typec1: endpoint@1 { + mode-switch; + data-lanes = <2 3>; + remote-endpoint = <&typec_port1>; + }; + }; + }; + }; + };