Difference between revisions of "Physical devices mapping (XUELK)"

From DAVE Developer's Wiki
Jump to: navigation, search
(Multi-protocol UARTs)
Line 3: Line 3:
 
{{InfoBoxBottom}}
 
{{InfoBoxBottom}}
 
This article details how physical devices are mapped to Linux device files in the context of the [[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)|XUELK kit]].
 
This article details how physical devices are mapped to Linux device files in the context of the [[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)|XUELK kit]].
===Console UART===
+
==Console UART==
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 11: Line 11:
 
|-
 
|-
 
|}
 
|}
===Multi-protocol UARTs===
+
==Multi-protocol UARTs==
====Ordering code: XUBxx0xxx0x====
+
===Ordering code: XUBxx0xxx0x===
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 22: Line 22:
 
|-
 
|-
 
|}
 
|}
====Ordering code: XUBxx0xxx1x====
+
===Ordering code: XUBxx0xxx1x===
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 32: Line 32:
 
|-
 
|-
 
|}
 
|}
 +
==UART2 on mezzanine connector J53==
 +
Please note that '''this UART is not available if WiFi/Bluetooth module is populated'''.
 +
{| class="wikitable"
 +
|-
 +
! Processor's resource !! Connector !! Type !! Linux device file !! Notes
 +
|-
 +
| UART2 || J53 || 4-wire LVTTL || <code>/dev/ttymxc1</code> ||
 +
|-
 +
|}
 +
==GPIOs on mezzanine connector J53==
 +
{| class="wikitable"
 +
|-
 +
! Processor's resource !! Connector !! Type !! Linux device file !! Notes
 +
|-
 +
| MX6UL_PAD_UART5_RX_DATA__GPIO1_IO31 || J53 || LVTTL GPIO || GPIO #31 || see following examples
 +
|-
 +
| MX6UL_PAD_UART5_TX_DATA__GPIO1_IO30 || J53 || LVTTL GPIO || GPIO #30 || see following examples
 +
|-
 +
| MX6UL_PAD_LCD_DATA19__GPIO3_IO24 || J53 || LVTTL GPIO || GPIO #24 || see following examples
 +
|-
 +
| MX6UL_PAD_LCD_DATA22__GPIO3_IO27 || J53 || LVTTL GPIO || GPIO #27 || see following examples
 +
|-
 +
| MX6UL_PAD_LCD_DATA23__GPIO3_IO28 || J53 || LVTTL GPIO || GPIO #28 || see following examples
 +
|-
 +
|}
 +
The following commands can be issued from command line in order to configure GPIO #30 as output:
 +
<pre>
 +
echo 30 > /sys/class/gpio/export
 +
echo out > /sys/class/gpio/gpio30/direction
 +
</pre>
 +
To set the GPIO #30 to 0 logical value:
 +
<pre>
 +
echo 0 > /sys/class/gpio/gpio30/value
 +
</pre>
 +
To set the GPIO #30 to 1 logical value:
 +
<pre>
 +
echo 1 > /sys/class/gpio/gpio30/value
 +
</pre>
 +
 +
The following commands can be issued from command line in order to configure GPIO #30 as input:
 +
<pre>
 +
echo 30 > /sys/class/gpio/export
 +
echo in > /sys/class/gpio/gpio30/direction
 +
</pre>
 +
To read the GPIO value:
 +
<pre>
 +
cat /sys/class/gpio/gpio$i/value
 +
</pre>
 +
==WiFi/Bluetooth==
 +
Please refer to [[XUELK-AN-001:_Using_WiFi-Bluetooth_combo_plugin_with_SBC_Lynx|this page]].

Revision as of 15:27, 4 October 2016

Info Box
SBC Lynx-top.png Applies to SBC Lynx

This article details how physical devices are mapped to Linux device files in the context of the XUELK kit.

Console UART[edit | edit source]

Physical device Processor's resource Connector Type Linux device file Notes
Boot Console UART1 J42 2-wire LVTTL UART /dev/ttymxc0

Multi-protocol UARTs[edit | edit source]

Ordering code: XUBxx0xxx0x[edit | edit source]

Physical device Processor's resource Connector Type Linux device file Notes
MPUART0 UART7 J34 2-wire RS232 /dev/ttymxc6
MPUART1 UART3 J21 RS485 /dev/ttymxc2

Ordering code: XUBxx0xxx1x[edit | edit source]

Physical device Processor's resource Connector Type Linux device file Notes
MPUART0 UART8 J34 2-wire RS232 /dev/ttymxc7
MPUART1 UART3 J21 RS485 /dev/ttymxc2

UART2 on mezzanine connector J53[edit | edit source]

Please note that this UART is not available if WiFi/Bluetooth module is populated.

Processor's resource Connector Type Linux device file Notes
UART2 J53 4-wire LVTTL /dev/ttymxc1

GPIOs on mezzanine connector J53[edit | edit source]

Processor's resource Connector Type Linux device file Notes
MX6UL_PAD_UART5_RX_DATA__GPIO1_IO31 J53 LVTTL GPIO GPIO #31 see following examples
MX6UL_PAD_UART5_TX_DATA__GPIO1_IO30 J53 LVTTL GPIO GPIO #30 see following examples
MX6UL_PAD_LCD_DATA19__GPIO3_IO24 J53 LVTTL GPIO GPIO #24 see following examples
MX6UL_PAD_LCD_DATA22__GPIO3_IO27 J53 LVTTL GPIO GPIO #27 see following examples
MX6UL_PAD_LCD_DATA23__GPIO3_IO28 J53 LVTTL GPIO GPIO #28 see following examples

The following commands can be issued from command line in order to configure GPIO #30 as output:

echo 30 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio30/direction

To set the GPIO #30 to 0 logical value:

echo 0 > /sys/class/gpio/gpio30/value

To set the GPIO #30 to 1 logical value:

echo 1 > /sys/class/gpio/gpio30/value

The following commands can be issued from command line in order to configure GPIO #30 as input:

echo 30 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio30/direction

To read the GPIO value:

cat /sys/class/gpio/gpio$i/value

WiFi/Bluetooth[edit | edit source]

Please refer to this page.