From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oa1-f44.google.com (mail-oa1-f44.google.com [209.85.160.44]) (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 08A918BE0 for ; Thu, 6 Apr 2023 15:15:45 +0000 (UTC) Received: by mail-oa1-f44.google.com with SMTP id 586e51a60fabf-183f4efa98aso1605341fac.2 for ; Thu, 06 Apr 2023 08:15:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680794145; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=DaH4L1i/JuWu0RboKl6tYhjCF4zs4iv94Q8hNFPaJg4=; b=4NTdlwSJ8XrTd/DBySxiB7WfTlHFRBjlesVt8XB3L3oY9jfEHMMEGtugGM3GD+f0Ad RGftq4uqpBZ30Z4HVsMszQWvVaA+vyfRjFmCThsRe0BrnzPZDjnQRXkRBqjlov9KNJFI zPBlFWQ1Rgp2lsOqKAdIL7CAuCQDjpJFvuvt31ruJaexjDX0C/Kk4MBz8VZCJeYsnWDE mzfuuipE7ppDw3n59ToHbqNroly8KkrGXVLU/sSS0iL74Z6ESiUzs3HqmBN6nC2JP/qX eR+feMTzPJJGrWmqI55pV6hSmrPvV5L6sEb7hWz623slEbfxMVEEIzg0jtdVF1tlEJ3u 5lqg== X-Gm-Message-State: AAQBX9ejZCVJ+w4uyK3/QaWfZ/hTLc5LgdB5S1hZDH/OQ0Cst6+CldLs IHlDD7unOoeqW1COk3DPCg== X-Google-Smtp-Source: AKy350ab6kYansrJ3l5RjxAfs2sJ/EBZU6O1HI4iQMiG6ufcJX2X+MYT39U+pMtntzqTGpOBuRaX9Q== X-Received: by 2002:a05:6871:14d:b0:17a:f6df:7f21 with SMTP id z13-20020a056871014d00b0017af6df7f21mr5346178oab.2.1680794144957; Thu, 06 Apr 2023 08:15:44 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id f11-20020a9d7b4b000000b0069d602841e7sm755208oto.72.2023.04.06.08.15.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 08:15:44 -0700 (PDT) Received: (nullmailer pid 3114304 invoked by uid 1000); Thu, 06 Apr 2023 15:15:43 -0000 Date: Thu, 6 Apr 2023 10:15:43 -0500 From: Rob Herring To: Pin-yen Lin Cc: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Krzysztof Kozlowski , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J . Wysocki" , Prashant Malani , Benson Leung , Guenter Roeck , 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?B?TsOtY29sYXMgRiAuIFIgLiBBIC4gUHJhZG8=?= , Javier Martinez Canillas , linux-kernel@vger.kernel.org, Allen Chen Subject: Re: [PATCH v15 08/10] dt-bindings: display: bridge: it6505: Add mode-switch support Message-ID: <20230406151543.GA3098002-robh@kernel.org> References: <20230331091145.737305-1-treapking@chromium.org> <20230331091145.737305-9-treapking@chromium.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230331091145.737305-9-treapking@chromium.org> On Fri, Mar 31, 2023 at 05:11:43PM +0800, 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 > > --- > > (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 You don't need to list these 2. > + > data-lanes: > - minItems: 1 > - uniqueItems: true > - items: > - - enum: [ 0, 1 ] > - - const: 1 > - - const: 2 > - - const: 3 > + oneOf: > + - items: > + - enum: [0, 3] Only lane 1 wasn't valid? If so, mention that in the commit message. > + > + - items: > + - const: 0 > + - const: 1 > + > + - items: > + - const: 3 > + - const: 2 > + > + - items: > + - const: 0 > + - const: 1 > + - const: 2 > + - const: 3 Isn't this the default if 'data-lanes' is omitted. > + > + mode-switch: > + type: boolean > + description: Serves as Type-C mode switch if present. > + > + required: > + - reg > + - remote-endpoint required can be dropped. > > 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 { Why do we need a whole new example? Just extend the existing example with new properties/nodes. Rob 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 6B47AC76196 for ; Thu, 6 Apr 2023 15:15:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B132510E195; Thu, 6 Apr 2023 15:15:48 +0000 (UTC) Received: from mail-oa1-f45.google.com (mail-oa1-f45.google.com [209.85.160.45]) by gabe.freedesktop.org (Postfix) with ESMTPS id 10CA710E195 for ; Thu, 6 Apr 2023 15:15:45 +0000 (UTC) Received: by mail-oa1-f45.google.com with SMTP id 586e51a60fabf-17aeb49429eso42684501fac.6 for ; Thu, 06 Apr 2023 08:15:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680794145; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=DaH4L1i/JuWu0RboKl6tYhjCF4zs4iv94Q8hNFPaJg4=; b=RnayrLcPccDxqHsFysdXFKBXH5RJ74IRwuQp/c7HQ4giNm8KFt3OKE7Vxu700eDTA0 VxFXQnmNDGDAleHcSLldl6wTB2HoP6SF1yQqPmCFrzY3xWq83BpzG7q+Rc2QOr4/hEkO 9+QuNyIdc/HT2RFqlNW0Zymd0OCroD1RCdqhvQxabTz4xvEVQLsKrHFNWRXQvWHVQqUR UhE26AjY/ZcPSWkFJtS7F8uzvtbzUNbF9uXu1x9+IJcITF4sg/y7uL67LTh1MX+y3/TB Gm0pCNcJfDREMja2xGN3Ukxw0wC1NbWMAuux/FkEgabD5ueOvt04qfTpjiSxKXsFvvi1 0+Nw== X-Gm-Message-State: AAQBX9dD0rZhi+02764uqps33t2TrmHdoV0fIFV8c2spcyeTcSzV73UU 7RbXXj7TevK2tI+LADf//Q== X-Google-Smtp-Source: AKy350ab6kYansrJ3l5RjxAfs2sJ/EBZU6O1HI4iQMiG6ufcJX2X+MYT39U+pMtntzqTGpOBuRaX9Q== X-Received: by 2002:a05:6871:14d:b0:17a:f6df:7f21 with SMTP id z13-20020a056871014d00b0017af6df7f21mr5346178oab.2.1680794144957; Thu, 06 Apr 2023 08:15:44 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id f11-20020a9d7b4b000000b0069d602841e7sm755208oto.72.2023.04.06.08.15.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 08:15:44 -0700 (PDT) Received: (nullmailer pid 3114304 invoked by uid 1000); Thu, 06 Apr 2023 15:15:43 -0000 Date: Thu, 6 Apr 2023 10:15:43 -0500 From: Rob Herring To: Pin-yen Lin Subject: Re: [PATCH v15 08/10] dt-bindings: display: bridge: it6505: Add mode-switch support Message-ID: <20230406151543.GA3098002-robh@kernel.org> References: <20230331091145.737305-1-treapking@chromium.org> <20230331091145.737305-9-treapking@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230331091145.737305-9-treapking@chromium.org> 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, Robert Foss , 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 , Hsin-Yi Wang , Andy Shevchenko , Xin Ji , AngeloGioacchino Del Regno , Neil Armstrong , Thomas Zimmermann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Daniel Scally , Prashant Malani Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, Mar 31, 2023 at 05:11:43PM +0800, 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 > > --- > > (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 You don't need to list these 2. > + > data-lanes: > - minItems: 1 > - uniqueItems: true > - items: > - - enum: [ 0, 1 ] > - - const: 1 > - - const: 2 > - - const: 3 > + oneOf: > + - items: > + - enum: [0, 3] Only lane 1 wasn't valid? If so, mention that in the commit message. > + > + - items: > + - const: 0 > + - const: 1 > + > + - items: > + - const: 3 > + - const: 2 > + > + - items: > + - const: 0 > + - const: 1 > + - const: 2 > + - const: 3 Isn't this the default if 'data-lanes' is omitted. > + > + mode-switch: > + type: boolean > + description: Serves as Type-C mode switch if present. > + > + required: > + - reg > + - remote-endpoint required can be dropped. > > 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 { Why do we need a whole new example? Just extend the existing example with new properties/nodes. Rob