Now I got my Stamp to run, but there's a new problem. I set up the network connection in the /etc/network/interfaces as static(IP,netmask,gateway,etc). The Nameserver is set in /etc/resolv.conf. But i have now connection to my network. ifconfig shows that the interface eth0 ist up.
eth0 Link encap:Ethernet HWaddr 00:xx:xx:xx:xx:xx
inet addr:192.168.xx.xxx Bcast:192.168.xx.xxx Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:4 dropped:0 overruns:0 frame:4
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:21 Base address:0x4000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
At startup it looks good:
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfffc4000 irq 21 (00:50:c2:94:9e:6d)
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ffffffff:00, irq=-1)
The PHY is a78Q2123 from Teridian. The Hardware seems to work, because the Status-LED are blinking, when i try to ping a host.
What could be the problem? I found nothing similiar in this forum or in WWW.
Do you need further information? (Log, kernel, kernel-Config?)
Thanks.

Re: [Stamp9G20] No connection
When the Status LEDs are blinking this indicates that the analog side of the PHY is fine.
There are a lot of possible error sources:
1) Check if the IRQ pin is correct with your implementation in arch/arm/mach-at91/board-stamp9g20.c
2) Check the signal quality with a scope on both receive and transmit lines also both between PHY and MAC and PHY and Trafo.
3) Does the PHY work with u-boot?
and more possible. We have never used this PHY ourselves, but getting hardware to work is always kind of detective work. Linux should support that PHY.
Re: [Stamp9G20] No connection
Thanks for the quick answer. I will do a little "detective work" and post the results.
Re: [Stamp9G20] No connection
Okay, i measured the pins with a scoped, looked okay for me. But in Uboot it can't set up a connection, tried NFS and ping(yes, i set ipaddr, serverip and netmask). The check with the IRQ-Pin was a little hard for me, i only found an irq_init which i followed to the aic_init. No information about which IRQ should be used. Have I to assigne the pins for the MII-device somewhere? Maybe an other driver uses one of the PHY-Pins. But this would result in an error message, right?
Re: [Stamp9G20] No connection
You should check following structure in the Linux kernel sources.
In arch/arm/mach-at91/board-stamp9g20.c you have this struct:
static struct at91_eth_data __initdata macb_data = {
.phy_irq_pin = AT91_PIN_PA28,
.is_rmii = 1,
};
If you are using MII interface, you should set .is_rmii = 0, otherwise your pin multiplexing will not be correct.
Here you also find your interrupt pin and then recompile the kernel.
Re: [Stamp9G20] No connection
Now I found the structure, but it was not in board-stamp9g20.c but in stamp9g20-evb.c. I had to change the pins for MII in at91sam9260_devices.c too, which ended in a no functional MMC-Device - MII and MCCDA uses the same port. :( Aargh, why we didn't used a RMII-PHY? The solution was to start from the buildt-in NAND. But same thing here, no connection. It seems that the stamp receives packages and send answers, but the remote station receives nothing. Somewhere between MAC and PHY sits a bit-eater.
But this is not your problem. I'm very grateful for your help.
Re: [Stamp9G20] No connection
Oh sorry, I looked at the 2.6.35 sources. Can you locate, were you do not receive any signals? before the PHY or after. If the problem is between the PHY and MAC it could still be a driver issue.
When you have a look at the sources, you can set many drivers into a debug-mode giving you more information on probable failures.
Re: [Stamp9G20] No connection
So, we found the problem. It seems that if using PA11 for ETX3 the SC-Card-reader pulls down the level of the pin. That was the problem of the net device - no data on ETX3. I configured the kernel to use PA23 and PA24 for ETX2 and ETX3 and a collegue of mine soldered some wires from PHY to these pins. Now it works without any problem.
Thanks a lot for your help.
Re: [Stamp9G20] No connection
Hi,
I have same problem, I remove all pull-up resistor... But i don't function.
There are change in kernel (driver for 78Q2123 ?)
Thank for help
Riccardo
Re: [Stamp9G20] No connection
Please be more verbose, what product did you use? Which PHY chip?, What does the kernel log show? Is it a *Phy not connected* or does it not show anything? And u-boot? For a different PHY chip, you may have to enable it in the kernel's PHY-Library.
Re: [Stamp9G20] No connection
it is a custom board with AT91SAM9G20, O.S. is EmDebian 3.6.37, the ethernet chip in 78Q2123 from Teridian
the schematic of connection is this:
http://www.farnell.com/datasheets/38201.pdf (page 6):
the interrupts pin is PA31;
PA14 RXD0
PA15 RXD1
PA25 RXD2
PA26 RXD3
PA22 TXER
PA18 RXER
PA16 TXEN
PA17 RXDV
PA12 TXD0
PA13 TXD1
PA10 TXD2
PA11 TXD3
PA21 MDIO
PA20 MDC
PA28 CRS
PA29 COL
PA27 RXCK
PA30 TXCK
Board file macb init
/*
* MACB Ethernet device
*/
static struct at91_eth_data __initdata foxg20_macb_data = {
.phy_irq_pin = AT91_PIN_PA31,
.is_rmii = 0,
};
u-boot print:
Fixed MDIO Bus: probed
bonding: Ethernet Channel Bonding Driver: v3.7.0 (June 2, 2010)
bonding: Warning: either miimon or arp_interval and arp_ip_target module parame.
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfffc4000 irq 21 (00:04:25:28:05:08)
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ffffffff:00, irq=-1)
eth0: link up (100/Full)
ethtool command:
debarm:~# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: external
Auto-negotiation: on
Link detected: yes
but the ping command don't function...
Re: [Stamp9G20] No connection
This looks OK from HW-Side, at least at first sight. The communication with the PHY works.
Either your network settings are wrong or you have a problem on the analog side before or after the magnetics.
You have to debug this with a strobe. I also would check, if your send data can be received in the network, meaning if only one way does not work or both.
Re: [Stamp9G20] No connection
The problem could also be with the ETX or ERX lines. The stats can look all right, but this only shows that the communication over the MIO-line is working, because over this lines the PHY and MAC sends there settings.
You should really use a strobe and take a look to all ETX and ERX lines. You could also use a Hub and Wireshark to look where the problem lies. On our Board we had the problem that the Stamp receives packages and send responses, but because of the non working EXT3 the response never reached the Sender. You could also use ifconfig to check the amount of received and send packages, best for that is to use: watch -n 1 ifconfig . If you do an ping the counters should increase.
Re: [Stamp9G20] No connection
Hi,
I have same problem,
The board receive the pkt but don't transmit it.
It is an hardware problem, for example the length of tracks from Terridian to RJ45 plug ?
Or is a software problem (driver ?)
Thanks
Riccardo
Re: [Stamp9G20] No connection
Can you be a bit more verbose about your debugging efforts, like all the questions in the answer above?
It could, but must not be something like wrong way of tracks or a not suitable ground plane around the PHY-Chip. Most manufactures publish a HW-Design guide to meet common problems, also for the lay-out.
In your above list of used pins you state the following:
In Linux you can see in arch/arm/mach-at91/at91sam9260_devices.c:
So the wrong pins are initialized, you have to change that for your board. Did you?