From: Frank Wunderlich <frank-w@public-files.de>
To: Oleksij Rempel <linux@rempel-privat.de>,
Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: change r2pro dts to public hw version (was "Board code with 2 dts" )
Date: Fri, 08 Apr 2022 19:19:55 +0200 [thread overview]
Message-ID: <314D87C6-FA2A-4A23-8962-5BCDC83BA9E0@public-files.de> (raw)
In-Reply-To: <7f97de95-9fc0-11ba-c06a-d4f38f41d521@rempel-privat.de>
Am 8. April 2022 19:00:03 MESZ schrieb Oleksij Rempel <linux@rempel-privat.de>:
>Hi Frank
>
>Am 08.04.22 um 13:03 schrieb Frank Wunderlich:
>> Hi,
>>
>> have now the new board, but cannot get the gmac working in barebox.
>In linux i have it working
>>
>>
>https://github.com/frank-w/BPI-R2-4.14/blob/5.17-main/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts#L235
>>
>> changed the dts in barebox to same values, but cannot get it working
>>
>>
>https://github.com/frank-w/barebox-r2pro/blob/r2pro/arch/arm/dts/rk3568-bpi-r2-pro.dts#L123
>>
>> i see both interfaces, but it looks like the phy (rtl8211F) is not
>working in barebox
>
>The rgmii configuration is may be wrong.
>
>phy-mode = "rgmii" looks not realistic. The "rgmii" is only possible if
>rgmii clock line on this
>board is about 20cm longer compared to rgmii data lines. I doubt it is
>the case :)
>
>So, it looks like the delay was added as separate property for the MAC.
>Without reading manual for
>this chip I can't interprete this values looks somehow strange:
> tx_delay = <0x4f>;
> rx_delay = <0x0f>;
>
>Normally delays are equal for both directions.
>Best practice is: MAC do not adds delays, PHY will do it (PHY driver
>should be enabled)
>
>> barebox@BPI R2PRO:/ dhcp eth1
>> eth1: 1000Mbps full duplex link detected
>> eth1: 1000Mbps full duplex link detected
>> WARNING: eth1: No MAC address set. Using random address
>e2:3c:a9:08:b8:c8
>> T T T T T T T T T T T eth1: link down
>> T dhcp: Network is down
>> barebox@BPI R2PRO:/ eth1: 1000Mbps full duplex link detected
>>
>> barebox@BPI R2PRO:/
>> barebox@BPI R2PRO:/
>> barebox@BPI R2PRO:/
>> barebox@BPI R2PRO:/ devinfo eth1
>> Parent: fe010000.ethernet@fe010000.of
>> Parameters:
>> ethaddr: e2:3c:a9:08:b8:c8 (type: MAC)
>> gateway: 0.0.0.0 (type: ipv4)
>> ipaddr: 0.0.0.0 (type: ipv4)
>> linux.bootargs: (type: string)
>> linux.devname: (type: string)
>> mode: dhcp (type: enum) (values: "dhcp", "static", "disabled")
>> netmask: 0.0.0.0 (type: ipv4)
>> serverip: (type: string)
>> barebox@BPI R2PRO:/ eth1.mode=static
>> barebox@BPI R2PRO:/ eth1.netmask=255.255.255.0
>> barebox@BPI R2PRO:/ eth1.ipaddr=192.168.0.18
>> barebox@BPI R2PRO:/ devinfo eth1
>> Parent: fe010000.ethernet@fe010000.of
>> Parameters:
>> ethaddr: e2:3c:a9:08:b8:c8 (type: MAC)
>> gateway: 0.0.0.0 (type: ipv4)
>> ipaddr: 192.168.0.18 (type: ipv4)
>> linux.bootargs: (type: string)
>> linux.devname: (type: string)
>> mode: static (type: enum) (values: "dhcp", "static", "disabled")
>> netmask: 255.255.255.0 (type: ipv4)
>> serverip: (type: string)
>> barebox@BPI R2PRO:/ global.net.nameserver=192.168.0.10
>> barebox@BPI R2PRO:/ ifup eth1
>> barebox@BPI R2PRO:/ ping 192.168.0.10
>> T T T T T ping failed: Connection timed out
>> barebox@BPI R2PRO:/
>>
>> devinfo without device shows me this:
>>
>> `-- fe010000.ethernet@fe010000.of
>> `-- miibus0
>> `-- mdio0-phy00
>> `-- 0x00000000-0x0000003f ( 64 Bytes): /dev/mdio0-phy00
>> `-- eth1
>> `-- fe2a0000.ethernet@fe2a0000.of
>> `-- miibus1
>> `-- eth0
>>
>> any idea how to trace the problem down?
>>
>> regards Frank
>--
>Regards,
>Oleksij
Thanks for first lookup.
Imho delays are read here,so source supports these properties:
https://git.pengutronix.de/cgit/barebox/tree/drivers/net/designware_rockchip.c#n272
And default values are different too. Have not compared source with linux,but there it works with this values.
If understand you right,the rgmii should be possible with the delays.
Is there any way to debug this (or try different values)? Just to get which value is wrong.
The only way i'm thinking about is creating different dtbs and loading then for testing from uboot. But which values to try...i don't know which direction is broken and can try only some "random" values.
I hope this is not the problem that i load barebox from uboot.
regards Frank
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2022-04-08 17:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-22 17:23 Board code with 2 dts Frank Wunderlich
2022-03-22 17:34 ` Ahmad Fatoum
2022-03-23 7:47 ` Aw: " Frank Wunderlich
2022-03-23 8:03 ` Ahmad Fatoum
2022-04-08 11:03 ` change r2pro dts to public hw version (was "Board code with 2 dts" ) Frank Wunderlich
2022-04-08 17:00 ` Oleksij Rempel
2022-04-08 17:19 ` Frank Wunderlich [this message]
2022-04-09 8:04 ` Oleksij Rempel
2022-04-09 8:35 ` Aw: " Frank Wunderlich
2022-04-09 16:01 ` Oleksij Rempel
2022-04-09 17:08 ` Trent Piepho
2022-04-10 7:41 ` Oleksij Rempel
2022-04-10 8:28 ` Frank Wunderlich
2022-04-10 9:28 ` Trent Piepho
2022-04-10 15:00 ` Oleksij Rempel
2022-04-10 20:36 ` Trent Piepho
2022-04-11 9:00 ` Aw: " Frank Wunderlich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=314D87C6-FA2A-4A23-8962-5BCDC83BA9E0@public-files.de \
--to=frank-w@public-files.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=linux@rempel-privat.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox