EmbLogic's Blog

.Fex Guide

Fex Guide
Contents [hide]
1 FEX Description
2 Port Definitions
3 application
3.1 [product]
4 system configuration
4.1 [target]
4.2 [card_burn_para]
4.3 [card_boot]
4.4 [card_boot0_para]
4.5 [card_boot2_para]
4.6 [twi_para]
4.7 [uart_para]
4.8 [jtag_para]
4.9 [system]
4.10 [gpio_para]
4.11 [gpio_init]
5 SDRAM
5.1 [dram_para]
6 mali configuration
6.1 [mali_para]
6.2 [g2d_para]
7 ethernet MAC configuration
7.1 [emac_para]
8 i2c configuration
8.1 [twi0_para]
8.2 [twi0_para]
8.3 [twi2_para]
9 uart configuration
9.1 [uart_para0]
9.2 [uart_para1]
9.3 [uart_para2]
9.4 [uart_para3]
9.5 [uart_para4]
9.6 [uart_para5]
9.7 [uart_para6]
9.8 [uart_para7]
10 spi configuration
10.1 [spi0_para]
10.2 [spi1_para]
10.3 [spi2_para]
10.4 [spi3_para]
11 external spi device configuration
11.1 [spi_devices]
11.2 [spi_board0]
12 resistive touch panel configuration
12.1 [rtp_para]
13 capacitive touch panel configuration
13.1 [ctp_para]
14 touch key configuration
14.1 [tkey_para]
15 tablet key configuration
15.1 [tabletkeys_para]
16 motor configuration
16.1 [motor_para]
17 lock configuration
17.1 [locks_para]
18 nand flash configuration
18.1 [nand_para]
19 boot disp configuration
19.1 [boot_disp]
20 disp init configuration
20.1 [disp_init]
21 lcd[0/1] configuration
21.1 [lcd0_para]
21.2 [lcd1_para]
22 tv out dac configuration
22.1 [tv_out_dac_para]
23 csi gpio configuration
23.1 [csi0_para]
23.2 [csi1_para]
24 tv configuration
24.1 [tvout_para]
24.2 [tvin_para]
25 sata configuration
25.1 [sata_para]
26 sdmmc configuration
26.1 [mmc0_para]
26.2 [mmc1_para]
26.3 [mmc2_para]
26.4 [mmc3_para]
27 memory stick configuration
27.1 [ms_para]
28 sim card configuration
28.1 [smc_para]
29 ps2 configuration
29.1 [ps2_0_para]
29.2 [ps2_1_para]
30 can bus configuration
30.1 [can_para]
31 matrix keyboard
32 23.1 [keypad_para]
33 USB control flags
33.1 [usbc0]
33.2 [usbc1]
33.3 [usbc2]
34 USB Device
34.1 [usb_feature]
34.2 [msc_feature]
35 G Sensor configuration
35.1 [gsensor_para]
36 gps gpio configuration
36.1 [gps_para]
37 sdio wifi configuration
37.1 [sdio_wifi_para]
38 us wifi configuration
38.1 [usb_wifi_para]
39 3G configuration
39.1 [3g_para]
40 gyroscope
40.1 [gy_para]
41 light sensor
41.1 [ls_para]
42 compass
42.1 [compass_para]
43 blue tooth
43.1 [bt_para]
44 i2s configuration
44.1 [i2s_para]
45 spdif configuration
45.1 [spdif_para]
46 audio configuration
46.1 [audio_para]
47 infrared remote configuration
47.1 [ir_para]
48 pmu configuration
48.1 [pmu_para]
49 recovery key configuration
49.1 [recovery_key]
50 dvfs voltage-frequency table configuration
50.1 [dvfs_table]
51 led configuration
51.1 [leds_para]
51.2 external leds
52 dynamic configuration
52.1 [dynamic]
FEX Description

A FEX file defines various aspects of how the SoC works. It configures the GPIO pins and sets up DRAM, Display, etc parameters. It is Allwinners predecessor for the devicetree.

Each line consists of a key = value pair combination under a [sectionheader]. All three, [sectionheader], key and value are case-sensitive. For comments a semi-colon (;) is used and everything following a semi-colon is ignored. The chip does not parse a textual version of a fex file, it gets cleaned and compiled by a fex-compiler. A reverse engineerd open source version exists in the sunxi-tools repository. Also a de-compiler which takes a binary script.bin and creates a textual script.fex. Usually, script.bin can be found on the nanda boot partition on A10 devices.
Sticky-note-pin.png Note: The mainline Linux kernel makes no use of FEX / script.bin, and relies on the device tree model instead (.dtb files).

Port Definitions

Description of the GPIO configuration in the form:
port:
where:
is the port to configure (ie. PH15)
is the function to configure the port for, mux 0 is as input, mux 1 as output and for 2-7 see A10/PIO, A13/PIO, or A20/PIO for details.
is 0 = disabled; 1 = pullup enabled; 2 = pulldown enabled (only valid when port is an input)
defines the output drive in mA, values are 0-3 corresponding to 10mA, 20mA, 30mA and 40mA.
sets the initial output level for the port; 0 = low; 1 = high (only valid for outputs)
The and can be set to which means don’t change. Any trailing options can be omitted.
This can also be used to specify various pins on the AXP PMIC. The syntax is “power:portN”.
Port AXP20x AXP22x / AXP8xx
0 GPIO0 GPIO0
1 GPIO1 GPIO1
2 GPIO2 DC1SW
3 GPIO3 CHGLED
4 N_VBUSEN
5 WAKEUP (slave PMIC)
6 SWOUT (slave PMIC)
application

[product]
Product version and description. It seems all fex files at this moment are at version 1.0 and use the default evaluation board name. It doesn’t appear to be used internally, but requires further investigation.
version: string indicating fex file version.
machine: string indicating the board name. “A10-EVB-V1.2″ appears to be a common one, seemingly to refer to the A10
[product]
version = “1.0″
machine = “A10-EVB-V1.2″
system configuration

[target]
Sticky-note-pin.png Note: blue module chip pin configuration, the black module internal control configuration
Configuration items to configure the meaning of
boot_clock: Initial boot frequency in MHz.
dcdc2_vol: Dcdc2 output voltage in mV.
dcdc3_vol: Dcdc3 output voltage in mV.
ldo2_vol: Ldo2 output voltage in mV.
ldo3_vol: Ldo3 output voltage in mV.
ldo4_vol: Ldo4 output voltage in mV.
power_start: 0 or 1.
storage_type: 0 = nand, 1 = SDCard, 2 = SPI-nor

[target]
boot_clock = 1008
dcdc2_vol = 1400
dcdc3_vol = 1250
ldo2_vol = 3000
ldo3_vol = 2800
ldo4_vol = 2800
pll4_freq = 960
pll6_freq = 960
power_start = 1
storage_type = 0
[card_burn_para]
Configuration example:

[card_burn_para]
card_no = 0
card_line = 4
card_mode = 0
sdc_d1 = port:PF00
sdc_d0 = port:PF01
sdc_clk = port:PF02
sdc_cmd = port:PF03
sdc_d3 = port:PF04
sdc_d2 = port:PF05
[card_boot]
logical_start: logical starting address when booting from SD-Card.
sprite_gpio0:
Configuration example:

[Card_boot]
logical_start = 40960
sprite_gpio0 =
[card_boot0_para]
card_ctrl: card controller to be used
card_high_speed: 0 for low speed, 1 for high-speed
card_line: Number of card data lines
sdc_ cmd: SD-Card command signals GPIO configuration
sdc_ clk: SD-Card clock signal GPIO configuration
sdc_ d0: SD-Card data 0 line signal GPIO configuration
sdc_ d1: SD-Card data 1 line signal GPIO configuration
sdc_d2: SD-Card data 2 line signal GPIO configuration
sdc_d3: SD-Card data 3 line signal GPIO configuration

[card_boot0_para]
card_ctrl = 0
card_high_speed = 1
card_line = 4
sdc_d1 = port:PF00
sdc_d0 = port:PF01
sdc_clk = port:PF02
sdc_cmd = port:PF03
sdc_d3 = port:PF04
sdc_d2 = port:PF05
[card_boot2_para]
card_ctrl: card controller to be used
card_high_speed: 0 for low speed, 1 for high-speed
card_line: number of card data lines
sdc_ cmd: SD-Card command signals GPIO configuration
sdc_ clk: SD-Card clock signal GPIO configuration
sdc_ d0: SD-Card data 0 line signal GPIO configuration
sdc_ d1: SD-Card data 1 line signal GPIO configuration
sdc_d2: SD-Card data 2 line signal GPIO configuration
sdc_d3: SD-Card data 3 line signal GPIO configuration

[card_boot2_para]
card_ctrl = 2
card_high_speed = 1
card_line = 4
sdc_cmd = port:PC06
sdc_clk = port:PC07
sdc_d0 = port:PC08
sdc_d1 = port:PC09
sdc_d2 = port:PC10
sdc_d3 = port:PC11
[twi_para]
twi controller to enable during/for boot.
twi_port: twi controller to configure
twi_scl: twi Serial CLock line GPIO configuration
twi_sda: = twi Serial DAta line GPIO configuration

[twi_para]
twi_port = 0
twi_scl = port:PB00
twi_sda = port:PB01
[uart_para]
Serial port to be enabled during/for boot.
uart_debug_port: serial controller number
uart_debug_tx: serial port TX line GPIO configuration
uart_debug_rx: serial port RX line GPIO configuration

[uart_para]
uart_debug_port = 0
uart_debug_tx = port:PB22
uart_debug_rx = port:PB23
[jtag_para]
JTAG port to be enabled during/for boot.
jtag_enable: 0 to disable JTAG, 1 to enable JTAG
jtag_ms: JTAG Test Mode Select (TMS) GPIO configuration
jtag_ck: JTAG Test Clock (TCK) GPIO configuration
jtag_do: JTAG Test Data Output (TDO) GPIO configuration
jtag_di: JTAG Test Data Input (TDI) GPIO configuration

[jtag_para]
jtag_enable = 1
jtag_ms = port:PB14
jtag_ck = port:PB15default>
jtag_do = port:PB16default>
jtag_di = port:PB17default>
[system]
recovery_key: recovery key GPIO configuration
Configuration example:
recovery_key = port:PH16
[gpio_para]
gpio_used: 0 to disable; 1 to enable
gpio_num: number mapped GPIO’s
gpio_pin_1: first GPIO pin
Configuration example:
gpio_used = 0
gpio_num = 4
gpio_pin_1 = port:PH10
gpio_pin_2 = port:PH20
gpio_pin_3 = port:PB03
gpio_pin_4 = port:PH22
[gpio_init]
pin_1: Initial pin 1 GPIO configuration
Configuration example:
pin_1 = port:PH10
pin_2 = port:PH20
SDRAM

[dram_para]
SD-Ram is usually configured via livesuit when flashing. Livesuit probes the hardware or knows about the hardware and its configuration and configures the SoC accordingly. This luxury is not available from Linux and thus sdram parameters have to be set up by hand.
dram_baseaddr: DRAM physical start address, fixed at 0×40000000
dram_clk: DRAM clock frequency in MHz; it must be an integer multiple of 24, minimally 120, maximally 480 MHz
dram_type: DRAM type; Set to 2 for DDR2; 3 for DDR3
dram_rank_num: DRAM chip select; 1 is a chip select; 2 election for two tablets
dram_chip_density: monolithic DRAM capacity in Mbit
dram_io_width: monolithic DRAM bus width in bits
dram_bus_width: DRAM bus width in bits, such as two 16-bit DRAM banks make up a 32 bit bus width
dram_cas: DRAM CAS latency
dram_zq: DRAM controller internal parameters
dram_odt_en: ODT 0 to disable; 1 to enable
dram_size: DRAM total capacity in MB
dram_tpr0: DRAM controller internal parameter
dram_tpr1: DRAM controller internal parameter
dram_tpr2: DRAM controller internal parameter
dram_tpr3: DRAM controller internal parameter
dram_tpr4: DRAM controller internal parameter
dram_tpr5: DRAM controller internal parameter
dram_emr1: DRAM controller internal parameter
dram_emr2: DRAM controller internal parameter
dram_emr3: DRAM controller internal parameter
Configuration example:

[dram_para]
dram_baseaddr = 0×40000000
dram_clk = 360
dram_type = 3
dram_rank_num = 1
dram_chip_density = 2048
dram_io_width = 16
dram_bus_width = 32
dram_cas = 6
dram_zq = 0x7b
dram_odt_en = 0
dram_size = 512
dram_tpr0 = 0×30926692
dram_tpr1 = 0×1090
dram_tpr2 = 0x1a0c8
dram_tpr3 = 0×0
dram_tpr4 = 0×0
dram_tpr5 = 0×0
dram_emr1 = 0×0
dram_emr2 = 0×0
dram_emr3 = 0×0
mali configuration

Mali is the name of the GPU on the A10, A10s, A13, A20, A23, and A33 SoC’s
[mali_para]
mali_used: 0 to disable; 1 to enable Mali module
mali_clkdiv: Mali clock divisor. Clock is obtained by devising PLL4 with mali_clkdiv
Configuration example:

[mali_para]
mali_used = 1
mali_clkdiv = 3
[g2d_para]
G2D is the 2D graphic display engine on the Allwinner SoC
g2d_used: 0 to disable; 1 to enable the g2d module
g2d_size: memory size for g2d

g2d_used = 1
g2d_size = 0×1000000
ethernet MAC configuration

[emac_para]
Ethernet configuration for the integrated ethernet IP. It still requires an external PHY
emac_used: 0 to disable; 1 to enable the ethernet MAC
emac_rxd0: RX data line 0 GPIO configuration
emac_rxd1: RX data line 1 GPIO configuration
emac_rxd2: RX data line 2 GPIO configuration
emac_rxd3: RX data line 3 GPIO configuration
emac_txd0: TX data line 0 GPIO configuration
emac_txd1: TX data line 1 GPIO configuration
emac_txd2: TX data line 2 GPIO configuration
emac_txd3: TX data line 3 GPIO configuration
emac_rxclk: RX clock GPIO configuration
emac_rxerr: RX error GPIO configuration
emac_rxdV: RX enabled GPIO configuration
emac_mdc: MII clock GPIO configuration
emac_mdio: MII data I/O GPIO configuration
emac_txen: TX enabled GPIO configuration
emac_txclk: TX clock GPIO configuration
emac_crs: Carrier Status of GPIO configuration
emac_col: Collision Detection GPIO configuration
emac_reset: PHY reset signal GPIO configuration
emac_power:
emac_link:
Configuration example:

[Emac_para]
emac_used = 1
emac_rxd3 = port:PA00
emac_rxd2 = port:PA01
emac_rxd1 = port:PA02
emac_rxd0 = port:PA03
emac_txd3 = port:PA04
emac_txd2 = port:PA05
emac_txd1 = port:PA06
emac_txd0 = port:PA07
emac_rxclk = port:PA08
emac_rxerr = port:PA09
emac_rxdV = port:PA10
emac_mdc = port:PA11
emac_mdio = port:PA12
emac_txen = port:PA13
emac_txclk = port:PA14
emac_crs = port:PA15
emac_col = port:PA16
emac_reset = port:PA17
i2c configuration

[twi0_para]
Two Wire Interface (i²c) configuration for TWI port 0
twi0_used: 0 to disable; 1 to enable
twi0_scl: TWI Serial CLock GPIO configuration
twi0_sda: TWI Serial Data GPIO configuration
Configuration example:
?
1
2
3
4
[twi0_para]
twi0_used = 1
twi0_scl = port:PB00
twi0_sda = port:PB01
[twi0_para]
Two Wire Interface (i²c) configuration for TWI port 1
twi1_used: 0 to disable; 1 to enable
twi1_scl: TWI Serial CLock GPIO configuration
twi1_sda: TWI Serial Data GPIO configuration
Configuration example:
?
1
2
3
4
[tw1_para]
twi1_used = 1
twi1_scl = port:PB18
twi1_sda = port:PB19
[twi2_para]
Two Wire Interface (i²c) configuration for TWI port 2
twi2_used: 0 to disable; 1 to enable
twi2_scl: TWI Serial CLock GPIO configuration
twi2_sda: TWI Serial Data GPIO configuration
Configuration example:
?
1
2
3
4
[twi2_para]
twi2_used = 1
twi2_scl = port:PB20
twi2_sda = port:PB21
uart configuration

Any of the 8 UART ports can be configured to be either 2 (Only TX/RX) wires, 4 wires (TX, RX, RTS and CTS) or 8 (Full function) ports.
uart_used: 0 to disable; 1 to enable
uart_port: UART port number
uart_type: UART type, 2, 4 or 8 wires
uart_tx: UART TX data line GPIO configuration
uart_rx: UART RX data line GPIO configuration
uart_rts: UART Ready to Send line GPIO configuration, only for 4 and 8 wire modes
uart_cts: UART Clear to Send line GPIO configuration, only for 4 and 8 wire modes
uart_dtr: UART Data Terminal Ready GPIO configuration, only for 8 wire modes
uart_dsr: UART Data Set Ready GPIO configuration, only for 8 wire modes
uart_dcd: UART Data Carrier Detect GPIO configuration, only for 8 wire modes
uart_ring: UART Ring Indicator GPIO configuration, only for 8 wire modes
[uart_para0]
Configuration example:
?
1
2
3
4
5
[uart_para0]
uart_used = 1
uart_port = 0
uart_tx = port:PB22
uart_rx = port:PB23
[uart_para1]
Configuration example:
?
1
2
3
4
5
6
7
8
9
10
11
12
[uart_para1]
uart_used = 0
uart_port = 1
uart_type = 8
uart_tx = port:PA10
uart_rx = port:PA11
uart_rts = port:PA12
uart_cts = port:PA13
uart_dtr = port:PA14
uart_dsr = port:PA15
uart_dcd = port:PA16
uart_ring = port:PA17
[uart_para2]
Configuration example:
?
1
2
3
4
5
6
7
8
[uart_para2]
uart_used = 0
uart_port = 2
uart_type = 4
uart_tx = port:PI18
uart_rx = port:PI19
uart_rts = port:PI16
uart_cts = port:PI17
[uart_para3]
Configuration example:
?
1
2
3
4
5
6
7
8
[uart_para3]
uart_used = 0
uart_port = 3
uart_type = 4
uart_tx = port:PH00
uart_rx = port:PH01
uart_rts = port:PH02
uart_cts = port:PH03
[uart_para4]
Configuration example:
?
1
2
3
4
5
6
[Uart_para4]
uart_used = 0
uart_port = 4
uart_type = 2
uart_tx = port:PH04
uart_rx = port:PH05
[uart_para5]
Configuration example:
?
1
2
3
4
5
6
[uart_para5]
uart_used = 0
uart_port = 5
uart_type = 2
uart_tx = port: PH06
uart_rx = port: PH07
[uart_para6]
Configuration example:
?
1
2
3
4
5
6
[uart_para6]
uart_used = 0
uart_port = 6
uart_type = 2
uart_tx = port:PA12
uart_rx = port:PA13
[uart_para7]
Configuration example:
?
1
2
3
4
5
6
[uart_para7]
uart_used = 0
uart_port = 7
uart_type = 2
uart_tx = port:PA14
uart_rx = port:PA15
spi configuration

spi_used: 0 to disable; 1 to enable
spi_cs_bitmap: 1 use cs0, 2 use cs1, 3 use cs0 & cs1
spi_cs0: Chip Select bit 0 GPIO configuration
spi_cs1: Chip Select bit 1 GPIO configuration
spi_sclk: clock GPIO configuration
spi_mosi: MOSI GPIO configuration
spi_miso: MISO GPIO configuration
Sticky-note-pin.png Note: Not all spi chip select bits are required to be set
[spi0_para]
Configuration example 1:
?
1
2
3
4
5
6
7
8
[spi0_para]
spi_used = 0
spi_cs_bitmap = 1
spi_cs0 = port:PI10
spi_sclk = port:PI11
spi_mosi = port:PI12
spi_miso = port:PI13
spi_cs1 = port:PI14
Configuration example 2:
?
1
2
3
4
5
6
7
[spi0_para]
spi_used = 0
spi_cs_bitmap = 1
spi_mosi = port:PC00
spi_miso = port:PC01
spi_sclk = port:PC02
spi_cs0 = port:PC23
[spi1_para]
Configuration example 1:
?
1
2
3
4
5
6
7
8
[spi1_para]
spi_used = 0
spi_cs_bitmap = 1
spi_cs0 = port:PA00
spi_sclk = port:PA01
spi_mosi = port:PA02
spi_miso = port:PA03
spi_cs1 = port:PA04
Configuration example 2:
?
1
2
3
4
5
6
7
8
[spi1_para]
spi_used = 0
spi_cs_bitmap = 1
spi_cs1 = port:PI15
spi_cs0 = port:PI16
spi_sclk = port:PI17
spi_mosi = port:PI18
spi_miso = port:PI19
[spi2_para]
Configuration example 1:
?
1
2
3
4
5
6
7
8
[spi2_para]
spi_used = 0
spi_cs_bitmap = 1
spi_cs1 = port:PB13
spi_cs0 = port:PB14
spi_sclk = port:PB15
spi_mosi = port:PB16
spi_miso = port:PB17
Configuration example 2:
?
1
2
3
4
5
6
7
[spi2_para]
spi_used = 0
spi_cs_bitmap = 1
spi_cs0 = port:PC19
spi_sclk = port:PC20
spi_mosi = port:PC21
spi_miso = port:PC23
[spi3_para]
Configuration example:
?
1
2
3
4
5
6
7
8
[spi3_para]
spi_used = 0
spi_cs_bitmap = 1
spi_cs0 = port:PA05
spi_sclk = port:PA06
spi_mosi = port:PA07
spi_miso = port:PA08
spi_cs1 = port:PA09
external spi device configuration

[spi_devices]
spi_dev_num: number of external SPI devices connected to the SoC. For each external SPI device N, a board define [spi_boardM] with M = N – 1 needs to be created
[spi_board0]
modalias: Alias
max_speed_hz: Maximum speed in Hz
bus_num: Bus number of SPI controller
mode: SPI mode, bitfield defined in spi.h
full_duplex: 0 for half-duplex; 1 for full-duplex mode
manual_cs: manually control Chip Select level (unsupported for now)
irq_gpio: Some SPI boards should need a IRQ to work properly and register the irq handler inside the device driver
Configuration example:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
[spi_board0]
modalias = “External SPI connection”
max_speed_hz = 12000000
bus_num = 1
chip_select = 0
mode = 3
full_duplex = 0
manual_cs = 0
irq_gpio = 1

[gpio_para]
gpio_used = 1
gpio_num = 1
gpio_pin_1 = port:PB04
resistive touch panel configuration

[rtp_para]
rtp_used: 0 to disable; 1 to enable
rtp_screen_size: diagonal screen size rounded to full inches
rtp_regidity_level: touchscreen regidty in 10 ms units
rtp_press_threshold_enable: 0 to disable; 1 to enable
rtp_press_threshold: defines the press-threshold sensitivity; (0×0 is least sensitive, 0xffffff is most sensitive) using TP Pressure Management threshold control (PRE_MEA_THRE_CNT register in A20 User Manual)
rtp_sensitive_level: defines the sensitivity (0×0 is least sensitive, 0xf is most sensitive) using internal pull-up resistor control (TP_SENSITIVE_ADJUST register in A20 User Manual)
rtp_exchange_x_y_flag: 0 for normal operation; 1 to flip X and Y coordinates
Configuration example:
?
1
2
3
4
5
6
7
rtp_used = 0
rtp_screen_size = 7
rtp_regidity_level = 7
rtp_press_threshold_enable = 0
rtp_press_threshold = 0x1f40
rtp_sensitive_level = 0xf
rtp_exchange_x_y_flag = 0
capacitive touch panel configuration

[ctp_para]
Several touch panel’s can be configured. Their name must match to the linux ctp-driver!
ctp_used: 0 to disable; 1 to enable
ctp_name: Name of the touch panel driver to use
ctp_twi_id: twi controller to use
ctp_twi_addr: hardware specfic twi address in hex
ctp_screen_rotate: 0 for normal operation; 1 for 180° rotation
ctp_screen_max_x: Maximum X screen resolution
ctp_screen_max_y: Maximum Y screen resolution
ctp_revert_x_flag: 0 for normal operation; 1 to flip the X axis
ctp_revert_y_flag: 0 for normal operation; 1 to flip the Y axis
ctp_havekey: 0 for normal operation; 1 if the touch panel also has touch-keys.
ctp_int_port: interrupt line GPIO configuration
ctp_wakeup: screen wake up GPIO configuration
ctp_io_port: I/O port GPIO configuration
Configuration example:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
[ctp_para]
ctp_used = 1
ctp_twi_id = 2
ctp_name = “ft5x_ts”
ctp_twi_addr = 0×38

ctp1_used = 1
ctp1_name = “Goodix-TS”
ctp1_twi_addr = 0×55

ctp2_used = 1
ctp2_name = “ssd253x-ts”
ctp2_twi_addr = 0×48

ctp3_used = 1
ctp3_name = “novatek-ts”
ctp3_twi_addr = 0×09

ctp4_used = 1
ctp4_name = “zet622x-ts”
ctp4_twi_addr = 0×76

ctp5_used = 1
ctp5_name = “byd693x-ts”
ctp5_twi_addr = 0×52

ctp6_used = 0
ctp6_name = “gt82x”
ctp6_twi_addr = 0x5d

ctp7_used = 0
ctp7_name = “px811″
ctp7_twi_addr = 0x5c

ctp_screen_rotate = 0
ctp_screen_max_x = 800
ctp_screen_max_y = 480
ctp_revert_x_flag = 0
ctp_revert_y_flag = 0
ctp_exchange_x_y_flag = 0
ctp_havekey = 0
ctp_int_port = port: PH21
ctp_wakeup = port: PB13
ctp_io_port = port: PH21
touch key configuration

[tkey_para]
Touch ‘key’, only for “hv_keypad” for now
tkey_used: 0 to disable; 1 to enable
tkey_name: driver name, must match linux driver name
tkey_twi_id: twi controller to use
tkey_twi_addr: hardware specfic twi address in hex
tkey_int: interrupt line GPIO configuration
Configuration example:
?
1
2
3
4
5
6
[tkey_para]
tkey_used = 0
tkey_name = “hv_keypad”
tkey_twi_id = 2
tkey_twi_addr = 0×62
tkey_int = port: PI13
tablet key configuration

Configures tablet physical buttons – usually Vol+ and Vol-, may have Home, Back and others.
Power key is usually handled by the AXP PMU. Buttons like reset and FEL are special and should work without a driver.
[tabletkeys_para]
tabletkeys_used: 0 to disable; 1 to enable
keyN_code: numeric keycode – easily found with evtest. N seems to be 0-4 by default.
Configuration example:
?
1
2
3
4
[tabletkeys_para]
tabletkeys_used=1
key0_code = 114
key1_code = 115
motor configuration

[motor_para]
motor_used: 0 to disable; 1 to enable
motor_shake: motor control pin GPIO configuration
Configuration example:
?
1
2
3
[motor_para]
motor_used = 0
motor_shake = port:PB03
lock configuration

Locks are either very new or really old as nothing can be found in any fex file in git. It seems reasonable to believe that this would be a screen lock ‘button’.
[locks_para]
locks_used: 0 to disable; 1 to enable
locks_gpio: switch GPIO configuration
Configuration example:
?
1
2
3
[locks_para]
locks_used = 0
locks_gpio = port:PH00
nand flash configuration

[nand_para]
nand_used: 0 to disable; 1 to enable
nand_we: Write Enable GPIO configuration
nand_ale: Address Latch Enable GPIO configuration
nand_cle: Command Latch Enable GPIO configuration
nand_ce0: Chip sElect bit 0 GPIO configuration
nand_ce1: Chip sElect bit 1 GPIO configuration
nand_ce2: Chip sElect bit 2 GPIO configuration
nand_ce3: Chip sElect bit 3 GPIO configuration
nand_ce4: Chip sElect bit 4 GPIO configuration
nand_ce5: Chip sElect bit 5 GPIO configuration
nand_ce6: Chip sElect bit 6 GPIO configuration
nand_ce7: Chip sElect bit 7 GPIO configuration
nand_nre: Nand Read Enable GPIO configuration
nand_rb0: Read / Busy bit 0 GPIO configuration
nand_rb1: Read / Busy bit 1 GPIO configuration
nand_d0: data bus bit 0 GPIO configuration
nand_d1: data bus bit 1 GPIO configuration
nand_d2: data bus bit 2 GPIO configuration
nand_d3: data bus bit 3 GPIO configuration
nand_d4: data bus bit 4 GPIO configuration
nand_d5: data bus bit 5 GPIO configuration
nand_d6: data bus bit 6 GPIO configuration
nand_d7: data bus bit 7 GPIO configuration
nand_wp: Write Protect GPIO configuration
nand_spi: SPI data line GPIO configuration
nand_ndqs: nand ddr clock signal GPIO configuration
Configuration example:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
[Nand_para]
nand_used = 1
nand_we = port:PC00
nand_ale = port:PC01
nand_cle = port:PC02
nand_ce1 = port:PC03
nand_ce0 = port:PC04
nand_nre = port:PC05
nand_rb0 = port:PC06
nand_rb1 = port:PC07
nand_d0 = port:PC08
nand_d1 = port:PC09
nand_d2 = port:PC10
nand_d3 = port:PC11
nand_d4 = port:PC12
nand_d5 = port:PC13
nand_d6 = port:PC14
nand_d7 = port:PC15
nand_wp = port:PC16
nand_ce2 = port:PC17
nand_ce3 = port:PC18
nand_ce4 = port:PC19
nand_ce5 = port:PC20
nand_ce6 = port:PC21
nand_ce7 = port:PC22
nand_spi = port:PC23
nand_ndqs = port:PC24
boot disp configuration

[boot_disp]
This section can be found in vendor fex files for H3 devices and is only used by Allwinner’s BSP u-boot (eg. to display a boot logo which might require further patches)
disp init configuration

[disp_init]
disp_init_enable: 0 to disable; 1 to enable
disp_mode: Display mode to use:
mode display mode
0 screen0(screen0, fb0)
1 screen1(screen1, fb0)
2 dualhead(screen0, screen1, fb0, fb1) (2 screens, 2 framebuffers)
3 xinerama(screen0, screen1, fb0) (2 screens, one big framebuffer)
4 clone(screen0, screen1, fb0) (2 screens, one standard framebuffer)
screen0_out_color_range: Output color range for HDMI (applies to both screen0/screen1 – there is no screen1_out_color_range):
type output color range
0 16-255 Limited Range (Default)
1 0-255 Full Range – PC Level
2 16-235 Limited Range – Video Level
screen0_output_type: Output type for screen0:
screen1_output_type: Output type for screen1:
type Output type
0 NONE
1 LCD
2 TV
3 HDMI
4 VGA
screen0_output_mode: Output mode for screen0:
screen1_output_mode: Output mode for screen1:
mode used for tv/hdmi output used for vga output
0 480i 1680*1050
1 576i 1440*900
2 480p 1360*768
3 576p 1280*1024
4 720p50 1024*768
5 720p60 800*600
6 1080i50 640*480
7 1080i60
8 1080p24
9 1080p50
10 1080p60 1920*1080
11 pal 1280*720
14 ntsc
fb0_framebuffer_num: fb0 buffer number, use 2 for double buffering
fb1_framebuffer_num: fb1 buffer number, use 2 for double buffering
fb0_format: pixel format for fb0:
fb1_format: pixel format for fb1:
format fb0_format
4 RGB655
5 RGB565
6 RGB556
7 ARGB1555
8 RGBA5551
9 RGB888
10 ARGB8888
12 ARGB4444
fb0_pixel_sequence: fb0 pixel sequence (0 generally for linux, 2 for android):
fb1_pixel_sequence: fb1 pixel sequence (0 generally for linux, 2 for android):
sequence fb0_pixel_sequence
0 ARGB
2 BGRA
fb0_scaler_mode_enable: 0 to disable; 1 to enable
fb1_scaler_mode_enable: 0 to disable; 1 to enable
lcd0_backlight: value to 240 sets PWM rate on selected PWM gpio
lcd1_backlight: value to 240 sets PWM rate on selected PWM gpio

Configuration example for LCD:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[disp_init]
disp_init_enable = 1
disp_mode = 0

screen0_output_type = 1
screen0_output_mode = 4

screen1_output_type = 1
screen1_output_mode = 4

fb0_framebuffer_num = 2
fb0_format = 10
fb0_pixel_sequence = 0
fb0_scaler_mode_enable = 0

fb1_framebuffer_num = 2
fb1_format = 10
fb1_pixel_sequence = 0
fb1_scaler_mode_enable = 0
Configuration example for VGA:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[disp_init]
disp_init_enable = 1
disp_mode = 0

screen0_output_type = 4
screen0_output_mode = 4

screen1_output_type = 2
screen1_output_mode = 14

fb0_framebuffer_num = 2
fb0_format = 10
fb0_pixel_sequence = 0
fb0_scaler_mode_enable = 1

fb1_framebuffer_num = 2
fb1_format = 10
fb1_pixel_sequence = 0
fb1_scaler_mode_enable = 1
Configuration example for Composite TV on an old TV (PAL mode):
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[disp_init]
disp_init_enable = 1
disp_mode = 0

screen0_output_type = 2
screen0_output_mode = 11

screen1_output_type = 2
screen1_output_mode = 11

fb0_framebuffer_num = 2
fb0_format = 10
fb0_pixel_sequence = 0
fb0_scaler_mode_enable = 1

fb1_framebuffer_num = 2
fb1_format = 10
fb1_pixel_sequence = 0
fb1_scaler_mode_enable = 1
lcd[0/1] configuration

lcd0 is used when lcd output is selected by display screen0, lcd1 by display screen1.
lcd_used: 0 to disable; 1 to enable
lcd_pwm_not_used: 0 to enable PWM; 1 to disable
lcd_pwm_ch: PWM channel
lcd_pwm_freq: PWM frequency in Hz
lcd_pwm_pol: PWM polarity; 0 is pulse LOW for lcd[0|1]_backlight periods, 1 is pulse HIGH.
lcd_x: X-axis active width
lcd_y: Y-axis active height
lcd_dclk_freq: pixel clock frequency in MHz
lcd_if: lcd interface:
interface lcd_interface
0 hv (sync + de)
1 8080
2 ttl
3 lvds
4 dsi (on A20 it means the use of SSD2828 bridge chip, on A31 it might really mean native DSI)
5 edp
6 external dsi (the use of SSD2828 bridge chip on A31 and onwards)
lcd_hbp: hsync back porch
lcd_ht: hsync total cycle
lcd_vbp: vsync back porch
lcd_vt: vsync total cycle * 2
lcd_hv_if: 0 for parallel hv interface; 1: for serial hv interface
lcd_hv_smode: 0 for RGB888 serial interface mode; 1 for CCIR656
lcd_hv_s888_if: serial RGB format
lcd_hv_syuv_if: serial YUV format
lcd_hv_vspw: vysnc plus width
lcd_hv_hspw: hsync plus width
lcd_hv_lde_used: 0 to disable; 1 to enable
lcd_hv_lde_iovalue: HV LDE iovalue
lcd_lvds_ch: 0 for single channel; 1 for dual channel
lcd_lvds_mode: 0 for NS mode; 1 for JEIDA mode
lcd_lvds_bitwidth: 0 for 24 bit; 1 for 18 bit
lcd_io_cfg0: lcd IO configuration
lcd_lvds_io_cross: 0 for normal; 1 for pn cross
lcd_cpu_if: cpu if mode:
mode cpu_if
0 18 bit
1 16 bit mode0
2 16 bit mode1
3 16 bit mode2
4 16 bit mode3
5 9 bit
6 8 bit, 256k
7 8 bit, 65k
lcd_gamma_correction_en: 0 to disable; 1 to enable
lcd_gamma_tbl_[0-255]: Gamma table 0 through 255
lcd_frm: 0 to disable dither; 1 to enable enable rgb666 dither; 2 to enable rgb656 dither
lcd_io_cfg0: lcd io inv
lcd_bl_en_used: 0 to disable; 1 to enable
lcd_bl_en: LCD BackLight GPIO configuration
lcd_power_used: 0 to disable; 1 to enable
lcd_power: LCD_VCC Voltage control GPIO configuration
lcd_pwm_used: 0 to disable; 1 to enable
lcd_pwm: lcd PWM, GPIO configuration (PWM0 fixed using the PB02 PWM1 fixed PI03 without user modification)
lcd_gpio_0: 2/3-wire SCL GPIO configuration
lcd_gpio_1: 2/3-wire SDA GPIO configuration
lcd_gpio_2: 2/3-wire SCEN GPIO configuration
lcd_gpio_3: LCD module RESET GPIO configuration
lcdd0: data bit 0 GPIO configuration
lcdd1: data bit 1 GPIO configuration
lcdd2: data bit 2 GPIO configuration
lcdd3: data bit 3 GPIO configuration
lcdd4: data bit 4 GPIO configuration
lcdd5: data bit 5 GPIO configuration
lcdd6: data bit 6 GPIO configuration
lcdd7: data bit 7 GPIO configuration
lcdd8: data bit 8 GPIO configuration
lcdd9: data bit 9 GPIO configuration
lcdd10: data bit 10 GPIO configuration
lcdd11: data bit 11 GPIO configuration
lcdd12: data bit 12 GPIO configuration
lcdd13: data bit 13 GPIO configuration
lcdd14: data bit 14 GPIO configuration
lcdd15: data bit 15 GPIO configuration
lcdd16: data bit 16 GPIO configuration
lcdd17: data bit 17 GPIO configuration
lcdd18: data bit 18 GPIO configuration
lcdd19: data bit 19 GPIO configuration
lcdd20: data bit 20 GPIO configuration
lcdd21: data bit 21 GPIO configuration
lcdd22: data bit 22 GPIO configuration
lcdd23: data bit 23 GPIO configuration
lcdclk: LCD Clock GPIO configuration
lcdde: LCD de GPIO configuration
lcdhsync: H sync GPIO configuration
lcdvsync: V sync GPIO configuration
[lcd0_para]
Configuration example:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
[lcd0_para]
lcd_used = 1
lcd_x = 800
lcd_y = 480
lcd_dclk_freq = 33
lcd_pwm_freq = 1000
lcd_pwm_pol = 0
lcd_swap = 0
lcd_if = 0
lcd_hbp = 215
lcd_ht = 1055
lcd_vbp = 34
lcd_vt = 1050
lcd_hv_if = 0
lcd_hv_smode = 0
lcd_hv_s888_if = 0
lcd_hv_syuv_if = 0
lcd_hv_vspw = 0
lcd_hv_hspw = 0
lcd_hv_lde_used = 0
lcd_hv_lde_iovalue = 0
lcd_lvds_ch = 0
lcd_lvds_mode = 0
lcd_lvds_bitwidth = 0
lcd_lvds_io_cross = 0
lcd_cpu_if = 0
lcd_cpu_da = 0
lcd_frm = 0
lcd_io_cfg0 = 0×10000000
lcd_io_cfg1 = 0
lcd_io_strength = 0
lcd_bl_en_used = 1
lcd_bl_en = port: PH07
lcd_power_used = 1
lcd_power = port: PH08
lcd_pwm_used = 1
lcd_pwm = port:PB02
lcd_gpio_0 =
lcd_gpio_1 =
lcd_gpio_2 =
lcd_gpio_3 =
lcdd0 = port:PD00
lcdd1 = port:PD01
lcdd2 = port:PD02
lcdd3 = port:PD03
lcdd4 = port:PD04
lcdd5 = port:PD05
lcdd6 = port:PD06
lcdd7 = port:PD07
lcdd8 = port:PD08
lcdd9 = port:PD09
lcdd10 = port:PD10
lcdd11 = port:PD11
lcdd12 = port:PD12
lcdd13 = port:PD13
lcdd14 = port:PD14
lcdd15 = port:PD15
lcdd16 = port:PD16
lcdd17 = port:PD17
lcdd18 = port:PD18
lcdd19 = port:PD19
lcdd20 = port:PD20
lcdd21 = port:PD21
lcdd22 = port:PD22
lcdd23 = port:PD23
lcdclk = port:PD24
lcdde = port:PD25
lcdhsync = port:PD26
lcdvsync = port:PD27
Other configuration examples for certain panels:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
;lvds 640×480 module name: SG0570EDG
lcd_x = 640
lcd_y = 480
lcd_dclk_freq = 25
lcd_if = 3
lcd_hbp = 114
lcd_ht = 800
lcd_vt = 1050
lcd_vbp = 34
lcd_pwm_freq = 20000
lcd_lvds_bitwidth = 1
lcd_pwm_used = 1
lcd_pwm = port:PB02
lcd_pwm_pol = 0

;RGB 800×480 module name: H-B070D-15C
lcd_x = 800
lcd_y = 480
lcd_dclk_freq = 33
lcd_if = 0
lcd_hbp = 46
lcd_ht = 1055
lcd_vbp = 23
lcd_vt = 1050

;RGB 800×600 module name: H-B080D-24F
lcd_x = 800
lcd_y = 600
lcd_dclk_freq = 40
lcd_if = 0
lcd_hbp = 46
lcd_ht = 1056
lcd_vbp = 23
lcd_vt = 1270

;RGB 480×272 module name: KD43G18-40NB-A11
lcd_x = 480
lcd_y = 272
lcd_dclk_freq = 9
lcd_if = 0
lcd_hbp = 2
lcd_ht = 525
lcd_vbp = 2
lcd_vt = 572

;lvds 1024×600 module name: CLAP101NC01CW?
lcd_x = 1024
lcd_y = 600
lcd_dclk_freq = 52
lcd_if = 3
lcd_hbp = 33
lcd_ht = 1344
lcd_vbp = 23
lcd_vt = 1270

;lvds 1024×768 module name: KD080D3-40NA-A2
lcd_x = 1024
lcd_y = 768
lcd_dclk_freq = 65
lcd_if = 3
lcd_hbp = 160
lcd_ht = 1344
lcd_vbp = 23
lcd_vt = 1612

;lvds 1024×768 module name: LG-LP097X02
lcd_x = 1024
lcd_y = 768
lcd_dclk_freq = 100
lcd_if = 3
lcd_hbp = 480
lcd_ht = 2084
lcd_vbp = 6
lcd_vt = 1600
lcd_lvds_bitwidth = 1
lcd_io_cfg0 = 0×04000000
lcd_frm = 1

lcd_io_cfg0 = 0×10000000
lcd_gamma_correction_en = 0
lcd_gamma_tbl_0 = 0×00000000
lcd_gamma_tbl_1 = 0×00010101
;……..
lcd_gamma_tbl_255 = 0x00ffffff
[lcd1_para]
Configuration example:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
[lcd1_para]
lcd_used = 0

lcd_x = 0
lcd_y = 0
lcd_dclk_freq = 0
lcd_pwm_not_used = 0
lcd_pwm_ch = 0
lcd_pwm_freq = 0
lcd_pwm_pol = 0
lcd_if = 0
lcd_hbp = 0
lcd_ht = 0
lcd_vbp = 0
lcd_vt = 0
lcd_hv_if = 0
lcd_hv_smode = 0
lcd_hv_s888_if = 0
lcd_hv_syuv_if = 0
lcd_hv_vspw = 0
lcd_hv_hspw = 0
lcd_lvds_ch = 0
lcd_lvds_mode = 0
lcd_lvds_bitwidth = 0
lcd_lvds_io_cross = 0
lcd_cpu_if = 0
lcd_frm = 0
lcd_io_cfg0 = 0
lcd_gamma_correction_en = 0
lcd_gamma_tbl_0 = 0×00000000
lcd_gamma_tbl_1 = 0×00010101
;……..
lcd_gamma_tbl_255 = 0x00ffffff

lcd_bl_en_used = 0
lcd_bl_en =

lcd_power_used = 0
lcd_power =

lcd_pwm_used = 0
lcd_pwm = port:PI03

lcd_gpio_0 =
lcd_gpio_1 =
lcd_gpio_2 =
lcd_gpio_3 =

lcdd0 = port:PH00
lcdd1 = port:PH01
lcdd2 = port:PH02
lcdd3 = port:PH03
lcdd4 = port:PH04
lcdd5 = port:PH05
lcdd6 = port:PH06
lcdd7 = port:PH07
lcdd8 = port:PH08
lcdd9 = port:PH09
lcdd10 = port:PH10
lcdd11 = port:PH11
lcdd12 = port:PH12
lcdd13 = port:PH13
lcdd14 = port:PH14
lcdd15 = port:PH15
lcdd16 = port:PH16
lcdd17 = port:PH17
lcdd18 = port:PH18
lcdd19 = port:PH19
lcdd20 = port:PH20
lcdd21 = port:PH21
lcdd22 = port:PH22
lcdd23 = port:PH23
lcdclk = port:PH24
lcdde = port:PH25
lcdhsync = port:PH26
lcdvsync = port:PH27
tv out dac configuration

The TV-Out Digital Analog Converter (DAC) modules the framebuffer to a signal suitable for a TV
[tv_out_dac_para]
dac_used: 0 to disable; 1 to enable
dac0_src: Output source for the DAC:
dac1_src: Output source for the DAC:
dac2_src: Output source for the DAC:
dac3_src: Output source for the DAC:
dac Output source
0 Composite
1 Luma
2 Chroma
3
4 Y
5 Pb
6 Pr
7 None
Configuration example:
?
1
2
3
4
5
6
[tv_out_dac_para]
dac_used = 1
dac0_src = 4
dac1_src = 5
dac2_src = 6
dac3_src = 0
csi gpio configuration

csi_used: 0 to enable; 1 to disable
csi_mode: 0 to sample one csi to one buffer; 1 to sample two csi to one buffer
csi_dev_qty: Quantity of devices linked to the csi interface
csi_twi_id: TWI controller to use
csi_twi_id_b: TWI controller to use for second device
csi_mname: Module name to match the csi device; currently known to work:
csi_mname_b: Module name to match the second csi device; currently known to work:
ov7670
gc0308
gt2005
hi704
hi253
csi_twi_addr: TWI address for the used camera
csi_twi_addr_b: TWI address for the used camera for second device
csi_if: interface:
csi_if_b: interface for second device:
if csi interface
0 hv_8bit
1 hv_16bit
2 hv_24bit
3 bt656 1ch
4 bt656 2ch
5 bt656 4ch
csi_pck: p clock GPIO configuration
csi_ck: clock GPIO configuration
csi_hsync: H-sync GPIO configuration
csi_vsync: V-sync GPIO configuration
csi_hflip: Horizontal frame flip
csi_hflip_b: Horizontal frame flip for second device
csi_vflip: Vertical frame flip
csi_vflip_b: Vertical frame flip for second device
csi_d0: data bit 0 GPIO configuration
csi_d1: data bit 1 GPIO configuration
csi_d2: data bit 2 GPIO configuration
csi_d3: data bit 3 GPIO configuration
csi_d4: data bit 4 GPIO configuration
csi_d5: data bit 5 GPIO configuration
csi_d6: data bit 6 GPIO configuration
csi_d7: data bit 7 GPIO configuration
csi_d8: data bit 8 GPIO configuration
csi_d9: data bit 9 GPIO configuration
csi_d10: data bit 10 GPIO configuration
csi_d11: data bit 11 GPIO configuration
csi_d12: data bit 12 GPIO configuration
csi_d13: data bit 13 GPIO configuration
csi_d14: data bit 14 GPIO configuration
csi_d15: data bit 15 GPIO configuration
csi_reset: Camera reset; the default value, high or low ,depends on the module
csi_power_en: Power enable GPIO configuration
csi_stby: Camera standby GPIO configuration; the default value, high or low ,depends on the module
csi_stby_b: Camera standby GPIO configuration for second device; the default value, high or low ,depends on the module
csi_stby_mode: 0 to not shutdown power at standby; 1 shutdown power at standby
csi_facing: Tells the device if the camera is facing or otherwise. 0 for the back, 1 for the front camera.
csi_facing_b: Same as above.
csi_vflip: Vertical flip; 0: disabled, 1: enabled
csi_hflip: Horizontal flip; 0: disabled, 1: enabled
csi_flash: Camera Flash GPIO configuration
csi_flash_b: Camera Flash GPIO configuration for second device
csi_flash_pol: Flash polarity of flash light; 0 for active low; 1 for active high
csi_flash_pol_b: Flash polarity of flash light for second device; 0 for active low; 1 for active high
csi_af_en: Autofocus enable GPIO configuration
csi_iovdd: Camera module IO power, PMU power supply
csi_iovdd_b: Camera module IO power, PMU power supply for second device
csi_avdd: Camera analog power, PMU power supply
csi_avdd_b: Camera analog power, PMU power supply for second device
csi_dvdd: Camera digital power, PMU power supply
csi_dvdd_b: Camera digital power, PMU power supply for second device
pmu_ldo3: “axp20_pll” or leave empty empty when not using any PMU power supply
pmu_ldo4: “axp20_hdmi” or empty when not using any PMU power supply
[csi0_para]
Configuration example:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
[csi0_para]
csi_used = 1
csi_mode = 0
csi_dev_qty = 1
csi_stby_mode = 1

csi_mname = “gc0308″
csi_twi_id = 1
csi_twi_addr =0×42
csi_if = 0
csi_vflip = 0
csi_hflip = 1
csi_iovdd = “”
csi_avdd = “”
csi_dvdd = “”
csi_flash_pol = 1

csi_mname_b = “gt2005″
csi_twi_id_b = 1
csi_twi_addr_b = 0×78
csi_if_b = 0
csi_vflip_b = 0
csi_hflip_b = 0
csi_iovdd_b = “”
csi_avdd_b = “”
csi_dvdd_b = “”
csi_flash_pol_b = 1

csi_pck = port:PE00
csi_ck = port:PE01
csi_hsync = port:PE02
csi_vsync= port:PE03
csi_d0 = port:PE04
csi_d1 = port:PE05
csi_d2 = port:PE06
csi_d3 = port:PE07
csi_d4 = port:PE08
csi_d5 = port:PE09
csi_d6 = port:PE10
csi_d7 = port:PE11
csi_d8 = port:PG04
csi_d9 = port:PG05
csi_d10 = port:PG06
csi_d11 = port:PG07
csi_d12 = port:PG08
csi_d13 = port:PG09
csi_d14 = port:PG10
csi_d15 = port:PG11
csi_reset = port:PH13
csi_power_en = port:PH16
csi_stby = port:PH18
csi_flash =
csi_af_en =
csi_reset_b = port:PH13
csi_power_en_b = port:PH16
csi_stby_b = port:PH19
csi_flash_b =
csi_af_en_b =
[csi1_para]
Configuration example:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
[csi1_para]
csi_used = 1
csi_mode = 0
csi_dev_qty = 1
csi_stby_mode = 1

csi_mname = “gc0308″
csi_twi_id = 1
csi_twi_addr =0×42
csi_if = 0
csi_vflip = 0
csi_hflip = 1
csi_iovdd = “”
csi_avdd = “”
csi_dvdd = “”
csi_flash_pol = 1

csi_mname_b = “gt2005″
csi_twi_id_b = 1
csi_twi_addr_b = 0×78
csi_if_b = 0
csi_vflip_b = 0
csi_hflip_b = 0
csi_iovdd_b = “”
csi_avdd_b = “”
csi_dvdd_b = “”
csi_flash_pol_b = 1

csi_pck = port:PG00
csi_ck = port:PG01
csi_d0 = port:PH00
csi_d1 = port:PH01
csi_d2 = port:PH02
csi_d3 = port:PH03
csi_d4 = port:PH04
csi_d5 = port:PH05
csi_d6 = port:PH06
csi_d7 = port:PH07
csi_d8 = port:PH08
csi_d9 = port:PH09
csi_d10 = port:PH10
csi_d11 = port:PH11
csi_d12 = port:PH12
csi_d13 = port:PH13
csi_d14 = port:PH14
csi_d15 = port:PH15
csi_d16 = port:PH16
csi_d17 = port:PH17
csi_d18 = port:PH18
csi_d19 = port:PH19
csi_d20 = port:PH20
csi_d21 = port:PH21
csi_d22 = port:PH22
csi_d23 = port:PH23
csi_hsync = port:PH26
csi_vsync= port:PH27
csi_reset = port:PG13
csi_power_en = port:PG16
csi_stby = port:PG18
csi_flash =
csi_af_en =
csi_reset_b = port:PG13
csi_power_en_b = port:PG16
csi_stby_b = port:PG19
csi_flash_b =
csi_af_en_b =
tv configuration

[tvout_para]
tvout_used: 0 to disable; 1 to enable
tvout_channel_num: Channel number
tv_en: TV encoder GPIO configuration
Configuration example:
?
1
2
3
tvout_used = 1
tvout_channel_num = 1
tv_en = port:PI12
[tvin_para]
tvin_used: 0 to disable; 1 to enable
tvin_channel_num: channel number
Configuration example:
?
1
2
tvin_used = 1
tvin_channel_num = 4
sata configuration

[sata_para]
sata_used: 0 to disable; 1 to enable
sata_power_en: Sata power enable GPIO configuration
Configuration example:
?
1
2
sata_used = 1
sata_power_en = port:PB08
sdmmc configuration

There are several things to notice when configuring the sdmmc controller.
sdc_used: 0 to disable; 1 to enable;?0=????1=???
sdc_detmode: detection mode ???????:
mode detection mode note
0
1 GPIO detection Also configure sdc_det to map to a GPIO ?GPIO???????sdc_det????GPIO??
2 sdc_d3 detection sdc_d3 must be configured as HiZ GPIO and have an external 1 M? pull-down resistor ?SD?D3???????????GPIO????????1M????
3 polling (card cannot be swapped) ???????
4 manually (via the proc file system node)
bus_width: 1 for 1bit; 4 for 4bit (may also be called sdc_bwid?!? verify please)
sdc_d0: data line 0 GPIO configuration
sdc_d1: data line 1 GPIO configuration
sdc_d2: data line 2 GPIO configuration
sdc_d3: data line 3 GPIO configuration
sdc_clk: CLK GPIO configuration
sdc_cmd: CMD GPIO configuration
sdc_det: DET GPIO configuration
sdc_use_wp: 0 is normal operation; 1 is write protect
sdc_wp: Write Protect the GPIO configuration
[mmc0_para]
Configuration example:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
[mmc0_para]
sdc_used = 1
sdc_detmode = 1
bus_width = 4
sdc_d1 = port:PF00
sdc_d0 = port:PF01
sdc_clk = port:PF02
sdc_cmd = port:PF03
sdc_d3 = port:PF04
sdc_d2 = port:PF05
sdc_det = port:PH01
sdc_use_wp = 0
sdc_wp =
[mmc1_para]
Configuration example:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
[mmc1_para]
sdc_used = 1
sdc_detmode = 1
bus_width = 4
sdc_cmd = port:PH22
sdc_clk = port:PH23
sdc_d0 = port:PH24
sdc_d1 = port:PH25
sdc_d2 = port:PH26
sdc_d3 = port:PH27
sdc_det = port:PH2
sdc_use_wp = 0
sdc_wp =
[mmc2_para]
Configuration example:
?
1
2
[mmc2_para]
sdc_used = 0
[mmc3_para]
Configuration example:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
[mmc3_para]
sdc_used = 1
sdc_detmode = 4
bus_width = 4
sdc_cmd = port:PI04
sdc_clk = port:PI05
sdc_d0 = port:PI06
sdc_d1 = port:PI07
sdc_d2 = port:PI08
sdc_d3 = port:PI09
sdc_det =
sdc_use_wp = 0
sdc_wp =
memory stick configuration

[ms_para]
ms_used: 0 to disable; 1 to enable
ms_bs: Bus State signal GPIO configuration
ms_clk: Clock GPIO configuration
ms_d0: Data line 0 GPIO Configuration
ms_d1: Data line 1 GPIO Configuration
ms_d2: Data line 2 GPIO Configuration
ms_d3: Data line 3 GPIO Configuration
ms_det: Stick detection GPIO Configuration
Configuration example:
?
1
2
3
4
5
6
7
8
9
[ms_para]
ms_used = 1
ms_bs = port:PH06
ms_clk = port:PH07
ms_d0 = port:PH08
ms_d1 = port:PH09
ms_d2 = port:PH10
ms_d3 = port:PH11
ms_det = port:PH2
sim card configuration

[smc_para]
smc_used: 0 to disable; 1 to enable
smc_rst: Reset GPIO configuration
smc_vppen: VPP enable GPIO configuration
smc_vppp: Programming VPP GPIO configuration
smc_det: SIM Card detect GPIO configuration
smc_vccen: VCC enable GPIO configuration
smc_sck: Serial clock GPIO configuration
smc_sda: Serial data GPIO configurion
Configuration example:
?
1
2
3
4
5
6
7
8
9
[smc_para]
smc_used = 1
smc_rst = port:PH13
smc_vppen = port:PH14
smc_vppp = port:PH15
smc_det = port:PH16
smc_vccen = port:PH17
smc_sck = port:PH18
smc_sda = port:PH19
ps2 configuration

[ps2_0_para]
ps2_used: 0 to disable; 1 to enable
ps2_scl: Serial clock GPIO configuration
ps2_sda: Serial data GPIO configuration
Configuration example:
?
1
2
3
4
[ps2_0_para]
ps2_used = 1
ps2_scl = port:PI20
ps2_sda = port:PI21
[ps2_1_para]
ps2_used: 0 to disable; 1 to enable
ps2_scl: Serial clock GPIO configuration
ps2_sda: Serial data GPIO configuration
Configuration example:
?
1
2
3
4
[ps2_1_para]
ps2_used = 1
ps2_scl = port:PI20
ps2_sda = port:PI21
can bus configuration

[can_para]
can_used: 0 to disable; 1 to enable it
can_tx: transmit GPIO Configuration
can_rx: receive GPIO configuration
Configuration example:
?
1
2
3
4
[Can_para]
can_used = 1
can_tx = port:PA16
can_rx = port:PA17
matrix keyboard

23.1 [keypad_para]

kp_used: 0 to disable; 1 to enable
kp_in_size: column width
kp_out_size: row width
kp_in0: column 0 GPIO Configuration
kp_in1: column 1 GPIO Configuration
kp_in2: column 2 GPIO Configuration
kp_in3: column 3 GPIO Configuration
kp_in4: column 4 GPIO configuration
kp_in5: column 5 GPIO configuration
kp_in6: column 6 GPIO Configuration
kp_in7: column 7 GPIO configuration
kp_out0: row 0 GPIO Configuration
kp_out1: row 1 GPIO Configuration
kp_out2: row 2 GPIO Configuration
kp_out3: row 3 GPIO Configuration
kp_out4: row 4 GPIO configuration
kp_out5: row 5 GPIO configuration
kp_out6: row 6 GPIO Configuration
kp_out7: row 7 GPIO configuration
Configuration example:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[Keypad_para]
kp_used = 1
kp_in_size = 8
kp_out_size = 8
kp_in0 = port:PH08
kp_in1 = port:PH09
kp_in2 = port:PH10
kp_in3 = port:PH11
kp_in4 = port:PH14
kp_in5 = port:PH15
kp_in6 = port:PH16
kp_in7 = port:PH17
kp_out0 = port:PH18
kp_out1 = port:PH19
kp_out2 = port:PH22
kp_out3 = port:PH23
kp_out4 = port:PH24
kp_out5 = port:PH25
kp_out6 = port:PH26
kp_out7 = port:PH27
USB control flags

usb_used: 0 to disable; 1 to enable
usb_port_type: USB port type:
type usb port type
0 device only
1 host only
2 OTG
usb_detect_type: 0 = no checking; 1 = VBus / id check
usb_controller_type: USB controller type:
type usb controller type
0 Unknown
1 EHCI
2 OHCI
usb_id_gpio:USB ID pin GPIO configuration
usb_det_vbus_gpio: USB detect VBus pin GPIO configuration (VBus is USB speak for the +5V line)
usb_drv_vbus_gpio: USB drive VBus pin GPIO configuration
usb_restrict_gpio:
usb_host_init_state: In host only mode, host port initialization state; 0 do not initialize; 1 initializatie USB
usb_restric_flag:
[usbc0]
Configuration example:
?
1
2
3
4
5
6
7
8
[usbc0]
usb_used = 1
usb_port_type = 2
usb_detect_type = 1
usb_id_gpio = port:PH04
usb_det_vbus_gpio = port:PH05
usb_drv_vbus_gpio = port:PB09
usb_host_init_state = 0
[usbc1]
Configuration example:
?
1
2
3
4
5
6
7
8
[usbc1]
usb_used = 1
usb_port_type = 1
usb_detect_type = 0
usb_id_gpio =
usb_det_vbus_gpio =
usb_drv_vbus_gpio = port:PH06
usb_host_init_state = 1
[usbc2]
Configuration example:
?
1
2
3
4
5
6
7
8
[usbc2]
usb_used = 1
usb_port_type = 1
usb_detect_type = 0
usb_id_gpio =
usb_det_vbus_gpio =
usb_drv_vbus_gpio = port:PH03
usb_host_init_state = 1
USB Device

[usb_feature]
vendor_id: vendor ID
mass_storage_id: mass storage ID
adb_id: android debug bridge ID
manufacturer_name: vendor name
product_name: = product name
serial_number: = serial number
Configuration example:
?
1
2
3
4
5
6
7
[usb_feature]
vendor_id = 0x18d1
mass_storage_id = 0×0001
adb_id = 0×0002
manufacturer_name = “USB Developer”
product_name = “Android”
serial_number = “20080411″
[msc_feature]
vendor_name: vendor name
product_name: product name
release: release version
luns: number of logical units
Configuration example:
?
1
2
3
4
5
[msc_feature]
vendor_name = “USB 2.0″
product_name = “USB Flash Driver”
release = 100
luns = 2
G Sensor configuration

[gsensor_para]
gsensor_used: 0 to disable; 1 to enable
gsensor_name: linux kernel module name to match configuration
gsensor_twi_id: TWI bus ID
gsensor_twi_addr: TWI address
gsensor_int1: interrupt 1 GPIO configuration
gsensor_int2: interrupt 2 GPIO configuration
gsensor_revert_x_flag: (untested)
gsensor_revert_y_flag: (untested)
gsensor_revert_z_flag: (untested)
gsensor_exchange_x_y_flag: (untested)
Configuration example 1:
?
1
2
3
4
5
6
7
[Gsensor_para]
gsensor_used = 1
gsenser_name = “bma250″
gsensor_twi_id = 1
gsensor_twi_addr = 0×18
gsensor_int1 = port:PH00
gsensor_int2 = port:PI10
Configuration example 2:
?
1
2
3
4
5
6
7
[Gsensor_para]
gsensor_used = 1
gsenser_name = “bma222″
gsensor_twi_id = 1
gsensor_twi_addr = 0×08
gsensor_int1 = port:PH00
gsensor_int2 = port:PI10
Configuration example 3:
?
1
2
3
4
5
6
7
[Gsensor_para]
gsensor_used = 1
gsenser_name = “mma7660″
gsensor_twi_id = 1
gsensor_twi_addr = 0x4c
gsensor_int1 = port:PH00
gsensor_int2 = port:PI10
gps gpio configuration

[gps_para]
gps_used: 0 to disable; 1 to enable
gps_spi_id: SPI controller; 0 – 2 for SPI0, SPI1 or SPI2; 15 if no SPI is used
gps_spi_cs_num: chip select SPI controller; 0 = SPI0, 1 = SPI1
gps_lradc: 0 or 1 for Low Rate ADC Format; 2 for no Low Rate ADC Format
gps_clk: Clock GPIO configuration
gps_sign: GPS sign GPIO configuration
gps_mag: GPS Magnitude GPIO configuration
gps_vcc_en: GPS VCC enable GPIO configuration
gps_osc_en: GPS Oscillator enable GPIO configuration
gps_rx_en: GPS receive enable GPIO configuration
Configuration example:
?
1
2
3
4
5
6
7
8
9
10
11
[gps_para]
gps_used = 0
gps_spi_id = 2
gps_spi_cs_num = 0
gps_lradc = 1
gps_clk = port:PI00
gps_sign = port:PI01
gps_mag = port:PI02
gps_vcc_en = port:PC22
gps_osc_en = port:PI14
gps_rx_en = port:PI15
sdio wifi configuration

[sdio_wifi_para]
sdio_wifi_used: 0 to disable; 1 to enable
sdio_wifi_sdc_id: SD controller ID to use
sdio_wifi_mod_sel: SDI module selection (see mmc_pm.c ):
mode wifi selection mode note
0 none
1 swl-n20 WiFi
2 usi bm-01 WiFi – Bluetooth – FM radio
3 ar6302qfn
4 apm6xxx
5 swb b23 WiFi – Bluetooth – FM radio
6 hw-mw269x Huawei wifi driver
7 bcm40181
8 bcm40183 BCM40183(BCM4330)
9 rtl8723as RTL8723AS(RF-SM02B)
10 rtl8189es RTL8189ES(SM89E00)
sdio_wifi_shdn: SHDN GPIO configuration
sdio_wifi_host_wakeup: WiFi wakeup GPIO Configuration
sdio_wifi_vdd_en: VDD enable GPIO configuration
sdio_wifi_vcc_en: VCC enable GPIO configuration
Configuration example:
?
1
2
3
4
5
6
7
8
9
[Sdio_wifi_para]
sdio_wifi_used = 1
sdio_wifi_sdc_id = 3
sdio_wifi_mod_sel = 1

sdio_wifi_shdn = port:PH09
sdio_wifi_host_wakeup = port:PH10
sdio_wifi_vdd_en = port:PH11
sdio_wifi_vcc_en = port:PH12
Optionally the following parameters can be used when other/multiple transceivers are installed.
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
; 1 – samsung swl-n20 sdio wifi gpio config
swl_n20_shdn = port:PH09
swl_n20_host_wakeup = port:PH10
swl_n20_vdd_en = port:PH11
swl_n20_vcc_en = port:PH12

; 2 – usi bm01a sdio wifi gpio config
usi_bm01a_wl_pwr = port:PH12
usi_bm01a_wlbt_regon = port:PI11
usi_bm01a_wl_rst = port:PI10
usi_bm01a_wl_wake = port:PI12
usi_bm01a_bt_rst = port:PB05
usi_bm01a_bt_wake = port:PI20
usi_bm01a_bt_hostwake = port:PI21

; 3 – ar6302qfn sdio wifi gpio config
ar6302_qfn_pwr = port:PH12
ar6302_qfn_shdn_n = port:PH09

; 4 – apm sdio wifi gpio config
apm_6981_vcc_en = port:PA09
apm_6981_vdd_en = port:PA10
apm_6981_wakeup = port:PA11
apm_6981_rst_n = port:PA12
apm_6981_pwd_n = port:PA13

; 6 – huawei mw269x(v1/v2) sdio wifi gpio config
hw_mw269x_wl_pwr = port:PH12
hw_mw269x_wl_enb = port:PH11
hw_mw269x_wl_hostwake = port:PH10
hw_mw269x_wl_wake = port:PH09
hw_mw269x_bt_enb = port:PB05
hw_mw269x_bt_wake = port:PI20
hw_mw269x_bt_hostwake = port:PI21
us wifi configuration

[usb_wifi_para]
usb_wifi_used: 0 to disable; 1 to enable
usb_wifi_usbc_num: USB controller to which USB wifi module is connected
usb_host_init_state: used together, such as xx = 2. Then usbc2 the usb_host_init_state 0
Configuration example:
?
1
2
3
[usb_wifi_para]
usb_wifi_used = 0
usb_wifi_usbc_num = 2
3G configuration

[3g_para]
3g_used: 0 to disable; 1 to enable
3g_usbc_num: USB controller to which the 3G module is connected
3g_uart_num: UART controller to which the 3G module is connected
3g_pwr: power enable GPIO configuration
3g_wakeup: wakeup GPIO configuration
3g_int: interrupt GPIO configuration
Configuration example:
?
1
2
3
4
5
6
3g_used = 1
3g_usbc_num = 2
3g_uart_num = 0
3g_pwr = port:PH09
3g_wakeup = port:PH10
3g_int = port:PH11
gyroscope

[gy_para]
gy_used: 0 to disable; 1 to enable
gy_twi_id: TWI controller to use
gy_twi_addr: TWI address to use
gy_int1: interrupt 1 GPIO configuration
gy_int2: interrupt 2 GPIO configuration
Configuration example:
?
1
2
3
4
5
6
[gy_para]
gy_used = 1
gy_twi_id = 1
gy_twi_addr = 0x0a
gy_int1 = port:PH18
gy_int2 = port:PH19
light sensor

[ls_para]
ls_used: 0 to disable; 1 to enable
ls_twi_id: TWI controller to use
ls_twi_addr: TWI address
ls_int: interrupt GPIO configuration
Configuration example:
?
1
2
3
4
5
[ls_para]
ls_used = 1
ls_twi_id = 1
ls_twi_addr = 0x0c
ls_int = port:PH20
compass

[compass_para]
compass_used: 0 to disable; 1 to enable
compass_twi_id: TWI controller to use
compass_twi_addr: TWI address to use
compass_int: interrupt GPIO configuration
Configuration example:
?
1
2
3
4
5
[compass_para]
compass_used = 0
compass_twi_id = 1
compass_twi_addr = 0x0d
compass_int = port:PI13
blue tooth

[bt_para]
bt_used: 0 to disable; 1 to enable
bt_uart_id: UART controller to use
bt_wakeup: wakeup GPIO configuration
bt_gpio: optional bluetooth pin GPIO configuration
bt_rst: = reset GPIO configuration
Configuration example:
?
1
2
3
4
5
6
[Bt_para]
bt_used = 1
bt_uart_id = 2
bt_wakeup = port:PI20
bt_gpio = port:PI21
bt_rst = port:PB05
i2s configuration

[i2s_para]
i2s_used: 0 to disable; 1 to enable
i2s_channel: channel control; 1 for one, 2 for two channels
i2s_mclk: master clock signal GPIO configuration
i2s_bclk: bit clock signal GPIO configuration
i2s_lrclk: word clock (left/right) signal GPIO configuration
i2s_dout0: digital out 0 GPIO configuration
i2s_dout1: (optional) digital out 1 GPIO configuration
i2s_dout2: (optional) digital out 2 GPIO configuration
i2s_dout3: (optional) digital out 3 GPIO configuration
i2s_din: multiplexed in signal GPIO configuration
Configuration example:
?
1
2
3
4
5
6
7
8
9
10
11
[i2s_para]
i2s_used = 1
i2s_channel = 2
i2s_mclk = port:PB05
i2s_bclk = port:PB06
i2s_lrclk = port:PB07
i2s_dout0 = port:PB08
i2s_dout1 =
i2s_dout2 =
i2s_dout3 =
i2s_din = port:PB12
spdif configuration

[spdif_para]
spdif_used: 0 to disable; 1 to enable
spdif_mclk: optional master clock GPIO configuration
spdif_dout: digital out GPIO configuration
spdif_din: digital in GPIO configuration
Configuration example:
?
1
2
3
4
5
[spdif_para]
spdif_used = 1
spdif_mclk =
spdif_dout = port:PB13
spdif_din =
audio configuration

[audio_para]
audio_used: 0 to disable; 1 to enable
audio_pa_ctrl: External Amp shutdown GPIO configuration
audio_lr_change: 0 for normal operation; 1 to swap left and right channels
playback_used: 0 to disable; 1 to enable This is a linux-sunxi specific extention
capture_used: 0 to dissable; 1 to enable This is a linux-sunxi specific extention
Some extra settings were introduced with the A31:
audio_mute_ctrl: External Amp mute GPIO configuration
cap_vol: ???
headphone_vol: Internal headphone amp volume (0 ~ 0x3f: 0 .. -62 dB)
headphone_direct_used: 1 for headphone DC direct drive (no coupling capacitors)
headset_mic_vol: Headset microphone boost gain (0 ~ 0×7: 0 dB, 24 .. 42 dB)
main_mic_vol: Main microphone boost gain (0 ~ 0×7: 0 dB, 24 .. 42 dB)
pa_double_used: 0 for mono differential output; 1 for stereo output
pa_double_vol: Line out volume for Stereo output mode
pa_single_vol: Line out volume for Mono differential output mode
Configuration example:
?
1
2
3
4
5
6
[audio_para]
audio_used = 1
audio_pa_ctrl = port:PH15
audio_lr_change = 0
playback_used = 1
capture_used = 1
infrared remote configuration

[ir_para]
ir_used: 0 to disable; 1 to enable
ir0_rx: receiver GPIO configuration
ir0_tx: transmitter GPIO configuration
ir1_rx: receiver GPIO configuration
ir1_tx: transmitter GPIO configuration
Configuration example:
?
1
2
3
4
5
6
ir_used = 1
ir0_tx = port:PB03default
ir0_rx = port:PB04default

ir1_tx = port:PB22default
ir1_rx = port:PB23default
pmu configuration

[pmu_para]
pmu_used: 0 to disable; 1 to enable
pmu_used2: 0 to disable; 1 to enable secondary PMU
pmu_twi_id: TWI controller to use
pmu_twi_addr: TWI address to use
pmu_irq_id: interrupt to use; 0 = NMI; 1 – 15 = interrupt 1 to 15
pmu_battery_rdc: battery internal resistance in m?
pmu_battery_cap: battery capacity in mAh
pmu_init_chgcur: initial charging current in mA; 300, 400 … 1800
pmu_init_chgcur2: initial charging current in mA for secondary PMU; 300, 400 … 1800
pmu_earlysuspend_chgcur2 early suspend charging current in mA; 300, 400 … 1800
pmu_suspend_chgcur: suspended charging current in mA; 300, 400 … 1800
pmu_suspend_chgcur2: suspended charging current in mA for secondary PMU; 300, 400 … 1800
pmu_resume_chgcur: normal charging current in mA; 300, 400 … 1800
pmu_resume_chgcur2: normal charging current in mA for secondary PMU; 300, 400 … 1800
pmu_shutdown_chgcur: powered down charge current in mA; 300, 400 … 1800
pmu_shutdown_chgcur2: powered down charge current in mA for secondary PMU; 300, 400 … 1800
pmu_init_chgvol: initial charging target voltage in mV; 4100/4150/4200/4360
pmu_init_chgend_rate: initial charging current ratio in %; 10, 15
pmu_init_chg_enabled: 0 to disable; 1 to enable
pmu_init_adc_freq: initial ADC sampling rate in Hz; 25/50/100/200
pmu_init_adc_freqc: initial ADC coulomb meter sampling rate in Hz; 25/50/100/200
pmu_init_chg_pretime: initial precharge timeout in minutes; 40/50/60/70
pmu_init_chg_csttime: initial constant charging current timeout in minutes; 360/480/600/720
pmu_bat_para1: = battery charge LUT in %
pmu_bat_para2: = battery charge LUT in %
pmu_bat_para3: = battery charge LUT in %
pmu_bat_para4: = battery charge LUT in %
pmu_bat_para5: = battery charge LUT in %
pmu_bat_para6: = battery charge LUT in %
pmu_bat_para7: = battery charge LUT in %
pmu_bat_para8: = battery charge LUT in %
pmu_bat_para9: = battery charge LUT in %
pmu_bat_para10: = battery charge LUT in %
pmu_bat_para11: = battery charge LUT in %
pmu_bat_para12: = battery charge LUT in %
pmu_bat_para13: = battery charge LUT in %
pmu_bat_para14: = battery charge LUT in %
pmu_bat_para15: = battery charge LUT in %
pmu_bat_para16: = battery charge LUT in %; should always be 100
pmu_usbvol_limit: 0 no USB voltage limiter; 1 = limit USB voltage
usb pmu_usbvol: USB voltage limit in mV; 4000, 4100 … 4700
pmu_usbcur_limit: 0 no USB current limiter; 1 = limit USB current
pmu_usbcur: USB current limit in mA; 100/500/900
pmu_pwroff_vol: boot hardware protection voltage in mV; 2600, 2700 … 3300
pmu_pwron_vol: running hardware protection voltage in mV; 2600, 2700 … 3300
pmu_pekoff_time: Power Enable Key, short power button off delay in ms; 4000, 6000, 8000, 10000
pmu_pekoff_en: 0 to disable; 1 to enable power button power off
pmu_peklong_time: long power off button delay in ms; 1000, 1500, 2000, 2500
pmu_pekon_time: power on button delay in ms; 128, 1000, 2000, 3000
pmu_pwrok_time: power ‘ok’ delay in ms; 8, 64
pmu_pwrnoe_time: n_oe from low to high shutdown delay time in ms; 128, 1000, 2000, 3000
pmu_intotp_en: 0 to disable; 1 to enable over temperature protection
pmu_suspendpwroff_vol: shutdown voltage when suspended and battery is low
pmu_batdeten: Battery detection enabled
pmu_adpdet: adapter detect GPIO configuration
pmu_backupen: 1 to enable RTC/backup battery charging
Configuration example:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
[pmu_para]
pmu_used = 1
pmu_twi_addr = 0×34
pmu_twi_id = 0
pmu_irq_id = 0
pmu_battery_rdc = 200
pmu_battery_cap = 2600
pmu_init_chgcur = 300
pmu_suspend_chgcur = 1000
pmu_resume_chgcur = 300
pmu_shutdown_chgcur = 1000
pmu_init_chgvol = 4200
pmu_init_chgend_rate = 15
pmu_init_chg_enabled = 1
pmu_init_adc_freq = 100
pmu_init_adc_freqc = 100
pmu_init_chg_pretime = 50
pmu_init_chg_csttime = 720
pmu_bat_para1 = 0
pmu_bat_para2 = 0
pmu_bat_para3 = 1
pmu_bat_para4 = 5
pmu_bat_para5 = 7
pmu_bat_para6 = 13
pmu_bat_para7 = 16
pmu_bat_para8 = 26
pmu_bat_para9 = 36
pmu_bat_para10 = 46
pmu_bat_para11 = 53
pmu_bat_para12 = 61
pmu_bat_para13 = 73
pmu_bat_para14 = 84
pmu_bat_para15 = 92
pmu_bat_para16 = 100
pmu_usbvol_limit = 1
pmu_usbvol = 4400
pmu_usbcur_limit = 1
pmu_usbcur = 900
pmu_pwroff_vol = 3300
pmu_pwron_vol = 2900
pmu_pekoff_time = 6000
pmu_pekoff_en = 1
pmu_peklong_time = 1500
pmu_pekon_time = 1000
pmu_pwrok_time = 64
pmu_pwrnoe_time = 2000
pmu_intotp_en = 1
pmu_adpdet = port:PH02
pmu_batdeten = 1
pmu_suspendpwroff_vol = 3500

pmu_used2 = 0
pmu_init_chgcur2 = 400
pmu_suspend_chgcur2 = 1200
pmu_resume_chgcur2 = 400
pmu_shutdown_chgcur2 = 1200
recovery key configuration

[recovery_key]
key_min: minimal length for the key to be depressed in seconds
key_max: maximal length for the key to be depressed in seconds
Example configuration:
?
1
2
key_min = 4
key_max = 32
dvfs voltage-frequency table configuration

Define at which frequency what voltage should be set. Recommended defaults:
voltage frequency range
1.50 v 1008 MHz – 1056 MHz
1.40 v 912 MHz – 1008 MHz
1.35 v 864 MHz – 912 MHz
1.30 v 624 MHz – 864 MHz
1.25 v 60 MHz – 624 MHz
[dvfs_table]
max_freq: cpu maximum frequency in Hz; can not be more than 1008 MHz
min_freq: cpu minimum frequency in Hz; can not be less than 60 MHz
lv_count: number of lv_freq/lv_volt pairs; must be < 16
lv1_freq: state 1 frequency
lv1_volt: state 1 voltage
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[dvfs_table]
max_freq = 1008000000
min_freq = 60000000
lv_count = 5

lv1_freq = 1056000000
lv1_volt = 1500

lv2_freq = 1008000000
lv2_volt = 1400

lv3_freq = 912000000
lv3_volt = 1350

lv4_freq = 864000000
lv4_volt = 1300

lv5_freq = 624000000
lv5_volt = 1250
led configuration

LEDs are accessible via sys-fs; for example on the cubietruck you can find the following directory: /sys/class/leds/blue\:ph21\:led1 `cat` the file trigger to see the triggers that can be set in .fex files. Currently these are
none (kinda defeats the purpose of setting a trigger)
rfkill0
battery-charging-or-full
battery-charging
battery-full
battery-charging-blink-full-solid
ac-online
usb-online
mmc0
mmc1
timer
heartbeat
cpu0
cpu1
default-on
rfkill1
rfkill2
How much they make sense – experiment. I'd be especially curious about the effects of rfkill settings.
Please note that depending on the trigger in question the sysfs will be populated with even more pseudo files. When you choose timer for example then you get a constant blinking led and two more files: delay_on and delay_off with which you can specify how many milliseconds will the LED stay in on/off state. Very convenient to indicate eg. disk usage or average load with higher blinking frequency and stuff like that.
[leds_para]
Configuration example:
?
1
2
3
4
5
6
7
8
9
10
11
12
[leds_para]
leds_used = 1
leds_num = 3
leds_pin_1 = port:PH20
leds_name_1 = “ph20:green:led1″
leds_trigger_1 = “heartbeat”
leds_pin_2 = port:PH21
leds_name_2 = “ph21:blue:led2″
leds_trigger_2 = “cpu0″
leds_pin_3 = port:PI12
leds_name_3 = “red:pi12:led3″
leds_trigger_3 = “cpu1″
external leds
External LEDs that are connected to one of the GPIO pins (don’t forget to add a resistor!) can also be defined in the fex file and used like internal ones afterwards. You have to check which GPIO pin is connected to which SoC pin and use this in the definition. As an example a 3rd led on a Banana Pro connected to GPIO pin 19 (PI12) in the config above. This will lead to a sysfs entry /sys/class/leds/red:pi12:led3 where everything works just like with internal leds.
dynamic configuration

[dynamic]
Configuration example:
?
1
2
[dynamic]
MAC = “000000000000″
Category: Software

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>