summaryrefslogtreecommitdiff
path: root/drivers/clk/imx/clk-imx8mn.c
AgeCommit message (Collapse)Author
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 <aford173@gmail.com> Reported-by: Christoph Niedermaier <cniedermaier@dh-electronics.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
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 <marex@denx.de>
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 <marex@denx.de>
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 <marex@denx.de>
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 <marex@denx.de>
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 <marex@denx.de>
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 <marex@denx.de>
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 <aford173@gmail.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
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 <sjg@chromium.org>
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 <Zhiqiang.Hou@nxp.com>
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 <michael@amarulasolutions.com>
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 <marex@denx.de> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.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-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>
2023-12-13clk: imx8mn: add pwm clocksNicolas Heemeryck
Based on Linux kernel 6.7-rc4, add necessary clocks for the PWM controllers. Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@devialet.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2023-02-12clk: imx8mn: fix imx8mn_enet_phy_sels clocks listDario Binacchi
[backport from linux commit 2626cf67f20b28446dfc3a5b9493dd535cdb747b] According to the "Clock Root" table of the reference manual (document IMX8MNRM Rev 2, 07/2022): Clock Root offset Source Select (CCM_TARGET_ROOTn[MUX]) ... ... ... ENET_PHY_REF_CLK_ROOT 0xAA80 000 - 24M_REF_CLK 001 - SYSTEM_PLL2_DIV20 010 - SYSTEM_PLL2_DIV8 011 - SYSTEM_PLL2_DIV5 100 - SYSTEM_PLL2_DIV2 101 - AUDIO_PLL1_CLK 110 - VIDEO_PLL_CLK 111 - AUDIO_PLL2_CLK ... ... ... while the imx8mn_enet_phy_sels list didn't contained audio_pll1_out for source select bits 101b. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Acked-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20221219113127.528282-4-dario.binacchi@amarulasolutions.com
2023-02-12clk: imx: rename video_pll1 to video_pllDario Binacchi
[backport from linux commit bedcf9d1dcf88ed38731f0ac9620e5a421e1e9d6] Unlike audio_pll1 and audio_pll2, there is no video_pll2. Further, the name used in the RM is video_pll. So, let's rename "video_pll1" to "video_pll" to be consistent with the RM and avoid misunderstandings. No functional changes intended. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Acked-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20221219113127.528282-3-dario.binacchi@amarulasolutions.com
2023-02-12clk: imx8mn: rename vpu_pll to m7_alt_pllDario Binacchi
[backport from linux commit a429c60baefd95ab43a2ce7f25d5b2d7a2e431df] The IMX8MN platform does not have any video processing unit (VPU), and indeed in the reference manual (document IMX8MNRM Rev 2, 07/2022) there is no occurrence of its pll. From an analysis of the code and the RM itself, I think vpu pll is used instead of m7 alternate pll, probably for copy and paste of code taken from modules of similar architectures. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Acked-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20221219113127.528282-2-dario.binacchi@amarulasolutions.com
2022-10-09clk: imx: clk-imx8mn add gpmi nand clocksMichael Trimarchi
Add gpmi nand clock. Those clock can be used in mxs nand driver to run nand to EDO mode 5, 4, ... Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-04-12clk: imx8m: reduce rate table duplicationAngus Ainslie
Re-factor the imx8m[nmpq] rate tables into the common pll1416x clock driver. 43cdaa1567ad3 ("clk: imx8mm: Move 1443X/1416X PLL clock structure to common place") Signed-off-by: Angus Ainslie <angus@akkea.ca> Tested-by: Adam Ford <aford173@gmail.com> #imx8mm-beacon
2022-03-30clk: Use generic CCF ops where possibleSean Anderson
This converts most CCF drivers to use generic ops. imx6q is the only outlier, where we retain the existing functionality by moving the check to request(). Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/20220320203446.740178-2-seanga2@gmail.com [ fixed missing include for at91 ] Signed-off-by: Sean Anderson <seanga2@gmail.com>
2021-01-23clk: imx: Add ECSPI to iMX8MNMarek Vasut
Add ECSPI clock entries to iMX8MN clock driver. Only make those entries available in case SPI support in U-Boot is enabled at all to conserve space, esp. in SPL. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2020-07-14clk: imx8m: drop clk settingsPeng Fan
We use non-dm code to configure the clk settings in order to simplify dm clk driver in future, so remove the duplicated code from clk driver Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-07-14clk: imx8mm/8mn: Add USB clocksYe Li
Add USB relevant clocks to support usb clock settings for both DM USB host and gadget drivers Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-07-14clk: clk-imx8mn: Update clock tree and support set parentYe Li
Add set clock parent support. Add ENET and flexspi related clocks to support assigned clocks Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-05-18common: Drop log.h from common headerSimon Glass
Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-26clk: Fix error checking of dev_read_addr_ptrSean Anderson
dev_read_addr_ptr returns NULL on error, not FDT_ADDR_T_NONE. Signed-off-by: Sean Anderson <seanga2@gmail.com>
2019-11-05clk: imx: add i.MX8MN ccf driverPeng Fan
Add i.MX8MM ccf driver support. Modifed from Linux Kernel 5.3.0-rc1, drop some entries that not used in U-Boot and adapt to U-Boot CCF style. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Lukasz Majewski <lukma@denx.de>