From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 459FE7E3 for ; Mon, 26 Dec 2022 08:57:13 +0000 (UTC) Received: by mail-io1-f52.google.com with SMTP id z144so5448891iof.3 for ; Mon, 26 Dec 2022 00:57:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=y9TbX3Ceh1FvaBv664udZf8XfrOpdKKd1+DeV95MdyU=; b=Bi5owdA6WovVAMZcv9Xg7UtskNw4+684vpuoZJeflxtV3ZDO4PKd2iJDfmLTyqqNpq lOVR9fPEoBWOyeiHd85xuiPaMJnyBllR19W6q6zN8qOmAkm9E7Kl+IrfWMsltiZ4cmA1 C+ow+S7IbcqHZPmSLrl2qKxwome1/bjEv8xaM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=y9TbX3Ceh1FvaBv664udZf8XfrOpdKKd1+DeV95MdyU=; b=JTXTnhDbrirfS74A2e3q3DYZwHRQLLVae3x/JAIkbcmTa7SH30M+sS8WxdqQ400Zhz QLKChQFHeVlAixpeJvrLiVTw7bJWVTnTEzGK3AyjA0AXZFnIY4Xek5izsH0OnWSs2ypz 4m8r5h5fmnVbxHXp8oM4hlkL957+Phhvp8fCGSJqIJjLTrABTprWMeej5C1V6GX58Fzx Kld9ADjlL36mVoRRTz9j2XJC/6oh4aBoEVjhcKYwONQXm6mc9IfaU6uIFtXK2uozOw9f SPHpN4w1baI4YFmIHbB0+iMXcT8S3pylnvQbJz86KXWbSLE2wl1qnsEzFQ5yESxD0Zuc 6quA== X-Gm-Message-State: AFqh2kpiKT39BXumM2Efk+FHRFrFW5NWmNNTYtTQgl8C+75seMd0klIL bWbJUUFSCPgN2ihzB/hLRts24MH8grXwE/hZ/b40+w== X-Google-Smtp-Source: AMrXdXvZZwiu7qagoS6yQmOv/xa7NoF2r1prkxbf2PgG2eUjFk6I49fFzrxM9Ian30iQB4AcDtL7g9FaZUcFi4kfwfI= X-Received: by 2002:a6b:490f:0:b0:6e3:29a8:47a with SMTP id u15-20020a6b490f000000b006e329a8047amr1409337iob.209.1672045032266; Mon, 26 Dec 2022 00:57:12 -0800 (PST) Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20221124102056.393220-1-treapking@chromium.org> <20221124102056.393220-7-treapking@chromium.org> In-Reply-To: From: Pin-yen Lin Date: Mon, 26 Dec 2022 16:57:01 +0800 Message-ID: Subject: Re: [PATCH v6 6/7] dt/bindings: drm/bridge: it6505: Add mode-switch support To: Krzysztof Kozlowski Cc: 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 , Javier Martinez Canillas , Stephen Boyd , dri-devel@lists.freedesktop.org, Hsin-Yi Wang , Thomas Zimmermann , devicetree@vger.kernel.org, chrome-platform@lists.linux.dev, linux-acpi@vger.kernel.org, Marek Vasut , Xin Ji , Lyude Paul , =?UTF-8?B?TsOtY29sYXMgRiAuIFIgLiBBIC4gUHJhZG8=?= , AngeloGioacchino Del Regno , linux-kernel@vger.kernel.org, Allen Chen Content-Type: text/plain; charset="UTF-8" Hi Krzysztof, On Mon, Nov 28, 2022 at 5:02 AM Krzysztof Kozlowski wrote: > > On 24/11/2022 11:20, Pin-yen Lin wrote: > > 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 > > Hm, where is the definition of this type? For example it comes with > video-interfaces, which you did not reference here. > Actually I messed up here with another accepted patch: https://lore.kernel.org/all/20221103091243.96036-2-allen.chen@ite.com.tw/ This and the next new property have been added in that patch. > > + > > + max-pixel-clock-khz: > > There is no such unit accepted: > https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml > > > + maxItems: 1 > > maxItems of what type? What is this? > > > + description: restrict max pixel clock > > + > > + ports: > > + $ref: /schemas/graph.yaml#/properties/ports > > This is incompatible change... how do you handle now ABI break? > This is also added in another patch, and currently we don't have any upstream it6505 users now. > > + > > + properties: > > + port@0: > > + $ref: /schemas/graph.yaml#/$defs/port-base > > Why changing the ref? The `unevaluatedProperties: false` in `/schemas/graph.yaml#/properties/port` does not allow me to add new properties here. > > > + 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] > > Same problem as your previouspatch. > > > + > > + 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 { > > Node names should be generic. > https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > I'll fix this in v7. > > + 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>; > > Does not look like you tested the bindings. Please run `make > dt_binding_check` (see > Documentation/devicetree/bindings/writing-schema.rst for instructions). Sorry for not checking the documentation and testing the patches before submitting this. I'll fix the errors in v7. Best regards, Pin-yen > > Best regards, > Krzysztof > From mboxrd@z Thu Jan 1 00:00:00 1970 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 324E4C4332F for ; Mon, 26 Dec 2022 08:57:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8592B10E1BB; Mon, 26 Dec 2022 08:57:18 +0000 (UTC) Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3624C10E033 for ; Mon, 26 Dec 2022 08:57:12 +0000 (UTC) Received: by mail-io1-xd33.google.com with SMTP id h6so5435003iof.9 for ; Mon, 26 Dec 2022 00:57:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=y9TbX3Ceh1FvaBv664udZf8XfrOpdKKd1+DeV95MdyU=; b=Bi5owdA6WovVAMZcv9Xg7UtskNw4+684vpuoZJeflxtV3ZDO4PKd2iJDfmLTyqqNpq lOVR9fPEoBWOyeiHd85xuiPaMJnyBllR19W6q6zN8qOmAkm9E7Kl+IrfWMsltiZ4cmA1 C+ow+S7IbcqHZPmSLrl2qKxwome1/bjEv8xaM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=y9TbX3Ceh1FvaBv664udZf8XfrOpdKKd1+DeV95MdyU=; b=in8qhCFSBeXidrxgtKYfM+JSw8o+Sh6umwgE5dvB4bN6LMTg9CU/Dsq/n61bSQUPXS PUx+tS8iduDqwflFdqS1Ot5vN/N+1HpBuFlILxkRouOU/4sldy0wwqLc5wuLoaBGe4w3 HELpXDXv8amOIqwsT6476DYIk0Su+bOIMKVBZMiHyL5WU2kHcfQ+elUDQYa4CSwJgxm4 9pcAD2G+4Tuubvb2eWG5X1dHCwPTEhPfVNtJWIXblj1VNSieG0FM2jW4J3mXGmnU2SV3 e6VMHQvFtb4gFkEeSQfICh4I3Ke1zKbAL8daCf+kPb1ZPTsmZfLdo3PIl0isB56So52x 6yUw== X-Gm-Message-State: AFqh2krzlyqZKDt8JpYsPC2I7kofxmuAKB6btWyfNaHxGGCmjKrZ43Ip kbJn5QyjosTDmftu7uh6E0c9QxdhTBJaYIvrCZ75fg== X-Google-Smtp-Source: AMrXdXvZZwiu7qagoS6yQmOv/xa7NoF2r1prkxbf2PgG2eUjFk6I49fFzrxM9Ian30iQB4AcDtL7g9FaZUcFi4kfwfI= X-Received: by 2002:a6b:490f:0:b0:6e3:29a8:47a with SMTP id u15-20020a6b490f000000b006e329a8047amr1409337iob.209.1672045032266; Mon, 26 Dec 2022 00:57:12 -0800 (PST) MIME-Version: 1.0 References: <20221124102056.393220-1-treapking@chromium.org> <20221124102056.393220-7-treapking@chromium.org> In-Reply-To: From: Pin-yen Lin Date: Mon, 26 Dec 2022 16:57:01 +0800 Message-ID: Subject: Re: [PATCH v6 6/7] dt/bindings: drm/bridge: it6505: Add mode-switch support To: Krzysztof Kozlowski Content-Type: text/plain; charset="UTF-8" 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: Heikki Krogerus , Andrzej Hajda , "Rafael J . Wysocki" , dri-devel@lists.freedesktop.org, Laurent Pinchart , Krzysztof Kozlowski , Guenter Roeck , Marek Vasut , chrome-platform@lists.linux.dev, Javier Martinez Canillas , Jernej Skrabec , linux-acpi@vger.kernel.org, devicetree@vger.kernel.org, Sakari Ailus , =?UTF-8?B?TsOtY29sYXMgRiAuIFIgLiBBIC4gUHJhZG8=?= , Jonas Karlman , Allen Chen , Stephen Boyd , Rob Herring , Hsin-Yi Wang , Andy Shevchenko , Xin Ji , AngeloGioacchino Del Regno , Neil Armstrong , Thomas Zimmermann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Robert Foss , Daniel Scally , Prashant Malani Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Krzysztof, On Mon, Nov 28, 2022 at 5:02 AM Krzysztof Kozlowski wrote: > > On 24/11/2022 11:20, Pin-yen Lin wrote: > > 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 > > Hm, where is the definition of this type? For example it comes with > video-interfaces, which you did not reference here. > Actually I messed up here with another accepted patch: https://lore.kernel.org/all/20221103091243.96036-2-allen.chen@ite.com.tw/ This and the next new property have been added in that patch. > > + > > + max-pixel-clock-khz: > > There is no such unit accepted: > https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml > > > + maxItems: 1 > > maxItems of what type? What is this? > > > + description: restrict max pixel clock > > + > > + ports: > > + $ref: /schemas/graph.yaml#/properties/ports > > This is incompatible change... how do you handle now ABI break? > This is also added in another patch, and currently we don't have any upstream it6505 users now. > > + > > + properties: > > + port@0: > > + $ref: /schemas/graph.yaml#/$defs/port-base > > Why changing the ref? The `unevaluatedProperties: false` in `/schemas/graph.yaml#/properties/port` does not allow me to add new properties here. > > > + 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] > > Same problem as your previouspatch. > > > + > > + 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 { > > Node names should be generic. > https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > I'll fix this in v7. > > + 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>; > > Does not look like you tested the bindings. Please run `make > dt_binding_check` (see > Documentation/devicetree/bindings/writing-schema.rst for instructions). Sorry for not checking the documentation and testing the patches before submitting this. I'll fix the errors in v7. Best regards, Pin-yen > > Best regards, > Krzysztof >