From nobody Tue Feb 10 00:00:32 2026 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 097DB20C478 for ; Tue, 18 Mar 2025 12:37:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742301427; cv=none; b=rpelAuhdRZ1qrI5d1QkhwD8+btK2SZHEMa3wEqhPJIyvxMb+e7oDgN/lXKxJIxi3MaEqXz4MrujvYF3LLx3su+VAA6F1cFeiotiKtLwlkJjQW5ab2eY4r1sw/3pbwalaFtFgWc84JVrX3y555681wjpgNvjsheUVEBxnZ+3jRwI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742301427; c=relaxed/simple; bh=CUwwZN4Wp1QY7QDo7pmxw/CqdU8fxCfQN49SPR8Cbw0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mjRQG5AUBOAhfA87w4vj53PYghffgWmJr/Jfmb/EV7e17ybG+r0Hk8IegouX14B4zHS6UV/L+styoB4uzP8oGHsqRORovBLrUZUlNtp29oi8ccOR9hEmKWDufPm+APbAc896UgJ6Fqy8Wa/6xSHukVRRXuaj+tpxIMn7f7jlQlg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=PrFH/Tee; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="PrFH/Tee" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1742301420; bh=CUwwZN4Wp1QY7QDo7pmxw/CqdU8fxCfQN49SPR8Cbw0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=PrFH/TeePy3dtzykAY6nBoUxD3WyrdK92ZtAL9gJZKnNLSTszr271ZFCW/8+p9aMi QYmC3qN22rmPNkQmDbvs7IsBtHK4A9huQu5irfiHy44G3nia1/CnXiYMPh9q5IUKC+ hhfdLTtymQkEW8czHvv+5nu0HqvJ7Tc9DF15PJVBCZsS8YyahnfbP2klCRAdOmSaj7 T13mM54Jfc7xjYaDhwvA/R+VQg9zXITldEIbJOizT3ofvLsRtQhcXcPyTal0MiloD8 uUcQzJHZQSDoZfrIhv4MSF7Nple1XjgKPbpBwe7bQkQsHhfwkpw93LibxVcf0tKtJ0 j/nC/3YwNenVA== Received: from localhost (unknown [84.232.140.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by bali.collaboradmins.com (Postfix) with UTF8SMTPSA id 11F2417E0FDB; Tue, 18 Mar 2025 13:37:00 +0100 (CET) From: Cristian Ciocaltea Date: Tue, 18 Mar 2025 14:35:37 +0200 Subject: [PATCH v6 03/14] phy: rockchip: samsung-hdptx: Fix clock ratio setup Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250318-phy-sam-hdptx-bpc-v6-3-8cb1678e7663@collabora.com> References: <20250318-phy-sam-hdptx-bpc-v6-0-8cb1678e7663@collabora.com> In-Reply-To: <20250318-phy-sam-hdptx-bpc-v6-0-8cb1678e7663@collabora.com> To: Vinod Koul , Kishon Vijay Abraham I , Heiko Stuebner Cc: Algea Cao , Sandor Yu , Dmitry Baryshkov , Maxime Ripard , kernel@collabora.com, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.14.2 The switch from 1/10 to 1/40 clock ratio must happen when exceeding the 340 MHz rate limit of HDMI 1.4, i.e. when entering the HDMI 2.0 domain, and not before. Therefore, use the correct comparison operator '>' instead of '>=3D' when checking the max rate. While at it, introduce a define for this rate limit constant. Fixes: 553be2830c5f ("phy: rockchip: Add Samsung HDMI/eDP Combo PHY driver") Reviewed-by: Dmitry Baryshkov Signed-off-by: Cristian Ciocaltea --- drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/ph= y/rockchip/phy-rockchip-samsung-hdptx.c index fe7c057483563686b8076cf2ce562440cfa6fe55..34a7ef20936422b540b699f1acb= a44ca465501b7 100644 --- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c +++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c @@ -320,6 +320,7 @@ #define LN3_TX_SER_RATE_SEL_HBR2_MASK BIT(3) #define LN3_TX_SER_RATE_SEL_HBR3_MASK BIT(2) =20 +#define HDMI14_MAX_RATE 340000000 #define HDMI20_MAX_RATE 600000000 =20 enum dp_link_rate { @@ -1072,7 +1073,7 @@ static int rk_hdptx_ropll_tmds_mode_config(struct rk_= hdptx_phy *hdptx, =20 regmap_write(hdptx->regmap, LNTOP_REG(0200), 0x06); =20 - if (rate >=3D 3400000) { + if (rate > HDMI14_MAX_RATE / 100) { /* For 1/40 bitrate clk */ rk_hdptx_multi_reg_write(hdptx, rk_hdtpx_tmds_lntop_highbr_seq); } else { --=20 2.48.1