Difference between revisions of "Lindenis V833"

From Lindenis Wiki
Jump to: navigation, search
(Professional Image Effects)
(Support lists)
 
(130 intermediate revisions by the same user not shown)
Line 49: Line 49:
  
 
=== Various interfaces ===
 
=== Various interfaces ===
 +
*Wi-Fi : XR819
 +
*BT1120 IN/OUT
 +
*SPK, LINE-IN
 +
*MIPI CSI, MIPI DSI, TP
 +
*KEY, POWER_KEY, FEL
 +
*Network: 10/100Mbps Ethernet
 +
*USB: 1 x Micro USB, TF card
 +
*Power Supply: 5V/2A micro USB, 5V/2A DC-IN, 3.7V Battery
 +
 
=== Software Support ===
 
=== Software Support ===
 +
*Tina (base on linux-4.9)
 +
*RTOS
  
 
== Target Applications ==
 
== Target Applications ==
 +
*SDV
 +
*Smart IPC
 +
*Smart Camera
 +
 
== Accessories Step-by-Step Guides ==
 
== Accessories Step-by-Step Guides ==
 
=== Power Supply ===
 
=== Power Supply ===
 +
* [http://files.lindeni.org/lindenis-v5/accessories/Power-Supply-Brief.pdf 5V 2A Power Supply]
 +
 
=== LCD ===
 
=== LCD ===
 +
* [http://files.lindeni.org/lindenis-v5/accessories/LCD-with-CTP-Brief.pdf 5" 720P LCD with CTP brief]
 +
 
== Hardware Specification ==
 
== Hardware Specification ==
 
=== Board Features ===
 
=== Board Features ===
 
==== Video Out ====
 
==== Video Out ====
 +
* MIPI-DSI, 4 lanes, up to 1080P
 +
* LCD interface
 +
* BT1120 OUT
 +
 
==== Video In ====
 
==== Video In ====
 +
*1 x MIPI-CSI - Camera interface, 4 lanes per channel
 +
*BT1120 IN
 +
 
==== Audio ====
 
==== Audio ====
 +
* 3.5mm Line in
 +
* SPK
 +
* 1 x mic
 +
 
==== Network ====
 
==== Network ====
 +
*10/100/100 Ethernet
 +
*WiFi 2.4G
 +
 
==== Storage ====
 
==== Storage ====
 +
*MicroSD Card bootable, support SDHC and SDXC, storage up to 256GB
 +
 
==== Expansion Ports ====
 
==== Expansion Ports ====
 +
*Flexible Pin Headers 2x13 pins Reserved:
 +
**GPADC
 +
**5V, 1V8, 2V8 and DC Power Supply
 +
**I2C x 1
 +
**I2S x 1
 +
**PWM x 1
 +
 
=== Board Information ===
 
=== Board Information ===
 +
*Board Dimensions: 75mm x 68mm
 +
*Input Power: 5V@2A micro USB connector, 3.7V Li-Ion battery connector
 +
 +
== Hardware Documents ==
 +
[https://pan.baidu.com/s/1cTkQgnzye76T_utRm8eNzg 国内开发者可在云盘下载全部硬件资料文档] (提取码:v833)
 +
====Datasheets====
 +
-------------------------------------------------------------------------------------------------------------------------------------------------
 +
* [http://files.lindeni.org/lindenis-v833/Documents/Hardware_Res/Spec/V833_Datasheet_V1.1.pdf V833 Datasheet]
 +
* [http://files.lindeni.org/lindenis-v833/Documents/Hardware_Res/Spec/V833_PINOUT_V1.1.xls V833 PINOUT V1.1]
 +
* [http://files.lindeni.org/lindenis-v833/Documents/Hardware_Res/Spec/AXP2101_datasheet_linearcharger_V0.2.pdf PMIC AXP2101 Datasheet]
 +
* [http://files.lindeni.org/lindenis-v833/Documents/Hardware_Res/Spec/XR819_Datasheet.pdf XR819 WIFI Datasheet]
 +
* [http://files.lindeni.org/lindenis-v833/Documents/Hardware_Res/Spec/IP101GR.PDF Ethernet Transceiver Datasheet]
 +
* [http://files.lindeni.org/lindenis-v833/Documents/Hardware_Res/Spec/MX25L12835FM2I-10G.PDF SPI NOR Flash MX25L12835FM2I-10G Datasheet]
 +
 +
====Schematic and Silk====
 +
-------------------------------------------------------------------------------------------------------------------------------------------------
 +
* [http://files.lindeni.org/lindenis-v833/Documents/Hardware_Res/Schematic_and_Silk/v833_Lindenis_SBC_V2_0_Schematic.pdf v833_Lindenis_SBC_V2_0_Schematic.pdf]
 +
* [http://files.lindeni.org/lindenis-v833/Documents/Hardware_Res/Schematic_and_Silk/v833_Lindenis_SBC_V2_0_SILK_TOP.pdf v833_Lindenis_SBC_V2_0_SILK_TOP.pdf]
 +
* [http://files.lindeni.org/lindenis-v833/Documents/Hardware_Res/Schematic_and_Silk/v833_Lindenis_SBC_V2_0_SILK_BOTTOM.pdf v833_Lindenis_SBC_V2_0_SILK_BOTTOM.pdf]
 +
 +
====Support lists====
 +
-------------------------------------------------------------------------------------------------------------------------------------------------
 +
* [http://files.lindeni.org/lindenis-v833/Documents/Hardware_Res/Support_list/Allwinner_V833_SDRAM_Support_List_V1.14.pdf v833 SDRAM support list]
 +
* [http://files.lindeni.org/lindenis-v833/Documents/Hardware_Res/Support_list/Allwinner_V833_eMMC_Flash_Support_List_v1.2.pdf v833 eMMC support list]
 +
* [http://files.lindeni.org/lindenis-v833/Documents/Hardware_Res/Support_list/Allwinner_V833_V831_RAW_Sensor_Support_List_V1.02.pdf v833 camera sensor support list]
 +
* [http://files.lindeni.org/lindenis-v833/Documents/Hardware_Res/Support_list/Allwinner_V833_V831_SPI_NAND_Flash_Support_List_v1.01.pdf v833 SPI NAND flash support list]
 +
* [http://files.lindeni.org/lindenis-v833/Documents/Hardware_Res/Support_list/Allwinner_V833_V831_SPI_NOR_Flash_Support_List_V1.2.pdf v833 SPI NOR flash support list]
  
== Datasheet ==
 
 
== SDK ==
 
== SDK ==
=== Overview ===
+
===== Host PC requirements =====
==== Features ====
+
Listed below are the recommended requirements for downloading and building the SDK:
==== Layout ====
+
* CPU: x86_64 or better family processor
=== Download and Build ===
+
* Memory: 8GB or higher
==== Prebuilt Image ====
+
* Disk: 20GB free hard disk space, if you build it in a Virtual machine, I recommand you allocate a 30G virtual hard disk.
==== System requirements ====
+
** The Whole SDK is about 15G.
 +
* OS: Ubuntu 14.04 (tested) or higher
 +
* Network: internet connection
 +
 
 +
===== Linux host setup =====
 +
Ubuntu 14.04
 +
 
 +
''HINT: later version should also work.''
 +
 
 +
'''Install prerequisites'''
 +
 
 +
<pre>
 +
$ sudo apt-get update
 +
$ sudo apt-get install build-essential libncurses5-dev zlib1g-dev gawk git git-core ccache gettext libssl-dev xsltproc gperf subversion
 +
$ sudo dpkg --add-architecture i386
 +
$ sudo apt-get update
 +
$ sudo apt-get install lib32z1 lib32ncurses5 libc6:i386 libstdc++6:i386
 +
</pre>
 +
 
 +
'''Sudo without password'''
 +
 
 +
<pre>
 +
$ sudo visudo
 +
</pre>
 +
 
 +
Add this line at the end (change “tom” to your username):
 +
<pre>tom ALL=(ALL) NOPASSWD: ALL</pre>
 +
Ctrl-X to leave, save your changes, and you're done!
 
==== Lazy Start ====
 
==== Lazy Start ====
==== Linux host setup ====
+
 
==== Downloading ====
+
===Tina Linux===
==== Building ====
+
---------------------------------------------------------------------
===== Setup env =====
+
 
===== Build source =====
+
==== Tina Linux Overview ====
===== Build image =====
+
===== Features =====
==== Installation ====
+
* Linux Kernel 4.9 (official version)
 +
* u-boot-2018
 +
* ARM GCC based cross toolchain
 +
* Integrated build system
 +
 
 +
===== Layout =====
 +
<pre>
 +
├── build
 +
├── config
 +
├── Config.in
 +
├── dl
 +
├── lichee
 +
├── logs
 +
├── Makefile
 +
├── package
 +
├── prebuilt
 +
├── rules.mk
 +
├── scripts
 +
├── softwinner
 +
├── target
 +
├── toolchain
 +
└── tools
 +
</pre>
 +
 
 +
==== Download and Build ====
 +
===== Prebuilt Image =====
 +
For fast begin, you can download the prebuilt image here. [http://files.lindeni.org/lindenis-v833/Images Click me]<br>
 +
'''[https://pan.baidu.com/s/1VdzvOCWtEiGfgrEOG50EPg 国内开发者请在此下载]提取码:v833'''
 +
 
 +
===== SDK Source Code Downloading =====
 +
The SDK is available on [https://github.com/lindenis-org github]. For Chinese developer, it is available on [https://search.gitee.com/?skin=rec&type=repository&q=lindenis gitee] too.
 +
<br>由于国内从Github上下载速度较慢,建议从Gitee上下载 --> [http://wiki.lindeni.org/index.php/Lindenis_V833_Gitee Gitee下载说明]
 +
<br>
 +
<br>We use Repo manage Git repositories. Clone Repo from [https://android.googlesource.com/tools/repo android Git repositories] or other mirrors and install it.
 +
Becase there are some big files in the SDK, please run the following command before you start the downloading.
 +
<pre>
 +
$ git config --global http.postBuffer 524288000
 +
</pre>
 +
Then run this to check:
 +
<pre>
 +
$ git config --list
 +
</pre>
 +
 
 +
For Lindenis V833 SBC, download the SDK on Github via:
 +
 
 +
<pre>
 +
$ mkdir v833-lindenis
 +
$ cd v833-lindenis
 +
$ repo init -u https://github.com/lindenis-org/manifest.git -b v833 -m v833-lindenis.xml
 +
$ repo sync
 +
</pre>
 +
 
 +
And then download the listing files from cloud disk with access phrase '''v833'''. [https://seto.teracloud.jp/share/11929e1a57a2c0c7  Click me then enter "v833"]
 +
<br>
 +
'''If the link is invaild, please send e-mail to tell us. Here is the e-mail address: services@lindeni.com'''
 +
<pre>
 +
1. dl.tar.gz
 +
2. gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi.tar.xz
 +
3. libs.tar.gz
 +
</pre>
 +
Copy them into the target directory follow below steps:
 +
<pre>
 +
$ cp dl.tar.gz v833-lindenis
 +
$ tar xzvf dl.tar.gz dl/
 +
</pre>
 +
<pre>
 +
$ mkdir -p lichee/brandy-2.0/tools/toolchain
 +
$ cp gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi.tar.xz lichee/brandy-2.0/tools/toolchain/
 +
</pre>
 +
<pre>
 +
$ cp libs.tar.gz v833-lindenis/package/cortana/cortana-sdk/
 +
$ cd v833-lindenis/package/cortana/cortana-sdk
 +
$ tar xzvf libs.tar.gz libs/
 +
</pre>
 +
 
 +
The Download time depends on your network connection speed. After finish the download, you should get below directories and files:
 +
<pre>
 +
build  config  Config.in  device lichee  Makefile  package  prebuilt  rules.mk  scripts  softwinner  target  toolchain  tools
 +
</pre>
 +
 
 +
Start a branch for local workspace:
 +
<pre>
 +
$ repo start v833-lindenis --all
 +
</pre>
 +
 
 +
===== Building =====
 +
====== 1.setup env ======
 +
*For Lindenis V833 SBC:
 +
<pre>
 +
$ source build/envsetup.sh
 +
</pre>
 +
 
 +
<pre>
 +
$ lunch
 +
</pre>
 +
 
 +
Then you will see the follwing menu, and enter the number to select the target case, and enter:
 +
<pre>
 +
 
 +
You're building on Linux
 +
 
 +
Lunch menu... pick a combo:
 +
    1. v833_lindenis-tina
 +
 
 +
Which would you like?: 1
 +
</pre>
 +
 
 +
====== 2.build source ======
 +
* Build kernel and rootfs
 +
If you are the first time to download the SDK and have not built the SDK before, run the below two commands, then exit and save the configuration at first.
 +
<pre>
 +
$ make menuconfig
 +
</pre>
 +
<pre>
 +
$ make kernel_menuconfig
 +
</pre>
 +
Then make it and wait ...
 +
<pre>
 +
$ make -j8 V=s
 +
</pre>
 +
 
 +
====== 3.build image ======
 +
<pre>
 +
$ pack
 +
</pre>
 +
 
 +
===Melis RTOS===
 +
---------------------------------------------------------------------
 +
 
 +
==== Melis RTOS Overview ====
 +
===== Features =====
 +
* RT-Thread Kernel (official version)
 +
* Melis-4.0 Framework (official version)
 +
* ARM GCC based cross toolchain
 +
* Integrated build system
 +
 
 +
===== Layout =====
 +
<pre>
 +
├── cache.md
 +
├── CODING-STYLE.md
 +
├── document
 +
├── ISSUES.md
 +
├── README.md
 +
├── source
 +
├── TOOLCHAIN.md
 +
└── tools
 +
</pre>
 +
 
 +
==== Download and Build ====
 +
===== Prebuilt RTOS Image =====
 +
For fast begin, you can download the prebuilt image here. [http://files.lindeni.org/lindenis-v833/RTOS-Images Click me]<br>
 +
'''[https://pan.baidu.com/s/1nYixccy9Rq8Kip6Q2dY3qw 国内开发者请在此下载]提取码:v833'''
 +
 
 +
===== Melis RTOS SDK Source Code Downloading =====
 +
The SDK is available on [https://github.com/lindenis-org github]. For Chinese developer, it is available on [https://search.gitee.com/?skin=rec&type=repository&q=lindenis gitee] too.
 +
<br>由于国内从Github上下载速度较慢,建议从Gitee上下载 --> [http://wiki.lindeni.org/index.php/Lindenis_V833_RTOS_Gitee Gitee下载说明]
 +
<br>
 +
<br>We use Repo manage Git repositories. Clone Repo from [https://android.googlesource.com/tools/repo android Git repositories] or other mirrors and install it.
 +
Becase there are some big files in the SDK, please run the following command before you start the downloading.
 +
<pre>
 +
$ git config --global http.postBuffer 524288000
 +
</pre>
 +
Then run this to check:
 +
<pre>
 +
$ git config --list
 +
</pre>
 +
 
 +
For Lindenis V833 SBC, download the Melis RTOS SDK on Github via:
 +
 
 +
<pre>
 +
$ mkdir v833-lindenis
 +
$ cd v833-lindenis
 +
$ git clone https://github.com/lindenis-org/lindenis-v833-RTOS-melis-4.0.git
 +
</pre>
 +
 
 +
The Download time depends on your network connection speed. After finish the download, you should get below directories and files:
 +
<pre>
 +
cache.md  CODING-STYLE.md  document  ISSUES.md  README.md  source  TOOLCHAIN.md  tools
 +
</pre>
 +
 
 +
===== Building =====
 +
====== 1.setup env ======
 +
*For Lindenis V833 SBC:
 +
<pre>
 +
$ cd v833-lindenis/lindenis-v833-RTOS-melis-4.0/source
 +
$ source melis-env.sh
 +
</pre>
 +
 
 +
<pre>
 +
$ lunch
 +
</pre>
 +
 
 +
Then you will see the follwing menu, and enter the number to select the target case, and enter:
 +
<pre>
 +
You're building on Linux Build002 4.15.0-45-generic #48~16.04.1-Ubuntu SMP Tue Jan 29 18:03:48 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
 +
 
 +
Lunch menu... pick a combo:
 +
The supported board:
 +
    1. v833-lindenis-evb
 +
What is your choice? 1
 +
</pre>
 +
 
 +
====== 2.build source ======
 +
* Build kernel and rootfs
 +
That's so easy. Run make directly.
 +
<pre>
 +
$ make -j8
 +
</pre>
 +
If you want to configurate the SDK, you can run below command before you make it.
 +
<pre>
 +
$ make menuconfig
 +
</pre>
 +
====== 3.build image ======
 +
<pre>
 +
$ pack
 +
</pre>
 +
 
 +
=== Image Downloading ===
 +
---------------------------------------------------------------
 +
* No matter Tina Linux Image or Melis RTOS Image use the same PC tool to download itself into the SBC's flash.
 +
* Download the PhoenixSuit_V1.1.0.7z ('''[http://files.lindeni.org/lindenis-v536/Tools/PhoenixSuit_V1.1.0.7z Click here]''')and extract to a local folder (note: Windows only) and run one of the installers.
 +
* Open the PhoenixSuit.exe.
 +
[[File:PSM.JPG|500px]]
 +
* Click the "firmware" button.
 +
[[File:Firmware.png|500px]]
 +
* Click the "image" button to select the image file.
 +
[[File:selectImage.png|500px]]
 +
* Now the PC tool is ready. Just '''keep pressing''' the "fel" key on the SBC.
 +
[[File:V833-fel.png|500px]]
 +
 
 
== OS ==
 
== OS ==
=== Overview ===
+
=== Tina Linux OS ===
 +
----------------------------------------------------------
 +
==== Overview ====
 +
Lindenis Video OS is the recommended operating system for normal use on Lindenis V833 series boards. Lindenis Video OS is maintained by [http://www.lindeni.com/ Lindenis Tech. Ltd.]. The SDK is hosted on [https://github.com/lindenis-org GitHub] and [https://gitee.com/lindenis Gitee].
 +
===== Applications =====
 +
[[File:LindenisVideoOS.png|500px|thumb|Lindenis Video OS Architecture]]
 +
* Lindlive: a low-laternce A/V streaming application powered by Lindenis.
 +
* Lindplayer: a meida player application powered Lindenis.
 +
* Lindcamera: a camera application (supported preview, snapshot and recording) powered by Lindenis.
 +
* ... ...
 +
 
 
===== Framewrok =====
 
===== Framewrok =====
 +
 +
* FFindeni: a multimedia framework specialized for low-latency A/V processing built by Lindenis.
 +
* CedarX: a Allwinner official multimedia decoding framework.
 +
* [http://www.minigui.org/ MiniGUI]: a tiny and efficiency open source GUI framework.
 +
* ... ...
 +
 
===== Libraries =====
 
===== Libraries =====
 +
 +
* Runtime Libraries: the system basic libraries like libc and so on.
 +
* Libavwrapper: a Lindenis-built library abstracted the hardware operation of the A/V processing.
 +
* [http://ffmpeg.org/ FFmpeg]: an open source software library for recording, converting and streaming audio and video.
 +
* [http://live555.com/ Live555]: an open source software library for streaming audio and video.
 +
* ... ...
 +
 
===== Linux Kernel =====
 
===== Linux Kernel =====
=== Reference Documents ===
+
 
=== System Setup ===
+
* Official version: 4.9
 +
<br>
 +
==== Reference Documents ====
 +
[http://files.lindeni.org/lindenis-v833/Documents/AW Allwinner Official Reference Documents]<br>
 +
[https://pan.baidu.com/s/1xB8EV_AJ8vDnX6z6UBgX8Q 全志官方文档资料云盘下载-->提取码:v833]
 +
<br>
 +
<br>
 +
==== System Setup ====
 
===== Uart =====
 
===== Uart =====
 +
*By default, the ttyS3 is assigned to the Linux console. The UART transmit pin called "TX" and receive pin called "RX" are in the pin group. And the bit rate is 115200 bps.See below red rectangle.
 +
[[File:v833_uart.png|300px]]
 +
 
===== Camera =====
 
===== Camera =====
===== ISP Tuning =====
+
*board.dts should config as follow:
 +
<pre>
 +
sensor0:sensor@0 {
 +
                device_type = "sensor0";
 +
                sensor0_mname = "imx307_mipi";
 +
                sensor0_twi_cci_id = <1>;
 +
                sensor0_twi_addr = <0x34>;
 +
                sensor0_mclk_id = <0>;
 +
                sensor0_pos = "rear";
 +
                sensor0_isp_used = <1>;
 +
                sensor0_fmt = <1>;
 +
                sensor0_stby_mode = <0>;
 +
                sensor0_vflip = <0>;
 +
                sensor0_hflip = <0>;
 +
                sensor0_iovdd-supply = <&reg_aldo2>;
 +
                sensor0_iovdd_vol = <1800000>;
 +
                sensor0_avdd-supply = <>;
 +
                sensor0_avdd_vol = <2800000>;
 +
                sensor0_dvdd-supply = <&reg_dldo2>;
 +
                sensor0_dvdd_vol = <1200000>;
 +
                sensor0_power_en = <>;
 +
                sensor0_reset = <&pio PI 3 1 0 1 0>;
 +
                sensor0_pwdn = <&pio PI 4 1 0 1 0>;
 +
                status  = "okay";
 +
            };
 +
</pre>
 +
 
 
===== Display =====
 
===== Display =====
 +
The defalt display is LCD.
 +
*board.dts should config as follow:
 +
<pre>
 +
disp: disp@01000000 {
 +
    disp_init_enable        = <1>;
 +
    disp_mode                = <0>;
 +
 +
    screen0_output_type      = <1>;
 +
    screen0_output_mode      = <4>;
 +
 +
    disp_rotation_used = <1>;
 +
    degree0 = <1>;
 +
    fb0_format              = <0>;
 +
    fb0_width                = <1280>;
 +
    fb0_height              = <720>;
 +
 +
    lcd0_backlight          = <50>;
 +
    lcd0_bright              = <50>;
 +
    lcd0_contrast            = <50>;
 +
    lcd0_saturation          = <57>;
 +
    lcd0_hue                = <50>;
 +
    dldo1-supply = <&reg_dldo1>;
 +
    bldo1-supply = <&reg_bldo1>;
 +
    dcdc1-supply = <&reg_dcdc1>;
 +
    aldo3-supply = <&reg_aldo3>;
 +
};
 +
 +
lcd0: lcd0@01c0c000 {
 +
    lcd_used            = <1>;
 +
 +
    lcd_driver_name    = "lx50hdi4002";
 +
 +
    lcd_backlight      = <150>;
 +
 +
    lcd_if              = <4>;
 +
 +
    lcd_x              = <720>;
 +
    lcd_y              = <1280>;
 +
    lcd_width          = <65>;
 +
    lcd_height          = <118>;
 +
 +
    lcd_dclk_freq      = <56>;
 +
 +
    lcd_pwm_used        = <1>;
 +
    lcd_pwm_ch          = <9>;
 +
    lcd_pwm_freq        = <50000>;
 +
    lcd_pwm_pol        = <1>;
 +
    lcd_pwm_max_limit  = <255>;
 +
 +
    lcd_hbp            = <20>;
 +
    lcd_ht              = <768>;
 +
    lcd_hspw            = <8>;
 +
    lcd_vbp            = <16>;
 +
    lcd_vt              = <1314>;
 +
    lcd_vspw            = <2>;
 +
 +
    lcd_dsi_if          = <0>;
 +
    lcd_dsi_lane        = <4>;
 +
    lcd_dsi_format      = <0>;
 +
    lcd_dsi_te          = <0>;
 +
    lcd_dsi_eotp        = <0>;
 +
 +
    lcd_frm            = <0>;
 +
    lcd_io_phase        = <0x0000>;
 +
    lcd_hv_clk_phase    = <0>;
 +
    lcd_hv_sync_polarity= <0>;
 +
    lcd_gamma_en        = <0>;
 +
    lcd_bright_curve_en = <0>;
 +
    lcd_cmap_en        = <0>;
 +
 +
    lcdgamma4iep        = <22>;
 +
 +
    lcd_power            = "dcdc1";
 +
    lcd_pin_power        = "bldo1";
 +
 +
    lcd_gpio_0 = <&pio PD 9 1 0 3 1>;
 +
};
 +
</pre>
 +
 
===== TouchPanel =====
 
===== TouchPanel =====
 +
If you want to use the CTP, please insmod its driver manually.
 +
<pre>
 +
# insmod /lib/modules/4.9.118/gt9xx_ts.ko
 +
</pre>
 +
*board.dts should config as follow:
 +
<pre>
 +
ctp:ctp {
 +
    device_type = "ctp";
 +
    ctp_name = "gt911_1060";
 +
    ctp_twi_id = <0x0>;
 +
    ctp_twi_addr = <0x5d>;
 +
    ctp_screen_max_x = <1280>;
 +
    ctp_screen_max_y = <720>;
 +
    ctp_revert_x_flag = <1>;
 +
    ctp_revert_y_flag = <1>;
 +
    ctp_exchange_x_y_flag = <0>;
 +
    ctp_int_port = <&pio PC 10 6 0 0 1>;
 +
    ctp_wakeup = <&pio PC 11 1 0 3 1>;
 +
 +
    status = "okay";
 +
};
 +
</pre>
 +
 
===== Ethernet =====
 
===== Ethernet =====
 +
*board.dts should config as follow:
 +
<pre>
 +
gmac0: eth@05020000 {
 +
        compatible = "allwinner,sunxi-gmac";
 +
        pinctrl-names = "default", "sleep";
 +
        pinctrl-0 = <&gmac_pins_a &gmac_pins_b &gmac_pins_c &gmac_pins_d>;
 +
        pinctrl-1 = <&gmac_pins_e>;
 +
        phy-mode = "rmii";
 +
        use_ephy25m = <1>;
 +
        tx-delay = <7>;
 +
        rx-delay = <31>;
 +
        phy-rst = <&pio PH 4 1 1 1 0>;
 +
        gmac-power0;
 +
        gmac-power1;
 +
        gmac-power2;
 +
        status = "okay";
 +
};
 +
</pre>
 +
 
===== Wifi =====
 
===== Wifi =====
===== Bluetooth =====
+
board.dts should config as follow:
===== Ethernet =====
+
<pre>
 +
wlan:wlan {
 +
        compatible = "allwinner,sunxi-wlan";
 +
        clocks = <&clk_losc_out>;
 +
        wlan_busnum = <1>;
 +
        wlan_usbnum = <3>;
 +
        wakeup_source = <0>;
 +
 
 +
        wlan_power-supply = <&reg_dcdc1>;
 +
        io_regulator-supply = <&reg_dcdc5>;
 +
 
 +
        wlan_power_vol = <3300000>;
 +
        io_regulator_vol = <3300000>;
 +
 
 +
        /*wlan_en;*/
 +
        wlan_regon = <&pio PG 7 1 0 1 0>;
 +
        wlan_hostwake = <&pio PG 6 0 0 1 0>;
 +
        status = "okay";
 +
};
 +
</pre>
 +
 
 
===== Keypad =====
 
===== Keypad =====
 +
* board.dts should config as follow:
 +
<pre>
 +
gpadc:gpadc{
 +
    channel_num = <1>;
 +
    channel_select = <0x01>;
 +
    channel_data_select = <0>;
 +
    channel_compare_select = <0x01>;
 +
    channel_cld_select = <0x01>;
 +
    channel_chd_select = <0>;
 +
    channel0_compare_lowdata = <1700000>;
 +
    channel0_compare_higdata = <1200000>;
 +
    channel1_compare_lowdata = <460000>;
 +
    channel1_compare_higdata = <1200000>;
 +
    key_cnt = <5>;
 +
    key0_vol = <210>;
 +
    key0_val = <115>;
 +
    key1_vol = <410>;
 +
    key1_val = <114>;
 +
    key2_vol = <590>;
 +
    key2_val = <139>;
 +
    key3_vol = <750>;
 +
    key3_val = <28>;
 +
    key4_vol = <880>;
 +
    key4_val = <102>;
 +
    status = "okay";
 +
};
 +
</pre>
 +
 
===== Audio =====
 
===== Audio =====
 
====== audiocodec ======
 
====== audiocodec ======
 +
*board.dts should config as follow:
 +
<pre>
 +
codec:codec@0x05096000 {
 +
        pa_level = <0x1>;
 +
        main_gain = <0x17>;
 +
        adcdrc_cfg = <0x00>;
 +
        adchpf_cfg = <0x01>;
 +
        dacdrc_cfg = <0x00>;
 +
        dachpf_cfg = <0x00>;
 +
        digital_vol = <0x00>;
 +
        lineout_vol = <0x1a>;
 +
        pa_msleep_time = <0xa0>;
 +
        gpio-spk = <&pio PH 3 1 1 1 1>;
 +
        status = "okay";
 +
};
 +
</pre>
 +
 
====== i2s ======
 
====== i2s ======
 +
*board.dts should config as follow:
 +
<pre>
 +
snddaudio0:sound@1 {
 +
        audio_format = <0x01>;
 +
        daudio_master = <0x04>;
 +
        signal_inversion = <0x01>;
 +
        sunxi,snddaudio-codec = "ac108.1-003b";
 +
        sunxi,snddaudio-codec-dai = "ac108-pcm0";
 +
        status = "disabled";
 +
};
 +
</pre>
 +
 +
====== asound.conf ======
 +
<pre>
 +
defaults.pcm.card 0
 +
defaults.pcm.device 0
 +
defaults.ctl.card 0
 +
 +
pcm.!default {
 +
        type asym
 +
        playback.pcm {
 +
                type hooks
 +
                slave.pcm "hw:0,0"
 +
                hooks.0{
 +
                        type ctl_elems
 +
                        hook_args[
 +
                        {
 +
                                name "External Speaker Switch"
 +
                                optional true
 +
                                value 1
 +
                        }
 +
                        {
 +
                                name "LINEOUT volume"
 +
                                optional true
 +
                                value 30
 +
                        }
 +
                        ]
 +
                }
 +
        }
 +
        capture.pcm {
 +
                type hooks
 +
                slave.pcm "hw:0,0"
 +
                hooks.0{
 +
                        type ctl_elems
 +
                        hook_args[
 +
                                {
 +
                                  name 'Left Input Mixer MIC1 Boost Switch'
 +
                                  value ON
 +
                                }
 +
                        ]
 +
                }
 +
        }
 +
}
 +
 +
</pre>
 +
 +
==== Lindenis Application Demo ====
 +
===== Lindlive =====
 +
lindlive is a high performance low latency live streaming library.
 +
lindlive integrate some useful function modules, such as audio/video capture, encoding and streaming protocol.
 +
So developers can easily implement a live streaming server based on lindenis board.
 +
 +
There are two samples app using lindlive, one is sample_mppsrc_2_livesink and the other is sample_mppsrc_2_ffsink.
 +
The sample source code is located in SDK.
 +
 +
!!! It is strongly recommended to use lindplayer with '-live' as the client of the lindlive.
 +
It will be lower latency.
 +
 +
usage:
 +
    sample_mppsrc_2_livesink -i [ip] -p [port] -n [name]
 +
        -i [ip] is the ip address of the server. If it is not set, the 'ip' default is local ethernet or wifi ip address.
 +
        -p [port] is the port of the server. If it is not set, the 'port' default is rtsp port 8554.
 +
        -n [name] is the name of live streaming. If it is not set, the 'name' default is 'live'.
 +
        All of the arguments are optional.
 +
    If sample_mppsrc_2_livesink is correctly running, the server url is 'rtsp://[ip]:[port]/[name]'
 +
    Then it can be played in an player with the url 'rtsp://[ip]:[port]/[name]'.
 +
 +
    sample_mppsrc_2_ffsink -t [type] -u [url]
 +
        -t [type]: the muxer type, can be 'mpegts/mp4/rtp/rtp_mpegts/rtsp/rtmp'
 +
        -u [url] : sink to url, like: '/tmp/out.mp4' or 'rtp://192.168.1.100:12345'
 +
    Example 1: sink as a live streaming.
 +
        sample_mppsrc_2_ffsink -t rtp_mpegts -u rtp://192.168.3.118:12345
 +
        sample_mppsrc_2_ffsink -t rtp -u rtp://192.168.3.118:12342/test
 +
        Then it can be played in an player with the url 'rtsp://[ip]:[port]/[name]'.
 +
    Example 2: save as a local file.
 +
        sample_mppsrc_2_ffsink -t mp4 -u /tmp/out.mp4
 +
        sample_mppsrc_2_ffsink -t mpegts -u /tmp/out.ts
 +
 +
=== Melis-4.0 RTOS ===
 +
----------------------------------------------------------
 +
==== Overview ====
 +
The Melis RTOS is a lightweight  IoT embedded operating system of Allwinner for the IoT field. It is committed to building a multimedia, voice, and cloud integrated IoT infrastructure platform with extreme performance, minimalist development, rich components, network connections, and A/V codec function.
 +
 +
The Melis RTOS is based on the RT-Thread kernel and integrates multimedia frameworks such as V4L2, OMX, and MPP. It has strong advantages in multimedia processing, especially encoding and decoding, and can be widely used in multimedia processing, sensor networks, and the development of smart home products.
 +
 +
[[File:Rtos.jpg|500px|thumb|Melis RTOS Architecture]]
 +
 +
==== Reference Documents ====
 +
[http://files.lindeni.org/lindenis-v833/RTOS-Documents Melis RTOS Allwinner Official Reference Documents]<br>
 +
[https://pan.baidu.com/s/1Pz6exNNREbE_Tdsfl0lMog Melis RTOS全志官方文档资料云盘下载-->提取码:v833]
 +
<br>
 +
<br>
 +
 +
==== User Guide ====
 +
===== LCD =====
 +
There is no data output on LCD default.<br>
 +
You can use below command to output the test pattern.
 +
<pre>
 +
msh /> disp -c 0 0    -- Normal output, now is nothing.
 +
msh /> disp -c 0 1    -- Colorbar output
 +
msh /> disp -c 0 2    -- Gray output
 +
msh /> disp -c 0 7    -- Black background and white grids output
 +
</pre>
 +
 +
===== Camera =====
 +
You can run the below test case to test the camera.<br>
 +
'''If you do the LCD test first, please set the LCD as normal output before you start camera testing.'''
 +
<pre>
 +
msh /> fork vin_preview
 +
</pre>
 +
 +
===== Keys =====
 +
You can run the below test case to test the keys.<br>
 +
<pre>
 +
msh /> keyboard
 +
</pre>
  
=== Default Application ===
+
===== WIFI =====
=== Lindenis Application Demo ===
+
The on-baord WIFI module is XR819, which is a fully integrated 2.4G WLAN Soc to support 802.11 b/g/n.<br>
 +
You can use the wifi tools in the system to control it, like this (wifi -h to get more informations):
 +
<pre>
 +
msh /> wifi -o 0              -- wifi on and work on station mode
 +
msh /> wifi -s                -- scan the existing AP SSID
 +
msh /> wifi -c SSID PASSWD    -- connect to AP, whose ID is SSID, with PASSWD
 +
msh /> netif_ifconfig        -- to get the network information
 +
msh /> ping www.baidu.com    -- ping website to check it works well or not
 +
msh /> wifi -f                -- wifi off
 +
</pre>

Latest revision as of 04:30, 9 August 2021

Contents

Key Features

Processor core

  • Single-core ARM Cortex-A7 Processor
  • ARMv7 ISA standard ARM instruction set
  • Thumb-2 Technology
  • Jazeller RCT
  • NEON Advanced SIMD
  • VFPv4 floating point
  • 32KB L1 Instruction cache and 32KB L1 Data cache
  • 128KB L2 cache

Video Encoding Performance

  • H.264 BP/MP/HP, H.265 Main Profile encoding
  • I/P/Dual P frame H.264/H.265 encoding
  • MJPEG/JPEG baseline encoding
  • Real-time multi-stream H.264/H.265 encoding capability:
    • 5M@20fps + 1080p@20fps (or 1080p@60fps + VGA@60fps ) H.264
    • 5M@30fps + 720p@30fps (or 1080p@90fps) H.265
  • Maximum 8-megapixel resolution for H.264/H.265 encoding
  • JPEG snapshot performance of 1080p@60fps independently
  • CBR, VBR modes
  • Output bit-rate ranging from 2kbit/s to 100Mbit/s.
  • Maximum 16 ROIs without encoding for AI
  • Encoding frame rate ranging from 1/16 fps to 60fps.

Video and Graphics Processing

  • Support Electronic Image Stabilization Engine
  • Supports Lens distortion correction, fisheye PTZ and calibration
  • Picture rotation by 90°180°270°
  • Support 2 Video channels, one up to 1080p@60fps, the other one up to 720p@60fps
  • Support 1 UI channel, up to 1080p@60fps
  • Blending of 2 Video channels and 1 UI channel
  • Support SmartColor for excellent display experience

NPU Processing

  • Maximum performance up to 0.4Tops
  • Support Conv, Activation, Pooling, BN, LRN, FC/Inner Product
  • Support Face detect, face recognition, human detection

Professional Image Effects

  • Maximum performance is 2592 x1936@30fps
  • Maximum resolution of is 2688 x 2688
  • Adjustable 3A functions (AE, AWB and AF)
  • Supports 2F WDR and Local Tone mapping,
  • Supporting highlight suppression and backlight compensation, bad pixel correction, Lens shading correction
  • Supports defect pixel correction, 2D/3D denoising.
  • Supports image mirroring and flipping
  • Provides ISP tuning tools for the PC

Various interfaces

  • Wi-Fi : XR819
  • BT1120 IN/OUT
  • SPK, LINE-IN
  • MIPI CSI, MIPI DSI, TP
  • KEY, POWER_KEY, FEL
  • Network: 10/100Mbps Ethernet
  • USB: 1 x Micro USB, TF card
  • Power Supply: 5V/2A micro USB, 5V/2A DC-IN, 3.7V Battery

Software Support

  • Tina (base on linux-4.9)
  • RTOS

Target Applications

  • SDV
  • Smart IPC
  • Smart Camera

Accessories Step-by-Step Guides

Power Supply

LCD

Hardware Specification

Board Features

Video Out

  • MIPI-DSI, 4 lanes, up to 1080P
  • LCD interface
  • BT1120 OUT

Video In

  • 1 x MIPI-CSI - Camera interface, 4 lanes per channel
  • BT1120 IN

Audio

  • 3.5mm Line in
  • SPK
  • 1 x mic

Network

  • 10/100/100 Ethernet
  • WiFi 2.4G

Storage

  • MicroSD Card bootable, support SDHC and SDXC, storage up to 256GB

Expansion Ports

  • Flexible Pin Headers 2x13 pins Reserved:
    • GPADC
    • 5V, 1V8, 2V8 and DC Power Supply
    • I2C x 1
    • I2S x 1
    • PWM x 1

Board Information

  • Board Dimensions: 75mm x 68mm
  • Input Power: 5V@2A micro USB connector, 3.7V Li-Ion battery connector

Hardware Documents

国内开发者可在云盘下载全部硬件资料文档 (提取码:v833)

Datasheets


Schematic and Silk


Support lists


SDK

Host PC requirements

Listed below are the recommended requirements for downloading and building the SDK:

  • CPU: x86_64 or better family processor
  • Memory: 8GB or higher
  • Disk: 20GB free hard disk space, if you build it in a Virtual machine, I recommand you allocate a 30G virtual hard disk.
    • The Whole SDK is about 15G.
  • OS: Ubuntu 14.04 (tested) or higher
  • Network: internet connection
Linux host setup

Ubuntu 14.04

HINT: later version should also work.

Install prerequisites

$ sudo apt-get update
$ sudo apt-get install build-essential libncurses5-dev zlib1g-dev gawk git git-core ccache gettext libssl-dev xsltproc gperf subversion 
$ sudo dpkg --add-architecture i386
$ sudo apt-get update
$ sudo apt-get install lib32z1 lib32ncurses5 libc6:i386 libstdc++6:i386

Sudo without password

$ sudo visudo

Add this line at the end (change “tom” to your username):

tom ALL=(ALL) NOPASSWD: ALL

Ctrl-X to leave, save your changes, and you're done!

Lazy Start

Tina Linux


Tina Linux Overview

Features
  • Linux Kernel 4.9 (official version)
  • u-boot-2018
  • ARM GCC based cross toolchain
  • Integrated build system
Layout
├── build
├── config
├── Config.in
├── dl
├── lichee
├── logs
├── Makefile
├── package
├── prebuilt
├── rules.mk
├── scripts
├── softwinner
├── target
├── toolchain
└── tools

Download and Build

Prebuilt Image

For fast begin, you can download the prebuilt image here. Click me
国内开发者请在此下载提取码:v833

SDK Source Code Downloading

The SDK is available on github. For Chinese developer, it is available on gitee too.
由于国内从Github上下载速度较慢,建议从Gitee上下载 --> Gitee下载说明

We use Repo manage Git repositories. Clone Repo from android Git repositories or other mirrors and install it. Becase there are some big files in the SDK, please run the following command before you start the downloading.

$ git config --global http.postBuffer 524288000

Then run this to check:

$ git config --list

For Lindenis V833 SBC, download the SDK on Github via:

$ mkdir v833-lindenis
$ cd v833-lindenis
$ repo init -u https://github.com/lindenis-org/manifest.git -b v833 -m v833-lindenis.xml
$ repo sync

And then download the listing files from cloud disk with access phrase v833. Click me then enter "v833"
If the link is invaild, please send e-mail to tell us. Here is the e-mail address: services@lindeni.com

1. dl.tar.gz
2. gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi.tar.xz
3. libs.tar.gz

Copy them into the target directory follow below steps:

$ cp dl.tar.gz v833-lindenis
$ tar xzvf dl.tar.gz dl/
$ mkdir -p lichee/brandy-2.0/tools/toolchain
$ cp gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi.tar.xz lichee/brandy-2.0/tools/toolchain/
$ cp libs.tar.gz v833-lindenis/package/cortana/cortana-sdk/
$ cd v833-lindenis/package/cortana/cortana-sdk
$ tar xzvf libs.tar.gz libs/

The Download time depends on your network connection speed. After finish the download, you should get below directories and files:

build  config  Config.in  device lichee  Makefile  package  prebuilt  rules.mk  scripts  softwinner  target  toolchain  tools

Start a branch for local workspace:

$ repo start v833-lindenis --all
Building
1.setup env
  • For Lindenis V833 SBC:
$ source build/envsetup.sh
$ lunch

Then you will see the follwing menu, and enter the number to select the target case, and enter:


You're building on Linux

Lunch menu... pick a combo:
     1. v833_lindenis-tina

Which would you like?: 1
2.build source
  • Build kernel and rootfs

If you are the first time to download the SDK and have not built the SDK before, run the below two commands, then exit and save the configuration at first.

$ make menuconfig
$ make kernel_menuconfig

Then make it and wait ...

$ make -j8 V=s
3.build image
$ pack

Melis RTOS


Melis RTOS Overview

Features
  • RT-Thread Kernel (official version)
  • Melis-4.0 Framework (official version)
  • ARM GCC based cross toolchain
  • Integrated build system
Layout
├── cache.md
├── CODING-STYLE.md
├── document
├── ISSUES.md
├── README.md
├── source
├── TOOLCHAIN.md
└── tools

Download and Build

Prebuilt RTOS Image

For fast begin, you can download the prebuilt image here. Click me
国内开发者请在此下载提取码:v833

Melis RTOS SDK Source Code Downloading

The SDK is available on github. For Chinese developer, it is available on gitee too.
由于国内从Github上下载速度较慢,建议从Gitee上下载 --> Gitee下载说明

We use Repo manage Git repositories. Clone Repo from android Git repositories or other mirrors and install it. Becase there are some big files in the SDK, please run the following command before you start the downloading.

$ git config --global http.postBuffer 524288000

Then run this to check:

$ git config --list

For Lindenis V833 SBC, download the Melis RTOS SDK on Github via:

$ mkdir v833-lindenis
$ cd v833-lindenis
$ git clone https://github.com/lindenis-org/lindenis-v833-RTOS-melis-4.0.git

The Download time depends on your network connection speed. After finish the download, you should get below directories and files:

cache.md  CODING-STYLE.md  document  ISSUES.md  README.md  source  TOOLCHAIN.md  tools
Building
1.setup env
  • For Lindenis V833 SBC:
$ cd v833-lindenis/lindenis-v833-RTOS-melis-4.0/source
$ source melis-env.sh
$ lunch

Then you will see the follwing menu, and enter the number to select the target case, and enter:

You're building on Linux Build002 4.15.0-45-generic #48~16.04.1-Ubuntu SMP Tue Jan 29 18:03:48 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Lunch menu... pick a combo:
The supported board:
    1. v833-lindenis-evb
What is your choice? 1
2.build source
  • Build kernel and rootfs

That's so easy. Run make directly.

$ make -j8

If you want to configurate the SDK, you can run below command before you make it.

$ make menuconfig
3.build image
$ pack

Image Downloading


  • No matter Tina Linux Image or Melis RTOS Image use the same PC tool to download itself into the SBC's flash.
  • Download the PhoenixSuit_V1.1.0.7z (Click here)and extract to a local folder (note: Windows only) and run one of the installers.
  • Open the PhoenixSuit.exe.

PSM.JPG

  • Click the "firmware" button.

Firmware.png

  • Click the "image" button to select the image file.

SelectImage.png

  • Now the PC tool is ready. Just keep pressing the "fel" key on the SBC.

V833-fel.png

OS

Tina Linux OS


Overview

Lindenis Video OS is the recommended operating system for normal use on Lindenis V833 series boards. Lindenis Video OS is maintained by Lindenis Tech. Ltd.. The SDK is hosted on GitHub and Gitee.

Applications
Lindenis Video OS Architecture
  • Lindlive: a low-laternce A/V streaming application powered by Lindenis.
  • Lindplayer: a meida player application powered Lindenis.
  • Lindcamera: a camera application (supported preview, snapshot and recording) powered by Lindenis.
  • ... ...
Framewrok
  • FFindeni: a multimedia framework specialized for low-latency A/V processing built by Lindenis.
  • CedarX: a Allwinner official multimedia decoding framework.
  • MiniGUI: a tiny and efficiency open source GUI framework.
  • ... ...
Libraries
  • Runtime Libraries: the system basic libraries like libc and so on.
  • Libavwrapper: a Lindenis-built library abstracted the hardware operation of the A/V processing.
  • FFmpeg: an open source software library for recording, converting and streaming audio and video.
  • Live555: an open source software library for streaming audio and video.
  • ... ...
Linux Kernel
  • Official version: 4.9


Reference Documents

Allwinner Official Reference Documents
全志官方文档资料云盘下载-->提取码:v833

System Setup

Uart
  • By default, the ttyS3 is assigned to the Linux console. The UART transmit pin called "TX" and receive pin called "RX" are in the pin group. And the bit rate is 115200 bps.See below red rectangle.

V833 uart.png

Camera
  • board.dts should config as follow:
sensor0:sensor@0 {
                device_type = "sensor0";
                sensor0_mname = "imx307_mipi";
                sensor0_twi_cci_id = <1>;
                sensor0_twi_addr = <0x34>;
                sensor0_mclk_id = <0>;
                sensor0_pos = "rear";
                sensor0_isp_used = <1>;
                sensor0_fmt = <1>;
                sensor0_stby_mode = <0>;
                sensor0_vflip = <0>;
                sensor0_hflip = <0>;
                sensor0_iovdd-supply = <&reg_aldo2>;
                sensor0_iovdd_vol = <1800000>;
                sensor0_avdd-supply = <>;
                sensor0_avdd_vol = <2800000>;
                sensor0_dvdd-supply = <&reg_dldo2>;
                sensor0_dvdd_vol = <1200000>;
                sensor0_power_en = <>;
                sensor0_reset = <&pio PI 3 1 0 1 0>;
                sensor0_pwdn = <&pio PI 4 1 0 1 0>;
                status  = "okay";
            };
Display

The defalt display is LCD.

  • board.dts should config as follow:
disp: disp@01000000 {
    disp_init_enable         = <1>;
    disp_mode                = <0>;

    screen0_output_type      = <1>;
    screen0_output_mode      = <4>;

    disp_rotation_used = <1>;
    degree0 = <1>;
    fb0_format               = <0>;
    fb0_width                = <1280>;
    fb0_height               = <720>;

    lcd0_backlight           = <50>;
    lcd0_bright              = <50>;
    lcd0_contrast            = <50>;
    lcd0_saturation          = <57>;
    lcd0_hue                 = <50>;
    dldo1-supply = <&reg_dldo1>;
    bldo1-supply = <&reg_bldo1>;
    dcdc1-supply = <&reg_dcdc1>;
    aldo3-supply = <&reg_aldo3>;
};

lcd0: lcd0@01c0c000 {
    lcd_used            = <1>;

    lcd_driver_name     = "lx50hdi4002";

    lcd_backlight       = <150>;

    lcd_if              = <4>;

    lcd_x               = <720>;
    lcd_y               = <1280>;
    lcd_width           = <65>;
    lcd_height          = <118>;

    lcd_dclk_freq       = <56>;

    lcd_pwm_used        = <1>;
    lcd_pwm_ch          = <9>;
    lcd_pwm_freq        = <50000>;
    lcd_pwm_pol         = <1>;
    lcd_pwm_max_limit   = <255>;

    lcd_hbp             = <20>;
    lcd_ht              = <768>;
    lcd_hspw            = <8>;
    lcd_vbp             = <16>;
    lcd_vt              = <1314>;
    lcd_vspw            = <2>;

    lcd_dsi_if          = <0>;
    lcd_dsi_lane        = <4>;
    lcd_dsi_format      = <0>;
    lcd_dsi_te          = <0>;
    lcd_dsi_eotp        = <0>;

    lcd_frm             = <0>;
    lcd_io_phase        = <0x0000>;
    lcd_hv_clk_phase    = <0>;
    lcd_hv_sync_polarity= <0>;
    lcd_gamma_en        = <0>;
    lcd_bright_curve_en = <0>;
    lcd_cmap_en         = <0>;

    lcdgamma4iep        = <22>;

    lcd_power            = "dcdc1";
    lcd_pin_power        = "bldo1";

    lcd_gpio_0 = <&pio PD 9 1 0 3 1>;
};
TouchPanel

If you want to use the CTP, please insmod its driver manually.

# insmod /lib/modules/4.9.118/gt9xx_ts.ko
  • board.dts should config as follow:
ctp:ctp {
     device_type = "ctp";
     ctp_name = "gt911_1060";
     ctp_twi_id = <0x0>;
     ctp_twi_addr = <0x5d>;
     ctp_screen_max_x = <1280>;
     ctp_screen_max_y = <720>;
     ctp_revert_x_flag = <1>;
     ctp_revert_y_flag = <1>;
     ctp_exchange_x_y_flag = <0>;
     ctp_int_port = <&pio PC 10 6 0 0 1>;
     ctp_wakeup = <&pio PC 11 1 0 3 1>;

     status = "okay";
 };
Ethernet
  • board.dts should config as follow:
gmac0: eth@05020000 {
        compatible = "allwinner,sunxi-gmac";
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&gmac_pins_a &gmac_pins_b &gmac_pins_c &gmac_pins_d>;
        pinctrl-1 = <&gmac_pins_e>;
        phy-mode = "rmii";
        use_ephy25m = <1>;
        tx-delay = <7>;
        rx-delay = <31>;
        phy-rst = <&pio PH 4 1 1 1 0>;
        gmac-power0;
        gmac-power1;
        gmac-power2;
        status = "okay";
};
Wifi

board.dts should config as follow:

wlan:wlan {
        compatible = "allwinner,sunxi-wlan";
        clocks = <&clk_losc_out>;
        wlan_busnum = <1>;
        wlan_usbnum = <3>;
        wakeup_source = <0>;

        wlan_power-supply = <&reg_dcdc1>;
        io_regulator-supply = <&reg_dcdc5>;

        wlan_power_vol = <3300000>;
        io_regulator_vol = <3300000>;

        /*wlan_en;*/
        wlan_regon = <&pio PG 7 1 0 1 0>;
        wlan_hostwake = <&pio PG 6 0 0 1 0>;
        status = "okay";
};
Keypad
  • board.dts should config as follow:
gpadc:gpadc{
    channel_num = <1>;
    channel_select = <0x01>;
    channel_data_select = <0>;
    channel_compare_select = <0x01>;
    channel_cld_select = <0x01>;
    channel_chd_select = <0>;
    channel0_compare_lowdata = <1700000>;
    channel0_compare_higdata = <1200000>;
    channel1_compare_lowdata = <460000>;
    channel1_compare_higdata = <1200000>;
    key_cnt = <5>;
    key0_vol = <210>;
    key0_val = <115>;
    key1_vol = <410>;
    key1_val = <114>;
    key2_vol = <590>;
    key2_val = <139>;
    key3_vol = <750>;
    key3_val = <28>;
    key4_vol = <880>;
    key4_val = <102>;
    status = "okay";
};
Audio
audiocodec
  • board.dts should config as follow:
codec:codec@0x05096000 {
        pa_level = <0x1>;
        main_gain = <0x17>;
        adcdrc_cfg = <0x00>;
        adchpf_cfg = <0x01>;
        dacdrc_cfg = <0x00>;
        dachpf_cfg = <0x00>;
        digital_vol = <0x00>;
        lineout_vol = <0x1a>;
        pa_msleep_time = <0xa0>;
        gpio-spk = <&pio PH 3 1 1 1 1>;
        status = "okay";
};
i2s
  • board.dts should config as follow:
snddaudio0:sound@1 {
        audio_format = <0x01>;
        daudio_master = <0x04>;
        signal_inversion = <0x01>;
        sunxi,snddaudio-codec = "ac108.1-003b";
        sunxi,snddaudio-codec-dai = "ac108-pcm0";
        status = "disabled";
};
asound.conf
defaults.pcm.card 0
defaults.pcm.device 0
defaults.ctl.card 0

pcm.!default {
        type asym
        playback.pcm {
                type hooks
                slave.pcm "hw:0,0"
                hooks.0{
                        type ctl_elems
                        hook_args[
                        {
                                name "External Speaker Switch"
                                optional true
                                value 1
                        }
                        {
                                name "LINEOUT volume"
                                optional true
                                value 30
                        }
                        ]
                }
        }
        capture.pcm {
                type hooks
                slave.pcm "hw:0,0"
                hooks.0{
                        type ctl_elems
                        hook_args[
                                {
                                  name 'Left Input Mixer MIC1 Boost Switch'
                                  value ON
                                }
                        ]
                }
        }
}

Lindenis Application Demo

Lindlive

lindlive is a high performance low latency live streaming library. lindlive integrate some useful function modules, such as audio/video capture, encoding and streaming protocol. So developers can easily implement a live streaming server based on lindenis board.

There are two samples app using lindlive, one is sample_mppsrc_2_livesink and the other is sample_mppsrc_2_ffsink. The sample source code is located in SDK.

!!! It is strongly recommended to use lindplayer with '-live' as the client of the lindlive. It will be lower latency.

usage:

   sample_mppsrc_2_livesink -i [ip] -p [port] -n [name]
       -i [ip] is the ip address of the server. If it is not set, the 'ip' default is local ethernet or wifi ip address.
       -p [port] is the port of the server. If it is not set, the 'port' default is rtsp port 8554.
       -n [name] is the name of live streaming. If it is not set, the 'name' default is 'live'.
       All of the arguments are optional.
   If sample_mppsrc_2_livesink is correctly running, the server url is 'rtsp://[ip]:[port]/[name]'
   Then it can be played in an player with the url 'rtsp://[ip]:[port]/[name]'.
   sample_mppsrc_2_ffsink -t [type] -u [url]
       -t [type]: the muxer type, can be 'mpegts/mp4/rtp/rtp_mpegts/rtsp/rtmp'
       -u [url] : sink to url, like: '/tmp/out.mp4' or 'rtp://192.168.1.100:12345'
   Example 1: sink as a live streaming.
       sample_mppsrc_2_ffsink -t rtp_mpegts -u rtp://192.168.3.118:12345
       sample_mppsrc_2_ffsink -t rtp -u rtp://192.168.3.118:12342/test
       Then it can be played in an player with the url 'rtsp://[ip]:[port]/[name]'.
   Example 2: save as a local file.
       sample_mppsrc_2_ffsink -t mp4 -u /tmp/out.mp4
       sample_mppsrc_2_ffsink -t mpegts -u /tmp/out.ts

Melis-4.0 RTOS


Overview

The Melis RTOS is a lightweight IoT embedded operating system of Allwinner for the IoT field. It is committed to building a multimedia, voice, and cloud integrated IoT infrastructure platform with extreme performance, minimalist development, rich components, network connections, and A/V codec function.

The Melis RTOS is based on the RT-Thread kernel and integrates multimedia frameworks such as V4L2, OMX, and MPP. It has strong advantages in multimedia processing, especially encoding and decoding, and can be widely used in multimedia processing, sensor networks, and the development of smart home products.

Melis RTOS Architecture

Reference Documents

Melis RTOS Allwinner Official Reference Documents
Melis RTOS全志官方文档资料云盘下载-->提取码:v833

User Guide

LCD

There is no data output on LCD default.
You can use below command to output the test pattern.

msh /> disp -c 0 0    -- Normal output, now is nothing.
msh /> disp -c 0 1    -- Colorbar output
msh /> disp -c 0 2    -- Gray output
msh /> disp -c 0 7    -- Black background and white grids output
Camera

You can run the below test case to test the camera.
If you do the LCD test first, please set the LCD as normal output before you start camera testing.

msh /> fork vin_preview
Keys

You can run the below test case to test the keys.

msh /> keyboard
WIFI

The on-baord WIFI module is XR819, which is a fully integrated 2.4G WLAN Soc to support 802.11 b/g/n.
You can use the wifi tools in the system to control it, like this (wifi -h to get more informations):

msh /> wifi -o 0              -- wifi on and work on station mode
msh /> wifi -s                -- scan the existing AP SSID
msh /> wifi -c SSID PASSWD    -- connect to AP, whose ID is SSID, with PASSWD
msh /> netif_ifconfig         -- to get the network information
msh /> ping www.baidu.com     -- ping website to check it works well or not
msh /> wifi -f                -- wifi off