]> git.baikalelectronics.ru Git - kernel.git/commit
ravb: Add support for explicit internal clock delay configuration
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 1 Oct 2020 10:10:08 +0000 (12:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Oct 2020 19:53:31 +0000 (12:53 -0700)
commit9eb0cf83aa77376edcfe62237f12b3f4e1beed6f
tree221e9591cd49750977350147335fdd9f46dd5f1f
parent5d0bf3cdc1a54cc4b873b4e4d2b9a7bebec986cb
ravb: Add support for explicit internal clock delay configuration

Some EtherAVB variants support internal clock delay configuration, which
can add larger delays than the delays that are typically supported by
the PHY (using an "rgmii-*id" PHY mode, and/or "[rt]xc-skew-ps"
properties).

Historically, the EtherAVB driver configured these delays based on the
"rgmii-*id" PHY mode.  This caused issues with PHY drivers that
implement PHY internal delays properly[1].  Hence a backwards-compatible
workaround was added by masking the PHY mode[2].

Add proper support for explicit configuration of the MAC internal clock
delays using the new "[rt]x-internal-delay-ps" properties.
Fall back to the old handling if none of these properties is present.

[1] Commit 4570040da42c24b9 ("net: phy: micrel: add phy-mode support for
    the KSZ9031 PHY")
[2] Commit c470071643c4a9a9 ("ravb: Mask PHY mode to avoid inserting
    delays twice").

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/ravb.h
drivers/net/ethernet/renesas/ravb_main.c