RE: [PATCH V2 net-next 2/7] dt-bindings: net: fsl,fec: add RGMII internal clock delay

From: Joakim Zhang
Date: Wed Jul 28 2021 - 22:30:26 EST



> -----Original Message-----
> From: Andrew Lunn <andrew@xxxxxxx>
> Sent: 2021年7月28日 22:08
> To: Joakim Zhang <qiangqing.zhang@xxxxxxx>
> Cc: davem@xxxxxxxxxxxxx; kuba@xxxxxxxxxx; robh+dt@xxxxxxxxxx;
> shawnguo@xxxxxxxxxx; s.hauer@xxxxxxxxxxxxxx; kernel@xxxxxxxxxxxxxx;
> festevam@xxxxxxxxx; dl-linux-imx <linux-imx@xxxxxxx>;
> netdev@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx;
> linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH V2 net-next 2/7] dt-bindings: net: fsl,fec: add RGMII
> internal clock delay
>
> On Wed, Jul 28, 2021 at 07:51:58PM +0800, Joakim Zhang wrote:
>
> > + The "enet_2x_txclk"(option), for RGMII sampling clock which fixed at
> 250Mhz.
> > + The clock is required if SoC RGMII enable clock delay.
>
> Hi Joakim
>
> So you only need the clock if you are using RGMII delays? For RGMII without
> delays, the clock is not needed?
>
> You might want to add a check in the C code that the clock is provided when
> needed.

Hi Andrew,

Yes, we only need this clock for RGMII delays, the clock is not needed for RGMII without delays.

Had better add below check to avoid enabling needless clock.
if (fep->rgmii_txc_dly || fep->rgmii_rxc_dly)

Best Regards,
Joakim Zhang
> Andrew