This guide describes the exact steps for integrating the Microchip LAN8651 10BASE-T1S MACPHY Ethernet Controller on the LAN9662 PCB8291 Evaluation Board (UNG8291). The LAN8651 is connected via a Raspberry Pi Hat-compatible connector to the PIN header of the LAN9662.
- LAN9662 PCB8291 Evaluation Board (UNG8291/EVB-LAN9662-EndNode)
- Raspberry Pi Hat Adapter (MIKROE-1513)
- LAN8651 PHY Module (MIKROE-5543)
- Mount the Raspberry Pi Hat Adapter on the 40-pin GPIO header of the LAN9662 PCB8291
- Insert the LAN8651 PHY module onto the Raspberry Pi Hat Adapter
- Connect the Ethernet cable to the LAN8651 connector
File: external/configs/arm_standalone_defconfig
Ensure the following Device Tree names and overlay support are activated:
BR2_LINUX_KERNEL_INTREE_DTS_NAME="... microchip/lan966x-pcb8291 ..."
BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT=yUsed Device Tree Files:
- Base-DTS:
microchip/lan966x-pcb8291.dtb→ configured aslan9662_ung8291_0_at_lan966x - LAN8651 Overlay:
overlays/lan966x_pcb8291_lan8651.dtbo→ configured aslan9662_ung8291_lan8651_0_at_lan966x
Kernel Features to Activate:
# Microchip PHY Support
CONFIG_MICROCHIP_PHY=y
# 10BASE-T1S Support
CONFIG_NET_DSA=y
CONFIG_NET_DSA_MSCC_FELIX=y
# SPI Interface (if connected via SPI bus)
CONFIG_SPI_MASTER=y
CONFIG_SPI_SPIDEV=y
# Ethernet Subsystem
CONFIG_NETDEVICES=y
CONFIG_ETHERNET=y
CONFIG_PHYLIB=yFile: board/lan966x/post-image.sh
The LAN8651 Device Tree Overlay is already automatically included in the build process:
-a $BINARIES_DIR/overlays/lan966x_pcb8291_lan8651.dtbo,lan9662_ung8291_lan8651_0_at_lan966xFile: external/configs/arm_standalone_defconfig
# Post-Image Script
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/lan966x/post-image.sh"
# Microchip Utilities
BR2_PACKAGE_MSCC_CML_UTILS_LAN966X=yMost Important Step: Setting the PCB environment variable in U-Boot:
# In the U-Boot console or in the persistent environment:
setenv pcb "lan9662_ung8291_0_at_lan966x#lan9662_ung8291_lan8651_0_at_lan966x"
saveenvPCB String Syntax Explanation:
lan9662_ung8291_0_at_lan966x: Base Device Tree for LAN9662 PCB8291#: Separator for overlayslan9662_ung8291_lan8651_0_at_lan966x: LAN8651 Device Tree Overlay
Why is the U-Boot configuration necessary?
The LAN966x system uses a dynamic hardware detection system:
-
Device Tree Overlay System: The system uses modular Device Trees - a base-DT for the basic board and specific overlays for additional hardware like the LAN8651.
-
Runtime Hardware Variants: The PCB8291 board can have various hardware configurations. U-Boot must decide at boot time which overlays to load, since the kernel needs this information before hardware initialization.
-
Hardware Abstraction Layer: U-Boot functions as a hardware abstraction layer and:
- Recognizes the hardware configuration via PCB variable
- Loads the corresponding Device Tree overlays
- Passes the correct hardware description to the Linux kernel
-
Without U-Boot Configuration: The kernel boots only with the base Device Tree, causing the LAN8651 hardware not to be recognized and no additional Ethernet interface to be created.
Alternative methods are not practical:
- Static Compilation: Would include all possible overlays (resource waste)
- Kernel Runtime Loading: Too late, since hardware initialization already begins at kernel start
- Auto-Detection: LAN8651 cannot be automatically detected (no Plug&Play ID)
If the PCB variable doesn't work, you can load the overlay directly via boot arguments:
setenv bootargs "fdtoverlays=lan966x_pcb8291_lan8651.dtbo"# Configuration for LAN966x standalone
make arm_standalone_defconfig
# Optional: Menuconfig for further customizations
make menuconfig
# Execute build
makeAfter successful build, you will find the following files in output/images/:
lan966x-pcb8291.dtb # Base Device Tree
overlays/lan966x_pcb8291_lan8651.dtbo # LAN8651 Overlay
fit.itb # FIT Image with all Device Trees and Overlays
Flash the generated image according to the standard LAN9662 documentation:
# For NOR Flash Boot
dd if=output/images/fit.itb of=/dev/sdX bs=1M
# Or for NFS/TFTP Boot
cp output/images/fit.itb /tftpboot/In the U-Boot Console:
# Check PCB variable
printenv pcb
# Should output:
# pcb=lan9662_ung8291_0_at_lan966x#lan9662_ung8291_lan8651_0_at_lan966x
# Continue boot
bootAfter Linux Boot - Verification:
# Check network interfaces
ip link show
# Should additionally show a new Ethernet interface for LAN8651
# e.g. eth1 or lan966x-1
# Check Device Tree overlay
ls /proc/device-tree/
# Check kernel messages
dmesg | grep -i lan8651
dmesg | grep -i phyAfter successful boot, you should see the following outputs:
# ip link show (Example)
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
# dmesg Output (Example)
[ 2.345678] lan966x-switch 60000000.switch: Adding to iommu group 0
[ 2.456789] LAN8651 10BASE-T1S PHY detected
[ 2.567890] lan966x-1: PHY [xxx] driver [LAN8651] (irq=POLL)Problem Diagnosis:
# Check U-Boot PCB variable
printenv pcb
# If empty or wrong:
setenv pcb "lan9662_ung8291_0_at_lan966x#lan9662_ung8291_lan8651_0_at_lan966x"
saveenv
resetPossible Causes:
- Check hardware connection
- Verify SPI/I2C configuration
- Check PHY address mapping in Device Tree
Diagnostic Commands:
# Check PHY status
cat /sys/class/net/eth*/phy*/uevent
# Test hardware connection
i2cdetect -y 0 # or corresponding I2C bus numberCheck Steps:
- Verify kernel configuration (
CONFIG_MICROCHIP_PHY=y) - Validate Device Tree overlay syntax
- Check hardware strapping pins on LAN8651
Common Problems:
# Device Tree Compiler Error
# → Check overlay syntax in Device Tree
# Missing Overlay File
# → Clear BitBake cache: make clean && make
# Kernel Config Inconsistencies
# → Regenerate kernel defconfigIf additional SPI devices should be configured on Flexcom2 SPI:
# Extend U-Boot PCB variable for SPI:
setenv pcb "lan9662_ung8291_0_at_lan966x#lan966x_pcb8291_fc2_spi_0_at_lan966x#lan9662_ung8291_lan8651_0_at_lan966x"File: BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
For custom Device Tree customizations, you can add custom DTS files and include them via:
BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="/path/to/custom/dts/files"Network Manager for 10BASE-T1S:
# Static IP configuration
ip addr add 192.168.1.100/24 dev eth1
ip link set eth1 up
# DHCP Client (if available)
dhclient eth1- Hardware: LAN9662 EVB-EndNode Documentation
- Overlays: LAN966x Overlays Guide
- SPI Config: LAN966x SPI Host Configuration
- Build Config:
external/configs/arm_standalone_defconfig - Post-Image Script:
board/lan966x/post-image.sh
Microchip Support Channels:
- Microchip Developer Portal
- LAN966x Documentation
- GitHub Issues for Boot-Loader issues
- BSP Version: 2025.12
- Kernel Version: According to BSP version
- U-Boot Version: According to BSP version
- Compatible Hardware: LAN9662 PCB8291 (UNG8291), LAN8651 PHY Module