https://labs.parabola.nu/https://labs.parabola.nu/favicon.ico?15367742552020-12-16T12:11:49ZParabola Issue TrackerPackages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157002020-12-16T12:11:49Zinfinite_recursion
<ul></ul><p>Meanwhile, people can use u-boot (2020.10) at</p>
<p><a class="external" href="https://notabug.org/sagaracharya/parabola_openrc_olinuxino_lime2">https://notabug.org/sagaracharya/parabola_openrc_olinuxino_lime2</a></p>
<p>if they want to.</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157012020-12-16T13:31:00Zbill-auger
<ul></ul><p>what is the bug, as it relates to parabola?<br />which package would it be in - the kernel?<br />or is this related to the wiki documentation?</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157022020-12-16T13:34:08Zbill-auger
<ul><li><strong>Assignee</strong> set to <i>GNUtoo</i></li></ul> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157032020-12-16T13:34:22Zbill-auger
<ul></ul><p>GNUtoo -<br />could you look into this?</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157042020-12-16T14:31:18Zinfinite_recursion
<ul></ul><p>bill-auger wrote:</p>
<blockquote>
<p>what is the bug, as it relates to parabola?</p>
</blockquote>
<p>It's in 2 packages: uboot4extlinux-a20-olinuxino-lime2 and uboot4extlinux-a20-olinuxino-lime2-emmc.</p>
<p>Lime2 had REALTEK chip earlier versions and now (latest revision) it has the one with MICREL (details in the link above), and the uboot config files haven't been updated. I checked even the latest 2021.01rc3, same thing there. No updates in config.</p>
<blockquote>
<p>which package would it be in - the kernel?</p>
</blockquote>
<p>I don't think so. I can't suggest as I don't know details about this. But I face issues in lan (doesn't work at all) in the current parabola package for sure.</p>
<blockquote>
<p>or is this related to the wiki documentation?</p>
</blockquote>
<p>Nope.</p>
<pre><code class="shell syntaxhl">+CONFIG_GMAC_TX_DELAY<span class="o">=</span>4
</code></pre><br />uboot with above config isn't working for me (the one in my repo). I'm facing lags in connection. I recommend assignee to follow Unicorn all the way and not go for above config. Now trying
<pre><code class="shell syntaxhl">+CONFIG_GMAC_TX_DELAY<span class="o">=</span>3
</code></pre> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157222020-12-23T10:47:24Zbill-auger
<ul><li><strong>Assignee</strong> deleted (<del><i>GNUtoo</i></del>)</li><li><strong>Status</strong> changed from <i>unconfirmed</i> to <i>not-a-bug</i></li></ul> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157232020-12-23T10:56:49Zinfinite_recursion
<ul></ul><p>It's a bug. If you read and try what I've said, you'll solve it.</p>
<p>CONFIG_GMAC_TX_DELAY=3</p>
<p>works correctly. No one can explain it better than how I've explained it above yet you want to close it.</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157242020-12-23T11:04:03Zbill-auger
<ul></ul><p>ok, i must have missed where you named the package - i thought the issue was going stale - i probably could not try anything; because i do not have a lime2 - probably someone who has a lime2 would need to confirm and fix this</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157252020-12-23T11:07:07Zbill-auger
<ul><li><strong>Status</strong> changed from <i>not-a-bug</i> to <i>info needed</i></li></ul> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157262020-12-23T11:14:05Zbill-auger
<ul><li><strong>Status</strong> changed from <i>info needed</i> to <i>unconfirmed</i></li></ul> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157352020-12-23T17:29:23Zbill-auger
<ul><li><strong>Assignee</strong> set to <i>GNUtoo</i></li></ul> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157392020-12-23T17:51:33ZGNUtooGNUtoo@cyberdimension.org
<ul></ul><p>Hi,</p>
While there is indeed an issue in u-boot, in what context do you experience that issue:
<ul>
<li>Are you trying to do something like tftp boot in u-boot?</li>
<li>Or does that issue also affect the kenrel?</li>
</ul>
<p>According to <a href="https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime2#GMAC_quirks" class="external">Olimex_A20-OLinuXino-Lime2 wiki page on linux-sunxi</a> it is fixed since Linux 5.1.</p>
<p>Since we have 5.8 that should be fixed.</p>
<p>For making Ethernet work again in u-boot itself, the ideal way would be to upstream a fix and backport that fix in Parabola.</p>
<p>I'll try to find the time to look at it in more details.</p>
<p>Adding new PHYs should not be an issue as they are detected through their IDs anyway.</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157402020-12-23T18:16:50ZGNUtooGNUtoo@cyberdimension.org
<ul><li><strong>Status</strong> changed from <i>unconfirmed</i> to <i>info needed</i></li></ul><p>I've the RTL8211E:<br /><pre>
# readlink /sys/class/net/eth0/phydev/driver
[sys]/bus/mdio_bus/drivers/RTL8211E Gigabit Ethernet
</pre></p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157412020-12-23T18:33:00ZGNUtooGNUtoo@cyberdimension.org
<ul></ul><p>If I recall well, in at least one of the MII standards, one of the trace has to be longer, which is counter intuitive.</p>
<p>As a result most hardware manufacturers do the mistake of matching the traces length.</p>
<p>The linux-sunxi wiki page has:</p>
<blockquote>
<p>A workaround (or proper fix?) for rev. F and newer (and maybe rev. A-E as well?) is to build with trace length compensation.</p>
</blockquote>
<p>The upstream config already has CONFIG_GMAC_TX_DELAY=4 for that.</p>
In contrast Linux seems to workaround that in the PHY (too?) as suggested here:
<ul>
<li>RTL8211e fix: <a class="external" href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bbc4d71d63">https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bbc4d71d63</a></li>
</ul>
<p>I wonder if it should be done in the GMAC instead as it would work for all phys.</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157432020-12-24T17:20:12Zinfinite_recursion
<ul></ul><blockquote>
While there is indeed an issue in u-boot, in what context do you experience that issue:
<ul>
<li>Are you trying to do something like tftp boot in u-boot?</li>
<li>Or does that issue also affect the kenrel?</li>
</ul>
</blockquote>
<p>I don't tamper at all with kernel and bootloaders. I've learnt that the hard way. In future I intend to build my own kernels though.</p>
<blockquote>
<p>For making Ethernet work again in u-boot itself, the ideal way would be to upstream a fix and backport that fix in Parabola.</p>
</blockquote>
<p>I assume that means ask u-boot guys to change OLinuXino configs? Yes, I too think that's long term better solution.</p>
<p>I tried TX_DELAY=4. It failed horribly for me. There was delay between when I type my command and when I finally received network on Lime2. I'm currently using the u-boot with TX_DELAY=3 and it is working very well.</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157482020-12-25T15:42:20Zbill-auger
<ul><li><strong>Subject</strong> changed from <i>uboot4extlinux-a20-olinuxino-lime2 does not support lan</i> to <i>[uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chips</i></li></ul> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157532020-12-25T22:25:34ZGNUtooGNUtoo@cyberdimension.org
<ul></ul><blockquote>
<p>I tried TX_DELAY=4. It failed horribly for me. There was delay between when I type my command and when I finally received network on Lime2. I'm currently using the u-boot with TX_DELAY=3 and it is working very well.</p>
</blockquote>
<p>Which kernel version do you use exactly? <br />What is the latest version you tried?</p>
<p>If it affects the kernel (as you seem to imply) then it should probably be fixed in the kernel instead: here what might happen is that either the bootloader configures the hardware with that delay, then the hardware is already configured with that delay somehow which makes the kernel work, or it does something else that also sticks and makes the kernel work.</p>
<p>I wonder if we could add TX_DELAY=3 in the kernel instead by configuring the Ethernet controller in a way that is not too much intrusive and long to upstream.</p>
<p>Denis.</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157542020-12-25T23:23:34ZGNUtooGNUtoo@cyberdimension.org
<ul></ul><p>I Linux we have: <br /><pre>
drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c: { .compatible = "allwinner,sun7i-a20-gmac" },
</pre></p>
<p>And in board/sunxi/gmac.c in u-boot:<br /><pre>
void eth_init_board(void)
{
[...]
#ifdef CONFIG_RGMII
[...]
setbits_le32(&ccm->gmac_clk_cfg,
CCM_GMAC_CTRL_TX_CLK_DELAY(CONFIG_GMAC_TX_DELAY));
#else
[...]
#endif
[...]
}
</pre></p>
<p>So maybe we need to port that in the Linux driver above somehow.</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157552020-12-26T13:13:36Zinfinite_recursion
<ul></ul><blockquote>
<p>Which kernel version do you use exactly? <br />What is the latest version you tried?</p>
</blockquote>
<p>I use 5.4.69-gnu-1-lts on lime2</p>
<blockquote>
<p>If it affects the kernel (as you seem to imply) then it should probably be fixed in the kernel instead: here what might happen is that either the bootloader configures the hardware with that delay, then the hardware is already configured with that delay somehow which makes the kernel work, or it does something else that also sticks and makes the kernel work.</p>
</blockquote>
<p>I'm not implying anything. I have no opinion on kernel. You're on your own here. I'm just showing my experience and what solved the problem for me.</p>
<p>But the linux stmmac/dwmac-sunxi.c would be for multiple boards right, not just for lime2. In that case, other boards will show problems.</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157682020-12-29T00:49:59ZGNUtooGNUtoo@cyberdimension.org
<ul></ul><blockquote>
<p>I use 5.4.69-gnu-1-lts on lime2</p>
</blockquote>
<p>Does it work with the non-lts kernel?</p>
<blockquote><blockquote>
<p>If it affects the kernel (as you seem to imply) [...]</p>
</blockquote>
<p>I'm not implying anything. [...]</p>
</blockquote>
<p>Here you didn't state yet that Ethernet is broken in GNU/Linux. You just said that the "lan port didn't work". So I'm assuming that it's broken in GNU/Linux too and not just in u-boot.</p>
<blockquote>
<p>But the linux stmmac/dwmac-sunxi.c would be for multiple boards right, not just for lime2. In that case, other boards will show problems.</p>
</blockquote>
<p>That's my main issue here: I'm trying to understand how to fix it well without breaking support for other boards, especially the one with the RTL8211CL PHY: I can test for the RTL8211E, and you can probably test it for the KSZ9031, but I don't know anybody that has the version with the RTL8211CL PHY.</p>
<p>If I workaround in u-boot like you do, it might break the other PHY support and I can't test the RTL8211CL. The fact that it works for you is an important information (assuming I understood it right as explained before).</p>
<p>Fixing it is not simple indeed.</p>
<p>There is some documentation on how to increase the delays of the pads in Documentation/devicetree/bindings/net/micrel-ksz90x1.txt, so that looks good in theory but we need to find a way to add that and make sure that it is only applied for the Micrel PHY. Given that there are 3 PHYs and that they are automatically detected I'm unsure if we can do that easily.</p>
<p>In the worst case we might want to ask Olimex to ship us the missing lime2(s) to be able to test fixes.</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157692020-12-29T08:49:22Zinfinite_recursion
<ul></ul><blockquote>
<p>Does it work with the non-lts kernel?</p>
</blockquote>
<p>To test this, I would have to use normal u-boot and install parabola. Currently I run my site <a class="external" href="https://designman.org">https://designman.org</a> on that lime2. It's not possible.</p>
<blockquote>
<p>Here you didn't state yet that Ethernet is broken in GNU/Linux. You just said that the "lan port didn't work". So I'm assuming that it's broken in GNU/Linux too and not just in u-boot.</p>
</blockquote>
<p>Lan port should not be broken in general. There's a delay in pin signal I guess. I checked which defconfigs have tx_delay line. Most have 3. To confirm things, you'll have to shout out to community who don't have these boards below and have one whose u-boot parabola supports and ask if 1 can install parabola correctly.</p>
<p>Lamobo_R1_defconfig<br />CONFIG_GMAC_TX_DELAY=3<br />Orangepi_defconfig<br />CONFIG_GMAC_TX_DELAY=4<br />A20-Olimex-SOM204-EVB-eMMC_defconfig<br />CONFIG_GMAC_TX_DELAY=3<br />bananapi_m1_plus_defconfig<br />CONFIG_GMAC_TX_DELAY=3<br />Orangepi_mini_defconfig<br />CONFIG_GMAC_TX_DELAY=3<br />Linksprite_pcDuino3_Nano_defconfig<br />CONFIG_GMAC_TX_DELAY=4<br />A20-Olimex-SOM204-EVB_defconfig<br />CONFIG_GMAC_TX_DELAY=1<br />Cubietruck_defconfig<br />CONFIG_GMAC_TX_DELAY=3<br />Bananapro_defconfig<br />CONFIG_GMAC_TX_DELAY=3<br />Bananapi_defconfig</p>
<blockquote>
<p>That's my main issue here: I'm trying to understand how to fix it well without breaking support for other boards, especially the one with the RTL8211CL PHY: I can test for the RTL8211E, and you can probably test it for the KSZ9031, but I don't know anybody that has the version with the RTL8211CL PHY.<br />If I workaround in u-boot like you do, it might break the other PHY support and I can't test the RTL8211CL. The fact that it works for you is an important information (assuming I understood it right as explained before).</p>
</blockquote>
<p>I suggest you don't go for kernel change. Make 2 packages, uboot4extlinux-a20-olinuxino-lime2 for latest H-L, uboot4extlinux-a20-olinuxino-lime2_RTL for your case and let CL cases dangle around. If one with CL comes up, they'll file an issue if and only if RTL does not work for them. So just a small patch would do it.</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157722021-01-03T16:05:21ZGNUtooGNUtoo@cyberdimension.org
<ul></ul><p>I've that in u-boot:<br /><pre>
=> mii info
PHY 0x00: OUI = 0x0732, Model = 0x11, Rev = 0x05, 10baseT, HDX
PHY 0x01: OUI = 0x0732, Model = 0x11, Rev = 0x05, 10baseT, HDX
</pre></p>
<p>So maybe we could simply ship a script in the defconfig that patches the dts if the PHY is a micrel one.</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157732021-01-03T16:07:14ZGNUtooGNUtoo@cyberdimension.org
<ul></ul><pre>
=> mdio list
ethernet@1c50000:
1 - RealTek RTL8211E <--> ethernet@1c50000
</pre> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157742021-01-03T17:46:26ZGNUtooGNUtoo@cyberdimension.org
<ul></ul>I think we already have most of the primitives needed to have a generic configuration in u-boot:
<ul>
<li>We can detect the PHY type by reading the MDIO registers: the PHYs probably use the standard for that and we have only 3 phys to differenciate from. U-boot also have programming with if and so on from its environment. The PHY datasheet should be sufficient for that.</li>
<li>We can load the devicetree and patch it:</li>
</ul>
<pre>
=> ext4load mmc 0:1 $fdt_addr_r /boot/dtbs/linux-libre/sun7i-a20-olinuxino-lime2.dtb
43190 bytes read in 11 ms (3.7 MiB/s)
=> fdt addr $fdt_addr_r
=> fdt list /soc/ethernet@1c50000/mdio/ethernet-phy@1/
ethernet-phy@1 {
reg = <0x00000001>;
phandle = <0x0000002f>;
};
</pre>
<p>The question is if we can manage to hook all that right after the dts has been loaded somehow.</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157752021-01-03T19:49:01ZGNUtooGNUtoo@cyberdimension.org
<ul></ul><blockquote><blockquote>
<p>Does it work with the non-lts kernel?</p>
</blockquote>
<p>To test this, I would have to use normal u-boot and install parabola. Currently I run my site <a class="external" href="https://designman.org">https://designman.org</a> on that lime2. It's not possible.</p>
</blockquote>
<p>Since <a class="external" href="https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime2#GMAC_quirks">https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime2#GMAC_quirks</a> states:</p>
<blockquote>
<p>A possible cause for packet loss only for Micrel PHY is a bug fixed since mainline linux v5.1 and unfixed in mainline u-boot (as of v2020.07).</p>
</blockquote>
<p>And on armv7h we have:</p>
<blockquote>
<p>libre/linux-libre 5.8.13-1<br />libre/linux-libre-lts 5.4.85-1</p>
</blockquote>
<p>So it's a bit complicated to fix blindly without being able to test.</p>
<p>Let's say we work around in u-boot with the fix above, the fix might be overwritten by new kernel versions which also touches the MII / Phy registers.</p>
<p>Like If I update the u-boot or the kernel gets updated and we blindly apply any of the fixes mentioned without understanding what happens, the Ethernet might break at some point.</p>
<p>So I guess the next step is to try to find people or help from Olimex to do the testing.</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157762021-01-03T22:37:13ZGNUtooGNUtoo@cyberdimension.org
<ul></ul><p>I got some help in #olimex from someone who already worked on the issue and has a better fix: setting the phy type to "rgmii-id" could fix it for all 3 phys and when looking at the dts documentation, some file have <code>"rgmii-id" (Internal Delay)</code> as possible value for phy-mode. If that doesn't work we could then try to add delays inside the dts as well. We also need to test with and without u-boot delays.</p>
<p>So if we use that it should fix all the boards. I'll try to see if that person intends to upstream that fix in Linux or not.</p>
<p>edit1: fixed mistake (the fix still needs testing / tunning etc)<br />edit2: add more background</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157812021-01-06T06:34:14Zinfinite_recursion
<ul></ul><p>I can't test it. I have my server running. I can't play around with it. Sorry.</p>
<p>I'll ask some olimex guys. They must have lime2s around them. Could you also ask the olimex guy you met to test it?</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=157912021-01-07T23:25:56ZGNUtooGNUtoo@cyberdimension.org
<ul></ul><blockquote>
<p>I can't test it. I have my server running. I can't play around with it. Sorry.<br />Could you also ask the olimex guy you met to test it?</p>
</blockquote>
<p>That person didn't have the time to test and she was just involved in helping fix the bug and doesn't work at Olimex.</p>
<blockquote>
<p>I'll ask some olimex guys. They must have lime2s around them.</p>
</blockquote>
<p>Bill Auger also contacted the Olimex people and right now we're trying to find if we need more boards than just the ones for fixing this bug as they also proposed us some 64bit boards as well.</p>
<p>Denis.</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=158812021-02-10T15:50:47Zbill-auger
<ul></ul><p>i noticed perhaps a clue from the freedombox system - that has a custom uboot, which is configured to work-around a known bug in the ethernet device on the lime2 revG2 - the ethernet device on that board does not work OOTB on debian - the custom uboot configures it into 100mb mode (rather than the default 1gb), which allows it to function</p>
<p>when i boot that same freedombox system on the lime2 revK (the one with the micrel ethernet), the ethernet works</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=158962021-02-20T06:47:00Zbill-auger
<ul></ul><p>is this the bug? - the sunxi wiki says it is fixed</p>
<p>from: <a class="external" href="https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime2">https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime2</a></p>
<blockquote>
<p>GMAC-related software bugs<br />Rev. H-L would fail to work or lose packets at 100 megabit or gigabit speeds,<br />because Micrel PHY driver was not loaded by default.<br />Fixed since mainline linux v5.5 and mainline u-boot v2021.01.</p>
</blockquote>
<p>maybe we just need to upgrade?<br /><pre>
libre/linux-libre-lts 5.4.85
libre/uboot4extlinux-a20-olinuxino-lime2 2020.04
</pre></p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=158972021-02-22T07:53:00ZAvron
<ul></ul><p>I have a revision K and a revision L of this board (for the last one, the version with flash memory on the board).</p>
<p>I used the images provided in the first links of this message and then I could update the system via the network so it works, but I understand these images are a workaround precisely for the reported bug.</p>
<p>I can do some testing with my boards if useful but please let me know what to test exactly. Note that this is the first time I am using Parabola so every step takes me a lot of documentation reading time. Besides, I don't have a computer running Parabola ( I cannot write the name of the distribution I a using because my post will be blocked otherwise).</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=158982021-02-26T05:02:34Zbill-auger
<ul></ul><p>Avron wrote:</p>
<blockquote>
<p>I have ... the version with flash memory on the board).</p>
</blockquote>
<p>FWIW, that distinction is too vague; because there are several variants "with flash memory" - some have NAND flash, some have EMMC flash, and some have SPI flash - i read (cant remember where now) that all boards from revK and later, come with SPI flash by default - i have a revK with no flash though; but it may be a refurbished or b-stock</p>
<p>Avron wrote:</p>
<blockquote>
<p>I used the images provided in the first links ... it works</p>
</blockquote>
<p>i got it working with the parabola kernel also - the patch in the OP was sufficient - <br /><pre>
-CONFIG_PHY_REALTEK=y
+CONFIG_PHY_MICREL=y
+CONFIG_PHY_MICREL_KSZ9031=y
+CONFIG_GMAC_TX_DELAY=4
</pre><br />we just need to decide on the best general solution - the naive solution is a new package 'uboot4extlinux-a20-olinuxino-lime2-micrel' - thats what i named mine; but it would be best to avoid introducing a new package, if possible</p>
<p>Avron wrote:</p>
<blockquote>
<p>I don't have a computer running Parabola</p>
</blockquote>
<p>its not difficult to install parabola - the beauty of the uboot+extlinux is that it supports multiple installed OSes - its probably not necessary though - for this particular task, the only essential component of parabola to test against, is the linux-libre kernels - its quite likely that the parabola kernels would "just work" with <em>whatever</em> OS - the init-system and network services are probably the same as parabola/systemd</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=162242021-05-02T16:07:53ZAvron
<ul></ul><blockquote>
<p>FWIW, that distinction is too vague</p>
</blockquote>
<p>It is eMMC, I did not write it before because I was blocked by the dictionnary check.</p>
<blockquote>
<p>i got it working with the parabola kernel also - the patch in the OP was sufficient</p>
</blockquote>
<p>Actually I am not sure how to do that.</p>
<p>I now have installed Parabola (first time I did that) on a old laptop and followed the procedure to make an installation on an SD card for ARM with Parabola's packages, including u-boot. I used pacstrap in order to get up to date packages.</p>
<p>It boots ok but even though networkmanager is installed and set to start automatically (I decided to use the systemd version as it has better documentation), I din't get the network interface to work, unlike on my laptop which I configured exactly the same way. I could have done a mistake in the installation, or that could be due to the ethernet issue.</p>
<p>I followed the guidelines at <a class="external" href="https://linux-sunxi.org/Mainline_U-Boot#Compile_U-Boot">https://linux-sunxi.org/Mainline_U-Boot#Compile_U-Boot</a> to compile U-boot on my desktop running Trisquel 9, got v2021.04, did the indicated changes to A20-OLinuXino-Lime2-eMMC_defconfig, ran as advised<br />make CROSS_COMPILE=arm-linux-gnueabihf- A20-OLinuXino-Lime2-eMMC_defconfig<br />make CROSS_COMPILE=arm-linux-gnueabihf- menuconfig<br />make CROSS_COMPILE=arm-linux-gnueabihf-</p>
<p>but I am not sure what to do actually with menuconfig, so I did nothing.</p>
<p>I have put the generated u-boot-sunxi-with-spl.bin with dd instead of the one from Parabola's package but then it does not boot, it resets even before the step to launch the kernel. So either my u-boot-sunxi-with-spl.bin is wrong or something else is needed. I noticed that there are quite a number of other files generated:<br /><pre>
u-boot u-boot.cfg u-boot.dtb u-boot-dtb.img u-boot.img u-boot.map u-boot.srec u-boot-sunxi-with-spl.map
u-boot.bin u-boot.cfg.configs u-boot-dtb.bin u-boot.dtb.out u-boot.lds u-boot-nodtb.bin u-boot-sunxi-with-spl.bin u-boot.sym
</pre></p>
<p>but I don't know if I need to do something with them.</p>
<p>What is the way to apply the patch? Does anything look wrong or missing in what I did?</p> Packages - Bug #2945: [uboot4extlinux-a20-olinuxino-lime2]: does not support newer 'MICREL' wired ethernet LAN chipshttps://labs.parabola.nu/issues/2945?journal_id=164662021-08-11T15:03:47ZGNUtooGNUtoo@cyberdimension.org
<ul></ul><p>Someone working on yunohost pointed me to that patch: <a class="external" href="https://github.com/armbian/build/blob/master/patch/u-boot/u-boot-sunxi/board_lime2/GMAC_TX_DELAY_autocorrection.patch">https://github.com/armbian/build/blob/master/patch/u-boot/u-boot-sunxi/board_lime2/GMAC_TX_DELAY_autocorrection.patch</a></p>
<p>It might fix it for at least the MICREL PHY and the Realtek RTL8211E PHY.</p>
<p>That patch is being in use in both armbian and yunnohost.</p>
<p>Denis.</p>