[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAA8EJpoOVaDptuo9u4CaNRi0gJjt4Mr65Os3XJTf3-Sbk280gQ@mail.gmail.com>
Date: Fri, 1 Sep 2023 19:36:03 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [RFT PATCH 2/2] arm64: dts: qcom: msm8996-xiaomi: fix missing
clock populate
On Fri, 1 Sept 2023 at 11:18, Krzysztof Kozlowski
<krzysztof.kozlowski@...aro.org> wrote:
>
> Commit 338958e30c68 ("arm64: dts: qcom: msm8996-xiaomi: 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.
I don't think this is a good idea. We have other fixed clocks under
/clocks. And they have been always working. I think the better way
would be to teach clk-gpio to work with CLK_OF_DECLARE
>
> Reported-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
> Closes: https://lore.kernel.org/all/CAA8EJprF==p87oN+RiwAiNeURF1JcHGfL2Ez5zxqYPRRbN-hhg@mail.gmail.com/
> Cc: <stable@...r.kernel.org>
> Fixes: 338958e30c68 ("arm64: dts: qcom: msm8996-xiaomi: drop simple-bus from clocks")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> ---
> .../boot/dts/qcom/msm8996-xiaomi-common.dtsi | 32 +++++++++----------
> .../boot/dts/qcom/msm8996-xiaomi-gemini.dts | 16 ++++------
> 2 files changed, 22 insertions(+), 26 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
> index bcd2397eb373..06f8ff624181 100644
> --- a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
> @@ -11,26 +11,24 @@
> #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
>
> / {
> - clocks {
> - divclk1_cdc: divclk1 {
> - compatible = "gpio-gate-clock";
> - clocks = <&rpmcc RPM_SMD_DIV_CLK1>;
> - #clock-cells = <0>;
> - enable-gpios = <&pm8994_gpios 15 GPIO_ACTIVE_HIGH>;
> + divclk1_cdc: divclk1 {
> + compatible = "gpio-gate-clock";
> + clocks = <&rpmcc RPM_SMD_DIV_CLK1>;
> + #clock-cells = <0>;
> + enable-gpios = <&pm8994_gpios 15 GPIO_ACTIVE_HIGH>;
>
> - pinctrl-names = "default";
> - pinctrl-0 = <&divclk1_default>;
> - };
> + pinctrl-names = "default";
> + pinctrl-0 = <&divclk1_default>;
> + };
>
> - divclk4: divclk4 {
> - compatible = "fixed-clock";
> - #clock-cells = <0>;
> - clock-frequency = <32768>;
> - clock-output-names = "divclk4";
> + divclk4: divclk4 {
> + compatible = "fixed-clock";
> + #clock-cells = <0>;
> + clock-frequency = <32768>;
> + clock-output-names = "divclk4";
>
> - pinctrl-names = "default";
> - pinctrl-0 = <&divclk4_pin_a>;
> - };
> + pinctrl-names = "default";
> + pinctrl-0 = <&divclk4_pin_a>;
> };
>
> gpio-keys {
> diff --git a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts
> index d1066edaea47..f8e9d90afab0 100644
> --- a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts
> +++ b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts
> @@ -20,16 +20,14 @@ / {
> qcom,pmic-id = <0x20009 0x2000a 0x00 0x00>;
> qcom,board-id = <31 0>;
>
> - clocks {
> - divclk2_haptics: divclk2 {
> - compatible = "fixed-clock";
> - #clock-cells = <0>;
> - clock-frequency = <32768>;
> - clock-output-names = "divclk2";
> + divclk2_haptics: divclk2 {
> + compatible = "fixed-clock";
> + #clock-cells = <0>;
> + clock-frequency = <32768>;
> + clock-output-names = "divclk2";
>
> - pinctrl-names = "default";
> - pinctrl-0 = <&divclk2_pin_a>;
> - };
> + pinctrl-names = "default";
> + pinctrl-0 = <&divclk2_pin_a>;
> };
> };
>
> --
> 2.34.1
>
--
With best wishes
Dmitry
Powered by blists - more mailing lists