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

Qmtech Wukong: updates #200

Merged
merged 1 commit into from
Apr 11, 2021
Merged

Conversation

rdolbeau
Copy link
Contributor

fix ethernet clock (it's a GMII), add FB support over the HDMI connector (hdmi clock set from the resolution)

This and enjoy-digital/litex#875 enable a working FB in Linux-on-Litex-Vexriscv.

This and forcing polling mode in Linux (see enjoy-digital/liteeth#62 ) enable a working Ethernet in Linux-on-Litex-Vexriscv.

fix ethernet clock (it's a GMII), add FB support over the HDMI connector (hdmi clock set from the resolution)
@enjoy-digital enjoy-digital merged commit d830ef8 into litex-hub:master Apr 11, 2021
@enjoy-digital
Copy link
Member

Thanks @rdolbeau, that's merged.

@rdolbeau rdolbeau deleted the wukong_ethfix_fb branch April 11, 2021 13:46
@mdejw
Copy link

mdejw commented May 30, 2021

The board has GMII PHY, but there is defined MII PHY. Why?
This does not work good on my side - transmission is not stable.

I've prepared PR:
#221

@rdolbeau
Copy link
Contributor Author

@mdejw It's not defined as MII; LiteEthPHY correctly auto-detect that the Phy is a GMII/MII 10/100/1000 (https://github.com/enjoy-digital/liteeth/blob/435c67dbc774ab2f49c6d53f5f63417ba4af7605/liteeth/phy/__init__.py#L6-L14).

This works fine to establish a link in both Gigabit and FastEthernet (depending on what the other side is using); However in Gigabit mode, the core is likely too slow to keep up with the link in Linux - you get lots of dropped packet. FastEthernet has no issue.

What are the symptoms you're trying to fix?

@mdejw
Copy link

mdejw commented May 30, 2021

I had a problem with loading image via TFTP on Litex BIOS. I've tried only on 1GBit link speed.
I've seen on Wireshark only one ARP request from Litex board and ARP reply from server.

Thank you, I hadn't look that deep into implementation.

I assumed it was an MII PHY as I saw following lines on Litex netboot:

Ethernet phy mode: MII

So - seems it does not detect GMII/1GBit on my side.

@rdolbeau
Copy link
Contributor Author

@mdejw The GMII/MII implementation default to MII rather then GMII if the system clock is below 125 MHz (https://github.com/enjoy-digital/liteeth/blob/435c67dbc774ab2f49c6d53f5f63417ba4af7605/liteeth/phy/gmii_mii.py#L115-L119). If you boot Linux then the driver will use gigabit.

If it doesn't work for you, perhaps you can try forcing the mode (e.g. mode = modes["GMII"] there: https://github.com/enjoy-digital/liteeth/blob/435c67dbc774ab2f49c6d53f5f63417ba4af7605/liteeth/phy/gmii_mii.py#L183) to see if it helps. Or try with a FastEthernet switch if you have one lying around.

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

Successfully merging this pull request may close these issues.

3 participants