H3 GMAC
HI all,I am trying to compile kernel from H3 Linux SDKfor Orange Pi Plus with .config file for Lubuntu http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=220&fromuid=7773
But I can not get working ethernet.
Here is dmesg:
# ifconfig eth0 up
[ 36.401849] gmac0: probed
[ 36.404855] gmac0 gmac0: eth0: eth0: PHY ID 00000000 at 0 IRQ poll (gmac0-0:00)
[ 36.423174] gmac0 gmac0: eth0: Initialize hardware error
Looks like PHY is not detected. Correct PHY ID should be 001cc915.
Original kernel from Lubuntu distribution for Orange Pi Plus works OK, so hardware is working correctly.
Can anyone tell me what am I missing?
probably it will need a kernel patch.
I would like to check pin configuration for gmac, but I don't see any sys_config.fex , script.bin, boot.scr or any other board configuration file. Is it hardcoded somewhere in kernel sources? Has nothing to doo with pin configuration.
try it on the lubuntu distro, change only the kernel and leave the rest at it is. Edited by mihaly4 at 2015-5-27 00:53
That's what i initially did. I only changed kernel.
Also I dumped gmac configuration from /sys/class/script/dump and it seems valid. But i noticed that LEDs are not flashing when I plug the ethernet cable. Looks like phy is powered off, and I did not found any usage of gmac_phy_power_en pin in kernel source, however it is assigned in configuration:
gmac_phy_power_en gpio (gpio: 0x66 / PD6, mul: 1, pull -1, drv -1, data 0)
I found a patch in BananaPi kernel, that makes use of gmac_phy_power_en. I will try to modify H3 gmac source in similar way. mihaly4 replied at 2015-5-26 14:38
That's what i initially did. I only changed kernel.
Also I dumped gmac configuration from /sys/clas ...
Maybe you are right!
:)
I have tried my self compiled kernel on another H3-device that use a internal PHY and ethernet works!!
so for user that have opi2 or opi2-mini ethernet should work with self compiled SDK-kernel
@mihaly4 GO ON!
If we wait for @steven or @allwinner releasing some usefull code or documentation we need to wait many, many, many, many, many, many, many, many, many, many, many, many,many, many, many, many, many, many...................... Days!!!
:lol
fritz replied at 2015-5-27 04:19
Maybe you are right!
I have tried my self compiled kernel on another H3-device that use a inter ...
Yay! I managed to get working ethernet! I was correct, Orange Pi Plus have PHY power circuit, controlled from gpio. I modified sunxi_geth.c file. Now it sets gmac_phy_power_en to 1.
Yeah!
:)
Can you post a patch? Also can you see if your process is different from the one documented on the linux-sunxi site?https://linux-sunxi.org/H3_Manual_build_howto
fritz replied at 2015-5-27 19:36
Yeah!
Here is quick and dirty patch
page:
[1]
2