Thomas Petazzoni, embedded Linux engineer and trainer at Free Electrons, describes the steps he followed to add a new Marvell SoC to the mainline kernel at ELCE 2012.
Abstract:
Since Linus Torvalds raised warnings about the state of the ARM architecture support in the Linux kernel, a huge amount of effort and reorganization has happened in the way Linux supports ARM SoCs. From the addition of the device tree to the pinctrl subsystem, from the new clock framework to the new rules in code organization and design, the changes have been significant over the last one and half year in the Arm Linux kernel world.
Based on the speaker’s experience on getting the support for the new Marvell Armada 370 and Armada XP SoC support in the mainline Linux kernel, we will give an overview of those changes and summarize the new rules for ARM Linux support. We aim at helping developers willing to add support for new ARM SoCs in the Linux kernel by providing a check-list of things to do.
6 Steps to follow to get a minimal Linux image boot on a new ARM SoC
Here’s a summary of the main steps to go through to port a new SoC to ARM Linux:
Minimal image – Write your device tree (arch/arm/boot/dts), implement basic initialization C and header files (arch/arm/mach-foo), the timer driver (drivers/clocksource), the IRQ controller driver (drivers/irqchip), earlyprintk support (arch/am/include/debug), and the serial port driver (drivers/tty/serial)
More core infrastructure – Add pin muxing control (drivers/pinctrl), clocks (drivers/clk), and GPIO (drivers/gpio)
More drivers, advanced features – Add the network driver (drivers/net), SPI controller driver (drivers/spi), SMP support, SATA controller driver (drivers/ata), Power management, and other drivers.
In all the steps above, each driver must have its own device tree binding. and they cannot include <mach/something.h> anymore as they must be supported by different platforms without having to rebuild them. Device tree is now compulsory for all new SoC, and it you have old code for an existing SoC, it’s very likely you’ll have to start from scratch due to device tree and the many changes that occurred in the kernel in the last two years.
Many ARM SoCs still do not comply with the current best practices, and Thomas recommends to have a look at the following implementations to get started:
arch/arm/mach-highbank
arch/arm/mach-socfpga
arch/arm/mach-bcm2835 (So having a Raspberry Pi might be a good idea to learn and experiment about device tree)
arch/arm/mach-mxs
arch/arm/mach-mvebu
You can also download the slides for this presentation.
Ambarella has recently today introduced the A9 camera System on Chip (SoC) with support for the new 4K Ultra HD video standard in order to power next generation of mirrorless, sports, and digital still cameras. Ambarella A9 SoC features two ARM Cortex A9 cores (surprisingly), as well as Ambarella Image and Video DSPs.
Ambarella A9 4K Development Platform
The A9′s video features include video timelapse modes, capture of high-resolution still images during video recording, Electronic Image Stabilization (EIS), and burst capture of up to sixty 12-megapixel still images per second. Ultra-wide angle and small form factor lenses are supported with full lens distortion correction. The A9 also support High Dynamic Range (HDR) video.
Ambarella A9 Feature Summary:
4K Ultra HD video recording @ 30 fps.
High definition video recording at 720p @ 240fps and 1080p @ 120fps.
Burst mode support for still image capture of over 700 Megapixels per second.
Multi-exposure High Dynamic Range (HDR) imaging support, including local tone mapping, preserves image details in high contrast scenes.
Electronic Image Stabilization (EIS) with rolling shutter correction.
3D Motion-Compensated Temporal Filtering (MCTF) with de-ghosting for reduced artifacts and low light performance.
Support for applications including wireless preview, playback, and upload of stills and videos to a smartphone or directly to the Internet over WiFi.
Interfaces such as DDR3L, USB 2.0 host, HDMI, and SDXC SD card.
Low power – <1W for 1080p60 encode, <2W for Ultra HD 4K encode.
Ambarella A9 Block Diagram
The company provide an A9 development platform (First picture above) with a main board and a sensor board with C/CS mount lens. Sensors are available from Aptina, OmniVision, Samsung, Sony… The software development kit includes royalty-free libraries for ISP, 3A, & codecs, a DV/DSC camera sample application with full source code, as well as a middleware API library suite. Ambarella also provides full documentation both for software (Programmer’s guide, application notes, API documents), and hardware design (SoC data sheet, BOM, schematics and layout files).
The A9 SoC is available now at an undisclosed price. Further details can be found on Ambarella product brief.
InfoTMIC has recently launched the iMAPx15 SoC featuring 2 Cortex A5 and a Mali-400 GPU. Infotmic iMAPx15 is a low cost version of iMAPx820 that is cost optimized for tablets, and lacks features such as SATA and GPS.
Charbax interviewed InfoTMIC marketing director at CES 2013, where they discussed the new processor, and showcased a 7″ Android 4.1 tablet powered by iMAPx15 that is said to cost just $35. The device is not sold on Chinese websites yet, so I could not confirm this claim. At first, I thought it would be unlikely to be the retail price, but there are some 7″ Android tablets selling for about $40 on Aliexpress (Update: The sellers at this price don’t have feedback, so those could be scams). So the $35 price tag could either be the unit price for 1K orders or the retail price in China.
iMAPx15 is not listed on the company website, but I could still gather the specs from the video:
Processor – 2 Cortex A5 cores up to 1.2 GHz
GPU – Mali 400 GPU up to 400 MHz
Video
FULL-HD (1080p) video decoder (multiple codecs)
FULL-HD (1080p) encoder (H.264)
JPEG Decoder & Encoder
Video Out – HDMI 1.4A, RGB / I80 / TV_IF
CAMERA I/F
Memory Controller – DDR/DDR2/DDR3 & LPDDR
USB – 2x USB2.0 host & 1x USB OTG
Process – TSMC 40LP
Package – TFBGA 14x14mm 0.65mm pitch
InfoTMIC also plans to release a Quad Core Cortex a9 later this year.
Intel has recently introduced the Intel Atom S1200 product family (Codename: Centerton) targeting high-density microservers (1000+ nodes per rack), and energy-efficient storage and networking systems. These new processors includes features such as error code correction, 64-bit support, and virtualization technologies required for use inside data centers, and consume as low as 6.1 watts.
Three models are currently available:
Intel Atom S1220 @ 1.6 GHz – TDP 8.1 Watts
Intel Atom S1240 @ 1.6 GHz – TDP 6.1Watts
Intel Atom S1260 @2.0 GHz – TDP 8.5Watts
The SoCs include 2 physical cores and 4 threads enabled with Hyper-Threading Technology. The SoCs also include 64-bit support, a memory controller supporting up to 8GB of DDR3 memory, Intel Virtualization Technologies (Intel VT), 8 lanes of PCI Express 2.0, Error-Correcting Code (ECC) support, and other I/O interfaces integrated from Intel chipsets. Atom S1200 processors are manufactured using 32nm process technology.
Intel also announced that more than 20 low-power designs including microservers, storage and networking systems use the Intel Atom processor S1200 processor family from companies such as Dell, HP and Huawei. Those implementations leverage existing operating systems such as Red Hat and Windows Server 2012.
Looking ahead, Intel is working on the next generation of Intel Atom processors for microservers codenamed “Avoton”, which will use 3-D Tri-gate 22 nm transistors to provide better performance per watt for light scale-out apps such as simple content delivery solutions.
This December is a busy month for silicon manufacturers and Cortex A7 processor, after AllWinner A20 and A31, Rockchip RK3188 (4x Cortex A9), Qualcomm MSM8226 & MSM8626, Broadcom BCM21664T (2x Cortex A9), MediaTek announced MT6589, a quad-core Cortex A7 System on a Chip (SoC) with Imagination Technologies PowerVR Series5XT GPU that targets mid to high-end Android smartphones and tablets.
Mediatek MT6589 also integrates a multi-mode UMTS Rel. 8/HSPA+/TD-SCDMA modem developed in-house, Mediatek’s 4-in-1 connectivity combo (802.11n Wi-Fi, BT4.0, GPS and FM), and a multimedia subsystem that supports 1080p 30fps/30fps low-power video playback and recording, a 13MP Camera with Integrated ISP, up to FHD (1920×1080) LCD displays, and enhanced picture processing for DTV-grade image quality. This SoC also features MediaTek’s “Cool 3D” suite for support for stereo 3D cameras and displays & real-time 2D-to-3D, as well as support for Miracast technology.
The first devices based on MediaTek MT6589 should be available in Q1 2013.
Engadget had a sample smartphone, and compared the performance to existing dual and quad core Cortex A9 processor with several benchmarks (Antutu, Vellamo and Quadrant). The results show that, as expected, a quad core Cortex A7 can’t quite match the performance of quad core Cortex A9 processor in any of the benchmark, but is still significantly faster than a dual core Cortex A9 according to Antutu 2 & 3, but still slower with Quadrant and Vellamo. This probably depends on how well different benchmark handle multi-cores, and the weight given to the GPU and other metrics.
Several tablets based on AllWinner A31 quad core processor have been announced this week, such as Onda V972, but we did not really have full details on the processor. We now know more since AllWinner added product pages for two new (sun6i architecture. [Edit: A20 is actually sun7i...]) processors: AllWinner A31 and AllWinner A20.
AllWinner A31 Specifications
AllWinner A31 is a quad core Cortex A7 processor with PowerVR SGX544MP2 GPU (8 shader engines).
CPU – ARM Cortex-A7 Quad-Core with 256KB L1-Cache/1MB L2-Cache
GPU – POWER VR SGX 544 with Eight logic cores. Open GL ES2.0, Open CL1.x and DX 9_3 compliant.
Complies with RTSP, HTTP, HLS, RTMP, MMS streaming media protocol
Display
Dual-Channel LVDS 1080@60fps
4-lane MIPI DSI 1920 × 1200@ 60fps
Dual-Channel RGB/CPU 2048 ×1536@60fps
Integrated HDMI 1.4 4K ×2K@ 30fps
Camera
Integrated Parallel & MIPI I/F sensor
Integrated Powerful ISP, supporting Raw Data CMOS sensor
5M/8M/12M CMOS Sensor supported
8/10/12-bit RGB Bayer sensor supported
PMIC – PMIC AXP221 designed for A31. 21-CH power output and 2.2A Flash charging. Complies with USB 3.0 power supply standard
Audio – Integrated HI-FI 100dB Audio Codec, and Three MIC including one MIC with Noise cancellation
The platform supports Android 4.2 and Microsoft Windows RT, but there’s no word about Linux. More on that at the end of the post.
AllWinner A20 Specifications
AllWinner A20 is a dual core Cortex A7 processor with a dual core Mali-400 GPU.
CPU – ARM Cortex-A7 Dual Core with 512MB L2-Cache*/128KB L1-Cache (* As per AllWinner A20 page, but this should most definitely read as “512KB L2-Cache”)
GPU – ARM Mali400 MP2
Memory – LPDDR2/DDR3/DDR3L controller, NAND Flash controller and 64-bit ECC
Video
HD H.264 2160P video decoding
Full HD video decoding
BD Directory, BD ISO and BD m2ts video decoding
H.264 High Profile 1080P@30fps encoding
3840×1080@30fps 3D decoding
Complies with RTSP, HTTP,HLS,RTMP,MMS streaming media protocol
Display
Support multi-channel HD display
Integrated HDMI 1.4
CPU/RGB/LVDS LCD interface 1920×1080 resolution
CVBS/YPbPr/VGA support
Integrated TV decoder
Camera
Integrated parallel 8-bit I/F YUV sensor
Integrated 24-bit parallel YUV 444 I/F
5M/8M CMOS sensor support
Dual-sensor support
Audio
Integrated HI-FI 100dB Audio Codec
Dual MIC noise cancellation
AllWinner A20 supports Android 4.2 or above. AllWinner A20 is also pin-compatible with AllWinner A10, so existing products may soon be available for this low cost version. I still could not find any CPU clock details for either processor.
AllWinner A31 is clearly destined at higher products with both Android and Windows RT, whereas AllWinner A20 is a low cost version for Android tablets and set-top boxes.
Linux is not mentioned for any of sun6i processors, as AllWinner does not appear have Linux SDK, and Alejandro Mery – one of the main developers at sunxi-linux.org – said the community does not have any source for sun6i at the moment. Proper Linux support would be difficult for A31 due to the Power VR GPU, and it’s more likely work could be done on AllWinner A20, if GPL sources are made available.
Embedded Platforms
Technology providers are developing components, modules, or even complete embedded platforms (software + hardware) with higher levels of integration and increased functionality to speed up time to market. System-on-Chip (SoC) and System-on-Module (SoM) benefit from this trend and some also embed a FPGA.
Reconfigurable Computing
Previously, designers chose between low-cost microcontroller or high performance CPU based on the expected performance needs of the embedded system. As cost decreases and performance increases, low cost devices such as control and monitoring systems now often come with more features thanks to the use of programmable logic. This type of flexibility can be achieved by adding an FPGA to the MCU / MPU in the embedded systems platform.
Typical Reconfigurable Computing Architecture
Mobile Devices and the Cloud
Design teams are taking advantage of new mobile devices and cloud technologies within embedded systems. NI shows the smartphone industry has dramatically changed between 2009, where Symbian phones prevailed and 2011, where Android devices had the largest market share, but the market is still very much fragmented and will continue to be in the years ahead. NI then talks about the cloud, the security issues that arises for embedded systems and the need to support multiple platforms with technologies such as HTML5.
Business Strategies and Processes
Innovating with smaller teams
Small teams are emerging around the world and are proving that innovation can happen just as fast, if not faster, in smaller design teams. This is mainly possible thanks to off-the-shelf solutions and tools such as NI LabVIEW instead of having to design those in-house. Those tools allow companies to move to smaller teams as shown in the diagram below.
Embedded Systems Development: Large Teams vs Small Teams
Future proofing through software
Many embedded developers have adopted a software-first philosophy for upgrading products over time in order to match customer expectations for data visibility, connectivity, and performance. For most embedded systems, the expectations for longevity of design and service life remain well over a decade. NI shows 2 future-proof examples: Smart Grid and Software Defined Radio (SDR). The company also explains how to future-proof your design by selecting software-definable hardware (e.g. DSP / FPGA instead of ASiC) , allowing update over the air (OTA) or via USB stick, and by selecting the right toolchain.