I would like to be able to use GEM0 in 100 Mb/s mode with Linux with auto-negotiation. Currently I'm using a 5.2 kernel, but using the xilinx zynqmp-clk-ccf.dtsi instead of the mainline zynqmp-clk.dtsi. Normally this is broken, but I was able to track down what is going on.
In the Linux macb driver clk_set_rate() is called with a rate depending on what speed was negotiated. This ultimately calls zynqmp_pm_invoke_fn(PM_CLOCK_SETDIVIDER,...) This is now handled by the ATF, which in turn sends the request to the PMU in PmProcessRequest() case PM_CLOCK_SETDIVIDER which calls PmClockSetDivider(). In PmClockSetDivider() there is a permission check with PmClockCheckPermission() this can be disabled with DISABLE_CLK_PERMS.
So setting DISABLE_CLK_PERMS to (1U) in xpfw_config.h fixes this problem for GEM0, Hooray!
However there is a note in xpfw_config.h that says "(it is not safe to ever disable clock permission checking). Do this at * your own responsibility.". So how can the permissions be set correctly so Linux can set the rate using this divider (as the driver clearly needs to do)? I did not see any option for this in Vivado 2019.1 where the pmufw is generated from?
I don't see any Errata or mention of this problem on the macb driver page. Is there any other background info or info on what the plan from Xilinx is?