参考wiki:http://linux-sunxi.org/Fex_Guide#FEX_Description
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.
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:<port><mux feature><pullup/down><drive capability><output level>
where:
- <port> is the port to configure (ie. PH15)
- <mux feature> 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.
- <pullup/down> is 0 = disabled; 1 = pullup enabled; 2 = pulldown enabled (only valid when port is an input)
- <drive capability> defines the output drive in mA, values are 0-3 corresponding to 10mA, 20mA, 30mA and 40mA.
- <output level> sets the initial output level for the port; 0 = low; 1 = high (only valid for outputs)
The <pullup/down> <drive capability> and <output level> can be set to <default> which means don't change. Any trailing <default> options can be omitted.