Skip to content

Commit

Permalink
boards: mr_canhubk3: enable EMAC
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
manuargue authored and Umar Nisar committed Aug 15, 2023
1 parent 57cd223 commit bd202fa
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 0 deletions.
7 changes: 7 additions & 0 deletions boards/arm/mr_canhubk3/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,11 @@ config GPIO

endif # CAN

if NETWORKING

config NET_L2_ETHERNET
default y

endif # NETWORKING

endif # BOARD_MR_CANHUBK3
19 changes: 19 additions & 0 deletions boards/arm/mr_canhubk3/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ LPI2C on-chip i2c
ADC SAR on-chip adc
LPSPI on-chip spi
WDT FS26 SBC watchdog
EMAC on-chip ethernet
============ ========== ================================

The default configuration can be found in the Kconfig file
Expand Down Expand Up @@ -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
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
*************************

Expand Down Expand Up @@ -295,6 +308,12 @@ References
.. _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

.. _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:
https://www.lauterbach.com

Expand Down
17 changes: 17 additions & 0 deletions boards/arm/mr_canhubk3/mr_canhubk3-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -253,4 +253,21 @@
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;
};
};
};
13 changes: 13 additions & 0 deletions boards/arm/mr_canhubk3/mr_canhubk3.dts
Original file line number Diff line number Diff line change
Expand Up @@ -362,3 +362,16 @@
pinctrl-names = "default";
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;
};
};
1 change: 1 addition & 0 deletions boards/arm/mr_canhubk3/mr_canhubk3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ supported:
- adc
- spi
- watchdog
- netif:eth
9 changes: 9 additions & 0 deletions samples/net/zperf/boards/mr_canhubk3.conf
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit bd202fa

Please sign in to comment.