aboutsummaryrefslogtreecommitdiff
path: root/drivers/clk
AgeCommit message (Collapse)Author
2024-07-08clk: mediatek: mt7986: support alternative compatible for fixed-pllsChristian Marangi
Support alternative compatible for fixed-plls clocks used upstream with the compatible mediatek,mt7986-apmixedsys. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-07-08clk: mediatek: mt7988: support alternative compatible for fixed-pllsChristian Marangi
Support alternative compatible for fixed-plls clocks used upstream with the compatible mediatek,mt7988-apmixedsys. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-07-08clk: mediatek: mt7981: support alternative compatible for fixed-pllsChristian Marangi
Support alternative compatible for fixed-plls clocks used upstream with the compatible mediatek,mt7981-apmixedsys. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-19arm: mach-k3: j722s: introduce clock and device files for wkup splJayesh Choudhary
Include the clock and lpsc tree files needed for the wkup spl to initialize the proper PLLs and power domains to boot the SoC. Reviewed-by: Bryan Brattlof <bb@ti.com> Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
2024-06-19clk: ti: clk-k3: use IS_ENABLED macro and fix the clock-data orderJayesh Choudhary
Use IS_ENABLED macro for the platform clock-data list and add them in alphabetical order. Reviewed-by: Bryan Brattlof <bb@ti.com> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
2024-06-04Merge tag 'v2024.07-rc4' into nextTom Rini
Prepare v2024.070-rc4
2024-05-24clk: rockchip: rk3588: Set SPLL frequency during SPL stageHeiko Stuebner
All parts expect the SPLL to run at 702MHz. In U-Boot it's the SPLL_HZ declaring this rate and in the kernel it's a fixed clock definition. While everything is expecting 702MHz, the SPLL is not running that frequency when coming from the bootrom though, instead it's running at 351MHz and the vendor-u-boot just sets it to the expected frequency. The SPLL itself is located inside the secure-BUSCRU and in theory accessible as an SCMI clock, though this requires an unknown amount of cooperation from trusted-firmware to set at a later stage, though during the SPL stage we can still access the relevant CRU directly. The SPLL is for example necessary for the DSI controllers to produce output. As the SPLL is "just" another rk3588 pll, just set the desired rate directly during the SPL stage. Tested on rk3588-rock5b and rk3588-tiger by reading back the PLL rate and also observing working DSI output with this change. Fixes: 6737771600d4 ("rockchip: rk3588: Add support for sdmmc clocks in SPL") Suggested-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de> Cc: Jonas Karlman <jonas@kwiboo.se> Cc: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-05-20Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"Tom Rini
As part of bringing the master branch back in to next, we need to allow for all of these changes to exist here. Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-19Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""Tom Rini
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-13Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"Tom Rini
Roger Quadros <rogerq@kernel.org> says: Sync AM62 device tree files with Linux v6.9 and add in the missing bits in -u-boot.dtsi to get CPSW Ethernet working. CI testing: https://github.com/u-boot/u-boot/pull/534
2024-05-07Merge patch series "arm: Add Analog Devices SC5xx Machine Type"Tom Rini
Greg Malysa <greg.malysa@timesys.com> says: This series adds support for the ADI SC5xx machine type and includes two core drivers that are required for being able to boot any board--a UART driver, the gptimer driver which is used as a clock reference (CNTVCNT is not supported on the armv7 sc5xx SoCs) and the clock tree driver. Our corresponding Linux support relies on u-boot configuring the clocks correctly before booting, so it is not possible to boot any board without the CGU/CDU configuration happening here. There are also no board files, device trees, or defconfigs included here, but some common definitions that will be used to build board files currently are. The sc5xx SoCs themselves include many armv7 families (sc57x, sc58x, and sc594) all using an ARM Cortex-A5, and one armv8 family (sc598) indended to be a drop-in replacement for the SC594 in terms of peripherals, with a Cortex-A55 instead. Some of the configuration code in dmcinit and clkinit is quite scary and causes a lot of checkpatch violations. It is modified from code initially provided by ADI, but it has not been fully rewritten. There's a question of how important it is to clean up this code--it has some quality violations, but it has been in use (including in production) for over two years and is known to work for performing the low level SoC initialization, while a rewrite might introduce timing or sequence bugs that could take a significant amount of time to detect in the future.
2024-05-07drivers: clk: adi: Add in SC5XX-family clock driverNathan Barrett-Morrison
This adds support for the SC5XX clock trees which are required for reading clock speeds on the SoCs. This is largely a port of the same support for Linux, which has not yet been submitted upstream. Co-developed-by: Greg Malysa <greg.malysa@timesys.com> Signed-off-by: Greg Malysa <greg.malysa@timesys.com> Co-developed-by: Ian Roberts <ian.roberts@timesys.com> Signed-off-by: Ian Roberts <ian.roberts@timesys.com> Signed-off-by: Vasileios Bimpikas <vasileios.bimpikas@analog.com> Signed-off-by: Utsav Agarwal <utsav.agarwal@analog.com> Signed-off-by: Arturs Artamonovs <arturs.artamonovs@analog.com> Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
2024-05-07clk: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this driver directory and when needed add missing include files directly. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-07clk: rockchip: rk3328: Add SCLK_USB3OTG_REF supportJonas Karlman
The SCLK_USB3OTG_REF clocks is used as reference clock for USB3 block. Add simple support to get rate of SCLK_USB3OTG_REF clocks to fix reference clock period configuration. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-05-07clk: rockchip: rk3399: Add SCLK_USB3OTGx_REF supportJonas Karlman
The SCLK_USB3OTGx_REF clocks is used as reference clock for USB3 block. Add simple support to get rate of SCLK_USB3OTGx_REF clocks to fix reference clock period configuration. Also replace use of 24000000 with the OSC_HZ constant. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-05-07clk: rockchip: rk3399: Improve support for SCLK_PCIEPHY_REF clockJonas Karlman
rk3399-nanopi-4.dtsi try to set parent of and set rate to 100 MHz of the SCLK_PCIEPHY_REF clock. The existing enable/disable ops for SCLK_PCIEPHY_REF currently force use of 24 MHz parent and rate. Add improved support for setting parent and rate of the pciephy refclk to driver to better support assign-clock props for pciephy refclk in DT. This limited implementation only support setting 24 or 100 MHz rate, and expect npll and clk_pciephy_ref100m divider to use default values. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-05-07clk: rockchip: rk3399: Add dummy support for ACLK_VDU clockJonas Karlman
rk3399.dtsi from linux v5.19 and newer try to set VDU clock rate to 400 MHz using an assigned-clock-rates prop of the CRU node. U-Boot does not use or need this clock so add dummy support for getting and setting ACLK_VDU clock rate to allow CRU driver to be loaded with an updated rk3399.dtsi. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-05-07clk: rockchip: rk3399: Rename SCLK_DDRCLK to SCLK_DDRCJonas Karlman
Sync rk3399-cru.h with one from Linux kernel v6.2+ and fix use of the SCLK_DDRCLK name that was only used by U-Boot. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-05-06global: Make <asm/global_data.h> include <asm/u-boot.h>Tom Rini
This follows the example of RISC-V where <asm/global_data.h> includes <asm/u-boot.h> directly as "gd" includes a reference to bd_info already and so the first must include the second anyhow. We then remove <asm/u-boot.h> from all of the places which include references to "gd" an so have <asm/global_data.h> already. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-04-26clk: rockchip: rk356x: Fix set rate of SCLK_SFC clockJonas Karlman
The SCLK_SFC can be set to a rate of 24, 50, 75, 100, 125 or 150 MHz. However, clk_set_rate() will fail unless one of those exact rates are used, and with newer and updated device tree files that contain spi-max-frequency values that does not exactly match these rates use of SPI flash may fail. Fix this by using the highest possible rate that exceeds or is equal to the requested rate. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-04-26clk: rockchip: rk3588: Add REF_CLK_USB3OTGx supportJonas Karlman
The REF_CLK_USB3OTGx clocks is used as reference clock for USB3 block. Add simple support to get rate of REF_CLK_USB3OTGx clocks to fix reference clock period configuration. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Acked-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-04-26clk: rockchip: rk356x: Add CLK_USB3OTGx_REF supportJonas Karlman
The CLK_USB3OTGx_REF clocks is used as reference clock for USB3 block. Add simple support to get rate of CLK_USB3OTGx_REF clocks to fix reference clock period configuration. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Acked-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-04-26rockchip: rk3308: Move cru and grf include files to arch-rockchipJonas Karlman
Move cru_rk3308.h and grf_rk3308.h to arch-rockchip to match path used for all other Rockchip SoCs. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-04-26clk: rockchip: rk3308: Add dummy support for USB480M clockJonas Karlman
Add dummy support for setting parent of USB480M clock. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-04-26clk: rockchip: rk3308: Add support for SCLK_RTC32K clockFinley Xiao
Add support to get and set the SCLK_RTC32K clock rate. Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> [jonas@kwiboo.se: Update commit message] Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-04-23apq8016: Add support for UART1 clocks and pinmuxSumit Garg
SE HMIBSC board uses UART1 as the main debug console, so add corresponding clocks and pinmux support. Along with that update instructions to enable clocks for debug UART support. Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-04-23clk/qcom: ipq4019: return valid rate when setting UART clockCaleb Connolly
clk_set_rate() should return the clock rate that was set. The IPQ4019 clock driver doesn't set any rates yet but it should still return the expected value so that drivers can work properly. For a baud rate of 115200 with an expected bit clock divisor of 16, the clock rate should be 1843200 so return that frequency. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-04-23clk/qcom: apq8016: return valid rate when setting UART clockCaleb Connolly
The clk_init_uart() helper always returns 0, but we're meant to return a real clock rate. Given that we hardcode 115200 baud, just return the clock rate that we set. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-04-23clk: qcom: Add SM8650 clock driverNeil Armstrong
Add the GCC and TCSRCC clock driver for the SM8650 SoC. The GCC driver uses the clk-qcom infrastructure to support GDSCs, Resets and gates. While the TCSRCC is a simpler clock driver which only supports gates. The GCC enable and set_rate callbacks contains some tweaks to setup clocks for Debug UART, SDCard controller and USB. The TCSRCC gates returns the XO frequency, which is used by the Synopsys eUSB2 driver to determine the PHY configuration. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-04-23clk: qcom: Add SM8550 clock driverNeil Armstrong
Add the GCC and TCSRCC clock driver for the SM8550 SoC. The GCC driver uses the clk-qcom infrastructure to support GDSCs, Resets and gates. While the TCSRCC is a simpler clock driver which only supports gates. The GCC enable and set_rate callbacks contains some tweaks to setup clocks for Debug UART, SDCard controller and USB. The TCSRCC gates returns the XO frequency, which is used by the Synopsys eUSB2 driver to determine the PHY configuration. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-04-23clk/qcom: sdm845: enable SDCC2 core clockCaleb Connolly
Allow setting the clock rate for the SD card core clock. This is required for SD card support on SDM845 devices. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-04-23clk/qcom: add driver for sm8250 GCCCaleb Connolly
Add a clock driver for the SM8250 SoC. This driver can enable necessary clocks for UART, UFS, USB, and MMC. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-04-23clk/qcom: add driver for sm6115 GCCCaleb Connolly
Add a driver for the clock controller in the SM6115 SoC, this is used in the QRB4210 RB2 board. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-04-23clk/qcom: add driver for qcm2290 GCCCaleb Connolly
Add a clock driver for the QCM2290 SoC which is used in the QRB2210 RB1 board. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-04-22Merge patch series "Kconfig: some cleanups"Tom Rini
Michal Simek <michal.simek@amd.com> says: I looked as cleaning up some dependencies and I found that qconfig is reporting some issues. This series is fixing some of them. But there are still some other pending. That's why please go and fix them if they are related to your board. UTF-8: I am using uni2ascii -B < file to do conversion. When you run it in a loop you will find some other issue with copyright chars or some issues in files taken from the Linux kernel like DTs. They should be likely fixed in the kernel first. Based on discussion I am ignoring names too.
2024-04-22common: Convert *.c/h from UTF-8 to ASCII enconfingMichal Simek
Convert UTF-8 chars to ASCII in cases where make sense. No Copyright or names are converted. Signed-off-by: Michal Simek <michal.simek@amd.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Marek Behún <kabel@kernel.org>
2024-04-22Kconfig: Remove trailing whitespace in its promptMichal Simek
All errors are generated by ./tools/qconfig.py -b -j8 -i whatever. Error look like this: warning: SPL_CLK_CCF (defined at drivers/clk/Kconfig:59) has leading or trailing whitespace in its prompt Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-04-21Merge tag 'video-20240421' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-video CI: https://source.denx.de/u-boot/custodians/u-boot-video/-/pipelines/20466 - simple_panel: support timing parsing from EDID - dw_hdmi: fix gcc-14 compiler warnings - dw_hdmi: support vendor PHY for HDMI - rockchip: add Rockchip INNO HDMI PHY driver - rockchip: RK3328 HDMI and VOP support - evb-rk3328: enable vidconsole support - Tegra DC and DSI improvements and Tegra 114 support - add LG LG070WX3 MIPI DSI panel driver - add Samsung LTL106HL02 MIPI DSI panel driver - add Toshiba TC358768 RGB to DSI bridge support - add basic support for the Parade DP501 transmitter - Tegra 3 panel and bridge driver improvements - simplefb: modernise DT parsing - fdt_simplefb: Enumerate framebuffer info from video handoff - preserve framebuffer if SPL is passing video hand-off - fdt_support: allow reserving FB region without simplefb
2024-04-21clk: rk3328: Add get hdmiphy clockJagan Teki
Add support to get the hdmiphy clock for RK3328 PCLK_HDMIPHY. Signed-off-by: Jagan Teki <jagan@edgeble.ai>
2024-04-21clk: rockchip: rk3328: Add VOP clk supportJagan Teki
VOP get and set clock would needed for VOP drivers. Add support for it. Signed-off-by: Jagan Teki <jagan@edgeble.ai>
2024-04-20clk: imx8mm: Add support for PCIe clocksTim Harvey
Add support for PCIe clocks required to enable PCIe support on iMX8MM SoC. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Marek Vasut <marex@denx.de>
2024-04-15clk: imx93: fix anatop basePeng Fan
The PLL clk needs use anatop base, otherwise wrong PLL address will be used. Fixes: 9c153e46661b ("clk: imx: add i.MX93 CCF driver") Signed-off-by: Peng Fan <peng.fan@nxp.com>
2024-04-05Merge tag 'qcom-next-2024Apr04' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-snapdragon - Ethernet, i2c, and USB support are now enabled by default - The clock driver gets some bug fixes and cleanup - Invalid FDTs are now properly detected in board_fdt_blob_setup(). - The pinctrl driver gains preparatory support for per-pin function muxes. - Support is added for two generations of Qualcomm HighSpeed USB PHY - A power domain driver is added for the Globall Distributed Switch Controllers on the GCC hardware block. - SDM845 gains USB host mode support. - OF_LIVE is enabled by default for Qualcomm platforms - Some U-Boot devicetree compatibility fixups are added during init to improve compatbility with upstream DT.
2024-04-05Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-samsungTom Rini
2024-04-04clk/qcom: sdm845: add USB clocksCaleb Connolly
Most devices only initialise the USB clocks for us if we boot via "fastboot boot", add the missing clock configuration to get both USB ports working regardless of the bootloader state. Reviewed-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-04-04clk/qcom: sdm845: add gdscsCaleb Connolly
Define the GDSC power domains for SDM845. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-04-04clk/qcom: use offsets for RCG registersCaleb Connolly
The RCG registers always have the same offsets, so only store the base CMD register address and calculate the others relative to that. Reviewed-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-04-04mach-snapdragon: disable power-domains for pre-reloc driversCaleb Connolly
Some devices like the UART and clock controller reference an RPM(h) power domain. We don't support this device in U-Boot, so add DM_FLAG_DEFAULT_PD_CTRL_OFF to tell DM core not to try and enable the power domain. Reviewed-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-04-04clk: qcom: clear div mask before assigning a new dividerVolodymyr Babchuk
The current behaviour does a bitwise OR of the previous and new divider values, this is wrong as some bits may be set already. We need to clear all the divider bits before applying new ones. This fixes potential issue with 1Gbit ethernet on SA8155P-ADP boards. Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> Reviewed-by: Sumit Garg <sumit.garg@linaro.org> [caleb: minor wording fix] Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-04-04clk: qcom: add support for power domains uclassVolodymyr Babchuk
Now sub-drivers for particular SoCs can register them as power domain drivers. This is needed for upcoming SM8150 support, because it needs to power up the Ethernet module. Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> Reviewed-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> [caleb: make ARCH_SNAPDRAGON select POWER_DOMAIN] Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>