Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp3995136pxb; Mon, 30 Aug 2021 15:56:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9hVuNACLmRjMYPrZGamRMDoB5qZzomE63p7vDY1oBlxzAoSgphFFTSIt3OK1U7vmMAaN4 X-Received: by 2002:a17:906:9ac5:: with SMTP id ah5mr27266354ejc.224.1630364219594; Mon, 30 Aug 2021 15:56:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630364219; cv=none; d=google.com; s=arc-20160816; b=j6PEHVtgp3z2cK46CxJvrhHSyKvjkG18Ou0OPsTvlzHp+NTS1SSelIWNeqfzw6IIG0 ts/p7IKxRi55ZtRGtzz+Alv4OEiIRttvK+Xr6VhBny7/MVSeu5JlYLsyzj6nRsQYgR9/ 3ZAlMpHgVei+JbE3FCT8GULm5iGh44TYNVAiD3mG/cGuaQjy0trk20F5k06k9oSQ23c/ K/mozhM6W1yb/DGWnzuhvfTM95v0VRSBTumm0vaenOpixLlDWE668KbKU2mE4JAX83PV K1Oj0jpmXjeMO3WXP8WRYL7IFsvw1/wC9upqzLC9gftAL0k54Xm8G4Uyp/t6RwsGNW/E fQRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=IjRvmfYrNOH5GuD2BW8+TZhuDV9/KT066Nrtf1rp9xc=; b=zGjH7sMuNhosk+FHCSHyrh3uT+iFOFojZJXDEUa0vdx1ooXCpE5LGQIei/veP7HsO6 yGpKKpSt8IU3OT91upYpfB2eowL3s9DnoR0LpcIZGTHMGCcThj2q2Y/T9DRy3AHqN/ii QjEBr01GB2trd0tRTsyfPpbIpb0DktSCfE0NDUCDhjbb+WXB/eFgL+QMMkqBe81rjLip eDdTRvuPZfhxkDP2j0QoaskrrRfUQsSs8y0FeD4gdkxEZoJ7jJs7TXBye4iiSHDD+ydJ 2yJ4CEubKcncJ7iLYxP/fBp6CD8JMOSZ9IJpLEAcjf7Vj55TFcFvwsURXvPSDiwnvmko 2U7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eoFceDxG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r23si114163edy.23.2021.08.30.15.56.35; Mon, 30 Aug 2021 15:56:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eoFceDxG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238907AbhH3WyH (ORCPT + 99 others); Mon, 30 Aug 2021 18:54:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:47608 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238281AbhH3WyG (ORCPT ); Mon, 30 Aug 2021 18:54:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BDFD961004; Mon, 30 Aug 2021 22:53:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1630363991; bh=CuRU5V2uX9+sWVT8L+dKxVnPm8RG5qyiQPyEmwcMfLs=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=eoFceDxGSzkh4NZx2X8dM3YGUts1v0Pl5/uCBifSiK5t7UUf2t1fzXKRD80iJvHkK MtI/xIK2N6DVE4vwWH0L/NY57K+UABUEg2ODwcKiKaim+7boh0aDMW9yH+bem1WR8J WZrPiRnAxgeBLw6Lptl+CNfhJJb+jqlxEM6sYFdpVF3ziGbSBGw21spSq9dV8XEnzU FwnrvuUXorZmniKDn1lvwIBdoLtbt9k6CAsNnRZnr7akEy8CWNDG5TwOpVM1u7ltw5 MQae2TAbeN89g83BiXn/wKsVGOV3MFKsR98AMV6M1pqb1OyaozdW1Iksj6vHl3E7Xz IzIddIvwR8PHg== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20210830182445.167527-1-marijn.suijten@somainline.org> <20210830182445.167527-2-marijn.suijten@somainline.org> <163036177339.2676726.12271104951144475163@swboyd.mtv.corp.google.com> Subject: Re: [PATCH v2 1/2] drm/msm/dsi: Use "ref" fw clock instead of global name for VCO parent From: Stephen Boyd Cc: Bjorn Andersson , linux-arm-msm@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Pavel Dubrova , Andy Gross , Michael Turquette , Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Dmitry Baryshkov , Abhinav Kumar , Jonathan Marek , Matthias Kaehlcke , Douglas Anderson , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Stephen Boyd To: Marijn Suijten Date: Mon, 30 Aug 2021 15:53:10 -0700 Message-ID: <163036399040.2676726.5816296584899284140@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Marijn Suijten (2021-08-30 15:45:42) > Hi Stephen, >=20 > On 2021-08-30 15:16:13, Stephen Boyd wrote: > > Quoting Marijn Suijten (2021-08-30 11:24:44) > > > All DSI PHY/PLL drivers were referencing their VCO parent clock by a > > > global name, most of which don't exist or have been renamed. These > > > clock drivers seem to function fine without that except the 14nm driv= er > > > for the sdm6xx [1]. > > >=20 > > > At the same time all DTs provide a "ref" clock as per the requirements > > > of dsi-phy-common.yaml, but the clock is never used. This patchset p= uts > > > that clock to use without relying on a global clock name, so that all > > > dependencies are explicitly defined in DT (the firmware) in the end. > > >=20 > > > Note that msm8974 is the only board not providing this clock, and > > > apq8064 was providing the wrong clock (19.2MHz cxo instead of 27MHz > > > pxo). Both have been been addressed in separate patches that are > > > supposed to land well in advance of this patchset. > > >=20 > > > Furthermore not all board-DTs provided this clock initially but that > > > deficiency has been addressed in followup patches (see the Fixes: > > > below). Those commits seem to assume that the clock was used, while > > > nothing in history indicates that this "ref" clock was ever retrieved. > > >=20 > > > [1]: https://lore.kernel.org/linux-arm-msm/386db1a6-a1cd-3c7d-a88e-dc= 83f8a1be96@somainline.org/ > > >=20 > > > Fixes: 79e51645a1dd ("arm64: dts: qcom: msm8916: Set 'xo_board' as re= f clock of the DSI PHY") > > > Fixes: 6969d1d9c615 ("ARM: dts: qcom-apq8064: Set 'cxo_board' as ref = clock of the DSI PHY") > > > Fixes: 0c0e72705a33 ("arm64: dts: sdm845: Set 'bi_tcxo' as ref clock = of the DSI PHYs") > > > Signed-off-by: Marijn Suijten > > > --- > > > drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c | 4 +++- > > > drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c | 4 +++- > > > drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm.c | 4 +++- > > > drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c | 4 +++- > > > drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c | 4 +++- > > > 5 files changed, 15 insertions(+), 5 deletions(-) > > >=20 > > > diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c b/drivers/gpu= /drm/msm/dsi/phy/dsi_phy_10nm.c > > > index e46b10fc793a..3cbb1f1475e8 100644 > > > --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c > > > +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c > > > @@ -562,7 +562,9 @@ static int pll_10nm_register(struct dsi_pll_10nm = *pll_10nm, struct clk_hw **prov > > > char clk_name[32], parent[32], vco_name[32]; > > > char parent2[32], parent3[32], parent4[32]; > > > struct clk_init_data vco_init =3D { > > > - .parent_names =3D (const char *[]){ "xo" }, > > > + .parent_data =3D &(const struct clk_parent_data) { > > > + .fw_name =3D "ref", > >=20 > > Please also add .name as the old parent_names value so that newer > > kernels can be used without having to use new DT. >=20 > We discussed that only msm8974 misses this "ref" clock at the time of > writing. Aforementioned Fixes: patches have all been merged about 3 > years ago, are those DTs still in use with a newer kernel? I suppose > this patch is only backported to kernels including those DT patches, is > it reasonable to assume that at least that DT is in use there? I have no idea. >=20 > Besides, not all clock trees provide this global "xo" or "bi_tcxo" clock > in the first place. >=20 It doesn't hurt to also specify a .name to help migrate anything else over. Unless you're confident it won't cause problems to rely on proper DT being used?