Hi, I am porting Open Network Linux (ONL) to a bare metal switch (Kuga 7048N - see attached KUGA7048N_HW_SPEC_v03.pdf). The eTSEC NIC works fine in uboot and in the factory-loaded ONIE install/recovery environments.
However, eTSEC NIC *TX* isn't working for my build. Base address reported as 0xe000 whereas it's 0x8000 in (working) ONIE environment. See below ifconfig output:
root@localhost:~# ifconfig ma1 ma1 Link encap:Ethernet HWaddr 00:30:ab:2e:45:44 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:16853 errors:0 dropped:414 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2247973 (2.1 MiB) TX bytes:0 (0.0 B) Base address:0xe000 |
The NIC receives packets, as indicated by ifconfig output above and tcpdump output below:
root@localhost:~# tcpdump -i ma1 |
I created DTS (see attached powerpc-delta-kuga7048-r0.dts) by dumping precompiled DTB from uboot (see attached uboot-dts-dump.txt) and editing it to:
ethtool reports no link detected and speed/duplex unknown. See output below:
root@localhost:~# ethtool ma1 Settings for ma1: Supported ports: [ MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: Symmetric Receive-only Advertised auto-negotiation: Yes Speed: Unknown! Duplex: Unknown! (255) Port: MII PHYAD: 1 Transceiver: external Auto-negotiation: on Current message level: 0x0000003f (63) drv probe link timer ifdown ifup Link detected: no |
mii-tool reports auto-negotiation completed and link ok. See output below:
root@localhost:~# mii-tool ma1 -vvvv Using SIOCGMIIPHY=0x8947 ma1: negotiated 1000baseT-FD flow-control, link ok registers for MII PHY 1: 1140 796d 0020 60c1 0de1 c5e1 000d 2001 4e8a 0200 3800 0000 0000 0000 0000 3000 0000 1301 0000 0000 0101 0000 0000 0000 0400 ff1f 043e fff1 0000 337b 0000 0000 product info: vendor 00:08:18, model 12 rev 1 basic mode: autonegotiation enabled basic status: autonegotiation complete, link ok capabilities: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD advertising: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control link partner: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control |
uname -a output:
root@localhost:~# uname -a Linux localhost 3.16.76-OpenNetworkLinux-85xx #1 SMP Sun Mar 19 06:16:10 UTC 2023 ppc GNU/Linux |
I am happy to post output of any other commands. This isn't my area of expertise, but I am happy to do more digging on my own to solve the issue myself. I've just gotten to the point where I'm spinning my wheels, and I'm not sure what question(s) I need to ask to get the answer(s) that I need. Thanks in advance!
**** More pasted output that might help ****
ONIE:/ # fw_printenv autoload=no baudrate=9600 bdev=ram bootcmd=run bootonie bootdelay=10 bootdiag=setenv bootargs root=/dev/$bdev rw console=$consoledev,$baudrate $othbootargs; cp.b 0xed000000 $ramdiskaddr 0x1000000; cp.b 0xee800000 $loadaddr 0x400000; cp.b 0xeef00000 $fdtaddr 0x80000; bootm $loadaddr $ramdiskaddr $fdtaddr bootfile=uImage bootonie=sys_eeprom onie;run check_boot_reason; run nos_bootcmd; run onie_bootcmd check_boot_reason=if test -n $onie_boot_reason; then setenv onie_bootargs boot_reason=$onie_boot_reason; run onie_bootcmd; fi; clearenv=protect off eff60000 +20000;erase eff60000 +20000;protect on eff60000 +20000 consoledev=ttyS0 dhcp_user-class=powerpc-fsl_p2020rdbpca-r0_uboot dhcp_vendor-class-identifier=uboot:powerpc-p2041-2-DNI_L7048N-r1 dtbflashaddr=0xeef00000 eth1addr=00:E0:0C:02:01:FD eth2addr=00:E0:0C:02:02:FD ethact=eTSEC3 ethaddr=00:30:AB:2E:45:44 ethprime=eTSEC1 fdtaddr=c00000 fdtfile=p2020ds.dtb fsflashaddr=0xed000000 gatewayip=192.168.1.1 hostname=unknown hwconfig=fsl_ddr:ctlr_intlv=bank,bank_intlv=cs0_cs1;usb1:dr_mode=host,phy_type=ulpi ipaddr=192.168.1.254 loadaddr=1000000 loads_echo=1 netdev=eth0 netmask=255.255.255.0 nfsboot=setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off console=$consoledev,$baudrate $othbootargs;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr - $fdtaddr onie_args=run onie_initargs onie_platformargs onie_bootcmd=echo Loading Open Network Install Environment ...; echo Platform: $onie_platform ; echo Version : $onie_version ; cp.b $onie_start $loadaddr ${onie_sz.b} && run onie_args && bootm ${loadaddr} onie_initargs=setenv bootargs quiet console=$consoledev,$baudrate onie_machine=fsl_p2041_kuga7048 onie_machine_rev=0 onie_platform=powerpc-p2041-2-DNI_L7048N-r1 onie_platformargs=setenv bootargs $bootargs serial_num=${serial#} eth_addr=$ethaddr platform=$onie_platform $onie_bootargs $onie_debugargs onie_rescue=setenv onie_boot_reason rescue && run bootonie onie_start=0xef020000 onie_sz.b=0x00f40000 onie_uninstall=setenv onie_boot_reason uninstall && run bootonie onie_update=setenv onie_boot_reason update && run bootonie onie_vendor_id=33118 onie_version=2013.11.00 oniefile=onie-kuga7048-r0.bin onieflashaddr=0xef020000 othbootargs=cache-sram-size=0x10000 partition=scsi 0:0 perf_mode=performance platform=fsl_p2041_kuga7048 ramboot=setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr ramdiskaddr=2000000 ramdiskfile=rootfs.ext2.gz.uboot rootpath=/opt/nfsroot serial#=K48DL150422142 serverip=192.168.1.111 stderr=serial stdin=serial stdout=serial tftpflash=tftpboot $loadaddr $uboot; protect off 0xeff80000 +$filesize; erase 0xeff80000 +$filesize; cp.b $loadaddr 0xeff80000 $filesize; protect on 0xeff80000 +$filesize; cmp.b $loadaddr 0xeff80000 $filesize uboot=u-boot.bin uimgflashaddr=0xee800000 uplddtb=tftp $fdtaddr $serverip:$fdtfile;protect off $dtbflashaddr +$filesize;erase $dtbflashaddr +$filesize;cp.b $fdtaddr $dtbflashaddr $filesize;protect on $dtbflashaddr +$filesize upldfs=tftp $ramdiskaddr $serverip:$ramdiskfile;protect off $fsflashaddr +$filesize;erase $fsflashaddr +$filesize;cp.b $ramdiskaddr $fsflashaddr $filesize;protect on $fsflashaddr +$filesize upldlinux=ping $serverip;run uplduimg;run upldfs;run uplddtb; upldonie=tftp $loadaddr $serverip:$oniefile;protect off $onieflashaddr +$filesize;erase $onieflashaddr +$filesize;cp.b $loadaddr $onieflashaddr $filesize;protect on $onieflashaddr +$filesize uplduimg=tftp $loadaddr $serverip:$bootfile;protect off $uimgflashaddr +$filesize;erase $uimgflashaddr +$filesize;cp.b $loadaddr $uimgflashaddr $filesize;protect on $uimgflashaddr +$filesize onie_dropbear_rsa_host_key=begin-base64@600@r#AAAAB3NzaC1yc2EAAAADAQABAAAAgwCXO4N0OTAhH2TxUTK3od1YASeoqGJz#4SxXOXJ68GmMPh0+uhzGThCDspDftlKPghnMynHD6dPCiyl2Ggmo9ls3WAA+#M3IgpYkKn9kq4wFuf8xuyTLfJHkyIJgjgwR9BbUWNvHEsaIX6yhnyXTMHC2x#Cwpa6J0AnAOzKq/pdpO/lq+rAAAAggF9Od4lx1jhe5ekumB0h5QbmXhfsBh+#ryEXamPWL4k3U10QGBhxIa3U+aLk+LXRDM/8w6yvhhZJqIQxMscnJd7K9cE2#GkOyJY3zqHaUNm3CjxS0JVPhqa+m1wAc6yjmAwp6wFpP2QilfyZwZsw/SsdN#csPRCnu37za+5yuCNgiW3AEAAABCAKCtPxmPRvM+oGxR+ob0p7yX/C8BDn75#PUUWWH8YeCIMAvyjS1T7rhtrYLEmPh5CqzFPb+dG8keEIPtx+uXFJdtLAAAA#QgDw8+uP66cUsy+oQeVvHWtMbdn2GsipTdYbZpYudQOMf3E/SYS1pDn1NbYG#kGkGd84aITwHaE6njOA3vc+yKBphIQ==#====# onie_dropbear_dss_host_key=begin-base64@600@d#AAAAB3NzaC1kc3MAAACBAO4Lzx5WXMQkMzLHxYBxkyS2bmc2b2fB+PU43gJH#u3kTK3qy8VEg4qmYhu4iEldqYCdYIOGwl+s8I2EQwlc84lTmuzUE6uSiyGE/#rUPFAog9qBTy5a0JIkzAbl9yHNkpWOUyW/eXYXtlTyG7A2koCfRRDAwOigLl#adLcoAbT0TnfAAAAFQCVUaqVCQecdbU7rYGx9Tk4W7l+MQAAAIEAt3t0Ddbn#rMsF+35Sk9AE1IGr3A+oC2w3IrDurjFzuDdGLohFdSbsViBUCPdObZyynp6i#5SuUSFe+xIpe4m9kZxOEN9ycWOdtReRFlgrvVxIrLdVKgCr0gizv7H+xobec#vaw76+ioAIJHur0aVW9zgj4CWt01dqD+p6s4p86LXxMAAACBAOmgTOdhg5WA#nRnU4qhncYSQ6Ygos9RCKa6Bdq+tSGmpi0U9uIa+gse1I9eX560WL7QSYoWi#BIqzpm0U4orSRIllLUAUlnF9QYRKIJb/4jmWsNKP7FqYFbmq5/me/n8KLaPw#Vkg7URPW0a+aW/Mm1Y5XNd87sisxHVA62M/SYH4mAAAAFQCB3zMpIgLe4tZK#wh8/5m8hPdQ/Ug==#====# boot-config-default=TkVUREVWPW1hMQpCT09UTU9ERT1JTlNUQUxMRUQKU1dJPWltYWdlczo6bGF0ZXN0Cg== onl_installer_initrd=onl-loader-fit.itb:93495c:134f992 nos_bootcmd=setenv onl_loadaddr 0x10000000; setenv onl_platform powerpc-delta-kuga7048-r0; setenv onl_itb powerpc-delta-kuga7048-r0.itb; setenv bootargs console=$consoledev,$baudrate onl_platform=$onl_platform; mmc part 0; ext2load mmc 0:1 $onl_loadaddr $onl_itb; bootm $onl_loadaddr#$onl_platform |
Uboot console output:
U-Boot 2013.01 (Nov 19 2014 - 17:10:19) L7048N V1.0.0.4 CPU0: P2020E, Version: 2.1, (0x80ea0021) |
ONIE installer environment ifconfig output (eth2 corresponds to physical interface):
ONIE:/proc/device-tree/chosen # cat bootargs ONIE:/proc/device-tree/chosen # ifconfig eth1 ONIE:/proc/device-tree/chosen # ifconfig eth2 |
Hello,
Very good job, but this error is not the device tree, this is going to driver code or something in the apps that can not be store in that address.
Regards
I fixed it by using the code for /drivers/net/phy/broadcom.c from https://www.uwsg.indiana.edu/hypermail/linux/kernel/0609.1/2317.html
#include <linux/kernel.h> #include <asm/io.h> /* BCM5421S control register */ MODULE_DESCRIPTION("Broadcom PHY driver"); static int bcm5421s_config_aneg(struct phy_device *phydev) /* Write the appropriate value to the PHY reg */ if (err < 0) return err; /* doesn't have phy interrupt */ return 0; static struct phy_driver bcm5421s_driver = { /* Glossy description on Broadcom's site seems to hint that the 5461 static int __init broadcom_init(void) ret = phy_driver_register(&bcm5421s_driver); static void __exit broadcom_exit(void) module_init(broadcom_init); |