The MCA implements a power key input mechanism in its firmware to comply with SMARC specification with regards to the lines:

  • POWER_BTN#: Power button input from carrier board.

  • SLEEP#: Sleep indicator from carrier board.

On the ConnectCore 95 Development Kit:

  • Pad POWER_BTN# of the SMARC connector is connected to POWER press button.

  • Pad SLEEP# of the SMARC connector is connected to SLEEP press button.

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 95 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.yaml.

Power key inside the MCA

ConnectCore 95 device tree
mca_cc95_smarc: mca@20 {

	[...]

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

Using the POWER pushbutton

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, briefly press the POWER pushbutton.

  • To power on, briefly press the POWER pushbutton.

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

Using the SLEEP pushbutton

The SLEEP# signal defined by the SMARC specification is intended to represent a level-controlled system power state request originating from the carrier board or system logic. It is not designed to be driven directly by a momentary user input device.

In the ConnectCore 95 Development Kit SLEEP# is connected to a mechanical pushbutton. This approach is not compliant with recommended SMARC design practices, as a pushbutton inherently generates a transient assertion (active while pressed, inactive when released). The MCA firmware captures the press of the button to generate a standby event on the system, or to wake the system from standby.

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, briefly press the SLEEP pushbutton.

  • To resume, briefly press the SLEEP pushbutton.