summaryrefslogtreecommitdiff
path: root/drivers/clk
AgeCommit message (Collapse)AuthorFilesLines
2022-11-14clk:starfive:vout:Add parent about disp_apb clkXingyu Wu1-2/+2
Clock "u0_pclk_mux_func_pclk" is the parent of "disp_apb" clock. Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2022-11-14clk:starfive:vout:Add runtime and system pmXingyu Wu2-38/+111
Add runtime and system pm in vout clock tree driver. Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2022-11-01clk: starfive: Keep the clock apb0 enabled alwaysHal Feng1-1/+1
This solves crush problem of i2c runtime pm and prevents some aon modules from working abnormally. Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2022-10-28Merge branch 'CR_2412_515_Clocktree_PLL1_Xingyu.Wu' into 'jh7110-5.15.y-devel'andy.hu2-7/+1
CR_2412_515_Clocktree_PLL1_Xingyu.Wu See merge request sdk/linux!553
2022-10-28Merge branch 'CR_2440_515_Clocktree_1.5G_Xingyu.Wu' into 'jh7110-5.15.y-devel'andy.hu2-0/+36
CR_2440_515_Clocktree_1.5G_Xingyu.Wu See merge request sdk/linux!564
2022-10-27clk:starfive:isp:Add runtime and system pm controlXingyu Wu3-43/+126
Add runtime and system pm in isp clock tree driver. Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2022-10-26clk:starfive:Count PLL1 rateXingyu Wu2-7/+1
Count PLL1 rate through reading syscon registers. Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2022-10-26clk:starfive:Change PLL0 rate to 1.5GHzXingyu Wu2-0/+36
Change PLL0 rate to 1.5GHz and change cpu_core divider. Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2022-09-06clk:starfive:Set pll2 default rate to 1188mXingyu Wu1-1/+1
Change pll2_out default rate from 1228.8m to 1188m. Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2022-08-19clk:starfive:Modify 'stg_apb' clockXingyu Wu1-6/+5
Change 'stg_apb' clock from external clock to internal clock. Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2022-07-20clk:starfive:Update clk and reset api about voutxingyu.wu1-37/+22
Use 'clk_bulk_get' api to replace 'clk_get' and use 'share' replace 'exclusive' about reset. Signed-off-by: xingyu.wu <xingyu.wu@starfivetech.com>
2022-07-20clk:starfive:Update clk and reset api about ispxingyu.wu1-105/+31
Use 'clk_bulk_get' and 'devm_reset_control_array_get' api to replace 'clk_get' and 'devm_reset_control_get' api. Signed-off-by: xingyu.wu <xingyu.wu@starfivetech.com>
2022-07-20clk:starfive:Modify function format about 'jh7110_pll_data_from'xingyu.wu1-2/+2
Modify function format about 'jh7110_pll_data_from' Signed-off-by: xingyu.wu <xingyu.wu@starfivetech.com>
2022-07-20clk:starfive:Set PLL2 frequency when clock tree registeringxingyu.wu2-1/+14
In the file drivers/clk/starfive/clk-starfive-jh7110-pll.h, If set PLL2_DEFAULT_FREQ NULL of 0 , then PLL2 frequency is original. If set PLL2_DEFAULT_FREQ one of 'starfive_pll2_freq_value', then PLL2 frequency will be set the new rate during clock tree registering. Signed-off-by: xingyu.wu <xingyu.wu@starfivetech.com>
2022-07-20clk:starfive:Add PLL2 frequency controllerxingyu.wu4-25/+35
If enable CONFIG_CLK_STARFIVE_JH7110_PLL, also could read or set PLL1 clock's rate by reading or setting syscon registers. Signed-off-by: xingyu.wu <xingyu.wu@starfivetech.com>
2022-07-20clk:starfive:Add PLL0 frequency controllerxingyu.wu7-2/+765
If enable CONFIG_CLK_STARFIVE_JH7110_PLL, could read or set PLL0 clock's rate by reading or setting syscon registers. Signed-off-by: xingyu.wu <xingyu.wu@starfivetech.com>
2022-07-20clk:starfive:Modify the formatxingyu.wu7-110/+119
Modify the clocktree files' format Signed-off-by: xingyu.wu <xingyu.wu@starfivetech.com>
2022-07-20dt-bindings:clock:Delete external clock definitionsxingyu.wu5-0/+40
Move external clock definitions to C files that avoid illegal use. Signed-off-by: xingyu.wu <xingyu.wu@starfivetech.com>
2022-07-01clk:starfive:Update pmu Apixingyu.wu2-4/+14
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com> Signed-off-by: Walker Chen <walker.chen@starfivetech.com>
2022-06-08clk:starfive:jh7110: Change uart3-uart5 clk register infoyanhong.wang2-3/+13
The core_clk division register of uart3-uart5 include fractional and integral parts,but now only use the integral part,so include shift operation. The integral part include 8 bit,so the max value can be configed is 255.In order to support 115200 bandrate,so limit the max value to 10. Signed-off-by: yanhong.wang <yanhong.wang@starfivetech.com>
2022-05-30clk:starfive:Adjust clocks' flagxingyu.wu1-18/+18
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2022-05-25Merge branch 'CR_1051_CLOCK_TREE_Xingyu.Wu' into 'jh7110-5.15.y-devel'andy.hu2-36/+40
Cr 1051 clock tree xingyu.wu See merge request sdk/linux!83
2022-05-24clk:starfive:Modify the definitions instead of numbers in vout clock treexingyu.wu1-14/+18
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2022-05-24clk:starfive:Modify the critical clocks' flagsxingyu.wu1-22/+22
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2022-05-23Merge branch 'CR_1035_CLOCK_TREE_VOUT_Xingyu.Wu' into 'jh7110-5.15.y-devel'andy.hu1-1/+65
clk:starfive:Add top clocks and reset in vout clock tree See merge request sdk/linux!78
2022-05-23clk:starfive:jh7110: pll0 switches to 1250M.samin1-1/+1
pll0 switches to 1250M by spl. Signed-off-by: samin <samin.guo@starfivetech.com>
2022-05-20clk:starfive:Add top clocks and reset in vout clock treexingyu.wu1-1/+65
Signed-off-by: xingyu.wu <xingyu.wu@starfivetech.com>
2022-05-17clk:starfive:Change some clocks to 'ignore-unused'xingyu.wu4-17/+17
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2022-05-15clk:starfive:Change PLL0 dafalut value from 1250m to 1000mxingyu.wu1-1/+1
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2022-05-15driver:clk:Add noc clock initialization in isp clock tree driverxingyu.wu1-8/+72
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2022-05-15clk:starfive:Modify the clock to 'CLK_IGNORE_UNUSED' flagxingyu.wu3-52/+52
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2022-05-15clktree: jh7110: disable jh7110_clk_disable function interface.samin1-2/+2
/*do not upstram*/ The system will hang when clk_disable. need to debug. Signed-off-by: samin <samin.guo@starfivetech.com>
2022-04-28clk:starfive: Add definition instead of numbersxingyu.wu5-195/+230
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2022-04-28clk:starfive: Add isp clock tree driverxingyu.wu4-0/+296
Clock references refer to include/dt-bindings/clock/starfive-jh7110-isp.h Enable the isp clock tree driver in dts file if use it. If the fpga is not connetted with isp board, the isp clock tree must be disabled. Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2022-04-24risv:dts:starfive:Add timer clocktreexingyu.wu1-5/+5
1.Modify the clock tree driver to make timer clock ignore disabled_unused. 2.Add different 'clock-frequency' node in fpga, evb and visionfive dts file. Signed-off-by: xingyu.wu <xingyu.wu@starfivetech.com>
2022-04-19clk:starfive: Adjust the formatxingyu.wu6-526/+526
Adjust and modify the clock driver's format Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2022-04-13arch:riscv:Kconfig: Add choice with SOC board typexingyu.wu5-24/+26
Add config about user can choose the board type about FPGA, EVB or Visionfive Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2022-04-13clk:starfive: Add vout clock tree driverxingyu.wu4-0/+281
Clock references refer to include/dt-bindings/clock/starfive-jh7110-vout.h Change the value about 'status' of clkvout node in dts file when want to use vout clock. Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2022-04-13clk:starfive: Add JH7110 clock tree driver for kernel 5.15xingyu.wu9-0/+1643
Add clock driver about sys, stg and aon clock for JH7110. Clock references refer to include/dt-bindings/clock/starfive-jh7110-clkgen.h Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2021-10-30Merge tag 'clk-fixes-for-linus' of ↵Linus Torvalds1-5/+5
git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fix from Stephen Boyd: "One fix for the composite clk that broke when we changed this clk type to use the determine_rate instead of round_rate clk op by default. This caused lots of problems on Rockchip SoCs because they heavily use the composite clk code to model the clk tree" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: composite: Also consider .determine_rate for rate + mux composites
2021-10-18clk: composite: Also consider .determine_rate for rate + mux compositesMartin Blumenstingl1-5/+5
Commit 69a00fb3d69706 ("clk: divider: Implement and wire up .determine_rate by default") switches clk_divider_ops to implement .determine_rate by default. This breaks composite clocks with multiple parents because clk-composite.c does not use the special handling for mux + divider combinations anymore (that was restricted to rate clocks which only implement .round_rate, but not .determine_rate). Alex reports: This breaks lot of clocks for Rockchip which intensively uses composites, i.e. those clocks will always stay at the initial parent, which in some cases is the XTAL clock and I strongly guess it is the same for other platforms, which use composite clocks having more than one parent (e.g. mediatek, ti ...) Example (RK3399) clk_sdio is set (initialized) with XTAL (24 MHz) as parent in u-boot. It will always stay at this parent, even if the mmc driver sets a rate of 200 MHz (fails, as the nature of things), which should switch it to any of its possible parent PLLs defined in mux_pll_src_cpll_gpll_npll_ppll_upll_24m_p (see clk-rk3399.c) - which never happens. Restore the original behavior by changing the priority of the conditions inside clk-composite.c. Now the special rate + mux case (with rate_ops having a .round_rate - which is still the case for the default clk_divider_ops) is preferred over rate_ops which have .determine_rate defined (and not further considering the mux). Fixes: 69a00fb3d69706 ("clk: divider: Implement and wire up .determine_rate by default") Reported-by: Alex Bee <knaerzche@gmail.com> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://lore.kernel.org/r/20211016105022.303413-2-martin.blumenstingl@googlemail.com Tested-by: Alex Bee <knaerzche@gmail.com> Tested-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2021-10-13clk: qcom: add select QCOM_GDSC for SM6350Luca Weiss1-0/+1
QCOM_GDSC is needed for the gcc driver to probe. Fixes: 131abae905df ("clk: qcom: Add SM6350 GCC driver") Signed-off-by: Luca Weiss <luca@z3ntu.xyz> Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org> Link: https://lore.kernel.org/r/20211007212444.328034-2-luca@z3ntu.xyz Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2021-10-13clk: qcom: gcc-sm6115: Fix offset for hlos1_vote_turing_mmu_tbu0_gdscShawn Guo1-1/+1
It looks that the offset 0x7d060 is a copy & paste from above hlos1_vote_turing_mmu_tbu1_gdsc. Correct it to 0x7d07c as per downstream kernel. Fixes: cbe63bfdc54f ("clk: qcom: Add Global Clock controller (GCC) driver for SM6115") Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Link: https://lore.kernel.org/r/20210919022308.24046-1-shawn.guo@linaro.org Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2021-09-29Merge tag 'renesas-clk-for-v5.15-tag3' of ↵Stephen Boyd2-1/+3
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-fixes Pull Renesas clk driver fixes from Geert Uytterhoeven: - Fix inverted logic in RZ/G2L .is_enabled() function * tag 'renesas-clk-for-v5.15-tag3' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: rzg2l: Fix clk status function clk: renesas: r9a07g044: Mark IA55_CLK and DMAC_ACLK critical
2021-09-25clk: socfpga: agilex: fix duplicate s2f_user0_clkDinh Nguyen1-9/+0
Remove the duplicate s2f_user0_clk and the unused s2f_usr0_mux define. Fixes: f817c132db67 ("clk: socfpga: agilex: fix up s2f_user0_clk representation") Cc: stable@vger.kernel.org Signed-off-by: Dinh Nguyen <dinguyen@kernel.org> Link: https://lore.kernel.org/r/20210916225126.1427700-1-dinguyen@kernel.org Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2021-09-24clk: renesas: rzg2l: Fix clk status functionBiju Das1-1/+1
As per RZ/G2L HW(Rev.0.50) manual, clock monitor register value 0 means clock is not supplied and 1 means clock is supplied. This patch fixes the issue by removing the inverted logic. Fixing the above, triggered following 2 issues 1) GIC interrupts don't work if we disable IA55_CLK and DMAC_ACLK. Fixed this issue by adding these clocks as critical clocks. 2) DMA is not working, since the DMA driver is not turning on DMAC_PCLK. So will provide a fix in the DMA driver to turn on DMA_PCLK. Fixes: ef3c613ccd68 ("clk: renesas: Add CPG core wrapper for RZ/G2L SoC") Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20210922112405.26413-2-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2021-09-24clk: renesas: r9a07g044: Mark IA55_CLK and DMAC_ACLK criticalBiju Das1-0/+2
Add IA55_CLK and DMAC_ACLK as critical clocks. Previously it worked ok, because of a bug in clock status function and the following patch in this series fixes the original bug. Fixes: c3e67ad6f5a2 ("dt-bindings: clock: r9a07g044-cpg: Update clock/reset definitions") Fixes: eb829e549ba6 ("clk: renesas: r9a07g044: Add DMAC clocks/resets") Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20210922112405.26413-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2021-09-11Merge tag 'clk-for-linus' of ↵Linus Torvalds1-4/+0
git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fix from Stephen Boyd: "One patch to fix an unused variable warning in a Qualcomm clk driver" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: qcom: gcc-sm6350: Remove unused variable
2021-09-07Merge tag 'mfd-next-5.15' of ↵Linus Torvalds1-1/+2
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "Core Frameworks: - Add support for registering devices via MFD cells to Simple MFD (I2C) New Drivers: - Add support for Renesas Synchronization Management Unit (SMU) New Device Support: - Add support for N5010 to Intel M10 BMC - Add support for Cannon Lake to Intel LPSS ACPI - Add support for Samsung SSG{1,2} to ST-Ericsson's U8500 family - Add support for TQMx110EB and TQMxE40x to TQ-Systems PLD TQMx86 New Functionality: - Add support for GPIO to Intel LPC ICH - Add support for Reset to Texas Instruments TPS65086 Fix-ups: - Trivial, sorting, whitespace, renaming, etc; mt6360-core, db8500-prcmu-regs, tqmx86 - Device Tree fiddling; syscon, axp20x, qcom,pm8008, ti,tps65086, brcm,cru - Use proper APIs for IRQ map resolution; ab8500-core, stmpe, tc3589x, wm8994-irq - Pass 'supplied-from' property through axp288_fuel_gauge via swnode - Remove unused file entry; MAINTAINERS - Make interrupt line optional; tps65086 - Rename db8500-cpuidle driver symbol; db8500-prcmu - Remove support for unused hardware; tqmx86 - Provide a standard LPC clock frequency for unknown boards; tqmx86 - Remove unused code; ti_am335x_tscadc - Use of_iomap() instead of ioremap(); syscon Bug Fixes: - Clear GPIO IRQ resource flags when no IRQ is set; tqmx86 - Fix incorrect/misleading frequencies; db8500-prcmu - Mitigate namespace clash with other GPIOBASE users" * tag 'mfd-next-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (31 commits) mfd: lpc_sch: Rename GPIOBASE to prevent build error mfd: syscon: Use of_iomap() instead of ioremap() dt-bindings: mfd: Add Broadcom CRU mfd: ti_am335x_tscadc: Delete superfluous error message mfd: tqmx86: Assume 24MHz LPC clock for unknown boards mfd: tqmx86: Add support for TQ-Systems DMI IDs mfd: tqmx86: Add support for TQMx110EB and TQMxE40x mfd: tqmx86: Fix typo in "platform" mfd: tqmx86: Remove incorrect TQMx90UC board ID mfd: tqmx86: Clear GPIO IRQ resource when no IRQ is set mfd: simple-mfd-i2c: Add support for registering devices via MFD cells mfd/cpuidle: ux500: Rename driver symbol mfd: tps65086: Add cell entry for reset driver mfd: tps65086: Make interrupt line optional dt-bindings: mfd: Convert tps65086.txt to YAML MAINTAINERS: Adjust ARM/NOMADIK/Ux500 ARCHITECTURES to file renaming mfd: db8500-prcmu: Handle missing FW variant mfd: db8500-prcmu: Rename register header mfd: axp20x: Add supplied-from property to axp288_fuel_gauge cell mfd: Don't use irq_create_mapping() to resolve a mapping ...
2021-09-03clk: qcom: gcc-sm6350: Remove unused variableKonrad Dybcio1-4/+0
In the commit "clk: qcom: Add SM6350 GCC driver" (no hash yet) an unused variable has been overlooked. Remove it. Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org> Link: https://lore.kernel.org/r/5b7edab0-4756-94d0-d601-050120cbf4cb@somainline.org Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>