Linux Software User Manual For STreamPlug ST2100

Transcription

UM1942User manualLinux software user manual for STreamPlug ST2100IntroductionThe STreamPlug ST2100 is a highly integrated SoC including an ARM -based core, a wideset of peripherals and a PLC modem supporting the HomePlug AV standard. The fullconfiguration of STreamPlug software is composed of three most important components asshown in Section 1: STreamPlug full software architecture on page 10: theSTMicroelectronics interface layer with the core scheduler, the system software and OKLinux , (i.e.: a Linux kernel over the hypervisor provided by Open Kernel Labs, Inc. (OKLabs), now General Dynamics Broadband). The minimal configuration of the STreamPlugsoftware includes the native Linux kernel running after the boot, without the core schedulerand hypervisor. This configuration is called also “native Linux” or “native” in followingsections.This document is not intended to be a tutorial on the Linux operating system or embeddedsoftware design/development. It only covers topics that are specific to use the STreamPlugLinux.November 2015DocID028276 Rev 11/220www.st.com220

ContentsUM1942Contents1STreamPlug full software architecture . . . . . . . . . . . . . . . . . . . . . . . . . 102Linux OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Linux support package (LSP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133.13.23.33.43.543.1.1Platform software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133.1.2Platform kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . . 143.1.3Platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Board support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.2.1Board registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.2.2Board compilation support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Pad multiplexing support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.3.1Pad software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.3.2Pad kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.3.3Pad usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Clock framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243.4.1Clock framework software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 243.4.2Clock framework kernel source and configuration . . . . . . . . . . . . . . . . . 263.4.3Clock framework internals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263.4.4Clock framework usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Real-time clocks (RTC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303.5.1RTC software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313.5.2RTC kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 313.5.3RTC platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323.5.4RTC usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Communication drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344.12/220Platform description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Gigabit media access controller (GMAC) - Ethernet . . . . . . . . . . . . . . . . 344.1.1GMAC software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344.1.2GMAC kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . . . . 364.1.3GMAC platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374.1.4GMAC usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37DocID028276 Rev 1

UM1942Contents4.24.34.44.54.64.74.8Universal serial bus (USB) host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384.2.1USB host kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . 394.2.2USB host platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414.2.3USB host usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Universal serial bus (USB) device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454.3.1USB device software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464.3.2USB device kernel source and configuration . . . . . . . . . . . . . . . . . . . . . 474.3.3USB device platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474.3.4USB device usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494.3.5USB platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534.3.6USB platform usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54I2 Ccontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594.4.1I2C controller hardware overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594.4.2I2C controller software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604.4.3I2C controller kernel source and configuration . . . . . . . . . . . . . . . . . . . . 614.4.4I2C controller platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . 614.4.5I2C controller usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62Serial peripheral interface (SPI) controller . . . . . . . . . . . . . . . . . . . . . . . . 674.5.1SPI software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684.5.2SPI kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . 724.5.3SPI platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724.5.4SPI usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74Linux TTY framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744.6.1Linux TTY framework software overview . . . . . . . . . . . . . . . . . . . . . . . . 744.6.2Linux TTY framework kernel source . . . . . . . . . . . . . . . . . . . . . . . . . . . 744.6.3Linux TTY framework usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74Universal asynchronous receiver/transmitter (UART) . . . . . . . . . . . . . . . 764.7.1UART software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774.7.2UART kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . . . . 784.7.3UART platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784.7.4UART usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79Control area network (CAN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794.8.1CAN software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794.8.2CAN kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 804.8.3CAN platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 814.8.4CAN usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82DocID028276 Rev 13/220220

ContentsUM19424.94.104.115Fast infrared data association (FIrDA) . . . . . . . . . . . . . . . . . . . . . . . . . . . 834.9.1FIrDA software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 834.9.2FIrDA kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . . . . 834.9.3FIrDA platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844.9.4FIrDA usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Peripheral component interconnect express (PCIe) . . . . . . . . . . . . . . . . . 904.10.1PCIe software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 904.10.2PCIe kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 974.10.3PCIe platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 984.10.4PCIe usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100Serial advanced technology attachment (SATA) . . . . . . . . . . . . . . . . . . 1004.11.1SATA software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1004.11.2SATA kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . . . . 1014.11.3SATA platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1014.11.4SATA usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101Memory technology devices (MTD) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1075.1Linux MTD framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107MTD kernel configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1075.25.35.44/220Accessing to MTD devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1085.2.1Raw access from user space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1085.2.2Raw access from kernel space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1085.2.3Access through file system from user space . . . . . . . . . . . . . . . . . . . . 112Flexible static memory controller (FSMC) . . . . . . . . . . . . . . . . . . . . . . . .1125.3.1NAND, FSMC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1135.3.2Parallel NOR, FSMC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1165.3.3Static RAM (SRAM), flexible static memory controller . . . . . . . . . . . . . 119Serial memory interface (SMI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1225.4.1SMI hardware overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1225.4.2SMI software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1235.4.3SMI kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 1245.4.4SMI platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124DocID028276 Rev 1

UM19426ContentsAccelerators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1276.16.26.37JPEG encoder/decoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1276.1.1JPEG encoder/decoder software overview . . . . . . . . . . . . . . . . . . . . . 1276.1.2JPEG encoder/decoder kernel source and configuration . . . . . . . . . . 1286.1.3JPEG encoder/decoder platform configuration . . . . . . . . . . . . . . . . . . 1286.1.4JPEG encoder/decoder usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128Direct memory access (DMA) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1396.2.1DMA hardware overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1406.2.2DMA software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1406.2.3DMA kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . . . . 1446.2.4DMA platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1446.2.5DMA usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145Channel controller coprocessor (C3) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1476.3.1C3 software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1486.3.2C3 kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . 1486.3.3C3 platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1506.3.4C3 usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150Frame buffer drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153Color liquid crystal display (CLCD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153CLCD software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153CLCD kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153CLCD usage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1568Miscellaneous devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1588.18.2General purpose input/output (GPIO) . . . . . . . . . . . . . . . . . . . . . . . . . . 1588.1.1GPIO software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1588.1.2GPIO kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . . . . 1598.1.3GPIO platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1608.1.4GPIO usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160Application specific GPIO (AS GPIO) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1628.2.1AS GPIO software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1628.2.2AS GPIO kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . 1638.2.3AS GPIO platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1638.2.4AS GPIO usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164DocID028276 Rev 15/220220

ContentsUM19428.39Watchdog timer (WDT) driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1688.3.1WDT software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1688.3.2WDT kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . . . . 1698.3.3WDT usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171Audio drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175SPORT controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175SPORT controller software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176SPORT controller kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . . 177SPORT controller platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178SPORT controller usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18010Video drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18110.1Video for Linux Two framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181Programming a V4L2 device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18210.210.311SoC-Camera framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19110.2.1Camera interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19310.2.2V4L2 subdev API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194Video transport stream (TS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19510.3.1TS software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19510.3.2TS kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . 19610.3.3TS platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19710.3.4TS usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199Virtualized devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20111.111.2KSP interface controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20211.1.1KSP software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20211.1.2KSP kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . . . . 20511.1.3KSP platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205Miscellaneous register access (Misc) . . . . . . . . . . . . . . . . . . . . . . . . . . . 205Misc software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20511.36/220Virtual log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20511.3.1Virtual log software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20611.3.2Virtual log kernel source and configuration . . . . . . . . . . . . . . . . . . . . . 20811.3.3Virtual log platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20811.3.4Virtual log usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209DocID028276 Rev 1

UM1942Contents11.411.511.6SMI/FSMC NAND memory shared access . . . . . . . . . . . . . . . . . . . . . . 20911.4.1SMI/FSMC NAND software overview . . . . . . . . . . . . . . . . . . . . . . . . . 20911.4.2SMI/FSMC NAND kernel source and configuration . . . . . . . . . . . . . . . 21011.4.3SMI/FSMC NAND platform configuration . . . . . . . . . . . . . . . . . . . . . . 210HomePlug AV (HPAV) driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21011.5.1HPAV software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21111.5.2HPAV kernel source and configuration . . . . . . . . . . . . . . . . . . . . . . . . 21211.5.3HPAV platform configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212Image validate device driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21311.6.1Image validate device driver software overview . . . . . . . . . . . . . . . . . 21411.6.2Image validate device driver kernel source and configuration . . . . . . . 21611.6.3Image validate device driver platform configuration . . . . . . . . . . . . . . 21611.6.4Image validate device driver usage . . . . . . . . . . . . . . . . . . . . . . . . . . . 216Appendix A Acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219DocID028276 Rev 17/220220

List of tablesUM1942List of tablesTable 1.Table 2.Table 3.Table 4.Table 5.Table 6.Table 7.Table 8.Table 9.Table 10.Table 11.Table 12.Table 13.Table 14.Table 15.Table 16.Table 17.Table 18.Table 19.Table 20.Table 21.Table 22.Table 23.Table 24.Table 25.Table 26.Table 27.Table 28.Table 29.Table 30.Table 31.Table 32.Table 33.Table 34.Table 35.Table 36.Table 37.Table 38.Table 39.Table 40.Table 41.Table 42.8/220Linux support package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Linux branches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14STreamPlug machine ID. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Command line options for padmux configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22RTC configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31STreamPlug STMMAC configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36USB host configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39USB gadget Linux kernel configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47Linux gadget framework API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52USB device control APIs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53I2C configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61SPI configurations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72CAN Linux kernel configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80FIrDA Linux kernel configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83PCIe configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97PCIe root complex configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98PCIe endpoint configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98SATA source code files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101Linux kernel configuration for SATA support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101MTD configurations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107FSMC NAND configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114FSMC NOR configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118FSMC SCRAM configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121SMI configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124JPEG driver configuration options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128DMA configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144C3 Linux kernel configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149CLCD configurations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153GPIO configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159AS GPIO configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163AS GPIO PWM prescaler configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166WDT Linux kernel configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169Watchdog IOCTLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171SPORT- I2S configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178TS Linux kernel configuration options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196Image sensor delay parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199KSP agent controller configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205Virtual log configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208Virtual Ethernet configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212Image validity configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216List of acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219DocID028276 Rev 1

UM1942List of figuresList of figuresFigure 1.Figure 2.Figure 3.Figure 4.Figure 5.Figure 6.Figure 7.Figure 8.Figure 9.Figure 10.Figure 11.Figure 12.Figure 13.Figure 14.Figure 15.Figure 16.Figure 17.Figure 18.Figure 19.Figure 20.Figure 21.Figure 22.Figure 23.Figure 24.STreamPlug full software architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10RTC software stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Ethernet framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34USBD software architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Zero gadget device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49I2C framework architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60SPI master/slave connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67SPI framework architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68UART software system architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77NAND FSMC software stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114NOR FSMC stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117SRAM software stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120SMI software stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123JPEG software architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127DMA framework architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141GPIO software stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159Dual PWM GPIO example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167WDT software stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169ALSA framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176V4L2 software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181SoC-Camera interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191SoC-Camera software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192TS software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195HPAV stack software overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211DocID028276 Rev 19/220220

STreamPlug full software architecture1UM1942STreamPlug full software architectureThe interface layer with the core scheduler provides the necessary APIs to support thesystem software layer and the hypervisor. The system software provides the core softwarewhich implements the HPAV/1901/GP MAC as well as the supporting modules. The OKLinux consists of a collection of all the Linux (2.6.35.0) device drivers that control thespecific hardware controllers embedded in the STreamPlug board and the virtualizationtechnology provided by the OKL, (i.e.: the OKL4 Microvisor). Using the OKL technology tohost a Linux guest OS confers the following benefits: Linux applications can run on the same processor side by side with legacy applicationsand legacy OSes. Concurrent support for two OS environments eliminates the need for eithermultiprocessor hardware or porting the legacy system to the Linux OS. Using “Secure HyperCellTM Technology”, OKL4 native cells can complement the Linuxvirtual machine (VM) by providing an execution environment with better real-timeproperties and stronger security.OKL4 cells are well suited to hosting real-time OSes, easing implementation of latencysensitive functions without sacrificing the rich ecosystem support available for the Linux.Figure 1. STreamPlug full software architectureLinuxapplicationsSystem softwareHPAV/1901/GPMACOK LinuxkernelSupport modules:Hypervisor· Boot· Firmware upgrade· Production testInterface layer / core schedulerAM03981310/220DocID028276 Rev 1

UM19422Linux OSLinux OSThe Linux supplied w

November 2015 DocID028276 Rev 1 1/220 220 UM1942 User manual Linux software user manual for STreamPlug ST2100 Introduction The STreamPlug ST2100 is a highly integrated SoC including an ARM -based core, a wide set of peripherals and a PLC modem supporting the HomePlug AV standard.