platform/kernel/linux-rpi.git
21 months agoclk: qcom: cpu-8996: support using GPLL0 as SMUX input
Dmitry Baryshkov [Fri, 13 Jan 2023 12:05:35 +0000 (14:05 +0200)]
clk: qcom: cpu-8996: support using GPLL0 as SMUX input

In some cases the driver might need using GPLL0 to drive CPU clocks.
Bring it in through the sys_apcs_aux clock.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230113120544.59320-6-dmitry.baryshkov@linaro.org
21 months agoclk: qcom: cpu-8996: fix the init clock rate
Dmitry Baryshkov [Fri, 13 Jan 2023 12:05:34 +0000 (14:05 +0200)]
clk: qcom: cpu-8996: fix the init clock rate

Current multiplier (60) results in CPU getting the rate which is
unlisted in the CPU frequency tables (60 * 19.2 = 1152 MHz). This
results in warnings from the cpufreq during startup.

Change PLL programming (l = 54) to init CPU clocks to start with the
frequency of 54 * 19.2 = 1036.8 MHz which is supported by both power and
performance clusters from all speed bins.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230113120544.59320-5-dmitry.baryshkov@linaro.org
21 months agoclk: qcom: cpu-8996: correct PLL programming
Dmitry Baryshkov [Fri, 13 Jan 2023 12:05:33 +0000 (14:05 +0200)]
clk: qcom: cpu-8996: correct PLL programming

Change PLL programming to follow the downstream setup.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230113120544.59320-4-dmitry.baryshkov@linaro.org
21 months agoclk: qcom: clk-alpha-pll: program PLL_TEST/PLL_TEST_U if required
Dmitry Baryshkov [Fri, 13 Jan 2023 12:05:32 +0000 (14:05 +0200)]
clk: qcom: clk-alpha-pll: program PLL_TEST/PLL_TEST_U if required

Program PLL_TEST and PLL_TEST_U registers if required by the pll
configuration.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230113120544.59320-3-dmitry.baryshkov@linaro.org
21 months agodt-bindings: clock: qcom,msm8996-apcc: add sys_apcs_aux clock
Dmitry Baryshkov [Fri, 13 Jan 2023 12:05:31 +0000 (14:05 +0200)]
dt-bindings: clock: qcom,msm8996-apcc: add sys_apcs_aux clock

The MSM8996 CPU clock controller can make use of the sys_apcs_aux clock.
Add it to the bindings.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230113120544.59320-2-dmitry.baryshkov@linaro.org
21 months agoclk: qcom: Add QDU1000 and QRU1000 GCC support
Taniya Das [Thu, 12 Jan 2023 20:44:46 +0000 (12:44 -0800)]
clk: qcom: Add QDU1000 and QRU1000 GCC support

Add Global Clock Controller (GCC) support for QDU1000 and QRU1000 SoCs.

Signed-off-by: Taniya Das <quic_tdas@quicinc.com>
Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
[bjorn: Made gcc_pcie_0_pipe_clk_src use clk_regmap_phy_mux_ops]
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230112204446.30236-3-quic_molvera@quicinc.com
21 months agoMerge branch '20230112204446.30236-2-quic_molvera@quicinc.com' into HEAD
Bjorn Andersson [Thu, 19 Jan 2023 02:47:06 +0000 (20:47 -0600)]
Merge branch '20230112204446.30236-2-quic_molvera@quicinc.com' into HEAD

21 months agodt-bindings: clock: Add QDU1000 and QRU1000 GCC clocks
Melody Olvera [Thu, 12 Jan 2023 20:44:45 +0000 (12:44 -0800)]
dt-bindings: clock: Add QDU1000 and QRU1000 GCC clocks

Add device tree bindings for global clock controller on QDU1000 and
QRU1000 SoCs.

Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230112204446.30236-2-quic_molvera@quicinc.com
21 months agoclk: qcom: mmcc-apq8084: use parent_hws/_data instead of parent_names
Dmitry Baryshkov [Wed, 11 Jan 2023 06:04:01 +0000 (08:04 +0200)]
clk: qcom: mmcc-apq8084: use parent_hws/_data instead of parent_names

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.

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>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230111060402.1168726-12-dmitry.baryshkov@linaro.org
21 months agoclk: qcom: mmcc-apq8084: remove spdm clocks
Dmitry Baryshkov [Wed, 11 Jan 2023 06:04:00 +0000 (08:04 +0200)]
clk: qcom: mmcc-apq8084: remove spdm clocks

SPDM is used for debug/profiling and does not have any other
functionality. These clocks can safely be removed.

Suggested-by: Stephen Boyd <sboyd@kernel.org>
Suggested-by: Georgi Djakov <djakov@kernel.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230111060402.1168726-11-dmitry.baryshkov@linaro.org
21 months agoclk: qcom: mmcc-apq8084: move clock parent tables down
Dmitry Baryshkov [Wed, 11 Jan 2023 06:03:59 +0000 (08:03 +0200)]
clk: qcom: mmcc-apq8084: move clock parent tables down

Move clock parent tables down, after the PLL declrataions, so that we
can use pll hw clock fields in the next commit.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230111060402.1168726-10-dmitry.baryshkov@linaro.org
21 months agoclk: qcom: mmcc-apq8084: use ARRAY_SIZE instead of specifying num_parents
Dmitry Baryshkov [Wed, 11 Jan 2023 06:03:58 +0000 (08:03 +0200)]
clk: qcom: mmcc-apq8084: use ARRAY_SIZE instead of specifying num_parents

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>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230111060402.1168726-9-dmitry.baryshkov@linaro.org
21 months agoclk: qcom: gcc-apq8084: add GCC_MMSS_GPLL0_CLK_SRC
Dmitry Baryshkov [Wed, 11 Jan 2023 06:03:57 +0000 (08:03 +0200)]
clk: qcom: gcc-apq8084: add GCC_MMSS_GPLL0_CLK_SRC

Add the GCC_MMSS_GPLL0_CLK_SRC, the branch clock gating gpll0 clock for
the multimedia subsystem.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230111060402.1168726-8-dmitry.baryshkov@linaro.org
21 months agoclk: qcom: gcc-apq8084: use parent_hws/_data instead of parent_names
Dmitry Baryshkov [Wed, 11 Jan 2023 06:03:56 +0000 (08:03 +0200)]
clk: qcom: gcc-apq8084: use parent_hws/_data instead of parent_names

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.

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>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230111060402.1168726-7-dmitry.baryshkov@linaro.org
21 months agoclk: qcom: gcc-apq8084: move PLL clocks up
Dmitry Baryshkov [Wed, 11 Jan 2023 06:03:55 +0000 (08:03 +0200)]
clk: qcom: gcc-apq8084: move PLL clocks up

Move PLL clock declarations up, before clock parent tables, so that we
can use pll hw clock fields in the next commit.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230111060402.1168726-6-dmitry.baryshkov@linaro.org
21 months agoclk: qcom: gcc-apq8084: use ARRAY_SIZE instead of specifying num_parents
Dmitry Baryshkov [Wed, 11 Jan 2023 06:03:54 +0000 (08:03 +0200)]
clk: qcom: gcc-apq8084: use ARRAY_SIZE instead of specifying num_parents

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>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230111060402.1168726-5-dmitry.baryshkov@linaro.org
21 months agodt-bindings: clock: qcom,mmcc: define clocks/clock-names for APQ8084
Dmitry Baryshkov [Wed, 11 Jan 2023 06:03:53 +0000 (08:03 +0200)]
dt-bindings: clock: qcom,mmcc: define clocks/clock-names for APQ8084

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>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230111060402.1168726-4-dmitry.baryshkov@linaro.org
21 months agodt-bindings: clock: qcom,gcc-apq8084: add GCC_MMSS_GPLL0_CLK_SRC
Dmitry Baryshkov [Wed, 11 Jan 2023 06:03:52 +0000 (08:03 +0200)]
dt-bindings: clock: qcom,gcc-apq8084: add GCC_MMSS_GPLL0_CLK_SRC

Add GCC_MMSS_GPLL0_CLK_SRC, the branch clock gating gpll0 clock for the
multimedia subsystem.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230111060402.1168726-3-dmitry.baryshkov@linaro.org
21 months agodt-bindings: clock: qcom,gcc-apq8084: define clocks/clock-names
Dmitry Baryshkov [Wed, 11 Jan 2023 06:03:51 +0000 (08:03 +0200)]
dt-bindings: clock: qcom,gcc-apq8084: define clocks/clock-names

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>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230111060402.1168726-2-dmitry.baryshkov@linaro.org
21 months agoclk: qcom: ipq8074: populate fw_name for usb3phy-s
Robert Marko [Sun, 8 Jan 2023 13:04:39 +0000 (14:04 +0100)]
clk: qcom: ipq8074: populate fw_name for usb3phy-s

Having only .name populated in parent_data for clocks which are only
globally searchable currently will not work as the clk core won't copy
that name if there is no .fw_name present as well.

So, populate .fw_name for usb3phy clocks in parent_data as they were
missed by me in ("clk: qcom: ipq8074: populate fw_name for all parents").

Fixes: ae55ad32e273 ("clk: qcom: ipq8074: convert to parent data")
Signed-off-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230108130440.670181-1-robimarko@gmail.com
21 months agoMerge branch '20230103-topic-sm8550-upstream-dispcc-v3-1-8a03d348c572@linaro.org...
Bjorn Andersson [Wed, 18 Jan 2023 23:35:01 +0000 (17:35 -0600)]
Merge branch '20230103-topic-sm8550-upstream-dispcc-v3-1-8a03d348c572@linaro.org' into clk-for-6.3

21 months agodt-bindings: clock: document SM8550 DISPCC clock controller
Neil Armstrong [Mon, 9 Jan 2023 15:47:21 +0000 (16:47 +0100)]
dt-bindings: clock: document SM8550 DISPCC clock controller

Document device tree bindings for display clock controller for
Qualcomm SM8550 SoC.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103-topic-sm8550-upstream-dispcc-v3-1-8a03d348c572@linaro.org
21 months agoclk: qcom: add the GCC driver for sa8775p
Shazad Hussain [Tue, 17 Jan 2023 18:04:29 +0000 (19:04 +0100)]
clk: qcom: add the GCC driver for sa8775p

Add support for the Global Clock Controller found in the QTI SA8775P
platforms.

Signed-off-by: Shazad Hussain <quic_shazhuss@quicinc.com>
[Bartosz: made the driver ready for upstream]
Co-developed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
[bjorn: Moved to core_initcall(), per request of Konrad]
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230117180429.305266-3-brgl@bgdev.pl
21 months agodt-bindings: clock: Add Qualcomm SA8775P GCC
Bartosz Golaszewski [Tue, 17 Jan 2023 18:04:28 +0000 (19:04 +0100)]
dt-bindings: clock: Add Qualcomm SA8775P GCC

Add DT bindings for the GCC clock on SA8775P platforms. Add relevant
DT include definitions as well.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230117180429.305266-2-brgl@bgdev.pl
22 months agoclk: qcom: smd-rpm: msm8936: Add PMIC gated RPM_SMD_XO_*
Bryan O'Donoghue [Tue, 17 Jan 2023 02:48:42 +0000 (02:48 +0000)]
clk: qcom: smd-rpm: msm8936: Add PMIC gated RPM_SMD_XO_*

The XO crystal input is buffered through the PMIC and controlled by RPM.
Create the relevant clock gate representation in the RPM clock definitions.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230117024846.1367794-5-bryan.odonoghue@linaro.org
22 months agoclk: qcom: rpmh: remove duplicate IPA clock reference
Arnd Bergmann [Tue, 17 Jan 2023 17:02:09 +0000 (18:02 +0100)]
clk: qcom: rpmh: remove duplicate IPA clock reference

One of the ones that were recently added was already there:

drivers/clk/qcom/clk-rpmh.c:578:35: error: initialized field overwritten [-Werror=override-init]
  578 |         [RPMH_IPA_CLK]          = &clk_rpmh_ipa.hw,

Fixes: aa055bf158cd ("clk: qcom: rpmh: define IPA clocks where required")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230117170217.2462320-1-arnd@kernel.org
22 months agodt-bindings: clock: qcom,camcc-sm8250: extend clocks and power domains
Krzysztof Kozlowski [Sat, 24 Dec 2022 21:44:04 +0000 (22:44 +0100)]
dt-bindings: clock: qcom,camcc-sm8250: extend clocks and power domains

Add clocks and properties (power-domains, required-opps) already used in
SM8250 DTS:

  sm8250-hdk.dtb: clock-controller@ad00000: clocks: [[46, 10], [44, 0], [44, 1], [45]] is too long
  sm8250-hdk.dtb: clock-controller@ad00000: clock-names:0: 'bi_tcxo' was expected
  sm8250-hdk.dtb: clock-controller@ad00000: 'power-domains', 'required-opps' do not match any of the regexes: 'pinctrl-[0-9]+'

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221224214404.18280-1-krzysztof.kozlowski@linaro.org
22 months agodt-bindings: clock: qcom,videocc: correct clocks per variant
Krzysztof Kozlowski [Sat, 24 Dec 2022 15:41:52 +0000 (16:41 +0100)]
dt-bindings: clock: qcom,videocc: correct clocks per variant

Different SoCs come with a bit different clock inputs:

  sm8250-mtp.dtb: clock-controller@abf0000: clock-names:0: 'bi_tcxo' was expected
  sm8250-mtp.dtb: clock-controller@abf0000: clock-names: ['iface', 'bi_tcxo', 'bi_tcxo_ao'] is too long

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221224154152.43272-1-krzysztof.kozlowski@linaro.org
22 months agoclk: qcom: Remove need for clk_ignore_unused on sc8280xp
Bjorn Andersson [Fri, 13 Jan 2023 04:10:38 +0000 (20:10 -0800)]
clk: qcom: Remove need for clk_ignore_unused on sc8280xp

With the transition of disabling unused clocks at sync_state, rather
than late_initcall() it's now possible to drop clk_ignore_unused and
unused clock disabled once client drivers have probed. Do this on
SC8280XP.

Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230113041038.4188995-1-quic_bjorande@quicinc.com
22 months agoclk: qcom: rpmh: define IPA clocks where required
Dmitry Baryshkov [Mon, 9 Jan 2023 00:29:33 +0000 (02:29 +0200)]
clk: qcom: rpmh: define IPA clocks where required

Follow the example of sc7180 and sdx55 and implement IP0 resource as
clocks rather than interconnects.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230109002935.244320-11-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: camcc-sm6350: Make camcc_sm6350_hws static
Konrad Dybcio [Sat, 7 Jan 2023 12:04:34 +0000 (13:04 +0100)]
clk: qcom: camcc-sm6350: Make camcc_sm6350_hws static

There's no reason for it not to be static, and some compilers don't
like not it being that way. Make it so.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 80f5451d9a7c ("clk: qcom: Add camera clock controller driver for SM6350")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230107120434.1902666-1-konrad.dybcio@linaro.org
22 months agoarm64: dts: qcom: sm8250: Pad addresses to 8 hex digits
Konrad Dybcio [Fri, 30 Dec 2022 13:50:42 +0000 (14:50 +0100)]
arm64: dts: qcom: sm8250: Pad addresses to 8 hex digits

Some addresses were 7-hex-digits long. Fix that.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221230135044.287874-1-konrad.dybcio@linaro.org
22 months agoclk: qcom: gcc-msm8974: switch from sleep_clk_src to sleep_clk
Dmitry Baryshkov [Wed, 28 Dec 2022 20:37:25 +0000 (22:37 +0200)]
clk: qcom: gcc-msm8974: switch from sleep_clk_src to sleep_clk

gcc-msm8974 uses the registered sleep_clk_src clock, which is just a 1:1
fixed factor clock register on top of the board's sleep_clk. Switch the
driver to use the board sleep_clk directly.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221228203725.3131237-1-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: mmcc-msm8998: get rid of test clock
Dmitry Baryshkov [Wed, 28 Dec 2022 18:52:36 +0000 (20:52 +0200)]
clk: qcom: mmcc-msm8998: get rid of test clock

The test clock apparently it's not used by anyone upstream. Remove it.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221228185237.3111988-16-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: gcc-sdx55: get rid of test clock
Dmitry Baryshkov [Wed, 28 Dec 2022 18:52:33 +0000 (20:52 +0200)]
clk: qcom: gcc-sdx55: get rid of test clock

The test clock apparently it's not used by anyone upstream. Remove it.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221228185237.3111988-13-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: gcc-sdx55: use ARRAY_SIZE instead of specifying num_parents
Dmitry Baryshkov [Wed, 28 Dec 2022 18:52:32 +0000 (20:52 +0200)]
clk: qcom: gcc-sdx55: use ARRAY_SIZE instead of specifying num_parents

Use ARRAY_SIZE() instead of manually specifying num_parents. This makes
adding/removing entries to/from parent_data/names/hws easy and errorproof.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221228185237.3111988-12-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: gcc-sc7180: get rid of test clock
Dmitry Baryshkov [Wed, 28 Dec 2022 18:52:31 +0000 (20:52 +0200)]
clk: qcom: gcc-sc7180: get rid of test clock

The test clock apparently it's not used by anyone upstream. Remove it.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221228185237.3111988-11-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: gcc-msm8998: get rid of test clock
Dmitry Baryshkov [Wed, 28 Dec 2022 18:52:30 +0000 (20:52 +0200)]
clk: qcom: gcc-msm8998: get rid of test clock

The test clock apparently it's not used by anyone upstream. Remove it.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221228185237.3111988-10-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: dispcc-qcm2290: get rid of test clock
Dmitry Baryshkov [Wed, 28 Dec 2022 18:52:29 +0000 (20:52 +0200)]
clk: qcom: dispcc-qcm2290: get rid of test clock

The test clock apparently it's not used by anyone upstream. Remove it.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221228185237.3111988-9-dmitry.baryshkov@linaro.org
22 months agodt-bindings: clock: qcom: gcc-sm8450: drop test clock
Dmitry Baryshkov [Wed, 28 Dec 2022 18:52:28 +0000 (20:52 +0200)]
dt-bindings: clock: qcom: gcc-sm8450: drop test clock

The test clock apparently it's not used by anyone upstream. Remove it.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221228185237.3111988-8-dmitry.baryshkov@linaro.org
22 months agodt-bindings: clock: qcom: gcc-sm8350: drop test clock
Dmitry Baryshkov [Wed, 28 Dec 2022 18:52:27 +0000 (20:52 +0200)]
dt-bindings: clock: qcom: gcc-sm8350: drop test clock

The test clock apparently it's not used by anyone upstream. Remove it.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221228185237.3111988-7-dmitry.baryshkov@linaro.org
22 months agodt-bindings: clock: qcom,mmcc-msm8998: drop core_bi_pll_test_se
Dmitry Baryshkov [Wed, 28 Dec 2022 18:52:26 +0000 (20:52 +0200)]
dt-bindings: clock: qcom,mmcc-msm8998: drop core_bi_pll_test_se

The test clock apparently it's not used by anyone upstream. Remove it.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221228185237.3111988-6-dmitry.baryshkov@linaro.org
22 months agodt-bindings: clock: qcom,gcc-sdx65: drop core_bi_pll_test_se
Dmitry Baryshkov [Wed, 28 Dec 2022 18:52:24 +0000 (20:52 +0200)]
dt-bindings: clock: qcom,gcc-sdx65: drop core_bi_pll_test_se

The test clock apparently it's not used by anyone upstream. Remove it.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221228185237.3111988-4-dmitry.baryshkov@linaro.org
22 months agodt-bindings: clock: qcom,gcc-sdx55: drop core_bi_pll_test_se
Dmitry Baryshkov [Wed, 28 Dec 2022 18:52:23 +0000 (20:52 +0200)]
dt-bindings: clock: qcom,gcc-sdx55: drop core_bi_pll_test_se

The test clock apparently it's not used by anyone upstream. Remove it.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221228185237.3111988-3-dmitry.baryshkov@linaro.org
22 months agodt-bindings: clock: qcom,gcc-msm8998: drop core_bi_pll_test_se
Dmitry Baryshkov [Wed, 28 Dec 2022 18:52:22 +0000 (20:52 +0200)]
dt-bindings: clock: qcom,gcc-msm8998: drop core_bi_pll_test_se

The test clock apparently it's not used by anyone upstream. Remove it.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221228185237.3111988-2-dmitry.baryshkov@linaro.org
22 months agoclk: gcc-sm8350: drop PLL test clock
Krzysztof Kozlowski [Wed, 28 Dec 2022 14:09:17 +0000 (15:09 +0100)]
clk: gcc-sm8350: drop PLL test clock

There is no user of core_bi_pll_test_se test clock so drop it.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221228140917.118861-3-krzysztof.kozlowski@linaro.org
22 months agoclk: gcc-sm8150: drop PLL test clock
Krzysztof Kozlowski [Wed, 28 Dec 2022 14:09:16 +0000 (15:09 +0100)]
clk: gcc-sm8150: drop PLL test clock

There is no user of core_bi_pll_test_se test clock so drop it.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221228140917.118861-2-krzysztof.kozlowski@linaro.org
22 months agodt-bindings: clock: qcom,gcc-sm8350: drop core_bi_pll_test_se input
Krzysztof Kozlowski [Wed, 28 Dec 2022 14:09:15 +0000 (15:09 +0100)]
dt-bindings: clock: qcom,gcc-sm8350: drop core_bi_pll_test_se input

Drop unused core_bi_pll_test_se clock input to the clock controller.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221228140917.118861-1-krzysztof.kozlowski@linaro.org
22 months agodt-bindings: clock: qcom,spmi-clkdiv: convert to DT schema
Krzysztof Kozlowski [Fri, 23 Dec 2022 11:18:35 +0000 (12:18 +0100)]
dt-bindings: clock: qcom,spmi-clkdiv: convert to DT schema

Convert Qualcomm SPMI PMIC clock divider bindings to DT schema.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221223111835.37610-1-krzysztof.kozlowski@linaro.org
22 months agoclk: qcom: clk-spmi-pmic-div: convert to use parent_data
Dmitry Baryshkov [Sat, 10 Dec 2022 19:10:13 +0000 (22:10 +0300)]
clk: qcom: clk-spmi-pmic-div: convert to use parent_data

The clk-spmi-pmic-div driver gets the parent name from the first (and
the only) clock parent. So, use parent data, index 0 to setup the clock.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221210191013.453040-1-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: gcc-sm6375: use parent_hws for gcc_disp_gpll0_div_clk_src
Dmitry Baryshkov [Sat, 10 Dec 2022 19:07:11 +0000 (22:07 +0300)]
clk: qcom: gcc-sm6375: use parent_hws for gcc_disp_gpll0_div_clk_src

Change gpll0 to use parent_hws instead of parent_names for
gcc_disp_gpll0_div_clk_src clock.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221210190712.451247-2-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: dispcc-sm6115: use parent_hws for disp_cc_mdss_rot_clk
Dmitry Baryshkov [Sat, 10 Dec 2022 19:07:10 +0000 (22:07 +0300)]
clk: qcom: dispcc-sm6115: use parent_hws for disp_cc_mdss_rot_clk

Rework disp_cc_mdss_rot_clk to use parent_hws instead of parent_names.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221210190712.451247-1-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: videocc-sm8250: switch to devm_pm_runtime_enable
Dmitry Baryshkov [Tue, 3 Jan 2023 14:55:15 +0000 (16:55 +0200)]
clk: qcom: videocc-sm8250: switch to devm_pm_runtime_enable

Switch to using the devm_pm_runtime_enable() instead of hand-coding
corresponding action to call pm_runtime_disable().

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-22-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: lpasscc-sc7280: switch to devm_pm_runtime_enable
Dmitry Baryshkov [Tue, 3 Jan 2023 14:55:14 +0000 (16:55 +0200)]
clk: qcom: lpasscc-sc7280: switch to devm_pm_runtime_enable

Switch to using the devm_pm_runtime_enable() instead of hand-coding
corresponding action to call pm_runtime_disable().

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-21-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: dispcc-sm8450: switch to devm_pm_runtime_enable
Dmitry Baryshkov [Tue, 3 Jan 2023 14:55:13 +0000 (16:55 +0200)]
clk: qcom: dispcc-sm8450: switch to devm_pm_runtime_enable

Switch to using the devm_pm_runtime_enable() instead of hand-coding
corresponding action to call pm_runtime_disable().

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-20-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: dispcc-sm8250: switch to devm_pm_runtime_enable
Dmitry Baryshkov [Tue, 3 Jan 2023 14:55:12 +0000 (16:55 +0200)]
clk: qcom: dispcc-sm8250: switch to devm_pm_runtime_enable

Switch to using the devm_pm_runtime_enable() instead of hand-coding
corresponding action to call pm_runtime_disable().

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-19-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: lpasscc-sc7180: switch to parent_hws
Dmitry Baryshkov [Tue, 3 Jan 2023 14:55:11 +0000 (16:55 +0200)]
clk: qcom: lpasscc-sc7180: switch to parent_hws

Change several entries of parent_data to use parent_hws instead, which
results in slightly more ovbious code.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-18-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: gpucc-sc7180: switch to parent_hws
Dmitry Baryshkov [Tue, 3 Jan 2023 14:55:10 +0000 (16:55 +0200)]
clk: qcom: gpucc-sc7180: switch to parent_hws

Change several entries of parent_data to use parent_hws instead, which
results in slightly more ovbious code.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-17-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: gpucc-msm8998: switch to parent_hws
Dmitry Baryshkov [Tue, 3 Jan 2023 14:55:09 +0000 (16:55 +0200)]
clk: qcom: gpucc-msm8998: switch to parent_hws

Switch gfx3d_clk_src parents to use parent_hws instead of parent_data,
to clarify that these clocks are internal.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
[bjorn: Updated commit message]
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-16-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: gcc-sm8550: switch to parent_hws
Dmitry Baryshkov [Tue, 3 Jan 2023 14:55:08 +0000 (16:55 +0200)]
clk: qcom: gcc-sm8550: switch to parent_hws

Change several entries of parent_data to use parent_hws instead, which
results in slightly more ovbious code.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-15-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: gcc-sm8450: switch to parent_hws
Dmitry Baryshkov [Tue, 3 Jan 2023 14:55:07 +0000 (16:55 +0200)]
clk: qcom: gcc-sm8450: switch to parent_hws

Change several entries of parent_data to use parent_hws instead, which
results in slightly more ovbious code.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-14-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: gcc-sm8250: switch to parent_hws
Dmitry Baryshkov [Tue, 3 Jan 2023 14:55:06 +0000 (16:55 +0200)]
clk: qcom: gcc-sm8250: switch to parent_hws

Change several entries of parent_data to use parent_hws instead, which
results in slightly more ovbious code.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-13-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: gcc-sm6375: switch to parent_hws
Dmitry Baryshkov [Tue, 3 Jan 2023 14:55:05 +0000 (16:55 +0200)]
clk: qcom: gcc-sm6375: switch to parent_hws

Change several entries of parent_data to use parent_hws instead, which
results in slightly more ovbious code.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-12-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: gcc-sdx65: switch to parent_hws
Dmitry Baryshkov [Tue, 3 Jan 2023 14:55:04 +0000 (16:55 +0200)]
clk: qcom: gcc-sdx65: switch to parent_hws

Change several entries of parent_data to use parent_hws instead, which
results in slightly more ovbious code.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-11-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: gcc-sc7280: switch to parent_hws
Dmitry Baryshkov [Tue, 3 Jan 2023 14:55:03 +0000 (16:55 +0200)]
clk: qcom: gcc-sc7280: switch to parent_hws

Change several entries of parent_data to use parent_hws instead, which
results in slightly more ovbious code.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-10-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: gcc-sc7180: switch to parent_hws
Dmitry Baryshkov [Tue, 3 Jan 2023 14:55:02 +0000 (16:55 +0200)]
clk: qcom: gcc-sc7180: switch to parent_hws

Change several entries of parent_data to use parent_hws instead, which
results in slightly more ovbious code.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-9-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: gcc-msm8976: switch to parent_hws
Dmitry Baryshkov [Tue, 3 Jan 2023 14:55:01 +0000 (16:55 +0200)]
clk: qcom: gcc-msm8976: switch to parent_hws

Change several entries of parent_data to use parent_hws instead, which
results in slightly more ovbious code.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-8-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: gcc-msm8939: switch to parent_hws
Dmitry Baryshkov [Tue, 3 Jan 2023 14:55:00 +0000 (16:55 +0200)]
clk: qcom: gcc-msm8939: switch to parent_hws

Change several entries of parent_data to use parent_hws instead, which
results in slightly more ovbious code.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-7-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: camcc-sm8450: switch to parent_hws
Dmitry Baryshkov [Tue, 3 Jan 2023 14:54:59 +0000 (16:54 +0200)]
clk: qcom: camcc-sm8450: switch to parent_hws

Change several entries of parent_data to use parent_hws instead, which
results in slightly more ovbious code.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-6-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: camcc-sc7280: switch to parent_hws
Dmitry Baryshkov [Tue, 3 Jan 2023 14:54:58 +0000 (16:54 +0200)]
clk: qcom: camcc-sc7280: switch to parent_hws

Change several entries of parent_data to use parent_hws instead, which
results in slightly more ovbious code.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-5-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: dispcc-sm6375: switch to parent_hws
Dmitry Baryshkov [Tue, 3 Jan 2023 14:54:57 +0000 (16:54 +0200)]
clk: qcom: dispcc-sm6375: switch to parent_hws

Change several entries of parent_data to use parent_hws instead, which
results in slightly more ovbious code.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-4-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: dispcc-sc7180: switch to parent_hws
Dmitry Baryshkov [Tue, 3 Jan 2023 14:54:56 +0000 (16:54 +0200)]
clk: qcom: dispcc-sc7180: switch to parent_hws

Change several entries of parent_data to use parent_hws instead, which
results in slightly more ovbious code.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-3-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: dispcc-sm8450: switch to parent_hws
Dmitry Baryshkov [Tue, 3 Jan 2023 14:54:55 +0000 (16:54 +0200)]
clk: qcom: dispcc-sm8450: switch to parent_hws

Change several entries of parent_data to use parent_hws instead, which
results in slightly more ovbious code.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-2-dmitry.baryshkov@linaro.org
22 months agoMerge branch '20230104093450.3150578-2-abel.vesa@linaro.org' into clk-for-6.3
Bjorn Andersson [Tue, 10 Jan 2023 18:25:03 +0000 (12:25 -0600)]
Merge branch '20230104093450.3150578-2-abel.vesa@linaro.org' into clk-for-6.3

22 months agodt-bindings: clock: Add SM8550 TCSR CC clocks
Abel Vesa [Wed, 4 Jan 2023 09:34:47 +0000 (11:34 +0200)]
dt-bindings: clock: Add SM8550 TCSR CC clocks

Add bindings documentation for clock TCSR driver on SM8550.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230104093450.3150578-2-abel.vesa@linaro.org
22 months agoclk: qcom: add SM8550 DISPCC driver
Neil Armstrong [Mon, 9 Jan 2023 15:47:23 +0000 (16:47 +0100)]
clk: qcom: add SM8550 DISPCC driver

Add support for the display clock controller found in SM8550
based devices.

This clock controller feeds the Multimedia Display SubSystem (MDSS).
This driver is based on the SM8450 support.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103-topic-sm8550-upstream-dispcc-v3-3-8a03d348c572@linaro.org
22 months agoclk: qcom: clk-alpha-pll: define alias of LUCID OLE reset ops to EVO reset ops
Neil Armstrong [Mon, 9 Jan 2023 15:47:22 +0000 (16:47 +0100)]
clk: qcom: clk-alpha-pll: define alias of LUCID OLE reset ops to EVO reset ops

Add an alias of LUCID OLE reset ops to EVO reset ops similar
to other aliases.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103-topic-sm8550-upstream-dispcc-v3-2-8a03d348c572@linaro.org
22 months agodt-bindings: clock: document SM8550 DISPCC clock controller
Neil Armstrong [Mon, 9 Jan 2023 15:47:21 +0000 (16:47 +0100)]
dt-bindings: clock: document SM8550 DISPCC clock controller

Document device tree bindings for display clock controller for
Qualcomm SM8550 SoC.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103-topic-sm8550-upstream-dispcc-v3-1-8a03d348c572@linaro.org
22 months agoMerge tag '1672656511-1931-1-git-send-email-quic_akhilpo@quicinc.com' into clk-for-6.3
Bjorn Andersson [Tue, 10 Jan 2023 17:08:13 +0000 (11:08 -0600)]
Merge tag '1672656511-1931-1-git-send-email-quic_akhilpo@quicinc.com' into clk-for-6.3

v6.2-rc1 + 1672656511-1931-1-git-send-email-quic_akhilpo@quicinc.com

22 months agoclk: qcom: gdsc: Support 'synced_poweroff' genpd flag
Akhil P Oommen [Mon, 2 Jan 2023 10:48:28 +0000 (16:18 +0530)]
clk: qcom: gdsc: Support 'synced_poweroff' genpd flag

Add support for the newly added 'synced_poweroff' genpd flag. This allows
some clients (like adreno gpu driver) to request gdsc driver to ensure
a votable gdsc (like gpucc cx gdsc) has collapsed at hardware.

Signed-off-by: Akhil P Oommen <quic_akhilpo@quicinc.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230102161757.v5.2.Ic128c1df50b7fc9a6b919932a3b41a799b5ed5e8@changeid
22 months agoPM: domains: Allow a genpd consumer to require a synced power off
Ulf Hansson [Mon, 2 Jan 2023 10:48:27 +0000 (16:18 +0530)]
PM: domains: Allow a genpd consumer to require a synced power off

Some genpd providers doesn't ensure that it has turned off at hardware.
This is fine until the consumer really requires during some special
scenarios that the power domain collapse at hardware before it is
turned ON again.

An example is the reset sequence of Adreno GPU which requires that the
'gpucc cx gdsc' power domain should move to OFF state in hardware at
least once before turning in ON again to clear the internal state.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Akhil P Oommen <quic_akhilpo@quicinc.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230102161757.v5.1.I3e6b1f078ad0f1ca9358c573daa7b70ec132cdbe@changeid
22 months agoclk: qcom: sdm845: Use generic clk_sync_state_disable_unused callback
Abel Vesa [Tue, 27 Dec 2022 20:45:28 +0000 (22:45 +0200)]
clk: qcom: sdm845: Use generic clk_sync_state_disable_unused callback

By adding the newly added clk_sync_state_disable_unused as sync_state
callback to all sdm845 clock providers, we make sure that no clock
belonging to these providers gets disabled on clk_disable_unused,
but rather they are disabled on sync_state, when it is safe, since
all the consumers build as modules have had their chance of enabling
their own clocks.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221227204528.1899863-2-abel.vesa@linaro.org
22 months agoclk: Add generic sync_state callback for disabling unused clocks
Abel Vesa [Tue, 27 Dec 2022 20:45:27 +0000 (22:45 +0200)]
clk: Add generic sync_state callback for disabling unused clocks

There are unused clocks that need to remain untouched by clk_disable_unused,
and most likely could be disabled later on sync_state. So provide a generic
sync_state callback for the clock providers that register such clocks.
Then, use the same mechanism as clk_disable_unused from that generic
callback, but pass the device to make sure only the clocks belonging to
the current clock provider get disabled, if unused. Also, during the
default clk_disable_unused, if the driver that registered the clock has
the generic clk_sync_state_disable_unused callback set for sync_state,
skip disabling its clocks.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221227204528.1899863-1-abel.vesa@linaro.org
22 months agoclk: qcom: rpmh: add clocks for sa8775p
Bartosz Golaszewski [Mon, 9 Jan 2023 17:44:58 +0000 (18:44 +0100)]
clk: qcom: rpmh: add clocks for sa8775p

Extend the driver with a description of clocks for sa8775p platforms.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230109174511.1740856-6-brgl@bgdev.pl
22 months agodt-bindings: clock: qcom-rpmhcc: document the clock for sa8775p
Bartosz Golaszewski [Mon, 9 Jan 2023 17:44:57 +0000 (18:44 +0100)]
dt-bindings: clock: qcom-rpmhcc: document the clock for sa8775p

Add a new compatible for SA8775P platforms.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230109174511.1740856-5-brgl@bgdev.pl
22 months agoclk: qcom: krait-cc: fix wrong pointer passed to IS_ERR()
Yang Yingliang [Wed, 4 Jan 2023 08:02:35 +0000 (16:02 +0800)]
clk: qcom: krait-cc: fix wrong pointer passed to IS_ERR()

It should be 'mux' passed to IS_ERR/PTR_ERR().

Fixes: 56a655e1c41a ("clk: qcom: krait-cc: convert to parent_data API")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230104080235.1748953-1-yangyingliang@huawei.com
22 months agoclk: qcom: Add TCSR clock driver for SM8550
Abel Vesa [Wed, 4 Jan 2023 09:34:50 +0000 (11:34 +0200)]
clk: qcom: Add TCSR clock driver for SM8550

The TCSR clock controller found on SM8550 provides refclks
for PCIE, USB and UFS. Add clock driver for it.

This patch is based on initial code downstream.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230104093450.3150578-5-abel.vesa@linaro.org
22 months agoclk: qcom: rpmh: Add support for SM8550 rpmh clocks
Abel Vesa [Wed, 4 Jan 2023 09:34:49 +0000 (11:34 +0200)]
clk: qcom: rpmh: Add support for SM8550 rpmh clocks

Adds the RPMH clocks present in SM8550 SoC.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230104093450.3150578-4-abel.vesa@linaro.org
22 months agodt-bindings: clock: Add RPMHCC for SM8550
Abel Vesa [Wed, 4 Jan 2023 09:34:48 +0000 (11:34 +0200)]
dt-bindings: clock: Add RPMHCC for SM8550

Add bindings and update documentation for clock rpmh driver on SM8550.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230104093450.3150578-3-abel.vesa@linaro.org
22 months agodt-bindings: clock: Add SM8550 TCSR CC clocks
Abel Vesa [Wed, 4 Jan 2023 09:34:47 +0000 (11:34 +0200)]
dt-bindings: clock: Add SM8550 TCSR CC clocks

Add bindings documentation for clock TCSR driver on SM8550.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230104093450.3150578-2-abel.vesa@linaro.org
22 months agodt-bindings: clock: qcom,gcc-sc8280xp: document power domain
Krzysztof Kozlowski [Mon, 2 Jan 2023 08:59:09 +0000 (09:59 +0100)]
dt-bindings: clock: qcom,gcc-sc8280xp: document power domain

GCC clock controller is supplied by CX power domain:

  sc8280xp-crd.dtb: clock-controller@100000: Unevaluated properties are not allowed ('power-domains' was unexpected)

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230102085909.24620-1-krzysztof.kozlowski@linaro.org
22 months agoclk: qcom: dispcc-sm6125: Fix compatible string to match bindings
Marijn Suijten [Thu, 22 Dec 2022 21:01:40 +0000 (22:01 +0100)]
clk: qcom: dispcc-sm6125: Fix compatible string to match bindings

According to generic rules the SoC name should be first:

        arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dtb: clock-controller@5f00000: compatible: 'oneOf' conditional failed, one must be fixed:
                'qcom,dispcc-sm6125' does not match '^qcom,(apq|ipq|mdm|msm|qcm|qcs|sa|sc|sdm|sdx|sm)[0-9]+-.*$'

And this is already reflected by the bindings submitted prior to the
addition of this driver.  Any DTS following these rules will end up with
a non-probing driver because of this mismatch.

Fixes: 6e87c8f07407 ("clk: qcom: Add display clock controller driver for SM6125")
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221222210140.278077-1-marijn.suijten@somainline.org
22 months agoclk: qcom: Add camera clock controller driver for SM6350
Konrad Dybcio [Tue, 13 Dec 2022 15:26:16 +0000 (16:26 +0100)]
clk: qcom: Add camera clock controller driver for SM6350

Add support for the camera clock controller found on SM6350.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221213152617.296426-2-konrad.dybcio@linaro.org
22 months agodt-bindings: clock: add QCOM SM6350 camera clock bindings
Konrad Dybcio [Tue, 13 Dec 2022 15:26:15 +0000 (16:26 +0100)]
dt-bindings: clock: add QCOM SM6350 camera clock bindings

Add device tree bindings for camera clock controller for
Qualcomm Technology Inc's SM6350 SoC.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221213152617.296426-1-konrad.dybcio@linaro.org
22 months agoclk: qcom: smd-rpm: remove usage of platform name
Dmitry Baryshkov [Fri, 9 Dec 2022 16:48:55 +0000 (18:48 +0200)]
clk: qcom: smd-rpm: remove usage of platform name

Now that all clocks have individual names, remove the names of SoCs from
the SMD RPM clock definitions. Replace it with the common clk_smd_rpm_ prefix.

Reviewed-by: Alex Elder <elder@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221209164855.128798-20-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: smd-rpm: rename SMD_RPM_BUS clocks
Dmitry Baryshkov [Fri, 9 Dec 2022 16:48:54 +0000 (18:48 +0200)]
clk: qcom: smd-rpm: rename SMD_RPM_BUS clocks

Add special macro for the clocks of QCOM_SMD_RPM_BUS_CLK type. Use it to
insert the _bus_N part into the clock symbol name. The system (and
userspace) name of these clocks remains intact.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221209164855.128798-19-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: smd-rpm: rename the qcm2290 rf_clk3 clocks
Dmitry Baryshkov [Fri, 9 Dec 2022 16:48:53 +0000 (18:48 +0200)]
clk: qcom: smd-rpm: rename the qcm2290 rf_clk3 clocks

Rename the qcm2290_rf_clk3 clocks adding 38m4 prefix to distinguish it
from the common (19.2 MHz) rf_clk3. The system (and userspace) name of
these clocks remains intact.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221209164855.128798-18-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: smd-rpm: rename SMD_RPM_BRANCH clock symbols
Dmitry Baryshkov [Fri, 9 Dec 2022 16:48:52 +0000 (18:48 +0200)]
clk: qcom: smd-rpm: rename SMD_RPM_BRANCH clock symbols

To ease distinguishing between branch and non-branch clocks (e.g.
aggre1_noc, aggre2_noc and qdss) add '_branch' to all SMD_RPM_BRANCH*
clocks. The system (and userspace) name of these clocks remains intact.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221209164855.128798-17-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: smd-rpm: simplify SMD_RPM/_BRANCH/_QDSS clock definitions
Dmitry Baryshkov [Fri, 9 Dec 2022 16:48:51 +0000 (18:48 +0200)]
clk: qcom: smd-rpm: simplify SMD_RPM/_BRANCH/_QDSS clock definitions

Remove the duplication between the names of the normal and active-only
clocks by moving common sufixes to the clock definition macros. This
simplifies adding new clock definitions and reviewing existing defs.

Reviewed-by: Alex Elder <elder@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221209164855.128798-16-dmitry.baryshkov@linaro.org
22 months agoclk: qcom: smd-rpm: simplify XO_BUFFER clocks definitions
Dmitry Baryshkov [Fri, 9 Dec 2022 16:48:50 +0000 (18:48 +0200)]
clk: qcom: smd-rpm: simplify XO_BUFFER clocks definitions

Remove the duplication between the names of the normal and active-only
XO_BUFFER and XO_BUFFER_PINCTRL clocks by using preprocessor logic to
add _a suffix.

Reviewed-by: Alex Elder <elder@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221209164855.128798-15-dmitry.baryshkov@linaro.org