Saturday, April 15, 2023

TI AM62X supports splash screen in upstream u-boot

EARLY SPLASH SCREEN FOR TI's AM62X


Almost every product that has a screen for user interface expects a very early (< 1 second) display of "product logo" also known as early splash screen when turned ON.

The early splash of logo on screen requires display drivers to be integrated in boot loader, for Linux OS we use u-boot as standard boot loader and even before u-boot it's the SPL that comes up first and initializes the DDR and loads the Linux and file system images. The driver should be enabled in both u-boot and SPL to get an early experience of Splash Screen.

My team at Texas Instruments has introduced the support for AM62x display in u-boot and has successfully up-streamed it.  

This feature will be available in our next release of TI Linux SDK, but our partners and customers can get this feature ported now by upgrading to u-boot version 2023.04 or by back porting these patches to the version of u-boot they are using currently.

The patch series can be found here

Apart from porting the driver, there are few additional steps that need to be implemented to get the feature enabled for your platform.

  1. add support for TIDSS in dts file: arm: dts: k3-am62-main: Add device tree node for TIDSS
  2. enable pin controls :  arm: dts: k3-am625-sk: Add pin control for TIDSS and add panel device tree node 
  3. enable pre-ram flags : arch: arm: dts: k3-am625-sk: add bootph-pre-ram flags 
An example of these dts changes can be found here

NOTE: The video file in the link above demonstrates the splash screen with in 1 sec of turning ON of the board, the first logo is from SPL and then there is a blank screen and the logo appears for the second time and this time it's from u-boot. It's up to our customers to utilize these features as applicable to final product.

The patches for SPL are still under review and not available upstream yet, the patch series can be pulled from the links given below:

Credits:  Nikhil Jain - for the content and upstreaming this feature in u-boot opensource projects.

Sunday, April 2, 2023

TI AM62X SOCs supports simultaneous flashing of multiple boards for factory flashing


As our customers are getting into production with TI's AM62x and AM62A SOCs one of the key requirements has been to provide a tool that can simultaneously flash multiple boards in the factory.

While the standard practice in Industry has been to develop and provide a Windows based tool, my team unleashes the power of u-boot, with just a script and USB DFU support in u-boot we are now able to flash multiple AM62x and AM62A boards dynamically and simultaneously : 

  • Simultaneously - this means, connect as many boards as needed through a USB hub and the script running on host machine detects the number of boards connected and each board will be flashed with default images one by one without manual intervention.
  • Dynamically - the boards that were flashed can be taken out runtime and new boards can be connected while other boards are being flashed. The script keeps finding the newly added boards and continues to flash till the user closes the script.

The feature got added into our latest SDK version 8.6

Steps to flash multiple boards are documented in our SDK documentation, the scripts, environment variables and u-boot sources are part of SDK installer

Steps to build u-boot with DFU support is also documented here

Thanks to Paresh Bhagat and Nitin Yadav for the video and content.

Sunday, March 26, 2023

Zephyr or FreeRTOS for Cortex M4 on BeaglePlay

TI SOCs on recently launched BeaglePlay has MCU as co-processors, AM62x has 1xM4@400MHz 256KB SRAM. As a standard SDK offering TI provides MCU+ SDK - device drivers with FreeRTOS: [MCU-PLUS-SDK-AM62X Software development kit (SDK) | TI.com]. I was happy to see many applications based on Zephyr with - BeagleBoard.org - beagleconnect

There are significant advantages and disadvantages between both operating systems, example : FreeRTOS gives the flexibility of upgrading to SafeRTOS for safety applications. But Zephyr will limit itself in safety applications. Whereas stacks like lwip and tinyusb need more maturity for  FreeRTOS vs the bluetooth and other networking stack in Zephyr which is more robust.

Can you please help me by participating in this survey to get an idea of what you think would be the best OS for a MCU as co-processor for next gen applications & products?

Link to Survey Portal on LinkedIn

Monday, March 20, 2023

Linux Suspend to RAM on TI's AM62x SOC


Last time I tried hitting suspend to RAM with lowest possible power consumption was on OMAP3 - Beagleboard XM :). I was very happy to see this demo from one of my teammate, the video demonstrates the AM62x EVM going into complete suspend - implies all the device drivers have successfully completed suspend to RAM and the power numbers drop. The device then comes up on resume without any crash as expected :).

The patches and these features are now available with Processors SDK version 8.6 . I hereby request all the SOM manufacturers and development board manufacturers to enable this feature in their software and make it available to end customers.

The upstream effort on power management is also in progress, recently Dhruva has hosted a public repo after rebasing the 5.10 patches on upstream 6.x kernel. hereDevelopers can test individual drivers based on this branch after applying their suspend resume patches and if necessary any DT changes. 

Note: This has lpmdemo enabled by default in sk dt so there isn't any lpm DT for upstream Linux.

The patches can also be reviewed here:
https://lore.kernel.org/linux-arm-kernel/20221128140522.49474-1-g-vlaev@ti.com/

The deep sleep core power consumption that we were able hit was as per spec : 7.7mW, the demo video shows HDMI, CSI Camera and many other drivers going into suspend mode and resuming back.

The steps to validate suspend to RAM is documented in the SDK user manual here, the software supports resume from RTC timer and USB.

The technical white paper on AM62x SOC power consumption is here

Thanks to Vibhore and Dhruva for the content and video.

TI AM6xx Linux device driver's upstream status

Upstreaming Linux device drivers for all the components and peripherals of TI SOCs is always a key focus area for Linux developers at TI. Last year has been bit slower as we didn't move quickly on few key drivers due to complexity of hardware and new changes required to the drivers. The team has now made significant progress in learning the required modifications to get the drivers accepted by the Linux maintainers and have started posting those patches. Majority of the drivers for TI's AM62x are now upstream, the only remaining drivers and the status of the same is captured below:

Thanks to all Linux upstream maintainers for helping us by reviewing and merging the patches.

Module

Features 

Platforms affected

Status

CSI

Base driver
multi stream support
V4L2 enhancements
FPD link base
Serializers / De-serializers
Sensors

AM62x

AM62A

Single Stream CSI-RX: https://lore.kernel.org/all/20230314115516.667-1-vaishnav.a@ti.com/#r

Multi Stream in V4L2: https://lore.kernel.org/all/20221215121634.287100-1-tomi.valkeinen@ideasonboard.com/

FPD-Link Ser/Deser: https://lore.kernel.org/all/20230222132907.594690-1-tomi.valkeinen@ideasonboard.com/

Multi Stream in CSI-RX: https://github.com/jailuthra/linux/commits/csi_multi_wip

Sensors: TBD

DSS

Base support
Dual Display
OLDI / DPI
DSI support

AM62/AM62a
AM62/AM62a
AM62/AM62a
K3 SoCs

Patches in review
https://patchwork.kernel.org/project/dri-devel/list/?series=715487&state=%2A&archive=both

OSPI NAND

Base support

All K3 SoCs

To be posted

OSPI PHY calibration

NOR and NAND calibration for 166Mhz operation

All K3 SoCs

To be posted

Codec

CnM VPU Codecs
JPEG Codecs

AM62A
AM62A

Patches in review
Internal bring up ongoing

GPU - Sitara devices

AM62x

To be posted

Low Power Management

Individual driver RPM support
Deep Sleep 
IO + DDR
Other LPM modes
IO daisy chain wakeup

AM62x

AM62A

To be posted

PRU HW IPs

UART
PWM

AM65/AM64/AM62/AM62a
AM65/AM64/AM62/AM62a

To be posted

PRU RPMSG

AM65/AM64/AM62/AM62a

To be posted

DM R5 IPC /Single R5 IPC

AM62/AM62a

Patches in review

dma-buf heaps 

carevouts and exporters

All k3 SoCs

ICSSG

Dual EMAC
Switch
HSR
TSN

AM65 and AM64

Patches in review
TBD
TBD
TBD

CPSW

IET
mq_prior
Rate limiting
interrupt pacing

All k3 SoCs

Will start in 2Q23


Saturday, March 18, 2023

Launch of TI vision processors for analytics at the edge

 

 

Texas Instruments demonstrates range of micro-controller (MCU) and microprocessors (MPU) at embedded world. These devices cater to various applications in Industrial, Consumer Electronics, Robotics and Vision Analytics based product segments. By design the processors draw very less power, I will cover the steps to measure the power and to evaluate the performance parameters in my upcoming blog post.

Being hands on with one of the recently launched TI's AM62A processor, I can bet this device is something industry would be looking forward to integrating in many of their analytics and edge AI based products. The device comes with hardware accelerators for deep learning and Image processing to integrate RGB raw sensors. This is first device in industry to also support IR sensors like OV2312 - RGB and IR frames are time division multiplexed.

The Yocto build environment based Linux SDK for edge AI provides

  • Upstream RT-Linux LTS Kernel 5.10 (will get migrated to version 6.1 shortly) with peripheral drivers, U-Boot bootloader.
  • Pre-integrated firmware for hardware accelerated deep learning and camera ISP
  • GStreamer plugins and edge AI application stack

The SDK documentation provides simple steps to build, develop and run high performance deep learning applications using a live camera and display. More details on software can be found here