* [PATCH v3 1/4] clk: at91: sam9x7: Remove gmac peripheral clock with ID 67
2026-03-09 7:53 [PATCH v3 0/4] Update gmac clocks and devicetree for sam9x7 mpu Mihai Sain
@ 2026-03-09 7:53 ` Mihai Sain
2026-03-09 7:53 ` [PATCH v3 2/4] clk: at91: sam9x7: Rename macb0_clk to gmac_clk Mihai Sain
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Mihai Sain @ 2026-03-09 7:53 UTC (permalink / raw)
To: mturquette, sboyd, nicolas.ferre, alexandre.belloni,
claudiu.beznea, varshini.rajendran, cristian.birsan,
balamanikandan.gunasundar, robh, krzk+dt, conor+dt
Cc: linux-clk, linux-arm-kernel, linux-kernel, devicetree,
ryan.wanner, Mihai Sain
According with datasheet [1] table 12.1 the instance ID 67 is reserved.
This change drops the gmactsu_clk entry from
the SAM9X7 clock description table.
[1]: https://ww1.microchip.com/downloads/aemDocuments/documents/MPU32/ProductDocuments/DataSheets/SAM9X7-Series-Data-Sheet-DS60001813.pdf
Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
---
drivers/clk/at91/sam9x7.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/clk/at91/sam9x7.c b/drivers/clk/at91/sam9x7.c
index 89868a0aeaba..66aadebc51a4 100644
--- a/drivers/clk/at91/sam9x7.c
+++ b/drivers/clk/at91/sam9x7.c
@@ -420,7 +420,6 @@ static const struct {
{ .n = "lvdsc_clk", .id = 56, },
{ .n = "pit64b1_clk", .id = 58, },
{ .n = "puf_clk", .id = 59, },
- { .n = "gmactsu_clk", .id = 67, },
};
/*
--
2.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v3 2/4] clk: at91: sam9x7: Rename macb0_clk to gmac_clk
2026-03-09 7:53 [PATCH v3 0/4] Update gmac clocks and devicetree for sam9x7 mpu Mihai Sain
2026-03-09 7:53 ` [PATCH v3 1/4] clk: at91: sam9x7: Remove gmac peripheral clock with ID 67 Mihai Sain
@ 2026-03-09 7:53 ` Mihai Sain
2026-03-09 7:53 ` [PATCH v3 3/4] clk: at91: sam9x7: Fix gmac_gclk clock definition Mihai Sain
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Mihai Sain @ 2026-03-09 7:53 UTC (permalink / raw)
To: mturquette, sboyd, nicolas.ferre, alexandre.belloni,
claudiu.beznea, varshini.rajendran, cristian.birsan,
balamanikandan.gunasundar, robh, krzk+dt, conor+dt
Cc: linux-clk, linux-arm-kernel, linux-kernel, devicetree,
ryan.wanner, Mihai Sain
Update the peripheral clock name for ID 24 from macb0_clk to gmac_clk
to match the actual GMAC hardware block present on SAM9X7 SoCs.
This aligns the clock naming with the device tree and avoids confusion
with legacy MACB controllers.
Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
---
drivers/clk/at91/sam9x7.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/at91/sam9x7.c b/drivers/clk/at91/sam9x7.c
index 66aadebc51a4..32c082b4ca4b 100644
--- a/drivers/clk/at91/sam9x7.c
+++ b/drivers/clk/at91/sam9x7.c
@@ -387,7 +387,7 @@ static const struct {
{ .n = "dma0_clk", .id = 20, },
{ .n = "uhphs_clk", .id = 22, },
{ .n = "udphs_clk", .id = 23, },
- { .n = "macb0_clk", .id = 24, },
+ { .n = "gmac_clk", .id = 24, },
{ .n = "lcd_clk", .id = 25, },
{ .n = "sdmmc1_clk", .id = 26, },
{ .n = "ssc_clk", .id = 28, },
--
2.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v3 3/4] clk: at91: sam9x7: Fix gmac_gclk clock definition
2026-03-09 7:53 [PATCH v3 0/4] Update gmac clocks and devicetree for sam9x7 mpu Mihai Sain
2026-03-09 7:53 ` [PATCH v3 1/4] clk: at91: sam9x7: Remove gmac peripheral clock with ID 67 Mihai Sain
2026-03-09 7:53 ` [PATCH v3 2/4] clk: at91: sam9x7: Rename macb0_clk to gmac_clk Mihai Sain
@ 2026-03-09 7:53 ` Mihai Sain
2026-03-09 7:53 ` [PATCH v3 4/4] ARM: dts: microchip: sam9x7: fix GMAC clock configuration Mihai Sain
2026-05-16 16:58 ` [PATCH v3 0/4] Update gmac clocks and devicetree for sam9x7 mpu Claudiu Beznea
4 siblings, 0 replies; 7+ messages in thread
From: Mihai Sain @ 2026-03-09 7:53 UTC (permalink / raw)
To: mturquette, sboyd, nicolas.ferre, alexandre.belloni,
claudiu.beznea, varshini.rajendran, cristian.birsan,
balamanikandan.gunasundar, robh, krzk+dt, conor+dt
Cc: linux-clk, linux-arm-kernel, linux-kernel, devicetree,
ryan.wanner, Mihai Sain
According with datasheet [1] table 12.1 the instance ID 24 is used
for gmac generic clock.
This patch adds the correct gmac_gclk entry at ID 24, aligned with the
SoC clock layout, and removes the old misplaced 67 entry.
[1]: https://ww1.microchip.com/downloads/aemDocuments/documents/MPU32/ProductDocuments/DataSheets/SAM9X75-SIP-Series-Data-Sheet-DS60001827.pdf
Fixes: 33013b43e271 ("clk: at91: sam9x7: add sam9x7 pmc driver")
Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
---
drivers/clk/at91/sam9x7.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/clk/at91/sam9x7.c b/drivers/clk/at91/sam9x7.c
index 32c082b4ca4b..8b52da194849 100644
--- a/drivers/clk/at91/sam9x7.c
+++ b/drivers/clk/at91/sam9x7.c
@@ -568,6 +568,15 @@ static const struct {
.pp_chg_id = INT_MIN,
},
+ {
+ .n = "gmac_gclk",
+ .id = 24,
+ .pp = { "audiopll_divpmcck", "plla_div2pmcck", },
+ .pp_mux_table = { 6, 8, },
+ .pp_count = 2,
+ .pp_chg_id = INT_MIN,
+ },
+
{
.n = "lcd_gclk",
.id = 25,
@@ -701,15 +710,6 @@ static const struct {
.pp_count = 1,
.pp_chg_id = INT_MIN,
},
-
- {
- .n = "gmac_gclk",
- .id = 67,
- .pp = { "audiopll_divpmcck", "plla_div2pmcck", },
- .pp_mux_table = { 6, 8, },
- .pp_count = 2,
- .pp_chg_id = INT_MIN,
- },
};
static void __init sam9x7_pmc_setup(struct device_node *np)
--
2.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v3 4/4] ARM: dts: microchip: sam9x7: fix GMAC clock configuration
2026-03-09 7:53 [PATCH v3 0/4] Update gmac clocks and devicetree for sam9x7 mpu Mihai Sain
` (2 preceding siblings ...)
2026-03-09 7:53 ` [PATCH v3 3/4] clk: at91: sam9x7: Fix gmac_gclk clock definition Mihai Sain
@ 2026-03-09 7:53 ` Mihai Sain
2026-05-16 16:58 ` [PATCH v3 0/4] Update gmac clocks and devicetree for sam9x7 mpu Claudiu Beznea
4 siblings, 0 replies; 7+ messages in thread
From: Mihai Sain @ 2026-03-09 7:53 UTC (permalink / raw)
To: mturquette, sboyd, nicolas.ferre, alexandre.belloni,
claudiu.beznea, varshini.rajendran, cristian.birsan,
balamanikandan.gunasundar, robh, krzk+dt, conor+dt
Cc: linux-clk, linux-arm-kernel, linux-kernel, devicetree,
ryan.wanner, Mihai Sain
The GMAC node incorrectly listed four clocks, including a separate
tx_clk and a TSU GCK clock sourced from ID 67.
According to the SAM9X7 clocking scheme, the GMAC uses only three
clocks: HCLK, PCLK, and the TSU GCK derived from the GMAC peripheral
clock (ID 24).
This patch removes the unused tx_clk, updates the clock-names accordingly,
and corrects the assigned clock to use GCK 24 instead of GCK 67.
This aligns the device tree with the actual hardware clock topology
and prevents misconfiguration of the GMAC clock tree.
[root@SAM9X75 ~]$ cat /sys/kernel/debug/clk/clk_summary | grep gmac
gmac_gclk 1 1 1 266666666 0 0 50000 Y f802c000.ethernet tsu_clk
f802c000.ethernet tsu_clk
gmac_clk 2 2 0 266666666 0 0 50000 Y f802c000.ethernet hclk
f802c000.ethernet pclk
Fixes: 41af45af8bc3 ("ARM: dts: at91: sam9x7: add device tree for SoC")
Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
---
arch/arm/boot/dts/microchip/sam9x7.dtsi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boot/dts/microchip/sam9x7.dtsi b/arch/arm/boot/dts/microchip/sam9x7.dtsi
index 46dacbbd201d..a42716e18da3 100644
--- a/arch/arm/boot/dts/microchip/sam9x7.dtsi
+++ b/arch/arm/boot/dts/microchip/sam9x7.dtsi
@@ -990,9 +990,9 @@ gmac: ethernet@f802c000 {
<62 IRQ_TYPE_LEVEL_HIGH 3>, /* Queue 3 */
<63 IRQ_TYPE_LEVEL_HIGH 3>, /* Queue 4 */
<64 IRQ_TYPE_LEVEL_HIGH 3>; /* Queue 5 */
- clocks = <&pmc PMC_TYPE_PERIPHERAL 24>, <&pmc PMC_TYPE_PERIPHERAL 24>, <&pmc PMC_TYPE_GCK 24>, <&pmc PMC_TYPE_GCK 67>;
- clock-names = "hclk", "pclk", "tx_clk", "tsu_clk";
- assigned-clocks = <&pmc PMC_TYPE_GCK 67>;
+ clocks = <&pmc PMC_TYPE_PERIPHERAL 24>, <&pmc PMC_TYPE_PERIPHERAL 24>, <&pmc PMC_TYPE_GCK 24>;
+ clock-names = "hclk", "pclk", "tsu_clk";
+ assigned-clocks = <&pmc PMC_TYPE_GCK 24>;
assigned-clock-rates = <266666666>;
status = "disabled";
};
--
2.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v3 0/4] Update gmac clocks and devicetree for sam9x7 mpu
2026-03-09 7:53 [PATCH v3 0/4] Update gmac clocks and devicetree for sam9x7 mpu Mihai Sain
` (3 preceding siblings ...)
2026-03-09 7:53 ` [PATCH v3 4/4] ARM: dts: microchip: sam9x7: fix GMAC clock configuration Mihai Sain
@ 2026-05-16 16:58 ` Claudiu Beznea
4 siblings, 0 replies; 7+ messages in thread
From: Claudiu Beznea @ 2026-05-16 16:58 UTC (permalink / raw)
To: Mihai Sain, mturquette, sboyd, nicolas.ferre, alexandre.belloni,
varshini.rajendran, cristian.birsan, balamanikandan.gunasundar,
robh, krzk+dt, conor+dt
Cc: linux-clk, linux-arm-kernel, linux-kernel, devicetree,
ryan.wanner
On 3/9/26 09:53, Mihai Sain wrote:
> Mihai Sain (4):
> clk: at91: sam9x7: Remove gmac peripheral clock with ID 67
> clk: at91: sam9x7: Rename macb0_clk to gmac_clk
Applied to clk-microchip, thanks!
> clk: at91: sam9x7: Fix gmac_gclk clock definition
Applied to clk-microchip-fixes, thanks!
> ARM: dts: microchip: sam9x7: fix GMAC clock configuration
Applied to at91-fixes, thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread