summaryrefslogtreecommitdiff
path: root/drivers/clk/imx
AgeCommit message (Collapse)Author
2026-02-28clk: imx6q: add ipu and ldb clocks and dependenciesBrian Ruley
This is required for the IPUv3 driver to migrate to CCF, changes are largely based on the Linux kernel equivalent. Add new gate2_flags function (also present in the Linux code) to set required flags. Add usboh clock to get rid of error. Signed-off-by: Brian Ruley <[email protected]>
2026-02-28clk: imx6q: apply clang-formatBrian Ruley
Reduces the number of checkpatch warnings in the following commits. Signed-off-by: Brian Ruley <[email protected]>
2025-09-22Merge tag 'u-boot-imx-next-20250922' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/27684 - Add i.MX8 ahab-commit command. - Add support for flashing board with UUU on imx93_frdm. - Fix the acces of PFUZE100 regulator desc. - Add more i.MX6 PWM clock definitions. - Enable OP-TEE on phytec-imx8m and update documentation. - Enable PCI host controller on iMX95 19x19 EVK. [trini: Fixup spacing issues] Signed-off-by: Tom Rini <[email protected]>
2025-09-22clk: imx6q: Add definition for missing PWM clocksRicardo Simoes
Following the work done in commit 7f39ad5a ("clk: imx6q: Add definition for IMX6QDL_CLK_PWM1"), this commit adds definitions for PWM2, PWM3, and PWM4 clocks. Allowing one to use these PWM modules together with DM_CLK. Note that the solution was verified only against PWM3. Signed-off-by: Ricardo Simoes <[email protected]> Signed-off-by: Mark Jonas <[email protected]>
2025-09-20clk: imx: Add imx95 blkctrl clock driverYe Li
Add iMX95 blkctrl clock driver which implements clocks for HSIOMIX blkctrl and LVDS blkctrl. Since multiple blkctrl device for different blkctrl may be enabled, and each has dedicated clock id from 0. We must enable CLK_AUTO_ID to avoid conflict on clock id. Signed-off-by: Ye Li <[email protected]>
2025-08-07clk: imx: Free pll on error pathAndrew Goodbody
For an unknown pll type the error path neglects to free the memory just allocated. Add the free. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-06-14Merge patch series "linux/bitfield.h: sync <linux/bitfield.h> from Linux ↵Tom Rini
6.15 + winbond" Christian Marangi <[email protected]> says: This small series sync linux/bitfield.h from Linux 6.15 and fix all the compilation error due to a change in the header include. The sync is needed to make it easier to support the winbond changes. The changes are CI test with [1] [1] https://github.com/u-boot/u-boot/pull/777 Link: https://lore.kernel.org/r/[email protected]
2025-06-14clk: imx: add missing linux/bug.h header for WARNChristian Marangi
The WARN macro requires inclusion of linux/bug.h header. It does currently work as bitfield.h includes it indirectly but this will change when bitfield.h will be synced with new Linux version. Explicitly include the header to fix future compilation error. Signed-off-by: Christian Marangi <[email protected]>
2025-05-31clk: imx: add i.MX6UL clk driverMichael Trimarchi
Add i.MX6UL clk driver for i.MX6UL CLK driver model usage Reviewed-by: Peng Fan <[email protected]> Reviewed-by: Christoph Niedermaier <[email protected]> Tested-by: Christoph Niedermaier <[email protected]> Signed-off-by: Michael Trimarchi <[email protected]>
2025-05-12spi: fspi: Add imxrt1170 device dataJonathan Currier
Add the device specific driver data, and the clock configuration. Signed-off-by: Jonathan Currier <[email protected]>
2025-04-28clk: imx: Pass CCM udevice into clk_register_composite()Marek Vasut
Pass the clock controller udevice into clk_register_composite(), so it can be passed further to any registered composite clocks and used for look up of parent clock referenced in DT "clocks" and "clock-names" properties by phandle and name pair. Use the clock controller udevice in imx8m_clk_mux_set_parent() to perform accurate look up of parent clock referenced in the CCM driver by name. If the clock name that is being looked up matches one of the names listed in the clock controller DT node "clock-names" array property, then the offset of the name is looked up in the "clocks" DT property and the phandle at that offset is resolved to the parent clock udevice. The test to determine whether a particular driver instance registered with clock uclass matches the parent clock is done by comparing the OF nodes of the clock registered with clock uclass and parent clock resolved from the phandle. Example: drivers/clk/imx/clk-imx8mm.c: static const char * const imx8mm_a53_sels[] = {"osc_24m", "arm_pll_out", ... _____________| arch/arm/dts/imx8mm.dtsi: | clk: clock-controller@30380000 { v clock-names = "osc_32k", "osc_24m", ... | v clocks = <&osc_32k>, <&osc_24m>, ... }; _______________________| ... | / { v osc_24m: clock-osc-24m { compatible = "fixed-clock"; ... }; Signed-off-by: Marek Vasut <[email protected]> Reported-by: Francesco Dolcini <[email protected]> Tested-by: Fabio Estevam <[email protected]> Tested-by: Adam Ford <[email protected]> # imx8mp-beacon
2025-04-25clk: imx: Finish converting clock-osc-24 back to osc_24Adam Ford
The UART clocks were added around the same time some other clock updates were happening, so converting clock-osc-24 back to osc_24 was missed on the UART clocks for imx8mm and imx8mn, so update them here. Fixes: b4734c9c333b ("clk: imx: Convert clock-osc-* back to osc_*") Signed-off-by: Adam Ford <[email protected]> Reported-by: Christoph Niedermaier <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2025-04-10clk: imx8mp: Add media related clocksMiquel Raynal
These are all the clocks needed to get an LCD panel working, going through one of the LCDIF and the LDB. The media AXI and APB clocks are also described. Signed-off-by: Miquel Raynal <[email protected]>
2025-03-24clk: imx: Pass struct udevice into imx_clk_fixed_factor*()Marek Vasut
Pass struct udevice * into imx_clk_fixed_factor*() functions, so the clock core would have access to parent struct udevice *. Signed-off-by: Marek Vasut <[email protected]>
2025-03-24clk: imx: Pass struct udevice into imx_clk_divider*()Marek Vasut
Pass struct udevice * into imx_clk_divider*() functions, so the clock core would have access to parent struct udevice *. Signed-off-by: Marek Vasut <[email protected]>
2025-03-24clk: imx: pllv3: Resolve parent clock by nameMarek Vasut
Use clock-names property which is accessible via parent clock OF node to look up the parent clock by name instead of depending on unreliable global clock name to perform look up. Signed-off-by: Marek Vasut <[email protected]>
2025-03-24clk: imx: Pass struct udevice into imx_clk_pllv3*()Marek Vasut
Pass struct udevice * into imx_clk_pllv3*() functions, so the clock core would have access to parent struct udevice *. Signed-off-by: Marek Vasut <[email protected]>
2025-03-24clk: imx: Convert clock-osc-* back to osc_*Marek Vasut
Convert clock-osc-24m back to osc_24m and clock-osc-32k back to osc_32k. These are the clock which match clock tables in Linux. This is now possible because the clock drivers now resolve clock names based on clock-names DT property in the CCM DT node. Signed-off-by: Marek Vasut <[email protected]>
2025-03-24clk: imx: Pass struct udevice into imx_clk_composite*()Marek Vasut
Pass struct udevice * into imx_clk_composite*() functions, so the clock core would have access to parent struct udevice *. Signed-off-by: Marek Vasut <[email protected]>
2025-03-24clk: imx: Pass struct udevice to clk_register_gate*()Marek Vasut
Pass U-Boot specific struct udevice pointer to clock parent device to clk_register_gate*(), so clk_register_gate*() can access the parent udevice. Signed-off-by: Marek Vasut <[email protected]>
2025-03-24clk: imx: Pass struct udevice into imx_clk_gate*()Marek Vasut
Pass struct udevice * into imx_clk_gate*() functions, so the clock core would have access to parent struct udevice *. Signed-off-by: Marek Vasut <[email protected]>
2025-03-24clk: imx: gate2: Resolve parent clock by nameMarek Vasut
Use clock-names property which is accessible via parent clock OF node to look up the parent clock by name instead of depending on unreliable global clock name to perform look up. Signed-off-by: Marek Vasut <[email protected]>
2025-03-24clk: imx: gate2: Use struct udevice instead of struct deviceMarek Vasut
Use U-Boot specific struct udevice instead of Linux compatibility struct device in gate2 clock registration. Signed-off-by: Marek Vasut <[email protected]>
2025-03-24clk: imx: Pass struct udevice to clk_register_mux()Marek Vasut
Pass U-Boot specific struct udevice pointer to clock parent device to clk_register_mux(), so clk_register_mux() can access the parent udevice. Signed-off-by: Marek Vasut <[email protected]>
2025-03-24clk: imx: Pass struct udevice into imx_clk_mux*()Marek Vasut
Pass struct udevice * into imx_clk_mux*() functions, so the clock core would have access to parent struct udevice *. Signed-off-by: Marek Vasut <[email protected]>
2025-03-19clk: imx: select SPL_CLK_COMPOSITE_CCF when SPL_CLK_IMX8MPAdam Ford
If SPL_CLK_IMX8MP is selected alone, it causes a build error. The clock composite is required when using the clock framework, so select it when SPL_CLK_IMX8MP is enabled. This is already being done outside of SPL. Signed-off-by: Adam Ford <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2025-03-19clk: imx8mn: register UART clocksAdam Ford
In order to let the serial driver enable the clocks, the UART clocks must be registered first. Signed-off-by: Adam Ford <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2025-03-19clk: imx8mm: register UART clocksAdam Ford
In order to let the serial driver enable the clocks, the UART clocks must be registered first. Signed-off-by: Adam Ford <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2025-03-19clk: imx6q: Register UART clocksAdam Ford
In order to use the driver model and clock system to enable UART clocks from the serial driver, it's necessary to register the UART clocks. With the helper function to check for imx6qp vs other variants, the UART can register for both scenarios. Signed-off-by: Adam Ford <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2025-03-19clk: imx6q: Properly handle imx6qp ECSPI clk_selsAdam Ford
The ECSPI clock has the ability to select between pll3_60m and osc on the imx6qp, where it's fixed on other variants. Fix this by adding using a helper function to determine SoC variant and register the clock accordingly. Signed-off-by: Adam Ford <[email protected]> Reviewed-by: Michael Trimarchi <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2024-12-07clk: imx: clk-fracn-gppll: Add new PLL rateYe Li
Add new rates to integer and frac PLL to support iMX91 Signed-off-by: Ye Li <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2024-12-07clk: imx93: support i.MX91Peng Fan
i.MX91 is a derived from i.MX93, and most clocks could be reused from i.MX93. Also Update imx93-clock.h to sync with linux next. Signed-off-by: Peng Fan <[email protected]>
2024-10-25imx: imxrt1050-evk: Fix missing clocks for mmcJesse Taube
Two of the clocks required by the usdhc1 controller are missing from the clock controller node. A recent change enables all the clocks in the esdhc node, which fails as they are not defined in the clock controller. Fixes: 76332fae769 ("mmc: fsl_esdhc_imx: Enable AHB/IPG clk with clk bulk API") Signed-off-by: Jesse Taube <[email protected]> Cc: Peng Fan <[email protected]>
2024-10-18clk: imx8: Add dummy clkPeng Fan
There is a dummy clk entry for i.MX8QM/QXP, so add the dummy clk enable and get rate. Otherwise "__imx8_clk_enable(Invalid clk ID #0)". Fixes: 76332fae769 ("mmc: fsl_esdhc_imx: Enable AHB/IPG clk with clk bulk API") Reviewed-by: Heiko Schocher <[email protected]> Signed-off-by: Peng Fan <[email protected]> Tested-by: Heiko Schocher <[email protected]>
2024-10-13clk: imx8mp: Add i.MX8MP Dummy clkPeng Fan
i.MX8MP SDHC use CLK_IMX8MP_DUMMY clk entry. Without the clk, the bulk api will return failure. The correct entry should be replaced with IMX8MP_IPG_ROOT clk in device tree. This will be done in Kernel device tree and sync to U-Boot in future: https://lore.kernel.org/all/[email protected]/ Fixes: 76332fae769 ("mmc: fsl_esdhc_imx: Enable AHB/IPG clk with clk bulk API") Reported-by: Gilles Talis <[email protected]> Tested-by: Gilles TALIS <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2024-10-11global: Rename SPL_TPL_ to PHASE_Simon Glass
Use PHASE_ as the symbol to select a particular XPL build. This means that SPL_TPL_ is no-longer set. Update the comment in bootstage to refer to this symbol, instead of SPL_ Signed-off-by: Simon Glass <[email protected]>
2024-10-11drivers: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILDSimon Glass
Use the new symbol to refer to any 'SPL' build, including TPL and VPL Signed-off-by: Simon Glass <[email protected]>
2024-08-02clk: imx8m: register ARM A53 core clockHou Zhiqiang
Register ARM A53 core clock for i.MX 8M Mini, Nano and Plus, preparing for enabling the 'cpu' command, which depends on this to print CPU core frequency. Signed-off-by: Hou Zhiqiang <[email protected]>
2024-07-22Merge tag 'u-boot-imx-master-20240722' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/21728 - Conversions to DM_I2C and DM_SERIAL. - Support for I2C3 and PWM1 for the imx6q clock driver. - Improvements for udoo-neo - Describe the i.MX93 CPU clocks in the devicetree to fix CPU clock printing - Fix for SPI and NANC clk-imx8mn clock driver
2024-07-22clk: imx6q: Add definition for IMX6QDL_CLK_PWM1Emil Kronborg
Enabling CONFIG_CMD_PWM, and consequently CONFIG_DM_PWM, causes the pwm command to fail due to a missing clock. => pwm enable 0 0 Enable clock-controller@20c4000 failed Failed to enable per_clk pwm: '0' not found Command 'pwm' failed: Error -2 Note that it is trivial to also add the clocks for PWM2, PWM3, and PWM4. However, I only tested PWM1 and thus only added the clock for that signal. Signed-off-by: Emil Kronborg <[email protected]>
2024-07-22clk: imx6q: Add definition for IMX6QDL_CLK_I2C3Emil Kronborg
Commit 727fa4539ca2 ("clk: Add support for I2C clocks on NXP's imx6q SoC which use CCF") added I2C clocks for I2C1 and I2C2, but not I2C3. Consequently, devices using I2C3 fail after enabling CONFIG_CLK_IMX6Q and thus CONFIG_CLK. Therefore, this commit adds the last I2C clock. Signed-off-by: Emil Kronborg <[email protected]>
2024-07-22clk: imx8mp: Make parent names arrays const pointersMichael Trimarchi
The arrays containing the mux selectors need to be of const pointer to const char. Signed-off-by: Michael Trimarchi <[email protected]>
2024-07-22clk: imx8mm: Make parent names arrays const pointersMichael Trimarchi
The arrays containing the mux selectors need to be of const pointer to const char. Signed-off-by: Michael Trimarchi <[email protected]>
2024-07-22clk: imx8mn: Make parent names arrays const pointersMichael Trimarchi
The arrays containing the mux selectors need to be of const pointer to const char. Signed-off-by: Michael Trimarchi <[email protected]>
2024-07-22clk: imx: clk-imx8mn Fix nand and spi clock parentMichael Trimarchi
The osc_24m is the clock-output-name and not the one that is used as internal name reference from the strcmp. The clock that use osc_24m, will not be able to reparent it as they should. We need anyway register the osc_24m clock fixed factor in the clock tree. Fixes: 710c4ffb890 ("clk: imx: clk-imx8mn add gpmi nand clocks") Fixes: 85b1c11989c ("clk: imx: Add ECSPI to iMX8MN") Cc: Marek Vasut <[email protected]> Signed-off-by: Michael Trimarchi <[email protected]>
2024-07-22drivers: clk: Remove duplicate newlinesMarek Vasut
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <[email protected]>
2024-07-06clk: imx: add mux ops for i.MX8M composite clkMichael Trimarchi
Upstream Linux commit f90b68d6c8b0. The CORE/BUS root slice has following design, simplied graph: The difference is core not have pre_div block. A composite core/bus clk has 8 inputs for mux to select, saying clk[0-7]. It support target(smart) interface and normal interface. Target interface is exported for programmer easy to configure ccm root. Normal interface is also exported, but we not use it in our driver, because it will introduce more complexity compared with target interface. The normal interface simplified as below: SEL_A GA +--+ +-+ | +->+ +------+ CLK[0-7]--->+ | +-+ | | | | +----v---+ +----+ | +--+ |pre_diva+----> | +---------+ | +--------+ |mux +--+post_div | | +--+ |pre_divb+--->+ | +---------+ | | | +----^---+ +----+ +--->+ | +-+ | | +->+ +------+ +--+ +-+ SEL_B GB The mux in the upper pic is not the target interface MUX, target interface MUX is hiding SEL_A and SEL_B. When you choose clk[0-7], you are actually writing SEL_A or SEL_B depends on the internal counter which will also control the internal "mux". The target interface simplified as below which is used by Linux Kernel: CLK[0-7]--->MUX-->Gate-->pre_div-->post_div A requirement of the Target Interface's software is that the target clock source is active, it means when setting SEL_A, the current input clk to SEL_A must be active, same to SEL_B. We touch target interface, but hardware logic actually also need configure normal interface. There will be system hang, when doing the following steps: The initial state: SEL_A/SEL_B are both sourcing from clk0, the internal counter choose SEL_A. 1. switch mux from clk0 to clk1 The hardware logic will choose SEL_B and configure SEL_B to clk1. SEL_A no changed. 2. gate off clk0 Disable clk0, then the input to SEL_A is off. 3. switch from clk1 to clk2 The hardware logic will choose SEL_A and configure SEL_A to clk2, however the current SEL_A input clk0 is off, the system hang. The solution to fix the issue is in step 1, write twice to target interface MUX, it will make SEL_A/SEL_B both sources from clk1, then no need to care about the state of clk0. And finally system performs well. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Dong Aisheng <[email protected]> Signed-off-by: Shawn Guo <[email protected]> Signed-off-by: Michael Trimarchi <[email protected]>
2024-07-06clk: imx: Fix wrong flags assignment clk-composite-93Michael Trimarchi
The mux flags (u8), div flags (u8), and gate flags (u8) are not the clk flags (unsigned long). They have different meanings Signed-off-by: Michael Trimarchi <[email protected]>
2024-07-06clk: imx: Fix wrong flags assignment clk-composite-8mMichael Trimarchi
The mux flags (u8), div flags (u8), and gate flags (u8) are not the clk flags (unsigned long). They have different meanings Signed-off-by: Michael Trimarchi <[email protected]>
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 <[email protected]> Signed-off-by: Tom Rini <[email protected]>