Download Print this page
Hide thumbs Also See for i.MX 8M Plus BSP:

Advertisement

Quick Links

i.MX 8M Plus BSP Manual DRAFT
PHYTEC Messtechnik GmbH
May 23, 2025

Advertisement

loading
Need help?

Need help?

Do you have a question about the i.MX 8M Plus BSP and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Phytec i.MX 8M Plus BSP

  • Page 1 8M Plus BSP Manual DRAFT PHYTEC Messtechnik GmbH May 23, 2025...
  • Page 3: Table Of Contents

    ..........PHYTEC i.MX 8M Plus BSP Device Tree Concept .
  • Page 4 SPI Master ..........GPIOs .
  • Page 5 The code examples lines begin with “host:~$”, “target:~$” or “u-boot=>”. This describes where the commands are to be executed. Only after these keywords must the actual command be copied. PHYTEC provides a variety of hardware and software documentation for all of our products. This includes any or all of the following: •...
  • Page 6 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 On top of these standard manuals and guides, PHYTEC will also provide Product Change Notifications, Application Notes, and Technical Notes. These will be done on a case-by-case basis. Most of the documen- tation can be found on the https://www.phytec.de/produkte/system-on-modules/phycore-imx-8m-plus/...
  • Page 7: Supported Hardware

    CHAPTER SUPPORTED HARDWARE On our web page, you can see all supported Machines with the available Article Numbers for this release: BSP-Yocto-NXP-i.MX8MP-PD24.1.0 download. If you choose a specific Machine Name in the section Supported Machines, you can see which Article Numbers are available under this machine and also a short description of the hardware information.
  • Page 8 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 Fig. 2: phyBOARD-Pollux Components (bottom) Supported Hardware...
  • Page 9: Getting Started

    CHAPTER GETTING STARTED The phyCORE-i.MX8M Plus Kit is shipped with a pre-flashed SD card. It contains the phytec-qt6demo- image and can be used directly as a boot source. The eMMC is programmed with only a U-Boot by default. You can get all sources from the PHYTEC download server.
  • Page 10 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 Selecting the wrong device may result in data loss and e.g. could erase your currently running system on your host PC! 2.2.1 Finding the Correct Device To create your bootable SD card, you must first find the correct device name of your SD card and possible partitions.
  • Page 11 2.2.4 Using After having unmounted all SD card’s partitions, you can create your bootable SD card. Some PHYTEC BSPs produce uncompressed images (with filename-extension *.wic), and some others pro- duce compressed images (with filename-extension *.wic.xz). To flash an uncompressed images (*.wic) use command below: host:~$ sudo dd if=phytec-qt6demo-image-phyboard-pollux-imx8mp-3?(.rootfs).wic of=/dev/<your_...
  • Page 12: First Start-Up

    8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 2.3 First Start-up • To boot from an SD card, the bootmode switch (S3) needs to be set to the following position: • Insert the SD card • Connect the target and the host with micro USB on...
  • Page 13: Building The Bsp

    Manual (scarthgap). 3.1 Basic Set-Up If you have never created a Phytec BSP with Yocto on your computer, you should take a closer look at the chapter BSP Workspace Installation in the Yocto Reference Manual (scarthgap). 3.2 Get the BSP There are two ways to get the BSP sources.
  • Page 14 • Build your image: host:~/yocto/build$ bitbake phytec-qt6demo-image Note For the first build we suggest starting with our smaller non-graphical image phytec-headless-image to see if everything is working correctly. host:~/yocto/build$ bitbake phytec-headless-image The first compile process takes about 40 minutes on a modern Intel Core i7. All subsequent builds will use the filled caches and should take about 3 minutes.
  • Page 15 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 3.2.2 BSP Images All images generated by Bitbake are deployed to . The following ~/yocto/build/deploy*/images/<machine> list shows for example all files generated for the phyboard-pollux-imx8mp-3 machine: • u-boot.bin: Binary compiled U-boot bootloader (U-Boot). Not the final Bootloader image! •...
  • Page 16 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 Building the BSP...
  • Page 17: Installing The Os

    CHAPTER FOUR INSTALLING THE OS 4.1 Bootmode Switch (S3) Hardware revision baseboard: 1552.2 The phyBOARD-Pollux features a boot switch with four individually switchable ports to select the phyCORE-i.MX 8M Plus default bootsource.
  • Page 18: Flash Emmc

    8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 Fig. 1: eMMC Fig. 2: Internal Fuses Fig. 3: SPI NOR Fig. 4: USB Serial Download Fig. 5: SD Card Fig. 6: Test Mode 4.2 Flash eMMC For consistency, it is assumed that a TFTP server is configured; More importantly, all generated images, as listed above, are copied to the default /srv/tftp directory.
  • Page 19 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 can be run to inspect whether the current setup is affected. If have an identical mmcblk2p1 mmcblk1p1 UUID, the setup is affected. 4.2.1 Flash eMMC from Network i.MX 8M Plus boards have an Ethernet connector and can be updated over a network. Be sure to set up the development host correctly.
  • Page 20 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 Flash eMMC from Network in U-Boot on Target These steps will show how to update the eMMC via a network. This step only works if the size of the image file is less than 1GB due to limited usage of RAM size in the Bootloader after enabling OPTEE.
  • Page 21 Flash eMMC from USB in Linux These steps will show how to flash the eMMC on Linux with a USB stick. You only need a complete image saved on the USB stick and a bootable WIC image. (e.g. phytec-qt6demo-image-phyboard-pollux-imx8mp- 3.|yocto-imageext|). Set the bootmode switch (S3) to SD Card.
  • Page 22 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 (continued from previous page) 61.504607] scsi 0:0:0:0: Direct-Access 8.07 PQ: 0 ANSI: 2 61.515283] sd 0:0:0:0: [sda] 3782656 512-byte logical blocks: (1.94 GB/1.80 GiB) 61.523285] sd 0:0:0:0: [sda] Write Protect is off 61.528509] sd 0:0:0:0: [sda] No Caching mode page found...
  • Page 23 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 (continued from previous page) mmc2(part 0) is current device u-boot=> setexpr nblk ${filesize} / 0x200 u-boot=> mmc write 0x58000000 0x0 ${nblk} MMC write: dev # 2, block # 0, count 1024000 ... 1024000 blocks written: OK u-boot=>...
  • Page 24: Flash Spi Nor Flash

    #0, OK mmc2(part 0) is current device • Flash your WIC image (for example phytec-qt6demo-image.rootfs.wic) from the SD card to eMMC. This will partition the card and copy imx-boot, Image, dtb, dtbo, and root file system to eMMC.
  • Page 25 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 4.3.1 Flash SPI NOR Flash from Network The SPI NOR can contain the bootloader and environment to boot from. The arm64 kernel can not decompress itself, the image size extends the SPI NOR flash populated on the phyCORE-i.MX 8M Plus.
  • Page 26 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 u-boot=> sf erase 0x400000 0x100000 4.3.2 Flash SPI NOR Flash from SD Card The bootloader on SPI NOR flash can be also flashed with SD Card. Flash SPI NOR from SD Card in kernel on Target •...
  • Page 27: Rauc

    The RAUC (Robust Auto-Update Controller) mechanism support has been added to meta-ampliphy. It controls the procedure of updating a device with new firmware. This includes updating the Linux kernel, Device Tree, and root filesystem. PHYTEC has written an online manual on how we have intergraded RAUC into our BSPs: L-1006e.A6 RAUC Update &...
  • Page 28 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 variables. Otherwise the grub-dummy installation step will fail and you will be sent back to the “Force GRUB installation” prompt. After the installation is complete, reboot the board and remove the installation medium (USB-stick). The board should then boot the distro you installed.
  • Page 29: Development

    Now, both will be included in a single FIT image blob. Further, the logic for booting the PHYTEC ampliphy distributions is moved to a boot script which itself is part of a separate FIT image blob. To revert to the old style of booting, you may do...
  • Page 30 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 meta-phytec/recipes-kernel/linux/linux-phytec-imx_*.bb meta-phytec/recipes-bsp/u-boot/u-boot-imx_*.bb 5.1.2 Get the SDK You can download the SDK here, or build it yourself with Yocto: • Move to the Yocto build directory: host:~$ source sources/poky/oe-init-build-env host:~$ bitbake -c populate_sdk phytec-qt6demo-image...
  • Page 31: U-Boot Standalone Build

    8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 Note, SDK issue has not been observed on newer distributions, such as Ubuntu 22.04, which appear to work without requiring any modifications. 5.2 U-Boot standalone build 5.2.1 Get the source code • Get the U-Boot sources: host:~$ git clone git://git.phytec.de/u-boot-imx...
  • Page 32 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 5.2.3 Build the bootloader • build flash.bin (imx-boot): host:~/u-boot-imx$ make phycore-imx8mp_defconfig host:~/u-boot-imx$ make flash.bin 5.2.4 Flash the bootloader to a block device The flash.bin can be found at u-boot-imx/ directory and now can be flashed. A chip-specific offset is needed:...
  • Page 33: Kernel Standalone Build

    FIT image and boot the kernel contained in it. As a result, the kernel Image has to packaged in a FIT image. 5.3.1 Setup sources • The used linux-phytec-imx branch can be found in the release notes • The tag needed for this release is called v6.6.23-2.0.0-phy10 •...
  • Page 34 • Install kernel modules to e.g. NFS directory: host:~/linux-phytec-imx$ make INSTALL_MOD_PATH=/home/<user>/<rootfspath> modules_install • The Image can be found at ~/linux-phytec-imx/arch/arm64/boot/Image.gz • The dtb can be found at ~/linux-phytec-imx/arch/arm64/boot/dts/freescale/imx8mp-phyboard- pollux-rdk.dtb • For (re-)building only Devicetrees and -overlays, it is sufficient to run...
  • Page 35: Working With Uuu-Tool

    8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 5.4 Working with UUU-Tool The Universal Update Utility Tool (UUU-Tool) from NXP is a software to execute on the host to load and run the bootloader on the board through SDP (Serial Download Protocol). For detailed information visit https://github.com/nxp-imx/mfgtools...
  • Page 36: Host Network Preparation

    8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 Warning flashes U-boot into eMMC BOOT (hardware) boot partitions, sets BOOT_PARTITION_ENABLE in the eMMC! This is a problem since we want the bootloader to reside in the eMMC USER partition. Flashing next U-Boot version .wic image and not disabling BOOT_PARTITION_ENABLE bit will result in device always using U-boot saved in BOOT partitions.
  • Page 37: Tftp Server Setup

    -R o+r /srv/tftp • You also need to configure a static IP address for the appropriate interface. The default IP address of the PHYTEC evaluation boards is 192.168.3.11. Setting a host address 192.168.3.10 with netmask 255.255.255.0 is a good choice.
  • Page 38 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 In this example file, the whole directory is exported and the “lab network” address of the development host is 192.168.3.10. The IP address has to be adapted to the local needs: /srv/nfs 192.168.3.0/255.255.255.0(rw,no_root_squash,sync,no_subtree_check) •...
  • Page 39: Booting The Kernel From A Network

    8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 5.6 Booting the Kernel from a Network Booting from a network means loading the kernel and device tree over TFTP and the root file system over NFS. The bootloader itself must already be loaded from another available boot device.
  • Page 40: Accessing The Development States

    8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 5.6.4 Booting from an Embedded Board Boot the board into the U-boot prompt and press any key to hold. • To boot from a network, call: u-boot=> setenv boot_targets ethernet u-boot=> bootflow scan -lb 5.7 Accessing the Development states...
  • Page 41 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 5.9.1 Gparted • Get GParted: host:~$ sudo apt install gparted • Insert the SD Card into your host and get the device name: host:~$ dmesg | tail [30436.175412] sd 4:0:0:0: [sdb] 62453760 512-byte logical blocks: (32.0 GB/29.8 GiB) [30436.179846]...
  • Page 42 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 default option in resize2fs which causes a incompatibility. See release notes. • Choose your SD Card device at the drop-down menu on the top right • Choose the ext4 root partition and click on resize:...
  • Page 43 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 • Drag the slider as far as you like or enter the size manually. • Confirm your entry by clicking on the “Change size” button. Development...
  • Page 44 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 • To apply your changes, press the green tick. • Now you can mount the root partition and copy e.g. the phytec-qt6demo-image-phyboard-pollux- imx8mp-3.wic image to it. Then unmount it again: host:~$ sudo cp phytec-qt6demo-image-phyboard-pollux-imx8mp-3.wic /mnt/ ; sync...
  • Page 45 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 • Choose the bigger unallocated area and press “New”: • Click “Add” Development...
  • Page 46 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 • Confirm your changes by pressing the green tick. Development...
  • Page 47: Switch Back To Legacyboot

    8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 • Now you can mount the new partition and copy e.g. phytec-qt6demo-image-phyboard-pollux-imx8mp- 3.wic image to it. Then unmount it again: host:~$ sudo mount /dev/sde3 /mnt host:~$ sudo cp phytec-qt6demo-image-phyboard-pollux-imx8mp-3.wic /mnt/ ; sync...
  • Page 48 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 NEL_DEVICETREE variable that is set in conf/machine/phyboard-pollux-imx8mp-3.conf in meta-phytec but the freescale at the beginning needs to be removed, so that only the devicetree filename are left. In the end it should look something like this: KERNEL_DEVICETREE_DEPLOY = "...
  • Page 49 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 5.10.2 Changes in U-Boot environment To re-enable legacyboot set the following variable: uboot=> setenv dolegacyboot 1 uboot=> env save; env save; uboot=> boot Development...
  • Page 50 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 Development...
  • Page 51: Device Tree (Dt)

    6.2 PHYTEC i.MX 8M Plus BSP Device Tree Concept The following sections explain some rules PHYTEC has defined on how to set up device trees for our i.MX 8M Plus SoC-based boards.
  • Page 52 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 (continued from previous page) imx8mp-isp-csi1.dtbo imx8mp-isp-csi2.dtbo imx8mp-phyboard-pollux-peb-av-10.dtbo imx8mp-phyboard-pollux-peb-wlbt-05.dtbo imx8mp-phycore-no-eth.dtbo imx8mp-phycore-no-rtc.dtbo imx8mp-phycore-no-spiflash.dtbo imx8mp-phycore-rpmsg.dtbo imx8mp-vm016-csi1.dtbo imx8mp-vm016-csi1-fpdlink.dtbo imx8mp-vm016-csi2.dtbo imx8mp-vm016-csi2-fpdlink.dtbo imx8mp-vm017-csi1.dtbo imx8mp-vm017-csi1-fpdlink.dtbo imx8mp-vm017-csi2.dtbo imx8mp-vm017-csi2-fpdlink.dtbo Otherwise you can show the content of a FIT image including all overlay configs in the FIT image with this...
  • Page 53 MMC device or via TFTP. The main intention of this file is to store the ${overlays} variable. This makes it easy to pre-define the overlays in Yocto depending on the used machine. The content from the file is defined in the Yocto recipe bootenv found in meta-phytec: https://git.phytec.de/ meta-phytec/tree/recipes-bsp/bootenv?h=scarthgap Other variables can be set in this file, too.
  • Page 54 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 6.2.4 Change U-boot Environment from Linux on Target Libubootenv is a tool included in our images to modify the U-Boot environment of Linux on the target machine. Print the U-Boot environment using the following command:...
  • Page 55: Accessing Peripherals

    Please read section PHYTEC i.MX 8M Plus BSP Device Tree Concept to get an understanding of our i.MX 8 BSP device tree model. The following sections provide an overview of the supported hardware components and their operating system drivers on the i.MX 8 platform.
  • Page 56: Rs232/Rs485

    8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 The first part of the string MX8MP_IOMUXC_UART1_RXD_UART1_DCE_RX names the pad (in this example UART1_RXD). The second part of the string (UART1_DCE_RX) is the desired muxing option for this pad. The pad setting value (hex value on the right) defines different modes of the pad, for example, if internal pull resistors are activated or not.
  • Page 57 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 You can show the current config with: target:~$ rs485conf /dev/ttymxc1 You can show all options with: target:~$ rs485conf /dev/ttymxc1 -h Documentation for calling the IOCTL within c-code is described in the Linux kernel documentation: https: //www.kernel.org/doc/Documentation/serial/serial-rs485.txt...
  • Page 58 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 (continued from previous page) /dev/ttymxc1: count for this session: rx=57330, tx=0, rx err=0 target2:~$ linux-serial-test -s -e -f -p /dev/ttymxc1 -b 115200 --rs485 -r -o /dev/ttymxc1: count for this session: rx=0, tx=57330, rx err=0 In this example target1 will be the receiver and target2 will be the transmitter.
  • Page 59: Network

    8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 target1:~$ linux-serial-test -s -e -f -p /dev/ttymxc1 -b 115200 --rs485 /dev/ttymxc1: count for this session: rx=114660, tx=118755, rx err=0 target2:~$ linux-serial-test -s -e -f -p /dev/ttymxc1 -b 115200 --rs485 /dev/ttymxc1: count for this session: rx=118755, tx=114660, rx err=0 In this example both targets will send and receive simultaneously.
  • Page 60 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 The device tree set up for EQOS Ethernet IP core where the PHY is populated on the phyBOARD-Pollux can be found here: https://github.com/phytec/linux-phytec-imx/tree/v6.6.23-2.0.0-phy10/arch/arm64/boot/ dts/freescale/imx8mp-phyboard-pollux-rdk.dts#L179. 7.3.1 Network Environment Customization U-boot network-environment • To find the Ethernet settings in the target bootloader: u-boot=>...
  • Page 61 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 Kernel network-environment • Find the ethernet settings for eth0 in the target kernel: target:~$ ip -statistics address show eth0 2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state UP group default qlen␣ 1000 →...
  • Page 62 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 (continued from previous page) (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS (5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS (57000 - 66000 @ 2160), (N/A, 40), (N/A)
  • Page 63: Sd/Mmc Card

    8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 Now you can scan your environment for visible Bluetooth devices. Bluetooth is not visible during a default startup. target:~$ hcitool scan Scanning ... XX:XX:XX:XX:XX:XX <SSID> Visibility To activate visibility: target:~$ hciconfig hci0 piscan...
  • Page 64: Emmc Devices

    7.5 eMMC Devices PHYTEC modules like phyCORE-i.MX 8M Plus is populated with an eMMC memory chip as the main storage. eMMC devices contain raw Multi-Level Cells (MLC) or Triple-Level Cells (TLC) combined with a memory controller that handles ECC and wear leveling. They are connected via an SD/MMC interface to the i.MX 8M Plus and are represented as block devices in the Linux kernel like SD cards, flash drives, or...
  • Page 65 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 7.5.2 Enabling Background Operations (BKOPS) In contrast to raw NAND Flash, an eMMC device contains a Flash Transfer Layer (FTL) that handles the wear leveling, block management, and ECC of the raw MLC or TLC. This requires some maintenance tasks (for example erasing unused blocks) that are performed regularly.
  • Page 66 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 target:~$ poweroff The BKOPS_EN bit is one-time programmable only. It cannot be reversed. 7.5.3 Reliable Write There are two different Reliable Write options: 1. Reliable Write option for a whole eMMC device/partition.
  • Page 67 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 user space applications such as fdisk for the partition table. In the Linux kernel source code, it is handled via the flag REQ_META. Conclusion: ext4 file system with mount option data=journal should be safe against power cuts. The file system check can recover the file system after a power failure, but data that was written just before the power cut may be lost.
  • Page 68 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 (continued from previous page) from 454136 to 7367680 blocks old_desc_blocks = 4, new_desc_blocks = 57 [ 131.970278] EXT4-fs (mmcblk2p2): resized filesystem to 7367680 The filesystem on /dev/mmcblk2p2 is now 7367680 (1k) blocks long Increasing the filesystem size can be done while it is mounted.
  • Page 69 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 You will get: Done setting ENH_USR area on /dev/mmcblk2 setting OTP PARTITION_SETTING_COMPLETED! Setting OTP PARTITION_SETTING_COMPLETED on /dev/mmcblk2 SUCCESS Device power cycle needed for settings to take effect. Confirm that PARTITION_SETTING_COMPLETED bit is set using 'extcsd read' after power cycle •...
  • Page 70 Do not confuse eMMC partitions with partitions of a DOS, MBR, or GPT partition table. The current PHYTEC BSP does not use the extra partitioning feature of eMMC devices. The U-Boot is flashed at the beginning of the user partition. The U-Boot environment is placed at a fixed location after the U-Boot.
  • Page 71: Spi Master

    8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 target:~$ mmc bootpart enable /dev/mmcblk2 (for ‘boot1’) : target:~$ mmc bootpart enable /dev/mmcblk2 To disable booting from the eMMC boot partitions simply enter the following command: target:~$ mmc bootpart enable /dev/mmcblk2 To choose back to the user area u-boot environment:...
  • Page 72 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 (continued from previous page) Amount of eraseblocks: 60 (3932160 bytes, 3.7 MiB) Minimum input/output unit size: 1 byte Sub-page size: 1 byte Character device major/minor: 90:0 Bad blocks are allowed: false Device is writable:...
  • Page 73: Gpios

    8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 7.7 GPIOs The phyBOARD-Pollux has a set of pins especially dedicated to user I/Os. Those pins are connected directly to i.MX 8M Plus pins and are muxed as GPIOs. They are directly usable in Linux userspace. The processor has organized its GPIOs into five banks of 32 GPIOs each (GPIO1 –...
  • Page 74 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 (continued from previous page) Options: --banner display a banner on successful startup -b, --bias <bias> specify the line bias Possible values: 'pull-down', 'pull-up', 'disabled'. (default is to leave bias unchanged) --by-name treat lines as names even if they would parse as an offset -c, --chip <chip>...
  • Page 75: Leds

    7.9 I²C Bus The i.MX 8M Plus contains several Multimaster fast-mode I²C modules. PHYTEC boards provide plenty of different I²C devices connected to the I²C modules of the i.MX 8M Plus. This section describes the basic device usage and its DT representation of some I²C devices integrated into our phyBOARD-Pollux.
  • Page 76: Eeprom

    I2C address 0x59 on bus 0 and a normal area that is addressable over I2C address 0x51 on bus 0. PHYTEC uses this data area of 32 Bytes to store information about the SoM. This includes PCB revision and mounting options.
  • Page 77: Rtc

    7.11 RTC RTCs can be accessed via . Because PHYTEC boards have often more than one RTC, there might /dev/rtc* be more than one RTC device file. • To find the name of the RTC device, you can read its sysfs entry with:...
  • Page 78 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 Using the date command does not change the time and date of the RTC, so if we were to restart the target those changes would be discarded. To write to the RTC we need to use the command.
  • Page 79: Usb Host Controller

    8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 (continued from previous page) #define RTC_FEATURE_ALARM_WAKEUP_ONLY #define RTC_FEATURE_CNT • We can check RTC BSM (Backup Switchover Mode) with: target:~$ hwclock --param-get bsm The RTC parameter 0x2 is set to 0x1. • We can set RTC BSM with:...
  • Page 80 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 • Use: target:~$ ip link to see the state of the interfaces. The two CAN interfaces should show up as can0 and can1. • To get information on can0, such as bit rate and error counters, type:...
  • Page 81: Pcie

    8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 target:~$ ip link can0 down target:~$ ip link can0 txqueuelen type can bitrate 500000 sample-point 0.75 dbitrate␣ 4000000 dsample-point 0.8 fd on → You can send messages with cansend or receive messages with candump:...
  • Page 82 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 (continued from previous page) Subsystem: Intel Corporation WiFi Link 5100 AGN Flags: fast devsel Memory at 18100000 (64-bit, non-prefetchable) [disabled] [size=8K] Capabilities: [c8] Power Management version 3 Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+...
  • Page 83: Audio

    8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 7.15 Audio Playback devices supported for phyBOARD-Pollux are HDMI and the TI TLV320AIC3007 audio codec on the PEB-AV-10 connector. On the AV-Connector there is a 3.5mm headset jack with OMTP-standard and an 8-pin header. The 8-pin header contains a mono speaker, headphones, and line in signals.
  • Page 84 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 [...] pcm.asymed { type asym playback.pcm "pebav10" capture.pcm "dsnoop" [...] If the sound is not audible change playback devices to the software volume control playback devices, set playback.pcm to the respective softvol playback device e.g. “softvol_pebav10”. Use alsamixer controls to vary the volume levels.
  • Page 85: Video

    8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 target:~$ amixer -c "sndpebav10" sset 'Left PGA Mixer Mic3R' target:~$ amixer -c "sndpebav10" sset 'Right PGA Mixer Mic3R' target:~$ arecord -t wav -c 44100 -f S16_LE test.wav Hint Since playback and capture share hardware interfaces, it is not possible to use different sampling rates and formats for simultaneous playback and capture operations.
  • Page 86 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 HDMI is always enabled in the devicetree. The other interfaces can be enabled with Device Tree Overlay. The default-enabled Interfaces are HDMI and LVDS0 (PEB-AV-010). We support a 10’’ edt,etml1010g0dka display for the PEB-AV-10.
  • Page 87: Backlight Control

    The Qt demo must be closed before Weston can be closed. 7.17.3 Backlight Control If a display is connected to the PHYTEC board, you can control its backlight with the Linux kernel sysfs interface. All available backlight devices in the system can be found in the folder /sys/class/backlight.
  • Page 88: Power Management

    CPU is not needed. Scaling the frequency and the voltage is referred to as ‘Dynamic Voltage and Frequency Scaling’ (DVFS). The i.MX 8M Plus BSP supports the DVFS feature. The Linux kernel provides a DVFS framework that allows each CPU core to have a min/max frequency and a governor that governs it.
  • Page 89 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 The result will be: conservative ondemand userspace powersave performance schedutil • conservative is much like the ondemand governor. It differs in behavior in that it gracefully increases and decreases the CPU speed rather than jumping to max speed the moment there is any load on the CPU.
  • Page 90: Suspend To Ram

    8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 As confirmation, you will see: 110.505012] psci: CPU3 killed Now the core is powered down and no more processes are scheduled on this core. • You can use top to see a graphical overview of the cores and processes:...
  • Page 91 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 49000 There are two trip points registered by the imx_thermal kernel driver. These differ depending on the CPU variant. A distinction is made between Industrial and Commercial. Commercial Industrial passive (warning) 85°C 95°C...
  • Page 92: Watchdog

    Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 7.20 Watchdog The PHYTEC i.MX 8M Plus modules include a hardware watchdog that is able to reset the board when the system hangs. The watchdog is started on default in U-Boot with a timeout of 60s. So even during early kernel start, the watchdog is already up and running.
  • Page 93: On-Chip Otp Controller (Ocotp_Ctrl) - Efuses

    8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 7.24 On-Chip OTP Controller (OCOTP_CTRL) - eFuses The i.MX 8M Plus provides one-time programmable fuses to store information such as the MAC address, boot configuration, and other permanent settings (“On-Chip OTP Controller (OCOTP_CTRL)” in the i.MX 8M Plus Reference Manual).
  • Page 94 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 Accessing Peripherals...
  • Page 95: I.mx 8M Plus M7 Core

    The firmware can be built using the NXP MCUxpresso SDK with a compatible compiler toolchain using command-line tools. 8.1.1 Getting the Sources The MCUX SDK and the examples for the i.MX 8M Plus can be obtained from PHYTEC’s GitHub page: • https://github.com/phytec/mcux-sdk/ •...
  • Page 96: Running M7 Core Examples

    10-2020-q4-major release located in the home directory: host:~$ export ARMGCC_DIR=~/gcc-arm-none-eabi-10-2020-q4-major 8.1.2 Building the Firmware To build the PHYTEC samples an environment has to be sourced host:~/mcuxsdk$ source scripts/setenv The scripts to build the firmware are located in <sdk-directory>/phytec-mcux-boards/phyboard- pollux/<example_category>/<example>/armgcc. There are scripts for each memory location the firmware is supposed to run in, e.g.
  • Page 97 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 Once a micro-USB cable is connected to the USB-debug port on the phyBOARD-Pollux, two ttyUSB devices are registered. One prints messages from A53-Core’s debug UART and the other one from the M7 Core’s debug UART.
  • Page 98 8M Plus BSP Manual DRAFT Doc-rev.: imx8mm-pd25.1.0-87-ge0a9549 Note The samples found in on the target come from NXP’s Yocto layer meta-imx. To use the /lib/firmware samples you built yourself through MCUX SDK, please copy them to on the target after /lib/firmware building them.