diff mbox series

[RFT,1/2] arm64: dts: qcom: apq8096-db820c: fix missing clock populate

Message ID 20230901081812.19121-1-krzysztof.kozlowski@linaro.org (mailing list archive)
State Accepted
Commit 2ca3e844e3f978c0dbc95072dbf379abfc4a27db
Headers show
Series [RFT,1/2] arm64: dts: qcom: apq8096-db820c: fix missing clock populate | expand

Commit Message

Krzysztof Kozlowski Sept. 1, 2023, 8:18 a.m. UTC
Commit 704e26678c8d ("arm64: dts: qcom: apq8096-db820c: drop simple-bus
from clocks") removed "simple-bus" compatible from "clocks" node, but
one of the clocks - divclk1 - is a gpio-gate-clock, which does not have
CLK_OF_DECLARE.  This means it will not be instantiated if placed in
some subnode.  Move the clocks to the root node, so regular devices will
be populated.

Reported-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Closes: https://lore.kernel.org/all/CAA8EJprF==p87oN+RiwAiNeURF1JcHGfL2Ez5zxqYPRRbN-hhg@mail.gmail.com/
Cc: <stable@vger.kernel.org>
Fixes: 704e26678c8d ("arm64: dts: qcom: apq8096-db820c: drop simple-bus from clocks")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 32 ++++++++++-----------
 1 file changed, 15 insertions(+), 17 deletions(-)

Comments

Dmitry Baryshkov Sept. 5, 2023, 9:51 p.m. UTC | #1
On 01/09/2023 11:18, Krzysztof Kozlowski wrote:
> Commit 704e26678c8d ("arm64: dts: qcom: apq8096-db820c: drop simple-bus
> from clocks") removed "simple-bus" compatible from "clocks" node, but
> one of the clocks - divclk1 - is a gpio-gate-clock, which does not have
> CLK_OF_DECLARE.  This means it will not be instantiated if placed in
> some subnode.  Move the clocks to the root node, so regular devices will
> be populated.
> 
> Reported-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Closes: https://lore.kernel.org/all/CAA8EJprF==p87oN+RiwAiNeURF1JcHGfL2Ez5zxqYPRRbN-hhg@mail.gmail.com/
> Cc: <stable@vger.kernel.org>
> Fixes: 704e26678c8d ("arm64: dts: qcom: apq8096-db820c: drop simple-bus from clocks")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Stephen Boyd pointed out that this is a proper way to go (and we should 
unpack remaining /clocks nodes).

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

> ---
>   arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 32 ++++++++++-----------
>   1 file changed, 15 insertions(+), 17 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
> index 385b178314db..3067a4091a7a 100644
> --- a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
> +++ b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
> @@ -62,25 +62,23 @@ chosen {
>   		stdout-path = "serial0:115200n8";
>   	};
>   
> -	clocks {
> -		divclk4: divclk4 {
> -			compatible = "fixed-clock";
> -			#clock-cells = <0>;
> -			clock-frequency = <32768>;
> -			clock-output-names = "divclk4";
> +	div1_mclk: divclk1 {
> +		compatible = "gpio-gate-clock";
> +		pinctrl-0 = <&audio_mclk>;
> +		pinctrl-names = "default";
> +		clocks = <&rpmcc RPM_SMD_DIV_CLK1>;
> +		#clock-cells = <0>;
> +		enable-gpios = <&pm8994_gpios 15 0>;
> +	};
>   
> -			pinctrl-names = "default";
> -			pinctrl-0 = <&divclk4_pin_a>;
> -		};
> +	divclk4: divclk4 {
> +		compatible = "fixed-clock";
> +		#clock-cells = <0>;
> +		clock-frequency = <32768>;
> +		clock-output-names = "divclk4";
>   
> -		div1_mclk: divclk1 {
> -			compatible = "gpio-gate-clock";
> -			pinctrl-0 = <&audio_mclk>;
> -			pinctrl-names = "default";
> -			clocks = <&rpmcc RPM_SMD_DIV_CLK1>;
> -			#clock-cells = <0>;
> -			enable-gpios = <&pm8994_gpios 15 0>;
> -		};
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&divclk4_pin_a>;
>   	};
>   
>   	gpio-keys {
Bjorn Andersson Sept. 20, 2023, 5:14 p.m. UTC | #2
On Fri, 01 Sep 2023 10:18:11 +0200, Krzysztof Kozlowski wrote:
> Commit 704e26678c8d ("arm64: dts: qcom: apq8096-db820c: drop simple-bus
> from clocks") removed "simple-bus" compatible from "clocks" node, but
> one of the clocks - divclk1 - is a gpio-gate-clock, which does not have
> CLK_OF_DECLARE.  This means it will not be instantiated if placed in
> some subnode.  Move the clocks to the root node, so regular devices will
> be populated.
> 
> [...]

Applied, thanks!

[1/2] arm64: dts: qcom: apq8096-db820c: fix missing clock populate
      commit: 2ca3e844e3f978c0dbc95072dbf379abfc4a27db
[2/2] arm64: dts: qcom: msm8996-xiaomi: fix missing clock populate
      commit: 725f593692ceedeab639b661298955b6f9ba8ec3

Best regards,
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
index 385b178314db..3067a4091a7a 100644
--- a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
+++ b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
@@ -62,25 +62,23 @@  chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
-	clocks {
-		divclk4: divclk4 {
-			compatible = "fixed-clock";
-			#clock-cells = <0>;
-			clock-frequency = <32768>;
-			clock-output-names = "divclk4";
+	div1_mclk: divclk1 {
+		compatible = "gpio-gate-clock";
+		pinctrl-0 = <&audio_mclk>;
+		pinctrl-names = "default";
+		clocks = <&rpmcc RPM_SMD_DIV_CLK1>;
+		#clock-cells = <0>;
+		enable-gpios = <&pm8994_gpios 15 0>;
+	};
 
-			pinctrl-names = "default";
-			pinctrl-0 = <&divclk4_pin_a>;
-		};
+	divclk4: divclk4 {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <32768>;
+		clock-output-names = "divclk4";
 
-		div1_mclk: divclk1 {
-			compatible = "gpio-gate-clock";
-			pinctrl-0 = <&audio_mclk>;
-			pinctrl-names = "default";
-			clocks = <&rpmcc RPM_SMD_DIV_CLK1>;
-			#clock-cells = <0>;
-			enable-gpios = <&pm8994_gpios 15 0>;
-		};
+		pinctrl-names = "default";
+		pinctrl-0 = <&divclk4_pin_a>;
 	};
 
 	gpio-keys {