Jump to content

zjlywjh001

Members
  • Posts

    5
  • Joined

  • Last visited

Reputation Activity

  1. Like
    zjlywjh001 got a reaction from guidol in [Solved]Very stange phenomenon when replace AP6212 with AP6234 on a NanoPiAir   
    Finally I got the reason.
    It seemed that it is a bug in armbian mainline kernel.
    The LOSC_OUT_GATING_EN register does not be enabled to output the 32.768kHz clock to the wlan module.
    This clock is used as a low power clock in BCM SoCs. If the clock is missing, the module will down after it enter low power mode and never wake up.
    I don't know why AP6212 can work fine without this 32k clock.
     
    And finally I build a very simple patch to solve this problem:
    diff -ur a/drivers/rtc/rtc-sun6i.c b/drivers/rtc/rtc-sun6i.c --- a/drivers/rtc/rtc-sun6i.c 2019-04-14 16:19:50.749519000 +0800 +++ b/drivers/rtc/rtc-sun6i.c 2019-04-15 22:29:13.670404000 +0800 @@ -215,6 +215,9 @@ /* Switch to the external, more precise, oscillator */ writel(SUN6I_LOSC_CTRL_KEY | SUN6I_LOSC_CTRL_EXT_OSC, rtc->base + SUN6I_LOSC_CTRL); + + writel(SUN6I_LOSC_OUT_GATING_EN, + rtc->base + SUN6I_LOSC_OUT_GATING); /* Yes, I know, this is ugly. */ sun6i_rtc = rtc;  
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines