<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.mediawiki.compulab.com/w/index.php?action=history&amp;feed=atom&amp;title=UCM-iMX91%3A_Yocto_Linux%3A_How-To_Guide</id>
	<title>UCM-iMX91: Yocto Linux: How-To Guide - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.mediawiki.compulab.com/w/index.php?action=history&amp;feed=atom&amp;title=UCM-iMX91%3A_Yocto_Linux%3A_How-To_Guide"/>
	<link rel="alternate" type="text/html" href="https://www.mediawiki.compulab.com/w/index.php?title=UCM-iMX91:_Yocto_Linux:_How-To_Guide&amp;action=history"/>
	<updated>2026-04-15T03:14:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://www.mediawiki.compulab.com/w/index.php?title=UCM-iMX91:_Yocto_Linux:_How-To_Guide&amp;diff=5693&amp;oldid=prev</id>
		<title>Igor: Created page with &quot;=Device Tree= == Available Device Tree Files == The current release includes the following '''dtb''' files: {| class=&quot;wikitable&quot; style=&quot;text-align:left;&quot; |- | align=&quot;center&quot; |...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.mediawiki.compulab.com/w/index.php?title=UCM-iMX91:_Yocto_Linux:_How-To_Guide&amp;diff=5693&amp;oldid=prev"/>
		<updated>2025-11-25T11:32:23Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;=Device Tree= == Available Device Tree Files == The current release includes the following &amp;#039;&amp;#039;&amp;#039;dtb&amp;#039;&amp;#039;&amp;#039; files: {| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:left;&amp;quot; |- | align=&amp;quot;center&amp;quot; |...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Device Tree=&lt;br /&gt;
== Available Device Tree Files ==&lt;br /&gt;
The current release includes the following '''dtb''' files:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:left;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''DTB''' &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''Hardware Configuration and Features'''&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''Jumpers/Connectors Settings'''&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;&amp;quot; |ucm-imx91.dtb&lt;br /&gt;
| align=&amp;quot;&amp;quot; |default hardware configuration&lt;br /&gt;
| align=&amp;quot;&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Set device tree==&lt;br /&gt;
The current release provides two methods to switch between dtb files:&lt;br /&gt;
* U-Boot environment&lt;br /&gt;
The U-boot '''fdtfile''' variable contains the device tree name that will be loaded into the RAM.&lt;br /&gt;
This variable can be changed by:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:left;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;&amp;quot; | '''Environment''' &lt;br /&gt;
| align=&amp;quot;&amp;quot; | '''Command''' &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;&amp;quot; |U-Boot&lt;br /&gt;
| align=&amp;quot;&amp;quot; |setenv fdtfile &amp;lt;fdt_file_name&amp;gt;; saveenv;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;&amp;quot; |Linux&lt;br /&gt;
| align=&amp;quot;&amp;quot; |fw_setenv fdtfile &amp;lt;fdt_file_name&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
* GRUB environment (if the image was created with the meta-compulab-uefi layer)&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:left;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;&amp;quot; | '''Environment''' &lt;br /&gt;
| align=&amp;quot;&amp;quot; | '''Command/Procedure''' &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;&amp;quot; |GRUB Boot Menu&lt;br /&gt;
| align=&amp;quot;&amp;quot; |Goto &amp;quot;Advanced Boot Options&amp;quot; and choose a device tree from the provided dtb list.&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;&amp;quot; |Linux&lt;br /&gt;
| align=&amp;quot;&amp;quot; |grub-editenv /boot/grub/grubenv set fdtfile=&amp;lt;fdt_file_name&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Serial Console =&lt;br /&gt;
UCM-iMX91 provides serial console on UART1.&amp;lt;/br&amp;gt;&lt;br /&gt;
SB-UCMIMX91 evaluation carrier-board exposes the console UART via CP2104 serial-to-USB bridge on connector [[UCM-iMX91: Evaluation Kit: Hardware Guide#Connector_Locations | '''P16''']].&lt;br /&gt;
== Connecting to a host PC ==&lt;br /&gt;
# Use a micro-USB cable to connect the console connector '''P16''' to a USB port on your host PC.&lt;br /&gt;
# Make sure the CP2104 driver is available with your operating system, otherwise install CP2104 driver onto the host PC from https://www.silabs.com/documents/public/software/CP210x_Windows_Drivers_with_Serial_Enumeration.zip&lt;br /&gt;
# Identify the host PC interface and port number that will be used for communication with the UCM-iMX91 evaluation kit:&lt;br /&gt;
#* In most Linux PCs, the serial port will be denoted as one of the following (where n is a positive integer): /dev/ttyUSB0, /dev/ttyUSB1 ... /dev/ttyUSBn&lt;br /&gt;
#* In Windows PCs, the serial port usually will be denoted as one of the following (where n is a positive integer): COM1, COM2 ... COMn&lt;br /&gt;
# Start a terminal emulation program (such as [https://www.putty.org/ PuTTY] on Windows or minicom on Linux).&lt;br /&gt;
# In the port configuration section of the terminal emulation program select the port identified in previous step and set the following serial port parameters:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
{{:SB-SOM: serial port parameters table}}&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= USB =&lt;br /&gt;
UCM-IMX91 features two USB2.0 ports that are derived from the i.MX91 USB sub-system.&amp;lt;br&amp;gt;&lt;br /&gt;
On SB-UCMIMX91 evaluation carrier-board USB ports are available on the following connectors:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:left;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''USB port#''' &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''HW setting''' &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''Connector''' &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''Mode''' &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |1&lt;br /&gt;
| align=&amp;quot;&amp;quot; |'''P21''' is not used&lt;br /&gt;
| align=&amp;quot;&amp;quot; |type-A '''J5'''&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |host&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |1&lt;br /&gt;
| align=&amp;quot;&amp;quot; |'''P21''' connected to USB host&lt;br /&gt;
| align=&amp;quot;&amp;quot; |micro-USB '''P21'''&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |device&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |2&lt;br /&gt;
| align=&amp;quot;&amp;quot; |jumper '''E11''' is open&lt;br /&gt;
| align=&amp;quot;&amp;quot; |type-A '''J6'''&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |host&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |2&lt;br /&gt;
| align=&amp;quot;&amp;quot; |jumper '''E11''' is closed&lt;br /&gt;
| align=&amp;quot;&amp;quot; |mini-PCIe '''P18'''&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |host&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== USB #1 in device mode ==&lt;br /&gt;
USB #1 port can be operated in device mode when connected to a host machine using connector '''P21'''.&amp;lt;/br&amp;gt;&lt;br /&gt;
Available gadgets for the UBS #1 in device mode:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:left;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;&amp;quot;|'''USB gadget''' &lt;br /&gt;
|align=&amp;quot;&amp;quot;|'''SOM command'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;&amp;quot;|usb serial device&lt;br /&gt;
|align=&amp;quot;&amp;quot;|modprobe g_serial&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;&amp;quot;|usb network device&lt;br /&gt;
|align=&amp;quot;&amp;quot;|modprobe g_ether&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;&amp;quot; |usb mass storage device&lt;br /&gt;
| align=&amp;quot;&amp;quot; |modprobe g_mass_storage file=/dev/sdX&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=CAN bus=&lt;br /&gt;
UCM-iMX91 features two Flexible Controller Area Network (FLEXCAN) modules.&lt;br /&gt;
SB-UCMIMX91 evaluation carrier-board exposes one CAN bus interface on connector [[UCM-iMX91: Evaluation Kit: Hardware Guide#Connector_Locations | '''J21''']].&lt;br /&gt;
&lt;br /&gt;
* Configure both CAN interface bit-rate to 1 Mbit/sec:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ip link set can0 up type can bitrate 1000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* On one system, dump all received data frames as well as error frames:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
candump any,0:0,#FFFFFFFF&lt;br /&gt;
&lt;br /&gt;
  can0  111   [8]  11 22 33 44 55 66 77 88&lt;br /&gt;
  can0  11111111   [8]  11 22 33 44 55 66 77 88&lt;br /&gt;
...&lt;br /&gt;
  can0  03FF0983   [8]  D7 61 FF 03 C1 F7 C1 34&lt;br /&gt;
  can0  19C34D32   [8]  F7 5A C2 73 AD 0E 3F 0B&lt;br /&gt;
  can0  0675E391   [4]  2B 2D D3 49&lt;br /&gt;
  can0  13091C55   [8]  99 32 EC 77 27 81 49 0B&lt;br /&gt;
  can0  098D67CF   [8]  22 50 AB 48 AD 7F F4 26&lt;br /&gt;
  can0  05263FEC   [5]  1B 4C 02 45 6E&lt;br /&gt;
  can0  12B30E20   [0] &lt;br /&gt;
  can0  1F191DF9   [1]  C5&lt;br /&gt;
  can0  1EB0B18F   [8]  3E 3F DA 57 C2 FE 73 58&lt;br /&gt;
  can0  1E5C64D9   [5]  6F 0D B3 63 6A&lt;br /&gt;
  can0  1E1DE3F9   [8]  96 48 AC 79 4E 00 27 71&lt;br /&gt;
  can0  0E1A11B7   [8]  75 81 70 7C 86 79 A7 77&lt;br /&gt;
  can0  05F8FD8B   [7]  33 F9 9B 1E 77 3D 1F&lt;br /&gt;
  can0  1E155FCD   [8]  E6 BA F8 58 ED 6D C8 10&lt;br /&gt;
  can0  1D91DF9E   [8]  5D 29 82 7B 97 1D AB 5C&lt;br /&gt;
  can0  11FB3CDA   [3]  14 65 C3&lt;br /&gt;
  can0  091352C0   [2]  2C ED&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On second system:&lt;br /&gt;
* Send standard CAN frame:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cansend can0 111#1122334455667788&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Send extended CAN frame:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cansend can0 11111111#1122334455667788&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CAN frames (extended mode) generator, random payload, interval between two successive flames 50 msec:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cangen -g 50 -e -D r -v can0&lt;br /&gt;
&lt;br /&gt;
can: raw protocol (rev 20170425)&lt;br /&gt;
...&lt;br /&gt;
  can0  03FF0983#D7.61.FF.03.C1.F7.C1.34&lt;br /&gt;
  can0  19C34D32#F7.5A.C2.73.AD.0E.3F.0B&lt;br /&gt;
  can0  0675E391#2B.2D.D3.49&lt;br /&gt;
  can0  13091C55#99.32.EC.77.27.81.49.0B&lt;br /&gt;
  can0  098D67CF#22.50.AB.48.AD.7F.F4.26&lt;br /&gt;
  can0  05263FEC#1B.4C.02.45.6E&lt;br /&gt;
  can0  12B30E20#&lt;br /&gt;
  can0  1F191DF9#C5&lt;br /&gt;
  can0  1EB0B18F#3E.3F.DA.57.C2.FE.73.58&lt;br /&gt;
  can0  1E5C64D9#6F.0D.B3.63.6A&lt;br /&gt;
  can0  1E1DE3F9#96.48.AC.79.4E.00.27.71&lt;br /&gt;
  can0  0E1A11B7#75.81.70.7C.86.79.A7.77&lt;br /&gt;
  can0  05F8FD8B#33.F9.9B.1E.77.3D.1F&lt;br /&gt;
  can0  1E155FCD#E6.BA.F8.58.ED.6D.C8.10&lt;br /&gt;
  can0  1D91DF9E#5D.29.82.7B.97.1D.AB.5C&lt;br /&gt;
  can0  11FB3CDA#14.65.C3&lt;br /&gt;
  can0  091352C0#2C.ED&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Bluetooth =&lt;br /&gt;
UCM-iMX91 features Bluetooth connectivity implemented with an NXP 88W8997 module.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|Before working with Bluetooth, please ensure that Bluetooth antenna is connected to the SOM.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To start '''bluetoothctl''' use the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bluetoothctl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To start the scan process use the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[bluetooth]# default-agent&lt;br /&gt;
[bluetooth]# power on&lt;br /&gt;
[bluetooth]# scan on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bluetooth device should be turned on and visible. Its MAC-adress and name should appear in '''bluetoothctl''' in following format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[CHG] Device AA:BB:CC:DD:EE:FF Name: Device_Name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To pair with the Bluetooth device use the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pair AA:BB:CC:DD:EE:FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where '''AA:BB:CC:DD:EE:FF''' is MAC-adress of the Bluetooth device.&lt;br /&gt;
&lt;br /&gt;
To quit '''bluetoothctl''' use the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[Device_Name]# quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Cellular Modem=&lt;br /&gt;
UCM-IMX91 Yocto includes support for Quectel EC25 mini-PCIe cellular modem that can be installed into the evaluation kit.&lt;br /&gt;
&lt;br /&gt;
* Install the modem module into the mini-PCIe socket [[UCM-iMX91: Evaluation Kit: Hardware Guide#Connector_Locations | '''P18''']]&lt;br /&gt;
* Close jumper [[UCM-iMX91: Evaluation Kit: Hardware Guide#Connector_Locations | '''E11''']]&lt;br /&gt;
* Connect a cellular antenna to the main antenna connector on the modem&lt;br /&gt;
* Install an active SIM card into SIM socket [[UCM-iMX91: Evaluation Kit: Hardware Guide#Connector_Locations | '''P20''']]&lt;br /&gt;
* Boot to linux&lt;br /&gt;
&lt;br /&gt;
Run the following command to verify that the modem is detected correctly:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@ucm-imx91:~# lsusb                                                                                                                                                                                            &lt;br /&gt;
Bus 001 Device 002: ID 2c7c:0125 Quectel Wireless Solutions Co., Ltd. EC25 LTE modem                                                                                                                               &lt;br /&gt;
&lt;br /&gt;
root@ucm-imx91:~# mmcli -L                                                                                                                                                                                         &lt;br /&gt;
    /org/freedesktop/ModemManager1/Modem/0 [QUALCOMM INCORPORATED] QUECTEL Mobile Broadband Module                                                                                                                 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Obtain &amp;lt;apn&amp;gt; of your sim card company ,e.g. rl.internet&lt;br /&gt;
&lt;br /&gt;
Establish connection:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@ucm-imx91:~# nmcli connection add type gsm ifname '*' con-name CellularCon apn &amp;lt;apn&amp;gt;&lt;br /&gt;
root@ucm-imx91:~# nmcli connection&lt;br /&gt;
NAME                UUID                                  TYPE      DEVICE   &lt;br /&gt;
CellularCon         a1620622-8588-4349-b3fc-66be79fbbede  gsm       cdc-wdm0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Allow up to a minute to connect to wireless network and make sure modem state is connected:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@ucm-imx91:~#mmcli -m 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To test the wireless interface run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@ucm-imx91:~#ping -c 5 dns.google -I wwan0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=UART=&lt;br /&gt;
The following table outlines default UART routing when UCM-iMX91 is used with the SB-UCMIMX91 carrier-board:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:left;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''UCM-iMX91 port''' &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''Linux device''' &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''on SB-UCMIMX91 carrier-board''' &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |UART1&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |/dev/ttyLP0&lt;br /&gt;
| align=&amp;quot;&amp;quot; |converted to serial-over-USB debug console, micro-USB connector [[UCM-iMX91: Evaluation Kit: Hardware Guide#Connector_Locations | P16]]&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |UART2&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |/dev/ttyLP1&lt;br /&gt;
| align=&amp;quot;&amp;quot; |converted to RS232, DB9 connector [[UCM-iMX91: Evaluation Kit: Hardware Guide#Connector_Locations | P17]]&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |UART5&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |/dev/ttyLP4&lt;br /&gt;
| align=&amp;quot;&amp;quot; |routed to 100-mil header [[UCM-iMX91: Evaluation Kit: Hardware Guide#Connector_Locations | P3]]&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |UART7&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |/dev/ttyLP6&lt;br /&gt;
| align=&amp;quot;&amp;quot; |converted to RS485, terminal block [[UCM-iMX91: Evaluation Kit: Hardware Guide#Connector_Locations | J22]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Example: testing UART5'''&lt;br /&gt;
* Short pin P3-1 (UART5-RX) with P3-3 (UART5-TX) on SB-UCMIMX91 to create a loop-back.&lt;br /&gt;
* Run the following commands:&lt;br /&gt;
 stty -F /dev/ttyLP4 1:0:1cb2:0:3:1c:7f:15:4:5:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0&lt;br /&gt;
 cat /dev/ttyLP4 &amp;amp;&lt;br /&gt;
 echo hello &amp;gt; /dev/ttyLP4&lt;br /&gt;
The &amp;quot;hello&amp;quot; string should appear on the terminal. &lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
For removing UART devices:&lt;br /&gt;
* Open ''arch/arm64/boot/dts/compulab/ucm-imx91.dtsi''&lt;br /&gt;
* Set desired UART device's status to 'disabled' &lt;br /&gt;
* Recompile &lt;br /&gt;
* Deploy the new dtb file&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=I2C=&lt;br /&gt;
The following I2C buses and devices are present when UCM-iMX91 is used with the SB-UCMIMX91 carrier-board:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:left;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''Device''' &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''I2C bus in Linux''' &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''Address''' &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''HW port in UCM-iMX91''' &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;&amp;quot; |UCM-iMX91 EEPROM&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |0&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |0x50&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |I2C1 (internal)&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;&amp;quot; |UCM-iMX91 RTC&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |0&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |0x69&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |I2C1 (internal)&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;&amp;quot; |UCM-iMX91 PMIC&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |1&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |0x25&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |I2C2 (internal)&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;&amp;quot; |GPIO extender on SB-UCMIMX91 for on-board control signals &lt;br /&gt;
| align=&amp;quot;center&amp;quot; |2&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |0x20&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |I2C3&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;&amp;quot; |Camera module control on SB-UCMIMX91 connector P9&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |2&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |0x42&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |I2C3&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;&amp;quot; |SB-UCMIMX91 EEPROM&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |2&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |0x54&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |I2C3&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;&amp;quot; |Touch-screen controller of MIPI-DSI or LVDS panel on SB-UCMIMX91 connector P8 or P12&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |2&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |0x5d&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |I2C3&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
To list all available buses:&lt;br /&gt;
 # ls /dev/i2c-*&lt;br /&gt;
 /dev/i2c-0  /dev/i2c-1  /dev/i2c-2&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
To list all mapped devices:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls /proc/device-tree/soc@0/bus@*/i2c@*/*@* -d -w 1                                                                                                         &lt;br /&gt;
/proc/device-tree/soc@0/bus@42000000/i2c@42530000/goodix@5d&lt;br /&gt;
/proc/device-tree/soc@0/bus@42000000/i2c@42530000/mipi2@42&lt;br /&gt;
/proc/device-tree/soc@0/bus@42000000/i2c@42530000/pca9555@20&lt;br /&gt;
/proc/device-tree/soc@0/bus@44000000/i2c@44340000/rtc@69&lt;br /&gt;
/proc/device-tree/soc@0/bus@44000000/i2c@44350000/pmic@25&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note how:&lt;br /&gt;
* each node is appended with its address.&lt;br /&gt;
* I2C buses order corresponds to the order of their addresses.&lt;br /&gt;
&lt;br /&gt;
e.g. to inspect bus 0, in which we have RTC, run:&lt;br /&gt;
 # i2cdetect -y 0&lt;br /&gt;
      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f&lt;br /&gt;
 00:                         -- -- -- -- -- -- -- -- &lt;br /&gt;
 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
 50: 50 51 52 53 -- -- -- -- -- -- -- -- -- -- -- -- &lt;br /&gt;
 60: -- -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- &lt;br /&gt;
 70: -- -- -- -- -- -- -- --                         &lt;br /&gt;
In the above output numbers mark unused devices, UU marks a device that is used by a driver.&lt;br /&gt;
&lt;br /&gt;
Indeed we see RTC in use at offset 0x69.&lt;br /&gt;
&lt;br /&gt;
An example how to dump EEPROM contents:&lt;br /&gt;
 hexdump -C /sys/devices/platform/soc@0/44000000.bus/44340000.i2c/i2c-0/0-0050/eeprom&lt;br /&gt;
&lt;br /&gt;
=SPI=&lt;br /&gt;
&lt;br /&gt;
Loopback example:&lt;br /&gt;
&lt;br /&gt;
In order to enable SPI device, it needs to be added to the device tree in the following manner:&lt;br /&gt;
&lt;br /&gt;
Set up the kernel source repository by following the instructions in this guide: https://github.com/compulab-yokneam/meta-bsp-imx9/blob/mickledore-6.1.55-2.0/Documentation/linux_kernel_build.md&lt;br /&gt;
&lt;br /&gt;
However, stop before the final command that builds the kernel.&lt;br /&gt;
&lt;br /&gt;
Instead of building the full kernel, run:&lt;br /&gt;
&lt;br /&gt;
 make dtbs&lt;br /&gt;
&lt;br /&gt;
Locate the compiled device tree:&lt;br /&gt;
&lt;br /&gt;
arch/arm64/boot/dts/compulab/ucm-imx91-lpspi.dtb&lt;br /&gt;
&lt;br /&gt;
On the UCM-IMX91, identify your boot partition by running:&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
&lt;br /&gt;
Then, copy the .dtb file to that partition.&lt;br /&gt;
&lt;br /&gt;
Restart your device and interrupt the boot process to access U-Boot. Then run:&lt;br /&gt;
&lt;br /&gt;
 setenv fdtfile ucm-imx91-lpspi.dtb; boot&lt;br /&gt;
&lt;br /&gt;
SPI signals location:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ECSPI3_MOSI - P3.14&lt;br /&gt;
ECSPI3_SCLK - P3.16&lt;br /&gt;
ECSPI3_MISO/UART7_RX - U25 pin 1 (beside RS485)&lt;br /&gt;
ECSPI3_SSO/UART7_TX - U25 pin 4 (beside RS485)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use jumper cable to connect MOSI and MISO.&lt;br /&gt;
&lt;br /&gt;
On the module, run:&lt;br /&gt;
 spidev_test -v -D /dev/spidev0.0 -p &amp;quot;hello&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You should see RX same as TX.&lt;br /&gt;
&lt;br /&gt;
=GPIO=&lt;br /&gt;
The following table outlines default GPIO assignments when UCM-iMX91 is used with the SB-UCMIMX91 carrier-board:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:left;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''Signal Name&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''Pin on SB-UCMIMX91''' &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |GPIO_IO04&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |P3-20&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |GPIO_IO05&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |P3-18&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |GPIO_IO07&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |P3-6&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |GPIO_IO14&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |P5-4&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |GPIO_IO15&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |P5-2&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |GPIO_IO16&lt;br /&gt;
| align=&amp;quot;center&amp;quot; |P3-4&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Other signals that are reserved for peripheral controls can be reassigned to GPIOs in&lt;br /&gt;
 arch/arm64/boot/dts/compulab/ucm-imx91-pinctrl.dtsi&lt;br /&gt;
&lt;br /&gt;
== Example: controlling pin GPIO_IO16==&lt;br /&gt;
=== Checking the pin info===&lt;br /&gt;
 gpioinfo -c 0&lt;br /&gt;
This lists all GPIO lines in `gpiochip0`, including GPIO_IO16 (line offset 16).&lt;br /&gt;
&lt;br /&gt;
=== Writing to a pin===&lt;br /&gt;
Set to high:&lt;br /&gt;
 gpioset -c 0 --toggle 0 16=1&lt;br /&gt;
Set to low:&lt;br /&gt;
 gpioset -c 0 --toggle 0 16=0&lt;br /&gt;
&lt;br /&gt;
=== Reading the logical level from a pin===&lt;br /&gt;
 gpioget -c 0 16&lt;br /&gt;
&lt;br /&gt;
=ADC=&lt;br /&gt;
i.MX91 SoC features integrated 12 bit analog to digital converter.&amp;lt;br&amp;gt; &lt;br /&gt;
To use the ADC, enable it in device tree e.g. in arch/arm64/boot/dts/compulab/sbc-mcm-imx91.dts:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;adc1 {&lt;br /&gt;
       vref-supply = &amp;lt;&amp;amp;reg_vref_1v8&amp;gt;;&lt;br /&gt;
       status = &amp;quot;okay&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Sysfs device controls will appear in:&lt;br /&gt;
 cd /sys/bus/iio/devices/iio\:device0/&lt;br /&gt;
SB-UCMIMX91 exposes ADC signals on 100-mil header '''P3'''.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| '''Signal Name || '''pin on P3''' || '''sysfs file''' &lt;br /&gt;
|-&lt;br /&gt;
|ADC_IN0&lt;br /&gt;
|9&lt;br /&gt;
|in_voltage0_raw&lt;br /&gt;
|-&lt;br /&gt;
|ADC_IN1&lt;br /&gt;
|11&lt;br /&gt;
|in_voltage1_raw&lt;br /&gt;
|-&lt;br /&gt;
|ADC_IN2&lt;br /&gt;
|13&lt;br /&gt;
|in_voltage2_raw&lt;br /&gt;
|-&lt;br /&gt;
|ADC_IN3&lt;br /&gt;
|15&lt;br /&gt;
|in_voltage3_raw&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
For example, to read voltage from P3-9 run:&lt;br /&gt;
 cat /sys/bus/iio/devices/iio\:device0/in_voltage0_raw&lt;br /&gt;
Expected output is a value in range 0 - 4095 which spans over the voltage range 0 - 1.8V&lt;br /&gt;
=Suspend / Resume=&lt;br /&gt;
{{note|The operation below requires '''root''' access.}}&lt;br /&gt;
*Suspend mode allows minimizing the power consumption.&lt;br /&gt;
*To enter suspend mode run:&lt;br /&gt;
 echo mem &amp;gt;/sys/power/state&lt;br /&gt;
*To resume normal operation press shortly the power button [[UCM-iMX91: Evaluation Kit: Hardware Guide#Connector_Locations | '''SW5''']].&lt;br /&gt;
*To enter suspend mode with RTC as wakeup source that wakes after 5 seconds run:&lt;br /&gt;
 rtcwake -s 5 -m mem -d /dev/rtc0&lt;br /&gt;
*WiFi device currently doesn't support suspension. see [[UCM-iMX91:_Yocto_Linux:_Known_Issues]]&lt;br /&gt;
&lt;br /&gt;
=CPU temperature=&lt;br /&gt;
i.MX91 SoC features an internal temperature sensor which allows to measure the SoC temperature.&lt;br /&gt;
Execute the following command to read the current CPU temperature:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat /sys/class/thermal/thermal_zone0/temp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= RTC =&lt;br /&gt;
UCM-iMX91 features two RTC devices:&lt;br /&gt;
* i.MX91 internal RTC ('''rtc0''') - can be used as wake-up source&lt;br /&gt;
* AB1805 external RTC ('''rtc1''') - can be used for low current battery powered time keeping&lt;br /&gt;
&lt;br /&gt;
== Internal RTC - rtc0 ==&lt;br /&gt;
System information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
udevadm info -p /sys/class/rtc/rtc0&lt;br /&gt;
&lt;br /&gt;
P: /devices/platform/soc@0/44000000.bus/44440000.bbnsm/44440000.bbnsm:rtc/rtc/rtc0&lt;br /&gt;
N: rtc0&lt;br /&gt;
L: -100&lt;br /&gt;
S: rtc&lt;br /&gt;
E: DEVPATH=/devices/platform/soc@0/44000000.bus/44440000.bbnsm/44440000.bbnsm:rtc/rtc/rtc0&lt;br /&gt;
E: DEVNAME=/dev/rtc0&lt;br /&gt;
E: MAJOR=251&lt;br /&gt;
E: MINOR=0&lt;br /&gt;
E: SUBSYSTEM=rtc&lt;br /&gt;
E: USEC_INITIALIZED=14959708&lt;br /&gt;
E: DEVLINKS=/dev/rtc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wake up:&amp;lt;/br&amp;gt;&lt;br /&gt;
rtc0 can be used as a wake up source, as a result an '''rtcwakeup''' can be used with this device:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rtcwake --device /dev/rtc0 -s 5 -m mem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External RTC - rtc1 ==&lt;br /&gt;
System information:&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
udevadm info -p /sys/class/rtc/rtc1&lt;br /&gt;
&lt;br /&gt;
N: rtc1&lt;br /&gt;
L: 0&lt;br /&gt;
E: DEVPATH=/devices/platform/soc@0/44000000.bus/44340000.i2c/i2c-0/0-0069/rtc/rtc1&lt;br /&gt;
E: DEVNAME=/dev/rtc1&lt;br /&gt;
E: MAJOR=251&lt;br /&gt;
E: MINOR=1&lt;br /&gt;
E: SUBSYSTEM=rtc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the date and write it into the RTC:&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
date -s &amp;quot;16 Jun 2023 12:00:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Fri 16 Jun 2023 12:00:00&lt;br /&gt;
hwclock --systohc --rtc /dev/rtc1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the RTC time and date:&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hwclock --show --rtc /dev/rtc1&lt;br /&gt;
&lt;br /&gt;
2023-06-16 12:01:37.915876+00:00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Device Serial Number=&lt;br /&gt;
Product information is stored in on-board EEPROM.&amp;lt;br&amp;gt;&lt;br /&gt;
* To read the product serial number run:&lt;br /&gt;
 cat /proc/device-tree/product-sn &amp;amp;&amp;amp; echo&lt;br /&gt;
* To read the product configuration part number run:&lt;br /&gt;
 cat /proc/device-tree/product-options &amp;amp;&amp;amp; echo&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* [[UCM-iMX91L: Evaluation Kit: Getting Started|Eval-kit Quick Start Guide]]&lt;br /&gt;
* [[UCM-iMX91: Evaluation Kit: Hardware Guide|Eval-Kit Hardware Guide]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Yocto]]&lt;br /&gt;
[[Category:UCM-iMX91L]]&lt;/div&gt;</summary>
		<author><name>Igor</name></author>
		
	</entry>
</feed>