From 8db14a3f5b73b76e1b9117c9bcdb369d77bc4646 Mon Sep 17 00:00:00 2001 From: "Man, Jianting (Meco)" <920369182@qq.com> Date: Sat, 13 Aug 2022 22:06:38 -0400 Subject: [PATCH] [imxrt1170] update enet (#6244) Co-authored-by: xinyi.gao --- bsp/imxrt/imxrt1052-nxp-evk/board/Kconfig | 1 + bsp/imxrt/imxrt1170-nxp-evk/board/Kconfig | 44 ++++++++++++++++++- .../MIMXRT1176/MIMXRT1176_cm7_features.h | 4 +- bsp/imxrt/libraries/MIMXRT1170/SConscript | 2 +- 4 files changed, 46 insertions(+), 5 deletions(-) diff --git a/bsp/imxrt/imxrt1052-nxp-evk/board/Kconfig b/bsp/imxrt/imxrt1052-nxp-evk/board/Kconfig index 4c8745a868..e5ce43afb3 100644 --- a/bsp/imxrt/imxrt1052-nxp-evk/board/Kconfig +++ b/bsp/imxrt/imxrt1052-nxp-evk/board/Kconfig @@ -116,6 +116,7 @@ menu "Onboard Peripheral Drivers" menuconfig BSP_USING_ETH bool "Enable Ethernet" select RT_USING_NETDEV + select RT_USING_LWIP default n diff --git a/bsp/imxrt/imxrt1170-nxp-evk/board/Kconfig b/bsp/imxrt/imxrt1170-nxp-evk/board/Kconfig index 353f226e31..4a7c4985d1 100644 --- a/bsp/imxrt/imxrt1170-nxp-evk/board/Kconfig +++ b/bsp/imxrt/imxrt1170-nxp-evk/board/Kconfig @@ -17,7 +17,7 @@ menu "On-chip Peripheral Drivers" config BSP_USING_DMA bool "Enable DMA" default n - + config BSP_USING_GPIO bool "Enable GPIO" select RT_USING_PIN @@ -27,7 +27,7 @@ menu "On-chip Peripheral Drivers" bool "Enable UART" select RT_USING_SERIAL default y - + if BSP_USING_LPUART config BSP_USING_LPUART1 bool "Enable LPUART1" @@ -93,6 +93,46 @@ menu "Onboard Peripheral Drivers" bool "Enable SDRAM" default n + menuconfig BSP_USING_ETH + bool "Enable Ethernet" + select RT_USING_NETDEV + select RT_USING_LWIP + default n + + + if BSP_USING_ETH + config BSP_USING_PHY + select RT_USING_PHY + bool "Enable ethernet phy" + default y + + if BSP_USING_PHY + config PHY_DEVICE_ADDRESS + int "Specify address of phy device" + default 2 + + config PHY_USING_KSZ8081 + bool "i.MX RT1064EVK uses ksz8081 phy" + default y + + if PHY_USING_KSZ8081 + config PHY_RESET_PORT + int "indicate port of reset" + default 6 + + config PHY_RESET_PIN + int "indicate pin of reset" + default 12 + + config FSL_FEATURE_PHYKSZ8081_USE_RMII50M_MODE + bool "Enable the PHY ksz8081 RMII50M mode" + depends on PHY_USING_KSZ8081 + default y + endif + + endif + endif + endmenu menu "Board extended module Drivers" diff --git a/bsp/imxrt/libraries/MIMXRT1170/MIMXRT1176/MIMXRT1176_cm7_features.h b/bsp/imxrt/libraries/MIMXRT1170/MIMXRT1176/MIMXRT1176_cm7_features.h index 81f75b6f41..2db8bb585a 100644 --- a/bsp/imxrt/libraries/MIMXRT1170/MIMXRT1176/MIMXRT1176_cm7_features.h +++ b/bsp/imxrt/libraries/MIMXRT1170/MIMXRT1176/MIMXRT1176_cm7_features.h @@ -340,9 +340,9 @@ /* @brief Support Interrupt Coalesce */ #define FSL_FEATURE_ENET_HAS_INTERRUPT_COALESCE (1) /* @brief Queue Size. */ -#define FSL_FEATURE_ENET_QUEUE (3) +#define FSL_FEATURE_ENET_QUEUE (1) /* @brief Has AVB Support. */ -#define FSL_FEATURE_ENET_HAS_AVB (1) +#define FSL_FEATURE_ENET_HAS_AVB (0) /* @brief Has Timer Pulse Width control. */ #define FSL_FEATURE_ENET_HAS_TIMER_PWCONTROL (1) /* @brief Has Extend MDIO Support. */ diff --git a/bsp/imxrt/libraries/MIMXRT1170/SConscript b/bsp/imxrt/libraries/MIMXRT1170/SConscript index 60e27099ef..6a628bae8d 100644 --- a/bsp/imxrt/libraries/MIMXRT1170/SConscript +++ b/bsp/imxrt/libraries/MIMXRT1170/SConscript @@ -2,7 +2,7 @@ Import('rtconfig') from building import * cwd = GetCurrentDir() -path = [cwd + '/CMSIS/Include',cwd + '/MIMXRT1176', cwd + '/MIMXRT1176/drivers'] +path = [cwd + '/CMSIS/Include',cwd + '/MIMXRT1176', cwd + '/MIMXRT1176/drivers', cwd + '/MIMXRT1176/drivers/cm7'] src = Split(''' MIMXRT1176/drivers/fsl_anatop_ai.c MIMXRT1176/system_MIMXRT1176_cm7.c -- GitLab