diff --git a/boards.config b/boards.config index 20e6985010..e3689cbf4a 100644 --- a/boards.config +++ b/boards.config @@ -5,12 +5,12 @@ case $BOARD in -cubieboard | cubietruck) +cubieboard2 | cubietruck) #-------------------------------------------------------------------------------------------------------------------------------- # Cubieboards 3.4.x #-------------------------------------------------------------------------------------------------------------------------------- -BOOTLOADER="https://github.com/patrickhwood/u-boot -b pat-cb2-ct" -BOOTSOURCE="u-boot-sunxi" +BOOTLOADER="https://github.com/patrickhwood/u-boot" +BOOTSOURCE="u-boot-patwood" BOOTCONFIG="cubietruck" CPUMIN="480000" CPUMAX="1010000" @@ -33,13 +33,65 @@ MISC4_DIR="$LINUXSOURCE/drivers/video/fbtft" #-------------------------------------------------------------------------------------------------------------------------------- +cubieboard-next) +#-------------------------------------------------------------------------------------------------------------------------------- +# Cubieboard mainline kernel / experimental +#-------------------------------------------------------------------------------------------------------------------------------- +BOOTLOADER="https://github.com/RobertCNelson/u-boot" +BOOTSOURCE="u-boot" +BOOTCONFIG="Cubieboard_defconfig" +CPUMIN="480000" +CPUMAX="1010000" +LINUXKERNEL="https://github.com/linux-sunxi/linux-sunxi -b sunxi-next" +LINUXSOURCE="linux-sunxi-next" +LOCALVERSION="-sunxi" +DTBS="sun4i-a10-cubieboard.dtb" +DOCS="https://github.com/igorpecovnik/Cubietruck-Debian.wiki.git" +DOCSDIR="docs-banana" +MISC1="https://github.com/linux-sunxi/sunxi-tools.git" +MISC1_DIR="sunxi-tools" +MISC2="" +MISC2_DIR="" +MISC3="" +MISC3_DIR="" +MISC4="https://github.com/notro/fbtft" +MISC4_DIR="$LINUXSOURCE/drivers/video/fbtft" +;; + + +cubieboard2-next) +#-------------------------------------------------------------------------------------------------------------------------------- +# Cubieboard mainline kernel / experimental +#-------------------------------------------------------------------------------------------------------------------------------- +BOOTLOADER="https://github.com/RobertCNelson/u-boot" +BOOTSOURCE="u-boot" +BOOTCONFIG="Cubieboard2_defconfig" +CPUMIN="480000" +CPUMAX="1010000" +LINUXKERNEL="https://github.com/linux-sunxi/linux-sunxi -b sunxi-next" +LINUXSOURCE="linux-sunxi-next" +LOCALVERSION="-sunxi" +DTBS="sun7i-a20-cubieboard2.dtb" +DOCS="https://github.com/igorpecovnik/Cubietruck-Debian.wiki.git" +DOCSDIR="docs-banana" +MISC1="https://github.com/linux-sunxi/sunxi-tools.git" +MISC1_DIR="sunxi-tools" +MISC2="" +MISC2_DIR="" +MISC3="" +MISC3_DIR="" +MISC4="https://github.com/notro/fbtft" +MISC4_DIR="$LINUXSOURCE/drivers/video/fbtft" +;; + + cubietruck-next) #-------------------------------------------------------------------------------------------------------------------------------- -# Cubieboards mainline kernel / experimental +# Cubieboard mainline kernel / experimental #-------------------------------------------------------------------------------------------------------------------------------- -BOOTLOADER="https://github.com/jwrdegoede/u-boot-sunxi" -BOOTSOURCE="u-boot-sunxi-next" -BOOTCONFIG="Cubietruck_config" +BOOTLOADER="https://github.com/RobertCNelson/u-boot" +BOOTSOURCE="u-boot" +BOOTCONFIG="Cubietruck_defconfig" CPUMIN="480000" CPUMAX="1010000" LINUXKERNEL="https://github.com/linux-sunxi/linux-sunxi -b sunxi-next" @@ -52,8 +104,60 @@ MISC1="https://github.com/linux-sunxi/sunxi-tools.git" MISC1_DIR="sunxi-tools" MISC2="" MISC2_DIR="" -MISC3="https://github.com/dz0ny/rt8192cu" -MISC3_DIR="rt8192cu" +MISC3="" +MISC3_DIR="" +MISC4="https://github.com/notro/fbtft" +MISC4_DIR="$LINUXSOURCE/drivers/video/fbtft" +;; + + +lime2-next) +#-------------------------------------------------------------------------------------------------------------------------------- +# Olimex Lime mainline kernel / experimental +#-------------------------------------------------------------------------------------------------------------------------------- +BOOTLOADER="https://github.com/RobertCNelson/u-boot" +BOOTSOURCE="u-boot" +BOOTCONFIG="A20-OLinuXino-Lime2_defconfig" +CPUMIN="480000" +CPUMAX="1010000" +LINUXKERNEL="https://github.com/linux-sunxi/linux-sunxi -b sunxi-next" +LINUXSOURCE="linux-sunxi-next" +LOCALVERSION="-sunxi" +DTBS="sun7i-a20-olinuxino-lime2.dtb" +DOCS="https://github.com/igorpecovnik/Cubietruck-Debian.wiki.git" +DOCSDIR="docs-banana" +MISC1="https://github.com/linux-sunxi/sunxi-tools.git" +MISC1_DIR="sunxi-tools" +MISC2="" +MISC2_DIR="" +MISC3="" +MISC3_DIR="" +MISC4="https://github.com/notro/fbtft" +MISC4_DIR="$LINUXSOURCE/drivers/video/fbtft" +;; + + +lime-next) +#-------------------------------------------------------------------------------------------------------------------------------- +# Olimex Lime mainline kernel / experimental +#-------------------------------------------------------------------------------------------------------------------------------- +BOOTLOADER="https://github.com/RobertCNelson/u-boot" +BOOTSOURCE="u-boot" +BOOTCONFIG="A20-OLinuXino-Lime_defconfig" +CPUMIN="480000" +CPUMAX="1010000" +LINUXKERNEL="https://github.com/linux-sunxi/linux-sunxi -b sunxi-next" +LINUXSOURCE="linux-sunxi-next" +LOCALVERSION="-sunxi" +DTBS="sun7i-a20-olinuxino-lime.dtb" +DOCS="https://github.com/igorpecovnik/Cubietruck-Debian.wiki.git" +DOCSDIR="docs-banana" +MISC1="https://github.com/linux-sunxi/sunxi-tools.git" +MISC1_DIR="sunxi-tools" +MISC2="" +MISC2_DIR="" +MISC3="" +MISC3_DIR="" MISC4="https://github.com/notro/fbtft" MISC4_DIR="$LINUXSOURCE/drivers/video/fbtft" ;; @@ -63,9 +167,9 @@ bananapi-next) #-------------------------------------------------------------------------------------------------------------------------------- # bananapi mainline kernel / experimental #-------------------------------------------------------------------------------------------------------------------------------- -BOOTLOADER="https://github.com/jwrdegoede/u-boot-sunxi" -BOOTSOURCE="u-boot-sunxi-next" -BOOTCONFIG="Bananapi_config" +BOOTLOADER="https://github.com/RobertCNelson/u-boot" +BOOTSOURCE="u-boot" +BOOTCONFIG="Bananapi_defconfig" CPUMIN="480000" CPUMAX="1010000" LINUXKERNEL="https://github.com/linux-sunxi/linux-sunxi -b sunxi-next" @@ -78,8 +182,8 @@ MISC1="https://github.com/linux-sunxi/sunxi-tools.git" MISC1_DIR="sunxi-tools" MISC2="" MISC2_DIR="" -MISC3="https://github.com/dz0ny/rt8192cu" -MISC3_DIR="rt8192cu" +MISC3="" +MISC3_DIR="" MISC4="https://github.com/notro/fbtft" MISC4_DIR="$LINUXSOURCE/drivers/video/fbtft" ;; @@ -94,7 +198,7 @@ BOOTSOURCE="u-boot-banana" BOOTCONFIG="BananaPi_config" CPUMIN="480000" CPUMAX="1010000" -LINUXKERNEL="https://github.com/LeMaker/linux-bananapi" +#LINUXKERNEL="https://github.com/LeMaker/linux-bananapi" LINUXKERNEL="https://github.com/dan-and/linux-sunxi" LINUXSOURCE="linux-sunxi" LOCALVERSION="-sunxi" diff --git a/common.sh b/common.sh index da17b169e4..ebb7f7ce28 100644 --- a/common.sh +++ b/common.sh @@ -16,8 +16,8 @@ debconf-apt-progress -- apt-get -y install pv bc lzop zip binfmt-support bison b debconf-apt-progress -- apt-get -y install gcc-arm-linux-gnueabihf lvm2 qemu-user-static u-boot-tools uuid-dev zlib1g-dev unzip libncurses5-dev debconf-apt-progress -- apt-get -y install libusb-1.0-0-dev parted pkg-config # for creating PDF documentation -debconf-apt-progress -- apt-get -y install pandoc nbibtex texlive-latex-base texlive-latex-recommended texlive-latex-extra preview-latex-style -debconf-apt-progress -- apt-get -y install dvipng texlive-fonts-recommended +# debconf-apt-progress -- apt-get -y install pandoc nbibtex texlive-latex-base texlive-latex-recommended texlive-latex-extra preview-latex-style +# debconf-apt-progress -- apt-get -y install dvipng texlive-fonts-recommended echo "Done."; } @@ -130,7 +130,7 @@ else git checkout master fi cd $DEST/$LINUXSOURCE -if [[ $BOARD == "bananapi" ]]; then +if [[ $BOARD == "bananapi" || $BOARD == "cubietruck" || $BOARD == "cubieboard2" || $BOARD == "lime" || $BOARD == "lime2" ]]; then if [ "$(patch --dry-run -t -p1 < $SRC/lib/patch/bananafbtft.patch | grep previ)" == "" ]; then patch --batch -N -p1 < $SRC/lib/patch/bananafbtft.patch fi @@ -159,7 +159,7 @@ cd $DEST/$LINUXSOURCE make -s CROSS_COMPILE=arm-linux-gnueabihf- clean rm -rf output -mkdir -p output/boot +mkdir -p output/boot output/boot/dtb # Adding custom firmware to kernel source if [[ -n "$FIRMWARE" ]]; then unzip -o $SRC/lib/$FIRMWARE -d $DEST/$LINUXSOURCE/firmware; fi @@ -177,15 +177,16 @@ then cp Module.symvers output/usr/include cp arch/arm/boot/zImage output/boot/ cp arch/arm/boot/dts/*.dtb output/boot -elif [[ $BOARD == "bananapi-next" || $BOARD == "cubietruck-next" ]] +elif [[ $BOARD == *next* ]] then - make $CTHREADS ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LOADADDR=0x40008000 uImage modules $DTBS LOCALVERSION="$LOCALVERSION" + make $CTHREADS ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LOADADDR=0x40008000 uImage modules dtbs LOCALVERSION="$LOCALVERSION" make $CTHREADS ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=output modules_install make $CTHREADS ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_HDR_PATH=output/usr headers_install cp Module.symvers output/usr/include cp arch/arm/boot/uImage output/boot/ - cp arch/arm/boot/dts/*.dtb output/boot - mkimage -C none -A arm -T script -d $SRC/lib/config/boot-$BOARD.cmd output/boot/boot.scr + cp arch/arm/boot/dts/*.dtb output/boot/dtb + sed -e "s/WHICH/$DTBS/g" $SRC/lib/config/boot.cmd > /tmp/boot.cmd + mkimage -C none -A arm -T script -d /tmp/boot.cmd output/boot/boot.scr else make $CTHREADS ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage modules LOCALVERSION="$LOCALVERSION" make $CTHREADS ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=output modules_install @@ -223,11 +224,12 @@ ln -s /usr/include/ source fi # cd $DEST/$LINUXSOURCE/output -tar -cPf $DEST"/output/"$BOARD"_kernel_"$VER"_mod_head_fw.tar" * -cd $DEST/output +tar -cPf $DEST"/output/kernel/"$BOARD"_kernel_"$VER"_mod_head_fw.tar" * +cd $DEST/output/kernel md5sum "$BOARD"_kernel_"$VER"_mod_head_fw.tar > "$BOARD"_kernel_"$VER"_mod_head_fw.md5 zip "$BOARD"_kernel_"$VER"_mod_head_fw.zip "$BOARD"_kernel_"$VER"_mod_head_fw.* sync +CHOOSEN_KERNEL="$BOARD"_kernel_"$VER"_mod_head_fw.tar } @@ -236,7 +238,8 @@ creating_image (){ # Create and mount SD image #-------------------------------------------------------------------------------------------------------------------------------- # check if previously build kernel file exits -if [ ! -f "$DEST/output/"$BOARD"_kernel_"$VER"_mod_head_fw.tar" ]; then + +if [ ! -f "$DEST/output/kernel/"$CHOOSEN_KERNEL ]; then echo "Previously compiled kernel does not exits. Please choose compile=yes in configuration and run again!" exit fi @@ -271,7 +274,7 @@ tune2fs -o journal_data_writeback $LOOP # label it e2label $LOOP "$BOARD" # create mount point and mount image -mkdir -p $DEST/output/sdcard/ +mkdir -p $DEST/output/sdcard/ $DEST/output/kernel mount -t ext4 $LOOP $DEST/output/sdcard/ } @@ -346,13 +349,9 @@ install_board_specific (){ # Install board specific applications #-------------------------------------------------------------------------------------------------------------------------------- echo "------ Install board specific applications" -if [[ $BOARD == "cubietruck" || $BOARD == "cubieboard" || $BOARD == "bananapi" || $BOARD == "lime" || $BOARD == "lime2" || $BOARD == "bananapi-next" || $BOARD == "cubietruck-next" ]] ; then +if [[ $LOCALVERSION == *sunxi ]] ; then # enable serial console (Debian/sysvinit way) - echo T0:2345:respawn:/sbin/getty -L ttyS0 115200 vt100 >> $DEST/output/sdcard/etc/inittab - # sunxi tools - cp $DEST/sunxi-tools/fex2bin $DEST/sunxi-tools/bin2fex $DEST/sunxi-tools/nand-part $DEST/output/sdcard/usr/bin/ - # script to install to SATA - cp $SRC/lib/scripts/sata-install.sh $DEST/output/sdcard/root + echo T0:2345:respawn:/sbin/getty -L ttyS0 115200 vt100 >> $DEST/output/sdcard/etc/inittab # alter rc.local head -n -1 $DEST/output/sdcard/etc/rc.local > /tmp/out echo 'echo 2 > /proc/irq/$(cat /proc/interrupts | grep eth0 | cut -f 1 -d ":" | tr -d " ")/smp_affinity' >> /tmp/out @@ -360,12 +359,14 @@ if [[ $BOARD == "cubietruck" || $BOARD == "cubieboard" || $BOARD == "bananapi" | echo 'exit 0' >> /tmp/out mv /tmp/out $DEST/output/sdcard/etc/rc.local chroot $DEST/output/sdcard /bin/bash -c "chmod +x /etc/rc.local" + if [[ $BOARD != *next* ]] ; then + # sunxi tools + cp $DEST/sunxi-tools/fex2bin $DEST/sunxi-tools/bin2fex $DEST/sunxi-tools/nand-part $DEST/output/sdcard/usr/bin/ + # script to install to SATA + cp $SRC/lib/scripts/sata-install.sh $DEST/output/sdcard/root + fi fi -if [[ $BOARD == "bananapi-next" ]] ; then - cp $SRC/lib/config/uEnv.cubox-i $DEST/output/sdcard/boot/uEnv.txt -fi - if [[ $BOARD == "bananapi" ]] ; then fex2bin $SRC/lib/config/bananapi.fex $DEST/output/sdcard/boot/bananapi.bin cp $SRC/lib/config/uEnv.bananapi $DEST/output/sdcard/boot/uEnv.txt @@ -388,7 +389,7 @@ if [[ $BOARD == "lime" || $BOARD == "lime2" ]] ; then cp $SRC/lib/bin/nand1-allwinner.tgz $DEST/output/sdcard/root fi -if [[ $BOARD == "cubietruck" ]] ; then +if [[ $BOARD == "cubietruck" || $BOARD == "cubieboard2" ]] ; then fex2bin $SRC/lib/config/cubietruck.fex $DEST/output/sdcard/boot/cubietruck.bin fex2bin $SRC/lib/config/cubieboard2.fex $DEST/output/sdcard/boot/cubieboard2.bin cp $SRC/lib/config/uEnv.cubietruck $DEST/output/sdcard/boot/uEnv.ct @@ -470,7 +471,8 @@ fi # replace hostapd from testing binary. cd $DEST/output/sdcard/usr/sbin/ tar xvfz $SRC/lib/bin/hostapd23.tgz -cp $SRC/lib/config/hostapd.conf.$BOARD $DEST/output/sdcard/etc/hostapd.conf +cp $SRC/lib/config/hostapd.conf $DEST/output/sdcard/etc/hostapd.conf +sed -i "s/BOARD/$BOARD/" $DEST/output/sdcard/etc/hostapd.conf # don't clear screen sed -e 's/1:2345:respawn:\/sbin\/getty 38400 tty1/1:2345:respawn:\/sbin\/getty --noclear 38400 tty1/g' -i $DEST/output/sdcard/etc/inittab # console @@ -523,12 +525,31 @@ sed -e 's/#SHM_SIZE=/SHM_SIZE=128M/g' -i $DEST/output/sdcard/etc/default/tmpfs sed -e 's/#TMP_SIZE=/TMP_SIZE=1G/g' -i $DEST/output/sdcard/etc/default/tmpfs # uncompress kernel cd $DEST/output/sdcard/ -tar -xPf $DEST"/output/"$BOARD"_kernel_"$VER"_mod_head_fw.tar" -#ls ../*.tar | xargs -i tar xf {} +tar -xPf $DEST"/output/kernel/"$CHOOSEN_KERNEL sync sleep 3 # cleanup rm -f $DEST/output/*.md5 *.tar +# recreate boot.scr if using kernel for different board. Mainline only +if [[ $BOARD == *next* ]];then +sed -e "s/WHICH/$DTBS/g" $SRC/lib/config/boot.cmd > /tmp/boot.cmd +mkimage -C none -A arm -T script -d /tmp/boot.cmd $DEST/output/sdcard/boot/boot.scr +fi +} + + +choosing_kernel (){ +#-------------------------------------------------------------------------------------------------------------------------------- +# Choose which kernel to use +#-------------------------------------------------------------------------------------------------------------------------------- +cd $DEST"/output/kernel/" +MYLIST=`for x in $(ls -1 *kernel*.tar); do echo $x " -"; done` +WC=`echo $MYLIST | wc -l` +if [[ $WC -ne 0 ]]; then + whiptail --title "Choose kernel archive" --backtitle "Which kernel do you want to use?" --menu "" 12 60 4 $MYLIST 2>results +fi +CHOOSEN_KERNEL=$(<1> +sdc_d0 = port:PF01<2><1> +sdc_clk = port:PF02<2><1> +sdc_cmd = port:PF03<2><1> +sdc_d3 = port:PF04<2><1> +sdc_d2 = port:PF05<2><1> + +[card2_boot_para] +card_ctrl = 2 +card_high_speed = 1 +card_line = 4 +sdc_cmd = port:PC06<3><1> +sdc_clk = port:PC07<3><1> +sdc_d0 = port:PC08<3><1> +sdc_d1 = port:PC09<3><1> +sdc_d2 = port:PC10<3><1> +sdc_d3 = port:PC11<3><1> + +[boot_disp] +output_disp = 1 +output_type = 3 +output_mode = 4 +auto_hpd = 1 + +[twi_para] +twi_port = 0 +twi_scl = port:PH14<2> +twi_sda = port:PH15<2> + +[uart_para] +uart_debug_port = 0 +uart_debug_tx = port:PH12<2><1> +uart_debug_rx = port:PH13<2><1> + +[jtag_para] +jtag_enable = 1 +jtag_ms = port:PF00<3> +jtag_ck = port:PF05<3> +jtag_do = port:PF03<3> +jtag_di = port:PF01<3> + +[clock] +pll4 = 300 +pll6 = 600 +pll8 = 297 +pll9 = 297 +pll10 = 2376 + +;***************************************************************************** +;sdram configuration +; +;dram_para2 = 0x00001200 ;代表启用dram双通道 +; +;dram_para2 = 0x00001100 ;代表启用dram单通道 +; +;***************************************************************************** +[dram_para] +dram_clk = 672 +dram_type = 3 +dram_zq = 0x003F3FDD +dram_odt_en = 1 +dram_para1 = 0x10f41000 +dram_para2 = 0x00001200 +dram_mr0 = 0x1A50 +dram_mr1 = 0x40 +dram_mr2 = 0x10 +dram_mr3 = 0 +dram_tpr0 = 0x04E214EA +dram_tpr1 = 0x004214AD +dram_tpr2 = 0x10A75030 +dram_tpr3 = 0 +dram_tpr4 = 0 +dram_tpr5 = 0 +dram_tpr6 = 0 +dram_tpr7 = 0 +dram_tpr8 = 0 +dram_tpr9 = 0 +dram_tpr10 = 0 +dram_tpr11 = 0 +dram_tpr12 = 168 +dram_tpr13 = 0x23 +;---------------------------------------------------------------------------------- +;os life cycle para configuration +;---------------------------------------------------------------------------------- + +;------------------------------------------------------------------------------; +; 10/100/100Mbps Ethernet MAC Controller Configure ; +;------------------------------------------------------------------------------; +; 配置选项: ; +; gmac_used --- 1: gmac used, 0: not used ; +; gmac_powerx -- A[:B] A: axp channel, B: voltage value ; +;------------------------------------------------------------------------------; +; MII GMII RGMII MII GMII RGMII MII GMII RGMII ; +;PA00~03 * * * PA10 * * PA20 * * * ; +; PA04 * PA11~14 * * * PA21 * * ; +; PA05 * PA15 * PA22 * * ; +; PA06 * PA16 * PA23 * * ; +; PA07 * PA17 * PA24 * * ; +; PA08 * * PA18 * PA25 * * ; +; PA09 * * * PA19 * * * PA26~27 * * * ; +;------------------------------------------------------------------------------; +[gmac0] +gmac_used = 1 +gmac_rxd3 = port:PA00<2><3> +gmac_rxd2 = port:PA01<2><3> +gmac_rxd1 = port:PA02<2><3> +gmac_rxd0 = port:PA03<2><3> +gmac_rxclk = port:PA04<2><3> +gmac_rxdv = port:PA05<2><3> +;gmac_rxerr = port:PA06<2><3> +gmac_txd3 = port:PA07<2><3> +gmac_txd2 = port:PA08<2><3> +gmac_txd1 = port:PA09<2><3> +gmac_txd0 = port:PA10<2><3> +;gmac_crs = port:PA11<2><3> +gmac_txclk = port:PA12<2><3> +gmac_txen = port:PA13<2><3> +gmac_txerr = port:PA14<2><3> +gmac_col = port:PA15<2><3> +gmac_mdc = port:PA16<2><3> +gmac_mdio = port:PA17<2><3> +gmac_power1 = "axp15_cldo1:3000000" +gmac_power2 = "axp22_ldoio1" + +;--------------------------------------------------------------------------------------------------------- +; wakeup_src_para: +; sometimes, u would like to add more wakeup src in standby mode, these para will be +; help; +; u need to make sure the standby mode support the wakeup src. Also, some hw +; condition must be guaranteed. +; including: +; cpu_en: power on or off. +; 1: mean power on +; 0: mean power off +; cpu_freq: indicating lowest freq. unit is Mhz; +; dram selfresh_en: selfresh or not. +; 1: enable enter selfresh +; 0: disable enter selfresh +; dram_pll: if not enter selfresh, indicating lowest freq. unit is Mhz; +; wakeup_src: to make the scenario work, the wakeup src is needed. +;--------------------------------------------------------------------------------------------------------- +[wakeup_src_para] +cpu_en = 0 +cpu_freq = 48 +; (cpu:apb:ahb) +pll_ratio = 0x111 +dram_selfresh_en = 1 +dram_freq = 36 +wakeup_src0 = +wakeup_src_wl = port:PL03<4><0> +wakeup_src_bt = port:PL04<4><0> +bb_wake_ap = port:PM01<4><0> + +;---------------------------------------------------------------------------------- +;i2c configuration +;---------------------------------------------------------------------------------- +[twi0] +twi_used = 1 +twi_scl = port:PH0<2> +twi_sda = port:PH1<2> + +[twi1] +twi_used = 1 +twi_scl = port:PH2<2> +twi_sda = port:PH3<2> + +[twi2] +twi_used = 1 +twi_scl = port:PH4<2> +twi_sda = port:PH5<2> + +[twi3] +twi_used = 0 +twi_scl = port:PG10<2> +twi_sda = port:PG11<2> + +[twi4] +twi_used = 0 +twi_scl = port:PB15<4> +twi_sda = port:PB16<4> + +;---------------------------------------------------------------------------------- +;uart configuration +;uart_type --- 2 (2 wire), 4 (4 wire), 8 (8 wire, full function) +;---------------------------------------------------------------------------------- +[uart0] +uart_used = 1 +uart_port = 0 +uart_type = 2 +uart_tx = port:PH12<2><1> +uart_rx = port:PH13<2><1> + +[uart1] +uart_used = 0 +uart_port = 1 +uart_type = 8 +uart_tx = port:PA0<4><1> +uart_rx = port:PA1<4><1> +uart_rts = port:PA2<4><1> +uart_cts = port:PA3<4><1> +;uart_dtr = port:PA4<4><1> +;uart_dsr = port:PA5<4><1> +;uart_dcd = port:PA6<4><1> +;uart_ring = port:PA7<4><1> + +[uart2] +uart_used = 1 +uart_port = 2 +uart_type = 4 +uart_tx = port:PG06<2><1> +uart_rx = port:PG07<2><1> +uart_rts = port:PG08<2><1> +uart_cts = port:PG09<2><1> + +[uart3] +uart_used = 0 +uart_port = 3 +uart_type = 4 +uart_tx = port:PB05<3><1> +uart_rx = port:PB06<3><1> +uart_rts = port:PB04<3><1> +uart_cts = port:PB00<3><1> + +[uart4] +uart_used = 1 +uart_port = 4 +uart_type = 4 +uart_tx = port:PG12<2><1> +uart_rx = port:PG13<2><1> +uart_rts = port:PG14<2><1> +uart_cts = port:PG15<2><1> + +[uart5] +uart_used = 1 +uart_port = 5 +uart_type = 2 +uart_tx = port:PE04<4><1> +uart_rx = port:PE05<4><1> + + + +;---------------------------------------------------------------------------------- +;SPI controller configuration +;---------------------------------------------------------------------------------- +[spi0] +spi_used = 0 +spi_cs_bitmap = 1 +spi_cs0 = port:PC19<3><1> +spi_sclk = port:PC02<3> +spi_mosi = port:PC00<3> +spi_miso = port:PC01<3> + +[spi1] +spi_used = 0 +spi_cs_bitmap = 1 +spi_cs0 = +spi_sclk = +spi_mosi = +spi_miso = + +[spi2] +spi_used = 0 +spi_cs_bitmap = 1 +spi_cs0 = port:PE04<3><1> +spi_sclk = port:PE05<3> +spi_mosi = port:PE06<3> +spi_miso = port:PE07<3> + +[spi3] +spi_used = 0 +spi_cs_bitmap = 1 +spi_cs0 = port:PH17<2><1> +spi_cs1 = port:PH18<2><1> +spi_cs2 = port:PH12<3><1> +spi_cs3 = port:PH13<3> +spi_sclk = port:PH14<2> +spi_mosi = port:PH15<2> +spi_miso = port:PH16<2> + +;---------------------------------------------------------------------------------- +;SPI device configuration +;---------------------------------------------------------------------------------- +[spi_devices] +spi_dev_num = 1 + +[spi_board0] +modalias = "m25p32" +max_speed_hz = 33000000 +bus_num = 0 +chip_select = 0 +mode = 0 + +;---------------------------------------------------------------------------------- +;resistance tp configuration +;---------------------------------------------------------------------------------- +[rtp_para] +rtp_used = 0 +rtp_screen_size = 5 +rtp_regidity_level = 5 +rtp_press_threshold_enable = 0 +rtp_press_threshold = 0x1f40 +rtp_sensitive_level = 0xf +rtp_exchange_x_y_flag = 0 + +;---------------------------------------------------------------------------------- +;capacitor tp configuration +;external int function +;wakeup output function +;notice --- tp_int_port & tp_io_port use the same port +;---------------------------------------------------------------------------------- +[ctp_para] +ctp_used = 0 +ctp_twi_id = 1 +ctp_twi_addr = 0x5d +ctp_screen_max_x = 1280 +ctp_screen_max_y = 800 +ctp_revert_x_flag = 1 +ctp_revert_y_flag = 1 +ctp_exchange_x_y_flag = 1 + +ctp_int_port = +ctp_wakeup = + +;-------------------------------------------------------------------------------- +; CTP automatic detection configuration +;ctp_detect_used --- Whether startup automatic inspection function. 1:used,0:unused +;Module name postposition 1 said detection, 0 means no detection. +;-------------------------------------------------------------------------------- +[ctp_list_para] +ctp_det_used = 1 +ft5x_ts = 1 +gt82x = 1 +gslX680 = 1 +gt9xx_ts = 1 +gt811 = 1 +zet622x = 1 +aw5306_ts = 1 + +;---------------------------------------------------------------------------------- +;touch key configuration +;---------------------------------------------------------------------------------- +[tkey_para] +tkey_used = 0 +tkey_twi_id = +tkey_twi_addr = +tkey_int = + +;---------------------------------------------------------------------------------- +;motor configuration +;---------------------------------------------------------------------------------- +[motor_para] +motor_used = 0 +motor_shake = 0 +motor_ldo = axp22_ldoio0 +motor_ldo_voltage = 3300 + +;---------------------------------------------------------------------------------- +;thermal configuration +;---------------------------------------------------------------------------------- +[ths_para] +ths_used = 1 +ths_trend = 0 +ths_trip1_count = 5 +ths_trip1_0 = 60 +ths_trip1_1 = 75 +ths_trip1_2 = 85 +ths_trip1_3 = 95 +ths_trip1_4 = 105 +ths_trip1_5 = 0 +ths_trip1_6 = 0 +ths_trip1_7 = 0 +ths_trip1_0_min = 0 +ths_trip1_0_max = 1 +ths_trip1_1_min = 1 +ths_trip1_1_max = 2 +ths_trip1_2_min = 2 +ths_trip1_2_max = 5 +ths_trip1_3_min = 5 +ths_trip1_3_max = 9 +ths_trip1_4_min = 0 +ths_trip1_4_max = 0 +ths_trip1_5_min = 0 +ths_trip1_5_max = 0 +ths_trip1_6_min = 0 +ths_trip1_6_max = 0 +ths_trip2_count = 1 +ths_trip2_0 = 105 +;---------------------------------------------------------------------------------- +;cooler_table cooler_count <=32 +;---------------------------------------------------------------------------------- +[cooler_table] +cooler_count = 10 +cooler0 = "1200000 4 1800000 4" +cooler1 = "1200000 4 1608000 4" +cooler2 = "1200000 4 1440000 4" +cooler3 = "1200000 4 1200000 4" +cooler4 = "1200000 4 1200000 3" +cooler5 = "1200000 4 1440000 2" +cooler6 = "1200000 4 1200000 2" +cooler7 = "1200000 4 1200000 1" +cooler8 = "1200000 4 4294967295 0" +cooler9 = "600000 4 4294967295 0" +;---------------------------------------------------------------------------------- + +[nand0_para] +nand_support_2ch = 0 + +nand0_used = 0 +nand0_we = port:PC00<2> +nand0_ale = port:PC01<2> +nand0_cle = port:PC02<2> +nand0_ce1 = port:PC03<2> +nand0_ce0 = port:PC04<2> +nand0_nre = port:PC05<2> +nand0_rb0 = port:PC06<2> +nand0_rb1 = port:PC07<2> +nand0_d0 = port:PC08<2> +nand0_d1 = port:PC09<2> +nand0_d2 = port:PC10<2> +nand0_d3 = port:PC11<2> +nand0_d4 = port:PC12<2> +nand0_d5 = port:PC13<2> +nand0_d6 = port:PC14<2> +nand0_d7 = port:PC15<2> +nand0_ce2 = port:PC17<2> +nand0_ce3 = port:PC18<2> +nand0_ndqs = port:PC16<2> + +[nand1_para] +nand1_used = 0 +nand1_we = port:PC00<2> +nand1_ale = port:PC01<2> +nand1_cle = port:PC03<2> +nand1_ce1 = port:PC03<2> +nand1_ce0 = port:PC04<2> +nand1_nre = port:PC05<2> +nand1_rb0 = port:PC06<2> +nand1_rb1 = port:PC07<2> +nand1_d0 = port:PC08<2> +nand1_d1 = port:PC09<2> +nand1_d2 = port:PC10<2> +nand1_d3 = port:PC11<2> +nand1_d4 = port:PC12<2> +nand1_d5 = port:PC13<2> +nand1_d6 = port:PC14<2> +nand1_d7 = port:PC15<2> +nand1_ce2 = port:PC17<2> +nand1_ce3 = port:PC18<2> +nand1_ndqs = port:PC16<2> + +;---------------------------------------------------------------------------------- +;disp init configuration +; +;disp_mode (0:screen0) +;screenx_output_type (0:none; 1:lcd; 3:hdmi;) +;screenx_output_mode (used for hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50) +; (5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60) +;fbx format (0:ARGB 1:ABGR 2:RGBA 3:BGRA) +;fbx_width,fbx_height (framebuffer horizontal/vertical pixels, fix to output resolution while equal 0) +;lcdx_backlight (lcd init backlight,the range:[0,256],default:197 +;lcdx_yy (lcd init screen bright/contrast/saturation/hue, value:0~100, default:50/50/57/50) +;---------------------------------------------------------------------------------- +[disp_init] +disp_composer_mode = 1 + +disp_init_enable = 1 +disp_mode = 0 + +screen0_output_type = 1 +screen0_output_mode = 1 + +screen1_output_type = 3 +screen1_output_mode = 10 + +fb0_format = 0 +fb0_scaler_mode_enable = 0 +fb0_width = 0 +fb0_height = 0 + +fb1_format = 0 +fb1_scaler_mode_enable = 0 +fb1_width = 0 +fb1_height = 0 + +lcd0_backlight = 197 +lcd1_backlight = 197 + +lcd0_bright = 50 +lcd0_contrast = 50 +lcd0_saturation = 57 +lcd0_hue = 50 + +lcd1_bright = 50 +lcd1_contrast = 50 +lcd1_saturation = 57 +lcd1_hue = 50 + +;---------------------------------------------------------------------------------- +;lcd0 configuration + +;lcd_if: 0:hv(sync+de); 1:8080; 2:ttl; 3:lvds; 4:dsi; 5:edp +;lcd_x: lcd horizontal resolution +;lcd_y: lcd vertical resolution +;lcd_width: width of lcd in mm +;lcd_height: height of lcd in mm +;lcd_dclk_freq: in MHZ unit +;lcd_pwm_freq: in HZ unit +;lcd_pwm_pol: lcd backlight PWM polarity +;lcd_pwm_max_limit lcd backlight PWM max limit(<=255) +;lcd_hbp: hsync back porch +;lcd_ht: hsync total cycle +;lcd_vbp: vsync back porch +;lcd_vt: vysnc total cycle +;lcd_hspw: hsync plus width +;lcd_vspw: vysnc plus width +;lcd_lvds_if: 0:single link; 1:dual link +;lcd_lvds_colordepth: 0:8bit; 1:6bit +;lcd_lvds_mode: 0:NS mode; 1:JEIDA mode +;lcd_frm: 0:disable; 1:enable rgb666 dither; 2:enable rgb656 dither +;lcd_gamma_en lcd gamma correction enable +;lcd_bright_curve_en lcd bright curve correction enable +;lcd_cmap_en lcd color map function enable +;deu_mode 0:smoll lcd screen; 1:large lcd screen(larger than 10inch) +;lcdgamma4iep: Smart Backlight parameter, lcd gamma vale * 10; +; decrease it while lcd is not bright enough; increase while lcd is too bright +;smart_color 90:normal lcd screen 65:retina lcd screen(9.7inch) + +;vga_used if need vga,lcd_used must be 1,in that case,vga_used is 1 means output to vga +;---------------------------------------------------------------------------------- +[lcd0_para] +lcd_used = 1 +vga_used = 1 +lcd_driver_name = "default_lcd" +lcd_if = 0 +lcd_x = 1024 +lcd_y = 768 +lcd_width = 150 +lcd_height = 94 +lcd_dclk_freq = 65 +lcd_pwm_used = 0 +lcd_pwm_ch = 0 +lcd_pwm_freq = 50000 +lcd_pwm_pol = 0 +lcd_hbp = 296 +lcd_ht = 1344 +lcd_hspw = 136 +lcd_vbp = 35 +lcd_vt = 806 +lcd_vspw = 6 +lcd_lvds_if = 0 +lcd_lvds_colordepth = 0 +lcd_lvds_mode = 0 +lcd_frm = 0 +lcd_hv_clk_phase = 0 +lcd_hv_sync_polarity = 0 +lcd_gamma_en = 0 +lcd_bright_curve_en = 0 +lcd_cmap_en = 0 + +deu_mode = 0 +lcdgamma4iep = 22 +smart_color = 90 + +;lcd_bl_en = port:PA6<1><0><1> +lcd_power = port:power2<1><0><1> + +lcdd0 = port:PD00<2><0> +lcdd1 = port:PD01<2><0> +lcdd2 = port:PD02<2><0> +lcdd3 = port:PD03<2><0> +lcdd4 = port:PD04<2><0> +lcdd5 = port:PD05<2><0> +lcdd6 = port:PD06<2><0> +lcdd7 = port:PD07<2><0> +lcdd8 = port:PD08<2><0> +lcdd9 = port:PD09<2><0> +lcdd10 = port:PD10<2><0> +lcdd11 = port:PD11<2><0> +lcdd12 = port:PD12<2><0> +lcdd13 = port:PD13<2><0> +lcdd14 = port:PD14<2><0> +lcdd15 = port:PD15<2><0> +lcdd16 = port:PD16<2><0> +lcdd17 = port:PD17<2><0> +lcdd18 = port:PD18<2><0> +lcdd19 = port:PD19<2><0> +lcdd20 = port:PD20<2><0> +lcdd21 = port:PD21<2><0> +lcdd22 = port:PD22<2><0> +lcdd23 = port:PD23<2><0> +lcdclk = port:PD24<2><0> +lcdde = port:PD25<2><0> +lcdhsync = port:PD26<2><0><3> +lcdvsync = port:PD27<2><0><3> + +;---------------------------------------------------------------------------------- +;hdmi configuration +;---------------------------------------------------------------------------------- +[hdmi_para] +hdmi_used = 1 + +;---------------------------------------------------------------------------------- +;pwm config +;---------------------------------------------------------------------------------- +[pwm0_para] +pwm_used = 0 +pwm_positive = port:PH6<2><0> + +[pwm1_para] +pwm_used = 0 +pwm_positive = port:PH8<3><0> + +;-------------------------------------------------------------------------------- +;vip (video input port) configuration +;vip_used: 0:disable 1:enable +;vip_mode: 0:sample one interface to one buffer 1:sample two interface to one buffer +;vip_dev_qty: The quantity of devices linked to capture bus +; +;vip_define_sensor_list: If you want use sensor detect function, please set vip_define_sensor_list = 1, and +; verify that file /system/etc/hawkview/sensor_list_cfg.ini is properly configured! +; +;vip_dev(x)_pos: sensor position, "rear" or "front", if vip_define_sensor_list = 1,vip_dev(x)_pos must be configured! +; +;vip_dev(x)_isp_used 0:not use isp 1:use isp +;vip_dev(x)_fmt: 0:yuv 1:bayer raw rgb +;vip_dev(x)_stby_mode: 0:not shut down power at standby 1:shut down power at standby +;vip_dev(x)_vflip: flip in vertical direction 0:disable 1:enable +;vip_dev(x)_hflip: flip in horizontal direction 0:disable 1:enable +;vip_dev(x)_iovdd: camera module io power handle string, pmu power supply +;vip_dev(x)_iovdd_vol: camera module io power voltage, pmu power supply +;vip_dev(x)_avdd: camera module analog power handle string, pmu power supply +;vip_dev(x)_avdd_vol: camera module analog power voltage, pmu power supply +;vip_dev(x)_dvdd: camera module core power handle string, pmu power supply +;vip_dev(x)_dvdd_vol: camera module core power voltage, pmu power supply +;vip_dev(x)_afvdd: camera module vcm power handle string, pmu power supply +;vip_dev(x)_afvdd_vol: camera module vcm power voltage, pmu power supply +;x indicates the index of the devices which are linked to the same capture bus +;fill voltage in uV, e.g. iovdd = 2.8V, vip_devx_iovdd_vol = 2800000 +;fill handle string as below: +;axp22_eldo3 +;axp22_dldo4 +;axp22_eldo2 +;fill handle string "" when not using any pmu power supply + +;-------------------------------------------------------------------------------- +[csi0] + +vip_used = 0 +vip_mode = 0 +vip_dev_qty = 1 +vip_define_sensor_list = 0 + +vip_csi_mck = port:PB14<3> +vip_csi_sck = port:PB15<3> +vip_csi_sda = port:PB16<3> + +vip_dev0_mname = "ov16825" +vip_dev0_pos = "rear" +vip_dev0_lane = 1 +vip_dev0_twi_id = 0 +vip_dev0_twi_addr = 0x6c +vip_dev0_isp_used = 1 +vip_dev0_fmt = 1 +vip_dev0_stby_mode = 0 +vip_dev0_vflip = 0 +vip_dev0_hflip = 0 +vip_dev0_iovdd = "axp22_aldo2" +vip_dev0_iovdd_vol = 2800000 +vip_dev0_avdd = "axp15_aldo2" +vip_dev0_avdd_vol = 2800000 +vip_dev0_dvdd = "axp22_eldo1" +vip_dev0_dvdd_vol = 1500000 +vip_dev0_afvdd = "axp15_cldo2" +vip_dev0_afvdd_vol = 2800000 +vip_dev0_power_en = +vip_dev0_reset = port:PB5<1> +vip_dev0_pwdn = port:PB6<1> +vip_dev0_flash_en = +vip_dev0_flash_mode = +vip_dev0_af_pwdn = + +vip_dev0_act_used = 1 +vip_dev0_act_name = "dw9714_act" +vip_dev0_act_slave = 0x18 + + +vip_dev1_mname = "" +vip_dev1_pos = "front" +vip_dev1_lane = 1 +vip_dev1_twi_id = 0 +vip_dev1_twi_addr = +vip_dev1_isp_used = 0 +vip_dev1_fmt = 1 +vip_dev1_stby_mode = 0 +vip_dev1_vflip = 0 +vip_dev1_hflip = 0 +vip_dev1_iovdd = "axp22_eldo3" +vip_dev1_iovdd_vol = 2800000 +vip_dev1_avdd = "axp22_dldo4" +vip_dev1_avdd_vol = 2800000 +vip_dev1_dvdd = "axp22_eldo2" +vip_dev1_dvdd_vol = 1500000 +vip_dev1_afvdd = "" +vip_dev1_afvdd_vol = 2800000 +vip_dev1_power_en = +vip_dev1_reset = +vip_dev1_pwdn = +vip_dev1_flash_en = +vip_dev1_flash_mode = +vip_dev1_af_pwdn = + +[csi1] + +vip_used = 0 +;-------------------------------------------------------------------------------- +;tv configuration +; +;-------------------------------------------------------------------------------- +[tvout_para] +tvout_used = +tvout_channel_num = +tv_en = + +[tvin_para] +tvin_used = +tvin_channel_num = + +;-------------------------------------------------------------------------------- +; SDMMC PINS MAPPING | +; ------------------------------------------------------------------------------| +; Config Guide | +; sdc_used: 1-enable card, 0-disable card | +; sdc_detmode: card detect mode | +; 1-detect card by gpio polling | +; 2-detect card by gpio irq(must use IO with irq function) | +; 3-no detect, always in for boot card | +; 4-manually insert and remove by /proc/driver/sunxi-mmc.x/insert| +; sdc_buswidth: card bus width, 1-1bit, 4-4bit, 8-8bit | +; sdc_use_wp: 1-with write protect IO, 0-no write protect IO | +; sdc_isio: for sdio card | +; sdc_regulator: power control.if card supports UHS-I/DDR and HS200 timing for| +; SD3.0 or eMMC4.5, regulator must be configured. the value is | +; the ldo name of AXP221, eg: sdc_regulator = "axp22_eldo2" | +; other: GPIO Mapping configuration | +; ------------------------------------------------------------------------------| +; Note: | +; 1 if detmode=2, sdc_det's config=6 | +; else if detmode=1, sdc_det's config=0 | +; else sdc_det IO is not necessary | +; 2 if the customer wants to support UHS-I and HS200 features, he must provide| +; an independent power supply for the card. This is only used in platforms | +; that supports SD3.0 cards and eMMC4.4+ flashes | +;-------------------------------------------------------------------------------- +[mmc0_para] +sdc_used = 1 +sdc_detmode = 2 +sdc_buswidth = 4 +sdc_clk = port:PF02<2><1><2> +sdc_cmd = port:PF03<2><1><2> +sdc_d0 = port:PF01<2><1><2> +sdc_d1 = port:PF00<2><1><2> +sdc_d2 = port:PF05<2><1><2> +sdc_d3 = port:PF04<2><1><2> +sdc_det = port:PH18<6><1><2> +sdc_use_wp = 0 +sdc_wp = +sdc_isio = 0 +sdc_regulator = "none" + +[mmc1_para] +sdc_used = 1 +sdc_detmode = 4 +sdc_buswidth = 4 +sdc_clk = port:PG00<2><1><2> +sdc_cmd = port:PG01<2><1><2> +sdc_d0 = port:PG02<2><1><2> +sdc_d1 = port:PG03<2><1><2> +sdc_d2 = port:PG04<2><1><2> +sdc_d3 = port:PG05<2><1><2> +sdc_det = +sdc_use_wp = 0 +sdc_wp = +sdc_isio = 1 +sdc_regulator = "none" + +[mmc2_para] +sdc_used = 1 +sdc_detmode = 3 +sdc_buswidth = 8 +sdc_clk = port:PC07<3><1><2> +sdc_cmd = port:PC06<3><1><2> +sdc_d0 = port:PC08<3><1><2> +sdc_d1 = port:PC09<3><1><2> +sdc_d2 = port:PC10<3><1><2> +sdc_d3 = port:PC11<3><1><2> +sdc_d4 = port:PC12<3><1><2> +sdc_d5 = port:PC13<3><1><2> +sdc_d6 = port:PC14<3><1><2> +sdc_d7 = port:PC15<3><1><2> +emmc_rst = port:PC16<3><1><2> +sdc_det = +sdc_use_wp = 0 +sdc_wp = +sdc_isio = 0 +sdc_regulator = "none" + +[mmc3_para] +sdc_used = 0 +sdc_detmode = 4 +sdc_buswidth = 8 +sdc_clk = port:PC07<3><1><2> +sdc_cmd = port:PC06<3><1><2> +sdc_d0 = port:PC08<3><1><2> +sdc_d1 = port:PC09<3><1><2> +sdc_d2 = port:PC10<3><1><2> +sdc_d3 = port:PC11<3><1><2> +sdc_d4 = port:PC12<3><1><2> +sdc_d5 = port:PC13<3><1><2> +sdc_d6 = port:PC14<3><1><2> +sdc_d7 = port:PC15<3><1><2> +emmc_rst = port:PC16<3><1><2> +sdc_det = +sdc_use_wp = 0 +sdc_wp = +sdc_isio = 0 +sdc_regulator = "none" + +; ------------------------------------------------------------------------------| +; sim card configuration +;-------------------------------------------------------------------------------- +[smc_para] +smc_used = +smc_rst = +smc_vppen = +smc_vppp = +smc_det = +smc_vccen = +smc_sck = +smc_sda = + + +;-------------------------------- +;[usbc0]:控制器0的配置。 +;usb_used:USB使能标志。置1,表示系统中USB模块可用,置0,则表示系统USB禁用。 +;usb_port_type:USB端口的使用情况。 0:device only;1:host only;2:OTG +;usb_detect_type:USB端口的检查方式。0:不做检测;1:vbus/id检查;2:id/dpdm检查 +;usb_id_gpio:USB ID pin脚配置。具体请参考gpio配置说明。 +;usb_det_vbus_gpio:USB DET_VBUS pin脚配置。具体请参考gpio配置说明。 +;usb_drv_vbus_gpio:USB DRY_VBUS pin脚配置。具体请参考gpio配置说明。 +;usb_det_vbus_gpio: "axp_ctrl",表示axp 提供 +;usb_restrict_gpio usb限流控制pin +;usb_restric_flag: usb限流标置 +;-------------------------------- +;-------------------------------- +;--- USB0控制标志 +;-------------------------------- +[usbc0] +usb_used = 1 +usb_port_type = 2 +usb_detect_type = 1 +usb_id_gpio = port:PH16<0><1> +usb_det_vbus_gpio = "axp_ctrl" +usb_drv_vbus_gpio = port:power4<1><0><1> +usb_restrict_gpio = +usb_host_init_state = 1 +usb_restric_flag = +usb_restric_voltage = 3550000 +usb_restric_capacity= 5 +;-------------------------------- +;--- USB1控制标志 +;-------------------------------- +[usbc1] +usb_used = 1 +usb_port_type = 1 +usb_detect_type = 0 +usb_drv_vbus_gpio = port:PH14<1><0><0> +usb_restrict_gpio = +usb_host_init_state = 1 +usb_restric_flag = 0 + +;-------------------------------- +;--- USB2控制标志 +;-------------------------------- +[usbc2] +usb_used = 1 +usb_port_type = 1 +usb_detect_type = 0 +usb_drv_vbus_gpio = port:PH15<1><0><0> +usb_restrict_gpio = +usb_host_init_state = 1 +usb_restric_flag = 0 + +;-------------------------------- +;--- USB3控制标志 +;-------------------------------- +[usbc3] +usb_used = 1 +usb_port_type = 1 +usb_detect_type = 0 +usb_drv_vbus_gpio = +usb_restrict_gpio = +usb_host_init_state = 1 +usb_restric_flag = 0 +;-------------------------------- +;--- USB Device +;-------------------------------- +[usb_feature] +vendor_id = 0x18D1 +mass_storage_id = 0x0001 +adb_id = 0x0002 + +manufacturer_name = "USB Developer" +product_name = "Android" +serial_number = "20080411" + +[msc_feature] +vendor_name = "USB 2.0" +product_name = "USB Flash Driver" +release = 100 +luns = 3 + +[serial_feature] +serial_unique = 0 + +;-------------------------------------------------------------------------------- +; G sensor configuration +; gs_twi_id --- TWI ID for controlling Gsensor (0: TWI0, 1: TWI1, 2: TWI2) +;-------------------------------------------------------------------------------- +[gsensor_para] +gsensor_used = 0 +gsensor_twi_id = 1 +gsensor_twi_addr = 0x18 +gsensor_int1 = port:PH17<6><1> +gsensor_int2 = + +;-------------------------------------------------------------------------------- +; G sensor automatic detection configuration +;gsensor_detect_used --- Whether startup automatic inspection function. 1:used,0:unused +;Module name postposition 1 said detection, 0 means no detection. +;-------------------------------------------------------------------------------- +[gsensor_list_para] +gsensor_det_used = 1 +bma250 = 1 +mma8452 = 1 +mma7660 = 1 +mma865x = 1 +afa750 = 1 +lis3de_acc = 1 +lis3dh_acc = 1 +kxtik = 1 +dmard10 = 0 +dmard06 = 1 +mxc622x = 1 +fxos8700 = 1 +lsm303d = 1 + +;-------------------------------------------------------------------------------- +; gps gpio configuration +; gps_spi_id --- the index of SPI controller. 0: SPI0, 1: SPI1, 2: SPI2, 15: no SPI used +; gps_spi_cs_num --- the chip select number of SPI controller. 0: SPI CS0, 1: SPI CS1 +; gps_lradc --- the lradc number for GPS used. 0 and 1 is valid, set 2 if not use lradc +;-------------------------------------------------------------------------------- +[gps_para] + +;-------------------------------------------------------------------------------- +;wifi configuration +;wifi_sdc_id --- 0- SDC0, 1- SDC1, 2- SDC2, 3- SDC3 +;wifi_usbc_id --- 0- USB0, 1- USB1, 2- USB2, 3- USB3 +;wifi_mod_sel --- 0- none, 1- rtl8188eu, 2- rtl8723bs(wifi+bt), +; 3 - ap6181, 4- ap6210(wifi+bt), 5 - ap6330(wifi+bt) +;-------------------------------------------------------------------------------- +[wifi_para] +wifi_used = 1 +wifi_sdc_id = 1 +wifi_usbc_id = 1 +wifi_usbc_type = 1 +wifi_mod_sel = 5 +wifi_power = "axp22_dldo1" +wifi_power_ext1 = "axp15_cldo3" +wifi_power_ext2 = "axp22_ldoio0" +sdio_power = "" + +; 1 - rtl8188eu usb wifi gpio conifg +;rtl8188eu_power = port:PH27<1><0><0> + +; 2 - rtl8723bs sdio wifi + bt gpio config +rtl8723bs_chip_en = port:PL09<1><0> +rtl8723bs_wl_regon = port:PL02<1><0> +rtl8723bs_wl_host_wake = port:PL03<4><0> +rtl8723bs_bt_regon = port:PL05<1><0> +rtl8723bs_bt_wake = port:PL08<1><0> +rtl8723bs_bt_host_wake = port:PL04<4><0> +rtl8723bs_lpo_use_apclk = 0 + +; 3 - ap6181 sdio wifi gpio config +; 4 - ap6210 sdio wifi + bt gpio config +; 5 - ap6330 sdio wifi + bt gpio config +ap6xxx_wl_regon = port:PL02<1><0> +ap6xxx_wl_host_wake = port:PL03<0><0> +ap6xxx_bt_regon = port:PL05<1><0> +ap6xxx_bt_wake = port:PL08<1><0> +ap6xxx_bt_host_wake = port:PL04<0><0> +ap6xxx_lpo_use_apclk = 2 + +;-------------------------------------------------------------------------------- +;3G configuration +;-------------------------------------------------------------------------------- +[3g_para] +3g_used = 0 +3g_usbc_num = 3 +3g_uart_num = 4 +bb_name = "mu509" +bb_vbat = +bb_on = port:PM02<1><0> +bb_pwr_on = port:PM03<1><0> +bb_wake = port:PM04<1><0> +bb_rf_dis = port:PM15<1><0> +bb_rst = port:PM00<1><0> +bb_dldo = "axp22_sw0" +bb_dldo_min_uV = 5000000 +bb_dldo_max_uV = 5000000 +;-------------------------------------------------------------------------------- +;gyroscope +;-------------------------------------------------------------------------------- +[gy_para] +gy_used = 1 +gy_twi_id = 1 +gy_twi_addr = 0x6a +gy_int1 = port:PH15<6><1> +gy_int2 = + +;-------------------------------------------------------------------------------- +; Gyro automatic detection configuration +;gy_detect_used --- Whether startup automatic inspection function. 1:used,0:unused +;Module name postposition 1 said detection, 0 means no detection. +;-------------------------------------------------------------------------------- +[gy_list_para] +gy_det_used = 0 +l3gd20_gyr = 1 + +;-------------------------------------------------------------------------------- +;light sensor +;-------------------------------------------------------------------------------- +[ls_para] +ls_used = 0 +ls_twi_id = 1 +ls_twi_addr = 0x23 +ls_int = port:PH17<6><1> + +;-------------------------------------------------------------------------------- +; lsensor automatic detection configuration +;ls_detect_used --- Whether startup automatic inspection function. 1:used,0:unused +;Module name postposition 1 said detection, 0 means no detection. +;-------------------------------------------------------------------------------- +[ls_list_para] +ls_det_used = 0 +ltr_501als = 1 + +;-------------------------------------------------------------------------------- +;compass +;-------------------------------------------------------------------------------- +[compass_para] +compass_used = 0 +compass_twi_id = 1 +compass_twi_addr = 0x0d +compass_int = + +;-------------------------------------------------------------------------------- +;led +;-------------------------------------------------------------------------------- +[leds_para] +leds_used = 1 +leds_num = 2 +leds_pin_1 = port:PH06<1><0> +leds_name_1 = "red:ph06:led1" +leds_default_1 = 0 +leds_trigger_1 = "heartbeat" +leds_pin_2 = port:PH17<1><0> +leds_name_2 = "green:ph17:led2" +leds_default_2 = 0 +leds_trigger_2 = "cpu0" + +;-------------------------------------------------------------------------------- +;blue tooth +;bt_used ---- blue tooth used (0- no used, 1- used) +;bt_uard_id ---- uart index +;-------------------------------------------------------------------------------- +[bt_para] +bt_used = 1 +bt_uart_id = 2 +bt_wakeup = +bt_gpio = +bt_rst = + +;-------------------------------------------------------------------------------- +;daudio_master:1: SND_SOC_DAIFMT_CBM_CFM(codec clk & FRM master) use +; 2: SND_SOC_DAIFMT_CBS_CFM(codec clk slave & FRM master) not use +; 3: SND_SOC_DAIFMT_CBM_CFS(codec clk master & frame slave) not use +; 4: SND_SOC_DAIFMT_CBS_CFS(codec clk & FRM slave) use +;daudio_select:0 is pcm.1 is i2s +;audio_format: 1:SND_SOC_DAIFMT_I2S(standard i2s format). use +; 2:SND_SOC_DAIFMT_RIGHT_J(right justfied format). +; 3:SND_SOC_DAIFMT_LEFT_J(left justfied format) +; 4:SND_SOC_DAIFMT_DSP_A(pcm. MSB is available on 2nd BCLK rising edge after LRC rising edge). use +; 5:SND_SOC_DAIFMT_DSP_B(pcm. MSB is available on 1nd BCLK rising edge after LRC rising edge) +;signal_inversion:1:SND_SOC_DAIFMT_NB_NF(normal bit clock + frame) use +; 2:SND_SOC_DAIFMT_NB_IF(normal BCLK + inv FRM) +; 3:SND_SOC_DAIFMT_IB_NF(invert BCLK + nor FRM) use +; 4:SND_SOC_DAIFMT_IB_IF(invert BCLK + FRM) +;over_sample_rate: support 128fs/192fs/256fs/384fs/512fs/768fs +;sample_resolution :16bits/20bits/24bits +;word_select_size :16bits/20bits/24bits/32bits +;pcm_sync_period :16/32/64/128/256 +;msb_lsb_first :0: msb first; 1: lsb first +;sign_extend :0: zero pending; 1: sign extend +;slot_index :slot index: 0: the 1st slot - 3: the 4th slot +;slot_width :8 bit width / 16 bit width +;frame_width :0: long frame = 2 clock width; 1: short frame +;tx_data_mode :0: 16bit linear PCM; 1: 8bit linear PCM; 2: 8bit u-law; 3: 8bit a-law +;rx_data_mode :0: 16bit linear PCM; 1: 8bit linear PCM; 2: 8bit u-law; 3: 8bit a-law +;-------------------------------------------------------------------------------- +[s_i2s1] +daudio_used = 1 +daudio_master = 4 +daudio_select = 1 +audio_format = 1 +signal_inversion = 1 +mclk_fs = 512 +sample_resolution = 16 +slot_width_select = 16 +;pcm_sync_period = 256 +pcm_lrck_period = 32 +pcm_lrckr_period = 1 +msb_lsb_first = 0 +sign_extend = 0 +slot_index = 0 +frame_width = 0 +tx_data_mode = 0 +rx_data_mode = 0 +s_i2s1_lrckr = port:PM04<3><1> +s_i2s1_dout1 = port:PM05<3><1> +s_i2s1_dout2 = port:PM06<3><1> +s_i2s1_dout3 = port:PM07<3><1> +s_i2s1_mclk = port:PM10<3><1> +s_i2s1_bclk = port:PM11<3><1> +s_i2s1_lrclk = port:PM12<3><1> +s_i2s1_din = port:PM13<3><1> +s_i2s1_dout0 = port:PM14<3><1> + +[audio0] +audio_int_ctrl = port:PL9<6><0> +audio_pa_ctrl = port:PA16<1><0> +audio_hp_det = port:PM00<0><0> +aif3_voltage = "axp15_cldo3" +Digital_bb_cap_keytone_used = 0 +;speaker_val = 0x1b +headset_val = 0x3b +single_speaker_val = 0x19 +double_speaker_val = 0x1b +speaker_double_used = 1 + +[spdif0] +spdif_used = 0 +spdif_dout = port:PH18<3><1> +spdif_din = port:PH17<3><1> +spdif_voltage = "axp22_dcdc1" + + +;---------------------------------------------------------------------------------- +;ir rx --- infra remote configuration +;---------------------------------------------------------------------------------- +[s_cir0] +ir_used = 1 +ir_rx = port:PL06<3><1> +ir_power_key_code = 0x0 +ir_addr_code = 0x0 + +;---------------------------------------------------------------------------------- +;ir tx--- infra remote configuration +;---------------------------------------------------------------------------------- +[cir] +ir_used = 1 +ir_tx = port:PH07<2> + +;------------------------------------------------------------------------------------- +;pmu_used ---0:not used,1:used +;pmu_twi_addr ---slave address +;pmu_twi_id ---i2c bus number (0 TWI0, 1 TWI2, 2 TWI3) +;pmu_irq_id ---irq number (0 irq0,1 irq1,……) +;pmu_battery_rdc ---battery initial resistance +;pmu_battery_cap ---battery capability,mAh +;pmu_batdeten ---battery detect en;0:disable 1:enable +;pmu_runtime_chgcur ---set initial charging current limite,mA,300/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/ +;pmu_earlysuspend_chgcur ---set earlysuspend charging current limite,mA,300/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/ +;pmu_suspend_chgcur ---set suspend charging current limite,mA,300/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/ +;pmu_shutdown_chgcur ---set shutdown charging current limite,mA,300/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/ +;pmu_init_chgvol ---set initial charing target voltage,mV,4100/4220/4200/4240 +;pmu_init_chgend_rate ---set initial charing end current rate,10/15 +;pmu_init_chg_enabled ---set initial charing enabled,0:disable,1:enable +;pmu_init_adc_freq ---set initial adc frequency,Hz,100/200/400/800 +;pmu_init_adcts_freq ---set initial adc TS,Hz,100/200/400/800 +;pmu_init_chg_pretime ---set initial pre-charging time,min,40/50/60/70 +;pmu_init_chg_csttime ---set initial constance-charging time,min,360/480/600/720 +;pmu_batt_cap_correct ---correct the battery capacity or not when one charge cycle 0:not correct 1:correct +;pmu_bat_regu_en ---bat regulator is enable or not when charge done 0:disable 1:enable +;pmu_bat_para1 ---battery indication at 3.13V +;pmu_bat_para2 ---battery indication at 3.27V +;pmu_bat_para3 ---battery indication at 3.34V +;pmu_bat_para4 ---battery indication at 3.41V +;pmu_bat_para5 ---battery indication at 3.48V +;pmu_bat_para6 ---battery indication at 3.52V +;pmu_bat_para7 ---battery indication at 3.55V +;pmu_bat_para8 ---battery indication at 3.57V +;pmu_bat_para9 ---battery indication at 3.59V +;pmu_bat_para10 ---battery indication at 3.61V +;pmu_bat_para11 ---battery indication at 3.63V +;pmu_bat_para12 ---battery indication at 3.64V +;pmu_bat_para13 ---battery indication at 3.66V +;pmu_bat_para14 ---battery indication at 3.7V +;pmu_bat_para15 ---battery indication at 3.73V +;pmu_bat_para16 ---battery indication at 3.77V +;pmu_bat_para17 ---battery indication at 3.78V +;pmu_bat_para18 ---battery indication at 3.8V +;pmu_bat_para19 ---battery indication at 3.82V +;pmu_bat_para20 ---battery indication at 3.84V +;pmu_bat_para21 ---battery indication at 3.85V +;pmu_bat_para22 ---battery indication at 3.87V +;pmu_bat_para23 ---battery indication at 3.91V +;pmu_bat_para24 ---battery indication at 3.94V +;pmu_bat_para25 ---battery indication at 3.98V +;pmu_bat_para26 ---battery indication at 4.01V +;pmu_bat_para27 ---battery indication at 4.05V +;pmu_bat_para28 ---battery indication at 4.08V +;pmu_bat_para29 ---battery indication at 4.1V +;pmu_bat_para30 ---battery indication at 4.12V +;pmu_bat_para31 ---battery indication at 4.14V +;pmu_bat_para32 ---battery indication at 4.15V +;pmu_usbvol_limit ---set usb-ac limited voltage enable,1:enable,0:disable +;pmu_usbcur_limit ---set usb-ac limited current enable,1:enable,0:disable +;pmu_usbvol ---set usb-ac limited voltage level,mV,4000/4100/4200/4300/4400/4500/4600/4700,0 - not limite +;pmu_usbcur ---set usb-ac limited current level,mA,500/900, 0 - not limite +;pmu_usbvol_pc ---set usb-pc limited voltage level,mV,4000/4100/4200/4300/4400/4500/4600/4700,0 - not limite +;pmu_usbcur_pc ---set usb-pc limited current level,mA,500/900, 0 - not limite +;pmu_pwroff_vol ---set protect voltage when system start up,mV,2600/2700/2800/2900/3000/3100/3200/3300 +;pmu_pwron_vol ---set protect voltage after system start up,mV,2600/2700/2800/2900/3000/3100/3200/3300 +;pmu_pekoff_time ---set pek off time,ms, 4000/6000/8000/10000 +;pmu_pekoff_func ---set pek off func, 0:shutdown,1:restart +;pmu_pekoff_en ---set pek offlevel powerdown or not, 0:not powerdown,1:powerdown +;pmu_pekoff_delay_time ---set pek off delay time s, 0/10/20/30/40/50/60/70 +;pmu_peklong_time ---set pek pek long irq time,ms,1000/1500/2000/2500 +;pmu_pekon_time ---set pek on time,ms,128/1000/2000/3000 +;pmu_pwrok_time ---set pmu pwrok delay time,ms,8/16/32/64 +;pmu_pwrok_shutdown_en ---set pwrok 6s shutdown enable +;pmu_battery_warning_level1 ---low power warning high level,5%-20%,1%/step +;pmu_battery_warning_level2 ---low power warning low level,0%-15%,1%/step +;pmu_restvol_time ---battery indicaton reflash time,30/60/120/ +;pmu_ocv_cou_adjust_time ---ocv battery indication reflash time,60/120/30 +;pmu_chgled_func ---CHGKED pin control,0:controlled by pmu,1:controlled by Charger +;pmu_chgled_type ---CHGLED Type select when pmu_chgled_func=0,0:Type A,1:Type B +;pmu_vbusen_func ---N_VBUSEN function select,0:as an output,1:as an input +;pmu_reset ---when power key press longer than 16's,PMU reset or not.0:not reset 1:reset +;pmu_IRQ_wakeup ---press IRQ wakeup or not when sleep or power down.0:not wakeup 1:wakeup +;pmu_hot_shutdowm ---when PMU over temperature protect or not;0:disable 1:enable +;pmu_inshort ---ACIN and VBUS inshort or not by software;0:auto detect 1:inshort +;pmu_charge_ltf --- +;pmu_charge_htf --- +;pmu_discharge_ltf --- +;pmu_discharge_htf --- +;pmu_temp_para1 --- temp -25 voltage +;pmu_temp_para2 --- temp -15 voltage +;pmu_temp_para3 --- temp -10 voltage +;pmu_temp_para4 --- temp -5 voltage +;pmu_temp_para5 --- temp 0 voltage +;pmu_temp_para6 --- temp 5 voltage +;pmu_temp_para7 --- temp 10 voltage +;pmu_temp_para8 --- temp 20 voltage +;pmu_temp_para9 --- temp 30 voltage +;pmu_temp_para10 --- temp 40 voltage +;pmu_temp_para11 --- temp 45 voltage +;pmu_temp_para12 --- temp 50 voltage +;pmu_temp_para13 --- temp 55 voltage +;pmu_temp_para14 --- temp 60 voltage +;pmu_temp_para15 --- temp 70 voltage +;pmu_temp_para16 --- temp 80 voltage +;-------------------------------------------------------------------------------------------------------- +;-------------------------------------------------------------------------------------------------------- +;pmu1 is axp22 +;-------------------------------------------------------------------------------------------------------- +[pmu1_para] +pmu_used = 1 +pmu_twi_addr = 0x34 +pmu_twi_id = 0 +pmu_irq_id = 0 +pmu_battery_rdc = 100 +pmu_battery_cap = 0 +pmu_batdeten = 1 +pmu_runtime_chgcur = 900 +pmu_earlysuspend_chgcur = 900 +pmu_suspend_chgcur = 1500 +pmu_shutdown_chgcur = 1500 +pmu_init_chgvol = 4200 +pmu_init_chgend_rate = 15 +pmu_init_chg_enabled = 1 +pmu_init_adc_freq = 800 +pmu_init_adcts_freq = 800 +pmu_init_chg_pretime = 70 +pmu_init_chg_csttime = 720 +pmu_batt_cap_correct = 1 +pmu_bat_regu_en = 0 + +pmu_bat_para1 = 0 +pmu_bat_para2 = 0 +pmu_bat_para3 = 0 +pmu_bat_para4 = 0 +pmu_bat_para5 = 0 +pmu_bat_para6 = 0 +pmu_bat_para7 = 0 +pmu_bat_para8 = 0 +pmu_bat_para9 = 5 +pmu_bat_para10 = 8 +pmu_bat_para11 = 9 +pmu_bat_para12 = 10 +pmu_bat_para13 = 13 +pmu_bat_para14 = 16 +pmu_bat_para15 = 20 +pmu_bat_para16 = 33 +pmu_bat_para17 = 41 +pmu_bat_para18 = 46 +pmu_bat_para19 = 50 +pmu_bat_para20 = 53 +pmu_bat_para21 = 57 +pmu_bat_para22 = 61 +pmu_bat_para23 = 67 +pmu_bat_para24 = 73 +pmu_bat_para25 = 78 +pmu_bat_para26 = 84 +pmu_bat_para27 = 88 +pmu_bat_para28 = 92 +pmu_bat_para29 = 93 +pmu_bat_para30 = 94 +pmu_bat_para31 = 95 +pmu_bat_para32 = 100 + +pmu_usbvol_limit = 0 +pmu_usbcur_limit = 0 +pmu_usbvol = 4000 +pmu_usbcur = 0 +pmu_usbvol_pc = 4400 +pmu_usbcur_pc = 500 +pmu_pwroff_vol = 3300 +pmu_pwron_vol = 2600 +pmu_pekoff_time = 6000 +pmu_pekoff_func = 0 +pmu_pekoff_en = 1 +pmu_pekoff_delay_time = 0 +pmu_peklong_time = 1500 +pmu_pekon_time = 1000 +pmu_pwrok_time = 64 +pmu_pwrok_shutdown_en = 0 +pmu_battery_warning_level1 = 15 +pmu_battery_warning_level2 = 0 +pmu_restvol_adjust_time = 60 +pmu_ocv_cou_adjust_time = 60 +pmu_chgled_func = 0 +pmu_chgled_type = 0 +pmu_vbusen_func = 1 +pmu_reset = 0 +pmu_IRQ_wakeup = 0 +pmu_hot_shutdowm = 1 +pmu_inshort = 0 +power_start = 1 + +pmu_temp_enable = 0 +pmu_charge_ltf = 2261 +pmu_charge_htf = 388 +pmu_discharge_ltf = 3200 +pmu_discharge_htf = 237 +pmu_temp_para1 = 7466 +pmu_temp_para2 = 4480 +pmu_temp_para3 = 3518 +pmu_temp_para4 = 2786 +pmu_temp_para5 = 2223 +pmu_temp_para6 = 1788 +pmu_temp_para7 = 1448 +pmu_temp_para8 = 969 +pmu_temp_para9 = 664 +pmu_temp_para10 = 466 +pmu_temp_para11 = 393 +pmu_temp_para12 = 333 +pmu_temp_para13 = 283 +pmu_temp_para14 = 242 +pmu_temp_para15 = 179 +pmu_temp_para16 = 134 + +;-------------------------------------------------------------------------------------------------------- +;pmu2 is axp15 +;pmu_used ---0:not used,1:used +;pmu_twi_addr ---slave address +;pmu_twi_id ---i2c bus number (0 TWI0, 1 TWI2, 2 TWI3) +;pmu_irq_id ---irq number (0 irq0,1 irq1) +;pmu_hot_shutdowm ---when PMU over temperature protect or not;0:disable 1:enable +;-------------------------------------------------------------------------------------------------------- +[pmu2_para] +pmu_used = 1 +pmu_twi_addr = 0x34 +pmu_twi_id = 1 +pmu_irq_id = 0 +pmu_hot_shutdowm = 1 +;---------------------------------------------------------------------------------- +; dvfs voltage-frequency table configuration +; +; there are two clusters, cluster0 and cluster1, they have diffrent configuration +; on frequency and voltage. +; +; max_freq: cpu maximum frequency, based on Hz +; min_freq: cpu minimum frequency, based on Hz +; +; LV_count: count of LV_freq/LV_volt, must be < 16 +; +; L_LV1: core vdd is 1.02v if cpu frequency is (1128Mhz, 1200Mhz] +; L_LV2: core vdd is 0.96v if cpu frequency is (1008Mhz, 1128Mhz] +; L_LV3: core vdd is 0.90v if cpu frequency is ( 864Mhz, 1008Mhz] +; L_LV4: core vdd is 0.84v if cpu frequency is ( 0Mhz, 864Mhz] +; L_LV5: core vdd is 0.84v if cpu frequency is ( 0Mhz, 864Mhz] +; L_LV6: core vdd is 0.84v if cpu frequency is ( 0Mhz, 864Mhz] +; L_LV7: core vdd is 0.84v if cpu frequency is ( 0Mhz, 864Mhz] +; L_LV8: core vdd is 0.84v if cpu frequency is ( 0Mhz, 864Mhz] +; +; B_LV1: core vdd is 1.08v if cpu frequency is (1608Mhz, 1800Mhz] +; B_LV2: core vdd is 1.00v if cpu frequency is (1536Mhz, 1608Mhz] +; B_LV3: core vdd is 0.96v if cpu frequency is (1440Mhz, 1536Mhz] +; B_LV4: core vdd is 0.90v if cpu frequency is (1296Mhz, 1440Mhz] +; B_LV5: core vdd is 0.84v if cpu frequency is ( 0Mhz, 1296Mhz] +; B_LV6: core vdd is 0.84v if cpu frequency is ( 0Mhz, 1296Mhz] +; B_LV7: core vdd is 0.84v if cpu frequency is ( 0Mhz, 1296Mhz] +; B_LV8: core vdd is 0.84v if cpu frequency is ( 0Mhz, 1296Mhz] +; +;---------------------------------------------------------------------------------- +[dvfs_table] +vf_table_count = 3 + +[vf_table0] +;little +L_max_freq = 1200000000 +L_min_freq = 480000000 + +L_LV_count = 8 + +L_LV1_freq = 1200000000 +L_LV1_volt = 1020 + +L_LV2_freq = 1104000000 +L_LV2_volt = 960 + +L_LV3_freq = 1008000000 +L_LV3_volt = 900 + +L_LV4_freq = 816000000 +L_LV4_volt = 840 + +L_LV5_freq = 0 +L_LV5_volt = 840 + +L_LV6_freq = 0 +L_LV6_volt = 840 + +L_LV7_freq = 0 +L_LV7_volt = 840 + +L_LV8_freq = 0 +L_LV8_volt = 840 + +;big +B_max_freq = 1800000000 +B_min_freq = 600000000 + +B_LV_count = 8 + +B_LV1_freq = 1800000000 +B_LV1_volt = 1100 + +B_LV2_freq = 1608000000 +B_LV2_volt = 1020 + +B_LV3_freq = 1416000000 +B_LV3_volt = 960 + +B_LV4_freq = 1200000000 +B_LV4_volt = 900 + +B_LV5_freq = 1008000000 +B_LV5_volt = 840 + +B_LV6_freq = 0 +B_LV6_volt = 840 + +B_LV7_freq = 0 +B_LV7_volt = 840 + +B_LV8_freq = 0 +B_LV8_volt = 840 + +[vf_table1] +;little +L_max_freq = 1200000000 +L_min_freq = 480000000 + +L_LV_count = 8 + +L_LV1_freq = 1200000000 +L_LV1_volt = 1060 + +L_LV2_freq = 1008000000 +L_LV2_volt = 960 + +L_LV3_freq = 912000000 +L_LV3_volt = 900 + +L_LV4_freq = 720000000 +L_LV4_volt = 840 + +L_LV5_freq = 0 +L_LV5_volt = 840 + +L_LV6_freq = 0 +L_LV6_volt = 840 + +L_LV7_freq = 0 +L_LV7_volt = 840 + +L_LV8_freq = 0 +L_LV8_volt = 840 + +;big +B_max_freq = 1608000000 +B_min_freq = 600000000 + +B_LV_count = 8 + +B_LV1_freq = 1800000000 +B_LV1_volt = 1160 + +B_LV2_freq = 1608000000 +B_LV2_volt = 1100 + +B_LV3_freq = 1416000000 +B_LV3_volt = 1020 + +B_LV4_freq = 1320000000 +B_LV4_volt = 960 + +B_LV5_freq = 1200000000 +B_LV5_volt = 900 + +B_LV6_freq = 1008000000 +B_LV6_volt = 840 + +B_LV7_freq = 0 +B_LV7_volt = 840 + +B_LV8_freq = 0 +B_LV8_volt = 840 + +[vf_table2] +;little +L_max_freq = 1200000000 +L_min_freq = 480000000 + +L_LV_count = 8 + +L_LV1_freq = 1200000000 +L_LV1_volt = 1020 + +L_LV2_freq = 1104000000 +L_LV2_volt = 960 + +L_LV3_freq = 1008000000 +L_LV3_volt = 900 + +L_LV4_freq = 816000000 +L_LV4_volt = 840 + +L_LV5_freq = 0 +L_LV5_volt = 840 + +L_LV6_freq = 0 +L_LV6_volt = 840 + +L_LV7_freq = 0 +L_LV7_volt = 840 + +L_LV8_freq = 0 +L_LV8_volt = 840 + +;big +B_max_freq = 1800000000 +B_min_freq = 600000000 + +B_LV_count = 8 + +B_LV1_freq = 1800000000 +B_LV1_volt = 1100 + +B_LV2_freq = 1608000000 +B_LV2_volt = 1020 + +B_LV3_freq = 1416000000 +B_LV3_volt = 960 + +B_LV4_freq = 1200000000 +B_LV4_volt = 900 + +B_LV5_freq = 1008000000 +B_LV5_volt = 840 + +B_LV6_freq = 0 +B_LV6_volt = 840 + +B_LV7_freq = 0 +B_LV7_volt = 840 + +B_LV8_freq = 0 +B_LV8_volt = 840 + +;---------------------------------------------------------------------------------- +;virtual device +;virtual device for pinctrl testing +;device have pin PA1 PA2 +;---------------------------------------------------------------------------------- +[Vdevice] +Vdevice_used = 1 +Vdevice_0 = +Vdevice_1 = + +;---------------------------------------------------------------------------------- +;s_uart0 config parameters +;s_uart_used --s_uart0 whether used for arisc debugging +; +;---------------------------------------------------------------------------------- +[s_uart0] +s_uart_used = 1 +s_uart_tx = port:PL00<3> +s_uart_rx = port:PL01<3> + +;---------------------------------------------------------------------------------- +;s_rsb0 config parameters +;s_rsb_used --s_rsb0 whether used for arisc +; +;---------------------------------------------------------------------------------- +[s_rsb0] +s_rsb_used = 1 +s_rsb_sck = port:PN00<3><1><2> +s_rsb_sda = port:PN01<3><1><2> + +;---------------------------------------------------------------------------------- +;s_jtag0 config parameters +;s_jtag0_used --s_jtag0 whether used for arisc +; +;---------------------------------------------------------------------------------- +[s_jtag0] +s_jtag_used = 1 +s_jtag_tms = port:PL02<3><1><2> +s_jtag_tck = port:PL03<3><1><2> +s_jtag_tdo = port:PL04<3><1><2> +s_jtag_tdi = port:PL05<3><1><2> + +;---------------------------------------------------------------------------------- +;s_powchk cpus power check +;s_powchk_used --power check whether used for arisc in super standby +; bit31:enable power updat, bit1:wakeup when power state exception +; bit0:wakeup when power consumption exception +;s_power_reg the expected regs stand for power on/off state +;s_system_power the limit maxmum power consumption when super standby (unit: mw) +; +;---------------------------------------------------------------------------------- +[s_powchk] +s_powchk_used = 0x80000000 +s_power_reg = 0x02309621 +s_system_power = 50 + +;---------------------------------------------------------------------------------- +; dram dvfs voltage-frequency table configuration +; +; LV_count: count of LV_freq/LV_volt +; +; LV1: core vdd is 0.90v if dram frequency is (360Mhz, 672Mhz] +; LV2: core vdd is 0.84v if dram frequency is ( 0Mhz, 168Mhz] +; LV3: core vdd is 0.84v if dram frequency is ( 0Mhz, 168Mhz] +; +;---------------------------------------------------------------------------------- +[dram_dvfs_table] +LV_count = 3 + +LV1_freq = 672000000 +LV1_volt = 900 + +LV2_freq = 168000000 +LV2_volt = 840 + +LV3_freq = 0 +LV3_volt = 840 + +;---------------------------------------------------------------------------------- +; dram scene frequency table configuration +; +; LV_count: count of LV_scene/LV_freq +; +; LV0: dram frequency default is 672MHz in normal +; LV1: dram frequency default is 480MHz in home, supported for 480MHz/672MHz +; LV2: dram frequency default is 240MHz in video play, supported for 240MHz/336MHz/480MHz/672MHz +; LV3: dram frequency default is 168MHz in bgmusic play +; LV4: dram frequency default is 480MHz in 4K video play, supported for 480MHz/672MHz +; +;---------------------------------------------------------------------------------- +[dram_scene_table] +LV_count = 5 + +LV0_scene = 0 +LV0_freq = 672000000 + +LV1_scene = 1 +LV1_freq = 480000000 + +LV2_scene = 2 +LV2_freq = 240000000 + +LV3_scene = 3 +LV3_freq = 168000000 + +LV4_scene = 4 +LV4_freq = 480000000 diff --git a/config/hostapd.conf.lime b/config/hostapd.conf similarity index 92% rename from config/hostapd.conf.lime rename to config/hostapd.conf index 574dff037f..dbbe06eaad 100644 --- a/config/hostapd.conf.lime +++ b/config/hostapd.conf @@ -1,4 +1,4 @@ -ssid=LIME +ssid=BOARD interface=wlan0 hw_mode=g channel=1 @@ -16,4 +16,4 @@ wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP auth_algs=1 -macaddr_acl=0 +macaddr_acl=0 \ No newline at end of file diff --git a/config/hostapd.conf.bananapi b/config/hostapd.conf.bananapi deleted file mode 100644 index 3a4d346d0c..0000000000 --- a/config/hostapd.conf.bananapi +++ /dev/null @@ -1,19 +0,0 @@ -ssid=BANANA -interface=wlan0 -hw_mode=g -channel=1 -bridge=br0 - -logger_syslog=0 -logger_syslog_level=0 - -wmm_enabled=0 -wpa=2 -preamble=1 -wpa_psk=66eb31d2b48d19ba216f2e50c6831ee11be98e2fa3a8075e30b866f4a5ccda27 -wpa_passphrase=12345678 -wpa_key_mgmt=WPA-PSK -wpa_pairwise=TKIP -rsn_pairwise=CCMP -auth_algs=1 -macaddr_acl=0 \ No newline at end of file diff --git a/config/hostapd.conf.bananapi-next b/config/hostapd.conf.bananapi-next deleted file mode 100644 index 3a4d346d0c..0000000000 --- a/config/hostapd.conf.bananapi-next +++ /dev/null @@ -1,19 +0,0 @@ -ssid=BANANA -interface=wlan0 -hw_mode=g -channel=1 -bridge=br0 - -logger_syslog=0 -logger_syslog_level=0 - -wmm_enabled=0 -wpa=2 -preamble=1 -wpa_psk=66eb31d2b48d19ba216f2e50c6831ee11be98e2fa3a8075e30b866f4a5ccda27 -wpa_passphrase=12345678 -wpa_key_mgmt=WPA-PSK -wpa_pairwise=TKIP -rsn_pairwise=CCMP -auth_algs=1 -macaddr_acl=0 \ No newline at end of file diff --git a/config/hostapd.conf.cubietruck b/config/hostapd.conf.cubietruck deleted file mode 100644 index 184d1d3f98..0000000000 --- a/config/hostapd.conf.cubietruck +++ /dev/null @@ -1,19 +0,0 @@ -ssid=CUBIE -interface=wlan0 -hw_mode=g -channel=1 -bridge=br0 - -logger_syslog=0 -logger_syslog_level=0 - -wmm_enabled=0 -wpa=2 -preamble=1 -wpa_psk=66eb31d2b48d19ba216f2e50c6831ee11be98e2fa3a8075e30b866f4a5ccda27 -wpa_passphrase=12345678 -wpa_key_mgmt=WPA-PSK -wpa_pairwise=TKIP -rsn_pairwise=CCMP -auth_algs=1 -macaddr_acl=0 \ No newline at end of file diff --git a/config/hostapd.conf.cubietruck-next b/config/hostapd.conf.cubietruck-next deleted file mode 100644 index 3a4d346d0c..0000000000 --- a/config/hostapd.conf.cubietruck-next +++ /dev/null @@ -1,19 +0,0 @@ -ssid=BANANA -interface=wlan0 -hw_mode=g -channel=1 -bridge=br0 - -logger_syslog=0 -logger_syslog_level=0 - -wmm_enabled=0 -wpa=2 -preamble=1 -wpa_psk=66eb31d2b48d19ba216f2e50c6831ee11be98e2fa3a8075e30b866f4a5ccda27 -wpa_passphrase=12345678 -wpa_key_mgmt=WPA-PSK -wpa_pairwise=TKIP -rsn_pairwise=CCMP -auth_algs=1 -macaddr_acl=0 \ No newline at end of file diff --git a/config/hostapd.conf.cubox-i b/config/hostapd.conf.cubox-i deleted file mode 100644 index 994ce2cf5a..0000000000 --- a/config/hostapd.conf.cubox-i +++ /dev/null @@ -1,17 +0,0 @@ -ssid=CUBOX -interface=wlan0 -hw_mode=g -channel=1 -bridge=br0 -driver=nl80211 -logger_syslog=0 -logger_syslog_level=0 -wmm_enabled=0 -wpa=2 -preamble=1 -wpa_psk=66eb31d2b48d19ba216f2e50c6831ee11be98e2fa3a8075e30b866f4a5ccda27 -wpa_passphrase=12345678 -wpa_key_mgmt=WPA-PSK -rsn_pairwise=CCMP -auth_algs=1 -macaddr_acl=0 diff --git a/config/hostapd.conf.lime2 b/config/hostapd.conf.lime2 deleted file mode 100644 index 574dff037f..0000000000 --- a/config/hostapd.conf.lime2 +++ /dev/null @@ -1,19 +0,0 @@ -ssid=LIME -interface=wlan0 -hw_mode=g -channel=1 -bridge=br0 - -logger_syslog=0 -logger_syslog_level=0 - -wmm_enabled=0 -wpa=2 -preamble=1 -wpa_psk=66eb31d2b48d19ba216f2e50c6831ee11be98e2fa3a8075e30b866f4a5ccda27 -wpa_passphrase=12345678 -wpa_key_mgmt=WPA-PSK -wpa_pairwise=TKIP -rsn_pairwise=CCMP -auth_algs=1 -macaddr_acl=0 diff --git a/main.sh b/main.sh index 1417c7ca0e..74414434ec 100644 --- a/main.sh +++ b/main.sh @@ -60,6 +60,12 @@ if [ "$SOURCE_COMPILE" = "yes" ]; then # create tar file packing_kernel + +else + + # choose kernel from ready made + choosing_kernel + #-------------------------------------------------------------------------------------------------------------------------------- fi diff --git a/scripts/armhwinfo b/scripts/armhwinfo index 889fa5a538..2ca8b986c0 100644 --- a/scripts/armhwinfo +++ b/scripts/armhwinfo @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash ### BEGIN INIT INFO # Provides: armhwinfo # Required-Start: @@ -21,7 +21,7 @@ case "$1" in start) # ARM if [ "$ARCH" = "armv7l" ]; then - if [ "$HARDWARE" = "sun7i" ]; then + if [ $HARDWARE = "sun7i" ] || [ $HARDWARE = "Allwinner" ]; then ID="Allwinner" if [ "$MEMTOTAL" = 2 ]; then ID="Cubietruck" @@ -60,6 +60,14 @@ if [ "$ARCH" = "armv7l" ]; then fi fi +# mainline kernel - read from machine info + +MACHINE=$(dmesg |grep "Machine model") + +if [[ $MACHINE == *LIME2 ]]; then ID="Lime 2"; fi +if [[ $MACHINE == *LIME ]]; then ID="Lime"; fi +if [[ $MACHINE == *"Banana Pi" ]]; then ID="Banana PI"; fi + echo "" > /var/run/motd.dynamic toilet -f standard -F metal "$ID" >> /var/run/motd.dynamic echo "" >> /var/run/motd.dynamic diff --git a/scripts/firstrun b/scripts/firstrun index 99c1d00db9..85f4666dff 100644 --- a/scripts/firstrun +++ b/scripts/firstrun @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash ### BEGIN INIT INFO # Provides: firstrun @@ -30,7 +30,7 @@ case "$1" in echo "" toilet -f standard "first run" # if we have 1G ram reduce RAMLOG size - if [ "$MEMTOTAL" = 1 ]; then + if (($MEMTOTAL <= 1)); then sed -e 's/TMPFS_RAMFS_SIZE=512m/TMPFS_RAMFS_SIZE=256m/g' -i /etc/default/ramlog # for cubieboard disable some services if [ -f "/boot/cubieboard2.bin" ]; then