The ConnectCore MP15 Development Kit assembles one MikroE mikroBUS™ socket that allows you to connect a variety of through-hole MikroE Click boards offering sensors, mini-displays, relays, and more. See the MikroE website for more information on the mikroBUS™ socket.

Device tree bindings and customization

Three communication buses are routed to the mikroBUS™ socket:

  • I2C6 bus

  • UART7 (2-wire)

  • SPI4 bus

Additionally, the following lines of the ConnectCore MP15 are connected to the mikroBUS™ socket:

  • MIKROBUS_RST: Connected to GPIOF 12

  • MIKROBUS_PWM: Connected to GPIOB 6

  • MIKROBUS_INT: Connected to GPIOF 13

See Universal Asynchronous Receiver/Transmitter (UART), Serial Peripheral Interface (SPI), and I2C for more information about these interfaces.

Each MikroE Click board requires a specific driver and device tree entry depending on the communication bus (I2C, SPI, UART) and its functionality. For example, the Accel2 Click board uses an I2C accelerometer that requires CONFIG_IIO_ST_ACCEL_I2C_3AXIS to be enabled in the kernel configuration (driver support) and the following device tree entry on the I2C6:

ConnectCore MP15 Development Kit device tree
&i2c6 {
...
	accelerometer@1d {
		compatible = "st,lis3dh-accel";
		reg = <0x1d>;
	};
...
};

Device tree overlays for MikroE Click boards

Digi Embedded Yocto has device tree overlays for the following MikroE Click boards:

You can find pre-compiled device tree overlays on the default Digi Embedded Yocto precompiled images, inside the linux partition.

Check Device tree overlays mechanism for instructions on loading device tree overlays.

Use the mikroBUS™ socket

How you use a Click board connected on the mikroBUS™ socket depends on the type of interface and its driver. The following example describes how to use the Accel2 Click board through the sysfs.

Usage example: Accelerometer

The device tree support for the Accel2 Click is added via a device tree overlay. To load the overlay, use the following command in U-Boot:

=> setenv overlays _ov_board_mikroe-accel2-click_ccmp15-dvk.dtbo
=> boot

Check the kernel log to verify that the Accel2 Click module was detected:

# dmesg | grep accelerometer
[   14.006476] iio iio:device0: registered accelerometer lis3dh

To access the Accel2 Click module through the sysfs, use the following commands:

# cd /sys/bus/iio/devices/iio\:device0/
# grep "" in_accel_*_raw
in_accel_x_raw:-42
in_accel_y_raw:477
in_accel_z_raw:-952