Other Parts Discussed in Thread: AM3351
In our AM3351 based custom board, we are working on power management . Here we are facing two issue.
1) The resume is not properly happening after entering standby mode. Console is getting hang after wakeup and I'm using GPIO0 as wakeup source. Below is the log
[ 447.038156] PM: Syncing filesystems ... done.
[ 447.068369] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 447.080560] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 448.324334] PM: suspend of devices complete after 1233.793 msecs
[ 448.331614] PM: late suspend of devices complete after 1.201 msecs
[ 448.339551] PM: noirq suspend of devices complete after 1.585 msecs
[ 448.345969] PM: Successfully put all powerdomains to target state
[ 448.345969] PM: Wakeup source GPIO0
[ 448.347510] PM: noirq resume of devices complete after 1.382 msecs
[ 448.355143] PM: early resume of devices complete after 0.832 msecs
[ 450.313815] brcmf_sdio_bus_rxctl: resumed on timeout
(hangs)
2) We connected the leds in common anode mode to the processor as shown below
So when the processor enters into standby mode, led gpios are configured to pulldown, which makes the LED to glow at standby mode. To override this, I have added pinmux control for sleep in device tree as follow,
led_gpio_default: pinmux_led_gpio_default {
pinctrl-single,pins = <
0x20 ( PIN_INPUT | MUX_MODE7 ) /* gpmc_ad8.gpio0[22] */
0x24 ( PIN_INPUT | MUX_MODE7 ) /* gpmc_ad9.gpio0[23] */
0x28 ( PIN_INPUT | MUX_MODE7 ) /* gpmc_ad10.gpio0[26] */
>;
};
led_gpio_sleep: pinmux_led_gpio_sleep {
pinctrl-single,pins = <
0x20 ( PIN_OUTPUT_PULLUP | MUX_MODE7 ) /* gpmc_ad8.gpio0[22] */
0x24 ( PIN_OUTPUT_PULLUP | MUX_MODE7 ) /* gpmc_ad9.gpio0[23] */
0x28 ( PIN_OUTPUT_PULLUP | MUX_MODE7 ) /* gpmc_ad10.gpio0[26] */
>;
};
leds {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&led_gpio_default>;
pinctrl-1 = <&led_gpio_sleep>;
compatible = "gpio-leds";
led@1 {
label = "red";
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
led@2 {
label = "blue";
gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
led@3 {
label = "green";
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
};
But still the leds are on, when the processor enters into standby mode. Whether by default it will only configure the gpio as pulldown...?
How to solve the above issues..
