Message ID | 20250402-cdns-dsi-impro-v2-4-4a093eaa5e27@ideasonboard.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 6F9A6C3601C for <linux-phy@archiver.kernel.org>; Wed, 2 Apr 2025 13:37:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sMT0Oxm58ee/kvrYwSxVBLsfj7DPooOgf+YP6+tbTA4=; b=YDdubbq5jF1LEr liA2DkSel7HEYk5GdVEA72lN2qZdlHfoiJwCLdBTdg8hhAFnvbeXk3mCkZr/T0W2KhUIy4+0LlmOJ MFBuvpp5f5Ms4F0PtiudmtL9yPNl+RnNzwnaJegSZ5+UFG7dpf1FGQ/HFjbATj1Y/ZCHtWNYbtemm UvYDOKieV0qiGMHx721e0zvmdxsS2liEiH5q87zi6dtrnnjpuE9r5Yd+itXayak1cq1kZdpEwAItw 7iatKtWhB8vZvOUEl+pL8O30MnmdQjcSCn2r1AEF4/EftfCaTflzLFr62Kry2MZ4iUPgUnJRohmvX r7ALgGOEioohuhSJcSyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.1 #2 (Red Hat Linux)) id 1tzyHw-00000006GkJ-0h3W; Wed, 02 Apr 2025 13:37:52 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.98.1 #2 (Red Hat Linux)) id 1tzyBd-00000006F8B-1Pjm for linux-phy@lists.infradead.org; Wed, 02 Apr 2025 13:31:22 +0000 Received: from [127.0.1.1] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 62FF71986; Wed, 2 Apr 2025 15:29:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1743600567; bh=0rz+qtGwR8012ibx7Ol/9THyUm6cLrG8rh2vtI7MsMc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=iHMAvUFZ0oSZaOR2bJctKAa9uKxqxZ1uwIFG+fgt5ReEow5ommMK0fE7hXUtlMVHP LYg4CJOs+qmplVfNkcrrvIm5kSC4X9Ctgy/7LmY7shiVHpIRsYSRzKm1vHRg2p7+WX 1Hf+o9yBxVAqV7dcQwiZpakjC1ZGJsqvH4fXSda0= From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Wed, 02 Apr 2025 16:30:46 +0300 Subject: [PATCH v2 04/18] phy: cdns-dphy: Store hs_clk_rate and return it MIME-Version: 1.0 Message-Id: <20250402-cdns-dsi-impro-v2-4-4a093eaa5e27@ideasonboard.com> References: <20250402-cdns-dsi-impro-v2-0-4a093eaa5e27@ideasonboard.com> In-Reply-To: <20250402-cdns-dsi-impro-v2-0-4a093eaa5e27@ideasonboard.com> To: Jyri Sarha <jyri.sarha@iki.fi>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>, Vinod Koul <vkoul@kernel.org>, Kishon Vijay Abraham I <kishon@kernel.org>, Andrzej Hajda <andrzej.hajda@intel.com>, Neil Armstrong <neil.armstrong@linaro.org>, Robert Foss <rfoss@kernel.org>, Laurent Pinchart <Laurent.pinchart@ideasonboard.com>, Jonas Karlman <jonas@kwiboo.se>, Jernej Skrabec <jernej.skrabec@gmail.com> Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, Francesco Dolcini <francesco@dolcini.it>, Aradhya Bhatia <aradhya.bhatia@linux.dev>, Devarsh Thakkar <devarsht@ti.com>, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1212; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=0rz+qtGwR8012ibx7Ol/9THyUm6cLrG8rh2vtI7MsMc=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBn7TwcaZeTlUBNgRJH+o0UqxKZ47XGEk5nI4+fx rlZ/xHDxHSJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZ+08HAAKCRD6PaqMvJYe 9fwTD/4xUL4hkpewbyumBl2OhN2ZsCukOxQqMp6sDpBhQla+6MmBo5TwSfiDKA5PxrVTVCoRRHl Tz13fTTolMEQB8iy4zjXiMJ7YoVFe0yzM73tnnh4Ay5RfGd4JvM96cx8prHIdyRuzQG/ANWjaS7 XVq12EuPuOpuzzWHdwSh10BVmxzShAOJINdAHPCvl0e7OXkUE9tesiZEmqgIfQwWqGdV7ZiGtHx 8goeYf3sVYdKDcEQSfAZZDXXmRjEFFHZ6mlbjxoUpR/HoKEumNUAIYU/mL1nqmWOFOrC89g3/eG hJq8F2FIdZQEaWxRYqO5KlzYXLq1qPWiKfK0stc7BYHPl83I9oqk8uzWaVqYiZmNidVr21Q/wXz ec3sOipiMf5xS4j16tOu47LJ6W1WupZ9FGqd/C6ocDn9KE00TdJOWesU326VPcUn7lRAsv+yDGY WSxKkXX3n2FKpiQB70ejX1wcD3/OqmVeJOK9J7wSdPNZPXX7dGyyiM6GcsfYkCd4J35IPa83G3z +whWZc3fkm6jHWRYIMvW4FSRXRHpdRdFXoiKqk1UAKdCqdRvfpZJWkruEqfjTqjMknMErxQ8rfC PCANjw3lqM0A5neDAwc0TdSUqxnGRQXn7tfmKPVNcOFjDjekJfeSMhRTsMk/h2yUUoPpArXnMBJ 0LZmxjAyRkrlGKg== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250402_063121_590670_7342D025 X-CRM114-Status: UNSURE ( 9.04 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list <linux-phy.lists.infradead.org> List-Unsubscribe: <https://lists.infradead.org/mailman/options/linux-phy>, <mailto:linux-phy-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-phy/> List-Post: <mailto:linux-phy@lists.infradead.org> List-Help: <mailto:linux-phy-request@lists.infradead.org?subject=help> List-Subscribe: <https://lists.infradead.org/mailman/listinfo/linux-phy>, <mailto:linux-phy-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" <linux-phy-bounces@lists.infradead.org> Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org |
Series |
drm/bridge: cdns-dsi: Make it work a bit better
|
expand
|
diff --git a/drivers/phy/cadence/cdns-dphy.c b/drivers/phy/cadence/cdns-dphy.c index ed87a3970f83..f79ec4fab409 100644 --- a/drivers/phy/cadence/cdns-dphy.c +++ b/drivers/phy/cadence/cdns-dphy.c @@ -79,6 +79,7 @@ struct cdns_dphy_cfg { u8 pll_ipdiv; u8 pll_opdiv; u16 pll_fbdiv; + u32 hs_clk_rate; unsigned int nlanes; }; @@ -154,6 +155,9 @@ static int cdns_dsi_get_dphy_pll_cfg(struct cdns_dphy *dphy, cfg->pll_ipdiv, pll_ref_hz); + cfg->hs_clk_rate = div_u64((u64)pll_ref_hz * cfg->pll_fbdiv, + 2 * cfg->pll_opdiv * cfg->pll_ipdiv); + return 0; } @@ -297,6 +301,7 @@ static int cdns_dphy_config_from_opts(struct phy *phy, if (ret) return ret; + opts->hs_clk_rate = cfg->hs_clk_rate; opts->wakeup = cdns_dphy_get_wakeup_time_ns(dphy) / 1000; return 0;
The DPHY driver does not return the actual hs_clk_rate, so the DSI driver has no idea what clock was actually achieved. Set the realized hs_clk_rate to the opts struct, so that the DSI driver gets it back. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> --- drivers/phy/cadence/cdns-dphy.c | 5 +++++ 1 file changed, 5 insertions(+)