Hi, I’m the Toradex AI Assistant.
I might make mistakes or occasionally get you wrong. Our support team will step in if needed.
Based on your Colibri iMX6DL setup running BSP 7.5.0, I’ll guide you through configuring USDHC2 for SD card operation on your custom carrier board.
Device Tree Configuration for USDHC2 (1)(2)
Pin Multiplexing Configuration
You’ll need to add pin control configuration for USDHC2 in your device tree. Add this to the iomuxc node (2):
&iomuxc {
pinctrl_usdhc2: usdhc2grp {
fsl,pins = <
MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17059
MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10059
MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059
MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059
MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059
MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x17059
>;
};
};
(2)
USDHC2 Node Configuration
Enable and configure the USDHC2 controller (2):
&usdhc2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc2>;
bus-width = <4>;
cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; /* Adjust GPIO for card detect */
wp-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; /* Adjust GPIO for write protect */
status = "okay";
};
(2)
Device Tree Modification Process (1)(3)
Choose Base Device Tree
For your Colibri iMX6DL, locate the base device tree file in the kernel source (3):
- Look in
/arch/arm/boot/dts/nxp/ directory
- Find the appropriate base DTS file for your module
Create Custom Device Tree
- Create your custom device tree by copying the base file (3):
$ cp ./arch/arm/boot/dts/nxp/imx6dl-colibri-eval-v3.dts ./arch/arm/boot/dts/nxp/imx6dl-colibri-custom.dts
(3)
- Edit the Makefile to include your custom device tree (3):
dtb-$(CONFIG_SOC_*) += imx6dl-colibri-custom.dtb
(3)
Build and Deployment (1)(3)
Compile the Device Tree
Compile your custom device tree (3):
$ make DTC_FLAGS="-@" <device-tree>.dtb
(3)
Deploy to Running Device
Copy the compiled device tree to your module (3):
$ scp <custom-device-tree>.dtb root@<ip-address>:/boot
(3)
Then reboot and interrupt the autoboot sequence to access U-Boot console (3).
SD Card Validation (4)
After deployment, verify your SD card functionality:
Check Device Detection
Use the symlink to identify your SD card device (4):
# ls -l /dev/colibri-sd*
(4)
Verify Card Specifications
Check the card specifications through sysfs (4):
# cat /sys/kernel/debug/mmc1/ios
(4)
Test Performance
Use hdparm to test data transfer rates (4):
# hdparm -t /dev/mmcblk1
(4)
Important Considerations
- Pin Assignment: Ensure your custom carrier board routes the USDHC2 signals correctly to your SD card connector
- GPIO Configuration: Adjust the card detect (CD) and write protect (WP) GPIO assignments based on your carrier board design (2)
- Power Supply: Verify proper power supply configuration for the SD card interface
The key changes involve adding proper pin multiplexing configuration and enabling the USDHC2 controller with appropriate settings for your hardware design (1)(2).
Best regards, Toradex AI Assistant.
Did you like my answer?

If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.