Summary of Contents for Phytec LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit
Page 1
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide A Product of PHYTEC Technology Holding Company...
Page 2
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Document Title LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Document Type Quickstart Guide Yocto Page L-813e_7 Yocto Reference Manual Article Number LAN-087e.A2 Release Date 13.02.2020 Is Branch of...
Page 3
8 Carrier Board * Yocto Reference Manual - provides information on Yocto, which is used with most PHYTEC products * Board Support Package (BSP) Manual - provides detailed instructions on running the tools which are used to build various software ...
Page 4
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Requirements The following components and system requirements are necessary to successfully complete this Quickstart. Deviations from these requirements are possible but may require workarounds. Hardware Included in Kit phyCORE-i.MX 8 SOM with i.MX 8QuadMax processor (PCM-064) phyCORE-i.MX 8 carrier board (PCM-943)
Page 5
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Additional Equipment Additional Equipment (not included in Alpha Kit) • An SD card and SD card reader operational under Linux. • Additional Serial null modem cable (RS-232) (optional) Additional Kits for the phyCORE-i.MX 8 •...
Page 7
As this is an Alpha Kit, there will be continuous revisions made to the phyCORE-i.MX 8 SOM and phyCORE- i.MX 8 Carrier Board. Due to this, components and features may not be available. Contact PHYTEC if there any questions regarding components and features for this Alpha Kit. To see which components are...
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Connecting the phyCORE-i.MX 8 Carrier Board There are 3 cables that need to be manually connected to the phyCORE-i.MX 8 in order for it to be operational Connecting the USB Debug If S1=ON, no boot is possible without connecting the Debug USB cable. Using the USB Micro head, connect the USB cable to the Debug USB component (X10).
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Bootmode Switch The i.MX 8QuadMax has 6 Boot-Pins. They are connected to Dip Switches on the carrier board. The following table shows the Dip Switch configurations for the available Boot-Sources. ON = 0 and OFF = 1 when Nr.8 of the Dipswitch is ON. ...
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Building the BSP This section will guide you through the general build process of the i.MX8 BSP using the phyLinux script. If you want to use our software without phyLinux and the Repo tool managed environment instead, you can find all Git repositories on: git://git.phytec.de...
Page 11
Finding the Right Software Platform The i.MX 8 BSP is planned as a unified BSP, which means in the future it will support a set of different PHYTEC carrier boards (CB) with different Systems on Module (SOMs). However, this ALPHA BSP supports only one PHYTEC...
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Booting the System The default boot source for the i.MX 8 module phycore-imx8 is the eMMC. Booting the eMMC To boot from eMMC, switch S8 has to be set to OFF (which is the default setup).
Page 13
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide • After having unmounted all devices with an appended number (<your_device><number>), you can create your bootable SD card with: host$ sudo dd if=<IMAGENAME>-<MACHINE>.sdcard of=/dev/<your_device> bs=1MB conv=fsync status=progress Using the device name (<your_device>) without appended number (e.g. sde) which stands for the whole device. The parameter conv=fsync forces a sync operation on the device before dd returns.
Page 14
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide /dev/sdc1 8192 24575 8192 W95 FAT32 (LBA) /dev/sdc2 24576 655359 315392 Linux • Remove and reinsert the card. Otherwise, Linux will not recognize the new partitions created in the previous step. • Create a file system on the partitions with (replace sde with your device):...
Page 15
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Development Host Preparations On the development host, a TFTP server must be installed and configured. The following tool will be needed to boot the Kernel from Ethernet: a TFTP server • For Ubuntu install: host$...
Page 16
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Usually, TFTP servers are using the /tftpboot directory to fetch files from. If you built your own images, please copy them from the BSP’s build directory to there. We also need a network connection between the embedded board and the TFTP server. The server should be set to IP 192.168.3.10 and netmask 255.255.255.0.
Page 17
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Make your changes and hit 'Enter'. The changes you made are temporary for now, so to save these we have to save them by typing: u-boot=> saveenv You can also change the IP address to DHCP instead of using a static one. Just configure netargs:...
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Updating the Software In this chapter, we explain how to use the u-boot bootloader on target or linux on target/host to update the images in eMMC. Updating eMMC via Network i.MX 8 boards have an Ethernet connector and can be updated over a network. Be sure to set up the development host correctly.
Page 19
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide number of blocks to write. In this case 524288000 bytes / 512 = 0xFA000 MMC write: dev # 0, block # 0, count 1024000 ... 1024000 blocks written: OK Updating eMMC via network in Linux on Target You can update the eMMC from your target.
Page 20
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Updating eMMC from SD card in u-boot on target Configure SD Card for Flashing First, we create a new partition on the SD card to store the image in it. • On your host insert the SD card and see in dmesg, which one it is:...
Page 21
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Partition type (type L to list all types): c Changed type of partition 'Linux' 'W95 FAT32 (LBA)'. Command (m for help): The partition table has been altered. Calling ioctl() to re-read partition table.
Page 22
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide u-boot=> reset u-boot=> mmc dev 0 switch to partitions #0, OK mmc0(part is current device u-boot=> mmc part Partition Map for MMC device 0 Partition Type: DOS Part Start Sector Num Sectors...
Page 23
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Device Tree (DT) Introduction The following text briefly describes the Device Tree and can be found in the Linux kernel (linux/Documentation/ devicetree/usage-model.txt). "The "Open Firmware Device Tree", or simply Device Tree (DT), is a data structure and language for describing hardware.
Page 24
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide DT Structure The module includes file Modul .dtsi which contains all devices which are mounted on the module, such as PMIC and RAM. Devices which come from the i.MX 8 SoC but are just routed down to the carrier board are not part of the Module...
Page 25
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Accessing Peripherals To find out which boards and modules are supported by the release of PHYTEC’s i.MX 8 BSP described here, visit our web page at http://www.phytec.de/produkte/software/yocto/phytec-unified-yocto-bsp-releases/ and click the corresponding BSP release. Here you can find all hardware supported in the columns "Hardware Article Number"...
Page 26
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide The first part of the string SC_P_UART0_RX_DMA names the pad (in this example UART0_RX_DMA). The second part of the string (UART0_RX ) is the desired muxing option for this pad. There is currently no documentation from NXP for pad setting value (hex value on the right).
Page 30
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Can use target$ ip link To see if the interface is up or down, but the given MAC and IP addresses are arbitrary and obsolete. • To get the information on can0 such as bit rate and error counters, type: ...
Page 31
target$ cansend can0 123##1.223344 target$ candump can0 See cansend --help and candump --help help messages for further information on options and usage. The corresponding kernel part can be found within the board specific DT, e.g. phytec-imx8qm-pcm-943.dtsi: &flexcan1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_flexcan1>;...
Page 32
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide pinctrl_flexcan1: flexcan0grp { fsl,pins = < SC_P_FLEXCAN0_TX_DMA_FLEXCAN0_TX 0x21 SC_P_FLEXCAN0_RX_DMA_FLEXCAN0_RX 0x21 SC_P_SAI1_RXFS_LSIO_GPIO3_IO14 0x21 >; pinctrl_flexcan2: flexcan1grp { fsl,pins = < SC_P_FLEXCAN1_TX_DMA_FLEXCAN1_TX 0x21 SC_P_FLEXCAN1_RX_DMA_FLEXCAN1_RX 0x21 SC_P_SAI1_TXC_LSIO_GPIO3_IO15 0x21 >; […] SD / MMC Card The i.MX 8 alpha release kit supports a slot for Secure Digital Cards and Multi Media Cards to be used as general purpose block devices. These devices can be used in the same way as any other block device. ...
Page 37
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide eMMC Devices PHYTEC modules like phyCORE-i.MX 8 are populated with an eMMC memory chip as main storage. eMMC devices contain raw MLC memory cells (section Enable Pseudo-SLC Mode) combined with a memory controller that handles ECC and wear leveling.
Page 38
The JEDEC standard v5.1 introduces a new automatic BKOPS feature. It frees the host to trigger the background operations regularly because the device starts BKOPS itself when it is idle (see the description of bit AUTO_EN in register BKOPS_EN (Reg: 163)). eMMC chips deployed by PHYTEC do not currently support the new standard v5.1. Neither the Linux kernel nor userspace tool mmc support this feature. •...
Page 39
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide If you prefer reliability over storage capacity, you can enable the pseudo-SLC or SLC mode. The method used here employs the enhanced attribute, which is described in the JEDEC standard and can be set for continuous regions of the device.
Page 40
There are two ways to flash the bootloader to one of the two boot partitions and to switch the boot device: via bootloader or via userspace commands, as shown in the following examples.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 fix location after the u-boot.
Page 41
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide bootloader$ mmc rescan • Second, list all detected mmc devices: bootloader$ mmc list FSL_SDHC: 0 (eMMC) FSL_SDHC: 1 (SD) • Select eMMC device: bootloader$ mmc dev 0 switch to partitions #0, OK mmc0(part is current device •...
Page 44
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide /dev/mmcblk0p1 16384 81919 65536 c W95 FAT32 (LBA) Command (m for help): n Partition type primary (1 primary, 0 extended, 3 free) extended (container for logical partitions) Select (default p): p Partition number (2-4, default 2): 2...
Page 45
To use the newly created GPIO 135 as output and to toggle it, execute: target$ echo 135 > /sys/class/gpio/export target$ echo out > /sys/class/gpio/gpio135/direction target$ echo 1 > /sys/class/gpio/gpio135/value target$ echo 0 > /sys/class/gpio/gpio135/value Pinmuxing of some GPIO pins in the device tree phytec-imx8qm-phycore-som.dtsi:...
To activate USB OTG as device you need to load an appropriate module with modprobe, e.g. the Ethernet gadget g_ether: USB OTG target$ modprobe g_ether For using USB OTG as host, please load the module g_zero. User USB OTG configuration in the kernel device tree phytec-imx8qm-pcm-943.dtsi:...
Page 47
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide &iomuxc […] pinctrl_usbotg1: usbotg1 fsl,pins = < SC_P_USB_SS3_TC0_CONN_USB_OTG1_PWR 0x00000021 >; […] &usbotg1 pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg1>; srp-disable; hnp-disable; adp-disable; power-polarity-active-high; disable-over-current; status = "okay"; PCIe The phyCORE-i.MX8 has one Mini-PCIe and one PCIe slot.
Page 48
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide 01:00.0 Network controller: Intel Corporation WiFi Link 5100 Subsystem: Intel Corporation WiFi Link 5100 AGN Flags: fast devsel, IRQ 241 Memory at 20100000 (64-bit, non-prefetchable) [size=8K] Capabilities: [c8] Power Management version 3...
Page 49
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Some PCIe devices, e.g. this Ethernet card, may function properly even if no firmware blob could be loaded from /lib/firmware/ and you received an error message as shown in the first line of the output above. This is because some manufacturers provide the firmware as fall-back on the card itself.
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Use of the kernel boot parameter maxcpus allows the processor to limit the number of cores the system is using at runtime (https://www.kernel.org/doc/Documentation/kernel-parameters.txt). Thermal Management The Linux kernel has an integrated thermal management which is capable of monitoring SoC temperatures, reducing the CPU frequency, driving fans, advising other drivers to reduce the power consumption of devices, and –...
Page 51
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Enabling WLAN The firmware should be loaded by the kernel automaticaly and you should see an output in your console similar to the following: brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43430-sdio.bin for chip 0x00a9a6(43430) rev brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Sep 11 2018 09:22:09 version 7.45.98.65 (r707f brcmfmac: brcmf_sdio_ulp_preinit: ulp_sdioctrl iovar returned err = -23 Wlan is not present at this time.
Page 53
LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit Quickstart Guide Link mode: SLAVE ACCEPT Name: 'BlueZ 5.49' Class: 0x000000 Service Classes: Unspecified Device Class: Miscellaneous, HCI Version: 4.1 (0x7) Revision: 0x60 LMP Version: 4.1 (0x7) Subversion: 0x2209 Manufacturer: Broadcom Corporation (15) Now you can scan your environment for visible bluetooth devices. Your bluetooth is not visible at standard.
Need help?
Do you have a question about the LAN-087e.A2 phyCORE-i.MX 8 Alpha Kit and is the answer not in the manual?
Questions and answers