mbox series

[V2,net-next,0/7] net: fec: add support for i.MX8MQ and i.MX8QM

Message ID 20210728115203.16263-1-qiangqing.zhang@nxp.com
Headers show
Series net: fec: add support for i.MX8MQ and i.MX8QM | expand

Message

Joakim Zhang July 28, 2021, 11:51 a.m. UTC
This patch set adds supports for i.MX8MQ and i.MX8QM, both of them extend new features.

ChangeLogs:
V1->V2:
	* rebase on schema binding, and update dts compatible string.
	* use generic ethernet controller property for MAC internal RGMII clock delay
	  rx-internal-delay-ps and tx-internal-delay-ps

Fugang Duan (3):
  net: fec: add imx8mq and imx8qm new versions support
  net: fec: add eee mode tx lpi support
  net: fec: add MAC internal delayed clock feature support

Joakim Zhang (4):
  dt-bindings: net: fsl,fec: update compatible items
  dt-bindings: net: fsl,fec: add RGMII internal clock delay
  arm64: dts: imx8m: add "fsl,imx8mq-fec" compatible string for FEC
  arm64: dts: imx8qxp: add "fsl,imx8qm-fec" compatible string for FEC

 .../devicetree/bindings/net/fsl,fec.yaml      |  27 ++++
 arch/arm64/boot/dts/freescale/imx8mm.dtsi     |   2 +-
 arch/arm64/boot/dts/freescale/imx8mn.dtsi     |   2 +-
 .../boot/dts/freescale/imx8qxp-ss-conn.dtsi   |   4 +-
 drivers/net/ethernet/freescale/fec.h          |  25 +++
 drivers/net/ethernet/freescale/fec_main.c     | 146 ++++++++++++++++++
 6 files changed, 202 insertions(+), 4 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org July 28, 2021, 12:50 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Wed, 28 Jul 2021 19:51:56 +0800 you wrote:
> This patch set adds supports for i.MX8MQ and i.MX8QM, both of them extend new features.
> 
> ChangeLogs:
> V1->V2:
> 	* rebase on schema binding, and update dts compatible string.
> 	* use generic ethernet controller property for MAC internal RGMII clock delay
> 	  rx-internal-delay-ps and tx-internal-delay-ps
> 
> [...]

Here is the summary with links:
  - [V2,net-next,1/7] dt-bindings: net: fsl,fec: update compatible items
    https://git.kernel.org/netdev/net-next/c/5d886947039d
  - [V2,net-next,2/7] dt-bindings: net: fsl,fec: add RGMII internal clock delay
    https://git.kernel.org/netdev/net-next/c/df11b8073e19
  - [V2,net-next,3/7] net: fec: add imx8mq and imx8qm new versions support
    https://git.kernel.org/netdev/net-next/c/947240ebcc63
  - [V2,net-next,4/7] net: fec: add eee mode tx lpi support
    https://git.kernel.org/netdev/net-next/c/b82f8c3f1409
  - [V2,net-next,5/7] net: fec: add MAC internal delayed clock feature support
    https://git.kernel.org/netdev/net-next/c/fc539459e900
  - [V2,net-next,6/7] arm64: dts: imx8m: add "fsl,imx8mq-fec" compatible string for FEC
    https://git.kernel.org/netdev/net-next/c/a758dee8ac50
  - [V2,net-next,7/7] arm64: dts: imx8qxp: add "fsl,imx8qm-fec" compatible string for FEC
    https://git.kernel.org/netdev/net-next/c/987e1b96d056

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Andrew Lunn July 28, 2021, 2:10 p.m. UTC | #2
> +	/* For rgmii internal delay, valid values are 0ps and 2000ps */
> +	if (of_property_read_u32(np, "tx-internal-delay-ps", &rgmii_delay))
> +		fep->rgmii_txc_dly = true;
> +	if (of_property_read_u32(np, "rx-internal-delay-ps", &rgmii_delay))
> +		fep->rgmii_rxc_dly = true;

I don't see any validation of the only supported values are 0ps and
2000ps.

	Andrew
Joakim Zhang July 29, 2021, 2:32 a.m. UTC | #3
> -----Original Message-----
> From: Andrew Lunn <andrew@lunn.ch>
> Sent: 2021年7月28日 22:11
> To: Joakim Zhang <qiangqing.zhang@nxp.com>
> Cc: davem@davemloft.net; kuba@kernel.org; robh+dt@kernel.org;
> shawnguo@kernel.org; s.hauer@pengutronix.de; kernel@pengutronix.de;
> festevam@gmail.com; dl-linux-imx <linux-imx@nxp.com>;
> netdev@vger.kernel.org; devicetree@vger.kernel.org;
> linux-kernel@vger.kernel.org
> Subject: Re: [PATCH V2 net-next 5/7] net: fec: add MAC internal delayed clock
> feature support
> 
> > +	/* For rgmii internal delay, valid values are 0ps and 2000ps */
> > +	if (of_property_read_u32(np, "tx-internal-delay-ps", &rgmii_delay))
> > +		fep->rgmii_txc_dly = true;
> > +	if (of_property_read_u32(np, "rx-internal-delay-ps", &rgmii_delay))
> > +		fep->rgmii_rxc_dly = true;
> 
> I don't see any validation of the only supported values are 0ps and 2000ps.

Hi Andrew,

I also take this into account, since I have limited the value to 0 and 2000 in fec dt-bindings.
It will report error when run dtbs_check if value is not invalid. Another reason is that actually
the value is not program to hardware, we only enable RGMII delay or not. If need, I think we
can only add a dev_warn() here, instead of stop the probe process?

Best Regards,
Joakim Zhang
> 	Andrew