Arnd Bergmann
d4cb3e7113
clk: qcom: gcc-qcs404: fix duplicate initializer warning
...
In one of the clocks, a redundant initialization for .num_parents
got left behind by a recent patch:
drivers/clk/qcom/gcc-qcs404.c:63:32: error: initialized field overwritten [-Werror=override-init]
63 | .num_parents = 1,
| ^
Fixes: 2ce81afa0c ("clk: qcom: gcc-qcs404: sort out the cxo clock")
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Signed-off-by: Bjorn Andersson <andersson@kernel.org >
Link: https://lore.kernel.org/r/20230130135555.3268172-1-arnd@kernel.org
2023-01-30 08:41:06 -06:00
Dmitry Baryshkov
230d4d815d
clk: qcom: gcc-qcs404: add support for GDSCs
...
Add support for two GDSCs provided by this clock controller.
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/20221226042154.2666748-13-dmitry.baryshkov@linaro.org
2022-12-27 11:59:10 -06:00
Dmitry Baryshkov
2ce81afa0c
clk: qcom: gcc-qcs404: sort out the cxo clock
...
The GCC driver registers the cxo clock as a thin wrapper around board's
xo_board clock. Nowadays we can use the xo_board directly in all the
clocks that use it. Use the fw_name "cxo" for this 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/20221226042154.2666748-12-dmitry.baryshkov@linaro.org
2022-12-27 11:59:10 -06:00
Dmitry Baryshkov
9847a90c7c
clk: qcom: gcc-qcs404: 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.
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/20221226042154.2666748-11-dmitry.baryshkov@linaro.org
2022-12-27 11:59:10 -06:00
Dmitry Baryshkov
75aed8334e
clk: qcom: gcc-qcs404: 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/20221226042154.2666748-10-dmitry.baryshkov@linaro.org
2022-12-27 11:59:10 -06:00
Dmitry Baryshkov
fa1ea74261
clk: qcom: gcc-qcs404: get rid of the test clock
...
The test clock isn't in the bindings and apparently it's not used by
anyone upstream. Remove it.
Suggested-by: Stephen Boyd <swboyd@chromium.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/20221226042154.2666748-9-dmitry.baryshkov@linaro.org
2022-12-27 11:59:10 -06:00
Dmitry Baryshkov
a613af2ccb
clk: qcom: gcc-qcs404: fix the name of the HDMI PLL clock
...
The QCS404 uses 28nm HDMI PHY. The in-kernel driver doesn't provide the
PLL (yet), but the out of tree patches used the name "hdmi_pll" for it.
Other Qualcomm HDMI PHYs use either the name "hdmi_pll" (8960) or
"hdmipll" (8996). Thus change the expected HDMI PLL clock name to
"hdmi_pll".
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/20221226042154.2666748-8-dmitry.baryshkov@linaro.org
2022-12-27 11:59:10 -06:00
Dmitry Baryshkov
47d94d30cd
clk: qcom: gcc-qcs404: fix names of the DSI clocks used as parents
...
The QCS404 uses 28nm LPM DSI PHY, which registers dsi0pll and
dsi0pllbyte clocks. Fix all DSI PHY clock names used as parents inside
the GCC driver.
Fixes: 652f1813c1 ("clk: qcom: gcc: Add global clock controller driver for QCS404")
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/20221226042154.2666748-7-dmitry.baryshkov@linaro.org
2022-12-27 11:59:10 -06:00
Dmitry Baryshkov
712c64caf3
clk: qcom: gcc-qcs404: disable gpll[04]_out_aux parents
...
On the QCS404 platform the driver for the Global Clock Controller
doens't define gpll0_out_aux and gpll4_out_aux clocks, so it's not
possible to use them as parents. Remove entries for these clocks.
Note: backporting this patch to earlier kernels would also require a
previous patch which switches the gcc driver to use ARRAY_SIZE for
parent data arrays.
Fixes: 652f1813c1 ("clk: qcom: gcc: Add global clock controller driver for QCS404")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Bjorn Andersson <andersson@kernel.org >
Link: https://lore.kernel.org/r/20221226042154.2666748-6-dmitry.baryshkov@linaro.org
2022-12-27 11:59:10 -06:00
Dmitry Baryshkov
94238f6bfd
clk: qcom: gcc-qcs404: 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/20221226042154.2666748-5-dmitry.baryshkov@linaro.org
2022-12-27 11:59:10 -06:00
Jorge Ramirez-Ortiz
4168c1cada
clk: qcom: gcc: limit GPLL0_AO_OUT operating frequency
...
Limit the GPLL0_AO_OUT_MAIN operating frequency as per its hardware
specifications.
Co-developed-by: Niklas Cassel <niklas.cassel@linaro.org >
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org >
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org >
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Acked-by: Stephen Boyd <sboyd@kernel.org >
Link: https://lkml.kernel.org/r/20191125135910.679310-3-niklas.cassel@linaro.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org >
2019-12-18 22:07:52 -08:00
Amit Kucheria
b418bab452
clk: qcom: Initialize clock drivers earlier
...
Initialize the clock drivers on sdm845 and qcs404 in core_initcall so we
can have earlier access to cpufreq during booting.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org >
Acked-by: Stephen Boyd <sboyd@kernel.org >
Acked-by: Viresh Kumar <viresh.kumar@linaro.org >
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org >
Link: https://lore.kernel.org/r/75ae9c3a1c0e69b95818c6ffe7181fdeaaf2d70e.1571656015.git.amit.kucheria@linaro.org
2019-11-07 07:00:26 +01:00
Vinod Koul
593020811c
clk: qcom: gcc-qcs404: Use floor ops for sdcc clks
...
Update the gcc qcs404 clock driver to use floor ops for sdcc clocks. As
disuccsed in [1] it is good idea to use floor ops for sdcc clocks as we
dont want the clock rates to do round up.
[1]: https://lore.kernel.org/linux-arm-msm/20190830195142.103564-1-swboyd@chromium.org/
Signed-off-by: Vinod Koul <vkoul@kernel.org >
Link: https://lkml.kernel.org/r/20190906045659.20621-1-vkoul@kernel.org
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Signed-off-by: Stephen Boyd <sboyd@kernel.org >
2019-09-09 04:38:22 -07:00
Govind Singh
7d0c76bdf2
clk: qcom: Add WCSS gcc clock control for QCS404
...
Add support for the WCSS QDSP gcc clock control used on qcs404
based devices. This would allow wcss remoteproc driver to control
the required gcc clocks to bring the subsystem out of reset.
Signed-off-by: Govind Singh <govinds@codeaurora.org >
Signed-off-by: Stephen Boyd <sboyd@kernel.org >
2019-08-08 08:10:05 -07:00
Bjorn Andersson
e5bbbff5b7
clk: gcc-qcs404: Add PCIe resets
...
Enabling PCIe requires several of the PCIe related resets from GCC, so
add them all.
Reviewed-by: Niklas Cassel <niklas.cassel@linaro.org >
Acked-by: Rob Herring <robh@kernel.org >
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Reviewed-by: Vinod Koul <vkoul@kernel.org >
Signed-off-by: Stephen Boyd <sboyd@kernel.org >
2019-06-07 14:30:33 -07:00
Bjorn Andersson
8bc7a04bb7
clk: qcom: gcc-qcs404: Add CDSP related clocks and resets
...
Add the clocks and resets need in order to control the Turing
remoteproc.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Acked-by: Rob Herring <robh@kernel.org >
Signed-off-by: Stephen Boyd <sboyd@kernel.org >
2019-04-11 13:32:20 -07:00
Stephen Boyd
75f486c015
Merge branches 'clk-qcom-msm8998', 'clk-fractional-parent', 'clk-x86-mv' and 'clk-SA-fixes' into clk-next
...
- Updates for qcom MSM8998 GCC clks
- qcom MSM8998 RPM managed clks
- Random static analysis fixes for clk drivers
* clk-qcom-msm8998:
clk: qcom: Make common clk_hw registrations
clk: qcom: smd: Add support for MSM8998 rpm clocks
clk: qcom: Skip halt checks on gcc_usb3_phy_pipe_clk for 8998
clk: qcom: Add missing freq for usb30_master_clk on 8998
clk: qcom: Add CLK_SET_RATE_PARENT for 8998 branch clocks
* clk-fractional-parent:
clk: fractional-divider: check parent rate only if flag is set
* clk-x86-mv:
clk: x86: Move clk-lpss.h to platform_data/x86
* clk-SA-fixes:
clk: mediatek: fix platform_no_drv_owner.cocci warnings
clk: tegra: dfll: Fix debugfs_simple_attr.cocci warnings
clk: qoriq: Improve an error message
2019-03-08 10:29:15 -08:00
Jeffrey Hugo
760be6586f
clk: qcom: Make common clk_hw registrations
...
Several clock controller drivers define a list of clk_hw devices, and then
register those devices in probe() before using common code to process the
rest of initialization. Extend the common code to accept a list of clk_hw
devices to process, thus eliminating many duplicate implementations.
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org >
Suggested-by: Stephen Boyd <sboyd@kernel.org >
Reviewed-by: Vinod Koul <vkoul@kernel.org >
Tested-by: Vinod Koul <vkoul@kernel.org >
Signed-off-by: Stephen Boyd <sboyd@kernel.org >
2019-02-22 00:06:57 -08:00
Taniya Das
9d575719ca
clk: qcom: gcc-qcs404: Add cfg_offset for blsp1_uart3 clock
...
The CFG/M/N/D registers are at an offset of 0x20 from the CMD register
only for blsp1_uart3 clock, so add it for uart3 only.
Signed-off-by: Taniya Das <tdas@codeaurora.org >
Signed-off-by: Anu Ramanathan <anur@codeaurora.org >
Signed-off-by: Shawn Guo <shawn.guo@linaro.org >
Signed-off-by: Vinod Koul <vkoul@kernel.org >
Signed-off-by: Stephen Boyd <sboyd@kernel.org >
2019-02-21 14:18:13 -08:00
Srinivas Kandagatla
8a034aad48
clk: qcom: qcs404: Fix gpll0_out_main parent
...
gpll0_out_main parent is cxo so fix it.
Fixes: 652f1813c1 ("clk: qcom: gcc: Add global clock controller driver for QCS404")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Signed-off-by: Vinod Koul <vkoul@kernel.org >
Signed-off-by: Stephen Boyd <sboyd@kernel.org >
2018-12-10 11:31:30 -08:00
Vinod Koul
1aefa98b01
clk: qcom: gcc: Fix board clock node name
...
Device tree node name are not supposed to have "_" in them so fix the
node name use of xo_board to xo-board
Fixes: 652f1813c1 ("clk: qcom: gcc: Add global clock controller driver for QCS404")
Signed-off-by: Vinod Koul <vkoul@kernel.org >
Signed-off-by: Stephen Boyd <sboyd@kernel.org >
2018-11-09 14:13:55 -08:00
Shefali Jain
652f1813c1
clk: qcom: gcc: Add global clock controller driver for QCS404
...
Add the clocks supported in global clock controller which clock the
peripherals like BLSPs, SDCC, USB, MDSS etc. Register all the clocks
to the clock framework for the clients to be able to request for them.
Signed-off-by: Shefali Jain <shefjain@codeaurora.org >
Signed-off-by: Taniya Das <tdas@codeaurora.org >
Co-developed-by: Taniya Das <tdas@codeaurora.org >
Signed-off-by: Anu Ramanathan <anur@codeaurora.org >
[bamse, vkoul: rebase and tidyup for upstream]
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Signed-off-by: Vinod Koul <vkoul@kernel.org >
Acked-by: Rob Herring <robh@kernel.org >
[sboyd@kernel.org: Lowercase hex]
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2018-10-16 15:13:54 -07:00