This article details how physical devices are mapped to handled by the Linux device files kernel in the context of the [[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)|XUELK kit]]. == History == {| class="wikitable" border="1"!Version!Date![[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)|XUELK version]]!Notes|-|{{oldid|6648|1.0.0}}|December 2016|1.0.0|First public release|-|1.2.0|May 2017|1.2.0|Update for new XUELK release|-|2.0.0|September 2017|2.0.0|Validated on latest XUELK release|-|}
==Console UART==
{| class="wikitable"
|}
==Multi-protocol UARTs==
{{ImportantMessage|text=From [[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)|XUELK]] version 1.2.0 UART are automatically initialized at boot time, depending on [[ConfigID (XUELK)|ConfigID]]. For XUELK release 1.1.3 and below, in order to use UART8 as RS232 interface, some GPIOs need to be configured as follows explained {{oldid|6648|into release 1.0.0 of this page}} }}
Please note that '''this UART is not available if WiFi/Bluetooth module is populated'''.
|-
|}
==CAN==
Please note that '''the CAN interface is optionally available on J21 or J40 connectors''' with a custom Order code.
{| class="wikitable"
|-
! Processor's resource !! Connector !! Type !! Linux device file !! Notes
|-
| FLEXCAN1 || J21 or J40 || PHY translated (on-board)|| <code>can0</code> || Alternative mount of MPUART1 (not available)
|-
|}
==Ethernet==
Ethernet port is associated to <code>eth0</code> interface. It can be managed with standard Linux commands. See for example http://www.tecmint.com/ifconfig-command-examples/.
{| class="wikitable"
|-
! Processor's resource !! Connector .pin# !! Type !! Linux virtual resource !! Notes
|-
| MX6UL_PAD_UART5_RX_DATA__GPIO1_IO31 || J53 .6 || LVTTL GPIO || GPIO #31 || see following examples
|-
| MX6UL_PAD_UART5_TX_DATA__GPIO1_IO30 || J53 .5 || LVTTL GPIO || GPIO #30 || see following examples
|-
| MX6UL_PAD_LCD_DATA19__GPIO3_IO24 || J53 .7 || LVTTL GPIO || GPIO #24 || see following examples
|-
| MX6UL_PAD_LCD_DATA22__GPIO3_IO27 || J53 .8 || LVTTL GPIO || GPIO #27 || see following examples
|-
| MX6UL_PAD_LCD_DATA23__GPIO3_IO28 || J53 .9 || LVTTL GPIO || GPIO #28 || see following examples
|-
|}
==WiFi/Bluetooth==
Please refer to [[XUELK-AN-001:_Using_WiFi-Bluetooth_combo_plugin_with_SBC_Lynx|this page]].
==USB OTG==
==USB host==
==NOR and NAND flash==
NOR and NAND flashes are managed as [[Memory_Tecnology_Device_(MTD) |MTD devices]].
Generally speaking, their partitioning is defined via Linux kernel command line. For instance this command line
mtd14: 01400000 00010000 "spi-free"
</pre>
==ADCs==
The following processor's signals are available on J54 mezzanine connector and can be configured as 12-bit ADC inputs:
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] No Caching mode page found
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 0:0:0:0: [sda] No Caching mode page found
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI removable disk
FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
</pre>
To connect it to micro B connector (J55), a cable like the one shown in the following picture has been used [1].
[[File:Usb-cable-micro-host.jpg|thumb|center|USB cable used to connect memory stick]]
Once mounted (at <code>/run/media/sda1</code> in the example), the memory stick can be accessed by regular commands:
<pre>
root@sbc-lynx:~# mount
rootfs on / type rootfs (rw)
192.168.0.13:/opt/nfsroot/lynx/xuelk on / type nfs (rw,relatime,vers=3,rsize=4096,wsize=4096,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.0.13,mountvers=3,mountproto=tcp,local_lock=all,addr=192.168.0.13)
devtmpfs on /dev type devtmpfs (rw,relatime,size=89856k,nr_inodes=22464,mode=755)
proc on /proc type proc (rw,relatime)
tmpfs on /mnt/.psplash type tmpfs (rw,relatime,size=40k)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /var/volatile type tmpfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
/dev/sda1 on /run/media/sda1 type vfat (rw,relatime,gid=6,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
root@sbc-lynx:~# cp test.bin /run/media/sda1/
root@sbc-lynx:~# umount /run/media/sda1
root@sbc-lynx:~# mount /dev/sda1 /run/media/sda1/
FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.