The MCA implements a power key input in its firmware. You can use this input to connect a power button to the ConnectCore 8X system to perform the following power events:

  • Send the system to suspend

  • Wake the system up from suspend

  • Send the system to power down

  • Power up the system

The power button (ON/OFF) on the board is connected to the MCA power key input.

Kernel configuration

You can manage the MCA power key driver support through the following kernel configuration option:

  • Digi ConnectCore SOMs Micro Controller Assist Power key (CONFIG_INPUT_MCA_PWRKEY)

This option is enabled as built-in on the default ConnectCore 8X kernel configuration file.

Kernel driver

The MCA power key driver is located at:

File Description

drivers/input/misc/pwrkey-mca.c

MCA power key driver

Device tree bindings and customization

The MCA power key input device tree binding is documented at Documentation/devicetree/bindings/input/digi,mca-powerkey.txt.

Power key inside the MCA

ConnectCore 8X device tree
mca_cc8x: mca@63 {

	[...]

	pwrkey {
		compatible = "digi,mca-pwrkey";
		digi,key-power;
		digi,key-power-up;
		digi,key-sleep;
		digi,debounce-ms = <100>;
		digi,pwroff-delay-sec = <6>;
		digi,pwroff-guard-sec = <30>;
	};
};

Using the power key

Suspend to memory

The Linux kernel can perform a suspend-to-memory or suspend-to-RAM operation. When entering this low-power mode, the system state is kept in self-refreshing RAM while the system enters a low-power-consumption mode. The system resumes when a previously selected interrupt is received, restores the previous state, and continues running from where it left off.

  • To suspend, press the power key for less than the time specified in device tree property digi,pwroff-delay-sec (six seconds by default.)

  • To resume, briefly press the power key.

Power off

The Linux kernel can perform a power-off operation that places the Power Management IC (PMIC) in power off mode, disabling all power sources that are not needed for wake up.

  • To perform a controlled software power-off sequence, press the power key for longer than the time specified in device tree property digi,pwroff-delay-sec (six seconds by default.)

  • To power on, briefly press the power key.