From nobody Sun Jun 14 04:20:27 2026 Received: from smtp.forwardemail.net (smtp.forwardemail.net [149.28.215.223]) (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 0360B378D92 for ; Sun, 3 May 2026 17:29:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=149.28.215.223 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777829400; cv=none; b=s6HfWpit6qK+m5uYenk9q4Wg5HslAdtzyT55vKEuF8b/RM1WROtS1ZWQaRk9JUTyOND+SGK2YsiVa6z3n/DUHtu02LRwxpPlaCnuwxuRSEwHMlbVIQRt1IPeab9e126MKcuvJ/hVh2+phnbEjSLP5Jvzufr8BcxeqVNmGE1dI1c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777829400; c=relaxed/simple; bh=eqJgWDMnYdRj0vQu+x6EWY2KBGete/OMTtVnx7koubA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZU/htGlaE2USoc5ntCLvuZbUbTWRQP3LbT39Hf+HJWk8v1adas3pJl9CuhHZy6iH7AT+YnKkGl922D3AQd4pNJgBktS6pKZ6aJCLq6ezRezgQzyiCJtQq6cnldHVXoVHeyYRhMqvFnegzZJ3dC4MlhZfzVJHXoqCZFzJbylbpU4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kwiboo.se; spf=pass smtp.mailfrom=fe-bounces.kwiboo.se; dkim=pass (2048-bit key) header.d=kwiboo.se header.i=@kwiboo.se header.b=QeW3IXlX; arc=none smtp.client-ip=149.28.215.223 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kwiboo.se Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fe-bounces.kwiboo.se Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kwiboo.se header.i=@kwiboo.se header.b="QeW3IXlX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=Content-Transfer-Encoding: MIME-Version: Message-ID: Date: Subject: Cc: To: From; q=dns/txt; s=fe-e1b5cab7be; t=1777829391; bh=cUmX2lfSAIxHAO30a5b/VSjazGULvRZ0BJbIP2Jnpbg=; b=QeW3IXlXeKEhx6ZXzikgz3Qy+lYxy3x6F1xPNzmT+YNb5oZFNx3ghdgu6i29d490zrZfBxpJ7 psKF65E3gckM2hiAVTnJk3ceEpGagcdhxmOINLEegxPa4OqBdONI/kviIHM/O6kNlrozDj9FBvy mbmmS8nMsOlpFfhP9fqPtFRA8LOR0MR6qwPizMXwyiDG7SVKvOz+gH/q/weXjmS36jngzZ2q5Kt sYfIWMGHoOieC5RAI7BddQrxgE1I0KEEo9UXDPx6HMiooxiDCU6LPKvyBN/DwAI3bESQPrTBtAX ibynww+vofQknjNjCQUm4JX6vwPJTt1xDeDbnwNQ8jIw== X-Forward-Email-ID: 69f78606acdb2a4edb003b13 X-Forward-Email-Sender: rfc822; jonas@kwiboo.se, smtp.forwardemail.net, 149.28.215.223 X-Forward-Email-Version: 2.7.7 X-Forward-Email-Website: https://forwardemail.net X-Complaints-To: abuse@forwardemail.net X-Report-Abuse: abuse@forwardemail.net X-Report-Abuse-To: abuse@forwardemail.net From: Jonas Karlman To: Vinod Koul , Neil Armstrong , Heiko Stuebner Cc: Jonas Karlman , linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] phy: rockchip: inno-hdmi: Change TMDS rate handling to configure() ops Date: Sun, 3 May 2026 17:29:36 +0000 Message-ID: <20260503172936.194003-1-jonas@kwiboo.se> X-Mailer: git-send-email 2.54.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The commit 10ed34d6eaaf ("phy: Add HDMI configuration options") introduced a way for HDMI PHYs to be configured through the generic phy_configure() function. This driver currently derives the TMDS character rate from the pixel clock and the PHY bus width setting. However, no in-tree consumer of this PHY has ever called phy_set_bus_width() to change the TMDS rate. Change the TMDS character rate handling to depend on the configure() ops before any PHY consumer needs to configure a TMDS character rate that is different from the pixel clock rate. Signed-off-by: Jonas Karlman --- A near future drm/rockchip: dw_hdmi: series plans to include a call to phy_configure() to configure this HDMI PHYs TMDS character rate. --- drivers/phy/rockchip/phy-rockchip-inno-hdmi.c | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c b/drivers/phy/ro= ckchip/phy-rockchip-inno-hdmi.c index 1483907413fa..7f0563d4d482 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c @@ -245,6 +245,7 @@ struct inno_hdmi_phy { struct clk *phyclk; unsigned long pixclock; unsigned long tmdsclock; + struct phy_configure_opts_hdmi hdmi_cfg; }; =20 struct pre_pll_config { @@ -554,19 +555,10 @@ static inline void inno_update_bits(struct inno_hdmi_= phy *inno, u8 reg, static unsigned long inno_hdmi_phy_get_tmdsclk(struct inno_hdmi_phy *inno, unsigned long rate) { - int bus_width =3D phy_get_bus_width(inno->phy); - - switch (bus_width) { - case 4: - case 5: - case 6: - case 10: - case 12: - case 16: - return (u64)rate * bus_width / 8; - default: - return rate; - } + if (inno->hdmi_cfg.tmds_char_rate) + return inno->hdmi_cfg.tmds_char_rate; + + return rate; } =20 static irqreturn_t inno_hdmi_phy_rk3328_hardirq(int irq, void *dev_id) @@ -602,6 +594,16 @@ static irqreturn_t inno_hdmi_phy_rk3328_irq(int irq, v= oid *dev_id) return IRQ_HANDLED; } =20 +static int inno_hdmi_phy_configure(struct phy *phy, + union phy_configure_opts *opts) +{ + struct inno_hdmi_phy *inno =3D phy_get_drvdata(phy); + + inno->hdmi_cfg =3D opts->hdmi; + + return 0; +} + static int inno_hdmi_phy_power_on(struct phy *phy) { struct inno_hdmi_phy *inno =3D phy_get_drvdata(phy); @@ -668,6 +670,7 @@ static int inno_hdmi_phy_power_off(struct phy *phy) =20 static const struct phy_ops inno_hdmi_phy_ops =3D { .owner =3D THIS_MODULE, + .configure =3D inno_hdmi_phy_configure, .power_on =3D inno_hdmi_phy_power_on, .power_off =3D inno_hdmi_phy_power_off, }; @@ -1392,7 +1395,6 @@ static int inno_hdmi_phy_probe(struct platform_device= *pdev) } =20 phy_set_drvdata(inno->phy, inno); - phy_set_bus_width(inno->phy, 8); =20 if (inno->plat_data->ops->init) { ret =3D inno->plat_data->ops->init(inno); --=20 2.54.0