CM-QS600: Android: Enabling platform features

From Compulab Mediawiki
Revision as of 11:59, 21 October 2015 by Grinberg (talk | contribs) (SPI / UART interface multiplexing)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview

Current Android for CM-QS600 feature coverage is specified in OS support coverage map.
CompuLab provides ready to run prebuilt Android images, and source code, that contain all the modifications and additions made to enable proper operation on the CM-QS600 module.
This page provides developer insight into some of the available features, especially those that share the same hardware resources, or are disabled by default. Operating instructions page may be considered complimentary to this page.

Enabling platform features

Start-up script

/system/etc/startup-svc.sh script is run upon system boot by Android init process with root permissions.
Prior to attempting editing the script, remount system partition 'rw', issuing on a PC workstation:

$ adb remount

SPI / UART interface multiplexing

CPU GPIOs 10, 11, 12, 13 are routed to carrier board interface connector (P1) pins 70, 72, 68, 66 respectively. On SB-QS600 baseboard these pins are routed to P9 connector pins 5, 7, 3, 1 respectively.
These GPIO pins can be configured to serve as one of the following:

  • SPI.0 SPI bus (default)
  • /dev/ttyHSL1 UART interface

SPI.0

By default, SPI.0 is routed via GPIOs 10, 11, 12, 13:
GPIO 10: MOSI
GPIO 11: MISO
GPIO 12: nCS
GPIO 13: Clk

UART (/dev/ttyHSL1)

Alternatively, /dev/ttyHSL1 UART interface can be routed via GPIOs 10, 11:
GPIO 10: TX
GPIO 11: RX

In order to override the default routing, the kernel should be rebuilt with patched CM-QS600 board file kernel/arch/arm/mach-msm/board-cm-qs600.c:

--- HEAD.board-cm-qs600.c	2015-09-22 14:43:06.990432575 +0300
+++ board-cm-qs600.c	2015-09-22 14:43:23.102432877 +0300
@@ -78,3 +78,3 @@
  */
-#define CM_QS600_GSBI4_AS_SPI
+/* #define CM_QS600_GSBI4_AS_SPI */


Admolition warning.png In case CSI camera is enabled, GPIOs 10, 11, 12, 13 will be consumed by camera designated I2C bus communication.

OV5640 CSI camera

OV5640 CSI camera has been tested with CM-QS600 Evaluation system.
In order to connect OV5640 to CM-QS600 Evaluation system, a designated wire-up will be required. It is recommended to apply for hardware support for further details.
In order to enable OV5640 camera module, the kernel should be reconfigured and rebuilt.
In the kernel configuration menu select Device Drivers ---> Multimedia support ---> Video capture adapters ---> V4L platform devices submenu, and enable

  • CONFIG_MSM_CAMERA - Qualcomm MSM camera and video capture support
    • OV5640_V4L2 - Sensor OV5640 (YUV 5M)
    • CONFIG_MSM_CAMERA_SENSOR - Qualcomm MSM camera sensor support
    • CONFIG_MSM_ACTUATOR - Qualcomm MSM actuator support
    • CONFIG_MSM_CSI20_HEADER - Qualcomm MSM CSI 2.0 Header
  ┌────────────────────────────── V4L platform devices ──────────────────────────────┐
  │ ┌──────────────────────────────────────────────────────────────────────────────┐ │  
  │ │    --- V4L platform devices                                                  │ │  
  │ │    < >   Marvell 88ALP01 (Cafe) CMOS Camera Controller support               │ │  
  │ │    < >   SoC camera support                                                  │ │  
  │ │          *** Qualcomm MSM Camera And Video ***                               │ │  
  │ │    [*]   Qualcomm MSM camera and video capture support  --->                 │ │  
  │ │          *** Camera Sensor Selection ***                                     │ │  
  │ │    [ ]   Sensor IMX074 (BAYER 13.5M) (NEW)                                   │ │  
  │ │    [ ]   Sensor ov5647 (BAYER 5M) (NEW)                                      │ │  
  │ │    [*]   Sensor OV5640 (YUV 5M)                                              │ │  
  │ │    [ ]   Sensor MT9M114 (YUV 1.26M) (NEW)                                    │ │  
  │ │    [ ]   Actuator IMX074 (BAYER 13.5M) (NEW)                                 │ │  
  │ │    [ ]   Sensor Sensor s5k4e1 (Samsung 5M) (NEW)                             │ │  
  │ │    [ ]   Qualcomm MSM camera sc628a flash support (NEW)                      │ │  
  │ │    [ ]   Qualcomm MSM camera tps61310 flash support (NEW)                    │ │  
  │ │    [ ]   Sensor imx072 (Sony 5M)                                             │ │  
  │ │    [ ]   Sensor ov2720 (Omnivision 2MP) (NEW)                                │ │  
  │ │    [ ]   Sensor ov8825 (Omnivision 8M) (NEW)                                 │ │  
  │ │    [ ]   Sensor imx135 (Sony 13MP) (NEW)                                     │ │  
  │ │    [ ]   Sensor ov9724 (Omnivision 1.3M) (NEW)                               │ │  
  │ │    [ ]   Qualcomm MSM camera flash support                                   │ │  
  │ │    [*]   Qualcomm MSM camera sensor support                                  │ │  
  │ │    [*]   Qualcomm MSM actuator support                                       │ │  
  │ │    [ ]   Qualcomm MSM EEPROM support (NEW)                                   │ │  
  │ │    [ ]   IMX074 EEPROM support (NEW)                                         │ │  
  │ │    [ ]   IMX091 EEPROM support (NEW)                                         │ │  
  │ │    < >   Qualcomm MSM Gemini Jpeg Engine support (NEW)                       │ │  
  │ │    < >   Qualcomm MSM Mercury Jpeg Decoder Engine support (NEW)              │ │  
  │ │    [ ]   Enable MSM CAM IRQ Router (NEW)                                     │ │  
  │ │    [ ]   Qualcomm MSM Camera Post Processing Engine support (NEW)            │ │  
  │ │    [ ]   Qualcomm MSM Camera Control Interface support (NEW)                 │ │  
  │ │    [ ]   QUP exclusive to camera                                             │ │  
  │ │    [*]   Qualcomm MSM CSI 2.0 Header                                         │ │  
  │ │    [ ]   Qualcomm MSM CSI 3.0 Header (NEW)                                   │ │  
  │ │    [ ]   Qualcomm MSM Camera Serial Interface Physical receiver support (NEW)│ │  
  │ │    [ ]   Qualcomm MSM Camera Serial Interface decoder support (NEW)          │ │  
  │ │    [ ]   Qualcomm MSM CSI2 Register (NEW)                                    │ │  
  │ │    [ ]   Qualcomm MSM Image Signal Processing interface support (NEW)        │ │  
  │ │    [ ]   Sensor S5K3L1YX (BAYER 12M) (NEW)                                   │ │  
  │ │    [ ]   Sensor imx091 (Sony 13MP) (NEW)                                     │ │  
  │ │    < >   Qualcomm MSM V4l2 video overlay device                              │ │  
  │ │    [ ]   Sensor OV7692 (VGA YUV) (NEW)                                       │ │  
  │ └──────────────────────────────────────────────────────────────────────────────┘ │  
  ├──────────────────────────────────────────────────────────────────────────────────┤  
  │                         <Select>    < Exit >    < Help >                         │  
  └──────────────────────────────────────────────────────────────────────────────────┘  

Additionally, in the kernel configuration menu select Device Drivers ---> Multimedia support ---> Video capture adapters ---> V4L platform devices ---> Qualcomm MSM camera and video capture support submenu, and enable

  • CONFIG_MSM_CAMERA_DEBUG - Qualcomm MSM camera debugging with printk (optional)
  • CONFIG_MSM_CAMERA_V4L2 - MSM Camera V4L2 Interface
  ┌───────────────── Qualcomm MSM camera and video capture support ──────────────────┐
  │ ┌──────────────────────────────────────────────────────────────────────────────┐ │  
  │ │    --- Qualcomm MSM camera and video capture support                         │ │  
  │ │    [*]   Qualcomm MSM camera debugging with printk                           │ │  
  │ │    [*]   MSM Camera V4L2 Interface                                           │ │  
  │ │                                                                              │ │  
  │ └──────────────────────────────────────────────────────────────────────────────┘ │  
  ├──────────────────────────────────────────────────────────────────────────────────┤  
  │                         <Select>    < Exit >    < Help >                         │  
  └──────────────────────────────────────────────────────────────────────────────────┘  

In addition to enabling the kernel support, mm-qcamera-daemon proprietary camera service, with ov5640 add-on built in, should be run by Android init system.

See also