iMX6 and Ethernet LED state in suspend.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX6 and Ethernet LED state in suspend.

1,470 Views
anr
Contributor I

We have a custom board and a Variscite DART-MX6, both equipped with the Micrel  KSZ9031 Gigabit Ethernet Tranceiver. On both I have the same issue.

When hitting suspend, the LEDs do not turn off, but light up constantly at a dimmed down level. If the ethernet cable is not connected and the lights are off when I invoke suspend, it still decides to light up again.

I've looked at the Micrel datasheet, as well as the linux drivers for fec/micrel, but find nothing to "defend" this kind of behaviour, so I just wanted to say it out loud here in case someone has a clue.

0 Kudos
5 Replies

1,155 Views
anr
Contributor I

Figured this one out. It is not VGEN5, but 2P5 that disappears in suspend.

From arch/arm/mach-imx/anatop.c

    if ((imx_mmdc_get_ddr_type() == IMX_DDR_TYPE_LPDDR2) &&
        !imx_gpc_usb_wakeup_enabled())
        imx_anatop_enable_2p5_pulldown(true);
    else
        imx_anatop_enable_weak2p5(true);

A relevant commit message:

Since i.MX6SX, if USB vbus wake up is enabled, weak 2P5
needs to be on even if the DRAM is LPDDR2, previously, we need
to set stop_mode_config to keep 2P5 on, so enter DSM,
if USB vbus wakeup is enabled, we need to keep weak 2P5 on.

Leaving weak 2P5 on fixes my issue.

0 Kudos

1,155 Views
igorpadykov
NXP Employee
NXP Employee

Hi Anders

led behaviour is defined by "LED Mode" described in KSZ9031 datasheet Table 9,10

(configured LED_MODE strap-in (Pin 41)). Additionally one can change behaviour

in driver, described in Chapter 43 Fast Ethernet Controller (FEC) Driver

attached Linux Manual.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,155 Views
anr
Contributor I

Thanks. I've read both of those before, without finding anything that can explain the behaviour. I forgot to mention that I've tried compiling a kernel with fec and micrel as modules. If I remove the modules the LEDs go out, but if I suspend they come back on in a dimmed state.

0 Kudos

1,155 Views
igorpadykov
NXP Employee
NXP Employee

one can try to change LED_MODE strap-in (Pin 41) to check if this change behaviour.

0 Kudos

1,155 Views
anr
Contributor I

I think this happens because on vgen5 drops from 2.5V to 1.33V in sleep, so the pull-up is not strong enough to turn off the leds. Need to find out why and how to prevent it...

EDIT: that, or the 2.5V is disabled completely in suspend.

0 Kudos