cubian

Embed Size (px)

DESCRIPTION

Fex update

Citation preview

Fex GuideTranslated from ChineseContents [hide] 1 FEX Description2 Port Definitions3 application3.1 [product]4 system configuration4.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 SDRAM5.1 [dram_para]6 mali configuration6.1 [mali_para]6.2 [g2d_para]7 ethernet MAC configuration7.1 [emac_para]8 i2c configuration8.1 [twi0_para]8.2 [twi0_para]8.3 [twi2_para]9 uart configuration9.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 configuration10.1 [spi0_para]10.2 [spi1_para]10.3 [spi2_para]10.4 [spi3_para]11 external spi device configuration11.1 [spi_devices]11.2 [spi_board0]12 resistive touch panel configuration12.1 [rtp_para]13 capacitive touch panel configuration13.1 [ctp_para]14 touch key configuration14.1 [tkey_para]15 motor configuration15.1 [motor_para]16 lock configuration16.1 [locks_para]17 nand flash configuration17.1 [nand_para]18 disp init configuration18.1 [disp_init]19 lcd[0/1] configuration19.1 [lcd0_para]19.2 [lcd1_para]20 tv out dac configuration20.1 [tv_out_dac_para]21 csi gpio configuration21.1 [csi0_para]21.2 [csi1_para]22 tv configuration22.1 [tvout_para]22.2 [tvin_para]23 sata configuration23.1 [sata_para]24 sdmmc configuration24.1 [mmc0_para]24.2 [mmc1_para]24.3 [mmc2_para]24.4 [mmc3_para]25 memory stick configuration25.1 [ms_para]26 sim card configuration26.1 [smc_para]27 ps2 configuration27.1 [ps2_0_para]27.2 [ps2_1_para]28 can bus configuration28.1 [can_para]29 matrix keyboard30 23.1 [keypad_para]31 USB control flags31.1 [usbc0]31.2 [usbc1]31.3 [usbc2]32 USB Device32.1 [usb_feature]32.2 [msc_feature]33 G Sensor configuration33.1 [gsensor_para]34 gps gpio configuration34.1 [gps_para]35 sdio wifi configuration35.1 [sdio_wifi_para]36 us wifi configuration36.1 [usb_wifi_para]37 3G configuration37.1 [3g_para]38 gyroscope38.1 [gy_para]39 light sensor39.1 [ls_para]40 compass40.1 [compass_para]41 blue tooth41.1 [bt_para]42 i2s configuration42.1 [i2s_para]43 spdif configuration43.1 [spdif_para]44 audio configuration44.1 [audio_para]45 infrared remote configuration45.1 [ir_para]46 pmu configuration46.1 [pmu_para]47 recovery key configuration47.1 [recovery_key]48 dvfs voltage-frequency table configuration48.1 [dvfs_table]49 led configuration49.1 [leds_para]50 dynamic configurationFEX DescriptionA FEX file defines various aspects of how the SoC works. It configures the GPIO pins and sets up DRAM, Display, etc parameters.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]. 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.Port DefinitionsDescription 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 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.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 Evaluation board v1.2.?123 system configuration[target]Note: blue module chip pin configuration, the black module internal control configurationConfiguration items to configure the meaning ofboot_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-norConfiguration example:?1234567891011 [card_burn_para]Configuration example:?12345678910 [card_boot]logical_start: logical starting address when booting from SD-Card.sprite_gpio0:Configuration example:?123 [card_boot0_para]card_ctrl: card controller to be usedcard_high_speed: 0 for low speed, 1 for high-speedcard_line: Number of card data linessdc_ cmd: SD-Card command signals GPIO configurationsdc_ clk: SD-Card clock signal GPIO configurationsdc_ d0: SD-Card data 0 line signal GPIO configurationsdc_ d1: SD-Card data 1 line signal GPIO configurationsdc_d2: SD-Card data 2 line signal GPIO configurationsdc_d3: SD-Card data 3 line signal GPIO configurationConfiguration example:?12345678910 [card_boot2_para]card_ctrl: card controller to be usedcard_high_speed: 0 for low speed, 1 for high-speedcard_line: number of card data linessdc_ cmd: SD-Card command signals GPIO configurationsdc_ clk: SD-Card clock signal GPIO configurationsdc_ d0: SD-Card data 0 line signal GPIO configurationsdc_ d1: SD-Card data 1 line signal GPIO configurationsdc_d2: SD-Card data 2 line signal GPIO configurationsdc_d3: SD-Card data 3 line signal GPIO configurationConfiguration example:?12345678910 [twi_para]twi controller to enable during/for boot.twi_port: twi controller to configuretwi_scl: twi Serial CLock line GPIO configurationtwi_sda: = twi Serial DAta line GPIO configurationConfiguration example:?1234 [uart_para]Serial port to be enabled during/for boot.uart_debug_port: serial controller numberuart_debug_tx: serial port TX line GPIO configurationuart_debug_rx: serial port RX line GPIO configurationConfiguration example:?1234 [jtag_para]JTAG port to be enabled during/for boot.jtag_enable: 0 to disable JTAG, 1 to enable JTAGjtag_ms: JTAG Test Mode Select (TMS) GPIO configurationjtag_ck: JTAG Test Clock (TCK) GPIO configurationjtag_do: JTAG Test Data Output (TDO) GPIO configurationjtag_di: JTAG Test Data Input (TDI) GPIO configurationConfiguration example:?123456 [system]recovery_key: recovery key GPIO configurationConfiguration example:recovery_key = port:PH16[gpio_para]gpio_used: 0 to disable; 1 to enablegpio_num: number mapped GPIO'sgpio_pin_1: first GPIO pinConfiguration example:gpio_used = 0gpio_num = 4gpio_pin_1 = port:PH10gpio_pin_2 = port:PH20gpio_pin_3 = port:PB03gpio_pin_4 = port:PH22[gpio_init]pin_1: Initial pin 1 GPIO configurationConfiguration example:pin_1 = port:PH10pin_2 = port:PH20SDRAM[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 0x40000000dram_clk: DRAM clock frequency in MHz; it must be an integer multiple of 24, minimally 120, maximally 480 MHzdram_type: DRAM type; Set to 2 for DDR2; 3 for DDR3dram_rank_num: DRAM chip select; 1 is a chip select; 2 election for two tabletsdram_chip_density: monolithic DRAM capacity in Mbitdram_io_width: monolithic DRAM bus width in bitsdram_bus_width: DRAM bus width in bits, such as two 16-bit DRAM banks make up a 32 bit bus widthdram_cas: DRAM CAS latencydram_zq: DRAM controller internal parametersdram_odt_en: ODT 0 to disable; 1 to enabledram_size: DRAM total capacity in MBdram_tpr0: DRAM controller internal parameterdram_tpr1: DRAM controller internal parameterdram_tpr2: DRAM controller internal parameterdram_tpr3: DRAM controller internal parameterdram_tpr4: DRAM controller internal parameterdram_tpr5: DRAM controller internal parameterdram_emr1: DRAM controller internal parameterdram_emr2: DRAM controller internal parameterdram_emr3: DRAM controller internal parameterConfiguration example:?123456789101112131415161718192021 mali configurationMali is the name of the GPU on the A10, A10s, A13 and A20 SoC's[mali_para]mali_used: 0 to disable; 1 to enable Mali modulemali_clkdiv: Mali clock divisor. Clock is obtained by devising PLL4 with mali_clkdivConfiguration example:?123 [g2d_para]G2D is the 2D graphic display engine on the Allwinner SoCg2d_used: 0 to disable; 1 to enable the g2d moduleg2d_size: memory size for g2d?12 ethernet MAC configuration[emac_para]Ethernet configuration for the integrated ethernet IP. It still requires an external PHYemac_used: 0 to disable; 1 to enable the ethernet MACemac_rxd0: RX data line 0 GPIO configurationemac_rxd1: RX data line 1 GPIO configurationemac_rxd2: RX data line 2 GPIO configurationemac_rxd3: RX data line 3 GPIO configurationemac_txd0: TX data line 0 GPIO configurationemac_txd1: TX data line 1 GPIO configurationemac_txd2: TX data line 2 GPIO configurationemac_txd3: TX data line 3 GPIO configurationemac_rxclk: RX clock GPIO configurationemac_rxerr: RX error GPIO configurationemac_rxdV: RX enabled GPIO configurationemac_mdc: MII clock GPIO configurationemac_mdio: MII data I/O GPIO configurationemac_txen: TX enabled GPIO configurationemac_txclk: TX clock GPIO configurationemac_crs: Carrier Status of GPIO configurationemac_col: Collision Detection GPIO configurationemac_reset: PHY reset signal GPIO configurationConfiguration example:?1234567891011121314151617181920 i2c configuration[twi0_para]Two Wire Interface (ic) configuration for TWI port 0twi0_used: 0 to disable; 1 to enabletwi0_scl: TWI Serial CLock GPIO configurationtwi0_sda: TWI Serial Data GPIO configurationConfiguration example:?1234 [twi0_para]Two Wire Interface (ic) configuration for TWI port 1twi1_used: 0 to disable; 1 to enabletwi1_scl: TWI Serial CLock GPIO configurationtwi1_sda: TWI Serial Data GPIO configurationConfiguration example:?1234 [twi2_para]Two Wire Interface (ic) configuration for TWI port 2twi2_used: 0 to disable; 1 to enabletwi2_scl: TWI Serial CLock GPIO configurationtwi2_sda: TWI Serial Data GPIO configurationConfiguration example:?1234 uart configurationAny 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 enableuart_port: UART port numberuart_type: UART type, 2, 4 or 8 wiresuart_tx: UART TX data line GPIO configurationuart_rx: UART RX data line GPIO configurationuart_rts: UART Ready to Send line GPIO configuration, only for 4 and 8 wire modesuart_cts: UART Clear to Send line GPIO configuration, only for 4 and 8 wire modesuart_dtr: UART Data Terminal Ready GPIO configuration, only for 8 wire modesuart_dsr: UART Data Set Ready GPIO configuration, only for 8 wire modesuart_dcd: UART Data Carrier Detect GPIO configuration, only for 8 wire modesuart_ring: UART Ring Indicator GPIO configuration, only for 8 wire modes[uart_para0]Configuration example:?12345 [uart_para1]Configuration example:?123456789101112 [uart_para2]Configuration example:?12345678 [uart_para3]Configuration example:?12345678 [uart_para4]Configuration example:?123456 [uart_para5]Configuration example:?123456 [uart_para6]Configuration example:?123456 [uart_para7]Configuration example:?123456 spi configurationspi_used: 0 to disable; 1 to enablespi_cs_bitmap: 0 to not use a CS bitmap, 1 to use CS bitmapspi_cs0: Chip Select bit 0 GPIO configurationspi_cs1: Chip Select bit 1 GPIO configurationspi_sclk: clock GPIO configurationspi_mosi: MOSI GPIO configurationspi_miso: MISO GPIO configurationTemplate:Note[spi0_para]Configuration example 1:?12345678 Configuration example 2:?1234567 [spi1_para]Configuration example 1:?12345678 Configuration example 2:?12345678 [spi2_para]Configuration example 1:?12345678 Configuration example 2:?1234567 [spi3_para]Configuration example:?12345678 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: Aliasmax_speed_hz: Maximum speed in Hzbus_num: Bus number of SPI controllermode: SPI mode, bitfield defined in spi.hfull_duplex: 0 for half-duplex; 1 for full-duplex modemanual_cs: manually control Chip Select level (unsupported for now)Configuration example:?12345678 resistive touch panel configuration[rtp_para]rtp_used: 0 to disable; 1 to enablertp_screen_size: diagonal screen size rounded to full inchesrtp_regidity_level: touchscreen regidty in 10 ms unitsrtp_press_threshold_enable: 0 to disable; 1 to enablertp_press_threshold: defines the press-threshold sensitivity; set between 0x0 and 0xffffffrtp_exchange_x_y_flag: 0 for normal operation; 1 to flip X and Y coordinatesConfiguration example:?1234567 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 enablectp_name: Name of the touch panel driver to usectp_twi_id: twi controller to usectp_twi_addr: hardware specfic twi address in hexctp_screen_rotate: 0 for normal operation; 1 for 180 rotationctp_screen_max_x: Maximum X screen resolutionctp_screen_max_y: Maximum Y screen resolutionctp_revert_x_flag: 0 for normal operation; 1 to flip the X axisctp_revert_y_flag: 0 for normal operation; 1 to flip the Y axisctp_havekey: 0 for normal operation; 1 if the touch panel also has touch-keys.ctp_int_port: interrupt line GPIO configurationctp_wakeup: screen wake up GPIO configurationctp_io_port: I/O port GPIO configurationConfiguration example:?1234567891011121314151617181920212223242526272829303132333435363738394041424344 touch key configuration[tkey_para]Touch 'key', only for "hv_keypad" for nowtkey_used: 0 to disable; 1 to enabletkey_name: driver name, must match linux driver nametkey_twi_id: twi controller to usetkey_twi_addr: hardware specfic twi address in hextkey_int: interrupt line GPIO configurationConfiguration example:?123456 motor configuration[motor_para]motor_used: 0 to disable; 1 to enablemotor_shake: motor control pin GPIO configurationConfiguration example:?123 lock configurationLocks 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 enablelocks_gpio: switch GPIO configurationConfiguration example:?123 nand flash configuration[nand_para]nand_used: 0 to disable; 1 to enablenand_we: Write Enable GPIO configurationnand_ale: Address Latch Enable GPIO configurationnand_cle: Command Latch Enable GPIO configurationnand_ce0: Chip sElect bit 0 GPIO configurationnand_ce1: Chip sElect bit 1 GPIO configurationnand_ce2: Chip sElect bit 2 GPIO configurationnand_ce3: Chip sElect bit 3 GPIO configurationnand_ce4: Chip sElect bit 4 GPIO configurationnand_ce5: Chip sElect bit 5 GPIO configurationnand_ce6: Chip sElect bit 6 GPIO configurationnand_ce7: Chip sElect bit 7 GPIO configurationnand_nre: Nand Read Enable GPIO configurationnand_rb0: Read / Busy bit 0 GPIO configurationnand_rb1: Read / Busy bit 1 GPIO configurationnand_d0: data bus bit 0 GPIO configurationnand_d1: data bus bit 1 GPIO configurationnand_d2: data bus bit 2 GPIO configurationnand_d3: data bus bit 3 GPIO configurationnand_d4: data bus bit 4 GPIO configurationnand_d5: data bus bit 5 GPIO configurationnand_d6: data bus bit 6 GPIO configurationnand_d7: data bus bit 7 GPIO configurationnand_wp: Write Protect GPIO configurationnand_spi: SPI data line GPIO configurationnand_ndqs: nand ddr clock signal GPIO configurationConfiguration example:?123456789101112131415161718192021222324252627 disp init configuration[disp_init]disp_init_enable: 0 to disable; 1 to enabledisp_mode: Display mode to use:modedisplay mode0screen0(screen0, fb0)1screen1(screen1, fb0)2two_diff_screen_diff_contents(screen0, screen1, fb0, fb1)3two_same_screen_diff_contents(screen0, screen1, fb0)4two_diff_screen_same_contents(screen0, screen1, fb0)screen0_output_type: Output type for screen0:screen1_output_type: Output type for screen1:typeOutput type0none1lcd2tv3hdmi4vgascreen0_output_mode: Output mode for screen0:screen1_output_mode: Output mode for screen1:modeused for tv/hdmi outputused for vga output0480i1680*10501576i1440*9002480p1360*7683576p1280*10244720p501024*7685720p60800*60061080i50640*48071080i6081080p2491080p50101080p601920*108011pal1280*72014ntscfb0_framebuffer_num: fb0 buffer number, use 2 for double bufferingfb1_framebuffer_num: fb1 buffer number, use 2 for double bufferingfb0_format: pixel format for fb0:fb1_format: pixel format for fb1:formatfb0_format4RGB6555RGB5656RGB5567ARGB15558RGBA55519RGB88810ARGB888812ARGB4444fb0_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):sequencefb0_pixel_sequence0ARGB1BGRA2ABGR3RGBAfb0_scaler_mode_enable: 0 to disable; 1 to enablefb1_scaler_mode_enable: 0 to disable; 1 to enableConfiguration example for LCD:?12345678910111213141516171819 Configuration example for VGA:?12345678910111213141516171819 lcd[0/1] configurationlcd_used: 0 to disable; 1 to enablelcd_pwm_not_used: 0 to enable PWM; 1 to disablelcd_pwm_ch: PWM channellcd_pwm_freq: PWM frequency in Hzlcd_pwm_pol: PWM polaritylcd_x: X-axis active widthlcd_y: Y-axis active heightlcd_dclk_freq: pixel clock frequency in MHzlcd_if: lcd interface:interfacelcd_interface0hv (sync + de)180802ttl3lvdslcd_hbp: hsync back porchlcd_ht: hsync total cyclelcd_vbp: vsync back porchlcd_vt: vysnc total cycle * 2lcd_hv_if: 0 for parallel hv interface; 1: for serial hv interfacelcd_hv_smode: 0 for RGB888 serial interface mode; 1 for CCIR656lcd_hv_s888_if: serial RGB formatlcd_hv_syuv_if: serial YUV formatlcd_hv_vspw: vysnc plus widthlcd_hv_hspw: hsync plus widthlcd_hv_lde_used: 0 to disable; 1 to enablelcd_hv_lde_iovalue: HV LDE iovaluelcd_lvds_ch: 0 for single channel; 1 for dual channellcd_lvds_mode: 0 for NS mode; 1 for JEIDA modelcd_lvds_bitwidth: 0 for 24 bit; 1 for 18 bitlcd_io_cfg0: lcd IO configurationlcd_lvds_io_cross: 0 for normal; 1 for pn crosslcd_cpu_if: cpu if mode:modecpu_if018 bit116 bit mode0216 bit mode1316 bit mode2416 bit mode359 bit68 bit, 256k78 bit, 65klcd_gamma_correction_en: 0 to disable; 1 to enablelcd_gamma_tbl_[0-255]: Gamma table 0 through 255lcd_frm: 0 to disable dither; 1 to enable enable rgb666 dither; 2 to enable rgb656 ditherlcd_io_cfg0: lcd io invlcd_bl_en_used: 0 to disable; 1 to enablelcd_bl_en: LCD BackLight GPIO configurationlcd_power_used: 0 to disable; 1 to enablelcd_power: LCD_VCC Voltage control GPIO configurationlcd_pwm_used: 0 to disable; 1 to enablelcd_pwm: lcd PWM, GPIO configuration (PWM0 fixed using the PB02 PWM1 fixed PI03 without user modification)lcd_gpio_0: 2/3-wire SCL GPIO configurationlcd_gpio_1: 2/3-wire SDA GPIO configurationlcd_gpio_2: 2/3-wire SCEN GPIO configurationlcd_gpio_3: LCD module RESET GPIO configurationlcdd0: data bit 0 GPIO configurationlcdd1: data bit 1 GPIO configurationlcdd2: data bit 2 GPIO configurationlcdd3: data bit 3 GPIO configurationlcdd4: data bit 4 GPIO configurationlcdd5: data bit 5 GPIO configurationlcdd6: data bit 6 GPIO configurationlcdd7: data bit 7 GPIO configurationlcdd8: data bit 8 GPIO configurationlcdd9: data bit 9 GPIO configurationlcdd10: data bit 10 GPIO configurationlcdd11: data bit 11 GPIO configurationlcdd12: data bit 12 GPIO configurationlcdd13: data bit 13 GPIO configurationlcdd14: data bit 14 GPIO configurationlcdd15: data bit 15 GPIO configurationlcdd16: data bit 16 GPIO configurationlcdd17: data bit 17 GPIO configurationlcdd18: data bit 18 GPIO configurationlcdd19: data bit 19 GPIO configurationlcdd20: data bit 20 GPIO configurationlcdd21: data bit 21 GPIO configurationlcdd22: data bit 22 GPIO configurationlcdd23: data bit 23 GPIO configurationlcdclk: LCD Clock GPIO configurationlcdde: LCD de GPIO configurationlcdhsync: H sync GPIO configurationlcdvsync: V sync GPIO configuration[lcd0_para]Configuration example:?123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 Other configuration examples for certain panels:?12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 [lcd1_para]Configuration example:?12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 tv out dac configurationThe 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 enabledac0_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:dacOutput source0Composite1Luma2Chroma34Y5Pb6Pr7NoneConfiguration example:?123456 csi gpio configurationcsi_used: 0 to enable; 1 to disablecsi_mode: 0 to sample one csi to one buffer; 1 to sample two csi to one buffercsi_dev_qty: Quantity of devices linked to the csi interfacecsi_twi_id: TWI controller to usecsi_twi_id_b: TWI controller to use for second devicecsi_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:ov7670gc0308gt2005hi704hi253csi_twi_addr: TWI address for the used cameracsi_twi_addr_b: TWI address for the used camera for second devicecsi_if: interface:csi_if_b: interface for second device:ifcsi interface0hv_8bit1hv_16bit2hv_24bit3bt656 1ch4bt656 2ch5bt656 4chcsi_pck: p clock GPIO configurationcsi_ck: clock GPIO configurationcsi_hsync: H-sync GPIO configurationcsi_vsync: V-sync GPIO configurationcsi_hflip: Horizontal frame flipcsi_hflip_b: Horizontal frame flip for second devicecsi_vflip: Vertical frame flipcsi_vflip_b: Vertical frame flip for second devicecsi_d0: data bit 0 GPIO configurationcsi_d1: data bit 1 GPIO configurationcsi_d2: data bit 2 GPIO configurationcsi_d3: data bit 3 GPIO configurationcsi_d4: data bit 4 GPIO configurationcsi_d5: data bit 5 GPIO configurationcsi_d6: data bit 6 GPIO configurationcsi_d7: data bit 7 GPIO configurationcsi_d8: data bit 8 GPIO configurationcsi_d9: data bit 9 GPIO configurationcsi_d10: data bit 10 GPIO configurationcsi_d11: data bit 11 GPIO configurationcsi_d12: data bit 12 GPIO configurationcsi_d13: data bit 13 GPIO configurationcsi_d14: data bit 14 GPIO configurationcsi_d15: data bit 15 GPIO configurationcsi_reset: Camera reset; the default value, high or low ,depends on the modulecsi_power_en: Power enable GPIO configurationcsi_stby: Camera standby GPIO configuration; the default value, high or low ,depends on the modulecsi_stby_b: Camera standby GPIO configuration for second device; the default value, high or low ,depends on the modulecsi_stby_mode: 0 to not shutdown power at standby; 1 shutdown power at standbycsi_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: enabledcsi_hflip: Horizontal flip; 0: disabled, 1: enabledcsi_flash: Camera Flash GPIO configurationcsi_flash_b: Camera Flash GPIO configuration for second devicecsi_flash_pol: Flash polarity of flash light; 0 for active low; 1 for active highcsi_flash_pol_b: Flash polarity of flash light for second device; 0 for active low; 1 for active highcsi_af_en: Autofocus enable GPIO configurationcsi_iovdd: Camera module IO power, PMU power supplycsi_iovdd_b: Camera module IO power, PMU power supply for second devicecsi_avdd: Camera analog power, PMU power supplycsi_avdd_b: Camera analog power, PMU power supply for second devicecsi_dvdd: Camera digital power, PMU power supplycsi_dvdd_b: Camera digital power, PMU power supply for second devicepmu_ldo3: "axp20_pll" or leave empty empty when not using any PMU power supplypmu_ldo4: "axp20_hdmi" or empty when not using any PMU power supply[csi0_para]Configuration example:?12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 [csi1_para]Configuration example:?123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 tv configuration[tvout_para]tvout_used: 0 to disable; 1 to enabletvout_channel_num: Channel numbertv_en: TV encoder GPIO configurationConfiguration example:?123 [tvin_para]tvin_used: 0 to disable; 1 to enabletvin_channel_num: channel numberConfiguration example:?12 sata configuration[sata_para]sata_used: 0 to disable; 1 to enablesata_power_en: Sata power enable GPIO configurationConfiguration example:?12 sdmmc configurationThere are several things to notice when configuring the sdmmc controller.sdc_used: 0 to disable; 1 to enable;0=1=sdc_detmode: detection mode :modedetection modenote01GPIO detectionAlso configure sdc_det to map to a GPIO GPIOsdc_detGPIO2sdc_d3 detectionsdc_d3 must be configured as HiZ GPIO and have an external 1 M pull-down resistor SDD3GPIO1M3polling (card cannot be swapped)4manually (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 configurationsdc_d1: data line 1 GPIO configurationsdc_d2: data line 2 GPIO configurationsdc_d3: data line 3 GPIO configurationsdc_clk: CLK GPIO configurationsdc_cmd: CMD GPIO configurationsdc_det: DET GPIO configurationsdc_use_wp: 0 is normal operation; 1 is write protectsdc_wp: Write Protect the GPIO configuration[mmc0_para]Configuration example:?12345678910111213 [mmc1_para]Configuration example:?12345678910111213 [mmc2_para]Configuration example:?12 [mmc3_para]Configuration example:?12345678910111213 memory stick configuration[ms_para]ms_used: 0 to disable; 1 to enablems_bs: Bus State signal GPIO configurationms_clk: Clock GPIO configurationms_d0: Data line 0 GPIO Configurationms_d1: Data line 1 GPIO Configurationms_d2: Data line 2 GPIO Configurationms_d3: Data line 3 GPIO Configurationms_det: Stick detection GPIO ConfigurationConfiguration example:?123456789 sim card configuration[smc_para]smc_used: 0 to disable; 1 to enablesmc_rst: Reset GPIO configurationsmc_vppen: VPP enable GPIO configurationsmc_vppp: Programming VPP GPIO configurationsmc_det: SIM Card detect GPIO configurationsmc_vccen: VCC enable GPIO configurationsmc_sck: Serial clock GPIO configurationsmc_sda: Serial data GPIO configurionConfiguration example:?123456789 ps2 configuration[ps2_0_para]ps2_used: 0 to disable; 1 to enableps2_scl: Serial clock GPIO configurationps2_sda: Serial data GPIO configurationConfiguration example:?1234 [ps2_1_para]ps2_used: 0 to disable; 1 to enableps2_scl: Serial clock GPIO configurationps2_sda: Serial data GPIO configurationConfiguration example:?1234 can bus configuration[can_para]can_used: 0 to disable; 1 to enable itcan_tx: transmit GPIO Configurationcan_rx: receive GPIO configurationConfiguration example:?1234 matrix keyboard23.1 [keypad_para]kp_used: 0 to disable; 1 to enablekp_in_size: column widthkp_out_size: row widthkp_in0: column 0 GPIO Configurationkp_in1: column 1 GPIO Configurationkp_in2: column 2 GPIO Configurationkp_in3: column 3 GPIO Configurationkp_in4: column 4 GPIO configurationkp_in5: column 5 GPIO configurationkp_in6: column 6 GPIO Configurationkp_in7: column 7 GPIO configurationkp_out0: row 0 GPIO Configurationkp_out1: row 1 GPIO Configurationkp_out2: row 2 GPIO Configurationkp_out3: row 3 GPIO Configurationkp_out4: row 4 GPIO configurationkp_out5: row 5 GPIO configurationkp_out6: row 6 GPIO Configurationkp_out7: row 7 GPIO configurationConfiguration example:?1234567891011121314151617181920 USB control flagsusb_used: 0 to disable; 1 to enableusb_port_type: USB port type:typeusb port type0device only1host only2OTGusb_detect_type: 0 = no checking; 1 = VBus / id checkusb_id_gpio:USB ID pin GPIO configurationusb_det_vbus_gpio: USB detect VBus pin GPIO configurationusb_drv_vbus_gpio: USB drive VBus pin GPIO configurationusb_host_init_state: In host only mode, host port initialization state; 0 do not initialize; 1 initializatie USB[usbc0]Configuration example:?12345678 [usbc1]Configuration example:?12345678 [usbc2]Configuration example:?12345678 USB Device[usb_feature]vendor_id: vendor IDmass_storage_id: mass storage IDadb_id: android debug bridge IDmanufacturer_name: vendor nameproduct_name: = product nameserial_number: = serial numberConfiguration example:?1234567 [msc_feature]vendor_name: vendor nameproduct_name: product namerelease: release versionluns: number of logical unitsConfiguration example:?12345 G Sensor configuration[gsensor_para]gsensor_used: 0 to disable; 1 to enablegsensor_name: linux kernel module name to match configurationgsensor_twi_id: TWI bus IDgsensor_twi_addr: TWI addressgsensor_int1: interrupt 1 GPIO configurationgsensor_int2: interrupt 2 GPIO configurationConfiguration example 1:?1234567 Configuration example 2:?1234567 Configuration example 3:?1234567 gps gpio configuration[gps_para]gps_used: 0 to disable; 1 to enablegps_spi_id: SPI controller; 0 - 2 for SPI0, SPI1 or SPI2; 15 if no SPI is usedgps_spi_cs_num: chip select SPI controller; 0 = SPI0, 1 = SPI1gps_lradc: 0 or 1 for Low Rate ADC Format; 2 for no Low Rate ADC Formatgps_clk: Clock GPIO configurationgps_sign: GPS sign GPIO configurationgps_mag: GPS Magnitude GPIO configurationgps_vcc_en: GPS VCC enable GPIO configurationgps_osc_en: GPS Oscillator enable GPIO configurationgps_rx_en: GPS receive enable GPIO configurationConfiguration example:?1234567891011 sdio wifi configuration[sdio_wifi_para]sdio_wifi_used: 0 to disable; 1 to enablesdio_wifi_sdc_id: SD controller ID to usesdio_wifi_mod_sel: SDI module selection (see mmc_pm.c ):modewifi selection modenote0none1swl-n20WiFi2usi bm-01WiFi - Bluetooth - FM radio3ar6302qfn4apm6xxx5swb b23WiFi - Bluetooth - FM radio6hw-mw269xHuawei wifi driver7bcm401818bcm40183BCM40183(BCM4330)9rtl8723asRTL8723AS(RF-SM02B)10rtl8189esRTL8189ES(SM89E00)sdio_wifi_shdn: SHDN GPIO configurationsdio_wifi_host_wakeup: WiFi wakeup GPIO Configurationsdio_wifi_vdd_en: VDD enable GPIO configurationsdio_wifi_vcc_en: VCC enable GPIO configurationConfiguration example:?123456789 Optionally the following parameters can be used when other/multiple transceivers are installed.?12345678910111213141516171819202122232425262728293031323334 us wifi configuration[usb_wifi_para]usb_wifi_used: 0 to disable; 1 to enableusb_wifi_usbc_num: USB controller to which USB wifi module is connectedusb_host_init_state: used together, such as xx = 2. Then usbc2 the usb_host_init_state 0Configuration example:?123 3G configuration[3g_para]3g_used: 0 to disable; 1 to enable3g_usbc_num: USB controller to which the 3G module is connected3g_uart_num: UART controller to which the 3G module is connected3g_pwr: power enable GPIO configuration3g_wakeup: wakeup GPIO configuration3g_int: interrupt GPIO configurationConfiguration example:?123456 gyroscope[gy_para]gy_used: 0 to disable; 1 to enablegy_twi_id: TWI controller to usegy_twi_addr: TWI address to usegy_int1: interrupt 1 GPIO configurationgy_int2: interrupt 2 GPIO configurationConfiguration example:?123456 light sensor[ls_para]ls_used: 0 to disable; 1 to enablels_twi_id: TWI controller to usels_twi_addr: TWI addressls_int: interrupt GPIO configurationConfiguration example:?12345 compass[compass_para]compass_used: 0 to disable; 1 to enablecompass_twi_id: TWI controller to usecompass_twi_addr: TWI address to usecompass_int: interrupt GPIO configurationConfiguration example:?12345 blue tooth[bt_para]bt_used: 0 to disable; 1 to enablebt_uart_id: UART controller to usebt_wakeup: wakeup GPIO configurationbt_gpio: optional bluetooth pin GPIO configurationbt_rst: = reset GPIO configurationConfiguration example:?123456 i2s configuration[i2s_para]i2s_used: 0 to disable; 1 to enablei2s_channel: channel control; 1 for one, 2 for two channelsi2s_mclk: master clock signal GPIO configurationi2s_bclk: bit clock signal GPIO configurationi2s_lrclk: word clock (left/right) signal GPIO configurationi2s_dout0: digital out 0 GPIO configurationi2s_dout1: (optional) digital out 1 GPIO configurationi2s_dout2: (optional) digital out 2 GPIO configurationi2s_dout3: (optional) digital out 3 GPIO configurationi2s_din: multiplexed in signal GPIO configurationConfiguration example:?1234567891011 spdif configuration[spdif_para]spdif_used: 0 to disable; 1 to enablespdif_mclk: optional master clock GPIO configurationspdif_dout: digital out GPIO configurationspdif_din: digital in GPIO configurationConfiguration example:?12345 audio configuration[audio_para]audio_used: 0 to disable; 1 to enablespeakers audio_pa_ctrl: PA controller GPIO configurationaudio_lr_change: 0 for normal operation; 1 to swap left and right channelsplayback_used: 0 to disable; 1 to enable This is a linux-sunxi specific extentioncapture_used: 0 to dissable; 1 to enable This is a linux-sunxi specific extentionConfiguration example:?123456 infrared remote configuration[ir_para]ir_used: 0 to disable; 1 to enableir0_rx: receiver GPIO configurationir0_tx: transmitter GPIO configurationir1_rx: receiver GPIO configurationir1_tx: transmitter GPIO configurationConfiguration example:?123456 pmu configuration[pmu_para]pmu_used: 0 to disable; 1 to enablepmu_used2: 0 to disable; 1 to enable secondary PMUpmu_twi_id: TWI controller to usepmu_twi_addr: TWI address to usepmu_irq_id: interrupt to use; 0 = NMI; 1 - 15 = interrupt 1 to 15pmu_battery_rdc: battery internal resistance in mpmu_battery_cap: battery capacity in mAhpmu_init_chgcur: initial charging current in mA; 300, 400 ... 1800pmu_init_chgcur2: initial charging current in mA for secondary PMU; 300, 400 ... 1800pmu_earlysuspend_chgcur2 early suspend charging current in mA; 300, 400 ... 1800pmu_suspend_chgcur: suspended charging current in mA; 300, 400 ... 1800pmu_suspend_chgcur2: suspended charging current in mA for secondary PMU; 300, 400 ... 1800pmu_resume_chgcur: normal charging current in mA; 300, 400 ... 1800pmu_resume_chgcur2: normal charging current in mA for secondary PMU; 300, 400 ... 1800pmu_shutdown_chgcur: powered down charge current in mA; 300, 400 ... 1800pmu_shutdown_chgcur2: powered down charge current in mA for secondary PMU; 300, 400 ... 1800pmu_init_chgvol: initial charging target voltage in mV; 4100/4150/4200/4360pmu_init_chgend_rate: initial charging current ratio in %; 10, 15pmu_init_chg_enabled: 0 to disable; 1 to enablepmu_init_adc_freq: initial ADC sampling rate in Hz; 25/50/100/200pmu_init_adc_freqc: initial ADC coulomb meter sampling rate in Hz; 25/50/100/200pmu_init_chg_pretime: initial precharge timeout in minutes; 40/50/60/70pmu_init_chg_csttime: initial constant charging current timeout in minutes; 360/480/600/720pmu_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 100pmu_usbvol_limit: 0 no USB voltage limiter; 1 = limit USB voltageusb pmu_usbvol: USB voltage limit in mV; 4000, 4100 ... 4700pmu_usbcur_limit: 0 no USB current limiter; 1 = limit USB currentpmu_usbcur: USB current limit in mA; 100/500/900pmu_pwroff_vol: boot hardware protection voltage in mV; 2600, 2700 ... 3300pmu_pwron_vol: running hardware protection voltage in mV; 2600, 2700 ... 3300pmu_pekoff_time: Power Enable Key, short power button off delay in ms; 4000, 6000, 8000, 10000pmu_pekoff_en: 0 to disable; 1 to enable power button power offpmu_peklong_time: long power off button delay in ms; 1000, 1500, 2000, 2500pmu_pekon_time: power on button delay in ms; 128, 1000, 2000, 3000pmu_pwrok_time: power 'ok' delay in ms; 8, 64pmu_pwrnoe_time: n_oe from low to high shutdown delay time in ms; 128, 1000, 2000, 3000pmu_intotp_en: 0 to disable; 1 to enable over temperature protectionpmu_suspendpwroff_vol: shutdown voltage when suspended and battery is lowpmu_batdeten: Battery detection enabledpmu_adpdet: adapter detect GPIO configurationConfiguration example:?1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 recovery key configuration[recovery_key]key_min: minimal length for the key to be depressed in secondskey_max: maximal length for the key to be depressed in secondsExample configuration:?12 dvfs voltage-frequency table configurationDefine at which frequency what voltage should be set. Recommended defaults:voltagefrequency range1.50 v1008 MHz - 1056 MHz1.40 v912 MHz - 1008 MHz1.35 v864 MHz - 912 MHz1.30 v624 MHz - 864 MHz1.25 v60 MHz - 624 MHz[dvfs_table]max_freq: cpu maximum frequency in Hz; can not be more than 1008 MHzmin_freq: cpu minimum frequency in Hz; can not be less than 60 MHzlv_count: number of lv_freq/lv_volt pairs; must be < 16lv1_freq: state 1 frequencylv1_volt: state 1 voltage?12345678910111213141516171819 led configurationLEDs 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 arenone (kinda defeats the purpose of setting a trigger)rfkill0battery-charging-or-fullbattery-chargingbattery-fullbattery-charging-blink-full-solidac-onlineusb-onlinemmc0mmc1timerheartbeatcpu0cpu1default-onrfkill1rfkill2How much they make sense - experiment. I'd be especially curious about the effects of rfkill settings.[leds_para]Configuration example:?123456789 dynamic configuration=== [dynamic] Configuration example:?12 Categories: FexTutorialCreate accountLog inPageDiscussionReadView sourceView history NavigationMain pageCommunity portalRecent changesRandom pageHelpToolsWhat links hereRelated changesSpecial pagesPrintable versionPermanent linkThis page was last modified on 3 December 2013, at 21:39.This page has been accessed 48,216 times.Content is available under Creative Commons Attribution unless otherwise noted.Privacy policyAbout linux-sunxi.orgDisclaimers