Wiki Home » imx6 openrex » testing

testing

Last modified by Administrator on 2018/01/28 17:40

Prerequisites

Device

  • DC power supply (5V 4A)
  • imx6 OpenRex SBC

Peripherals

  • 1x FullHD monitor
  • 1x MicroSD card
  • 1x MiniPCIe WiFi card
  • 1x MiniPCIe 3G card
  • 1x RPi camera module
  • 1x SATA HDD drive
  • 2x USB FLASH drive
  • 1x IR remote

Cables

  • Ethernet cable
  • HDMI cable
  • Micro Usb cable
  • UART cable
  • Headphones

AUDIO (basic/max/ultra)

Input:  Search kernel log for sgtl5000 chip.
Output: sgtl5000 chip is detected and bind as input device.

[email protected]:~# dmesg | grep -i sgtl5000
sgtl5000 1-000a: sgtl5000 revision 0x11
sgtl5000 1-000a: Using internal LDO instead of VDDD
imx-sgtl5000 sound-sgtl5000: sgtl5000 <-> 2028000.ssi mapping ok
 #0: imx-audio-sgtl5000

Input:  Run alsamixer command.
Output: Card imx-audio-sgtl5000 is available.

[email protected]:~# alsamixer
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqq AlsaMixer v1.0.29 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x Card: imx-audio-sgtl5000                             F1:  Help               x
x Chip:                                                F2:  System information x
x View: F3:[Playback] F4: Capture  F5: All             F6:  Select sound card  x
x Item: Headphone [dB gain: -19.00, -20.00]            Esc: Exit               x
x                                                                              x
x     lqqk                       lqqk     lqqk                                 x
x     x  x                       x  x     x  x                                 x
x     x  x                       x  x     x  x                                 x
x     x  x                       x  x     x  x                                 x
x     x  x                       xaax     x  x                                 x
x     x  x                       xaax     x  x                                 x
x     x  x                       xaax     x  x                                 x
x     x  x                       xaax     x  x                                 x
x     x  x                       xaax     x  x                                 x
x     xa x                       xaax     x  x                                 x
x     xaax                       xaax     x  x                                 x
x     xaax                       xaax     x  x                                 x
x     mqqj     DAC      lqqk     mqqj     mqqj     lqqk    MIC_IN    lqqk      x
x                       xOOx                       xMMx              xOOx      x
x                       mqqj                       mqqj              mqqj      x
x    24<>23                     75<>75     0                                   x
x  <Headphon>Headphon Headphon   PCM      Mic    Capture  Capture  Capture     x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

Input:  Boot-up module with hdmi cable plugged in.
Input:  Plug headphones into HP_OUT connector.
Input:  Plug-in usb flash with mp3 files and play some files in audio player.
Output: Sound can be heard.

[email protected]:~# aplay multimedia/sample.wav
Playing WAVE 'multimedia/sample.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
[email protected]:~# #aplay -D sysdefault:CARD=imxaudiosgtl500 multimedia/sample.wav
[email protected]:~# aplay -D sysdefault:CARD=sgtl5000audio multimedia/sample.wav
Playing WAVE 'multimedia/sample.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
[email protected]:~# aplay -D sysdefault:CARD=imxhdmisoc multimedia/sample.wav
Playing WAVE 'multimedia/sample.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

Input:  Plug headpohnes with mic into HP_OUT connector.
Output: Mic sound is played by heaphones.

[email protected]:~# #arecord -D sysdefault:CARD=imxaudiosgtl500 -t wav -f cd | aplay -D sysdefault:CARD=imxaudiosgtl500
[email protected]:~# arecord -D sysdefault:CARD=sgtl5000audio -t wav -f cd | aplay -D sysdefault:CARD=sgtl5000audio

Input:  Plug headpohnes with mic into HP_OUT connector.
Output: Sound can be recorded.

[email protected]:~# #arecord -D sysdefault:CARD=imxaudiosgtl500 -t wav -f cd -d 10 multimedia/recorded.wav
[email protected]:~# arecord -D sysdefault:CARD=sgtl5000audio -t wav -f cd -d 10 multimedia/recorded.wav
Recording WAVE 'multimedia/recorded.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
[email protected]:~# #aplay -D sysdefault:CARD=imxaudiosgtl500 multimedia/recorded.wav
[email protected]:~# aplay -D sysdefault:CARD=sgtl5000audio multimedia/recorded.wav
Playing WAVE 'multimedia/recorded.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

BUTTON

USER (basic/max/ultra)

Input:  Press the Home/Back-/Menu+ buttons.
Output: Button events 1 and 0 are generated.

[email protected]:~# evtest /dev/input/by-path/platform-gpio-keys*-event
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "gpio-keys"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 102 (KEY_HOME)
    Event code 139 (KEY_MENU)
    Event code 158 (KEY_BACK)
Properties:
Testing ... (interrupt to exit)
Event: time 1473952105.010541, type 1 (EV_KEY), code 102 (KEY_HOME), value 1
Event: time 1473952105.010541, -------------- SYN_REPORT ------------
Event: time 1473952105.140569, type 1 (EV_KEY), code 102 (KEY_HOME), value 0
Event: time 1473952105.140569, -------------- SYN_REPORT ------------
Event: time 1473952106.320588, type 1 (EV_KEY), code 158 (KEY_BACK), value 1
Event: time 1473952106.320588, -------------- SYN_REPORT ------------
Event: time 1473952106.440540, type 1 (EV_KEY), code 158 (KEY_BACK), value 0
Event: time 1473952106.440540, -------------- SYN_REPORT ------------
Event: time 1473952109.630544, type 1 (EV_KEY), code 139 (KEY_MENU), value 1
Event: time 1473952109.630544, -------------- SYN_REPORT ------------
Event: time 1473952109.760589, type 1 (EV_KEY), code 139 (KEY_MENU), value 0
Event: time 1473952109.760589, -------------- SYN_REPORT ------------

RESET (basic/max/ultra)

Input:  Press the RESET button.
Output: Module will execute bootloader immediately with "Reset cause: POR".
Output: Module does not hangs.
Note:   Repeat this test 10 times.

U-Boot 2015.10+fslc+g7d8ddd7 (Dec 15 2016 - 18:52:24 +0100)

CPU:   Freescale i.MX6SOLO rev1.1 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 44C
Reset cause: POR
Board: iMX6-OpenRex
I2C:   ready
DRAM:  512 MiB
MMC:   FSL_SDHC: 0
SF: Detected SST26VF032B with page size 256 Bytes, erase size 4 KiB, total 4 MiB
In:    serial
Out:   serial
Err:   serial
Net:   FEC [PRIME]
Hit any key to stop autoboot:  0
OpenRex U-Boot> 

CAN (basic/max/ultra)

Input:  None.
Output: Device driver is available.

[email protected]:~# ip addr show dev can0
2: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10
    link/can
[email protected]:~# ip addr show dev can1
3: can1: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10
    link/can 

CSI (basic/max/ultra)

HDMI monitor may cause i2c communication issues.

Input:  Connect RPi camera module into CSI interface and check if it is detected on i2c bus.
Output: I2C address 0x36 is occupied.

[email protected]:~# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- UU -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- UU -- -- -- -- -- -- -- -- --
40: UU -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
50: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --  

Input:  Connect RPi camera module into CSI interface and check kernel modules.
Output: Device driver ov5647_camera_mipi_int is loaded.

[email protected]:~# lsmod
Module                  Size  Used by
mxc_v4l2_capture       27362  1
ipu_bg_overlay_sdc      5230  1 mxc_v4l2_capture
ipu_still               2304  1 mxc_v4l2_capture
ipu_prp_enc             5864  1 mxc_v4l2_capture
ipu_csi_enc             3807  1 mxc_v4l2_capture
ipu_fg_overlay_sdc      6056  1 mxc_v4l2_capture
lm75                    4768  0
sht21                   2126  0
ov5647_camera_mipi_int    30415  0
v4l2_int_device         2897  3 ov5647_camera_mipi_int,ipu_csi_enc,mxc_v4l2_capture
at24                    5488  0
fxas2100x               6680  0
fxos8700                9014  0
mxc_dcic                6536  0
iwl4965                88394  0
iwlegacy               62850  1 iwl4965
galcore               226429  2

Input:  Connect RPi camera module into CSI interface and capture image.
Output: The image is displayed on LCD panel.

[email protected]:~# echo 2 > /sys/bus/i2c/devices/1-0036/ov5647_mode
[email protected]:~# gst-launch-1.0 v4l2src device="/dev/video0" ! video/x-bayer,width=1920,height=1080,framerate=30/1 ! queue ! bayer2rgb ! videoconvert ! fbdevsink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: v4l2 capture: unsupported ioctrl!
ERROR: v4l2 capture: unsupported ioctrl!
WARNING: from element /GstPipeline:pipeline0/GstFBDEVSink:fbdevsink0: A lot of buffers are being dropped.
Additional debug info:
/home/marek/workdir/imx6/yocto/fsl-release-bsp-4.1/build-x11/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer1.0/1.6.0-r0/gstreamer-1.6.0/libs/gst/base/gstbasesink.c(2846): gst_base_sink_is_too_la:
There may be a timestamping problem, or this computer is too slow.
mxc_hdmi 20e0000.hdmi_video: Read EDID again
mxc_hdmi 20e0000.hdmi_video: create default modelist
EVENT plugin
WARNING: from element /GstPipeline:pipeline0/GstFBDEVSink:fbdevsink0: A lot of buffers are being dropped.
Additional debug info:
/home/marek/workdir/imx6/yocto/fsl-release-bsp-4.1/build-x11/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer1.0/1.6.0-r0/gstreamer-1.6.0/libs/gst/base/gstbasesink.c(2846): gst_base_sink_is_too_la:
There may be a timestamping problem, or this computer is too slow.
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:27.103901670
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
power_down_callback: ipu0/csi1

Ethernet (basic/max/ultra)

Input:  None.
Output: Device driver is available.
Output: MAC address is correct.

[email protected]x6-openrexbasic:~# ip addr show dev eth0
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0d:15:00:d1:75 brd ff:ff:ff:ff:ff:ff

Input:  Plug Ethernet cable into connector and issue DHCP command.
Output: IPv4 address is assigned.

[email protected]:~# dmesg | tail
...
fec 2188000.ethernet eth0: Link is Down
fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[email protected]:~# udhcpc -i eth0
udhcpc (v1.23.2) started
Sending discover...
Sending discover...
Sending select for 192.168.1.39...
Lease of 192.168.1.39 obtained, lease time 600
/etc/udhcpc.d/50default: Adding DNS 192.168.1.1
/etc/udhcpc.d/50default: Adding DNS 192.168.1.2

HDMI output (basic/max/ultra)

Input:  Connect LCD monitor to baseboard.
Output: Desktop UI is correctly displayed.

I2C (basic/max/ultra)

Input:  Scan I2C bus 0, 1 and 2.
Output: Available devices on bus 0: PFUZE(0x08), FXOS8700(0x1c), FXAS21002(0x20), EEPROM(0x50/0x57).
Output: Available devices on bus 1: SGTL5000(0x0a), CSI Camera(0x36), SHT21(0x40), TMP101(0x48), HDMI EDID(0x50).
Output: Available devices on bus 2: .

[email protected]:~# i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- UU -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- --
20: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: UU -- -- -- -- -- -- UU -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --                        
[email protected]:~# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- UU -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- UU -- -- -- -- -- -- -- -- --
40: UU -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
50: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --                         
[email protected]:~# i2cdetect -y 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- 
[email protected]:~# i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- UU -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- --
20: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: UU UU UU UU UU UU UU UU -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- 

Input:  Trigger I2C eeprom detection.
Output: I2C eeprom is detected.

[email protected]:~# echo -n "0-0057" > /sys/bus/i2c/drivers/at24/unbind
[email protected]:~# echo -n "0-0057" > /sys/bus/i2c/drivers/at24/bind
at24 0-0057: 256 byte 24c02 EEPROM, writable, 1 bytes/write
[email protected]:~# echo -n "0-0050" > /sys/bus/i2c/drivers/at24/unbind
[email protected]:~# echo -n "0-0050" > /sys/bus/i2c/drivers/at24/bind
at24 0-0050: 2048 byte 24c16 EEPROM, writable, 1 bytes/write

Input:  Write and Read data from I2C eeprom.
Output: Data are the same.

[email protected]:~# echo -n "0123" > eeprom_in
[email protected]:~# cat eeprom_in > /sys/bus/i2c/devices/0-0057/eeprom
[email protected]:~# head -c 4 /sys/bus/i2c/devices/0-0057/eeprom > eeprom_out
[email protected]:~# diff eeprom_in eeprom_out && echo "Data are the same"
Data are the same
[email protected]:~# echo -n "0123" > eeprom_in
[email protected]:~# cat eeprom_in > /sys/bus/i2c/devices/0-0050/eeprom
[email protected]:~# head -c 4 /sys/bus/i2c/devices/0-0050/eeprom > eeprom_out
[email protected]:~# diff eeprom_in eeprom_out && echo "Data are the same"
Data are the same

Input:  Test FXOS8700 and FXAS21002 sensors.
Output: Sensors provides data.

[email protected]:~# echo 1 > /sys/devices/virtual/misc/FreescaleAccelerometer/enable
[email protected]:~# echo 1 > /sys/devices/virtual/misc/FreescaleMagnetometer/enable
[email protected]:~# echo 1 > /sys/devices/virtual/misc/FreescaleGyroscope/enable
misc FreescaleGyroscope: mma enable setting active
[email protected]:~# evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:      gpio_ir_recv
/dev/input/event1:      MCE IR Keyboard/Mouse (gpio-rc-recv)
/dev/input/event2:      gpio-keys
/dev/input/event3:      fxos8700
/dev/input/event4:      fxas2100x
Select the device event number [0-4]: 3
...
[email protected]:~# evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:      gpio_ir_recv
/dev/input/event1:      MCE IR Keyboard/Mouse (gpio-rc-recv)
/dev/input/event2:      gpio-keys
/dev/input/event3:      fxos8700
/dev/input/event4:      fxas2100x
Select the device event number [0-4]: 4
...
[email protected]:~# echo 0 > /sys/devices/virtual/misc/FreescaleAccelerometer/enable
[email protected]:~# echo 0 > /sys/devices/virtual/misc/FreescaleMagnetometer/enable
[email protected]:~# echo 0 > /sys/devices/virtual/misc/FreescaleGyroscope/enable

Input:  Test SHT21 sensor.
Output: Sensor provides data.

[email protected]:~# cat /sys/devices/soc0/soc/2100000.aips-bus/21a4000.i2c/i2c-1/1-0040/hwmon/hwmon*/humidity1_input
20741
[email protected]:~# cat /sys/devices/soc0/soc/2100000.aips-bus/21a4000.i2c/i2c-1/1-0040/hwmon/hwmon*/temp1_input     
30853

Input:  Test TMP101 sensor.
Output: Sensor provides data.

[email protected]:~# cat /sys/devices/soc0/soc/2100000.aips-bus/21a4000.i2c/i2c-1/1-0048/hwmon/hwmon*/temp1_input
32125

IR receiver (basic/max/ultra)

Input:  Press IR remote keys. (For Samsung IR remote load "nec" protocol)
Output: Events are detected.

[email protected]:~# echo nec > /sys/devices/soc0/ir-receiver/rc/rc0/protocols
[email protected]:~# evtest /dev/input/by-path/platform-ir-receiver-event
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "gpio_ir_recv"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 152 (KEY_SCREENLOCK)
  Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
Key repeat handling:
  Repeat type 20 (EV_REP)
    Repeat code 0 (REP_DELAY)
      Value    500
    Repeat code 1 (REP_PERIOD)
      Value    125
Properties:
Testing ... (interrupt to exit)
Event: time 1474009071.488894, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70707
Event: time 1474009071.488894, -------------- SYN_REPORT ------------
Event: time 1474009072.178245, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7070b
Event: time 1474009072.178245, -------------- SYN_REPORT ------------

LED (basic/max/ultra)

Input:  None.
Output: Script will turn ON and OFF LEDs assembled.

[email protected]:~#
for LED in /sys/devices/soc0/leds*/leds/*
do
echo Testing ${LED}
echo -n "1" > ${LED}/brightness
sleep 1
echo -n "0" > ${LED}/brightness
sleep 1
done

[email protected]:~# echo -n "heartbeat" >  /sys/devices/soc0/leds*/leds/module-led/trigger
[email protected]:~# echo -n "mmc1" > /sys/devices/soc0/leds*/leds/sd-activity-led/trigger

LPC1347 (basic/max/ultra)

Input:  LPC1347 Fimrware.
Output: Firmware is executed and LED starts blinking.

[email protected]:~# openrex-isp-handler.sh lpc/LPC1347-userLED.bin
ISP low
RST low
RST high
lpc21isp version 1.97
File lpc/LPC1347-userLED.bin:
        loaded...
        image size : 1068
Image size : 1068
Synchronizing (ESC to abort). OK
Read bootcode version: 2
5
Read part ID: LPC1345, 32 kiB FLASH / 8 kiB SRAM (0x28010541)
Will start programming at Sector 1 if possible, and conclude with Sector 0 to ensure that checksum is written last.
Erasing sector 0 first, to invalidate checksum. OK
Sector 0: ..........................
Download Finished... taking 0 seconds
Now launching the brand new code
RST low
ISP high
RST high

MEMORY (basic/max/ultra)

Input:  None.
Output: Memory test passed without any error.

[email protected]:~# memtester 2G 1
memtester version 4.1.3 (32-bit)
Copyright (C) 2010 Charles Cazabon.
Licensed under the GNU General Public License version 2 (only).

pagesize is 4096
pagesizemask is 0xfffff000
want 2048MB (2147483648 bytes)
got  251MB (263602176 bytes), trying mlock ...locked.
Loop 1/1:
  Stuck Address       : ok         
  Random Value        : ok
  Compare XOR         : ok
  Compare SUB         : ok
  Compare MUL         : ok
  Compare DIV         : ok
  Compare OR          : ok
  Compare AND         : ok
  Sequential Increment: ok
  Solid Bits          : ok         
  Block Sequential    : ok         
  Checkerboard        : ok         
  Bit Spread          : ok         
  Bit Flip            : ok         
  Walking Ones        : ok         
  Walking Zeroes      : ok         

Done.

MODEM (basic/max/ultra)

Input:  Plug HE910 3G card into PCIe mini 2 slot.
Input:  Plug SIM card into SIM1 slot.
Output: HE910 3G card is detected.
Output: AT commands can be executed.

[email protected]:~# lsusb| grep -i 1bc7
Bus 001 Device 005: ID 1bc7:0021  
[email protected]:~# cat > /etc/minirc.he910 << EOF
pu port             /dev/ttyACM0
pu baudrate         115200
pu bits             8
pu parity           N
pu stopbits         1
pu rtscts           No
pu xonxoff          No
pu escape-key       ^B
EOF

[email protected]:~# echo "Press 'Ctrl+B z q' to exit"
[email protected]:~# minicom -o he910
AT
AT+CPIN?
AT+CREG?
AT+COPS?

Log

AT
OK
AT+CPIN?
+CPIN: READY

OK
AT+CREG?
+CREG: 0,1

OK
AT+COPS?
+COPS: 0,0,"Vodafone",0

OK

PCIe (basic/max/ultra)

Input:  Plug Wireless WiFi Link 4965AGN mini PCIe card into mini PCIe slot.
Output: Card is detected by system.

[email protected]:~# lspci
00:00.0 PCI bridge: Device 16c3:abcd (rev 01)
01:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection (rev 61)

Input:  Plug Wireless WiFi Link 4965AGN mini PCIe card into mini PCIe slot.
Output: Wireless WiFi card firmware is loaded.

[email protected]:~# dmesg | grep iwl4965
iwl4965: Intel(R) Wireless WiFi 4965 driver for Linux, in-tree:
iwl4965: Copyright(c) 2003-2011 Intel Corporation
iwl4965 0000:01:00.0: enabling device (0140 -> 0142)
iwl4965 0000:01:00.0: Detected Intel(R) Wireless WiFi Link 4965AGN, REV=0x4
iwl4965 0000:01:00.0: device EEPROM VER=0x36, CALIB=0x5
iwl4965 0000:01:00.0: Tunable channels: 13 802.11bg, 19 802.11a channels
iwl4965 0000:01:00.0: loaded firmware version 228.61.2.24

Input:  Plug Wireless WiFi Link 4965AGN mini PCIe card into mini PCIe slot.
Output: Card can scan neighbor networks.

[email protected]:~# rfkill unblock wlan
[email protected]:~# ip link set wlan0 up
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[email protected]:~# iw dev wlan0 scan
BSS 20:aa:4b:7e:21:97(on wlan0)
        TSF: 4605781864521 usec (53d, 07:23:01)
        freq: 5220
        beacon interval: 100 TUs
        capability: ESS Privacy ShortPreamble (0x0031)
        signal: -76.00 dBm
        last seen: 0 ms ago
        SSID: OpenWrt5g
        Supported rates: 6.0* 9.0 12.0* 18.0 24.0* 36.0 48.0 54.0
        DS Parameter set: channel 44
        Country: CZ     Environment: Indoor/Outdoor
                Channels [36 - 48] @ 23 dBm
        RSN:     * Version: 1
                 * Group cipher: CCMP
                 * Pairwise ciphers: CCMP
                 * Authentication suites: PSK
                 * Capabilities: 16-PTKSA-RC 1-GTKSA-RC (0x000c)
        WPA:     * Version: 1
                 * Group cipher: CCMP
                 * Pairwise ciphers: CCMP
                 * Authentication suites: PSK
        Extended capabilities: 6
        WMM:     * Parameter version 1
                 * BE: CW 15-1023, AIFSN 3
                 * BK: CW 15-1023, AIFSN 7
                 * VI: CW 7-15, AIFSN 2, TXOP 3008 usec
                 * VO: CW 3-7, AIFSN 2, TXOP 1504 usec

Input:  Plug Intel Dual Band Wireless-AC 3160 mini PCIe card into mini PCIe slot.
Output: Card is detected by system.

[email protected]:~# lspci
00:00.0 PCI bridge: Synopsys, Inc. Device abcd (rev 01)
01:00.0 Network controller: Intel Corporation Wireless 3160 (rev 83)

Input:  Plug Intel Dual Band Wireless-AC 3160 mini PCIe card into mini PCIe slot.
Output: Wireless WiFi card firmware is loaded.

[email protected]:~# dmesg | grep iwl
[    4.003177] iwlwifi 0000:01:00.0: enabling device (0140 -> 0142)
[    4.055767] iwlwifi 0000:01:00.0: loaded firmware version 25.30.13.0 op_mode iwlmvm
[    4.195898] iwlwifi 0000:01:00.0: Detected Intel(R) Dual Band Wireless AC 3160, REV=0x164
[    4.214518] iwlwifi 0000:01:00.0: L1 Disabled - LTR Disabled
[    4.228356] iwlwifi 0000:01:00.0: L1 Disabled - LTR Disabled
[    4.536392] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'

Input:  Plug Intel Dual Band Wireless-AC 3160 mini PCIe card into mini PCIe slot.
Output: Card can scan neighbor networks.

[email protected]:~# rfkill unblock wlan
[email protected]:~# ip link set wlan0 up
[email protected]:~# iw dev wlan0 scan
BSS 20:aa:4b:7e:21:97(on wlan0)
        TSF: 4605781864521 usec (53d, 07:23:01)
        freq: 5220
        beacon interval: 100 TUs
        capability: ESS Privacy ShortPreamble (0x0031)
        signal: -76.00 dBm
        last seen: 0 ms ago
        SSID: OpenWrt5g
        Supported rates: 6.0* 9.0 12.0* 18.0 24.0* 36.0 48.0 54.0
        DS Parameter set: channel 44
        Country: CZ     Environment: Indoor/Outdoor
                Channels [36 - 48] @ 23 dBm
        RSN:     * Version: 1
                 * Group cipher: CCMP
                 * Pairwise ciphers: CCMP
                 * Authentication suites: PSK
                 * Capabilities: 16-PTKSA-RC 1-GTKSA-RC (0x000c)
        WPA:     * Version: 1
                 * Group cipher: CCMP
                 * Pairwise ciphers: CCMP
                 * Authentication suites: PSK
        Extended capabilities: 6
        WMM:     * Parameter version 1
                 * BE: CW 15-1023, AIFSN 3
                 * BK: CW 15-1023, AIFSN 7
                 * VI: CW 7-15, AIFSN 2, TXOP 3008 usec
                 * VO: CW 3-7, AIFSN 2, TXOP 1504 usec

SATA (max/ultra)

Input:  Power off the baseboard.
Input:  Connect HDD to SATA connector.
Input:  Power on the baseboard.
Output: HDD is detected.

[email protected]:~# dmesg | grep -i -e sata -e ata1
ahci-imx 2200000.sata: fsl,transmit-level-mV not specified, using 00000024
ahci-imx 2200000.sata: fsl,transmit-boost-mdB not specified, using 00000480
ahci-imx 2200000.sata: fsl,transmit-atten-16ths not specified, using 00002000
ahci-imx 2200000.sata: fsl,receive-eq-mdB not specified, using 05000000
ahci-imx 2200000.sata: SSS flag set, parallel bus scan disabled
ahci-imx 2200000.sata: AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl platform mode
ahci-imx 2200000.sata: flags: ncq sntf stag pm led clo only pmp pio slum part ccc apst
ata1: SATA max UDMA/133 mmio [mem 0x02200000-0x02203fff] port 0x100 irq 71
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata1.00: ATA-8: WDC WD1600BEVT-22ZCT0, 11.01A11, max UDMA/133
ata1.00: 312581808 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata1.00: configured for UDMA/133

Input:  Generate dummy file and copy this file into HDD and compare checksums.
Output: Generated file and copied file have the same checksum.

[email protected]:~# umount /dev/sda[1-9]
[email protected]:~# dd if=/dev/zero of=/dev/sda bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.361743 s, 1.4 kB/s
[email protected]:~# fdisk /dev/sda
...


The number of cylinders for this disk is set to 19457.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
  (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-19457, default 1): Using default value 1
Last cylinder or size or sizeM or sizeK (1-19457, default 19457): Using default value 19457

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): c
Changed system type of partition 1 to c (Win95 FAT32 (LBA))

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table
 sda: sda1
[email protected]:~# umount /dev/sda1
[email protected]:~# mkfs.vfat -F32 /dev/sda1
[email protected]:~# mount /dev/sda1 /media/
[email protected]:~# rm -f file.txt /media/file.txt
[email protected]:~# dd if=/dev/urandom of=file.txt count=1024 bs=1024
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.434573 s, 2.4 MB/s
[email protected]:~# cp file.txt /media/
[email protected]:~# md5sum file.txt /media/file.txt
b8e8141b61813fcc08a6164833729e3b  file.txt
b8e8141b61813fcc08a6164833729e3b  /media/file.txt
[email protected]:~# rm -f file.txt /media/file.txt
[email protected]:~# umount /dev/sda1

SD (basic/max/ultra)

TODO

SPI (basic/max/ultra)

Input:  Trigger m25p80 flash detection.
Output: SPI flash sst25vf032b is detected.

[email protected]:~# echo -n "spi2.1" > /sys/bus/spi/drivers/m25p80/unbind
[email protected]:~# echo -n "spi2.1" > /sys/bus/spi/drivers/m25p80/bind
m25p80 spi2.1: found sst26vf032b, expected m25p32
m25p80 spi2.1: sst26vf032b (4096 Kbytes)

Input:  Write and Read data from m25p80 flash.
Output: Data are the same.

[email protected]:~# echo -n "0123" > mtd_in
[email protected]:~# mtd_debug write /dev/mtd0 0 4 mtd_in
Copied 4 bytes from mtd_in to address 0x00000000 in flash
[email protected]:~# mtd_debug read /dev/mtd0 0 4 mtd_out
Copied 4 bytes from address 0x00000000 in flash to mtd_out
[email protected]:~# diff mtd_in mtd_out && echo "Data are the same"
Data are the same

SUSPEND (basic/max/ultra)

Input:  Put module into suspend state (mem).
Input:  Wait 10s and then press USER button.
Output: Module will wake up.

[email protected]:~# echo mem > /sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.002 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
fec 2188000.ethernet eth0: Graceful transmit stop did not complete!
PM: suspend of devices complete after 48.990 msecs
PM: suspend devices took 0.050 seconds
PM: late suspend of devices complete after 1.437 msecs
Info: dont support pm_turn_off yet.
PM: noirq suspend of devices complete after 17.065 msecs
Disabling non-boot CPUs ...
PM: noirq resume of devices complete after 20.138 msecs
PM: early resume of devices complete after 0.744 msecs
PM: resume of devices complete after 229.268 msecs
PM: resume devices took 0.230 seconds
Restarting tasks ... done.
fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[email protected]:~# 

Input:  Put module into suspend state (standby).
Input:  Wait 10s and then press USER button.
Output: Module will wake up.

[email protected]:~# echo standby > /sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.002 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
fec 2188000.ethernet eth0: Graceful transmit stop did not complete!
PM: suspend of devices complete after 58.070 msecs
PM: suspend devices took 0.060 seconds
PM: late suspend of devices complete after 1.458 msecs
Info: dont support pm_turn_off yet.
PM: noirq suspend of devices complete after 20.753 msecs
Disabling non-boot CPUs ...
PM: noirq resume of devices complete after 20.155 msecs
PM: early resume of devices complete after 0.758 msecs
PM: resume of devices complete after 229.463 msecs
PM: resume devices took 0.230 seconds
Restarting tasks ... done.
fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[email protected]:~#

Input:  Set RTC wakeup event after 10s.
Input:  Put module into suspend state (standby).
Output: Module will wake up.

[email protected]:~# echo +10 > /sys/class/rtc/rtc0/wakealarm && echo standby > /sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.002 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
fec 2188000.ethernet eth0: Graceful transmit stop did not complete!
PM: suspend of devices complete after 53.940 msecs
PM: suspend devices took 0.050 seconds
PM: late suspend of devices complete after 1.467 msecs
Info: dont support pm_turn_off yet.
PM: noirq suspend of devices complete after 20.758 msecs
Disabling non-boot CPUs ...
PM: noirq resume of devices complete after 20.156 msecs
PM: early resume of devices complete after 0.762 msecs
PM: resume of devices complete after 229.124 msecs
PM: resume devices took 0.230 seconds
Restarting tasks ... done.
[email protected]:~#

UART (basic/max/ultra)

Input:  Connect UART cable into baseboard connector.
Input:  Open serial console with baud rate 115200 8n1.
Input:  Type down command and observe the serial console output.
Output: Command is executed and some text is printed out. 

[email protected]:~# uname -a
Linux imx6-openrexbasic 4.1.36-18268-g4e448d3-dirty #18 SMP PREEMPT Sun Feb 26 14:39:51 CET 2017 armv7l GNU/Linux

USB (basic/max/ultra)

Input:  Plug USB flash drives with single vfat partition into USB connectors.
Output: Check if filesystem is recognized and automatically mounted 

[email protected]:~# lsusb
Bus 001 Device 004: ID 125f:d31a A-DATA Technology Co., Ltd.
Bus 001 Device 003: ID 125f:d31a A-DATA Technology Co., Ltd.
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

[email protected]:~# mount | grep /run/media/sd
/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)
/dev/sdb1 on /run/media/sdb1 type vfat (rw,relatime,gid=6,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

Input:  Generate dummy file and copy this file into USB flash drive and compare checksums.
Output: Generated file and copied file have the same checksum.

[email protected]:~# rm -f file.txt /run/media/sda1/file.txt
[email protected]:~# dd if=/dev/urandom of=file.txt count=1024 bs=1024
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.435065 s, 2.4 MB/s
[email protected]:~# cp file.txt /run/media/sda1/
[email protected]:~# md5sum file.txt /run/media/sda1/file.txt
b8e8141b61813fcc08a6164833729e3b  file.txt
b8e8141b61813fcc08a6164833729e3b  /run/media/sda1/file.txt
[email protected]:~# rm file.txt /run/media/sda1/file.txt

USB OTG (basic/max/ultra)

Input:  Load usb serial gadget driver and interconnect baseboard and host pc over microUSB to USB cable.
Output: Driver is successfully loaded and host pc detect new usb serial gadget device.

Baseboard

[email protected]:~# modprobe -i g_serial
g_serial gadget: Gadget Serial v2.4
g_serial gadget: g_serial ready
[email protected]:~# g_serial gadget: high-speed config #2: CDC ACM config

Host PC

[email protected]:~lsusb
...
Bus 002 Device 048: ID 0525:a4a7 Netchip Technology, Inc. Linux-USB Serial Gadget (CDC ACM mode)
...

Alternative tests

BUTTON (basic/max/ultra)

Input:  Press the Home/Back-/Menu+ buttons.
Output: Button events 1 and 0 are generated.

[email protected]:~# hexdump -C /dev/input/by-path/platform-gpio-keys-event
00000000  ef e7 da 57 ca 8e 0a 00  01 00 66 00 01 00 00 00  |...W......f.....|
00000010  ef e7 da 57 ca 8e 0a 00  00 00 00 00 00 00 00 00  |...W............|
00000020  ef e7 da 57 9f b1 0c 00  01 00 66 00 00 00 00 00  |...W......f.....|
00000030  ef e7 da 57 9f b1 0c 00  00 00 00 00 00 00 00 00  |...W............|
00000040  f0 e7 da 57 28 70 06 00  01 00 9e 00 01 00 00 00  |...W(p..........|
00000050  f0 e7 da 57 28 70 06 00  00 00 00 00 00 00 00 00  |...W(p..........|
00000060  f0 e7 da 57 18 93 08 00  01 00 9e 00 00 00 00 00  |...W............|
00000070  f0 e7 da 57 18 93 08 00  00 00 00 00 00 00 00 00  |...W............|
00000080  f1 e7 da 57 69 78 02 00  01 00 8b 00 01 00 00 00  |...Wix..........|
00000090  f1 e7 da 57 69 78 02 00  00 00 00 00 00 00 00 00  |...Wix..........|
000000a0  f1 e7 da 57 68 9b 04 00  01 00 8b 00 00 00 00 00  |...Wh...........|
000000b0  f1 e7 da 57 68 9b 04 00  00 00 00 00 00 00 00 00  |...Wh...........|

CSI (basic/max/ultra)

Input:  Connect RPi camera module into CSI interface and check kernel modules.
Output: Device driver ov5647_camera_mipi is loaded.

[email protected]:~# lsmod
Module                  Size  Used by
usb_f_acm               5196  1
u_serial                9600  1 usb_f_acm
g_serial                3685  0
libcomposite           44353  2 usb_f_acm,g_serial
configfs               23585  3 usb_f_acm,libcomposite
mxc_v4l2_capture       27624  1
ipu_bg_overlay_sdc      5385  1 mxc_v4l2_capture
ipu_still               2331  1 mxc_v4l2_capture
ipu_prp_enc             5903  1 mxc_v4l2_capture
ipu_csi_enc             3904  1 mxc_v4l2_capture
ipu_fg_overlay_sdc      6130  1 mxc_v4l2_capture
ov5647_camera_mipi_int    30566  0
fxas2100x               6694  0
fxos8700                9013  0
v4l2_int_device         2872  3 ov5647_camera_mipi_int,ipu_csi_enc,mxc_v4l2_capture
sht21                   2126  0
lm75                    4804  0
iwl4965                87853  0
mxc_dcic                6528  0
iwlegacy               62476  1 iwl4965

Input:  Connect RPi camera module into CSI interface and capture image.
Output: The image is displayed on LCD panel.

[email protected]:~# echo 1 > /sys/bus/i2c/devices/1-0036/ov5647_mode
[email protected]:~# gst-launch-1.0 v4l2src device="/dev/video0" ! video/x-bayer,width=1280,height=720,framerate=30/1 ! queue ! bayer2rgb ! videoconvert ! fbdevsink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: v4l2 capture: unsupported ioctrl!
ERROR: v4l2 capture: unsupported ioctrl!
WARNING: from element /GstPipeline:pipeline0/GstFBDEVSink:fbdevsink0: A lot of buffers are being dropped.
Additional debug info:
/home/marek/workdir/imx6/yocto/fsl-release-bsp-4.1/build-x11/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer1.0/1.6.0-r0/gstreamer-1.6.0/libs/gst/base/gstbasesink.c(2846): gst_base_sink_is_too_la:
There may be a timestamping problem, or this computer is too slow.
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:06.514209667
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
[email protected]:~# power_down_callback: ipu0/csi1

I2C (basic/max/ultra)

Input:  List I2C bus 0, 1 and 2.
Output: Available devices on bus 0: PFUZE(0x08), FXOS8700(0x1c), FXAS21002(0x20), EEPROM(0x50/0x57).
Output: Available devices on bus 1: SGTL5000(0x0a), CSI Camera(0x36), SHT21(0x40), TMP101(0x48), HDMI EDID(0x50).
Output: Available devices on bus 2: .

[email protected]:~# ls /sys/bus/i2c/devices/i2c-0 | grep ^[0]
0-0008
0-001c
0-0020
0-0057
[email protected]:~# ls /sys/bus/i2c/devices/i2c-1 | grep ^[1]
1-000a
1-0036
1-0040
1-0048
1-0050
[email protected]:~# ls /sys/bus/i2c/devices/i2c-2 | grep ^[2]
[email protected]:~# ls /sys/bus/i2c/devices/i2c-0 | grep ^[0]
0-0008
0-001c
0-0020
0-0050
0-0051
0-0052
0-0053
0-0054
0-0055
0-0056
0-0057

PCIe (basic/max/ultra)

Input:  Plug Wireless WiFi Link 4965AGN mini PCIe card into mini PCIe slot.
Output: Wireless WiFi card firmware is loaded.

[email protected]:~# dmesg | grep iwl4965
iwl4965: Intel(R) Wireless WiFi 4965 driver for Linux, in-tree:
iwl4965: Copyright(c) 2003-2011 Intel Corporation
iwl4965 0000:01:00.0: Detected Intel(R) Wireless WiFi Link 4965AGN, REV=0x4
iwl4965 0000:01:00.0: device EEPROM VER=0x36, CALIB=0x5
iwl4965 0000:01:00.0: Tunable channels: 13 802.11bg, 19 802.11a channels
iwl4965 0000:01:00.0: loaded firmware version 228.61.2.24

Input:  Plug Wireless WiFi Link 4965AGN mini PCIe card into mini PCIe slot.
Output: Card is detected by system.

[email protected]:~# lspci
00:00.0 PCI bridge: Device 16c3:abcd (rev 01)
01:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection (rev 61)

Input:  Plug Wireless WiFi Link 4965AGN mini PCIe card into mini PCIe slot.
Output: Card can scan neighbor networks.

[email protected]:~# ip link set wlan0 up
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[email protected]:~# iwlist wlan0 scan
wlan0     Scan completed :
          Cell 01 - Address: 20:AA:4B:7E:21:97
                    Channel:44
                    Frequency:5.22 GHz (Channel 44)
                   Quality=38/70  Signal level=-72 dBm  
                    Encryption key:on
                    ESSID:"OpenWrt5g"
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
                              36 Mb/s; 48 Mb/s; 54 Mb/s
                    Mode:Master
                    Extra:tsf=0000072735a29d05
                    Extra: Last beacon: 30ms ago
                    IE: Unknown: 00094F70656E5772743567
                    IE: Unknown: 01088C129824B048606C
                    IE: Unknown: 03012C
                    IE: Unknown: 0706435A20240417
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: WPA Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: Unknown: 7F080000000000000040
                    IE: Unknown: DD180050F2020101000003A4000027A4000042435E0062322F00
Tags:
Created by Administrator on 2017/02/25 20:32

This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 6.1 - Documentation