Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom RMII PHY PMOD question #125

Open
machdyne opened this issue Jan 3, 2023 · 2 comments
Open

Custom RMII PHY PMOD question #125

machdyne opened this issue Jan 3, 2023 · 2 comments

Comments

@machdyne
Copy link

machdyne commented Jan 3, 2023

Hi. I'm working on a custom ethernet PMOD designed specifically to work with LiteX, based on the LAN8720A RMII PHY.

At the moment it doesn't seem to be able to send or receive anything.

I thought it may be related to configuration straps during reset but that didn't seem to be an issue here: https://twitter.com/enjoy_digital/status/1403259359518396418

Any advice for debugging this?

The schematics are available here if anyone is interested: https://github.com/machdyne/katze

Thanks.

root@buildroot:~# cat /proc/interrupts 
           CPU0       
  1:         20  SiFive PLIC   2 Edge      eth0
root@buildroot:~# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 32:13:3A:20:F3:B8  
          inet addr:192.168.1.199  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::3013:3aff:fe20:f3b8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:1328 (1.2 KiB)
          Interrupt:1 
@ozel
Copy link

ozel commented Jan 21, 2023

the phy's configuration straps could be of concern, depending on the board/pmod wiring. see for example the notes for ulx3s https://github.com/emard/ulx3s-misc/tree/master/examples/eth/rmii/proj and related discussion: emard/ulx3s#14 (comment)

since you connected RST, you could make sure that all 3 MODE pins are high while RST is released for configuring auto-negotiation.

did you confirm the ethernet mode with ethtool in linux and compare with the mode detected on the other end?

@machdyne
Copy link
Author

Thanks, this led me to the solution. The problem was the configuration straps.

ethtool doesn't show anything, maybe because there's no SMI? In any case, I'm now able to send and receive and everything looks good.

I've submitted a PR that provides an option to set the mode during reset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants