Embedded Module TQMLS1012AL - Yocto Linux BSP documentation

Buttons

There are two GPIO buttons on the MBL1012AL. They are bound to the gpio-keys driver, and can be tested with the evtest tool.

GPIO Button Overview

Reference Button
X15 Button 1
X16 Button 2

GPIO Button Location

The buttons are available in the sysfs via the device /dev/input/event0 and can be tested with the evtest tool.

evtest /dev/input/event0

Ethernet

The STKLS1012AL provides one 4 Port TSN Gbit Ethernet Switch and one 1 Gigabit Ethernet Interface.

Configure the ethernet switch in bridge mode

The TSN switch of the STKLS1028A is not configured by default. The master interface eth1 is enabled by default, so it is not necessary to bring it up manually.

Single port configuration

Every single switch port acts as a configurable Ethernet port

# Configure each single switch interface and bring it up.
 
$ ip addr add 192.168.1.2 dev swp0 && ip link set swp0 up
$ ip addr add 192.168.1.3 dev swp1 && ip link set swp1 up
$ ip addr add 192.168.1.4 dev swp2 && ip link set swp2 up
$ ip addr add 192.168.1.5 dev swp3 && ip link set swp3 up
Bridge configuration

Every switch port is part of one configurable Ethernet bridge.

# Create a bridge device in this example it is called switch
 
$ ip link add name switch type bridge
 
# Bring up the bridge device 
 
$ ip link set switch up
 
# Add the interfaces to the bridge device switch and bring them up.
 
$ ip link set swp0 master switch && ip link set swp0 up
$ ip link set swp1 master switch && ip link set swp1 up
$ ip link set swp2 master switch && ip link set swp2 up
$ ip link set swp3 master switch && ip link set swp3 up
 
# Configure bridge device
 
$ ip addr add 192.168.1.2 dev switch 

U-Boot

In U-Boot pfe_eth0 is configured as default interface. The IP configuration can be done statically or by a DHCP server in the network.

IP configuration via DHCP

For a configuration via a DHCP server, use the dhcp command in U-Boot.

Static IP configuration For a static IP configuration the following, U-Boot environment variables must be set:

setenv ipaddr <ipaddr> 
(e.g.: setenv ipaddr 192.168.100.111)
setenv netmask <netmask> 
(e.g.: setenv netmask 255.255.255.0)

Linux

The Ethernet interface eth0 is activated in Linux.

For a temporary static configuration the ip command can be used, below some useful ip commands are listed:

Activate a specific interface
e.g. eth0

ip link set eth0 up


Disable a specific interace
e.g. eth0

ip link set eth0 down


Show ip address for a specific interface
e.g. eth0

ip addr show eth0


Show statistic for a specific interface
e.g. eth0

 
ip -s link show eth0


Set ip address for a specific interface
e.g. eth0

ip addr add 192.168.1.100/24 dev eth0


Show statistic of all interfaces

ip -s link


Set default gateway for a specific interfaces
e.g. set gateway ip 192.168.1.1 for eth0

ip route add default via 192.168.1.1 dev eth0

If a DHCP server is available in the network environment the ip configuration can be received from it. To do so execute the udhcpc command, by default eth0 is used.
To configure another interface via dhcp the parameter -i followed by the interface name e.g. eth1 must be given.
e.g. eth1

udhcpc -i eth1

I2C

An overview of the onboard i2c devices is available here

U-Boot

Select i2c bus device

i2c dev 0

Show all devices connected to the i2c bus currently selected:

i2c probe

Linux

Detect all devices connected to a i2c bus:

i2cdetect 0

RTC

To set the hardware clock to the actual time and date use the following commands:

date -s [YYYY.]MM.DD-hh:mm[:ss]
hwclock -w

Temperature Sensors

The STKLS1012AL has two temperature sensors, one is located on the TQMLS1012AL SOM and the other is locates on the MBLS1012AL baseboard.

Device I²C Address
TQMLS1012AL 0x19
MBLS1012AL 0x48

Read TQMLS1012AL Temperature Sensor

cat /sys/devices/platform/soc/2180000.i2c/i2c-0/0-0019/hwmon/hwmon0/temp1_input

Read MBLS1012AL Temperature Sensor

cat /sys/devices/platform/soc/2180000.i2c/i2c-0/0-0048/hwmon/hwmon1/temp1_input

Read CPU internal Temperature Sensor
The QorIQ® LS1012A CPU has an internal TMU that supports one thermal zone, it can be read by the command below:

Thermal zone0

cat /sys/devices/virtual/thermal/thermal_zone0/hwmon2/temp1_input

USB

With lsusb you can see all connected usb devices. To mount a partition of an usb stick you can excute mount /dev/<partition> <mount dir> (e.g. mount /dev/sdb1 /mnt). This will mount the first partition of sdb to /mnt. To unmount the device execute umount <mount dir> (e.g. umount /mnt).

User LED

The MBLS1012AL has two user controllable LEDs, the behavior of these LEDs can be selected by several triggers.

User LED Overview

Reference LED name color linux filesystem
V15 V15 green /sys/class/leds/V15
V16 V16 green /sys/class/leds/V16

User LED Location

The user LED's are located in /sys/devices/platform/leds/leds/.
To change the behaviour a specific LED, the value in the file trigger must be overwritten.

The following values are valid:

For example set the trigger of V15 to heartbeat

echo heartbeat > /sys/class/leds/V15/trigger

  • Last modified: 2022/08/04 15:02