IEEE 1588 Precision Time Protocol (PTP) is implemented for the industrial grade Open Source Hardware Linux computer STMP1-OLinuXino-LIME2

The Time Sensitive Networking (TSN) is for real-time communication with hard, non-negotiable time boundaries for end-to-end transmission latencies.

The main use of TSN is for industrial machine controllers, robots etc.

For this purpose all devices in this network need to have a common time reference and therefore, need to synchronize their clocks among each other. Only through synchronized clocks, it is possible for all network devices to operate in unison and execute the required operation at exactly the required point in time.

The time in TSN networks is usually distributed from one central time source directly through the network itself using the IEEE 1588 Precision Time Protocol, which utilizes Ethernet frames to distribute time synchronization information.

Linutronix helped to implement IEEE 1588 PTP on STMP1-OLinuXino-LIME2.

For Uboot changes Olimex Uboot was used as base. The Kernel patch is sent upstream and can be seen on the mailing list

https://lore.kernel.org/linux-devicetree/20210316080644.19809-1-kurt@linutronix.de/

We also apply these patches in our next STMP1 Linux images release.

The results is correctly working PTP:

# ptp4l -H -2 -i eth0 --tx_timestamp_timeout=40 -f /etc/gPTP.cfg -m
|ptp4l[1434.665]: rms    5 max   13 freq  -1069 +/-   7 delay   325 +/-   0
|ptp4l[1435.666]: rms    8 max   16 freq  -1068 +/-  11 delay   325 +/-   0
|ptp4l[1436.667]: rms   10 max   19 freq  -1060 +/-  12 delay   324 +/-   0
|ptp4l[1437.668]: rms    8 max   17 freq  -1055 +/-  10 delay   322 +/-   0
|ptp4l[1438.668]: rms    6 max    9 freq  -1057 +/-   9 delay   322 +/-   0

Open Source Hardware S3-OLinuXino update – The new board targeting industrial vision applications is now with mainline Linux support

S3-OLinuXino is board we create to may add vision to the PTH components Soldering Robot we are working on for some time.

Revision.B now is a bit different than the first prototype we made. It has these features:

  • S3 SOC Cortex-A7 running at 1.2Ghz
  • 1Gb DDR3 RAM inside S3 SOC up to 1333Mhz
  • MIPI Raspberry Pi camera interface up to 8Mpix camera support
  • Parallel CSI camera interface up to 8 Mpix
  • Power Management Unit with LiPo battery charger and step-up to allow stand alone battery operation
  • 100Mb Ethernet interface with POE support (external optional module)
  • SPI, NAND, eMMC external optional module
  • LCD connector to connect to LCD-OLinuXino displays with different sizes and resolutions
  • LiPo battery connector
  • USB-OTG interface
  • UEXT connector with SPI, I2C, Serial and power supply
  • EXT1 connector for LED PWM lighting
  • audio input with microphone
  • audio output
  • WiFi and BT module with external antenna
  • micro SD card connector

We are working to offer Mainline Linux with this board.
Bootlin got sample board and have working MIPI driver.

S3-OLinuXino can take power from USB, LiPo battery or PoE (with optional PoE module).

Different NAND Flash, SPI Flash, eMMC flash options are possible with addon module

The only thing we still didn’t complete is USB-OTG functionality.

Mass production is planned for March 2021.

Open Source Hardware STMP1-OLinuXino-LIME2 industrial grade Linux computer update – Debian Buster and Ubuntu Focal with mainline Kernel 5.10.12 now supports almost everything

STMP1-OLinuXino-LIME2 Industrial grade Linux Computer project took us almost an year of work to build proper software support for our hardware with mainline uboot and kernel.

ST demo board uses Yocto with kernel 5.4, our images use Linux Kernel 5.10.12

These who monitor our Official images at https://images.olimex.com probably nottice that we already have images with Debian Buster and Ubuntu Focal for STM32MP1 where almost everything now work with mainline Linux Kernel 5.10.12.

  • We had lot of troubles around the Ethernet, but now it works pretty well!
  • CAN-FD – works!
  • Two USB High speed hosts with 1A current – works!
  • LCD – works
  • HDMI – works!
  • eMMC Flash boot – works!
  • PMU and LiPo charger battery support – works

Two things on this board left not complete:

  • low power modes
  • USB-OTG

New prototypes rev.B now are in production, the Chinese New Year will delay them to end of February. We hope meantime to solve these two last issues and run production.

UPDATE: As some people wanted to know what was the Ethernet issue we were struggling so long, I posted in the comment section.

For the USB-OTG my guess is that it’s also some silly issue so people may help:

STM32MP1 has two High speed USB hosts and one Full speed USB-OTG, here is snip from their Hardware development document:

Here is our schematic which follows above guide:

The two High Speed USB hosts work as expected, but the USB-OTG has issue summarized here: https://pastebin.com/i6G90kdg

What makes us a little bit suspicious is that STM in their own demo board didn’t follow their Hardware Guide and were wiring one of their High speed USB as OTG and connecting USB hub to the other, ignoring the Full speed USB at all.

The Open Source Hardware OLinuXino boards are with new Linux Kernel 5.6 scripts to move Linux OS to eMMC or SATA are included

We are pleased to announce that now the images at http://images.olimex.com/release/ are with the lates Linux Kernel 5.6

All these are build with our Olimage script.

We still keep Ubuntu Bionic 18.04 LTS distribution and didn’t move to 20.04 LTS yet.

To addition for script which set boot from eMMC we add new one which allow you to boot from SATA.

The boot from eMMC and SATA is enabled for OLinuXino boards which has SPI Flash on them like:

  • A20-OLinuXino-LIME-e16Gs16M
  • A20-OLinuXino-LIME-e4Gs16M
  • A20-OLinuXino-LIME-s16M
  • T2-OLinuXino-LIME-e8Gs16M-IND
  • T2-OLinuXino-LIME-s16M-IND
  • A20-OLinuXino-LIME2-e16Gs16M
  • A20-OLinuXino-LIME2-e4Gs16M
  • A20-OLinuXino-LIME2-s16M
  • T2-OLinuXino-LIME2-e8Gs16M-IND
  • T2-OLinuXino-LIME2-s16M-IND
  • A20-OLinuXino-MICRO-e16Gs16M
  • A20-OLinuXino-MICRO-e4Gs16M
  • A20-OLinuXino-MICRO-s16M
  • T2-OLinuXino-MICRO-e8Gs16M-IND
  • T2-OLinuXino-MICRO-s16M-IND
  • A20-SOM-e16Gs16M
  • T2-SOM-e8Gs16M-IND
  • A20-SOM204-1Gs16Me16G-MC
  • T2-SOM204-1Gs16Me4G-C-I
  • T2-SOM204-1Gs16Me8G-MC-I

To make board booting from eMMC you have to boot from SD-card then execute:

$ sudo olinuxino-sd-to-emmc

then wait until script moves the OS to eMMC, remove the SD-card and reboot.

Similar if you want to make board boot from SATA you have to boot from SD-card then execute:

$ sudo olinuxino-sd-to-sata

Olimage – Mainline Linux images building script for all of our OLinuXino and SOM boards

DEBIANubuntu_904

We work for more than 6 month on our own Linux building script and now we are ready with it’s initial release, which is now on GitHub .

Why do we need it? The number of our boards with all variant hit over 70 pcs when you add to them the different LCD combinations and other peripherials the support and test of these images became little hell. Our latest Armbian based image was released 3-4 months ago as we didn’t manage to properly test all board features in the newer images.

So we first made universal images for all our groups of boards (based on the SOC used) and EEPROM where we store info so uboot and kernel to may recognize the board and configure properly the parameters at boot time.

Then we decided to make one-for-all build script which will automatically build images with recent kernel and uboot automatically.

We had to leave Armbian as we wanted things to be more under our control and decision. Also we wanted everything to be 100% tested when released. Armbian official builds are not tested at hardware level other than to see board boots, so many boards are with peripheral conflicts and we had to apply our patched on Armbian anyway to adjust the images for our boards.

Our official images now are at http://images.olimex.com.

There is release folder where we have minimal and basic images for Debian and Ubuntu and testing folder where new uboot and kernel images will be built and kept until properly tested. For instance Ubuntu 20.04 LTS and kernel 5.6 images will be put there in the next couple of weeks.

The Olimage script and repositories are developed in our internal Gitlab and will be only push to Github when everything is properly tested and images moved to release folder. Also we push all our patches upstream.

With the current kernel and uboot users can easily generate any Linux distribution as it’s matter of building rootfs.

Moving to the next release would be possible simple by

sudo apt-get update && apt-get dist-upgrade

then re-boot of the board, so when we release new images all you have to do is to run the above commands and you will have the latest images.

For the moments the builder has A10, A13, A20, A64.

iMX233 and RK3188 SOCs are obsolete and not produced anymore by Rockchip and NXP, so they will be not included in the script. We still produce and sell these boards, but they will be discontinued when we use our existing SOC stock.

AM3352-SOM and AM3359-SOM will be included in the script, but we have no fixed date when, as we have to put earlier S3-OLinuXino and STMP1-OLinuXino-LIME2 which are with higher priority.

The A20 driver for HDMI audio is almost done!

kodi

UPDATE 20-01-2020: Now the A20 HDMI Audio driver patches are submitted  and KODI images with working HDMI Audio are on our ftp

We blogged few weeks ago about the KODI image done for A20 and A64 by our friends Dimitar Gamishev and Stefan Saraev.

A64 had everything working fine, but the A20 image had no HDMI audio, as there is no such driver in the mainline kernel. This of course made A20 not useful for media center.

We decided to try to solve this problem by ourselves by writing this missing driver and today we have success!

The audio driver for HDMI is working, but is still far from complete as we have to add channel management etc, but with our driver we can hear audio via the HDMI with A20!

We will complete and send the patches to mainline after our Christmas-New Year vacation, so somewhere in January the KODI image (and of course all Olimex official images) for A20 will be updated and will have HDMI audio too!

 

Say Hello to Es-Ti-Em-Pai STMP1-OLinuXino the Open Source Hardware with mainline Linux support and -40+125C operating temperature

Screenshot from 2019-12-10 08-05-45

ST32MP1XX SOCs from ST Microelectronics has one unique feature: They operate from -40 up to +125 by default there is no other commercial or industrial or etc temperature range. What does this means – very well done production! It’s not secret that all SOC vendors produce their chips then test them and which pass -40+125 are classified automotive grade, which fail but pass -40+85C are classified industrial and it there are SOC which fail both automotive and industrial grade on tests are sold as commercial grade.

This chip has no other than automotive grade, so ST is confident in their process quality.

For this SOC ST Microelectronics guarantee 10 years rolling availability.

The peripherals ST32MP1XX has are also industrial and real time oriented:

  • Cortex-M4 co processor, we know Cortex-A series when run RTOS has latency which do not allow fast processed like motor control etc. This is where this co-processor release the main OS processor of such demanding tasks
  • FD-CAN ST32MP1 has two cans both support FD which offer less latency and faster speed, one of them has also time triggered CAN (TTCAN)
  • 2 × ADCs with 16-bit max. resolution (12 bits up to 4.5 Msps, 14 bits up to 4 Msps, 16 bits up to 3.6 Msps)
  • 2 × 12-bit D/A converters (1 MHz)
  • 8- to 14-bit camera interface up to 140 Mbyte/s
  • Gigabit Ethernet
  • 6 × SPI (50 Mbit/s)
  • 6 × I2C FM+ (1 Mbit/s, SMBus/PMBus)
  • Documented Trust Zone and Secure Boot (may be subject to some export restrictions)

We designed our STMP1-OLinuXino to be with same layout as A20-OLinuXino-LIME2, with all connectors on same positions, so people who used LIME2 to may migrate to STMP1 if necessary.

Screenshot from 2019-12-10 08-06-22

We put the SOC on bottom this time to may attach easier bigger heat sinks or even connect it to the BOX-LIME-BLACK metal and remove the need for aluminum heatsink.

Screenshot from 2019-12-10 08-06-47

Note that schematic is not verified yet and the PCB is not routed, we just placed the components on their approximate locations.

All preliminary files are put on GitHub so people who are interested how we wired the GPIOs to match LIME2 functionality and existing customers find potential conflicts with their current design may signal while still routing is not complete 🙂

Looking forward for your comments.

New mainline Linux images with Kernel 5.3.8 for A13-OLinuXino and A13-SOM are uploaded

adni18_Linux_Christmas

A13-OLinuXino and A13-SOM got new mainline Linux images based on Kernel 5.3.8 on our ftp.

The two distributions we usually release are Ubuntu 18.04 LTS Bionic and Armbian/Debian buster next with build instructions and ready to burn to SD card images.

A64-OLinuXino got mainline Linux Kernel 5.0 images

Linux-Kernel-5-featured

Linux kernel 5.0 was just released and as we were working this week to the release of mainline Linux image for A64-OLinuXino (as till now it has the ugly android based 3.10 kernel) we decided to release latest kernel.

The images are available on our FTP.

There are two images Debian headless or Ubuntu desktop.

Known issues with these images:

  • LCDs are not supported yet, HDMI output is only available, we need one more week to figure out how to automatically detect if the Ethernet or LCD are enabled (there is jumper on the board which switch between LCD or Ethernet as both share pins and can’t work together). So to make the DTS configurations  automatic at boot time.
  • eMMC do not work in the fastest possible mode yet. We need some time, right now 50MB/s is the max speed to read write instead of 100-200MB/s which the installed eMMC supports, we will update the image soon with HS200/400 modes enabled.
  • No CPU thermal. A64 has 3 thermal zones – CPU, GPU0 and GPU1. The driver doesn’t support monitoring them.

How to build the images is explained here.

Mainline Linux Kernel 5.0 images for A13, A20 and A33 OLinuXino and SOMs is in progress.

New univeral A20 image released which works with all our A20 boards and auto detect and configure on boot

d6ndarl

We are releasing universal A20 Linux image which will boot and work on all our A20 boards:

The image is based on Armbian with modifications necessary to support OLinuXino specific features.

There are two image releases – Ubuntu Bionic Desktop image which is the recommended image for beginners or when you want to evaluate the board’s hardware fully – it has good HDMI, audio support and Debian Stretch Server image which contains no binary blobs but is headless and has poor video and audio support.

Currently, our latest Ubuntu Bionic A20 image uses kernel 4.19.10, or to be more specific:

root@olinuxino:~# uname -a
Linux olinuxino 4.19.10-sunxi #5.65 SMP Tue Dec 18 14:19:16 EET 2018 armv7l armv7l armv7l GNU/Linu

Our Armbian Ubuntu Bionic image can be downloaded from FTP or Torrent.

Our Armbian Debian Stretch image can be download from FTP or Torrent.

Username is according to Armbian documentation: root and password: 1234

Since we have a large array of A20 boards and numerous variants there is auto-detection enabled in the image. Information about the model of the board is stored in the EEPROM of each A20 board that had been recently manufactured and this information is used by the new images to load the proper configuration. The EEPROM contents are described here.

The images can be used with boards from early revisions which has no EEPROM or has EEPROM with wrong content after one time set up of the EEPROM during in the first u-boot of the new image. If you have trouble booting interrupt u-boot by pressing space and type “olinuxino”. An example configuration for manually setting the EEPROM of A20-OLinuXino-LIME-e16Gs16MB hardware revision K is given at the end of the post.

The new images have support for both legacy resistive and new capacitive/resistive touch displays with auto detection feature (please bear with us they are not released yet on the web as we test them). The newer versions of the displays has suffix -CTS for capacitive touch screen and -RTS for resistive touch screen and are offered in 5″, 7″ and 10″ size with different resolutions. These displays are automatically detected by boot and drivers properly configured for them. If the LCDs are not detected HDMI output is only enabled and the image can be configured one time at first boot manually as described in this wiki article.

Please note that mainline Kernel now do not support NAND Flash, so if you wish to boot from the flash memory, consider either using the legacy 3.4.xx images which are still available or switch to A20 boards with eMMC. The eMMC boot is supported via armbian-config (nand-sata-install). Due to lack of reliable eMMC 5.X support by Allwonner boot0 and for future compatibility we are adding 16MB SPI flash for all A20 boards with eMMC, this way the board first boots from the SPI then continue to eMMC with properly set configuration. Allwinner Boot0 can’t handle correctly eMMC 5.X and sometime boot sometimes do not boot, as this is binary blob inside SOC there is nothing we can do than to use SPI boot to fix eMMC boot parameters.

Build instructions for the new images can be found here.

An example configuration for manually setting the EEPROM of A20-OLinuXino-LIME-e16GB hardware revision K is given below:

=> olinuxino 
olinuxino - OLinuXino board configurator

Usage:
olinuxino config info - Print current configuration: ID, serial, ram, storage, grade...
olinuxino config list - Print supported boards and their IDs
olinuxino config erase - Erase currently stored configuration
olinuxino config write [id] [revision] [serial] [mac]
arguments:
[id] - Specific board ID
[revision] - Board revision: C, D1, etc...
[serial] - New serial number for the board
[mac] - New MAC address for the board
Format can be:
aa:bb:cc:dd:ee:ff
FF:FF:FF:FF:FF:FF
aabbccddeeff
olinuxino monitor list - Print supported video outputs
olinuxino monitor set - Set specific LCD

=> olinuxino config list

Supported boards:
----------------------------------------
A20-OLinuXino-LIME - 7739 
A20-OLinuXino-LIME-n4GB - 7743 
A20-OLinuXino-LIME-n8GB - 8934 
A20-OLinuXino-LIME-s16MB - 9076 
T2-OLinuXino-LIME-IND - 9211 
T2-OLinuXino-LIME-s16MB-IND - 9215 
T2-OLinuXino-LIME-e4GB-IND - 9219 
A20-OLinuXino-LIME2 - 7701 
A20-OLinuXino-LIME2-e4GB - 8340 
A20-OLinuXino-LIME2-e16GB - 9166 
A20-OLinuXino-LIME2-n4GB - 7624 
A20-OLinuXino-LIME2-n8GB - 8910 
A20-OLinuXino-LIME2-s16MB - 8946 
A20-OLinuXino-LIME2-e16Gs16M - 9604 
A20-OLinuXino-LIME2-e4Gs16M - 9613 
T2-OLinuXino-LIME2-IND - 9239 
T2-OLinuXino-LIME2-s16MB-IND - 9247 
T2-OLinuXino-LIME2-e4GB-IND - 9243 
A20-OLinuXino-MICRO - 4614 
A20-OLinuXino-MICRO-e4GB - 8832 
A20-OLinuXino-MICRO-e16GB - 9042 
A20-OLinuXino-MICRO-e4GB-IND - 8661 
A20-OLinuXino-MICRO-IND - 8828 
A20-OLinuXino-MICRO-n4GB - 4615 
A20-OLinuXino-MICRO-n8GB - 8918 
A20-OLinuXino-MICRO-s16MB - 9231 
T2-OLinuXino-MICRO-IND - 9223 
T2-OLinuXino-MICRO-s16MB-IND - 9235 
T2-OLinuXino-MICRO-e4GB-IND - 9227 
A20-SOM-n4GB - 4673 
A20-SOM - 7664 
A20-SOM-IND - 8849 
A20-SOM-n8GB - 8922 
A20-SOM-e16GB - 9155 
A20-SOM-e16GB-IND - 9148 
T2-SOM-IND - 9259 
A20-SOM204-1G - 8991 
A20-SOM204-1Gs16Me16G-MC - 8958

=> olinuxino config write 9166 k

Erasing EEPROM configuration...
Writting EEPROM configuration...
Writting MMC configuration...

=> saveenv

Saving Environment to EXT4... Recovery required
update journal finished
done
OK

=> reset

Previous Older Entries