The MCA has several pads that work as GPIOs. The number of GPIO pins depends on the firmware programmed on the MCA.

Kernel configuration

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

  • Digi ConnectCore SOMs Micro Controller Assist GPIO support (CONFIG_GPIO_MCA)

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

Kernel driver

The MCA GPIO driver is located at:

File Description

drivers/gpio/gpio-mca.c

ConnectCore 8M Mini MCA GPIO driver

Device tree bindings and customization

The MCA GPIO device tree binding is documented at Documentation/devicetree/bindings/gpio/digi,mca-gpio.txt.

GPIO controller inside the MCA

ConnectCore 8M Mini device tree
mca_cc8m: mca@63 {

	...

	mca_gpio: gpio {
		compatible = "digi,mca-cc8m-gpio";
		gpio-controller;
		#gpio-cells = <2>;

		interrupt-parent = <&mca_cc8m>;
		interrupt-controller;
		#interrupt-cells = <2>;
	};
};

Using the MCA GPIOs

The MCA GPIO driver works as any other GPIO driver of the kernel.

See MCA I/O pads for a list of all available MCA IOs and their capabilities.

Sample application

The GPIO Sample Application demonstrates the usage of the GPIO API. In this example, one GPIO is configured as input and another as output. You can press the virtual button to switch on and off the User 0 LED corresponding to the output GPIO.

Go to GitHub to see the application instructions and source code.

See GPIO API for more information about the GPIO APIx.

See General Purpose Input/Output (GPIO) for additional information on CPU GPIOs.