Customizing the BSP for a custom carrier board

U-Boot

Platform code

You can access Digi's U-Boot source code in Github.

The BSP is inside folder board/digi/ where there are two subfolders:

Normally you only need to modify the code inside ccimx6sbc to adapt it to your carrier board-specific hardware. You may want to adapt, for example:

Note The USDHC2 controller (microSD card on the SBC) is initialized together with USDHC4 (eMMC on the System-On-Chip) in the ConnectCore 6 System-On-Chip common code, despite technically being part of the SBC carrier board.

Platform include files

Platform include files on include/configs/ are:

ccimx6sbc.h: defines variables that determine things like the board name, the UART to use as console, the Ethernet PHY address, or the default environment.

ccimx6_common.h: contains common configuration for the ConnectCore 6 System-On-Chip, like the location of U-Boot and its environment on the eMMC, or the supported interfaces and commands.

digi_common.h: contains common configuration for Digi embedded products.

You can configure most settings for your carrier board on the ccimx6sbc.h header file.

Linux kernel

Hardware specifics are handled in the kernel via device tree files. Device tree files are text files that describe a platform's hardware. They are part of the kernel source tree but are compiled as separate binary files. The bootloader loads the device tree on RAM memory and passes it to the kernel, which in turn loads the necessary drivers according to the device tree description.

For details on how the ConnectCore 6 device tree files are organized for different available SOM variants and SBC board variants, see Device tree files.

Creating the device tree for your custom carrier board

After evaluating the ConnectCore 6 on the SBC, you will likely design your own custom carrier board with the specific hardware that fits your needs.

Skeleton device tree based on the ConnectCore 6

Start by creating a new .dts file at arch/arm/boot/dts/ (for example, mycc6board.dts) that contains:

Enabling ConnectCore 6 interfaces

Most of the ConnectCore 6 interfaces are disabled (their status property is set to disabled) in the ConnectCore 6 .dtsi include file. For each ConnectCore 6 interface you want to use, you must:

Note You can reference ConnectCore 6 SBC device tree files and schematics to enable and configure the IOMUX of ConnectCore 6 System-On-Module interfaces and pins.

Copying hardware components from the ConnectCore 6 SBC

If your carrier board design is based on the ConnectCore 6 SBC, you can copy interfaces and IOMUX settings from the ConnectCore6 SBC device tree include files and adapt the settings or lines as applicable for your hardware.

Adding custom hardware

Your carrier board may include additional hardware components. If a driver exists in the Linux kernel, check its device tree bindings in the Linux kernel documentation at Documentation/devicetree/bindings/.

Compiling your platform device tree

If you want the kernel to build your newly created device tree file, you must add it to the device tree's Makefile:

arch/arm/boot/dts/Makefile
        imx6q-ccimx6sbc-w.dtb \
        imx6q-ccimx6sbc-wb.dtb \
        imx6q-ccimx6sbc-wb-ldo-bypass.dtb \
+       mycc6board.dtb \
        imx6q-sabreauto.dtb \
        imx6q-sabreauto-flexcan1.dtb \
        imx6q-sabreauto-ecspi.dtb \