Bug#911560: [Kinda solved] Re: Network not working on Olimex LIME2 rev K ??

2020-07-22 Thread Jonas Smedegaard
Quoting Dominique Dumont (2020-07-22 13:38:21)
> On Wednesday, 22 July 2020 09:53:42 CEST Jonas Smedegaard wrote:
> > Any news on proposing your bugfix to mainline u-boot, Dominique?
> 
> I've seen that this issue and the fix I've applied were discussed 
> extensively back in 2016 in this thread:
> - https://lists.denx.de/pipermail/u-boot/2016-March/248498.html
> 
> The conclusion of the thread above was to add 
> CONFIG_RTL8211X_PHY_FORCE_MASTER config parameter. Which was done with :
> https://lists.denx.de/pipermail/u-boot/2016-March/249734.html
> 
> So I did not create a pull request.

Interesting thread but [seemingly about rev. C], not rev. G or rev. K.

[seemingly about rev. C]: Michael Haas mentions at 
https://lists.denx.de/pipermail/u-boot/2016-March/249087.html that his 
data makes sense when compared with RTL8211CL datasheept and not with 
RTL8211E datasheet, and LIME2 rev. C is the only officially released 
LIME2 revision with RTL8211CL PHY according to 
https://github.com/OLIMEX/OLINUXINO/blob/master/HARDWARE/A20-OLinuXino-LIME2/hardware_revision_changes_log.txt


> Note that setting CONFIG_RTL8211X_PHY_FORCE_MASTER parameter did 
> not fix my Lime2 rev K board:
> - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911560#96

CONFIG_RTL8211X_PHY_FORCE_MASTER only affects rev. C, not G2 or K since 
u-boot v2017.01: https://gitlab.denx.de/u-boot/u-boot/-/commit/cebf3f5

I have now added a list of known unexplored workarounds/fixes to 
https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime2#GMAC_quirks


> > How did you reach the value "3" for the bugfix?  Did you test multiple
> > values or followed advice from somewhere and could confirm that it was
> > an improvement?  
> 
> I used the value shown at the beginning of this bug report:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911560#15
> 
> I've not tested other values.

Thanks, that is helpful.


> Since then, I've been side-tracked by some career changes [1] and did 
> not investigate further this issue.
> 
> All the best
> 
> [1] 
> https://www.linkedin.com/posts/dominique-dumont-grenoble_dominique-dumont-code-straight-activity-6689877896800079872-a1j3

Oh, exciting!  Enjoy your new life as independent.

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature


Bug#911560: [Kinda solved] Re: Network not working on Olimex LIME2 rev K ??

2020-07-22 Thread Dominique Dumont
On Wednesday, 22 July 2020 09:53:42 CEST Jonas Smedegaard wrote:
> Any news on proposing your bugfix to mainline u-boot, Dominique?

I've seen that this issue and the fix I've applied were discussed extensively 
back in 2016 in this thread:
- https://lists.denx.de/pipermail/u-boot/2016-March/248498.html

The conclusion of the thread above was to add 
CONFIG_RTL8211X_PHY_FORCE_MASTER config parameter. Which was done with :
https://lists.denx.de/pipermail/u-boot/2016-March/249734.html

So I did not create a pull request.

Note that setting CONFIG_RTL8211X_PHY_FORCE_MASTER parameter did 
not fix my Lime2 rev K board:
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911560#96

> How did you reach the value "3" for the bugfix?  Did you test multiple
> values or followed advice from somewhere and could confirm that it was
> an improvement?  

I used the value shown at the beginning of this bug report:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911560#15

I've not tested other values.

Since then, I've been side-tracked by some career changes [1] and did not 
investigate further this issue.

All the best

[1] 
https://www.linkedin.com/posts/dominique-dumont-grenoble_dominique-dumont-code-straight-activity-6689877896800079872-a1j3



Bug#911560: [Kinda solved] Re: Network not working on Olimex LIME2 rev K ??

2020-07-22 Thread Jonas Smedegaard
Quoting Dominique Dumont (2020-02-16 19:15:21)
> On Tuesday, 11 February 2020 14:16:22 CET Dominique Dumont wrote:
> > This is promising:
> > 
> > https://lists.denx.de/pipermail/u-boot/2016-March/249735.html
> 
> Or not :-(
> 
> With this setup (and no GMAC_TX_DELAY), the network starts fine on rev Olimex 
> LIME2 rev G.2 but not on rev K.

Any news on proposing your bugfix to mainline u-boot, Dominique?

Wiki page https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime2#GMAC_quirks 
now updated to cover the knowledge shared here and other places I could 
locate.

How did you reach the value "3" for the bugfix?  Did you test multiple 
values or followed advice from somewhere and could confirm that it was 
an improvement?  Reason I ask is that the only places I could find that 
specific value was at the wiki page and here in this bugreport, and (as 
I have now clarified) the information seems to not be well tested and is 
different from what Olimex use in their fork of u-boot.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature


Bug#911560: [Kinda solved] Re: Network not working on Olimex LIME2 rev K ??

2020-02-16 Thread Dominique Dumont
On Tuesday, 11 February 2020 14:16:22 CET Dominique Dumont wrote:
> This is promising:
> 
> https://lists.denx.de/pipermail/u-boot/2016-March/249735.html

Or not :-(

With this setup (and no GMAC_TX_DELAY), the network starts fine on rev Olimex 
LIME2 rev G.2 but not on rev K.

All the best



Bug#911560: [Kinda solved] Re: Network not working on Olimex LIME2 rev K ??

2020-02-11 Thread Jonas Smedegaard
Quoting Dominique Dumont (2020-02-11 14:16:22)
> On Tuesday, 11 February 2020 12:13:23 CET Dominique Dumont wrote:
> > I'll search in u-boot archive for other threads
> 
> This is promising:
> 
> https://lists.denx.de/pipermail/u-boot/2016-March/249735.html

I suspect that addresses only the issue on one of the newer LIME2 
variants, not both.  But that's just speculation - actually testing 
against all 3 variants is obviously far better ;-)


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Bug#911560: [Kinda solved] Re: Network not working on Olimex LIME2 rev K ??

2020-02-11 Thread Dominique Dumont
On Tuesday, 11 February 2020 12:13:23 CET Dominique Dumont wrote:
> I'll search in u-boot archive for other threads

This is promising:

https://lists.denx.de/pipermail/u-boot/2016-March/249735.html



Bug#911560: [Kinda solved] Re: Network not working on Olimex LIME2 rev K ??

2020-02-11 Thread Dominique Dumont
On Tuesday, 11 February 2020 12:23:06 CET Jonas Smedegaard wrote:
> someone (you, Dominique?) should test
> also against the "original" LIME2 rev. C or older, to ensure there is no
> regression there!

I don't have any other Lime2 board.

All the best



Bug#911560: [Kinda solved] Re: Network not working on Olimex LIME2 rev K ??

2020-02-11 Thread Jonas Smedegaard
Quoting Dominique Dumont (2020-02-11 12:13:23)
> On Monday, 10 February 2020 03:39:39 CET Vagrant Cascadian wrote:
> > Please submit a patch to upstream fixing this in the appropriate 
> > files in configs/*; I'd guess 
> > configs/A20-OLinuXino-Lime2-eMMC_defconfig and/or 
> > configs/A20-OLinuXino-Lime2_defconfig.
> 
> It looks like a similar patches was submitted 4 years ago and the 
> tests of this patch did not go as well as I experienced:
> 
> https://lists.denx.de/pipermail/u-boot/2016-March/248498.html

Seems to me that patch uses a different value, and does not speak about 
testing against all variants, or even which variant it intents to fix.

...speaking of "all variants", someone (you, Dominique?) should test 
also against the "original" LIME2 rev. C or older, to ensure there is no 
regression there!


> I'll search in u-boot archive for other threads

Thanks.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Bug#911560: [Kinda solved] Re: Network not working on Olimex LIME2 rev K ??

2020-02-11 Thread Dominique Dumont
On Monday, 10 February 2020 03:39:39 CET Vagrant Cascadian wrote:
> Please submit a patch to upstream fixing this in the appropriate files
> in configs/*; I'd guess configs/A20-OLinuXino-Lime2-eMMC_defconfig
> and/or configs/A20-OLinuXino-Lime2_defconfig.

It looks like a similar patches was submitted 4 years ago and the tests of 
this patch did not go as well as I experienced:

https://lists.denx.de/pipermail/u-boot/2016-March/248498.html

I'll search in u-boot archive for other threads

All the best



Bug#911560: [Kinda solved] Re: Network not working on Olimex LIME2 rev K ??

2020-02-09 Thread Vagrant Cascadian
On 2020-02-09, Dominique Dumont wrote:
> On Saturday, 8 February 2020 16:54:45 CET Jonas Smedegaard wrote:
>> Would be great if you could also test with patched u-boot in stable
>> Debian - so we can consider fixing this in a point release.
>
> I've tested together:
> - Debian's u-boot debian/2019.01+dfsg-7 with CONFIG_GMAC_TX_DELAY=3 tweak
> - Debian's stable partition (dated 2019-11)

Thanks for debugging the issue!

Please submit a patch to upstream fixing this in the appropriate files
in configs/*; I'd guess configs/A20-OLinuXino-Lime2-eMMC_defconfig
and/or configs/A20-OLinuXino-Lime2_defconfig.

Then I'll feel happier about backporting them to u-boot in stable and
eventually can drop the patch...


live well,
  vagrant


signature.asc
Description: PGP signature


Bug#911560: [Kinda solved] Re: Network not working on Olimex LIME2 rev K ??

2020-02-09 Thread Jonas Smedegaard
Quoting Dominique Dumont (2020-02-09 17:07:12)
> On Saturday, 8 February 2020 16:54:45 CET Jonas Smedegaard wrote:
> > Would be great if you could also test with patched u-boot in stable
> > Debian - so we can consider fixing this in a point release.
> 
> I've tested together:
> - Debian's u-boot debian/2019.01+dfsg-7 with CONFIG_GMAC_TX_DELAY=3 tweak
> - Debian's stable partition (dated 2019-11)
> 
> with Lime2 Rev G2 and rev K cards.
> 
> In both case the installer starts fine, sets network correctly (with dhcp) 
> and 
> starts downloading packages.
> 
> Because I have a crappy connection and no use for a Lime2 Debian/stable 
> installation, I've stopped the tests at that point.

Great!  Very helpful.

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Bug#911560: [Kinda solved] Re: Network not working on Olimex LIME2 rev K ??

2020-02-09 Thread Dominique Dumont
On Saturday, 8 February 2020 16:54:45 CET Jonas Smedegaard wrote:
> Would be great if you could also test with patched u-boot in stable
> Debian - so we can consider fixing this in a point release.

I've tested together:
- Debian's u-boot debian/2019.01+dfsg-7 with CONFIG_GMAC_TX_DELAY=3 tweak
- Debian's stable partition (dated 2019-11)

with Lime2 Rev G2 and rev K cards.

In both case the installer starts fine, sets network correctly (with dhcp) and 
starts downloading packages.

Because I have a crappy connection and no use for a Lime2 Debian/stable 
installation, I've stopped the tests at that point.

All the best



Bug#911560: [Kinda solved] Re: Network not working on Olimex LIME2 rev K ??

2020-02-08 Thread Jonas Smedegaard
Quoting Dominique Dumont (2020-02-08 17:55:10)
> On samedi 8 février 2020 16:54:45 CET Jonas Smedegaard wrote:
> > I guess you mean that the negotiated ethernet mode is 1G. 
> 
> yes.
> 
> > What is the actual performance - i.e. which concrete transfer speeds 
> > is achievable, in each direction, for each board?
> 
> I've seen only outgoing traffic at about 20 to 30 Mbytes/s through NFS 
> for the rev. K board.
> 
> As far as I recall, I had about 20-25 Mbytes/s with the rev. G2 board 
> and the vanilla u-boot.
> 
> > With which kind on low-level network wiring did you test the 
> > negotiated mode - e.g. cross-over cable to another host or 
> > gigabit-capable switch?
> 
> standard cable to a gigabit-capable switch.

Thanks!


> > Would be great if you could also test with patched u-boot in stable 
> > Debian - so we can consider fixing this in a point release.
> 
> I can easily test with a patched u-boot from stable with a 
> Debian/unstable. Would that be helpful ?

Yes, that would be helpful.  Thanks!


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Bug#911560: [Kinda solved] Re: Network not working on Olimex LIME2 rev K ??

2020-02-08 Thread Dominique Dumont
On samedi 8 février 2020 16:54:45 CET Jonas Smedegaard wrote:
> I guess you mean that the negotiated ethernet mode is 1G. 

yes.

> What is the
> actual performance - i.e. which concrete transfer speeds is achievable,
> in each direction, for each board?

I've seen only outgoing traffic at about 20 to 30 Mbytes/s through NFS for the 
rev. K board. 

As far as I recall, I had about 20-25 Mbytes/s with the rev. G2 board and the 
vanilla u-boot.

> With which kind on low-level network wiring did you test the negotiated
> mode - e.g. cross-over cable to another host or gigabit-capable switch?

standard cable to a gigabit-capable switch.

> Would be great if you could also test with patched u-boot in stable
> Debian - so we can consider fixing this in a point release.

I can easily test with a patched u-boot from stable with a Debian/unstable. 
Would that be helpful ?

All the best

Dod



Bug#911560: [Kinda solved] Re: Network not working on Olimex LIME2 rev K ??

2020-02-08 Thread Jonas Smedegaard
Quoting Dominique Dumont (2020-02-08 16:07:17)
> On Wednesday, 5 February 2020 19:41:30 CET Vagrant Cascadian wrote:
> >   A20-OLinuXino-Lime 2 Rev. K Ethernet problem - No connection 
> > possible in installer https://bugs.debian.org/911560
> 
> So I've applied the suggestion to build u-boot with 
> 
> CONFIG_GMAC_TX_DELAY=3
> 
> I can confirm that both LIME2 rev G2 and rev K boards have a working 
> network with 1G speed with u-boot version debian/2020.01+dfsg-1 and 
> the tweak above.

That's quite helpful. Thanks!

Even more helpful if you provide a bit more information (if possible):

I guess you mean that the negotiated ethernet mode is 1G.  What is the 
actual performance - i.e. which concrete transfer speeds is achievable, 
in each direction, for each board?

With which kind on low-level network wiring did you test the negotiated 
mode - e.g. cross-over cable to another host or gigabit-capable switch?


Would be great if you could also test with patched u-boot in stable 
Debian - so we can consider fixing this in a point release.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Bug#911560: [Kinda solved] Re: Network not working on Olimex LIME2 rev K ??

2020-02-08 Thread Dominique Dumont
On Wednesday, 5 February 2020 19:41:30 CET Vagrant Cascadian wrote:
>   A20-OLinuXino-Lime 2 Rev. K Ethernet problem - No connection possible in
> installer https://bugs.debian.org/911560

So I've applied the suggestion to build u-boot with 

CONFIG_GMAC_TX_DELAY=3

I can confirm that both LIME2 rev G2 and rev K boards have a working network 
with 1G speed with  u-boot version debian/2020.01+dfsg-1 and the tweak above.

For the record, here's the recipe to get a working network OlinuXino Lime2 
rev. K :

Setup u-boot source:
- git clone https://salsa.debian.org/debian/u-boot.git
- sudo apt build-dep u-boot

In u-boot:
- apply all debian patches: quilt push -a
- run: make CROSS_COMPILE=arm-linux-gnueabihf- A20-OLinuXino-Lime2_defconfig
- edit .config to set CONFIG_GMAC_TX_DELAY=3
- build u-boot: make CROSS_COMPILE=arm-linux-gnueabihf-


You should get a u-boot-sunxi-with-spl.bin file which is the bootloader to 
install on your SD card (see [1])

First backup your SD card
- sudo cp /dev/$sdcard backup.img

Then copy the bootloader:
- sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/$sdcard bs=1024 seek=8

In both case, $sdcard is to be replaced with the block device file of your SD 
card.

Hope this helps

[1] https://linux-sunxi.org/Bootable_SD_card#Bootloader