From: Rob Herring <robh@kernel.org>
To: Joakim Zhang <qiangqing.zhang@nxp.com>
Cc: davem@davemloft.net, kuba@kernel.org, andrew@lunn.ch,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-imx@nxp.com
Subject: Re: [PATCH V1 net-next 3/5] net: fec: add imx8mq and imx8qm new versions support
Date: Wed, 14 Jul 2021 17:18:44 -0600 [thread overview]
Message-ID: <20210714231844.GA3723991@robh.at.kernel.org> (raw)
In-Reply-To: <20210709081823.18696-4-qiangqing.zhang@nxp.com>
On Fri, Jul 09, 2021 at 04:18:21PM +0800, Joakim Zhang wrote:
> From: Fugang Duan <fugang.duan@nxp.com>
>
> The ENET of imx8mq and imx8qm are basically the same as imx6sx,
> but they have new features support based on imx6sx, like:
> - imx8mq: supports IEEE 802.3az EEE standard.
> - imx8qm: supports RGMII mode delayed clock.
>
> Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
> Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
> ---
> drivers/net/ethernet/freescale/fec.h | 13 ++++++++++
> drivers/net/ethernet/freescale/fec_main.c | 30 +++++++++++++++++++++++
> 2 files changed, 43 insertions(+)
>
> diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h
> index 2e002e4b4b4a..c1f93aa79d63 100644
> --- a/drivers/net/ethernet/freescale/fec.h
> +++ b/drivers/net/ethernet/freescale/fec.h
> @@ -472,6 +472,19 @@ struct bufdesc_ex {
> */
> #define FEC_QUIRK_HAS_MULTI_QUEUES (1 << 19)
>
> +/* i.MX8MQ ENET IP version add new feature to support IEEE 802.3az EEE
> + * standard. For the transmission, MAC supply two user registers to set
> + * Sleep (TS) and Wake (TW) time.
> + */
> +#define FEC_QUIRK_HAS_EEE (1 << 20)
> +
> +/* i.MX8QM ENET IP version add new feture to generate delayed TXC/RXC
> + * as an alternative option to make sure it works well with various PHYs.
> + * For the implementation of delayed clock, ENET takes synchronized 250MHz
> + * clocks to generate 2ns delay.
> + */
> +#define FEC_QUIRK_DELAYED_CLKS_SUPPORT (1 << 21)
> +
> struct bufdesc_prop {
> int qid;
> /* Address of Rx and Tx buffers */
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index 8aea707a65a7..dd0b8715e84e 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -135,6 +135,26 @@ static const struct fec_devinfo fec_imx6ul_info = {
> FEC_QUIRK_HAS_COALESCE | FEC_QUIRK_CLEAR_SETUP_MII,
> };
>
> +static const struct fec_devinfo fec_imx8mq_info = {
> + .quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT |
> + FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM |
> + FEC_QUIRK_HAS_VLAN | FEC_QUIRK_HAS_AVB |
> + FEC_QUIRK_ERR007885 | FEC_QUIRK_BUG_CAPTURE |
> + FEC_QUIRK_HAS_RACC | FEC_QUIRK_HAS_COALESCE |
> + FEC_QUIRK_CLEAR_SETUP_MII | FEC_QUIRK_HAS_MULTI_QUEUES |
> + FEC_QUIRK_HAS_EEE,
> +};
> +
> +static const struct fec_devinfo fec_imx8qm_info = {
> + .quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT |
> + FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM |
> + FEC_QUIRK_HAS_VLAN | FEC_QUIRK_HAS_AVB |
> + FEC_QUIRK_ERR007885 | FEC_QUIRK_BUG_CAPTURE |
> + FEC_QUIRK_HAS_RACC | FEC_QUIRK_HAS_COALESCE |
> + FEC_QUIRK_CLEAR_SETUP_MII | FEC_QUIRK_HAS_MULTI_QUEUES |
> + FEC_QUIRK_DELAYED_CLKS_SUPPORT,
> +};
> +
> static struct platform_device_id fec_devtype[] = {
> {
> /* keep it for coldfire */
> @@ -161,6 +181,12 @@ static struct platform_device_id fec_devtype[] = {
> }, {
> .name = "imx6ul-fec",
> .driver_data = (kernel_ulong_t)&fec_imx6ul_info,
> + }, {
> + .name = "imx8mq-fec",
> + .driver_data = (kernel_ulong_t)&fec_imx8mq_info,
> + }, {
> + .name = "imx8qm-fec",
> + .driver_data = (kernel_ulong_t)&fec_imx8qm_info,
> }, {
> /* sentinel */
> }
> @@ -175,6 +201,8 @@ enum imx_fec_type {
> MVF600_FEC,
> IMX6SX_FEC,
> IMX6UL_FEC,
> + IMX8MQ_FEC,
> + IMX8QM_FEC,
> };
>
> static const struct of_device_id fec_dt_ids[] = {
> @@ -185,6 +213,8 @@ static const struct of_device_id fec_dt_ids[] = {
> { .compatible = "fsl,mvf600-fec", .data = &fec_devtype[MVF600_FEC], },
> { .compatible = "fsl,imx6sx-fec", .data = &fec_devtype[IMX6SX_FEC], },
> { .compatible = "fsl,imx6ul-fec", .data = &fec_devtype[IMX6UL_FEC], },
> + { .compatible = "fsl,imx8mq-fec", .data = &fec_devtype[IMX8MQ_FEC], },
> + { .compatible = "fsl,imx8qm-fec", .data = &fec_devtype[IMX8QM_FEC], },
I don't think these are documented.
Rob
next prev parent reply other threads:[~2021-07-14 23:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-09 8:18 [PATCH V1 net-next 0/5] net: fec: add support for i.MX8MQ and i.MX8QM Joakim Zhang
2021-07-09 8:18 ` [PATCH V1 net-next 1/5] dt-bindings: fec: add the missing clocks properties Joakim Zhang
2021-07-14 23:19 ` Rob Herring
2021-07-15 5:29 ` Joakim Zhang
2021-07-09 8:18 ` [PATCH V1 net-next 2/5] dt-bindings: fec: add RGMII delayed clock property Joakim Zhang
2021-07-14 23:19 ` Rob Herring
2021-07-14 23:34 ` Andrew Lunn
2021-07-09 8:18 ` [PATCH V1 net-next 3/5] net: fec: add imx8mq and imx8qm new versions support Joakim Zhang
2021-07-14 23:18 ` Rob Herring [this message]
2021-07-09 8:18 ` [PATCH V1 net-next 4/5] net: fec: add eee mode tx lpi support Joakim Zhang
2021-07-09 8:18 ` [PATCH V1 net-next 5/5] net: fec: add MAC internal delayed clock feature support Joakim Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210714231844.GA3723991@robh.at.kernel.org \
--to=robh@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=qiangqing.zhang@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).