Message ID | 20230111060402.1168726-1-dmitry.baryshkov@linaro.org |
---|---|
Headers | show |
Series | clock: qcom: apq8084: convert to parent_data/_hws | expand |
On Wed, 11 Jan 2023 08:03:50 +0200, Dmitry Baryshkov wrote: > Rework apq8084 gcc and mmcc drivers to use parent_data and parent_hws > instead of parent_names. > > Changes since v2: > - Reverted the qcom,gcc-apq8084 example to use numbers for ufsphy clock > indices rather than defining them right in the example. > > [...] Applied, thanks! [12/12] ARM: dts: qcom: apq8084: add clocks and clock-names to gcc device commit: b894f2cf915479f9b25266da394942db9736161d Best regards,
Quoting Dmitry Baryshkov (2023-01-10 22:03:51) > Define clock/clock-names properties of the GCC device node to be used > on APQ8084 platform. > > Note: the driver uses a single pcie_pipe clock, however most probably > there are two pipe clocks, one from each of PCIe QMP PHYs. > > Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > --- Reviewed-by: Stephen Boyd <sboyd@kernel.org> > diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-apq8084.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-apq8084.yaml > index 8ade176c24f4..d84608269080 100644 > --- a/Documentation/devicetree/bindings/clock/qcom,gcc-apq8084.yaml > +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-apq8084.yaml > @@ -32,11 +56,31 @@ unevaluatedProperties: false > > examples: > - | > + /* UFS PHY on APQ8084 is not supported (yet), so these bindings just serve an example */ This comment will go out of date and probably nobody will notice. Just remove it? > clock-controller@fc400000 { > compatible = "qcom,gcc-apq8084"; > reg = <0xfc400000 0x4000>; > #clock-cells = <1>; > #reset-cells = <1>; > #power-domain-cells = <1>;
Quoting Dmitry Baryshkov (2023-01-10 22:03:53) > Define clock/clock-names properties of the MMCC device node to be used > on APQ8084 platform. > > Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > --- Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Quoting Dmitry Baryshkov (2023-01-10 22:03:54) > Use ARRAY_SIZE() instead of manually specifying num_parents. This makes > adding/removing entries to/from parent_data easy and errorproof. > > Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > --- Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Quoting Dmitry Baryshkov (2023-01-10 22:03:56) > Convert the clock driver to specify parent data rather than parent > names, to actually bind using 'clock-names' specified in the DTS rather > than global clock names. Use parent_hws where possible to refer parent > clocks directly, skipping the lookup. > > Note, the system names for xo clocks were changed from "xo" to > "xo_board" to follow the example of other platforms. This switches the > clocks to use DT-provided "xo_board" clock instead of manually > registered "xo" clock and allows us to drop qcom_cc_register_board_clk() > call from the driver at some point. Should probably also mention that using the firmware path will mean the RPM control of XO could be involved and so suspend may no longer achieve XO shutdown or it will stop working. In case bisect lands here we'll know from the commit text that this likely broke power management. > > In the same way change the looked up system "sleep_clk_src" clock to > "sleep_clk", which is registered from DT. > > Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > --- Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Quoting Dmitry Baryshkov (2023-01-10 22:03:58) > Use ARRAY_SIZE() instead of manually specifying num_parents. This makes > adding/removing entries to/from parent_data easy and errorproof. > > Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > --- Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Quoting Dmitry Baryshkov (2023-01-10 22:04:02) > diff --git a/arch/arm/boot/dts/qcom-apq8084.dtsi b/arch/arm/boot/dts/qcom-apq8084.dtsi > index 4b0d2b4f4b6a..4d01f0f2292e 100644 > --- a/arch/arm/boot/dts/qcom-apq8084.dtsi > +++ b/arch/arm/boot/dts/qcom-apq8084.dtsi > @@ -388,6 +388,24 @@ gcc: clock-controller@fc400000 { > #reset-cells = <1>; > #power-domain-cells = <1>; > reg = <0xfc400000 0x4000>; > + clocks = <&xo_board>, > + <&sleep_clk>, > + <0>, /* ufs */ > + <0>, > + <0>, > + <0>, > + <0>, /* sata */ > + <0>, > + <0>; /* pcie */ > + clock-names = "xo", It just uses xo_board again though, so it's a no-op until someone decides to change this to the RPM provided XO clk.
On 25/01/2023 23:49, Stephen Boyd wrote: > Quoting Dmitry Baryshkov (2023-01-10 22:03:56) >> Convert the clock driver to specify parent data rather than parent >> names, to actually bind using 'clock-names' specified in the DTS rather >> than global clock names. Use parent_hws where possible to refer parent >> clocks directly, skipping the lookup. >> >> Note, the system names for xo clocks were changed from "xo" to >> "xo_board" to follow the example of other platforms. This switches the >> clocks to use DT-provided "xo_board" clock instead of manually >> registered "xo" clock and allows us to drop qcom_cc_register_board_clk() >> call from the driver at some point. > > Should probably also mention that using the firmware path will mean the > RPM control of XO could be involved and so suspend may no longer achieve > XO shutdown or it will stop working. In case bisect lands here we'll > know from the commit text that this likely broke power management. As you've seen from the DT changes, this series is a pure rework, no switching to RPM's XO clock. > >> >> In the same way change the looked up system "sleep_clk_src" clock to >> "sleep_clk", which is registered from DT. >> >> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> >> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> >> --- > > Reviewed-by: Stephen Boyd <sboyd@kernel.org>