boards: frdm_mcxn947: Enable ENET QOS

Enable ENET QOS on FRDM MCXN947 board

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This commit is contained in:
Declan Snyder 2024-03-01 14:36:26 -06:00 committed by Anas Nashif
parent 7079ea506a
commit 293cf9150c
6 changed files with 73 additions and 0 deletions

View file

@ -0,0 +1,9 @@
# Copyright 2024 NXP
# SPDX-License-Identifier: Apache-2.0
if BOARD_FRDM_MCXN947
config NET_L2_ETHERNET
default y if NETWORKING
endif

View file

@ -153,6 +153,15 @@ static int frdm_mcxn947_init(void)
CLOCK_EnableClock(kCLOCK_Dac1);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay)
CLOCK_AttachClk(kNONE_to_ENETRMII);
CLOCK_EnableClock(kCLOCK_Enet);
SYSCON0->PRESETCTRL2 = SYSCON_PRESETCTRL2_ENET_RST_MASK;
SYSCON0->PRESETCTRL2 &= ~SYSCON_PRESETCTRL2_ENET_RST_MASK;
/* rmii selection for this board */
SYSCON->ENET_PHY_INTF_SEL = SYSCON_ENET_PHY_INTF_SEL_PHY_SEL(1);
#endif
/* Set SystemCoreClock variable. */
SystemCoreClock = CLOCK_INIT_CORE_CLOCK;

View file

@ -74,6 +74,8 @@ The FRDM-MCXN947 board configuration supports the following hardware features:
+-----------+------------+-------------------------------------+
| DAC | on-chip | dac |
+-----------+------------+-------------------------------------+
| ENET QOS | on-chip | ethernet |
+-----------+------------+-------------------------------------+
Targets available
==================

View file

@ -69,4 +69,26 @@
slew-rate = "fast";
};
};
pinmux_enet_qos: pinmux_enet_qos {
mdio_group {
pinmux = <ENET0_MDC_PIO1_20>,
<ENET0_MDIO_PIO1_21>;
slew-rate = "fast";
drive-strength = "low";
input-enable;
};
mac_group {
pinmux = <ENET0_RXDV_PIO1_13>,
<ENET0_RXD0_PIO1_14>,
<ENET0_RXD1_PIO1_15>,
<ENET0_TX_CLK_PIO1_4>,
<ENET0_TXEN_PIO1_5>,
<ENET0_TXD0_PIO1_6>,
<ENET0_TXD1_PIO1_7>;
slew-rate = "fast";
drive-strength = "low";
input-enable;
};
};
};

View file

@ -143,3 +143,22 @@
pinctrl-0 = <&pinmux_dac0>;
pinctrl-names = "default";
};
&enet {
pinctrl-0 = <&pinmux_enet_qos>;
pinctrl-names = "default";
};
&enet_mac {
phy-connection-type = "rmii";
zephyr,random-mac-address;
phy-handle = <&phy>;
};
&enet_mdio {
phy: ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0>;
status = "okay";
};
};

View file

@ -104,3 +104,15 @@
&dac0 {
status = "okay";
};
&enet {
status = "okay";
};
&enet_mac {
status = "okay";
};
&enet_mdio {
status = "okay";
};