RE: [PATCH net-next 1/3] dt-bindings: net: tja11xx: use reverse-mode to instead of rmii-refclk-in
From: Wei Fang
Date: Fri Aug 16 2024 - 01:01:58 EST
> -----Original Message-----
> From: Andrew Lunn <andrew@xxxxxxx>
> Sent: 2024年8月16日 11:28
> To: Wei Fang <wei.fang@xxxxxxx>
> Cc: davem@xxxxxxxxxxxxx; edumazet@xxxxxxxxxx; kuba@xxxxxxxxxx;
> pabeni@xxxxxxxxxx; robh@xxxxxxxxxx; krzk+dt@xxxxxxxxxx;
> conor+dt@xxxxxxxxxx; f.fainelli@xxxxxxxxx; hkallweit1@xxxxxxxxx;
> linux@xxxxxxxxxxxxxxx; Andrei Botila (OSS) <andrei.botila@xxxxxxxxxxx>;
> netdev@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx;
> linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH net-next 1/3] dt-bindings: net: tja11xx: use reverse-mode
> to instead of rmii-refclk-in
>
> > Based on the TJA data sheet, like TJA1103/TJA1104, if the reverse mode
> > is set. If XMII_MODE is set to MII, the device operates in revMII mode
> > (TXCLK and RXCLK are input). If XMII_MODE is set to RMII, the device
> > operates in revRMII mode (REF_CLK is output). So it's just that the input
> > and output directions of xx_CLK are reversed.
> > we don't need to tell the MAC to play the role of the PHY, in our case, we
> > just need the PHY to provide the reference clock in RMII mode.
>
> If this is purely about providing a reference clock, normally 25Mhz,
> there are a few PHY drivers which support this. Find one and copy
> it. There is no need to invent something new.
>
Sorry, I didn't find the correct PHY driver, could you point me to which PHY
driver that I can refer to?
The PHY drivers I searched for using the "clk" keyword all seem to set the
clock via a vendor defined property. Such as,
realtek: "realtek,clkout-disable"
dp83867 and dp83869: "ti,clk-output-sel" and "ti,sgmii-ref-clock-output-enable"
motorcomm: " motorcomm,tx-clk-1000-inverted"
micrel: "rmii-ref"