1. This is how I did my setup on i.MX7D. It should be the same for i.MX6Q.
Steps to include dm_crypt and cryptsetup into Yocto build
============================================
//add this local.conf:
IMAGE_ROOTFS_EXTRA_SPACE = "6606030"
IMAGE_OVERHEAD_FACTOR = "1.0"
CORE_IMAGE_EXTRA_INSTALL += " cryptsetup cryptodev-module cryptodev-tests"
bitbake -c menuconfig virtual/kernel
CONFIG_BLK_DEV_DM=m
CONFIG_DM_DEBUG=y
CONFIG_DM_CRYPT=m
bitbake virtual/kernel -f -c deploy
bitbake virtual/kernel -f -c compile
bitbake -f fsl-image-gui
Example on setup on the board
========================
modprobe dm_crypt
fallocate -l 5.5G test
cryptsetup -y luksFormat test
cryptsetup luksOpen test volumetest
mkfs.ext4 -j /dev/mapper/volumetest
mkdir /mnt/filestest
mount /dev/mapper/volumetest /mnt/filestest
// Work with /mnt/filetest
umount /mnt/filestest
cryptsetup luksClose volumetest
2. I don't think it's possible to have the FAT32 partition encrypted because at boot time, zImage and dts are expected to be in clear and not encrypted. There is no software that loads a dm-crypt based encrypted zImage from what I know. You can look at secure boot for this feature. https://www.nxp.com/docs/en/application-note/AN4581.pdf