]> Gentwo Git Trees - linux/.git/commit
clk: at91: sam9x7: add support for HW PLL freq dividers
authorVarshini Rajendran <varshini.rajendran@microchip.com>
Mon, 29 Jul 2024 07:07:46 +0000 (12:37 +0530)
committerClaudiu Beznea <claudiu.beznea@tuxon.dev>
Wed, 7 Aug 2024 16:16:47 +0000 (19:16 +0300)
commit5299f801875f376f65322ff9d5df68ae662d640a
tree88cd779b79b67e23090662374adc1738d32c2f1e
parenta402c663940dfeca22caa7390b9f35aee6925caf
clk: at91: sam9x7: add support for HW PLL freq dividers

Add support for hardware dividers for PLL IDs in sam9x7 SoC. The system
PLL - PLLA and the system PLL divided by 2 - PLLADIV2 with PLL ID 0 and
4 respectively, both have a hardware divider /2. This has to be taken into
account in the software to obtain the right frequencies. Support for the
same is added in the PLL driver.

fcorepllack -----> HW Div = 2 -+--> fpllack
                               |
                               +--> HW Div = 2 ---> fplladiv2ck

In this case the corepll freq is 1600 MHz. So, the plla freq is 800 MHz
after the hardware divider and the plladiv2 freq is 400 MHz after the
hardware divider (given that the DIVPMC is 0).

Signed-off-by: Varshini Rajendran <varshini.rajendran@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Link: https://lore.kernel.org/r/20240729070746.1990805-1-varshini.rajendran@microchip.com
Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
drivers/clk/at91/clk-sam9x60-pll.c
drivers/clk/at91/pmc.h