From patchwork Sat Dec 2 07:54:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 749565 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=atomide.com header.i=@atomide.com header.b="YbxoMelj" Received: from mail5.25mail.st (mail5.25mail.st [74.50.62.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFF1C116 for ; Fri, 1 Dec 2023 23:57:19 -0800 (PST) Received: from localhost (91-158-86-216.elisa-laajakaista.fi [91.158.86.216]) by mail5.25mail.st (Postfix) with ESMTPSA id EBB176049B; Sat, 2 Dec 2023 07:56:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=atomide.com; s=25mailst; t=1701503839; bh=HWs1Jb+EiXvhQNMp0z9SgweFLx0LNj+D/nipqQhZAMM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YbxoMeljA7L0qrMnf61jyzqqMeU1RU8ZxpxkEocWsmKy98DtzTWYRE9Ihngn5DCc0 HmnPZlTJrux6wYLxVacZCRtnuk2FVMGK43TMrOfzfPsy1gK3R4vhE6p/SnF1XyLHij KJdpgU+QOS5WkPRBxd+U0+gTT46gEPTImAT4kh6NYOXpw1sBMTmjrRIue6qQL5TZHC 24qPp8D8uHn5DT3QbH9qWzlNtETRynG7WJTU8A4DQw7uK38/ST7Mtc6eWpe+mqrln6 Wk/Btmmdd+vON3MFfk74JWXkJuA0IDP1yyKKOIR4yDAs3AWcpgQYDQKzDItro77Lp4 /p7OD9mNwERCA== From: Tony Lindgren To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Simha BN , Sam Ravnborg Cc: Carl Philipp Klemm , Ivaylo Dimitrov , Merlijn Wajer , Pavel Machek , Sebastian Reichel , Michael Walle , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v2 01/10] dt-bindings: display: bridge: tc358775: make stby gpio and vdd supplies optional Date: Sat, 2 Dec 2023 09:54:40 +0200 Message-ID: <20231202075514.44474-2-tony@atomide.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231202075514.44474-1-tony@atomide.com> References: <20231202075514.44474-1-tony@atomide.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Michael Walle For a normal operation, the vdd supplies nor the stby GPIO is needed. There are boards, where these voltages are statically enabled during board power-up. The reset pin is required because once the PPI (PHY protocol interface) is started, it can only be stopped by asserting the reset pin. Signed-off-by: Michael Walle Signed-off-by: Tony Lindgren --- .../devicetree/bindings/display/bridge/toshiba,tc358775.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358775.yaml b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358775.yaml --- a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358775.yaml +++ b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358775.yaml @@ -68,9 +68,6 @@ properties: required: - compatible - reg - - vdd-supply - - vddio-supply - - stby-gpios - reset-gpios - ports From patchwork Sat Dec 2 07:54:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 750217 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=atomide.com header.i=@atomide.com header.b="FfrmXavK" Received: from mail5.25mail.st (mail5.25mail.st [74.50.62.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04372116 for ; Fri, 1 Dec 2023 23:58:10 -0800 (PST) Received: from localhost (91-158-86-216.elisa-laajakaista.fi [91.158.86.216]) by mail5.25mail.st (Postfix) with ESMTPSA id 31C0D60406; Sat, 2 Dec 2023 07:57:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=atomide.com; s=25mailst; t=1701503890; bh=pYZDqv60J0kWtQmrHNDGXYKDdbKD0ihTl1dkeCNc3YY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FfrmXavKTVtsrOQZGM6nHFamXh1BERMhcSsO/Dk31xYwoubD37esSl9aizRlyp6rT AEbSxWZDipGJmS6OxfVuLNE9SzceegNG9p3V37z5F1IBo/PPSjwE72e+hmF6TmlfZn Selk/G7p0kWGUrEEZPJHtxmtw0UPYTX6tFG+S1I4J/YG/DGZAptajBbg+zLDFEwqsL kmwWNOTiMxgTkSfPIh9OuQiT8QnJzaJx6VDv6oINnr66yzoxXKFr1qPY4As+XHjc2e qGhsbLuyYwrMao4RozTQ8BnlcENMNopECg9bKAUkXvhD0BcQjCpyvOVvHC9X6SBFPS 9proOG5au1oxg== From: Tony Lindgren To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Simha BN , Sam Ravnborg Cc: Carl Philipp Klemm , Ivaylo Dimitrov , Merlijn Wajer , Pavel Machek , Sebastian Reichel , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v2 02/10] dt-bindings: display: bridge: tc358775: Add data-lanes Date: Sat, 2 Dec 2023 09:54:41 +0200 Message-ID: <20231202075514.44474-3-tony@atomide.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231202075514.44474-1-tony@atomide.com> References: <20231202075514.44474-1-tony@atomide.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The device uses a clock lane, and 1 to 4 DSI data lanes. Let's add the data-lanes property starting at 1 similar to what the other bridge bindings are doing. Let's also drop the data-lanes properties in the example for the DSI host controller to avoid confusion. The configuration of the DSI host depends on the controller used and is unrelated to the bridge binding. Signed-off-by: Tony Lindgren --- .../display/bridge/toshiba,tc358775.yaml | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358775.yaml b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358775.yaml --- a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358775.yaml +++ b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358775.yaml @@ -46,11 +46,26 @@ properties: properties: port@0: - $ref: /schemas/graph.yaml#/properties/port + $ref: /schemas/graph.yaml#/$defs/port-base description: | DSI Input. The remote endpoint phandle should be a reference to a valid mipi_dsi_host device node. + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + properties: + data-lanes: + description: array of physical DSI data lane indexes. + minItems: 1 + items: + - const: 1 + - const: 2 + - const: 3 + - const: 4 + port@1: $ref: /schemas/graph.yaml#/properties/port description: | @@ -105,6 +120,7 @@ examples: reg = <0>; d2l_in_test: endpoint { remote-endpoint = <&dsi0_out>; + data-lanes = <1 2 3 4>; }; }; @@ -129,7 +145,6 @@ examples: reg = <1>; dsi0_out: endpoint { remote-endpoint = <&d2l_in_test>; - data-lanes = <0 1 2 3>; }; }; }; @@ -164,6 +179,7 @@ examples: reg = <0>; d2l_in_dual: endpoint { remote-endpoint = <&dsi0_out_dual>; + data-lanes = <1 2 3 4>; }; }; @@ -195,7 +211,6 @@ examples: reg = <1>; dsi0_out_dual: endpoint { remote-endpoint = <&d2l_in_dual>; - data-lanes = <0 1 2 3>; }; }; }; From patchwork Sat Dec 2 07:54:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 749564 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=atomide.com header.i=@atomide.com header.b="ipxoBr9s" Received: from mail5.25mail.st (mail5.25mail.st [74.50.62.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4787F3 for ; Fri, 1 Dec 2023 23:59:02 -0800 (PST) Received: from localhost (91-158-86-216.elisa-laajakaista.fi [91.158.86.216]) by mail5.25mail.st (Postfix) with ESMTPSA id 81C4A6049B; Sat, 2 Dec 2023 07:58:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=atomide.com; s=25mailst; t=1701503942; bh=rEXaXAhXwZV+HLFAqao2ZWgjh9PzKE9IueUq6diAur0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ipxoBr9szrJ1580a2P3vmS0f97vS35GSvUBZHRs+JEYxbGxMbnebyOIyvr/W25FoB L9vCzk0l3vEK06ZC+cHJKew8mWwYNbek5xET5+SBRzkc1ScZVa/E2eWMbZFpoPhsWT 6vAKTDq4ItTCdKmrQGooQ3JUt/2aYaUoj32mztJEgOdmIzyo4NMu1GoTmHLNZv2uaj Rx43+YYslSXfsjHlwgjMk0MQiTy814Vx1EJ0wkpqJoHsCzuqqDmFnhxk4/pBaEV5or 0s+KF9hhhULaE0jLGwNp9KeQPuSdFCwMcMgTGZtyZ7ZdNskhedXt5f40f5MN6k4+vx Frqu1DnfdeiTA== From: Tony Lindgren To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Simha BN , Sam Ravnborg Cc: Carl Philipp Klemm , Ivaylo Dimitrov , Merlijn Wajer , Pavel Machek , Sebastian Reichel , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v2 03/10] dt-bindings: display: bridge: tc358775: Add support for tc358765 Date: Sat, 2 Dec 2023 09:54:42 +0200 Message-ID: <20231202075514.44474-4-tony@atomide.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231202075514.44474-1-tony@atomide.com> References: <20231202075514.44474-1-tony@atomide.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The tc358765 is similar to tc358775 except for the stdby-gpios. Signed-off-by: Tony Lindgren --- .../bindings/display/bridge/toshiba,tc358775.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358775.yaml b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358775.yaml --- a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358775.yaml +++ b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358775.yaml @@ -10,7 +10,7 @@ maintainers: - Vinay Simha BN description: | - This binding supports DSI to LVDS bridge TC358775 + This binding supports DSI to LVDS bridges TC358765 and TC358775 MIPI DSI-RX Data 4-lane, CLK 1-lane with data rates up to 800 Mbps/lane. Video frame size: @@ -21,7 +21,9 @@ description: | properties: compatible: - const: toshiba,tc358775 + enum: + - toshiba,tc358765 + - toshiba,tc358775 reg: maxItems: 1 From patchwork Sat Dec 2 07:54:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 750216 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=atomide.com header.i=@atomide.com header.b="GSS6y3aG" Received: from mail5.25mail.st (mail5.25mail.st [74.50.62.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 070A6F3 for ; Fri, 1 Dec 2023 23:59:56 -0800 (PST) Received: from localhost (91-158-86-216.elisa-laajakaista.fi [91.158.86.216]) by mail5.25mail.st (Postfix) with ESMTPSA id 245B960406; Sat, 2 Dec 2023 07:59:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=atomide.com; s=25mailst; t=1701503995; bh=uzjo2RffcTjEgLjSPgLgkOnLraYa1xWcykd73MjR6DU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GSS6y3aG5Nmd3CTW/8w94etvMkWFx7rd5+Kef+EKIjmDx5WUYXBIiU5z/P8jo6W1o 2ZSBxiytYlxr1suGV2p7yooFiXrHNVQt1bSYFBbgRvMkrlBmn6/EjHBziod6Sgtiox T8/3EL/WK3Tz6PRlQTCBf+tF7qlJVqjWtg/ZtreAzENtS+zob7oFuZHw6IVgV7Ds0z Mz4yBb4dv98+6hxxwKxucovKCMeIrMugto0mvmYF0kKvPYJm+x/CFrOtyBOe4MiAUB u8U4W8/nEI/JhPiJXMM6qTPWqEtyF38hLd6BeoUA9lDJHKnSWQM9y1WPXxNdAcplCT BehrAj8uo8Org== From: Tony Lindgren To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Simha BN , Sam Ravnborg Cc: Carl Philipp Klemm , Ivaylo Dimitrov , Merlijn Wajer , Pavel Machek , Sebastian Reichel , Michael Walle , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v2 04/10] drm/bridge: tc358775: fix support for jeida-18 and jeida-24 Date: Sat, 2 Dec 2023 09:54:43 +0200 Message-ID: <20231202075514.44474-5-tony@atomide.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231202075514.44474-1-tony@atomide.com> References: <20231202075514.44474-1-tony@atomide.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Michael Walle The bridge always uses 24bpp internally. Therefore, for jeida-18 mapping we need to discard the lowest two bits for each channel and thus starting with LV_[RGB]2. jeida-24 has the same mapping but uses four lanes instead of three, with the forth pair transmitting the lowest two bits of each channel. Thus, the mapping between jeida-18 and jeida-24 is actually the same, except that one channel is turned off (by selecting the RGB666 format in VPCTRL). While at it, remove the bogus comment about the hardware default because the default is overwritten in any case. Tested with a jeida-18 display (Evervision VGG644804). Fixes: b26975593b17 ("display/drm/bridge: TC358775 DSI/LVDS driver") Signed-off-by: Michael Walle Signed-off-by: Tony Lindgren --- drivers/gpu/drm/bridge/tc358775.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358775.c b/drivers/gpu/drm/bridge/tc358775.c --- a/drivers/gpu/drm/bridge/tc358775.c +++ b/drivers/gpu/drm/bridge/tc358775.c @@ -454,10 +454,6 @@ static void tc_bridge_enable(struct drm_bridge *bridge) dev_dbg(tc->dev, "bus_formats %04x bpc %d\n", connector->display_info.bus_formats[0], tc->bpc); - /* - * Default hardware register settings of tc358775 configured - * with MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA jeida-24 format - */ if (connector->display_info.bus_formats[0] == MEDIA_BUS_FMT_RGB888_1X7X4_SPWG) { /* VESA-24 */ @@ -468,14 +464,15 @@ static void tc_bridge_enable(struct drm_bridge *bridge) d2l_write(tc->i2c, LV_MX1619, LV_MX(LVI_B6, LVI_B7, LVI_B1, LVI_B2)); d2l_write(tc->i2c, LV_MX2023, LV_MX(LVI_B3, LVI_B4, LVI_B5, LVI_L0)); d2l_write(tc->i2c, LV_MX2427, LV_MX(LVI_HS, LVI_VS, LVI_DE, LVI_R6)); - } else { /* MEDIA_BUS_FMT_RGB666_1X7X3_SPWG - JEIDA-18 */ - d2l_write(tc->i2c, LV_MX0003, LV_MX(LVI_R0, LVI_R1, LVI_R2, LVI_R3)); - d2l_write(tc->i2c, LV_MX0407, LV_MX(LVI_R4, LVI_L0, LVI_R5, LVI_G0)); - d2l_write(tc->i2c, LV_MX0811, LV_MX(LVI_G1, LVI_G2, LVI_L0, LVI_L0)); - d2l_write(tc->i2c, LV_MX1215, LV_MX(LVI_G3, LVI_G4, LVI_G5, LVI_B0)); - d2l_write(tc->i2c, LV_MX1619, LV_MX(LVI_L0, LVI_L0, LVI_B1, LVI_B2)); - d2l_write(tc->i2c, LV_MX2023, LV_MX(LVI_B3, LVI_B4, LVI_B5, LVI_L0)); - d2l_write(tc->i2c, LV_MX2427, LV_MX(LVI_HS, LVI_VS, LVI_DE, LVI_L0)); + } else { + /* JEIDA-18 and JEIDA-24 */ + d2l_write(tc->i2c, LV_MX0003, LV_MX(LVI_R2, LVI_R3, LVI_R4, LVI_R5)); + d2l_write(tc->i2c, LV_MX0407, LV_MX(LVI_R6, LVI_R1, LVI_R7, LVI_G2)); + d2l_write(tc->i2c, LV_MX0811, LV_MX(LVI_G3, LVI_G4, LVI_G0, LVI_G1)); + d2l_write(tc->i2c, LV_MX1215, LV_MX(LVI_G5, LVI_G6, LVI_G7, LVI_B2)); + d2l_write(tc->i2c, LV_MX1619, LV_MX(LVI_B0, LVI_B1, LVI_B3, LVI_B4)); + d2l_write(tc->i2c, LV_MX2023, LV_MX(LVI_B5, LVI_B6, LVI_B7, LVI_L0)); + d2l_write(tc->i2c, LV_MX2427, LV_MX(LVI_HS, LVI_VS, LVI_DE, LVI_R0)); } d2l_write(tc->i2c, VFUEN, VFUEN_EN); From patchwork Sat Dec 2 07:54:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 749563 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=atomide.com header.i=@atomide.com header.b="RZRHctGP" Received: from mail5.25mail.st (mail5.25mail.st [74.50.62.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BEABF3 for ; Sat, 2 Dec 2023 00:00:49 -0800 (PST) Received: from localhost (91-158-86-216.elisa-laajakaista.fi [91.158.86.216]) by mail5.25mail.st (Postfix) with ESMTPSA id 694A660406; Sat, 2 Dec 2023 07:59:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=atomide.com; s=25mailst; t=1701504048; bh=gfNY2ft9C7j+wyb5biC9lBAtvg1/clPo7kd6qvdc/T0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RZRHctGPNMRiHvQ75yXgnfok/PcHBjEknCpa+5eAOmv/PjFP7Z6ADxo/QLQn/Ir5I V7YAJ62dNOjGOfHmgqGXEqog8/uJAQvd4nPKbYfHv8XuJKicZNvX0bcwQt+CrS7ogg gkjNgVqI2KPjt6XuXQxSEHTK6PqM4VNWgtKebjA14hAYz0GTQjkT+O1Hrxdewe9l7t U2jcY7245M0j7aEwShrFXEa1AHugy25U/kUt+/5MM6tLU2agdWqLhR6nmIaDWM3glW W4Ok19V5ikpon3qo2Ym1Liw5TPZHPR5wjEuoZTrS3VQUUTszIukFtVtmzXb8rgGHHk DPu0UW1N2eH5w== From: Tony Lindgren To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Simha BN , Sam Ravnborg Cc: Carl Philipp Klemm , Ivaylo Dimitrov , Merlijn Wajer , Pavel Machek , Sebastian Reichel , Michael Walle , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v2 05/10] drm/bridge: tc358775: make standby GPIO optional Date: Sat, 2 Dec 2023 09:54:44 +0200 Message-ID: <20231202075514.44474-6-tony@atomide.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231202075514.44474-1-tony@atomide.com> References: <20231202075514.44474-1-tony@atomide.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Michael Walle The stby pin is optional. It is only needed for power-up and down sequencing. It is not needed, if the power rails cannot by dynamically enabled. Because the GPIO is not optional, remove the error message. Signed-off-by: Michael Walle Signed-off-by: Tony Lindgren Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/bridge/tc358775.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358775.c b/drivers/gpu/drm/bridge/tc358775.c --- a/drivers/gpu/drm/bridge/tc358775.c +++ b/drivers/gpu/drm/bridge/tc358775.c @@ -669,12 +669,9 @@ static int tc_probe(struct i2c_client *client) return ret; } - tc->stby_gpio = devm_gpiod_get(dev, "stby", GPIOD_OUT_HIGH); - if (IS_ERR(tc->stby_gpio)) { - ret = PTR_ERR(tc->stby_gpio); - dev_err(dev, "cannot get stby-gpio %d\n", ret); - return ret; - } + tc->stby_gpio = devm_gpiod_get_optional(dev, "stby", GPIOD_OUT_HIGH); + if (IS_ERR(tc->stby_gpio)) + return PTR_ERR(tc->stby_gpio); tc->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(tc->reset_gpio)) { From patchwork Sat Dec 2 07:54:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 750215 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=atomide.com header.i=@atomide.com header.b="ccYfKS5Q" Received: from mail5.25mail.st (mail5.25mail.st [74.50.62.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F78EF3 for ; Sat, 2 Dec 2023 00:01:52 -0800 (PST) Received: from localhost (91-158-86-216.elisa-laajakaista.fi [91.158.86.216]) by mail5.25mail.st (Postfix) with ESMTPSA id CBDC26049B; Sat, 2 Dec 2023 08:00:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=atomide.com; s=25mailst; t=1701504111; bh=UnEeMpuqNGMIxtPB+snGTp0U20oNxmhtzN8lnS3gXxA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ccYfKS5QpAwx1xQNGrAOSh/CDp9WChuVNlmfdbOtCoaDs2Rp+grj3KPJKs8NcWz3j Bv9eQUqo+Fjb+81uFavZIDt4bWaFziHcrgFA+L8Ffaq07Wgyl0BArZnwzTg1oL4CPm UfFHIS1vao4n7Bv02fYblVyKi+DMaSTYOv0KL8fVvCyHRSxLKIcZtlssoHRQjRXtHZ 7Q/DNx8yenvP6Y9/RHjO6P1YvhKxMM1Fcadbeq5nVkGilnqwJ9oVxP28o6eiPNO+UT qMA7sIZ496F34PYF6LuUKdh+ay9hVmAtQ+yI/sn+bkloL8SBjwnKZ6yOc1hbtBbcrs 7V7kXFgN5ut0g== From: Tony Lindgren To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Simha BN , Sam Ravnborg Cc: Carl Philipp Klemm , Ivaylo Dimitrov , Merlijn Wajer , Pavel Machek , Sebastian Reichel , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v2 06/10] drm/bridge: tc358775: Get bridge data lanes instead of the DSI host lanes Date: Sat, 2 Dec 2023 09:54:45 +0200 Message-ID: <20231202075514.44474-7-tony@atomide.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231202075514.44474-1-tony@atomide.com> References: <20231202075514.44474-1-tony@atomide.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The current code assumes the data-lanes property is configured on the DSI host side instead of the bridge side, and assumes DSI host endpoint 1. Let's standardize on what the other bridge drivers are doing and parse the data-lanes property for the bridge. Only if data-lanes property is not found, let's be nice and also check the DSI host for old dtb in use and warn. Signed-off-by: Tony Lindgren Reviewed-by: Michael Walle --- drivers/gpu/drm/bridge/tc358775.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358775.c b/drivers/gpu/drm/bridge/tc358775.c --- a/drivers/gpu/drm/bridge/tc358775.c +++ b/drivers/gpu/drm/bridge/tc358775.c @@ -525,27 +525,24 @@ tc_mode_valid(struct drm_bridge *bridge, static int tc358775_parse_dt(struct device_node *np, struct tc_data *tc) { struct device_node *endpoint; - struct device_node *parent; struct device_node *remote; int dsi_lanes = -1; - /* - * To get the data-lanes of dsi, we need to access the dsi0_out of port1 - * of dsi0 endpoint from bridge port0 of d2l_in - */ endpoint = of_graph_get_endpoint_by_regs(tc->dev->of_node, TC358775_DSI_IN, -1); - if (endpoint) { - /* dsi0_out node */ - parent = of_graph_get_remote_port_parent(endpoint); - of_node_put(endpoint); - if (parent) { - /* dsi0 port 1 */ - dsi_lanes = drm_of_get_data_lanes_count_ep(parent, 1, -1, 1, 4); - of_node_put(parent); - } + dsi_lanes = drm_of_get_data_lanes_count(endpoint, 1, 4); + + /* Quirk old dtb: Use data lanes from the DSI host side instead of bridge */ + if (dsi_lanes == -EINVAL || dsi_lanes == -ENODEV) { + remote = of_graph_get_remote_endpoint(endpoint); + dsi_lanes = drm_of_get_data_lanes_count(remote, 1, 4); + of_node_put(remote); + if (dsi_lanes >= 1) + dev_warn(tc->dev, "missing dsi-lanes property for the bridge\n"); } + of_node_put(endpoint); + if (dsi_lanes < 0) return dsi_lanes; From patchwork Sat Dec 2 07:54:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 749562 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=atomide.com header.i=@atomide.com header.b="S2iY1w9h" Received: from mail5.25mail.st (mail5.25mail.st [74.50.62.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E3FF134 for ; Sat, 2 Dec 2023 00:02:43 -0800 (PST) Received: from localhost (91-158-86-216.elisa-laajakaista.fi [91.158.86.216]) by mail5.25mail.st (Postfix) with ESMTPSA id A1C5860406; Sat, 2 Dec 2023 08:01:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=atomide.com; s=25mailst; t=1701504163; bh=XX98Cqt5NzbeNpKXwhQvSO72W3DmrA1+cXFaVWu20AI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S2iY1w9hQzsJd6tsprr6wAbF7NSTBwi9g4G5xWnC5Nht4jWdrjnuDmjFAkg8y3GbT omPnGkj0dZlvuTjaI+HaCbIFiP+PkEZoO8QTgRmsFMJOxj2uSDiAZzBAOZuW5W2LV3 FqPUafnNfYPiSgMlBXyse73WO91TF2XBgyBhd13bvfO9TljQoln+xNlbXMrnklOnSZ GLWyHnHxZGLS/zfbFP1LsS8kgo17btlbH7hDZs8SN9N3Ez3FwhPvIkrmF2jPHYJudz 5GdbCRYPxvNFYYEkmcAgPDdm2nEhkDDZFgLwwwIY+BtOGkJ1o/54+76WY/vz2B/A/x P8fnjymCeFKkQ== From: Tony Lindgren To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Simha BN , Sam Ravnborg Cc: Carl Philipp Klemm , Ivaylo Dimitrov , Merlijn Wajer , Pavel Machek , Sebastian Reichel , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v2 07/10] drm/bridge: tc358775: Add burst and low-power modes Date: Sat, 2 Dec 2023 09:54:46 +0200 Message-ID: <20231202075514.44474-8-tony@atomide.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231202075514.44474-1-tony@atomide.com> References: <20231202075514.44474-1-tony@atomide.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Burst and low-power modes are supported both for tc358765 and tc358775. Signed-off-by: Tony Lindgren Reviewed-by: Michael Walle Tested-by: Michael Walle --- drivers/gpu/drm/bridge/tc358775.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/tc358775.c b/drivers/gpu/drm/bridge/tc358775.c --- a/drivers/gpu/drm/bridge/tc358775.c +++ b/drivers/gpu/drm/bridge/tc358775.c @@ -619,7 +619,8 @@ static int tc_attach_host(struct tc_data *tc) dsi->lanes = tc->num_dsi_lanes; dsi->format = MIPI_DSI_FMT_RGB888; - dsi->mode_flags = MIPI_DSI_MODE_VIDEO; + dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | + MIPI_DSI_MODE_LPM; ret = devm_mipi_dsi_attach(dev, dsi); if (ret < 0) { From patchwork Sat Dec 2 07:54:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 750214 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=atomide.com header.i=@atomide.com header.b="eKktrYYU" Received: from mail5.25mail.st (mail5.25mail.st [74.50.62.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01156129 for ; Sat, 2 Dec 2023 00:03:34 -0800 (PST) Received: from localhost (91-158-86-216.elisa-laajakaista.fi [91.158.86.216]) by mail5.25mail.st (Postfix) with ESMTPSA id 082016049B; Sat, 2 Dec 2023 08:02:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=atomide.com; s=25mailst; t=1701504214; bh=APkUpUjdG6p2BEFI0aefXVu4L/0Kmz7mGVrA3hsZlwg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eKktrYYUsJXcuVe4F9Du17ZZLWmMXcEksUnVV5+Q2DZJ+SLdDAtRzdkRe/UlM/AEG SomfsvhEhIJkHcUjsgVfgAdkhXHFk9aszV+2zdSs3SrcXztaq/QT0xPKS+uV+w1b+6 3mzGsB+TiWIQsHhfPK/pZ/+ocJR1uvF+hcBiVHsTmPYHKDBgsd8wwWbIp+sS/5AJt+ s2RNmjv7RmsBF4w/e6YRCWbUcZsbuRYdcVMWtWmLinzhMto6XMIc9GBRK9xdyU4BKN UMX38B3LbjLlOwDq39zJcXEZoUo7GnBjyI7r7kmh4tjRF0HJ0xxhauWxOnMk+KZA+S 67uoKbjLOIC3w== From: Tony Lindgren To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Simha BN , Sam Ravnborg Cc: Carl Philipp Klemm , Ivaylo Dimitrov , Merlijn Wajer , Pavel Machek , Sebastian Reichel , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v2 08/10] drm/bridge: tc358775: Enable pre_enable_prev_first flag Date: Sat, 2 Dec 2023 09:54:47 +0200 Message-ID: <20231202075514.44474-9-tony@atomide.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231202075514.44474-1-tony@atomide.com> References: <20231202075514.44474-1-tony@atomide.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Set pre_enable_prev_first to ensure the previous bridge is enabled first. Signed-off-by: Tony Lindgren Reviewed-by: Michael Walle Tested-by: Michael Walle --- drivers/gpu/drm/bridge/tc358775.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/bridge/tc358775.c b/drivers/gpu/drm/bridge/tc358775.c --- a/drivers/gpu/drm/bridge/tc358775.c +++ b/drivers/gpu/drm/bridge/tc358775.c @@ -680,6 +680,7 @@ static int tc_probe(struct i2c_client *client) tc->bridge.funcs = &tc_bridge_funcs; tc->bridge.of_node = dev->of_node; + tc->bridge.pre_enable_prev_first = true; drm_bridge_add(&tc->bridge); i2c_set_clientdata(client, tc); From patchwork Sat Dec 2 07:54:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 749561 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=atomide.com header.i=@atomide.com header.b="UojeGNFb" Received: from mail5.25mail.st (mail5.25mail.st [74.50.62.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41CF6194 for ; Sat, 2 Dec 2023 00:04:26 -0800 (PST) Received: from localhost (91-158-86-216.elisa-laajakaista.fi [91.158.86.216]) by mail5.25mail.st (Postfix) with ESMTPSA id 6376260406; Sat, 2 Dec 2023 08:03:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=atomide.com; s=25mailst; t=1701504265; bh=i5hlFOUrpipsKtqPCP9/VPweATC36VuKIXOSxW9v2SU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UojeGNFbTAsiDIuJzBBUldx5ei8dPsxKU9ILNfIOVlTRSa04vwswLq2nBw272uT8r N7U0yKFzOrNhkwqB89/Hjz57Owff2TRNomWSyWxU11f2sg1EwdVwO0cT7xd2GadUeD ACneEOM96ilEKdgBu3PRFkbHuLc8Yc3IZrwCXLwofLfng/Ljp/LjrPp9Mpy6wASiJD yYfZVlf52tQRLN9tjtdYaqktFfTcUR27amo7Pmk31In2vHS5XWEXTHqmziRIZIGwHi yALV/+a5BHTo+SJPhrqHM2I9RObP6cNWe6zW/pJIDKQ1p2lGAzh4I+3UwtBnBLOc3h GjwUO8JXQIgVA== From: Tony Lindgren To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Simha BN , Sam Ravnborg Cc: Carl Philipp Klemm , Ivaylo Dimitrov , Merlijn Wajer , Pavel Machek , Sebastian Reichel , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v2 09/10] drm/bridge: tc358775: Add support for tc358765 Date: Sat, 2 Dec 2023 09:54:48 +0200 Message-ID: <20231202075514.44474-10-tony@atomide.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231202075514.44474-1-tony@atomide.com> References: <20231202075514.44474-1-tony@atomide.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The tc358775 bridge is pin compatible with earlier tc358765 according to the tc358774xbg_datasheet_en_20190118.pdf documentation. Compared to the tc358765, the tc358775 supports a STBY GPIO and higher data rates. The tc358765 has a register bit for video event mode vs video pulse mode. We must set it to video event mode for the LCD output to work, and on the tc358775, this bit no longer exists. Looks like the registers seem to match otherwise based on a quick glance comparing the defines to the earlier Android kernel tc358765 driver. Signed-off-by: Tony Lindgren Reviewed-by: Michael Walle --- drivers/gpu/drm/bridge/tc358775.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358775.c b/drivers/gpu/drm/bridge/tc358775.c --- a/drivers/gpu/drm/bridge/tc358775.c +++ b/drivers/gpu/drm/bridge/tc358775.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -107,6 +108,7 @@ #define RDPKTLN 0x0404 /* Command Read Packet Length */ #define VPCTRL 0x0450 /* Video Path Control */ +#define EVTMODE BIT(5) /* Video event mode enable, tc35876x only */ #define HTIM1 0x0454 /* Horizontal Timing Control 1 */ #define HTIM2 0x0458 /* Horizontal Timing Control 2 */ #define VTIM1 0x045C /* Vertical Timing Control 1 */ @@ -254,6 +256,11 @@ enum tc358775_ports { TC358775_LVDS_OUT1, }; +enum tc3587x5_type { + TC358765, + TC358775, +}; + struct tc_data { struct i2c_client *i2c; struct device *dev; @@ -271,6 +278,8 @@ struct tc_data { struct gpio_desc *stby_gpio; u8 lvds_link; /* single-link or dual-link */ u8 bpc; + + enum tc3587x5_type type; }; static inline struct tc_data *bridge_to_tc(struct drm_bridge *b) @@ -424,10 +433,16 @@ static void tc_bridge_enable(struct drm_bridge *bridge) d2l_write(tc->i2c, PPI_STARTPPI, PPI_START_FUNCTION); d2l_write(tc->i2c, DSI_STARTDSI, DSI_RX_START); + /* Video event mode vs pulse mode bit, does not exist for tc358775 */ + if (tc->type == TC358765) + val = EVTMODE; + else + val = 0; + if (tc->bpc == 8) - val = TC358775_VPCTRL_OPXLFMT(1); + val |= TC358775_VPCTRL_OPXLFMT(1); else /* bpc = 6; */ - val = TC358775_VPCTRL_MSF(1); + val |= TC358775_VPCTRL_MSF(1); dsiclk = mode->crtc_clock * 3 * tc->bpc / tc->num_dsi_lanes / 1000; clkdiv = dsiclk / (tc->lvds_link == DUAL_LINK ? DIVIDE_BY_6 : DIVIDE_BY_3); @@ -643,6 +658,7 @@ static int tc_probe(struct i2c_client *client) tc->dev = dev; tc->i2c = client; + tc->type = (enum tc3587x5_type)of_device_get_match_data(dev); tc->panel_bridge = devm_drm_of_get_bridge(dev, dev->of_node, TC358775_LVDS_OUT0, 0); @@ -704,13 +720,15 @@ static void tc_remove(struct i2c_client *client) } static const struct i2c_device_id tc358775_i2c_ids[] = { - { "tc358775", 0 }, + { "tc358765", TC358765, }, + { "tc358775", TC358775, }, { } }; MODULE_DEVICE_TABLE(i2c, tc358775_i2c_ids); static const struct of_device_id tc358775_of_ids[] = { - { .compatible = "toshiba,tc358775", }, + { .compatible = "toshiba,tc358765", .data = (void *)TC358765, }, + { .compatible = "toshiba,tc358775", .data = (void *)TC358775, }, { } }; MODULE_DEVICE_TABLE(of, tc358775_of_ids); From patchwork Sat Dec 2 07:54:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 750213 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=atomide.com header.i=@atomide.com header.b="aRisSfgn" Received: from mail5.25mail.st (mail5.25mail.st [74.50.62.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 735A5133 for ; Sat, 2 Dec 2023 00:05:17 -0800 (PST) Received: from localhost (91-158-86-216.elisa-laajakaista.fi [91.158.86.216]) by mail5.25mail.st (Postfix) with ESMTPSA id A56CF60406; Sat, 2 Dec 2023 08:04:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=atomide.com; s=25mailst; t=1701504317; bh=FTgDD2uIRgD8cARl+De2ZS7uFevrbIvFUr7xCEF/4dE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aRisSfgnuG6B1o2tqnryQaDgeaGPk67LTYuiWM9bmX2NIMFwesVGqm6WJBoVMclGO uCxmPCVBWwR3gdl1sxgxh8SeNpJzqEnfAMdLNPtgnlV9s4HGiqoxhkowPMOeAdd0q3 ud2UtxC6WY/ut/2NU0LKJiDQFJI/TC+FPWH/pLiFHLk52meRmiEDhlY9oxr1+KN158 Nu9Hwruvs09PEbxSpPwk3kvcx6O+bMB4GkqeExao+nepxoFtzwdy2BLLI4gCZV3aSk GGECtyWlsmZfX3i7ftCYk8v2m4/zrSYbUHOI7CJWQMIXRf0cxRIARhSbzh8vaRlxZb pXY3ACFEm03zw== From: Tony Lindgren To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Simha BN , Sam Ravnborg Cc: Carl Philipp Klemm , Ivaylo Dimitrov , Merlijn Wajer , Pavel Machek , Sebastian Reichel , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v2 10/10] drm/bridge: tc358775: Configure hs_rate and lp_rate Date: Sat, 2 Dec 2023 09:54:49 +0200 Message-ID: <20231202075514.44474-11-tony@atomide.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231202075514.44474-1-tony@atomide.com> References: <20231202075514.44474-1-tony@atomide.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The hs_rate and lp_rate may be used by the dsi host for timing calculations. The tc358775 has a maximum bit rate of 1 Gbps/lane, tc358765 has maximurate of 800 Mbps per lane. Signed-off-by: Tony Lindgren --- drivers/gpu/drm/bridge/tc358775.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/bridge/tc358775.c b/drivers/gpu/drm/bridge/tc358775.c --- a/drivers/gpu/drm/bridge/tc358775.c +++ b/drivers/gpu/drm/bridge/tc358775.c @@ -636,6 +636,11 @@ static int tc_attach_host(struct tc_data *tc) dsi->format = MIPI_DSI_FMT_RGB888; dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_LPM; + if (tc->type == TC358765) + dsi->hs_rate = 800000000; + else + dsi->hs_rate = 1000000000; + dsi->lp_rate = 10000000; ret = devm_mipi_dsi_attach(dev, dsi); if (ret < 0) {