cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Adventurer
Adventurer
321 Views
Registered: ‎04-22-2015

100 Mb/s Ethernet using Zynq Ultrascale+ GEM

Hello,

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?

thanks,

Paul

0 Kudos
1 Reply
Highlighted
Visitor
Visitor
274 Views
Registered: ‎07-04-2018

Hello,

We are using MYIR's MYD-CZU3EG board and has some experience, maybe you can try to modify the clock of gem from 125MHz to 25MHz in vivado clock configuration. Hope it would be helpful.

clock.png

 

0 Kudos