* [PATCH 1/2] clk: at91: Add ACR in all PLL setting.
@ 2025-09-23 9:58 Manikandan Muralidharan
2025-09-23 9:58 ` [PATCH 2/2] ARM: at91: remove default values for PMC_PLL_ACR Manikandan Muralidharan
2025-10-21 15:18 ` [PATCH 1/2] clk: at91: Add ACR in all PLL setting Eugen Hristev
0 siblings, 2 replies; 3+ messages in thread
From: Manikandan Muralidharan @ 2025-09-23 9:58 UTC (permalink / raw)
To: Lukasz Majewski, seanga2, varshini.rajendran, Ryan.Wanner,
balamanikandan.gunasundar, romain.sioen, u-boot
Cc: manikandan.m
Add ACR in all PLL setting. Add correct ACR value for each PLL used in
different SoCs.
Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
Signed-off-by: Varshini Rajendran <varshini.rajendran@microchip.com>
---
drivers/clk/at91/pmc.h | 1 +
drivers/clk/at91/sam9x60.c | 2 ++
drivers/clk/at91/sam9x7.c | 5 +++++
drivers/clk/at91/sama7d65.c | 1 +
drivers/clk/at91/sama7g5.c | 1 +
5 files changed, 10 insertions(+)
diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h
index 580c9964ff4..f38868d1665 100644
--- a/drivers/clk/at91/pmc.h
+++ b/drivers/clk/at91/pmc.h
@@ -42,6 +42,7 @@ struct clk_pll_characteristics {
u16 *icpll;
u8 *out;
u8 upll : 1;
+ u32 acr;
};
struct clk_pll_layout {
diff --git a/drivers/clk/at91/sam9x60.c b/drivers/clk/at91/sam9x60.c
index e04266a2be2..2251e2846fa 100644
--- a/drivers/clk/at91/sam9x60.c
+++ b/drivers/clk/at91/sam9x60.c
@@ -123,6 +123,7 @@ static const struct clk_pll_characteristics apll_characteristics = {
.num_output = ARRAY_SIZE(plla_outputs),
.output = plla_outputs,
.core_output = core_outputs,
+ .acr = 0x00020010UL,
};
static const struct clk_pll_characteristics upll_characteristics = {
@@ -131,6 +132,7 @@ static const struct clk_pll_characteristics upll_characteristics = {
.output = upll_outputs,
.core_output = core_outputs,
.upll = true,
+ .acr = 0x12023010UL, /* fIN = [18 MHz, 32 MHz]*/
};
/* Layout for fractional PLLs. */
diff --git a/drivers/clk/at91/sam9x7.c b/drivers/clk/at91/sam9x7.c
index ad9865feff0..9ea253e6ff8 100644
--- a/drivers/clk/at91/sam9x7.c
+++ b/drivers/clk/at91/sam9x7.c
@@ -164,6 +164,7 @@ static const struct clk_pll_characteristics plla_characteristics = {
.num_output = ARRAY_SIZE(plla_outputs),
.output = plla_outputs,
.core_output = plla_core_outputs,
+ .acr = 0x00020010UL, /* Old ACR_DEFAULT_PLLA value */
};
static const struct clk_pll_characteristics upll_characteristics = {
@@ -172,6 +173,7 @@ static const struct clk_pll_characteristics upll_characteristics = {
.output = upll_outputs,
.core_output = upll_core_outputs,
.upll = true,
+ .acr = 0x12023010UL, /* fIN=[20 MHz, 32 MHz] */
};
static const struct clk_pll_characteristics lvdspll_characteristics = {
@@ -179,6 +181,7 @@ static const struct clk_pll_characteristics lvdspll_characteristics = {
.num_output = ARRAY_SIZE(lvdspll_outputs),
.output = lvdspll_outputs,
.core_output = lvdspll_core_outputs,
+ .acr = 0x12023010UL, /* fIN=[20 MHz, 32 MHz] */
};
static const struct clk_pll_characteristics audiopll_characteristics = {
@@ -186,6 +189,7 @@ static const struct clk_pll_characteristics audiopll_characteristics = {
.num_output = ARRAY_SIZE(audiopll_outputs),
.output = audiopll_outputs,
.core_output = audiopll_core_outputs,
+ .acr = 0x12023010UL, /* fIN=[20 MHz, 32 MHz] */
};
static const struct clk_pll_characteristics plladiv2_characteristics = {
@@ -193,6 +197,7 @@ static const struct clk_pll_characteristics plladiv2_characteristics = {
.num_output = ARRAY_SIZE(plladiv2_outputs),
.output = plladiv2_outputs,
.core_output = plladiv2_core_outputs,
+ .acr = 0x00020010UL, /* Old ACR_DEFAULT_PLLA value */
};
/* Layout for fractional PLLs. */
diff --git a/drivers/clk/at91/sama7d65.c b/drivers/clk/at91/sama7d65.c
index 8d2c25e6fa9..9f0b394543b 100644
--- a/drivers/clk/at91/sama7d65.c
+++ b/drivers/clk/at91/sama7d65.c
@@ -184,6 +184,7 @@ static const struct clk_pll_characteristics pll_characteristics = {
.num_output = ARRAY_SIZE(pll_outputs),
.output = pll_outputs,
.core_output = core_outputs,
+ .acr = 0x00070010UL,
};
/* Layout for fractional PLLs. */
diff --git a/drivers/clk/at91/sama7g5.c b/drivers/clk/at91/sama7g5.c
index c0e27828b1a..f24d251857f 100644
--- a/drivers/clk/at91/sama7g5.c
+++ b/drivers/clk/at91/sama7g5.c
@@ -169,6 +169,7 @@ static const struct clk_pll_characteristics pll_characteristics = {
.num_output = ARRAY_SIZE(pll_outputs),
.output = pll_outputs,
.core_output = core_outputs,
+ .acr = 0x00070010UL,
};
/* Layout for fractional PLLs. */
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] ARM: at91: remove default values for PMC_PLL_ACR
2025-09-23 9:58 [PATCH 1/2] clk: at91: Add ACR in all PLL setting Manikandan Muralidharan
@ 2025-09-23 9:58 ` Manikandan Muralidharan
2025-10-21 15:18 ` [PATCH 1/2] clk: at91: Add ACR in all PLL setting Eugen Hristev
1 sibling, 0 replies; 3+ messages in thread
From: Manikandan Muralidharan @ 2025-09-23 9:58 UTC (permalink / raw)
To: Lukasz Majewski, seanga2, varshini.rajendran, Ryan.Wanner,
balamanikandan.gunasundar, romain.sioen, u-boot
Cc: manikandan.m
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 <manikandan.m@microchip.com>
Signed-off-by: Varshini Rajendran <varshini.rajendran@microchip.com>
---
drivers/clk/at91/clk-sam9x60-pll.c | 7 ++-----
include/linux/clk/at91_pmc.h | 2 --
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/clk/at91/clk-sam9x60-pll.c b/drivers/clk/at91/clk-sam9x60-pll.c
index 65be2775ac3..66f01472739 100644
--- a/drivers/clk/at91/clk-sam9x60-pll.c
+++ b/drivers/clk/at91/clk-sam9x60-pll.c
@@ -183,11 +183,8 @@ static int sam9x60_frac_pll_enable(struct clk *clk)
AT91_PMC_PLL_UPDT_ID_MSK,
AT91_PMC_PLL_UPDT_STUPTIM(0x3f) | pll->id);
- /* Recommended value for AT91_PMC_PLL_ACR */
- if (pll->characteristics->upll)
- val = AT91_PMC_PLL_ACR_DEFAULT_UPLL;
- else
- val = AT91_PMC_PLL_ACR_DEFAULT_PLLA;
+ /* Load recommended value for PMC_PLL_ACR */
+ val = pll->characteristics->acr;
pmc_write(base, AT91_PMC_PLL_ACR, val);
if (pll->characteristics->upll) {
diff --git a/include/linux/clk/at91_pmc.h b/include/linux/clk/at91_pmc.h
index ee39e72e2b3..a48b15e049a 100644
--- a/include/linux/clk/at91_pmc.h
+++ b/include/linux/clk/at91_pmc.h
@@ -45,8 +45,6 @@
#define AT91_PMC_PCSR 0x18 /* Peripheral Clock Status Register */
#define AT91_PMC_PLL_ACR 0x18 /* PLL Analog Control Register [for SAM9X60] */
-#define AT91_PMC_PLL_ACR_DEFAULT_UPLL 0x12020010UL /* Default PLL ACR value for UPLL */
-#define AT91_PMC_PLL_ACR_DEFAULT_PLLA 0x00020010UL /* Default PLL ACR value for PLLA */
#define AT91_PMC_PLL_ACR_UTMIVR (1 << 12) /* UPLL Voltage regulator Control */
#define AT91_PMC_PLL_ACR_UTMIBG (1 << 13) /* UPLL Bandgap Control */
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] clk: at91: Add ACR in all PLL setting.
2025-09-23 9:58 [PATCH 1/2] clk: at91: Add ACR in all PLL setting Manikandan Muralidharan
2025-09-23 9:58 ` [PATCH 2/2] ARM: at91: remove default values for PMC_PLL_ACR Manikandan Muralidharan
@ 2025-10-21 15:18 ` Eugen Hristev
1 sibling, 0 replies; 3+ messages in thread
From: Eugen Hristev @ 2025-10-21 15:18 UTC (permalink / raw)
To: Manikandan Muralidharan, Lukasz Majewski, seanga2,
varshini.rajendran, Ryan.Wanner, balamanikandan.gunasundar,
romain.sioen, u-boot
On 9/23/25 12:58, Manikandan Muralidharan wrote:
> Add ACR in all PLL setting. Add correct ACR value for each PLL used in
> different SoCs.
>
> Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
> Signed-off-by: Varshini Rajendran <varshini.rajendran@microchip.com>
> ---
Applied both to u-boot-at91/master , thanks !
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-21 15:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-23 9:58 [PATCH 1/2] clk: at91: Add ACR in all PLL setting Manikandan Muralidharan
2025-09-23 9:58 ` [PATCH 2/2] ARM: at91: remove default values for PMC_PLL_ACR Manikandan Muralidharan
2025-10-21 15:18 ` [PATCH 1/2] clk: at91: Add ACR in all PLL setting Eugen Hristev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox