phone-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: dts: qcom: msm8976: Add and provide xo clk to rpmcc
@ 2023-03-02 12:30 Adam Skladowski
  2023-03-02 12:30 ` [PATCH 2/2] arm64: dts: qcom: msm8956-loire: Provide rate for xo_board clock Adam Skladowski
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Adam Skladowski @ 2023-03-02 12:30 UTC (permalink / raw)
  Cc: phone-devel, ~postmarketos/upstreaming, Adam Skladowski,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, AngeloGioacchino Del Regno, Marijn Suijten,
	linux-arm-msm, devicetree, linux-kernel

In order for consumers of RPMCC XO clock to probe successfully
their parent needs to be feed with reference clock to obtain proper rate,
add fixed xo-board clock and supply it to rpmcc to make consumers happy.
Frequency setting is left per board basis just like on other recent trees.

Fixes: 0484d3ce0902 ("arm64: dts: qcom: Add DTS for MSM8976 and MSM8956 SoCs")
Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
---
 arch/arm64/boot/dts/qcom/msm8976.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8976.dtsi b/arch/arm64/boot/dts/qcom/msm8976.dtsi
index 2d360d05aa5e..e55baafd9efd 100644
--- a/arch/arm64/boot/dts/qcom/msm8976.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8976.dtsi
@@ -20,6 +20,13 @@ / {
 
 	chosen { };
 
+	clocks {
+		xo_board: xo-board {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+		};
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
@@ -351,6 +358,8 @@ rpm_requests: rpm-requests {
 
 				rpmcc: clock-controller {
 					compatible = "qcom,rpmcc-msm8976", "qcom,rpmcc";
+					clocks = <&xo_board>;
+					clock-names = "xo";
 					#clock-cells = <1>;
 				};
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] arm64: dts: qcom: msm8956-loire: Provide rate for xo_board clock
  2023-03-02 12:30 [PATCH 1/2] arm64: dts: qcom: msm8976: Add and provide xo clk to rpmcc Adam Skladowski
@ 2023-03-02 12:30 ` Adam Skladowski
  2023-03-02 16:38   ` Dmitry Baryshkov
  2023-03-02 16:40 ` [PATCH 1/2] arm64: dts: qcom: msm8976: Add and provide xo clk to rpmcc Dmitry Baryshkov
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Adam Skladowski @ 2023-03-02 12:30 UTC (permalink / raw)
  Cc: phone-devel, ~postmarketos/upstreaming, Adam Skladowski,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, AngeloGioacchino Del Regno, Marijn Suijten,
	linux-arm-msm, devicetree, linux-kernel

As xo_board is part of board not soc we define rates per device tree,
assign common 19.2Mhz rate to make consumers happy.

Fixes: ff7f6d34ca07 ("arm64: dts: qcom: Add support for SONY Xperia X/X Compact")
Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
---
 arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi b/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi
index 67baced639c9..085d79542e1b 100644
--- a/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi
@@ -280,3 +280,7 @@ &usb_hs_phy {
 	vdda3p3-supply = <&pm8950_l13>;
 	status = "okay";
 };
+
+&xo_board {
+	clock-frequency = <19200000>;
+};
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] arm64: dts: qcom: msm8956-loire: Provide rate for xo_board clock
  2023-03-02 12:30 ` [PATCH 2/2] arm64: dts: qcom: msm8956-loire: Provide rate for xo_board clock Adam Skladowski
@ 2023-03-02 16:38   ` Dmitry Baryshkov
  2023-03-02 18:12     ` Dmitry Baryshkov
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Baryshkov @ 2023-03-02 16:38 UTC (permalink / raw)
  To: Adam Skladowski
  Cc: phone-devel, ~postmarketos/upstreaming, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	AngeloGioacchino Del Regno, Marijn Suijten, linux-arm-msm,
	devicetree, linux-kernel

On Thu, 2 Mar 2023 at 14:31, Adam Skladowski <a39.skl@gmail.com> wrote:
>
> As xo_board is part of board not soc we define rates per device tree,
> assign common 19.2Mhz rate to make consumers happy.
>
> Fixes: ff7f6d34ca07 ("arm64: dts: qcom: Add support for SONY Xperia X/X Compact")
> Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
> ---
>  arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi b/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi
> index 67baced639c9..085d79542e1b 100644
> --- a/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi
> @@ -280,3 +280,7 @@ &usb_hs_phy {
>         vdda3p3-supply = <&pm8950_l13>;
>         status = "okay";
>  };
> +
> +&xo_board {
> +       clock-frequency = <19200000>;

This doesn't seem to be board-specific. Please move it to msm8976.dtsi.

> +};
> --
> 2.25.1
>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] arm64: dts: qcom: msm8976: Add and provide xo clk to rpmcc
  2023-03-02 12:30 [PATCH 1/2] arm64: dts: qcom: msm8976: Add and provide xo clk to rpmcc Adam Skladowski
  2023-03-02 12:30 ` [PATCH 2/2] arm64: dts: qcom: msm8956-loire: Provide rate for xo_board clock Adam Skladowski
@ 2023-03-02 16:40 ` Dmitry Baryshkov
  2023-03-03  0:52 ` Konrad Dybcio
  2023-03-16  3:20 ` (subset) " Bjorn Andersson
  3 siblings, 0 replies; 7+ messages in thread
From: Dmitry Baryshkov @ 2023-03-02 16:40 UTC (permalink / raw)
  To: Adam Skladowski
  Cc: phone-devel, ~postmarketos/upstreaming, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	AngeloGioacchino Del Regno, Marijn Suijten, linux-arm-msm,
	devicetree, linux-kernel

On 02/03/2023 14:30, Adam Skladowski wrote:
> In order for consumers of RPMCC XO clock to probe successfully
> their parent needs to be feed with reference clock to obtain proper rate,
> add fixed xo-board clock and supply it to rpmcc to make consumers happy.
> Frequency setting is left per board basis just like on other recent trees.
> 
> Fixes: 0484d3ce0902 ("arm64: dts: qcom: Add DTS for MSM8976 and MSM8956 SoCs")
> Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
> ---
>   arch/arm64/boot/dts/qcom/msm8976.dtsi | 9 +++++++++
>   1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8976.dtsi b/arch/arm64/boot/dts/qcom/msm8976.dtsi
> index 2d360d05aa5e..e55baafd9efd 100644
> --- a/arch/arm64/boot/dts/qcom/msm8976.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8976.dtsi
> @@ -20,6 +20,13 @@ / {
>   
>   	chosen { };
>   
> +	clocks {
> +		xo_board: xo-board {
> +			compatible = "fixed-clock";
> +			#clock-cells = <0>;

With the clock-frequency moved here:

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

> +		};
> +	};
> +
>   	cpus {
>   		#address-cells = <1>;
>   		#size-cells = <0>;
> @@ -351,6 +358,8 @@ rpm_requests: rpm-requests {
>   
>   				rpmcc: clock-controller {
>   					compatible = "qcom,rpmcc-msm8976", "qcom,rpmcc";
> +					clocks = <&xo_board>;
> +					clock-names = "xo";
>   					#clock-cells = <1>;
>   				};
>   

-- 
With best wishes
Dmitry


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] arm64: dts: qcom: msm8956-loire: Provide rate for xo_board clock
  2023-03-02 16:38   ` Dmitry Baryshkov
@ 2023-03-02 18:12     ` Dmitry Baryshkov
  0 siblings, 0 replies; 7+ messages in thread
From: Dmitry Baryshkov @ 2023-03-02 18:12 UTC (permalink / raw)
  To: Adam Skladowski
  Cc: phone-devel, ~postmarketos/upstreaming, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	AngeloGioacchino Del Regno, Marijn Suijten, linux-arm-msm,
	devicetree, linux-kernel

On Thu, 2 Mar 2023 at 18:38, Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
>
> On Thu, 2 Mar 2023 at 14:31, Adam Skladowski <a39.skl@gmail.com> wrote:
> >
> > As xo_board is part of board not soc we define rates per device tree,
> > assign common 19.2Mhz rate to make consumers happy.
> >
> > Fixes: ff7f6d34ca07 ("arm64: dts: qcom: Add support for SONY Xperia X/X Compact")
> > Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
> > ---
> >  arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi b/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi
> > index 67baced639c9..085d79542e1b 100644
> > --- a/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi
> > @@ -280,3 +280,7 @@ &usb_hs_phy {
> >         vdda3p3-supply = <&pm8950_l13>;
> >         status = "okay";
> >  };
> > +
> > +&xo_board {
> > +       clock-frequency = <19200000>;
>
> This doesn't seem to be board-specific. Please move it to msm8976.dtsi.

Adam pointed out the clock frequency is now thought to be a
board-specific thing.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] arm64: dts: qcom: msm8976: Add and provide xo clk to rpmcc
  2023-03-02 12:30 [PATCH 1/2] arm64: dts: qcom: msm8976: Add and provide xo clk to rpmcc Adam Skladowski
  2023-03-02 12:30 ` [PATCH 2/2] arm64: dts: qcom: msm8956-loire: Provide rate for xo_board clock Adam Skladowski
  2023-03-02 16:40 ` [PATCH 1/2] arm64: dts: qcom: msm8976: Add and provide xo clk to rpmcc Dmitry Baryshkov
@ 2023-03-03  0:52 ` Konrad Dybcio
  2023-03-16  3:20 ` (subset) " Bjorn Andersson
  3 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2023-03-03  0:52 UTC (permalink / raw)
  To: Adam Skladowski
  Cc: phone-devel, ~postmarketos/upstreaming, Andy Gross,
	Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	AngeloGioacchino Del Regno, Marijn Suijten, linux-arm-msm,
	devicetree, linux-kernel



On 2.03.2023 13:30, Adam Skladowski wrote:
> In order for consumers of RPMCC XO clock to probe successfully
> their parent needs to be feed with reference clock to obtain proper rate,
> add fixed xo-board clock and supply it to rpmcc to make consumers happy.
> Frequency setting is left per board basis just like on other recent trees.
> 
> Fixes: 0484d3ce0902 ("arm64: dts: qcom: Add DTS for MSM8976 and MSM8956 SoCs")
> Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
> ---
So your commit message suggests that this commit does not
actually fix the problem, but lays the groundwork for it..

I'd say squashing these two into a single one would make more sense,
as if somebody was bisecting something and landed on this one, there
would be little hope in getting a boot if what you said holds.

Konrad
>  arch/arm64/boot/dts/qcom/msm8976.dtsi | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8976.dtsi b/arch/arm64/boot/dts/qcom/msm8976.dtsi
> index 2d360d05aa5e..e55baafd9efd 100644
> --- a/arch/arm64/boot/dts/qcom/msm8976.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8976.dtsi
> @@ -20,6 +20,13 @@ / {
>  
>  	chosen { };
>  
> +	clocks {
> +		xo_board: xo-board {
> +			compatible = "fixed-clock";
> +			#clock-cells = <0>;
> +		};
> +	};
> +
>  	cpus {
>  		#address-cells = <1>;
>  		#size-cells = <0>;
> @@ -351,6 +358,8 @@ rpm_requests: rpm-requests {
>  
>  				rpmcc: clock-controller {
>  					compatible = "qcom,rpmcc-msm8976", "qcom,rpmcc";
> +					clocks = <&xo_board>;
> +					clock-names = "xo";
>  					#clock-cells = <1>;
>  				};
>  

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: (subset) [PATCH 1/2] arm64: dts: qcom: msm8976: Add and provide xo clk to rpmcc
  2023-03-02 12:30 [PATCH 1/2] arm64: dts: qcom: msm8976: Add and provide xo clk to rpmcc Adam Skladowski
                   ` (2 preceding siblings ...)
  2023-03-03  0:52 ` Konrad Dybcio
@ 2023-03-16  3:20 ` Bjorn Andersson
  3 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2023-03-16  3:20 UTC (permalink / raw)
  To: Adam Skladowski
  Cc: linux-kernel, phone-devel, linux-arm-msm,
	~postmarketos/upstreaming, Marijn Suijten,
	AngeloGioacchino Del Regno, devicetree, Rob Herring,
	Konrad Dybcio, Andy Gross, Krzysztof Kozlowski

On Thu, 2 Mar 2023 13:30:49 +0100, Adam Skladowski wrote:
> In order for consumers of RPMCC XO clock to probe successfully
> their parent needs to be feed with reference clock to obtain proper rate,
> add fixed xo-board clock and supply it to rpmcc to make consumers happy.
> Frequency setting is left per board basis just like on other recent trees.
> 
> 

Applied, thanks!

[1/2] arm64: dts: qcom: msm8976: Add and provide xo clk to rpmcc
      commit: 4a2c9b9e1215c557c17a48e3fabe9b1674c1d608
[2/2] arm64: dts: qcom: msm8956-loire: Provide rate for xo_board clock
      commit: 4a2c9b9e1215c557c17a48e3fabe9b1674c1d608

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-03-16  3:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-02 12:30 [PATCH 1/2] arm64: dts: qcom: msm8976: Add and provide xo clk to rpmcc Adam Skladowski
2023-03-02 12:30 ` [PATCH 2/2] arm64: dts: qcom: msm8956-loire: Provide rate for xo_board clock Adam Skladowski
2023-03-02 16:38   ` Dmitry Baryshkov
2023-03-02 18:12     ` Dmitry Baryshkov
2023-03-02 16:40 ` [PATCH 1/2] arm64: dts: qcom: msm8976: Add and provide xo clk to rpmcc Dmitry Baryshkov
2023-03-03  0:52 ` Konrad Dybcio
2023-03-16  3:20 ` (subset) " Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).