Discussion:
[ORLinux] Adding Ethernet to DE0-Nano.
Andrew Back
2013-10-22 09:09:26 UTC
Permalink
Hello,

I'm looking for hardware/device recommendations for adding Ethernet to
a DE0-Nano for use with Linux. Wasn't sure if this might be better
posted to one of the other lists, but since I don't want to have to ?
read: am incapable of ? hacking HDL and drivers, I thought this one
might be a good bet :o)

Cheers,

Andrew
--
Andrew Back
Principal, AB Open Ltd
http://abopen.com
Stefan Kristiansson
2013-10-22 10:53:58 UTC
Permalink
Post by Andrew Back
Hello,
I'm looking for hardware/device recommendations for adding Ethernet to
a DE0-Nano for use with Linux. Wasn't sure if this might be better
posted to one of the other lists, but since I don't want to have to ?
read: am incapable of ? hacking HDL and drivers, I thought this one
might be a good bet :o)
Something like this:
http://www.thaieasyelec.net/index.php/Ethernet-Module/DP83848-Ethernet-Phy-Breakout-Board/p_179.html
would do it. It will still require a small bit of HDL hacking though, to
add the ethernet mac core to the de0_nano SoC.
Drivers should be covered though.

Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openrisc.net/pipermail/linux/attachments/20131022/e83a2530/attachment.html>
Andrew Back
2013-10-22 11:55:48 UTC
Permalink
On 22 October 2013 11:53, Stefan Kristiansson
Post by Stefan Kristiansson
Post by Andrew Back
Hello,
I'm looking for hardware/device recommendations for adding Ethernet to
a DE0-Nano for use with Linux. Wasn't sure if this might be better
posted to one of the other lists, but since I don't want to have to ?
read: am incapable of ? hacking HDL and drivers, I thought this one
might be a good bet :o)
http://www.thaieasyelec.net/index.php/Ethernet-Module/DP83848-Ethernet-Phy-Breakout-Board/p_179.html
would do it. It will still require a small bit of HDL hacking though, to add
the ethernet mac core to the de0_nano SoC.
Drivers should be covered though.
Would that hacking be akin to a minimal wiring exercise or a fair bit
more involved?

Also, I was wondering if perhaps it might make sense just to buy a
board with Ethernet and for which there is already a port. Suggests
for such a board would be appreciated.

Best,

Andrew
--
Andrew Back
Principal, AB Open Ltd
http://abopen.com
Stefan Kristiansson
2013-10-22 19:41:57 UTC
Permalink
Post by Andrew Back
On 22 October 2013 11:53, Stefan Kristiansson
http://www.thaieasyelec.net/index.php/Ethernet-Module/DP83848-Ethernet-Phy-Breakout-Board/p_179.html
Post by Stefan Kristiansson
would do it. It will still require a small bit of HDL hacking though, to
add
Post by Stefan Kristiansson
the ethernet mac core to the de0_nano SoC.
Drivers should be covered though.
Would that hacking be akin to a minimal wiring exercise or a fair bit
more involved?
Basically just wiring and instantiation of the ethmac core.
For orpsocv3 this is perhaps not the whole truth, since there are no boards
using
ethmac yet, so a core description for it has to be made as well.
But it shouldn't be a huge task, and I'm sure you'd get well enough support
from us.

Btw, the breakoutboard I linked to seems to be out of stock,
but I found a similar here:
http://www.wvshare.com/product/DP83848-Ethernet-Board.htm
Post by Andrew Back
Also, I was wondering if perhaps it might make sense just to buy a
board with Ethernet and for which there is already a port. Suggests
for such a board would be appreciated.
There are orpsocv2 ports for the following boards (that still are available
for purchase)
with ethernet:
http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,400,836&Prod=ATLYS
http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,400,897&Prod=NEXYS3
and the virtex ml501 board.

All of those have a higher pricepoint than de0 nano + breakoutboard
and there are no support for them in orpsocv3 yet.

Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openrisc.net/pipermail/linux/attachments/20131022/78681c1d/attachment.html>
Stefan Kristiansson
2013-10-23 04:58:17 UTC
Permalink
On Wed, Oct 23, 2013 at 12:18 AM, Tony Williamitis <twilliam at go-concepts.com
Hi -
I didn't see this mentioned - sorry if you have already seen it. This
tutorial steps through an example of connecting Ethernet to the DE0-Nano.
http://www.emb4fun.de/fpga/nutos1/
He is not running Linux on the Nano but it is still a very clear example
of what is involved in (one way of) doing an Ethernet interface.
Little of that can be applied to what we are doing, he is using a NiosII
processor and the Altera specific SoC generation tools
to build the SoC. None of which we are using to build OpenRISC SoCs.
The breakoutboard he is using is a viable option though.
https://www.olimex.com/Products/Modules/Ethernet/DM9000E-H/

Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openrisc.net/pipermail/linux/attachments/20131023/09f9638a/attachment.html>
Tony Williamitis
2013-10-22 21:18:04 UTC
Permalink
Hi -
I didn't see this mentioned - sorry if you have already seen it. This
tutorial steps through an example of connecting Ethernet to the DE0-Nano.

http://www.emb4fun.de/fpga/nutos1/

He is not running Linux on the Nano but it is still a very clear example of
what is involved in (one way of) doing an Ethernet interface.
Tony Williamitis



On Tue, Oct 22, 2013 at 3:41 PM, Stefan Kristiansson <
Post by Stefan Kristiansson
Post by Andrew Back
On 22 October 2013 11:53, Stefan Kristiansson
http://www.thaieasyelec.net/index.php/Ethernet-Module/DP83848-Ethernet-Phy-Breakout-Board/p_179.html
Post by Stefan Kristiansson
would do it. It will still require a small bit of HDL hacking though,
to add
Post by Stefan Kristiansson
the ethernet mac core to the de0_nano SoC.
Drivers should be covered though.
Would that hacking be akin to a minimal wiring exercise or a fair bit
more involved?
Basically just wiring and instantiation of the ethmac core.
For orpsocv3 this is perhaps not the whole truth, since there are no
boards using
ethmac yet, so a core description for it has to be made as well.
But it shouldn't be a huge task, and I'm sure you'd get well enough support
from us.
Btw, the breakoutboard I linked to seems to be out of stock,
http://www.wvshare.com/product/DP83848-Ethernet-Board.htm
Post by Andrew Back
Also, I was wondering if perhaps it might make sense just to buy a
board with Ethernet and for which there is already a port. Suggests
for such a board would be appreciated.
There are orpsocv2 ports for the following boards (that still are
available for purchase)
http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,400,836&Prod=ATLYS
http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,400,897&Prod=NEXYS3
and the virtex ml501 board.
All of those have a higher pricepoint than de0 nano + breakoutboard
and there are no support for them in orpsocv3 yet.
Stefan
_______________________________________________
Linux mailing list
Linux at lists.openrisc.net
http://lists.openrisc.net/listinfo/linux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openrisc.net/pipermail/linux/attachments/20131022/6166f7a7/attachment-0001.html>
Andrew Back
2013-11-14 22:31:32 UTC
Permalink
Hi Stefan,

On 22 October 2013 20:41, Stefan Kristiansson
Post by Stefan Kristiansson
Post by Andrew Back
On 22 October 2013 11:53, Stefan Kristiansson
Post by Stefan Kristiansson
http://www.thaieasyelec.net/index.php/Ethernet-Module/DP83848-Ethernet-Phy-Breakout-Board/p_179.html
would do it. It will still require a small bit of HDL hacking though, to add
the ethernet mac core to the de0_nano SoC.
Drivers should be covered though.
Would that hacking be akin to a minimal wiring exercise or a fair bit
more involved?
Basically just wiring and instantiation of the ethmac core.
For orpsocv3 this is perhaps not the whole truth, since there are no boards
using
ethmac yet, so a core description for it has to be made as well.
But it shouldn't be a huge task, and I'm sure you'd get well enough support
from us.
Btw, the breakoutboard I linked to seems to be out of stock,
http://www.wvshare.com/product/DP83848-Ethernet-Board.htm
So the DP83848 PHY breakout board I ordered from Hong Kong has now
arrived, and I was wondering where I should look to ascertain how to
go about adding ethmac to ORPSoCv3 and to do the wiring.

The board has TX0/1, RX 0/1, TX_EN, MDC, CRS, MDIO and OSCIN pins. I'm
guessing I may need the SMII core also?

Best,

Andrew
--
Andrew Back
Principal, AB Open Ltd
http://abopen.com
Stefan Kristiansson
2013-11-15 08:24:06 UTC
Permalink
Post by Andrew Back
Hi Stefan,
On 22 October 2013 20:41, Stefan Kristiansson
Post by Stefan Kristiansson
Post by Andrew Back
On 22 October 2013 11:53, Stefan Kristiansson
http://www.thaieasyelec.net/index.php/Ethernet-Module/DP83848-Ethernet-Phy-Breakout-Board/p_179.html
Post by Stefan Kristiansson
Post by Andrew Back
Post by Stefan Kristiansson
would do it. It will still require a small bit of HDL hacking though,
to
Post by Stefan Kristiansson
Post by Andrew Back
Post by Stefan Kristiansson
add
the ethernet mac core to the de0_nano SoC.
Drivers should be covered though.
Would that hacking be akin to a minimal wiring exercise or a fair bit
more involved?
Basically just wiring and instantiation of the ethmac core.
For orpsocv3 this is perhaps not the whole truth, since there are no
boards
Post by Stefan Kristiansson
using
ethmac yet, so a core description for it has to be made as well.
But it shouldn't be a huge task, and I'm sure you'd get well enough
support
Post by Stefan Kristiansson
from us.
Btw, the breakoutboard I linked to seems to be out of stock,
http://www.wvshare.com/product/DP83848-Ethernet-Board.htm
So the DP83848 PHY breakout board I ordered from Hong Kong has now
arrived, and I was wondering where I should look to ascertain how to
go about adding ethmac to ORPSoCv3 and to do the wiring.
The board has TX0/1, RX 0/1, TX_EN, MDC, CRS, MDIO and OSCIN pins. I'm
guessing I may need the SMII core also?
Not SMII, that's an RMII interface. I didn't realise that the board only
exposes that, not MII. That means you need a bit more work to get it working
than just wiring it up, but not much.
You need a trivial RMII/MII converter ontop of the ethmac.
I can dig out some code for taht for you some time next week,
but it's very simple, the difference between RMII and MII is basically
doubled
data rate for the TX/RX signals (50 MHz vs 25 MHz in 100Mbit mode) and
that RXDV and CRS share the same pin.

Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openrisc.net/pipermail/linux/attachments/20131115/1f229c98/attachment.html>
Olof Kindgren
2013-11-15 08:42:38 UTC
Permalink
There already exists a MII<->RMII converter for ethmac that was made for
the ordb2a port. I have been planning to put it into the ethmac repository,
but haven't had time to do it. This sounds like a good opportunity to get
this done. I'll try to commit it sometime this weekend. ethmac could need
some more love in general, but that's outside of the scope for this thread

//Olof


2013/11/15 Stefan Kristiansson <stefan.kristiansson at saunalahti.fi>
Post by Stefan Kristiansson
Post by Andrew Back
Hi Stefan,
On 22 October 2013 20:41, Stefan Kristiansson
Post by Stefan Kristiansson
Post by Andrew Back
On 22 October 2013 11:53, Stefan Kristiansson
http://www.thaieasyelec.net/index.php/Ethernet-Module/DP83848-Ethernet-Phy-Breakout-Board/p_179.html
Post by Stefan Kristiansson
Post by Andrew Back
Post by Stefan Kristiansson
would do it. It will still require a small bit of HDL hacking
though, to
Post by Stefan Kristiansson
Post by Andrew Back
Post by Stefan Kristiansson
add
the ethernet mac core to the de0_nano SoC.
Drivers should be covered though.
Would that hacking be akin to a minimal wiring exercise or a fair bit
more involved?
Basically just wiring and instantiation of the ethmac core.
For orpsocv3 this is perhaps not the whole truth, since there are no
boards
Post by Stefan Kristiansson
using
ethmac yet, so a core description for it has to be made as well.
But it shouldn't be a huge task, and I'm sure you'd get well enough
support
Post by Stefan Kristiansson
from us.
Btw, the breakoutboard I linked to seems to be out of stock,
http://www.wvshare.com/product/DP83848-Ethernet-Board.htm
So the DP83848 PHY breakout board I ordered from Hong Kong has now
arrived, and I was wondering where I should look to ascertain how to
go about adding ethmac to ORPSoCv3 and to do the wiring.
The board has TX0/1, RX 0/1, TX_EN, MDC, CRS, MDIO and OSCIN pins. I'm
guessing I may need the SMII core also?
Not SMII, that's an RMII interface. I didn't realise that the board only
exposes that, not MII. That means you need a bit more work to get it working
than just wiring it up, but not much.
You need a trivial RMII/MII converter ontop of the ethmac.
I can dig out some code for taht for you some time next week,
but it's very simple, the difference between RMII and MII is basically
doubled
data rate for the TX/RX signals (50 MHz vs 25 MHz in 100Mbit mode) and
that RXDV and CRS share the same pin.
Stefan
_______________________________________________
Linux mailing list
Linux at lists.openrisc.net
http://lists.openrisc.net/listinfo/linux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openrisc.net/pipermail/linux/attachments/20131115/d9c2024f/attachment-0001.html>
Andrew Back
2013-11-15 12:05:04 UTC
Permalink
There already exists a MII<->RMII converter for ethmac that was made for the
ordb2a port. I have been planning to put it into the ethmac repository, but
haven't had time to do it. This sounds like a good opportunity to get this
done. I'll try to commit it sometime this weekend. ethmac could need some
more love in general, but that's outside of the scope for this thread
Many thanks!

So, with ethmac + MII<->RMII, I would then need to add this to the
ORPSoCv3 DE0_Nano port. Perhaps there is a port to another board that
I should look at for clues as to how this would be done?

Best,

Andrew
--
Andrew Back
Principal, AB Open Ltd
http://abopen.com
Loading...