sun7i_a20_gmac_clk_setup(9)
πΈ NAME πΈ
sun7i_a20_gmac_clk_setup β the setup function for the A20/A31 GMAC clock module, bestie π
β¨ SYNOPSIS β¨
void sun7i_a20_gmac_clk_setup (struct device_node *node );
π ARGUMENTS π
nodeβ thestruct device_nodefor the clock, like that's literally the whole personality of this argument π«Ά
π DESCRIPTION π
okay so picture this clock, right? it's giving circuit diagram, and it looks something like this:
This clock looks something like this ________________________ MII TX
clock from PHY >-----|___________ _________|----> to GMAC core GMAC
Int. RGMII TX clk >----|_____________/__gate---|----> to PHY Ext. 125MHz
RGMII TX clk >--|__divider__/ | |________________________|
the way that this whole thing works: that external 125 MHz reference is optional, no cap β the GMAC can just use its internal TX clock and it's literally fine π. and heads up, the A31 GMAC clock module does not have the divider controls for the external reference. so don't go looking for them, they're not there, periodt.
to keep it simple (and honestly, iconic of them), let the GMAC use either the MII TX clock for MII mode, and its internal TX clock for GMII and RGMII modes. the GMAC driver should be the one selecting the appropriate source and gating/ungating the output to the PHY π
β οΈ only the GMAC should use this clock. altering the clock so that it doesn't match the GMAC's operation parameters will result in the GMAC not being able to send traffic out π that's the whole point of the thing, bestie.
the GMAC driver should set the clock rate and enable/disable this clock to configure the required state β and the clock driver then responds by auto-reparenting the clock. it just does that. main character energy fr fr β¨
π¦ SEE ALSO π¦
- kernel file
./drivers/clk/sunxi/clk-a20-gmac.cβ go read it, iykyk π
and that's the whole page, bestie π this came to you from ./drivers/clk/sunxi, dated October 2026, and it's titled sun7i_a20_gmac_clk_setup(9) in case you forgot already π slay, go configure your clocks π
β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms