boards: mr_canhubk3: enable EMAC

This board has a single instance of EMAC connected to a NXP TJA1103
Ethernet PHY. Currently, there is no driver for this PHY and its
pin strapping configuration allows to use it without software
configuration, so EMAC is configured as fixed link.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
This commit is contained in:
Manuel Argüelles 2023-07-07 14:07:39 -03:00 committed by Carles Cufí
commit 11b94f3155
6 changed files with 66 additions and 0 deletions

View file

@ -20,4 +20,11 @@ config GPIO
endif # CAN endif # CAN
if NETWORKING
config NET_L2_ETHERNET
default y
endif # NETWORKING
endif # BOARD_MR_CANHUBK3 endif # BOARD_MR_CANHUBK3

View file

@ -55,6 +55,7 @@ LPI2C on-chip i2c
ADC SAR on-chip adc ADC SAR on-chip adc
LPSPI on-chip spi LPSPI on-chip spi
WDT FS26 SBC watchdog WDT FS26 SBC watchdog
EMAC on-chip ethernet
============ ========== ================================ ============ ========== ================================
The default configuration can be found in the Kconfig file The default configuration can be found in the Kconfig file
@ -228,6 +229,18 @@ The on-board MX25L6433F 64M-bit multi-I/O Serial NOR Flash memory is connected
to the QSPI controller port A1. This board configuration selects it as the to the QSPI controller port A1. This board configuration selects it as the
default flash controller. default flash controller.
Ethernet
========
This board has a single instance of Ethernet Media Access Controller (EMAC)
interfacing with a `NXP TJA1103`_ 100Base-T1 Ethernet PHY. Currently, there is
no driver for this PHY and this board default pin strapping configuration for
the PHY (RMII, master, autonomous mode enabled, polarity correction enabled)
allows to use it without software configuration.
The 100Base-T1 signals are available in connector ``P9`` and can be converted to
100Base-T using a Ethernet media converter such as `RDDRONE-T1ADAPT`_.
Programming and Debugging Programming and Debugging
************************* *************************
@ -295,6 +308,12 @@ References
.. _NXP FS26 Safety System Basis Chip: .. _NXP FS26 Safety System Basis Chip:
https://www.nxp.com/products/power-management/pmics-and-sbcs/safety-sbcs/safety-system-basis-chip-with-low-power-fit-for-asil-d:FS26 https://www.nxp.com/products/power-management/pmics-and-sbcs/safety-sbcs/safety-system-basis-chip-with-low-power-fit-for-asil-d:FS26
.. _NXP TJA1103:
https://www.nxp.com/products/interfaces/ethernet-/automotive-ethernet-phys/asil-b-compliant-100base-t1-ethernet-phy:TJA1103
.. _RDDRONE-T1ADAPT:
https://www.nxp.com/products/interfaces/ethernet-/automotive-ethernet-phys/ethernet-media-converter-for-drones-rovers-mobile-robotics-and-automotive:RDDRONE-T1ADAPT
.. _Lauterbach TRACE32: .. _Lauterbach TRACE32:
https://www.lauterbach.com https://www.lauterbach.com

View file

@ -253,4 +253,21 @@
input-enable; input-enable;
}; };
}; };
emac0_default: emac0_default {
group1 {
pinmux = <PTC0_EMAC_MII_RMII_RXD0>,
<PTC1_EMAC_MII_RMII_RXD1>,
<PTC14_EMAC_MII_RMII_RX_ER>,
<PTC15_EMAC_MII_RMII_RX_DV>,
<PTD6_EMAC_MII_RMII_TX_CLK>;
input-enable;
};
group2 {
pinmux = <PTB5_EMAC_MII_RMII_TXD0>,
<PTB4_EMAC_MII_RMII_TXD1>,
<PTE9_EMAC_MII_RMII_TX_EN>;
output-enable;
};
};
}; };

View file

@ -362,3 +362,16 @@
pinctrl-names = "default"; pinctrl-names = "default";
data-pin-config = "sdo-in,sdi-out"; data-pin-config = "sdo-in,sdi-out";
}; };
&emac0 {
pinctrl-0 = <&emac0_default>;
pinctrl-names = "default";
phy-connection-type = "rmii";
local-mac-address = [02 04 9f aa bb cc];
status = "okay";
fixed-link {
speed = <100>;
full-duplex;
};
};

View file

@ -17,3 +17,4 @@ supported:
- adc - adc
- spi - spi
- watchdog - watchdog
- netif:eth

View file

@ -0,0 +1,9 @@
# Copyright 2023 NXP
# SPDX-License-Identifier: Apache-2.0
CONFIG_ASSERT=n
CONFIG_LOG=n
CONFIG_NET_LOG=n
CONFIG_NET_IP_ADDR_CHECK=n
CONFIG_SPEED_OPTIMIZATIONS=y
CONFIG_NET_ZPERF_MAX_PACKET_SIZE=1470