Skip to content

Commit

Permalink
Merge branch 'add-fec-support-on-s32v234-platform'
Browse files Browse the repository at this point in the history
Wei Fang says:

====================
Add FEC support on s32v234 platform

This series patches are to add FEC support on s32v234 platfom.
1. Add compatible string and quirks for fsl,s32v234
2. Update Kconfig to also check for ARCH_S32.
====================

Link: https://lore.kernel.org/r/20220907095649.3101484-1-wei.fang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Jakub Kicinski committed Sep 20, 2022
2 parents 2bd178c + 167d5fe commit 517ff3c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/net/fsl,fec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ properties:
- fsl,imx28-fec
- fsl,imx6q-fec
- fsl,mvf600-fec
- fsl,s32v234-fec
- items:
- enum:
- fsl,imx53-fec
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/ethernet/freescale/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ config NET_VENDOR_FREESCALE
depends on FSL_SOC || QUICC_ENGINE || CPM1 || CPM2 || PPC_MPC512x || \
M523x || M527x || M5272 || M528x || M520x || M532x || \
ARCH_MXC || ARCH_MXS || (PPC_MPC52xx && PPC_BESTCOMM) || \
ARCH_LAYERSCAPE || COMPILE_TEST
ARCH_LAYERSCAPE || ARCH_S32 || COMPILE_TEST
help
If you have a network (Ethernet) card belonging to this class, say Y.

Expand All @@ -23,15 +23,15 @@ if NET_VENDOR_FREESCALE
config FEC
tristate "FEC ethernet controller (of ColdFire and some i.MX CPUs)"
depends on (M523x || M527x || M5272 || M528x || M520x || M532x || \
ARCH_MXC || SOC_IMX28 || COMPILE_TEST)
ARCH_MXC || ARCH_S32 || SOC_IMX28 || COMPILE_TEST)
default ARCH_MXC || SOC_IMX28 if ARM
depends on PTP_1588_CLOCK_OPTIONAL
select CRC32
select PHYLIB
imply NET_SELFTESTS
help
Say Y here if you want to use the built-in 10/100 Fast ethernet
controller on some Motorola ColdFire and Freescale i.MX processors.
controller on some Motorola ColdFire and Freescale i.MX/S32 processors.

config FEC_MPC52xx
tristate "FEC MPC52xx driver"
Expand Down
12 changes: 12 additions & 0 deletions drivers/net/ethernet/freescale/fec_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,13 @@ static const struct fec_devinfo fec_imx8qm_info = {
FEC_QUIRK_DELAYED_CLKS_SUPPORT,
};

static const struct fec_devinfo fec_s32v234_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,
};

static struct platform_device_id fec_devtype[] = {
{
/* keep it for coldfire */
Expand Down Expand Up @@ -188,6 +195,9 @@ static struct platform_device_id fec_devtype[] = {
}, {
.name = "imx8qm-fec",
.driver_data = (kernel_ulong_t)&fec_imx8qm_info,
}, {
.name = "s32v234-fec",
.driver_data = (kernel_ulong_t)&fec_s32v234_info,
}, {
/* sentinel */
}
Expand All @@ -204,6 +214,7 @@ enum imx_fec_type {
IMX6UL_FEC,
IMX8MQ_FEC,
IMX8QM_FEC,
S32V234_FEC,
};

static const struct of_device_id fec_dt_ids[] = {
Expand All @@ -216,6 +227,7 @@ static const struct of_device_id fec_dt_ids[] = {
{ .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], },
{ .compatible = "fsl,s32v234-fec", .data = &fec_devtype[S32V234_FEC], },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, fec_dt_ids);
Expand Down

0 comments on commit 517ff3c

Please sign in to comment.