Hello,
I have a custom board designed from the AT91SAM9x25 eval board and am trying to use the DP83630 PHY instead of the davicom PHY which is used on the eval board.
We can boot into u-boot and talk to the PHY through the mii command, we can also read and write to the PHY successfully. The MAC/PHY also performs auto negotiation in both u-boot and linux and we can see a link established.
However, we cannot ping anything, or get a DHCP lease. I am able to use an oscilliscope between the MAC and the PHY, and we can see packets both being sent and recieved on the RMII lines. I have checked the settings in the PHY and MAC to ensure RMII mode is selected. Still, we can not connect to a network. I dont think that it is a hardware problem since we can see data coming through on the RMII lines, but it could be anything at this point.
When we run an ifconfig in linux, we see a value for TX packets but no RX packets. Printouts are below...we are stuck so any help would be greatly appreciated.
U-Boot> printenv baudrate=115200 boardFamily=at91sam9x25 bootargs=earlyprintk verbose 256M console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait noinitrd rootfstype=ext4 rw bootcmd=mmc dev 0; fatload mmc 0:1 22000000 uimage; fatload mmc 0:1 ${dtbLoadAddr} ${fdtfile}; bootm 22000000 - 21000000 bootdelay=5 dtbLoadAddr=21000000 eth1addr=3e:36:65:1a:6f:be ethact=macb0 ethaddr=3e:36:65:2a:6f:be fdtfile=dts/at91sam9x25ek.dtb ipaddr=192.168.1.53 serverip=192.168.1.113
Print out from linux boot
Starting kernel ... Uncompressing Linux... done, booting the kernel. [ 0.187500] at_hdmac ffffee00.dma-controller: Atmel AHB DMA Controller ( cpy slave ), 8 channels [ 0.195312] SCSI subsystem initialized [ 0.203125] usbcore: registered new interface driver usbfs [ 0.203125] usbcore: registered new interface driver hub [ 0.203125] usbcore: registered new device driver usb [ 0.203125] at91_i2c f8010000.i2c: using dma0chan0 (tx) and dma0chan1 (rx) for DMA transfers [ 0.210937] at91_i2c f8010000.i2c: AT91 i2c bus driver. [ 0.210937] pps_core: LinuxPPS API ver. 1 registered [ 0.210937] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.210937] PTP clock support registered [ 0.218750] Switching to clocksource tcb_clksrc [ 0.281250] NET: Registered protocol family 2 [ 0.289062] TCP established hash table entries: 2048 (order: 2, 16384 bytes) [ 0.289062] TCP bind hash table entries: 2048 (order: 1, 8192 bytes) [ 0.289062] TCP: Hash tables configured (established 2048 bind 2048) [ 0.289062] TCP: reno registered [ 0.289062] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 0.289062] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [ 0.289062] NET: Registered protocol family 1 [ 0.289062] RPC: Registered named UNIX socket transport module. [ 0.289062] RPC: Registered udp transport module. [ 0.289062] RPC: Registered tcp transport module. [ 0.289062] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.296875] msgmni has been set to 497 [ 0.296875] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250) [ 0.296875] io scheduler noop registered (default) [ 0.304687] fffff200.serial: ttyS0 at MMIO 0xfffff200 (irq = 16) is a ATMEL_SERIAL [ 0.460937] console [ttyS0] enabled [ 0.468750] f801c000.serial: ttyS1 at MMIO 0xf801c000 (irq = 23) is a ATMEL_SERIAL [ 0.476562] f8020000.serial: ttyS2 at MMIO 0xf8020000 (irq = 24) is a ATMEL_SERIAL [ 0.484375] f8024000.serial: ttyS3 at MMIO 0xf8024000 (irq = 25) is a ATMEL_SERIAL [ 0.492187] f8028000.serial: ttyS4 at MMIO 0xf8028000 (irq = 26) is a ATMEL_SERIAL [ 0.515625] brd: module loaded [ 0.531250] loop: module loaded [ 0.554687] atmel_nand: Use On Flash BBT [ 0.554687] atmel_nand 40000000.nand: Using dma0chan2 for DMA transfers. [ 0.656250] No NAND device found [ 0.671875] atmel_spi f0000000.spi: version: 0x212 [ 0.679687] atmel_spi f0000000.spi: Using dma0chan2 (tx) and dma0chan3 (rx) for DMA transfers [ 0.687500] atmel_spi f0000000.spi: Atmel SPI Controller at 0xf0000000 (irq 31) [ 0.695312] atmel_spi f0000000.spi: master is unqueued, this is deprecated [ 0.703125] dp83640: VIC: dp83640_init [ 0.718750] vcan: Virtual CAN interface driver [ 0.718750] CAN device driver interface [ 0.726562] pinctrl-at91 pinctrl.2: pin pioA9 already requested by fffff200.serial; cannot claim for f8000000.can [ 0.734375] pinctrl-at91 pinctrl.2: pin-9 (f8000000.can) status -22 [ 0.742187] pinctrl-at91 pinctrl.2: could not request pin 9 on device pinctrl.2 [ 0.750000] at91_can f8000000.can: Error applying setting, reverse things back [ 0.757812] pinctrl-at91 pinctrl.2: pin pioA9 already requested by fffff200.serial; cannot claim for f8000000.can [ 0.765625] pinctrl-at91 pinctrl.2: pin-9 (f8000000.can) status -22 [ 0.773437] pinctrl-at91 pinctrl.2: could not request pin 9 on device pinctrl.2 [ 0.781250] at91_can f8000000.can: Error applying setting, reverse things back [ 0.789062] at91_can f8000000.can: device registered (reg_base=d085c000, irq=33) [ 0.796875] pinctrl-at91 pinctrl.2: pin pioA6 already requested by f8020000.serial; cannot claim for f8004000.can [ 0.804687] pinctrl-at91 pinctrl.2: pin-6 (f8004000.can) status -22 [ 0.804687] pinctrl-at91 pinctrl.2: could not request pin 6 on device pinctrl.2 [ 0.812500] at91_can f8004000.can: Error applying setting, reverse things back [ 0.820312] pinctrl-at91 pinctrl.2: pin pioA6 already requested by f8020000.serial; cannot claim for f8004000.can [ 0.828125] pinctrl-at91 pinctrl.2: pin-6 (f8004000.can) status -22 [ 0.828125] pinctrl-at91 pinctrl.2: could not request pin 6 on device pinctrl.2 [ 0.835937] at91_can f8004000.can: Error applying setting, reverse things back [ 0.843750] at91_can f8004000.can: device registered (reg_base=d085e000, irq=34) [ 0.867187] libphy: MACB_mii_bus: probed [ 0.867187] macb f802c000.ethernet eth0: Cadence rev 0x0001010c [ 0.875000] macb f802c000.ethernet eth0: Cadence MACB at 0xf802c000 irq 27 (3e:36:65:2a:6f:be) [ 0.882812] macb f802c000.ethernet eth0: attached PHY driver [NatSemi DP83640] (mii_bus:phy_addr=f802c000.etherne:01, irq=-1) [ 0.937500] libphy: MACB_mii_bus: probed [ 0.945312] macb f8030000.ethernet eth1: Cadence rev 0x0001010c [ 0.945312] macb f8030000.ethernet eth1: Cadence MACB at 0xf8030000 irq 28 (3e:36:65:1a:6f:be) [ 0.953125] macb f8030000.ethernet eth1: attached PHY driver [Generic PHY] (mii_bus:phy_addr=f8030000.etherne:00, irq=-1) [ 0.960937] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 0.968750] ehci-atmel: EHCI Atmel driver [ 0.968750] atmel-ehci 700000.ehci: EHCI Host Controller [ 0.976562] atmel-ehci 700000.ehci: new USB bus registered, assigned bus number 1 [ 0.984375] atmel-ehci 700000.ehci: irq 35, io mem 0x00700000 [ 1.007812] atmel-ehci 700000.ehci: USB 2.0 started, EHCI 1.00 [ 1.007812] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 [ 1.015625] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.023437] usb usb1: Product: EHCI Host Controller [ 1.031250] usb usb1: Manufacturer: Linux 3.10.0+ ehci_hcd [ 1.031250] usb usb1: SerialNumber: 700000.ehci [ 1.039062] hub 1-0:1.0: USB hub found [ 1.046875] hub 1-0:1.0: 3 ports detected [ 1.054687] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 1.054687] at91_ohci 600000.ohci: AT91 OHCI [ 1.062500] at91_ohci 600000.ohci: new USB bus registered, assigned bus number 2 [ 1.070312] at91_ohci 600000.ohci: irq 35, io mem 0x00600000 [ 1.140625] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001 [ 1.148437] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.156250] usb usb2: Product: AT91 OHCI [ 1.156250] usb usb2: Manufacturer: Linux 3.10.0+ ohci_hcd [ 1.164062] usb usb2: SerialNumber: at91 [ 1.171875] hub 2-0:1.0: USB hub found [ 1.171875] hub 2-0:1.0: 3 ports detected [ 1.179687] usbcore: registered new interface driver cdc_acm [ 1.187500] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters [ 1.195312] usbcore: registered new interface driver usb-storage [ 1.203125] usbcore: registered new interface driver usbserial [ 1.210937] usbcore: registered new interface driver usbserial_generic [ 1.218750] usbserial: USB Serial support registered for generic [ 1.226562] usbcore: registered new interface driver ftdi_sio [ 1.226562] usbserial: USB Serial support registered for FTDI USB Serial Device [ 1.234375] usbcore: registered new interface driver pl2303 [ 1.242187] usbserial: USB Serial support registered for pl2303 [ 1.250000] atmel_usba_udc 500000.gadget: MMIO registers at 0xf803c000 mapped at d0868000 [ 1.257812] atmel_usba_udc 500000.gadget: FIFO at 0x00500000 mapped at d0900000 [ 1.273437] at91_rtc fffffeb0.rtc: rtc core: registered fffffeb0.rtc as rtc0 [ 1.281250] at91_rtc fffffeb0.rtc: AT91 Real Time Clock driver. [ 1.289062] at91sam9_wdt: sorry, watchdog is disabled [ 1.289062] at91_wdt: probe of fffffe40.watchdog failed with error -5 [ 1.296875] leds-gpio gpio-leds.3: pins are not configured from the driver [ 1.304687] platform gpio-leds.3: Driver leds-gpio requests probe deferral [ 1.312500] ledtrig-cpu: registered to indicate activity on CPUs [ 1.320312] usbcore: registered new interface driver usbhid [ 1.328125] usbhid: USB HID core driver [ 1.335937] TCP: cubic registered [ 1.335937] NET: Registered protocol family 10 [ 1.343750] sit: IPv6 over IPv4 tunneling driver [ 1.351562] NET: Registered protocol family 17 [ 1.351562] can: controller area network core (rev 20120528 abi 9) [ 1.359375] NET: Registered protocol family 29 [ 1.367187] can: raw protocol (rev 20120528) [ 1.367187] can: broadcast manager protocol (rev 20120528 t) [ 1.375000] can: netlink gateway (rev 20130117) max_hops=1 [ 1.382812] leds-gpio gpio-leds.3: pins are not configured from the driver [ 1.390625] platform gpio-leds.3: Driver leds-gpio requests probe deferral [ 1.398437] at91_rtc fffffeb0.rtc: setting system clock to 2007-01-01 00:06:23 UTC (1167609983) [ 1.414062] atmel_mci f0008000.mmc: version: 0x504 [ 1.414062] atmel_mci f0008000.mmc: using dma0chan4 for DMA transfers [ 1.468750] atmel_mci f0008000.mmc: Atmel MCI controller at 0xf0008000 irq 22, 1 slots [ 1.476562] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz [ 1.484375] leds-gpio gpio-leds.3: pins are not configured from the driver [ 1.484375] platform gpio-leds.3: Driver leds-gpio requests probe deferral [ 1.500000] Waiting for root device /dev/mmcblk0p2... [ 1.546875] mmc0: host does not support reading read-only switch. assuming write-enable. [ 1.562500] mmc0: new high speed SDHC card at address b368 [ 1.562500] mmcblk0: mmc0:b368 MSD 7.42 GiB [ 1.578125] mmcblk0: p1 p2 [ 1.578125] leds-gpio gpio-leds.3: pins are not configured from the driver [ 1.585937] platform gpio-leds.3: Driver leds-gpio requests probe deferral [ 1.640625] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null) [ 1.648437] VFS: Mounted root (ext4 filesystem) on device 179:2. [ 1.664062] devtmpfs: mounted [ 1.671875] Freeing unused kernel memory: 164K (c047f000 - c04a8000) INIT: version 2.88 booting Error opening /dev/fb0: No such file or directory Starting udev [ 3.031250] udevd[597]: starting version 182 [ 5.796875] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null) Starting Bootlog daemon: bootlogd. net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.all.rp_filter = 1 Thu Jan 29 04:36:00 UTC 2015 Starting atd: OK INIT: Entering runlevel: 5 Configuring network interfaces... [ 8.203125] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready udhcpc (v1.22.1) started Sending discover... [ 9.867187] macb f802c000.ethernet eth0: link up (100/Full) [ 9.867187] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready Sending discover... Sending discover... No lease, failing [ 17.562500] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready udhcpc (v1.22.1) started Sending discover... [ 18.953125] macb f8030000.ethernet eth1: link up (10/Half) [ 18.953125] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready Sending discover... Sending discover... No lease, failing Starting system message bus: dbus. Starting OpenBSD Secure Shell server: sshd done. Starting rpcbind daemon...done. creating NFS state directory: done starting statd: done NFS daemon support not enabled in kernel Starting system log daemon...0 Starting kernel log daemon...0 * Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon [ ok ] Starting GPS (Global Positioning System) daemon gpsd Starting Lighttpd Web Server: lighttpd. Starting crond: OK Stopping Bootlog daemon: bootlogd. Poky (Yocto Project Reference Distro) 1.6.1 at91sam9x5ek /dev/ttyS0 at91sam9x5ek login: