[U-Boot] imx8mq-evk: Outbound network packets lost
Sergey Kubushyn
ksi at koi8.net
Thu Jan 31 18:43:02 UTC 2019
On Thu, 31 Jan 2019, Chris Spencer wrote:
> On Wed, 30 Jan 2019 at 00:44, Sergey Kubushyn <ksi at koi8.net> wrote:
>> OK, I've got it working. The problem was DM FEC driver does _NOT_ do pin
>> muxing and FEC pins in i.MX8MQ come up as GPIOs after rest so no wonder it
>> can't talk to the PHY or whatever else.
>>
>> I don't know yet if there is some setting that I've missed to force it to do
>> pin muxing but didn't find anything appropriate in reference fsl-imx8mq-evk
>> board configs or board source files.
>>
>> Once pin muxing is done in the board file FEC comes up as expected, finds
>> the PHY and all network stuff works as expected.
>>
>> Dedicated "regulator" and PHY reset works OK from DTB provided FEC driver is
>> patched for regulator (regulator_set_enable instead of regulator_autoset)
>> and PHY reset GPIO set "ACTIVE_LOW" in the board's DTS file (fec driver sets
>> it to "1" to reset then resets it to "0").
>>
>> So it is either pin muxing is missing and one should do it in his board's
>> file or I've missed some setting that I can't find to get the DM FEC driver
>> to do it itself from DTS file.
>
> Welp. There's no pinctrl driver. That would explain a lot...
>
> The attached patches fix the networking in U-Boot for me (I can at
> least ping; haven't tried anything else). If it works for you then I
> will submit the patches properly with your Tested-by.
>
> Weirdly, I still get the issue in Linux where it intermittently uses
> the wrong phy driver, but, with this change, the generic phy driver
> now seems to work fine. I guess maybe U-Boot is now leaving the phy in
> a different state that happens to work.
OK, it worked. The second patch is irrelevant for me because I'm working on
a custom device, not MCIMX8M-EVK (I don't have that, just using its
schematic from time to time as reference to its drivers and such) and I
_DID_ have "CONFIG_PINCTRL_IMX8M=y" in my config that made no good without
actual driver...
I wonder how come nobody noticed that so far? It should affect other
functionality that relies on proper pin muxing...
Anyway, it is solved so I'm on USB (host and peripheral) now. Next come
PWM/backlight/LCDIF->DSI->SN65DSI84->LVDS Panel (1024x768)...
---
******************************************************************
* KSI at home KOI8 Net < > The impossible we do immediately. *
* Las Vegas NV, USA < > Miracles require 24-hour notice. *
******************************************************************
More information about the U-Boot
mailing list