Re: [PATCH RFC net-next] net: stmmac: qcom-ethqos: set clk_csr
From: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Date: 2026-03-31 20:58:54
Also in:
linux-arm-msm, netdev
On Mon, Mar 30, 2026 at 01:20:18PM +0100, Russell King (Oracle) wrote:
On Mon, Mar 30, 2026 at 01:18:56PM +0200, Konrad Dybcio wrote:quoted
On 3/27/26 6:02 PM, Russell King (Oracle) wrote:quoted
The clocks for qcom-ethqos return a rate of zero as firmware manages their rate. According to hardware documentation, the clock which is fed to the slave AHB interface can crange between 50 and 100MHz.FWIW this __may__ possibly differ between platforms, but I'm not sure to what degree. Will there be visible impact if we e.g. have a 200 or 300 MHz clock somewhere?
While I had made an identical change while retesting the PCS series, I was holding off on posting this patch for the same concern - what if some boards fall outside the 50 - 100 MHz range. After some digging, the AHB clock appears to operate within: - 50 to 100 MHz for lemans/monaco derivative boards (2500BASE-X interface) - 30 to 75 MHz for boards with an RGMII interface. This is not exhaustive, but it covers all boards I have access to which actually boot with the upstream kernel. Therefore, I think using the /42 divisor should be fine as it will ensure that MDC never goes beyond 2.5 MHz. If a future platform exceeds this range, we could switch to something like: plat_dat->clk_csr = data->clk_csr, with each EMAC version selecting the appropriate divisor. Due to some urgent work tasks, I am still finishing PCS series testing. I will provide a t-b once done. In the meanwhile, please feel free to add: Reviewed-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com> Ayaan