WARNING: internal 10|100 PHY requires magjack hardware!
#1
Exclamation 
WARNING:  RK3328 internal 10|100 PHY requires magjack hardware for operation.


The RK3328 internal PHY for the 10|100 ethernet link requires additional hardware to function.  While this is obvious to many of our number, it may not be clear to all of you, including me.

The 10|100 ethernet connection requires not only the internal PHY on the RK3328 chip, but also requires what is called a "magjack"  (the RJ45 connector jack)  which includes a fairly sophisticated isolation transformer "inside" the jack housing !  The magjack is relatively inexpensive and may be obtained from various sources;  the Pine store carries a DAC board for the Rock64 which contains a correct magjack, so if you will be using the DAC the magjack tails along for the ride!

Below I have listed a couple of examples from some suppliers including Sparkfun and Digikey;  as well I have included a sample datasheet so that you can see the internal schematic of a typical magjack. The two that I am highlighting have built-in LED(s) for link and speed which are optional but very handy.

DO NOT  try to wire Rx+ Rx- Tx+ Tx- differential pairs directly to the RK3328 Rock64 board without the isolation transformer found in the magjack !

Magjack from Digikey

Magjack from Sparkfun

Datasheet for the Digikey Magjack

Rock64 DAC with Magjack

Rock64 DAC Schematic (shows magjack connections)


marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#2
Also a tip from personal experience:

Unless you consider yourself highly skilled at soldering, don't just buy the magjack alone. The pins on most models of these are too short for wire jumpers to make solid contact, and it is very difficult to solder deadbug style (wires direct to pins of the connector).

The smarter (and cleaner looking) way of doing it would be to purchase an RJ45 breakout board. Such a board is available from Sparkfun, as is the board with the connector presoldered.
Community administrator and sysadmin for PINE64
(Translation: If something breaks on the website, forum, or chat network, I'm a good person to yell at about it)

  Reply
#3
(07-09-2017, 07:44 PM)fire219 Wrote: The smarter (and cleaner looking) way of doing it would be to purchase an RJ45 breakout board. Such a board is available from Sparkfun, as is the board with the connector presoldered.


Thanks fire !   I actually ordered that pre-soldered breakout;  very nice...  I'll keep yous guys posted on the success of this little project.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#4
Attached is the datasheet for the actual magjack used on the Rock64 DAC board Wink


Attached Files
.pdf   DGKYD111B096GWA1D.pdf (Size: 331.59 KB / Downloads: 514)
  Reply
#5
(07-10-2017, 03:40 AM)pfeerick Wrote: Attached is the datasheet for the actual magjack used on the Rock64 DAC board Wink

Thanks Pete!   I got that datasheet late last evening from tllim and have been comparing it to the digikey datasheets for available magjacks;  we're going to have to try a couple of these to see what the differences are (if any) and which ones actually work for the price.

It seems the magjack on the DAC is consistent with the digikey datasheet here except that the DAC does not have the optional link and speed LED(s).
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#6
As the datasheets shows it should be easy to connect tx's and rx's, but I wonder what about LED's.
Any idea where to connect Magjack's LED's ?
  Reply
#7
if you mean the one attached by pfeerick, there appears to be no led leads.
  Reply
#8
I think I found it, but correct me if I'm wrong.
On Pi P5+ Bus layout pins 21 nad 22 as positive and ground as negative.
  Reply
#9
Hii, 
I'm ordering the magjack from Sparkfun Smile 
Is this the correct way to connect or I'm I forgetting things? Smile 
I don't need the leds Wink
[Image: 200r5sl.png]

Thx in advance Smile
  Reply
#10
I'd like to know if anyone has gotten this to work yet.

I bought the magjack breakout from Sparkfun here: https://www.sparkfun.com/products/13021

Then I made these connections:
Pi5 pin 17 (RD+) -> P7
Pi5 pin 18 (RD-) -> P8
Pi5 pin 19 (TX+) -> P1
Pi5 pin 20 (TX-) -> P2

I downloaded and installed ayufan's latest release xenial-minimal-rock64-0.6.31-209-arm64.img.xz. (*I realize this is experimental but the 0.5.15 release didn't seem to have the phy enabled).

The latest images have the phy disabled in the device tree so I used this command to enable it:

Code:
sudo enable_dtoverlay eth1 ethernet@ff550000 okay

After that I see messages about eth1 in dmesg:
Code:
[   56.015672] rk_gmac-dwmac ff550000.ethernet: Looking up phy-supply from device tree
[   56.015787] rk_gmac-dwmac ff550000.ethernet: clock input or output? (output).
[   56.015798] rk_gmac-dwmac ff550000.ethernet: Can not read property: tx_delay.
[   56.016667] rk_gmac-dwmac ff550000.ethernet: set tx_delay to 0x30
[   56.017394] rk_gmac-dwmac ff550000.ethernet: Can not read property: rx_delay.
[   56.018205] rk_gmac-dwmac ff550000.ethernet: set rx_delay to 0x10
[   56.018938] rk_gmac-dwmac ff550000.ethernet: integrated PHY? (yes).
[   56.019139] rk_gmac-dwmac ff550000.ethernet: cannot get clock clk_mac_refout
[   56.019909] rk_gmac-dwmac ff550000.ethernet: cannot get clock clk_mac_speed
[   56.025793] rk_gmac-dwmac ff550000.ethernet: init for RMII
[   56.056195] stmmac - user ID: 0x10, Synopsys ID: 0x35
[   56.056204]  Ring mode enabled
[   56.056209]  DMA HW capability register supported
[   56.056212]  Normal descriptors
[   56.056217]  RX Checksum Offload Engine supported (type 2)
[   56.056221]  TX Checksum insertion supported
[   56.056225]  Wake-Up On Lan supported
[   56.056263]  Enable RX Mitigation via HW Watchdog Timer
[   56.056386] of_get_named_gpiod_flags: can't parse 'snps,reset-gpio' property of node '/ethernet@ff550000[0]'
[   56.157916] libphy: stmmac: probed
[   56.157932] eth%d: PHY ID 1234d400 at 0 IRQ POLL (stmmac-1:00) active
[   56.157939] eth%d: PHY ID 00000000 at 1 IRQ POLL (stmmac-1:01)
[   56.157945] eth%d: PHY ID 00000000 at 2 IRQ POLL (stmmac-1:02)
[   56.157951] eth%d: PHY ID 00000000 at 3 IRQ POLL (stmmac-1:03)
[   56.157957] eth%d: PHY ID 00000000 at 4 IRQ POLL (stmmac-1:04)
[   56.157963] eth%d: PHY ID 00000000 at 5 IRQ POLL (stmmac-1:05)
[   56.157969] eth%d: PHY ID 00000000 at 6 IRQ POLL (stmmac-1:06)
[   56.157975] eth%d: PHY ID 00000000 at 7 IRQ POLL (stmmac-1:07)
[   56.157980] eth%d: PHY ID 00000000 at 8 IRQ POLL (stmmac-1:08)
[   56.157986] eth%d: PHY ID 00000000 at 9 IRQ POLL (stmmac-1:09)
[   56.157992] eth%d: PHY ID 00000000 at 10 IRQ POLL (stmmac-1:0a)
[   56.157998] eth%d: PHY ID 00000000 at 11 IRQ POLL (stmmac-1:0b)
[   56.158004] eth%d: PHY ID 00000000 at 12 IRQ POLL (stmmac-1:0c)
[   56.158010] eth%d: PHY ID 00000000 at 13 IRQ POLL (stmmac-1:0d)
[   56.158016] eth%d: PHY ID 00000000 at 14 IRQ POLL (stmmac-1:0e)
[   56.158021] eth%d: PHY ID 00000000 at 15 IRQ POLL (stmmac-1:0f)
[   56.158027] eth%d: PHY ID 00000000 at 16 IRQ POLL (stmmac-1:10)
[   56.158033] eth%d: PHY ID 00000000 at 17 IRQ POLL (stmmac-1:11)
[   56.158039] eth%d: PHY ID 00000000 at 18 IRQ POLL (stmmac-1:12)
[   56.158045] eth%d: PHY ID 00000000 at 19 IRQ POLL (stmmac-1:13)
[   56.158051] eth%d: PHY ID 00000000 at 20 IRQ POLL (stmmac-1:14)
[   56.158057] eth%d: PHY ID 00000000 at 21 IRQ POLL (stmmac-1:15)
[   56.158170] eth%d: PHY ID 00000000 at 22 IRQ POLL (stmmac-1:16)
[   56.158178] eth%d: PHY ID 00000000 at 23 IRQ POLL (stmmac-1:17)
[   56.158184] eth%d: PHY ID 00000000 at 24 IRQ POLL (stmmac-1:18)
[   56.158191] eth%d: PHY ID 00000000 at 25 IRQ POLL (stmmac-1:19)
[   56.158197] eth%d: PHY ID 00000000 at 26 IRQ POLL (stmmac-1:1a)
[   56.158203] eth%d: PHY ID 00000000 at 27 IRQ POLL (stmmac-1:1b)
[   56.158209] eth%d: PHY ID 00000000 at 28 IRQ POLL (stmmac-1:1c)
[   56.158215] eth%d: PHY ID 00000000 at 29 IRQ POLL (stmmac-1:1d)
[   56.158221] eth%d: PHY ID 00000000 at 30 IRQ POLL (stmmac-1:1e)
[   56.158226] eth%d: PHY ID 00000000 at 31 IRQ POLL (stmmac-1:1f)
[   56.188998] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   59.247515] rk_gmac-dwmac ff550000.ethernet eth1: Link is Up - 100Mbps/Half - flow control off

But it doesn't seem connected to anything:
Code:
rock64@rock64:~$ sudo dhclient -v eth1
Internet Systems Consortium DHCP Client 4.3.3
Copyright 2004-2015 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth1/a6:18:42:9c:f9:05
Sending on   LPF/eth1/a6:18:42:9c:f9:05
Sending on   Socket/fallback
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 3 (xid=0x998c2875)
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8 (xid=0x998c2875)
[  163.723405] Rockchip integrated EPHY stmmac-1:00: rockchip_integrated_phy_fixup_100M: reset phy
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8 (xid=0x998c2875)
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 10 (xid=0x998c2875)
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 11 (xid=0x998c2875)
[  190.831400] Rockchip integrated EPHY stmmac-1:00: rockchip_integrated_phy_fixup_100M: reset phy
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 20 (xid=0x998c2875)
[  207.919403] Rockchip integrated EPHY stmmac-1:00: rockchip_integrated_phy_fixup_100M: reset phy

Also my switch doesn't show a link. I'm not sure if (a) my wiring is wrong, (b) I need to do something else to enable/configure it completely, or © the adapter is defective.

One thing that seemed odd to me, when I was checking my wiring with my multimeter set for continuity testing, I discovered that pins 1 and 2 on the magjack breakout are connected to each other. At first I thought that was my fault but it seems that they are connected inside the magjack. I looked at the datasheet and it seems that might be correct, but I'm not sure (I don't know much about transformers or ethernet at that level).

I'd appreciate any feedback on what I may be doing wrong.

Thanks,
Chris
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Any way to tell the rock64's hardware revision? kittyland 1 3,267 07-01-2021, 09:42 PM
Last Post: evilbunny
  Hardware random number generator? scalextrix 13 17,649 06-04-2018, 02:05 AM
Last Post: scalextrix
  Latest Rock64 board hardware revision Ryan 3 5,694 03-14-2018, 05:42 AM
Last Post: petec
Question How can I use the internal 100M ethernet? gabrielmartinslima 1 2,958 02-12-2018, 02:10 PM
Last Post: dkryder
Information Rock64 SSD internal PNY CS900 240GB w/Pine usb|sata adapter MarkHaysHarris777 1 3,973 09-30-2017, 06:48 AM
Last Post: dkryder

Forum Jump:


Users browsing this thread: 1 Guest(s)