summaryrefslogtreecommitdiff
path: root/drivers/clk/at91
AgeCommit message (Collapse)Author
4 daysglobal: Correct duplicate U_BOOT_DRIVER entry namesTom Rini
The U_BOOT_DRIVER macro creates a list of drivers used at link time, and all entries here must be unique. This in turn means that all entries in the code should also be unique in order to not lead to build failures later with unexpected build combinations. Typically, the problem we have here is when a driver is obviously based on another driver and didn't update this particular field and so while the name field reflects something unique the linker entry itself is not. In a few places this provides a more suitable string name as well, however. Reviewed-by: Marek Vasut <[email protected]> Reviewed-by: Svyatoslav Ryhel <[email protected]> # Tegra Reviewed-by: Peter Robinson <[email protected]> Reviewed-by: Heiko Schocher <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2025-10-28clk: Tighten some clock driver dependenciesTom Rini
A few clock drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well. Signed-off-by: Tom Rini <[email protected]>
2025-10-17clk: at91: remove default values for PMC_PLL_ACRManikandan Muralidharan
Remove default values for PMC PLL Analog Control Register(ACR) as the values are specific for each SoC and PLL, so load them from PLL characteristics structure Signed-off-by: Manikandan Muralidharan <[email protected]> Signed-off-by: Varshini Rajendran <[email protected]>
2025-10-17clk: at91: Add ACR in all PLL setting.Manikandan Muralidharan
Add ACR in all PLL setting. Add correct ACR value for each PLL used in different SoCs. Signed-off-by: Manikandan Muralidharan <[email protected]> Signed-off-by: Varshini Rajendran <[email protected]>
2025-08-13clk: at91: Fix use of unsigned loop indexAndrew Goodbody
The use of the unsigned variable 'i' as a loop index leads to the test for i being non-negative always being true. Instead declare 'i' as an int so that the for loop will terminate as expected. If the original for loop completes 'i' will be 1 past the end of the array so decrement it in the subsequent error path to prevent an out of bounds access occurring. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-08-13clk: at91: Fix testing of unsigned variable to be negativeAndrew Goodbody
The variable 'index' is declared as unsigned but used to receive the return value of a function returning 'int'. This value is then tested for being less than zero to detect an error condition but as index is unsigned this can never be true. Change the variable 'index' to be an int so that the error condition can be detected. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-07-25clk: at91: sama7d65: add clock supportRyan Wanner
Add clock support for SAMA7D65 Signed-off-by: Ryan Wanner <[email protected]> [[email protected]: add Fractional PLL core output range] Signed-off-by: Romain Sioen <[email protected]> [[email protected]: adapt driver to upstream] Signed-off-by: Varshini Rajendran <[email protected]>
2025-07-25clk: at91: Update MAX PLL and master clk IDRyan Wanner
Update the MAX PLL and master CLK ID to support sama7d65 SoC family. Signed-off-by: Ryan Wanner <[email protected]>
2025-06-19clk: at91: sam9x7: add pmc driver for sam9x7 SoC familyVarshini Rajendran
Add PMC driver support for sam9x7 SoC family Signed-off-by: Varshini Rajendran <[email protected]> [[email protected]: Add peripheral clock id for pmecc] Signed-off-by: Balamanikandan Gunasundar <[email protected]>
2025-06-19clk: at91: clk-main: drop parent_name check when registering main_rc oscillatorManikandan Muralidharan
The clk_register function logs an error if parent_name is missing from the Device Tree.On the SAM9X7, the main_rc node is omitted to stay aligned with the Linux Device Tree.Remove the parent_name check in at91_clk_main_rc() to allow it to pass NULL when the parent is not specified. Signed-off-by: Manikandan Muralidharan <[email protected]>
2025-06-19clk: at91: sam9x60-pll: add support for HW PLL freq dividersVarshini Rajendran
Add support for hardware dividers for PLL IDs.In sam9x7 SoC, PLL_ID_PLLA and PLL_ID_PLLA_DIV2 has /2 hardware dividers each. fcorepllack -----> HW Div = 2 -+--> fpllack | +--> HW Div = 2 ---> fplladiv2ck Signed-off-by: Varshini Rajendran <[email protected]>
2025-06-19clk: at91: sam9x60-pll: add support for core clock frequency inputsVarshini Rajendran
Add support for different core clock frequency input ranges for different PLL IDs in the PLL driver and align sam9x60, sama7g5 SOC platforms. Signed-off-by: Varshini Rajendran <[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]>
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 <[email protected]> Signed-off-by: Tom Rini <[email protected]>
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 <[email protected]>
2024-01-29treewide: Remove clk_freeSean Anderson
This function is a no-op. Remove it. Signed-off-by: Sean Anderson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-11-16treewide: use linux/time.h for time conversion definesIgor Prusov
Now that we have time conversion defines from in time.h there is no need for each driver to define their own version. Signed-off-by: Igor Prusov <[email protected]> Reviewed-by: Svyatoslav Ryhel <[email protected]> # tegra Reviewed-by: Eugen Hristev <[email protected]> #at91 Reviewed-by: Caleb Connolly <[email protected]> #qcom geni Reviewed-by: Stefan Bosch <[email protected]> #nanopi2 Reviewed-by: Patrice Chotard <[email protected]>
2023-09-29clk: at91: Fix initializing arraysFrancois Berder
Arrays are not cleared entirely because ARRAY_SIZE returns the number of elements in an array, not the size in bytes. This commit fixes the calls to memset by providing the array size in bytes instead of the number of elements in the array. Signed-off-by: Francois Berder <[email protected]>
2023-05-06drivers: use devfdt_get_addr_ptr when cast to pointerJohan Jonker
The fdt_addr_t and phys_addr_t size have been decoupled. A 32bit CPU can expect 64-bit data from the device tree parser, so use devfdt_get_addr_ptr instead of the devfdt_get_addr function in the various files in the drivers directory that cast to a pointer. Signed-off-by: Johan Jonker <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-27clk: at91: sam9x60: Add initial setup of UPLL and USBCK ratesSergiu Moga
In order for some of the functionalities, such as the USB clocks, to work properly we need some clocks to be properly initialised at the very beginning of booting. Signed-off-by: Sergiu Moga <[email protected]> Reviewed-by: Claudiu Beznea <[email protected]> Signed-off-by: Claudiu Beznea <[email protected]>
2023-03-27clk: at91: pmc: export clock setup to pmcClaudiu Beznea
Clock setup was intended for setting clocks at boot time on SAMA7G5, e.g. for root clocks like PLLs, that were used to feed IPs needed alive in u-boot (e.g. Ethernet clock feed by a PLL). Export this functionality to all at91 clocks as it may be necessary on other SoCs. Signed-off-by: Claudiu Beznea <[email protected]>
2023-03-27clk: at91: sam9x60: Register the required clocks for USBSergiu Moga
Register into DM the clocks required to properly enable USB functionality within the bootloader. Signed-off-by: Sergiu Moga <[email protected]> Reviewed-by: Claudiu Beznea <[email protected]> Signed-off-by: Claudiu Beznea <[email protected]>
2023-03-27clk: at91: Add support for sam9x60 USB clockSergiu Moga
Implement sam9x60 USB clock driver. This clock has three parents: PLLA, UPLL and MAINXTAL. The driver is aware of the three possible parents with the help of the two mux tables provied to the driver during the registration of the clock. Signed-off-by: Sergiu Moga <[email protected]> Reviewed-by: Claudiu Beznea <[email protected]> Signed-off-by: Claudiu Beznea <[email protected]>
2022-12-05global: Move remaining CONFIG_SYS_* to CFG_SYS_*Tom Rini
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-09-19clk: at91: sam9x60: change parent clock from mck_pres to mck_divMihai Sain
ddrck and qspick should have mck_div as parent clocks to be in sync with linux driver. Signed-off-by: Mihai Sain <[email protected]> Reviewed-by: Claudiu Beznea <[email protected]>
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 <[email protected]> Reviewed-by: Claudiu Beznea <[email protected]> Reviewed-by: Peng Fan <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ fixed missing include for at91 ] Signed-off-by: Sean Anderson <[email protected]>
2021-09-30WS cleanup: remove trailing empty linesWolfgang Denk
Signed-off-by: Wolfgang Denk <[email protected]>
2021-09-21clk: at91: clk-master: split master clock in pres and dividerClaudiu Beznea
Split master clock in 2 controlling block: one for prescaler one for divider. This will allow referencing correctly the CPU clock and master clock in device trees. Reported-by: Eugen Hristev <[email protected]> Fixes: a64862284f65 ("clk: at91: sam9x60: add support compatible with CCF") Signed-off-by: Claudiu Beznea <[email protected]>
2021-02-15Merge branch '2021-02-02-drop-asm_global_data-when-unused'Tom Rini
- Merge the patch to take <asm/global_data.h> out of <common.h>
2021-02-11clk: at91: compat: partially revert "dm: Remove uses of device_bind_offset()"Eugen Hristev
Revert changes in at91 compat.c that cause u-boot to fail booting on sama5d4_xplained and sama5d2_xplained Log below: <debug_uart> No serial driver found Could not initialize timer (err -19) Could not initialize timer (err -19) Could not initialize timer (err -19) Could not initialize timer (err -19) Could not initialize timer (err -19) Could not initialize timer (err -19) Could not initialize timer (err -19) Could not initialize timer (err -19) Fixes: a2703ce10c ("dm: Remove uses of device_bind_offset()") Cc: Simon Glass <[email protected]> Signed-off-by: Eugen Hristev <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2021-01-05Merge tag 'v2021.01-rc5' into nextTom Rini
Prepare v2021.01-rc5 Signed-off-by: Tom Rini <[email protected]>
2020-12-13dm: treewide: Rename ..._platdata variables to just ..._platSimon Glass
Try to maintain some consistency between these variables by using _plat as a suffix for them. Signed-off-by: Simon Glass <[email protected]>
2020-12-13dm: treewide: Rename ofdata_to_platdata() to of_to_plat()Simon Glass
This name is far too long. Rename it to remove the 'data' bits. This makes it consistent with the platdata->plat rename. Signed-off-by: Simon Glass <[email protected]>
2020-12-13dm: treewide: Rename dev_get_platdata() to dev_get_plat()Simon Glass
Rename this to be consistent with the change from 'platdata'. Signed-off-by: Simon Glass <[email protected]>
2020-12-13dm: treewide: Rename 'platdata' variables to just 'plat'Simon Glass
We use 'priv' for private data but often use 'platdata' for platform data. We can't really use 'pdata' since that is ambiguous (it could mean private or platform data). Rename some of the latter variables to end with 'plat' for consistency. Signed-off-by: Simon Glass <[email protected]>
2020-12-13dm: treewide: Rename auto_alloc_size members to be shorterSimon Glass
This construct is quite long-winded. In earlier days it made some sense since auto-allocation was a strange concept. But with driver model now used pretty universally, we can shorten this to 'auto'. This reduces verbosity and makes it easier to read. Coincidentally it also ensures that every declaration is on one line, thus making dtoc's job easier. Signed-off-by: Simon Glass <[email protected]>
2020-12-13dm: Remove uses of device_bind_offset()Simon Glass
This function is not needed since the standard device_bind() can be used instead. Signed-off-by: Simon Glass <[email protected]>
2020-12-07clk: at91: sam9x60: remove the parsing of atmel, main-osc-bypassClaudiu Beznea
Remove the parsing of atmel,main-osc-bypass DT property as the SAM9X60 have no support for crystal oscillator bypass. Setting this bit might affect the device functionality. Fixes: a64862284f65 ("clk: at91: sam9x60: add support compatible with CCF") Signed-off-by: Claudiu Beznea <[email protected]>
2020-10-19clk: at91: sama7g5: add 5th divisor for mck0 layout and characteristicsEugen Hristev
This SoC has the 5th divisor for the mck0 master clock. Adapt the characteristics accordingly. Reported-by: Mihai Sain <[email protected]> Signed-off-by: Eugen Hristev <[email protected]> Reviewed-by: Claudiu Beznea <[email protected]>
2020-10-19clk: at91: clk-master: add 5th divisor for mck masterEugen Hristev
clk-master can have 5 divisors with a field width of 3 bits on some products. Change the mask and number of divisors accordingly. Reported-by: Mihai Sain <[email protected]> Signed-off-by: Eugen Hristev <[email protected]> Reviewed-by: Claudiu Beznea <[email protected]>
2020-10-19clk: at91: sam9x60: add support compatible with CCFClaudiu Beznea
Add SAM9X60 clock support compatible with CCF. Signed-off-by: Claudiu Beznea <[email protected]>
2020-10-16clk: at91: Include device_compat.h in compat.cTom Rini
Necessary for dev_xxx. Signed-off-by: Tom Rini <[email protected]>
2020-09-22clk: at91: sama7g5: add clock supportClaudiu Beznea
Add clock support for SAMA7G5. Signed-off-by: Claudiu Beznea <[email protected]>
2020-09-22clk: at91: pmc: add generic clock opsClaudiu Beznea
Add generic clock ops to be used by every AT91 PMC driver built on top of CCF. Signed-off-by: Claudiu Beznea <[email protected]>
2020-09-22clk: at91: clk-generic: add driver compatible with ccfClaudiu Beznea
Add clk-generic driver compatible with common clock framework. Signed-off-by: Claudiu Beznea <[email protected]>
2020-09-22clk: at91: clk-peripheral: add driver compatible with ccfClaudiu Beznea
Add clk-peripheral compatible with common clock framework. Signed-off-by: Claudiu Beznea <[email protected]>
2020-09-22clk: at91: clk-system: add driver compatible with ccfClaudiu Beznea
Add clk-system driver compatible with common clock framework. Signed-off-by: Claudiu Beznea <[email protected]>
2020-09-22clk: at91: clk-programmable: add driver compatible with ccfClaudiu Beznea
Add clk-programmable driver compatible with common clock framework. Signed-off-by: Claudiu Beznea <[email protected]>
2020-09-22clk: at91: clk-utmi: add support for sama7g5Claudiu Beznea
Add UTMI support for SAMA7G5. SAMA7G5's UTMI control is done via XTALF register. Values written at bits 2..0 in this register correspond to the on board crystal oscillator frequency. Signed-off-by: Claudiu Beznea <[email protected]>