Kernel configuration
You can manage the MCA driver support through the following kernel configuration option:
-
Digi Micro Controller Assist for ConnectCore 8 SoMs (CONFIG_MFD_MCA_CC8)
This option enables support for the core functionality of the MCA and is enabled as built-in on the default ConnectCore 8X kernel configuration file.
Each one of the multi-function drivers implement their own kernel options.
Kernel driver
The MCA core driver is located at:
| File | Description |
|---|---|
ConnectCore 8 SoMs MCA core driver |
|
ConnectCore 8 SoMs MCA I2C communication driver |
|
ConnectCore 8 SoMs MCA interrupt driver |
Device tree bindings and customization
The MCA device tree binding is documented at Documentation/devicetree/bindings/mfd/digi,mca-cc8.txt.
The MCA is connected through I2C0 port of the i.MX8QXP CPU:
&i2c0 {
mca_cc8x: mca@63 {
compatible = "digi,mca-cc8x";
reg = <0x63>;
interrupt-parent = <&wu>;
interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
fw-update-gpio = <&gpio3 9 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_mca_cc8x>;
...
};
};
| The MCA device tree node has one sub-node for each multi-function driver it supports. |
System status registers
The MCA provides status information about the cause of reset and wake-up events via the sysfs.
Reset cause
Linux provides information about what caused a reset of the MCA microcontroller and i.MX8QXP processor.
| This functionality is supported on MCA firmware version 0.04 and later. You can use the sysinfo command to check your MCA firmware version. |
MCA microcontroller
Use the following command to display event causes flagged on the last MCA reset:
~# cat /sys/bus/i2c/devices/0-0063/last_mca_reset
Low Voltage, Power On
| last_mca_reset value | Description |
|---|---|
LL Wakeup |
Low leakage wakeup |
Low Voltage |
Low voltage on VCC_MCA |
Watchdog |
Internal MCA watchdog reset |
Reset Pin |
Assert of reset pin |
Power On |
Power on condition |
Note that more than one value can be signaled simultaneously.
i.MX8QXP processor
Use the following command to display event causes flagged on the last i.MX8QXP reset:
~# cat /sys/bus/i2c/devices/0-0063/last_mpu_reset
Power On
| last_mpu_reset value | Description |
|---|---|
Power On |
Power on condition |
System Reset |
System reset (system call) |
Watchdog |
Watchdog driver reset |
Off wakeup |
Wakeup from power off |
MCA reset |
An MCA reset (internal watchdog) triggered the MPU reset |
External 32.768 kHz output
You can configure pad MCA_CLKOUT32K to output a 32.768 kHz signal for clocking external peripherals. The functionality is controlled by a sysfs entry. To enable the 32.768 kHz signal on MCA_CLKOUT32K pad:
~# echo enabled > /sys/bus/i2c/devices/0-0063/ext_32khz
To disable it:
~# echo disabled > /sys/bus/i2c/devices/0-0063/ext_32khz
To read the current status of the pad:
~# cat /sys/bus/i2c/devices/0-0063/ext_32khz
disabled
Voltage reference 1.2 V
You can configure pad MCA_VREF_OUT to output a steady temperature-compensated 1.2 V output to use as a voltage reference for external peripherals.
| You can use this signal as reference voltage for the MCA ADC signals. See Analog-to-Digital Converter (ADC) for more information. |
| This functionality is not available on SOMv1; it’s only available on SOMv2. SOMv2 incorporates a 100 nF capacitor to filter ripple signals in the output that was required to be populated externally by the user on other Digi designs. |
The functionality is controlled by a sysfs entry. To enable the voltage reference on MCA_VREF_OUT pad:
~# echo enabled > /sys/bus/i2c/devices/0-0063/vref
To disable it:
~# echo disabled > /sys/bus/i2c/devices/0-0063/vref
To read the current status of the pad:
~# cat /sys/bus/i2c/devices/0-0063/vref
disabled
| If you configure the MCA ADC to use the internal 1.2 V voltage reference, the MCA_VREF_OUT pad automatically outputs the signal and sysfs controls have no effect. |
SOM boot mode configuration
| This functionality is supported on MCA firmware version 0.09 and later. You can use the sysinfo command to check your MCA firmware version. It also requires mca_config_tool version 1.14 or later for configuration. |
MCA can be configured to boot the SOM in two different ways:
-
W4PK (wait for power key): The system doesn’t boot until the MCA PWR_IO line is asserted low. This line is commonly connected to the power button.
-
BOP (boot on power): The SOM automatically boots as soon as power is applied. This is the default mode.
This functionality can be configured using mca_config_tool --boot_mode argument.
See MCA configuration tool for additional information on this tool and functionality.