Netdev List
 help / color / mirror / Atom feed
* [PATCH 0/3] clk: bcm2835: describe the BCM2711 GISB clock for the GENET MDIO controller
@ 2026-10-20 14:58 Nicolai Buchwitz
  2026-10-20 14:58 ` [PATCH 1/3] dt-bindings: clock: bcm2835: add the BCM2711 GISB clock Nicolai Buchwitz
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Nicolai Buchwitz @ 2026-10-20 14:58 UTC (permalink / raw)
  To: Stephen Boyd, Brian Masney, Jerome Brunet, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
	Broadcom internal kernel review list, Ray Jui, Scott Branden
  Cc: linux-clk, devicetree, linux-rpi-kernel, linux-arm-kernel,
	linux-kernel, Andrew Lunn, Stefan Wahren, Phil Elwell, netdev,
	James Clark, Nicolai Buchwitz

The timestamped MDIO write series [1] needs the reference clock the
GENET MDIO controller divides its MDC from. On BCM2711 that clock is
not described anywhere, so 5/5 of that series hardcodes 200 MHz behind
a compatible match, and mdio-bcm-unimac's clock-frequency handling
assumes the 250 MHz of the STB chips.

On BCM2711 the MDC is derived from the CPRMAN generator at 0x1d8, which
the firmware calls gisb and has always run at 200 MHz (PLLD_PER 750 MHz
/ 3.75). Changing that divider at runtime moves the MDIO busy time by
the same ratio, see [2], and Phil confirmed it from the
Raspberry Pi side. GISB is the register bus of the STB peripherals,
which is where the driver's 250 MHz default comes from.

This adds a clock id, the generator in clk-bcm2835 (critical, the
firmware enables it and nothing in Linux owns it) and a clocks property
on the mdio node, like Stefan did for EMMC2.

No functional change by itself. The driver only looks the clock up
with [1], and only for the timestamp bounds. Making
unimac_mdio_clk_set() use the real rate is a follow-up, as that moves
the Pi 400, whose clock-frequency = <1950000> currently lands at
1.56 MHz instead of 1.95. The limit is a level shifter on that board,
so the follow-up keeps it at 1.56 MHz.

Patches 1 and 2 are for the clk tree, patch 3 for Florian once the
header is in. dtbs_check clean, booted on a CM4: clk_summary shows
gisb at 200 MHz under plld_per, eth0 comes up as before.

[1] https://lore.kernel.org/netdev/20261009143506.2507607-1-jjc@jclark.com/
[2] https://lore.kernel.org/netdev/60accbd89cfaf0d4be1da5ec2fafd975@tipi-net.de/

---
Nicolai Buchwitz (3):
      dt-bindings: clock: bcm2835: add the BCM2711 GISB clock
      clk: bcm2835: register the BCM2711 GISB clock
      ARM: dts: bcm2711: give the GENET MDIO controller its clock

 arch/arm/boot/dts/broadcom/bcm2711.dtsi |  1 +
 drivers/clk/bcm/clk-bcm2835.c           | 16 ++++++++++++++++
 include/dt-bindings/clock/bcm2835.h     |  1 +
 3 files changed, 18 insertions(+)
---
base-commit: 72d3fcf802c45d00b300f25b848a93c3a2bd7c7e
change-id: 20261012-devel-bcm2711-gisb-clk-cf8eea19c46a

Best regards,
--  
Nicolai Buchwitz <nb@tipi-net.de>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-10-20 15:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-20 14:58 [PATCH 0/3] clk: bcm2835: describe the BCM2711 GISB clock for the GENET MDIO controller Nicolai Buchwitz
2026-10-20 14:58 ` [PATCH 1/3] dt-bindings: clock: bcm2835: add the BCM2711 GISB clock Nicolai Buchwitz
2026-10-20 15:38   ` Florian Fainelli
2026-10-20 14:58 ` [PATCH 2/3] clk: bcm2835: register " Nicolai Buchwitz
2026-10-20 15:40   ` Florian Fainelli
2026-10-20 14:58 ` [PATCH 3/3] ARM: dts: bcm2711: give the GENET MDIO controller its clock Nicolai Buchwitz
2026-10-20 15:40   ` Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox