Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
12Next
Return to list New
View: 13212|Reply: 19

H3 GMAC

[Copy link]

1

Threads

9

Posts

2433

Credits

Gold member

Rank: 6Rank: 6

Credits
2433
Post time 2015-5-25 16:06:37 | Show all posts |Read mode
HI all,
I am trying to compile kernel from H3 Linux SDK  for Orange Pi Plus with .config file for Lubuntu http://www.orangepi.org/orangepi ... 20&fromuid=7773
But I can not get working ethernet.
Here is dmesg:
[root@orangepi-plus ~]# 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?

5

Threads

355

Posts

2102

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
2102
Post time 2015-5-26 01:13:13 | Show all posts
probably it will need a kernel patch.
Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

1

Threads

9

Posts

2433

Credits

Gold member

Rank: 6Rank: 6

Credits
2433
 Author| Post time 2015-5-26 13:47:01 | Show all posts
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?

5

Threads

355

Posts

2102

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
2102
Post time 2015-5-26 21:04:31 | Show all posts
Has nothing to doo with pin configuration.
try it on the lubuntu distro, change only the kernel and leave the rest at it is.
Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

1

Threads

9

Posts

2433

Credits

Gold member

Rank: 6Rank: 6

Credits
2433
 Author| Post time 2015-5-26 21:38:33 | Show all posts
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.

5

Threads

355

Posts

2102

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
2102
Post time 2015-5-27 04:19:58 | Show all posts
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!!!



Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

1

Threads

9

Posts

2433

Credits

Gold member

Rank: 6Rank: 6

Credits
2433
 Author| Post time 2015-5-27 14:17:39 | Show all posts
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.

5

Threads

355

Posts

2102

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
2102
Post time 2015-5-27 19:36:50 | Show all posts
Yeah!


Can you post a patch?
Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

2

Threads

9

Posts

82

Credits

Registered member

Rank: 2

Credits
82
Post time 2015-5-27 19:43:18 | Show all posts
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

1

Threads

9

Posts

2433

Credits

Gold member

Rank: 6Rank: 6

Credits
2433
 Author| Post time 2015-5-27 20:38:08 | Show all posts

Here is quick and dirty patch

This post contains more resources

You have to Login for download or view attachment(s). No Account? Register

x
12Next
Return to list New
You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2019-12-8 16:47 GMT+8 , Processed in 0.033054 second(s), 23 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list