├── .dockerignore ├── .gitignore ├── Dockerfile ├── Makefile ├── README.md ├── blobs ├── boot.cmd ├── boot0.bin ├── scp.bin ├── sys_config_pine64-pinebook.fex ├── sys_config_pine64-pinebook1080p.fex ├── sys_config_pine64-plus.fex ├── sys_config_pine64-sopine.fex └── uEnv.txt ├── boot ├── bat │ ├── bat0.bmp │ ├── bat1.bmp │ ├── bat10.bmp │ ├── bat2.bmp │ ├── bat3.bmp │ ├── bat4.bmp │ ├── bat5.bmp │ ├── bat6.bmp │ ├── bat7.bmp │ ├── bat8.bmp │ ├── bat9.bmp │ ├── battery.bmp │ ├── battery_charge.bmp │ ├── bempty.bmp │ ├── bootlogo.bmp │ └── low_pwr.bmp ├── boot.cmd ├── boot.scr ├── bootlogo.bmp ├── font24.sft ├── font32.sft ├── pine64 │ ├── boot0-pine64-pinebook.bin │ ├── boot0-pine64-pinebook1080p.bin │ ├── boot0-pine64-plus.bin │ ├── boot0-pine64-sopine.bin │ ├── fes1-pine64-pinebook.bin │ ├── fes1-pine64-pinebook1080p.bin │ ├── fes1-pine64-plus.bin │ ├── fes1-pine64-sopine.bin │ ├── sun50i-a64-pine64-pinebook.dtb │ ├── sun50i-a64-pine64-pinebook1080p.dtb │ ├── sun50i-a64-pine64-plus.dtb │ ├── sun50i-a64-pine64-sopine.dtb │ ├── u-boot-pine64-pinebook.bin │ ├── u-boot-pine64-pinebook1080p.bin │ ├── u-boot-pine64-plus.bin │ └── u-boot-pine64-sopine.bin └── uEnv.txt ├── build └── .gitkeep └── shell.bash /.dockerignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/.dockerignore -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | sunxi-pack-tools/ 2 | sunxi-tools/ 3 | arm-trusted-firmware-pine64/ 4 | u-boot-pine64/ 5 | *.tmp 6 | /build 7 | /linux 8 | /linux_modules_install 9 | /android_system_install 10 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:xenial 2 | 3 | RUN apt-get update 4 | RUN apt-get install -y git-core build-essential 5 | RUN apt-get install -y g++-4.9-aarch64-linux-gnu gcc-4.9-aarch64-linux-gnu \ 6 | g++-4.7-arm-linux-gnueabihf gcc-4.7-arm-linux-gnueabihf 7 | RUN apt-get install -y device-tree-compiler 8 | RUN apt-get install -y dos2unix 9 | RUN apt-get install -y ccache gcc-aarch64-linux-gnu 10 | RUN apt-get install -y u-boot-tools 11 | 12 | RUN cd /usr/bin/ && \ 13 | ln -s arm-linux-gnueabihf-gcc-4.7 arm-linux-gnueabihf-gcc && \ 14 | ln -s arm-linux-gnueabihf-g++-4.7 arm-linux-gnueabihf-g++ && \ 15 | ln -s arm-linux-gnueabihf-cpp-4.7 arm-linux-gnueabihf-cpp 16 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | ATF_BUILD := debug 2 | BRANCH ?= my-hacks-1.2 3 | LINUX_DIR := linux 4 | DTS_DIR := $(LINUX_DIR)/arch/arm64/boot/dts 5 | REMOTE_HOST ?= pinebook 6 | 7 | all: pine64-pinebook pine64-plus pine64-sopine 8 | 9 | help: 10 | # make pine64-pinebook 11 | # make pine64-plus 12 | # make pinebook_ums 13 | # make clean 14 | 15 | sunxi-pack-tools: 16 | -rm -rf sunxi-pack-tools.tmp 17 | git clone --depth=1 --single-branch --branch=$(BRANCH) https://github.com/ayufan-pine64/sunxi-pack-tools.git sunxi-pack-tools.tmp 18 | make -C sunxi-pack-tools.tmp 19 | mv sunxi-pack-tools.tmp sunxi-pack-tools 20 | 21 | sunxi-tools: 22 | -rm -rf sunxi-tools.tmp 23 | git clone https://github.com/linux-sunxi/sunxi-tools.git sunxi-tools.tmp 24 | make -C sunxi-tools.tmp 25 | mv sunxi-tools.tmp sunxi-tools 26 | 27 | build/%-uboot.dtb: blobs/%-uboot.dts 28 | mkdir -p build 29 | dtc -Odtb -o $@ $< 30 | 31 | build/%.fex: blobs/%.fex 32 | mkdir -p build 33 | cp $< $@ 34 | unix2dos $@ 35 | 36 | build/sys_config_%.bin: build/sys_config_%.fex sunxi-pack-tools 37 | sunxi-pack-tools/bin/script $< 38 | 39 | arm-trusted-firmware-pine64: 40 | git clone --depth=1 --single-branch --branch=$(BRANCH) https://github.com/ayufan-pine64/arm-trusted-firmware-pine64.git 41 | 42 | arm-trusted-firmware-pine64/build/sun50iw1p1/release/bl31.bin: arm-trusted-firmware-pine64 43 | make -C arm-trusted-firmware-pine64 clean 44 | make -C arm-trusted-firmware-pine64 ARCH=arm CROSS_COMPILE="ccache aarch64-linux-gnu-" PLAT=sun50iw1p1 bl31 45 | 46 | arm-trusted-firmware-pine64/build/sun50iw1p1/debug/bl31.bin: arm-trusted-firmware-pine64 47 | make -C arm-trusted-firmware-pine64 clean 48 | make -C arm-trusted-firmware-pine64 ARCH=arm CROSS_COMPILE="ccache aarch64-linux-gnu-" PLAT=sun50iw1p1 DEBUG=1 bl31 49 | 50 | .INTERMEDIATE: build/bl31.bin 51 | build/bl31.bin: arm-trusted-firmware-pine64/build/sun50iw1p1/$(ATF_BUILD)/bl31.bin 52 | cp $< $@ 53 | 54 | # build/bl31.bin: blobs/bl31.bin 55 | # mkdir -p build 56 | # cp $< $@ 57 | 58 | build/scp_%.bin: build/%_linux.dtb blobs/scp.bin 59 | cp blobs/scp.bin $@.tmp 60 | sunxi-pack-tools/bin/update_scp $@.tmp $< 61 | mv $@.tmp $@ 62 | 63 | .PHONY: scp 64 | scp: build/scp_pinebook.bin build/scp_pine64.bin 65 | 66 | u-boot-pine64: 67 | git clone --depth 1 --single-branch --branch=$(BRANCH) https://github.com/ayufan-pine64/u-boot-pine64.git 68 | 69 | u-boot-pine64/include/configs/sun50iw1p1.h: u-boot-pine64 70 | 71 | u-boot-pine64/include/autoconf.mk: u-boot-pine64/include/configs/sun50iw1p1.h 72 | make -C u-boot-pine64 ARCH=arm CROSS_COMPILE="ccache arm-linux-gnueabihf-" sun50iw1p1_config 73 | 74 | u-boot-pine64/u-boot-sun50iw1p1.bin: u-boot-pine64/include/autoconf.mk 75 | make -C u-boot-pine64 ARCH=arm CROSS_COMPILE="ccache arm-linux-gnueabihf-" -j$(nproc) 76 | 77 | u-boot-pine64/fes1_sun50iw1p1.bin u-boot-pine64/boot0_sdcard_sun50iw1p1.bin: u-boot-pine64/include/autoconf.mk 78 | make -C u-boot-pine64 ARCH=arm CROSS_COMPILE="ccache arm-linux-gnueabihf-" spl 79 | 80 | .PHONY: uboot 81 | uboot: u-boot-pine64/u-boot-sun50iw1p1.bin 82 | 83 | .PHONY: spl 84 | spl: u-boot-pine64/fes1_sun50iw1p1.bin u-boot-pine64/boot0_sdcard_sun50iw1p1.bin 85 | 86 | linux/.git: 87 | git clone --depth 1 --single-branch --branch=my-hacks-1.2-with-drm https://github.com/ayufan-pine64/linux-pine64.git linux 88 | 89 | linux: linux/.git 90 | 91 | linux/.config: linux/.git 92 | ifneq ($(BUILD_ANDROID),) 93 | make -C linux ARCH=arm64 CROSS_COMPILE="ccache aarch64-linux-gnu-" sun50iw1p1smp_android_defconfig 94 | else 95 | make -C linux ARCH=arm64 CROSS_COMPILE="ccache aarch64-linux-gnu-" sun50iw1p1smp_linux_defconfig 96 | endif 97 | 98 | linux/scripts/dtc/dtc: linux/.config 99 | make -C linux ARCH=arm64 CROSS_COMPILE="ccache aarch64-linux-gnu-" scripts/dtc/ 100 | touch "$@" 101 | 102 | linux/arch/arm64/boot/dts/sun50iw1p1-soc.dts: linux 103 | 104 | build/%.dtb.dts: $(DTS_DIR)/%.dts $(wildcard $(DTS_DIR)/*.dts*) 105 | $(CROSS_COMPILE)gcc -E -nostdinc -I$(DTS_DIR) -I$(LINUX_DIR)/include -D__DTS__ -x assembler-with-cpp -o $@.tmp $< 106 | mv $@.tmp $@ 107 | 108 | build/sys_config_%.fex.fix: blobs/sys_config_%.fex 109 | sed -e "s/\(\[dram\)_para\(\]\)/\1\2/g" \ 110 | -e "s/\(\[nand[0-9]\)_para\(\]\)/\1\2/g" $< > $@.tmp 111 | mv $@.tmp $@ 112 | 113 | build/%-linux.dtb: build/sys_config_%.fex.fix build/sun50iw1p1-soc.dtb.dts $(LINUX_DIR)/scripts/dtc/dtc 114 | $(LINUX_DIR)/scripts/dtc/dtc -O dtb -o $@ \ 115 | -F $< -R 512 \ 116 | build/sun50iw1p1-soc.dtb.dts 117 | 118 | build/boot0-%.bin: build/sys_config_%.bin u-boot-pine64/boot0_sdcard_sun50iw1p1.bin 119 | echo Blob needs to be at most 32KB && \ 120 | test $$(stat -c%s $(word 2,$^)) -le 32768 121 | cp $(word 2,$^) $@.tmp 122 | sunxi-pack-tools/bin/update_boot0 $@.tmp $< sdmmc_card 123 | mv $@.tmp $@ 124 | 125 | build/fes1-%.bin: build/sys_config_%.bin u-boot-pine64/fes1_sun50iw1p1.bin 126 | echo Blob needs to be at most 32KB && \ 127 | test $$(stat -c%s $(word 2,$^)) -le 32768 128 | cp $(word 2,$^) $@.tmp 129 | sunxi-pack-tools/bin/update_boot0 $@.tmp $< sdmmc_card 130 | mv $@.tmp $@ 131 | 132 | build/u-boot-sun50iw1p1-with-%-dtb.bin: build/%-linux.dtb build/sys_config_%.bin u-boot-pine64/u-boot-sun50iw1p1.bin sunxi-pack-tools \ 133 | build/sys_config_uboot.bin sunxi-pack-tools 134 | sunxi-pack-tools/bin/update_uboot_fdt u-boot-pine64/u-boot-sun50iw1p1.bin $< $@.tmp 135 | sunxi-pack-tools/bin/update_uboot $@.tmp $(word 2,$^) 136 | mv $@.tmp $@ 137 | 138 | build/u-boot-sun50iw1p1-secure-with-%-dtb.bin: build/%-linux.dtb build/sys_config_%.bin u-boot-pine64/u-boot-sun50iw1p1.bin \ 139 | build/bl31.bin blobs/scp.bin sunxi-pack-tools 140 | sunxi-pack-tools/bin/merge_uboot u-boot-pine64/u-boot-sun50iw1p1.bin build/bl31.bin $@.tmp secmonitor 141 | sunxi-pack-tools/bin/merge_uboot $@.tmp blobs/scp.bin $@.tmp2 scp 142 | sunxi-pack-tools/bin/update_uboot_fdt $@.tmp2 $< $@.tmp3 143 | sunxi-pack-tools/bin/update_uboot $@.tmp3 $(word 2,$^) 144 | echo Blob needs to be at most 1MB && \ 145 | test $$(stat -c%s $@.tmp3) -le 1048576 146 | mv $@.tmp3 $@ 147 | rm $@.tmp $@.tmp2 148 | 149 | .PHONY: pine64-pinebook 150 | pine64-pinebook: \ 151 | boot/pine64/sun50i-a64-pine64-pinebook.dtb \ 152 | boot/pine64/boot0-pine64-pinebook.bin \ 153 | boot/pine64/fes1-pine64-pinebook.bin \ 154 | boot/pine64/u-boot-pine64-pinebook.bin \ 155 | boot/pine64/sun50i-a64-pine64-pinebook1080p.dtb \ 156 | boot/pine64/boot0-pine64-pinebook1080p.bin \ 157 | boot/pine64/fes1-pine64-pinebook1080p.bin \ 158 | boot/pine64/u-boot-pine64-pinebook1080p.bin \ 159 | boot/boot.scr \ 160 | boot/boot.cmd \ 161 | boot/uEnv.txt 162 | 163 | .PHONY: pine64-sopine 164 | pine64-sopine: boot/pine64/sun50i-a64-pine64-sopine.dtb \ 165 | boot/pine64/boot0-pine64-sopine.bin \ 166 | boot/pine64/fes1-pine64-sopine.bin \ 167 | boot/pine64/u-boot-pine64-sopine.bin \ 168 | boot/boot.scr \ 169 | boot/boot.cmd \ 170 | boot/uEnv.txt 171 | 172 | .PHONY: pine64 173 | pine64: boot/pine64/sun50i-a64-pine64.dtb \ 174 | boot/pine64/boot0-pine64.bin \ 175 | boot/pine64/fes1-pine64.bin \ 176 | boot/pine64/u-boot-pine64.bin \ 177 | boot/boot.scr \ 178 | boot/boot.cmd \ 179 | boot/uEnv.txt 180 | 181 | .PHONY: pine64-plus 182 | pine64-plus: boot/pine64/sun50i-a64-pine64-plus.dtb \ 183 | boot/pine64/boot0-pine64-plus.bin \ 184 | boot/pine64/fes1-pine64-plus.bin \ 185 | boot/pine64/u-boot-pine64-plus.bin \ 186 | boot/boot.scr \ 187 | boot/boot.cmd \ 188 | boot/uEnv.txt 189 | 190 | .PHONY: pinebook_ums 191 | pinebook_ums: sunxi-tools 192 | # 0x4A0000e0: is a work mode: the 0x55 is a special work mode used to force USB mass storage 193 | # 0x4A0000e4: is a storage type: EMMC 194 | sunxi-tools/sunxi-fel -v spl boot/pine64/fes1-pine64-pinebook.bin 195 | sunxi-tools/sunxi-fel write-with-progress 0x4A000000 boot/pine64/u-boot-pine64-pinebook.bin \ 196 | writel 0x4A0000e0 0x55 \ 197 | writel 0x4A0000e4 0x2 \ 198 | exe 0x4A000000 199 | 200 | .PHONY: sopine_ums sopine_boot 201 | sopine_ums: sunxi-tools 202 | # 0x4A0000e0: is a work mode: the 0x55 is a special work mode used to force USB mass storage 203 | # 0x4A0000e4: is a storage type: SD card 204 | sunxi-tools/sunxi-fel -v spl boot/pine64/fes1-pine64-sopine.bin 205 | sunxi-tools/sunxi-fel write-with-progress 0x4A000000 boot/pine64/u-boot-pine64-sopine.bin \ 206 | writel 0x4A0000e0 0x55 \ 207 | writel 0x4A0000e4 0x2 \ 208 | exe 0x4A000000 209 | 210 | sopine_boot: sunxi-tools 211 | # 0x4A0000e0: is a work mode: the 0x55 is a special work mode used to force USB mass storage 212 | # 0x4A0000e4: is a storage type: SD card 213 | sunxi-tools/sunxi-fel -v spl boot/pine64/fes1-pine64-pinebook.bin 214 | sunxi-tools/sunxi-fel write-with-progress 0x4A000000 boot/pine64/u-boot-pine64-sopine.bin \ 215 | writel 0x4A0000e0 0x55 \ 216 | writel 0x4A0000e4 0x2 \ 217 | exe 0x4A000000 218 | 219 | .PHONY: pine64_ums 220 | pine64_ums: sunxi-tools 221 | # 0x4A0000e0: is a work mode: the 0x55 is a special work mode used to force USB mass storage 222 | # 0x4A0000e4: is a storage type: SD card 223 | sunxi-tools/sunxi-fel -v spl boot/pine64/fes1-pine64-plus.bin 224 | sunxi-tools/sunxi-fel write-with-progress 0x4A000000 boot/pine64/u-boot-pine64-plus.bin \ 225 | writel 0x4A0000e0 0x55 \ 226 | writel 0x4A0000e4 0x0 \ 227 | exe 0x4A000000 228 | 229 | boot/pine64: 230 | mkdir -p boot/pine64 231 | 232 | boot/pine64/sun50i-a64-%.dtb: build/%-linux.dtb 233 | cp $< $@ 234 | 235 | boot/pine64/fes1-%.bin: build/fes1-%.bin 236 | cp $< $@ 237 | 238 | boot/pine64/boot0-%.bin: build/boot0-%.bin 239 | cp $< $@ 240 | 241 | boot/pine64/u-boot-%.bin: build/u-boot-sun50iw1p1-secure-with-%-dtb.bin 242 | cp $< $@ 243 | 244 | boot/pine64/u-boot-%.bin: build/u-boot-sun50iw1p1-secure-with-%-dtb.bin 245 | cp $< $@ 246 | 247 | boot/boot.scr: blobs/boot.cmd 248 | mkimage -C none -A arm -T script -d $< $@ 249 | 250 | boot/uEnv.txt: blobs/uEnv.txt 251 | cp $< $@ 252 | 253 | boot/boot.cmd: blobs/boot.cmd 254 | cp $< $@ 255 | 256 | .PHONY: pine64_write 257 | pine64_write: boot build/boot0-pine64.bin build/u-boot-sun50iw1p1-secure-with-pine64-dtb.bin 258 | @if [[ -z "$(DISK)" ]]; then echo "Missing DISK, use: make pine64_write DISK=/dev/diskX"; exit 1; fi 259 | -sudo umount $(DISK)* 260 | sudo dd conv=notrunc bs=1k seek=8 of="$(DISK)" if=build/boot0-pine64.bin 261 | sudo dd conv=notrunc bs=1k seek=19096 of="$(DISK)" if=build/u-boot-sun50iw1p1-secure-with-pine64-dtb.bin 262 | cd boot/ && sudo mcopy -n -v -s -m -i $(DISK)?1 * :: 263 | 264 | .PHONY: pinebook_write 265 | pinebook_write: boot build/boot0-pinebook.bin build/u-boot-sun50iw1p1-secure-with-pinebook-dtb.bin 266 | @if [ -z "$(DISK)" ]; then echo "Missing DISK, use: make pinebook_write DISK=/dev/diskX"; exit 1; fi 267 | -sudo umount $(DISK)* 268 | sudo dd conv=notrunc bs=1k seek=8 of="$(DISK)" if=build/boot0-pinebook.bin 269 | sudo dd conv=notrunc bs=1k seek=19096 of="$(DISK)" if=build/u-boot-sun50iw1p1-secure-with-pinebook-dtb.bin 270 | cd boot/ && sudo mcopy -n -v -s -m -i $(DISK)?1 * :: 271 | 272 | .PHONY: clean 273 | clean: 274 | rm -r -f build/* \ 275 | arm-trusted-firmware-pine64 \ 276 | u-boot-pine64 \ 277 | sunxi-pack-tools \ 278 | linux 279 | 280 | .PHONY: compile_linux_kernel 281 | compile_linux_kernel: linux/.config 282 | # Compiling... 283 | make -C linux ARCH=arm64 CROSS_COMPILE="ccache aarch64-linux-gnu-" -j4 Image 284 | 285 | .PHONY: compile_linux_modules 286 | compile_linux_modules: linux/.config 287 | # Compiling... 288 | make -C linux ARCH=arm64 CROSS_COMPILE="ccache aarch64-linux-gnu-" -j4 modules 289 | make -C linux LOCALVERSION=$(LINUX_LOCALVERSION) M=modules/gpu/mali400/kernel_mode/driver/src/devicedrv/mali \ 290 | ARCH=arm64 CROSS_COMPILE="ccache aarch64-linux-gnu-" \ 291 | CONFIG_MALI400=m CONFIG_MALI450=y CONFIG_MALI400_PROFILING=y \ 292 | CONFIG_MALI_DMA_BUF_MAP_ON_ATTACH=y CONFIG_MALI_DT=y \ 293 | EXTRA_DEFINES="-DCONFIG_MALI400=1 -DCONFIG_MALI450=1 -DCONFIG_MALI400_PROFILING=1 -DCONFIG_MALI_DMA_BUF_MAP_ON_ATTACH -DCONFIG_MALI_DT" 294 | 295 | # Installing modules... 296 | make -C linux ARCH=arm64 CROSS_COMPILE="ccache aarch64-linux-gnu-" -j4 modules_install INSTALL_MOD_PATH=$(CURDIR)/linux_modules_install/ 297 | make -C linux LOCALVERSION=$(LINUX_LOCALVERSION) M=modules/gpu/mali400/kernel_mode/driver/src/devicedrv/mali \ 298 | ARCH=arm64 CROSS_COMPILE="ccache aarch64-linux-gnu-" \ 299 | CONFIG_MALI400=m CONFIG_MALI450=y CONFIG_MALI400_PROFILING=y \ 300 | CONFIG_MALI_DMA_BUF_MAP_ON_ATTACH=y CONFIG_MALI_DT=y \ 301 | EXTRA_DEFINES="-DCONFIG_MALI400=1 -DCONFIG_MALI450=1 -DCONFIG_MALI400_PROFILING=1 -DCONFIG_MALI_DMA_BUF_MAP_ON_ATTACH -DCONFIG_MALI_DT" \ 302 | modules_install INSTALL_MOD_PATH=$(CURDIR)/linux_modules_install/ 303 | 304 | .PHONY: update_kernel 305 | update_kernel: all compile_linux_kernel 306 | make upload_to_host 307 | 308 | .PHONY: update_kernel_and_modules 309 | update_kernel_and_modules: all compile_linux_kernel compile_linux_modules 310 | make upload_to_host 311 | 312 | .PHONY: upload_to_host 313 | upload_to_host: all 314 | ifneq ($(UPDATE_ANDROID),) 315 | mkdir -p android_system_install/system/vendor/modules 316 | find linux_modules_install/ -name '*.ko' -exec cp -u {} android_system_install/system/vendor/modules/ \; 317 | adb remount 318 | adb push linux/arch/arm64/boot/Image /bootloader/kernel 319 | export ANDROID_PRODUCT_OUT="$(CURDIR)/android_system_install" && adb sync system 320 | else 321 | # Syncing... 322 | rsync --partial --checksum -rv linux/arch/arm64/boot/Image root@$(REMOTE_HOST):$(DESTDIR)/boot/kernel 323 | rsync --partial --checksum -av linux_modules_install/lib/ root@$(REMOTE_HOST):$(DESTDIR)/lib 324 | rsync --partial --checksum --exclude="uEnv.txt" -r boot/ root@$(REMOTE_HOST):$(DESTDIR)/boot 325 | ifneq ($(UPDATE_UBOOT),) 326 | dd if=boot/pine64/u-boot-pine64-pinebook.bin bs=1M | ssh root@$(REMOTE_HOST) dd conv=notrunc bs=1k seek=19096 oflag=sync of=/dev/mmcblk0 327 | endif 328 | endif 329 | 330 | update_boot: all 331 | [ -n "$(REMOTE_MODEL)" ] # specify REMOTE_MODEL=sopine|pinebook|plus 332 | [ -n "$(REMOTE_DISK)" ] # specify REMOTE_DISK=0|1 333 | dd if=boot/pine64/boot0-pine64-$(REMOTE_MODEL).bin bs=1M | ssh root@$(REMOTE_HOST) dd conv=notrunc bs=1k seek=8 oflag=sync of=/dev/mmcblk$(REMOTE_DISK) 334 | dd if=boot/pine64/u-boot-pine64-$(REMOTE_MODEL).bin bs=1M | ssh root@$(REMOTE_HOST) dd conv=notrunc bs=1k seek=19096 oflag=sync of=/dev/mmcblk$(REMOTE_DISK) 335 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Pine Boot Tools 2 | 3 | This is simple repository that has scripts and binaries to 4 | aid with booting of Pine A64 and Pinebook. 5 | 6 | This repository is primarily meant to access Pine as USB mass 7 | storage when using USB OTG A-to-A cable. 8 | 9 | This requires for your device to be run in FEL mode. 10 | 11 | ### How to run device in FEL mode? 12 | 13 | For Pine A64 remove SD card, power on device and insert SD card. 14 | 15 | For Pinebook, longpress power button till the power led is ON, 16 | then do a few short presses, each one of about 0.4-0.5s. 17 | After a while device should start in FEL mode. 18 | 19 | ### How to start UMS (USB mass storage mode)? 20 | 21 | ```bash 22 | $ git clone https://github.com/ayufan-pine64/boot-tools.git 23 | $ cd boot-tools 24 | $ make pinebook_ums 25 | or 26 | $ make pine64_ums 27 | ``` 28 | 29 | ### How to recompile everything? 30 | 31 | ```bash 32 | $ sudo apt-get install -y {g++,gcc}-4.9-aarch64-linux-gnu {g++,gcc}-4.7-arm-linux-gnueabihf 33 | $ git clone https://github.com/ayufan-pine64/boot-tools.git 34 | $ cd boot-tools 35 | $ make clean 36 | $ make 37 | ``` 38 | 39 | ### What it contains? 40 | 41 | 1. The modified u-boot to present itself as a USB mass storage device, 42 | 2. The special work mode (0x55) implemented in u-boot that performs storage scan, 43 | and runs special USB mass storage command on boot, 44 | 3. The SPL code that initializes DRAM and allows to run custom made u-boot, 45 | 4. Compiled binary blobs, 46 | 5. The original `boot0's` in `blobs/` and DTS for Pine A64 and Pinebook. 47 | 48 | ### Convert existing images to Pinebook 49 | 50 | Here you can also find a compiled boot0 and u-boot (with included dtb) 51 | which is suitable to be put onto device. 52 | 53 | The Pinebook requires you to put a compiled dtb onto first partition 54 | at `pine64/sun50i-a64-pine64-pinebook.dtb`, 55 | and copying the `boot/` content to the disk. 56 | 57 | ### Author 58 | 59 | Kamil Trzciński, 2017 60 | 61 | ### License 62 | 63 | MIT 64 | -------------------------------------------------------------------------------- /blobs/boot.cmd: -------------------------------------------------------------------------------- 1 | # Adopted from: 2 | # https://github.com/igorpecovnik/lib/blob/master/config/bootscripts/boot-pine64-default.cmd 3 | # https://github.com/longsleep/u-boot-pine64/blob/55c9c8c8ac005b1c00ac948386c60c4a741ebaa9/include/configs/sun50iw1p1.h#L339 4 | 5 | # set_cmdline 6 | setenv bootargs "console=${console} enforcing=${enforcing} cma=${cma} ${optargs} androidboot.serialno=${sunxi_serial} androidboot.hardware=${hardware} androidboot.selinux=${selinux} earlyprintk=sunxi-uart,0x01c28000 loglevel=8 root=${root} eth0_speed=${eth0_speed}" 7 | 8 | run load_dtb 9 | 10 | # set display resolution from uEnv.txt or other environment file 11 | # default to 1080p30 12 | if test "${hdmi_mode}" = "480i"; then setenv fdt_hdmi_mode "<0x00000000>" 13 | elif test "${hdmi_mode}" = "576i"; then setenv fdt_hdmi_mode "<0x00000001>" 14 | elif test "${hdmi_mode}" = "480p"; then setenv fdt_hdmi_mode "<0x00000002>" 15 | elif test "${hdmi_mode}" = "576p"; then setenv fdt_hdmi_mode "<0x00000003>" 16 | elif test "${hdmi_mode}" = "720p50"; then setenv fdt_hdmi_mode "<0x00000004>" 17 | elif test "${hdmi_mode}" = "720p60"; then setenv fdt_hdmi_mode "<0x00000005>" 18 | elif test "${hdmi_mode}" = "1080i50"; then setenv fdt_hdmi_mode "<0x00000006>" 19 | elif test "${hdmi_mode}" = "1080i60"; then setenv fdt_hdmi_mode "<0x00000007>" 20 | elif test "${hdmi_mode}" = "1080p24"; then setenv fdt_hdmi_mode "<0x00000008>" 21 | elif test "${hdmi_mode}" = "1080p50"; then setenv fdt_hdmi_mode "<0x00000009>" 22 | elif test "${hdmi_mode}" = "1080p60"; then setenv fdt_hdmi_mode "<0x0000000a>" 23 | elif test "${hdmi_mode}" = "2160p30"; then setenv fdt_hdmi_mode "<0x0000001c>" 24 | elif test "${hdmi_mode}" = "2160p25"; then setenv fdt_hdmi_mode "<0x0000001d>" 25 | elif test "${hdmi_mode}" = "2160p24"; then setenv fdt_hdmi_mode "<0x0000001e>" 26 | elif test "${hdmi_mode}" = "800x480p"; then setenv fdt_hdmi_mode "<0x0000001f>" 27 | elif test "${hdmi_mode}" = "1024x600p"; then setenv fdt_hdmi_mode "<0x00000020>" 28 | else setenv fdt_hdmi_mode "<0x0000000a>" 29 | fi 30 | 31 | if test "${fdt_hdmi_mode}" != ""; then 32 | echo "HDMI mode: ${fdt_hdmi_mode}" 33 | fdt set /soc@01c00000/boot_disp output_mode "<0x00000000>" 34 | fdt set /soc@01c00000/disp@01000000 screen0_output_mode "${fdt_hdmi_mode}" 35 | fdt set /soc@01c00000/disp@01000000 screen1_output_mode "${fdt_hdmi_mode}" 36 | fi 37 | 38 | # set display for screen0 39 | if test "${disp_screen0}" = "lcd"; then 40 | echo "Using LCD for main screen" 41 | fdt set /soc@01c00000/disp@01000000 screen0_output_type "<0x00000001>" 42 | fdt set /soc@01c00000/boot_disp output_mode "<0x00000000>" 43 | 44 | # enable LCD screen 45 | fdt set /soc@01c00000/lcd0@01c0c000 status "okay" 46 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_used "<0x00000001>" 47 | 48 | # disable HDMI screen 49 | fdt set /soc@01c00000/hdmi@01ee0000 status "disabled" 50 | 51 | # enable touchpad 52 | fdt set /soc@01c00000/ctp status "okay" 53 | fdt set /soc@01c00000/ctp ctp_used "<0x00000001>" 54 | fdt set /soc@01c00000/ctp ctp_name "gt911_DB2" 55 | elif test "${disp_screen0}" = "hdmi"; then 56 | echo "Using HDMI for main screen" 57 | fdt set /soc@01c00000/boot_disp output_mode "<0x00000000>" 58 | fdt set /soc@01c00000/disp@01000000 screen0_output_type "<0x00000003>" 59 | 60 | # enable HDMI screen 61 | fdt set /soc@01c00000/hdmi@01ee0000 status "okay" 62 | 63 | # disable LCD screen 64 | fdt set /soc@01c00000/lcd0@01c0c000 status "disabled" 65 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_used "<0x00000000>" 66 | fi 67 | 68 | # set display for screen1 69 | if test "${disp_screen1}" = "lcd"; then 70 | echo "Using LCD for secondary screen" 71 | fdt set /soc@01c00000/disp@01000000 screen1_output_type "<0x00000001>" 72 | 73 | # enable LCD screen 74 | fdt set /soc@01c00000/lcd0@01c0c000 status "okay" 75 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_used "<0x00000001>" 76 | 77 | # enable touchpad 78 | fdt set /soc@01c00000/ctp status "okay" 79 | fdt set /soc@01c00000/ctp ctp_used "<0x00000001>" 80 | fdt set /soc@01c00000/ctp ctp_name "gt911_DB2" 81 | elif test "${disp_screen1}" = "hdmi"; then 82 | echo "Using HDMI for secondary screen" 83 | fdt set /soc@01c00000/disp@01000000 screen1_output_type "<0x00000003>" 84 | 85 | # enable HDMI screen 86 | fdt set /soc@01c00000/hdmi@01ee0000 status "okay" 87 | fi 88 | 89 | # set disp_mode 90 | if test "${disp_mode}" = "screen0"; then 91 | echo "Using screen0 as display" 92 | fdt set /soc@01c00000/disp@01000000 disp_mode "<0x00000000>" 93 | elif test "${disp_mode}" = "screen1"; then 94 | echo "Using screen1 as display" 95 | fdt set /soc@01c00000/disp@01000000 disp_mode "<0x00000001>" 96 | elif test "${disp_mode}" = "dualhead"; then 97 | echo "Using screen0 and screen1 as separate displays" 98 | fdt set /soc@01c00000/disp@01000000 disp_mode "<0x00000002>" 99 | elif test "${disp_mode}" = "xinerama"; then 100 | echo "Using screen0 and screen1 as one large screen" 101 | fdt set /soc@01c00000/disp@01000000 disp_mode "<0x00000003>" 102 | elif test "${disp_mode}" = "clone"; then 103 | echo "Clonning screen0 and screen1" 104 | fdt set /soc@01c00000/disp@01000000 disp_mode "<0x00000004>" 105 | elif test "${disp_mode}" = "disabled"; then 106 | echo "Disabling all screens" 107 | fdt set /soc@01c00000/disp@01000000 disp_mode "<0x00000000>" 108 | fdt set /soc@01c00000/hdmi@01ee0000 status "disabled" 109 | fdt set /soc@01c00000/lcd0@01c0c000 status "disabled" 110 | fi 111 | 112 | # HDMI CEC 113 | if test "${hdmi_cec}" = "2"; then 114 | echo "Using experimental HDMI CEC driver" 115 | fdt set /soc@01c00000/hdmi@01ee0000 hdmi_cec_support "<0x00000002>" 116 | else 117 | echo "HDMI CEC is disabled" 118 | fdt set /soc@01c00000/hdmi@01ee0000 hdmi_cec_support "<0x00000000>" 119 | fi 120 | 121 | # Pinebook LCD 122 | if test "${pinebook_lcd_mode}" = "batch1"; then 123 | echo "Fixing LCD parameters to use Pinebook Batch 1" 124 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_dclk_freq "<72>" 125 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_vbp "<20>" 126 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_vt "<860>" 127 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_vspw "<5>" 128 | elif test "${pinebook_lcd_mode}" = "batch2"; then 129 | echo "Fixing LCD parameters to use Pinebook Batch 2" 130 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_dclk_freq "<77>" 131 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_vbp "<7>" 132 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_vt "<790>" 133 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_vspw "<4>" 134 | fi 135 | 136 | # DVI compatibility 137 | if test "${disp_dvi_compat}" = "on"; then 138 | fdt set /soc@01c00000/hdmi@01ee0000 hdmi_hdcp_enable "<0x00000000>" 139 | fdt set /soc@01c00000/hdmi@01ee0000 hdmi_cts_compatibility "<0x00000001>" 140 | fi 141 | 142 | # default, only set status 143 | if test "${camera_type}" = "s5k4ec"; then 144 | fdt set /soc@01c00000/vfe@0/ status "okay" 145 | fdt set /soc@01c00000/vfe@0/dev@0/ status "okay" 146 | fi 147 | 148 | # change name, i2c address and vdd voltage 149 | if test "${camera_type}" = "ov5640"; then 150 | fdt set /soc@01c00000/vfe@0/dev@0/ csi0_dev0_mname "ov5640" 151 | fdt set /soc@01c00000/vfe@0/dev@0/ csi0_dev0_twi_addr "<0x00000078>" 152 | fdt set /soc@01c00000/vfe@0/dev@0/ csi0_dev0_iovdd_vol "<0x001b7740>" 153 | fdt set /soc@01c00000/vfe@0/ status "okay" 154 | fdt set /soc@01c00000/vfe@0/dev@0/ status "okay" 155 | fi 156 | 157 | # set otg mode 158 | if test "${otg_mode}" = "device"; then 159 | echo "USB-OTG port is in device mode" 160 | fdt set /soc@01c00000/usbc0@0 usb_port_type "<0x00000000>" 161 | elif test "${otg_mode}" = "host"; then 162 | echo "USB-OTG port is in host mode" 163 | fdt set /soc@01c00000/usbc0@0 usb_port_type "<0x00000001>" 164 | elif test "${otg_mode}" = "otg"; then 165 | echo "USB-OTG port is in OTG mode" 166 | fdt set /soc@01c00000/usbc0@0 usb_port_type "<0x00000002>" 167 | fi 168 | 169 | if test "${emmc_compat}" = "on"; then 170 | echo "Enabling eMMC compatibility mode (Use SDR)..." 171 | fdt rm /soc@01c00000/sdmmc@01C11000 mmc-ddr-1_8v; 172 | fdt rm /soc@01c00000/sdmmc@01C11000 mmc-hs200-1_8v; 173 | fdt rm /soc@01c00000/sdmmc@01C11000 mmc-hs400-1_8v; 174 | elif test "${emmc_compat}" = "150mhz"; then 175 | echo "Enabling eMMC HS200 150MHz mode..." 176 | fdt set /soc@01c00000/sdmmc@01C11000 max-frequency "<0x8F0D180>"; 177 | elif test "${emmc_compat}" = "200mhz"; then 178 | echo "Enabling eMMC HS200 200MHz mode..." 179 | fdt set /soc@01c00000/sdmmc@01C11000 max-frequency "<0xBEBC200>"; 180 | fi 181 | 182 | # Execute user command 183 | if test "${user_cmd}" != ""; then 184 | echo "Executing ${user_cmd}..." 185 | run user_cmd 186 | fi 187 | 188 | if test "${boot_part}" = ""; then 189 | setenv boot_part "0:1" 190 | fi 191 | 192 | # Re-order SD or eMMC to always be a first device when booting 193 | if test "${boot_part}" = "0:1"; then 194 | echo "Booting from SD so moving eMMC definition..." 195 | fdt resize 196 | fdt dup /soc@01c00000/ sdmmc@01C11000 sdmmc@01C11001 197 | fdt rm /soc@01c00000/sdmmc@01C11000/ 198 | else 199 | echo "Booting from eMMC so moving SD definition..." 200 | fdt resize 201 | fdt dup /soc@01c00000/ sdmmc@01c0f000 sdmmc@01c0f001 202 | fdt rm /soc@01c00000/sdmmc@01c0f000/ 203 | fi 204 | 205 | if test "${boot_filename}" = ""; then 206 | # boot regular kernel 207 | if fatload mmc ${boot_part} ${initrd_addr} recovery.txt; then 208 | echo Using recovery... 209 | setenv initrd_filename "${recovery_initrd_filename}" 210 | fi 211 | echo "Loading kernel and initrd..." 212 | run load_kernel load_initrd boot_kernel 213 | else 214 | # check if recovery.txt is created and load recovery image 215 | if fatload mmc ${boot_part} ${initrd_addr} recovery.txt; then 216 | echo Loading recovery... 217 | fatload mmc ${boot_part} ${initrd_addr} ${recovery_filename} 218 | else 219 | echo Loading normal boot... 220 | fatload mmc ${boot_part} ${initrd_addr} ${boot_filename} 221 | fi 222 | 223 | # boot android image 224 | boota ${initrd_addr} 225 | fi 226 | -------------------------------------------------------------------------------- /blobs/boot0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/blobs/boot0.bin -------------------------------------------------------------------------------- /blobs/scp.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/blobs/scp.bin -------------------------------------------------------------------------------- /blobs/sys_config_pine64-plus.fex: -------------------------------------------------------------------------------- 1 | ;A64 PAD application 2 | ;--------------------------------------------------------------------------------------------------------- 3 | ; 说明: 脚本中的字符串区分大小写,用户可以修改"="后面的数值,但是不要修改前面的字符串 4 | ; 描述gpio的形式:Port:端口+组内序号<功能分配><内部电阻状态><驱动能力><输出电平状态> 5 | ;--------------------------------------------------------------------------------------------------------- 6 | 7 | [product] 8 | version = "100" 9 | machine = "pine64-plus" 10 | 11 | ;--------------------------------------------------------------------------------------------------------- 12 | ; eraseflag - 1 erase data partition, 0 - do not erase data partition 13 | ; next_work - action after burn, 0x0 by config, 0x1 normal, 0x2 reboot, 0x3 shutdown,0x4 reupdate ,0x5 boot 14 | ; debug_mode = 0 : do not print any message,debug_mode = 1 ,print debug message 15 | ;--------------------------------------------------------------------------------------------------------- 16 | [platform] 17 | eraseflag = 1 18 | 19 | ;--------------------------------------------------------------------------------------------------------- 20 | ; dragonboard_test default is 0,only in dragonboard card boot mode must be set 1 21 | ; If you modified dragonboard_test flag,before you pack imgage, you must be build kernel again. 22 | ;--------------------------------------------------------------------------------------------------------- 23 | [target] 24 | boot_clock = 1008 25 | storage_type = -1 26 | burn_key = 0 27 | 28 | ;---------------------------------------------------------------------------------- 29 | ; system configuration 30 | ; ? 31 | ;dcdc1_vol ---set dcdc1 voltage,mV,1600-3400,100mV/step 32 | ;dcdc2_vol ---set dcdc2 voltage,mV,600-1540,20mV/step 33 | ;dcdc3_vol ---set dcdc3 voltage,mV,600-1860,20mV/step 34 | ;dcdc4_vol ---set dcdc4 voltage,mV,600-1540,20mV/step 35 | ;dcdc5_vol ---set dcdc5 voltage,mV,1000-2550,50mV/step 36 | ;aldo2_vol ---set aldo2 voltage,mV,700-3300,100mV/step 37 | ;aldo3_vol ---set aldo3 voltage,mV,700-3300,100mV/step 38 | ;---------------------------------------------------------------------------------- 39 | [power_sply] 40 | dcdc1_vol = 1003300 41 | dcdc2_vol = 1001100 42 | dcdc6_vol = 1001100 43 | aldo1_vol = 2800 44 | aldo2_vol = 1001800 45 | aldo3_vol = 1003000 46 | dldo1_vol = 3300 47 | dldo2_vol = 3300 48 | dldo3_vol = 2800 49 | dldo4_vol = 1003300 50 | eldo1_vol = 1001800 51 | eldo2_vol = 1800 52 | eldo3_vol = 1800 53 | fldo1_vol = 1200 54 | fldo2_vol = 1001100 55 | gpio0_vol = 3100 56 | 57 | [card_boot] 58 | logical_start = 40960 59 | sprite_gpio0 = 60 | 61 | ;--------------------------------------------------------------------------------------------------------- 62 | ; if 1 == standby_mode, then support super standby; 63 | ; else, support normal standby. 64 | ;--------------------------------------------------------------------------------------------------------- 65 | [pm_para] 66 | standby_mode = 1 67 | 68 | [card0_boot_para] 69 | card_ctrl = 0 70 | card_high_speed = 1 71 | card_line = 4 72 | sdc_d1 = port:PF0<2><1><2> 73 | sdc_d0 = port:PF1<2><1><2> 74 | sdc_clk = port:PF2<2><1><2> 75 | sdc_cmd = port:PF3<2><1><2> 76 | sdc_d3 = port:PF4<2><1><2> 77 | sdc_d2 = port:PF5<2><1><2> 78 | 79 | [card2_boot_para] 80 | sdc_io_1v8 = 1 81 | card_ctrl = 2 82 | card_high_speed = 1 83 | card_line = 8 84 | sdc_ds = port:PC1<3><1><3> 85 | sdc_clk = port:PC5<3><1><3> 86 | sdc_cmd = port:PC6<3><1><3> 87 | sdc_d0 = port:PC8<3><1><3> 88 | sdc_d1 = port:PC9<3><1><3> 89 | sdc_d2 = port:PC10<3><1><3> 90 | sdc_d3 = port:PC11<3><1><3> 91 | sdc_d4 = port:PC12<3><1><3> 92 | sdc_d5 = port:PC13<3><1><3> 93 | sdc_d6 = port:PC14<3><1><3> 94 | sdc_d7 = port:PC15<3><1><3> 95 | sdc_emmc_rst = port:PC16<3><1><3> 96 | sdc_ex_dly_used = 2 97 | 98 | [twi_para] 99 | twi_port = 0 100 | twi_scl = port:PH0<2> 101 | twi_sda = port:PH1<2> 102 | 103 | [uart_para] 104 | uart_debug_port = 0 105 | uart_debug_tx = port:PB8<4><1> 106 | uart_debug_rx = port:PB9<4><1> 107 | 108 | [jtag_para] 109 | jtag_enable = 0 110 | jtag_ms = port:PB0<4> 111 | jtag_ck = port:PB1<4> 112 | jtag_do = port:PB2<4> 113 | jtag_di = port:PB3<4> 114 | 115 | [clock] 116 | pll4 = 300 117 | pll6 = 600 118 | pll8 = 360 119 | pll9 = 297 120 | pll10 = 264 121 | 122 | ;***************************************************************************** 123 | ;sdram configuration 124 | ; 125 | ;***************************************************************************** 126 | [dram_para] 127 | ; params for double face 128 | dram_clk = 672 129 | dram_type = 3 130 | dram_zq = 0x3b3bdd 131 | dram_odt_en = 0x1 132 | dram_para1 = 0x10E410E4 133 | dram_para2 = 0x1000 134 | dram_mr0 = 0x1840 135 | dram_mr1 = 0x40 136 | dram_mr2 = 0x18 137 | dram_mr3 = 0x2 138 | dram_tpr0 = 0x004A2195 139 | dram_tpr1 = 0x02424190 140 | dram_tpr2 = 0x0008B060 141 | dram_tpr3 = 0x050005dc 142 | dram_tpr4 = 0x0 143 | dram_tpr5 = 0x0 144 | dram_tpr6 = 0x0 145 | dram_tpr7 = 0x2a066198 146 | dram_tpr8 = 0x0 147 | dram_tpr9 = 0x0 148 | dram_tpr10 = 0x8808 149 | dram_tpr11 = 0x40a60066 150 | dram_tpr12 = 0x55550000 151 | dram_tpr13 = 0x04000900 152 | 153 | ;---------------------------------------------------------------------------------- 154 | ;os life cycle para configuration 155 | ;---------------------------------------------------------------------------------- 156 | 157 | ;------------------------------------------------------------------------------; 158 | ; 10/100/100Mbps Ethernet MAC Controller Configure ; 159 | ;------------------------------------------------------------------------------; 160 | ; 配置选项: ; 161 | ; gmac_used --- 1: gmac used, 0: not used ; 162 | ;------------------------------------------------------------------------------; 163 | ; MII GMII RGMII MII GMII RGMII MII GMII RGMII ; 164 | ;PA00~03 * * * PA10 * * PA20 * * * ; 165 | ; PA04 * PA11~14 * * * PA21 * * ; 166 | ; PA05 * PA15 * PA22 * * ; 167 | ; PA06 * PA16 * PA23 * * ; 168 | ; PA07 * PA17 * PA24 * * ; 169 | ; PA08 * * PA18 * PA25 * * ; 170 | ; PA09 * * * PA19 * * * PA26~27 * * * ; 171 | ;------------------------------------------------------------------------------; 172 | [gmac0] 173 | gmac0_used = 1 174 | 175 | gmac_txd0 = port:PD18<4> 176 | gmac_txd1 = port:PD17<4> 177 | gmac_txd2 = port:PD16<4> 178 | gmac_txd3 = port:PD15<4> 179 | ;gmac_txd4 = port:PA04<2> 180 | ;gmac_txd5 = port:PA05<2> 181 | ;gmac_txd6 = port:PA06<2> 182 | ;gmac_txd7 = port:PA07<2> 183 | ;gmac_txclk = port:PA08<2> 184 | gmac_txen = port:PD20<4> 185 | gmac_gtxclk = port:PD19<4> 186 | 187 | gmac_rxd0 = port:PD11<4> 188 | gmac_rxd1 = port:PD10<4> 189 | gmac_rxd2 = port:PD09<4> 190 | gmac_rxd3 = port:PD08<4> 191 | ;gmac_rxd4 = port:PA15<2> 192 | ;gmac_rxd5 = port:PA16<2> 193 | ;gmac_rxd6 = port:PA17<2> 194 | ;gmac_rxd7 = port:PA18<2> 195 | gmac_rxdv = port:PD13<4> 196 | gmac_rxclk = port:PD12<4> 197 | 198 | ;gmac_txerr = port:PA21<2> 199 | ;gmac_rxerr = port:PA22<2> 200 | ;gmac_col = port:PA23<2> 201 | ;gmac_crs = port:PA24<2> 202 | gmac_clkin = port:PD21<4> 203 | 204 | gmac_mdc = port:PD22<4> 205 | gmac_mdio = port:PD23<4> 206 | 207 | gmac_power1 = "axp81x_dc1sw:0" 208 | gmac_power2 = "" 209 | gmac_power3 = "" 210 | 211 | tx-delay = 2 212 | rx-delay = 2 213 | 214 | 215 | ;---------------------------------------------------------------------------------- 216 | ;i2c configuration 217 | ;---------------------------------------------------------------------------------- 218 | [twi0] 219 | twi0_used = 1 220 | twi0_scl = port:PH0<2> 221 | twi0_sda = port:PH1<2> 222 | 223 | [twi1] 224 | twi1_used = 1 225 | twi1_scl = port:PH2<2> 226 | twi1_sda = port:PH3<2> 227 | 228 | [twi2] 229 | twi2_used = 0 230 | twi2_scl = port:PE14<3> 231 | twi2_sda = port:PE15<3> 232 | 233 | ;---------------------------------------------------------------------------------- 234 | ;TWI device configuration 235 | ;compatible --- device name 236 | ;reg --- device address 237 | ;---------------------------------------------------------------------------------- 238 | ;[twi0/twi_board0] 239 | ;compatible = 240 | ;reg = 241 | 242 | ;---------------------------------------------------------------------------------- 243 | ;uart configuration 244 | ;uart_port --- x (/dev/ttySx, x=0,1,2,...) 245 | ;uart_type --- 2 (2 wire), 4 (4 wire), 8 (8 wire, full function) 246 | ;---------------------------------------------------------------------------------- 247 | [uart0] 248 | uart0_used = 1 249 | uart0_port = 0 250 | uart0_type = 2 251 | uart0_tx = port:PB8<4><1> 252 | uart0_rx = port:PB9<4><1> 253 | 254 | [uart1] 255 | uart1_used = 1 256 | uart1_port = 1 257 | uart1_type = 4 258 | uart1_tx = port:PG6<2><1> 259 | uart1_rx = port:PG7<2><1> 260 | uart1_rts = port:PG8<2><1> 261 | uart1_cts = port:PG9<2><1> 262 | 263 | [uart2] 264 | uart2_used = 1 265 | uart2_port = 2 266 | uart2_type = 4 267 | uart2_tx = port:PB0<2><1> 268 | uart2_rx = port:PB1<2><1> 269 | uart2_rts = port:PB2<2><1> 270 | uart2_cts = port:PB3<2><1> 271 | 272 | [uart3] 273 | uart3_used = 1 274 | uart3_port = 3 275 | uart3_type = 4 276 | uart3_tx = port:PH4<2><1> 277 | uart3_rx = port:PH5<2><1> 278 | uart3_rts = port:PH6<2><1> 279 | uart3_cts = port:PH7<2><1> 280 | 281 | [uart4] 282 | uart4_used = 1 283 | uart4_port = 4 284 | uart4_type = 4 285 | uart4_tx = port:PD2<3><1> 286 | uart4_rx = port:PD3<3><1> 287 | uart4_rts = port:PD4<3><1> 288 | uart4_cts = port:PD5<3><1> 289 | 290 | ;---------------------------------------------------------------------------------- 291 | ;SPI controller configuration 292 | ;---------------------------------------------------------------------------------- 293 | [spi0] 294 | spi0_used = 0 295 | spi0_cs_number = 1 296 | spi0_cs_bitmap = 1 297 | spi0_cs0 = port:PC3<4><1> 298 | spi0_sclk = port:PC2<4> 299 | spi0_mosi = port:PC0<4> 300 | spi0_miso = port:PC1<4> 301 | 302 | [spi1] 303 | spi1_used = 0 304 | spi1_cs_number = 1 305 | spi1_cs_bitmap = 1 306 | spi1_cs0 = port:PD0<4><1> 307 | spi1_sclk = port:PD1<4> 308 | spi1_mosi = port:PD2<4> 309 | spi1_miso = port:PD3<4> 310 | 311 | ;---------------------------------------------------------------------------------- 312 | ;SPI device configuration 313 | ;compatible --- device name 314 | ;spi-max-frequency --- work frequency 315 | ;reg --- chip select 316 | ;optional properties: spi-cpha, spi-cpol, spi-cs-high 317 | ;---------------------------------------------------------------------------------- 318 | ;[spi0/spi_board0] 319 | ;compatible = 320 | ;spi-max-frequency = 321 | ;reg = 322 | ;spi-cpha 323 | ;spi-cpol 324 | ;spi-cs-high 325 | 326 | ;---------------------------------------------------------------------------------- 327 | ;resistance tp configuration 328 | ;---------------------------------------------------------------------------------- 329 | [rtp_para] 330 | rtp_used = 0 331 | rtp_screen_size = 5 332 | rtp_regidity_level = 5 333 | rtp_press_threshold_enable = 0 334 | rtp_press_threshold = 0x1f40 335 | rtp_sensitive_level = 0xf 336 | rtp_exchange_x_y_flag = 0 337 | 338 | ;---------------------------------------------------------------------------------- 339 | ;capacitor tp configuration 340 | ;external int function 341 | ;wakeup output function 342 | ;notice --- tp_int_port & tp_io_port use the same port 343 | ;---------------------------------------------------------------------------------- 344 | [ctp] 345 | compatible = "allwinner,sun50i-ctp-para" 346 | ctp_used = 1 347 | ctp_name = "gt911_DB2" 348 | ctp_twi_id = 0 349 | ctp_twi_addr = 0x40 350 | ctp_screen_max_x = 1024 351 | ctp_screen_max_y = 600 352 | ctp_revert_x_flag = 1 353 | ctp_revert_y_flag = 1 354 | ctp_exchange_x_y_flag = 0 355 | 356 | ctp_int_port = port:PH04<6> 357 | ctp_wakeup = port:PH11<1><1> 358 | ctp_power_ldo = "vcc-ctp" 359 | ctp_power_ldo_vol = 3300 360 | ctp_power_io = 361 | 362 | ;-------------------------------------------------------------------------------- 363 | ; CTP automatic detection configuration 364 | ;ctp_detect_used --- Whether startup automatic inspection function. 1:used,0:unused 365 | ;Module name postposition 1 said detection, 0 means no detection. 366 | ;-------------------------------------------------------------------------------- 367 | [ctp_list] 368 | compatible = "allwinner,sun50i-ctp-list" 369 | ctp_list_used = 1 370 | 371 | gslX680new = 1 372 | gt9xx_ts = 0 373 | gt9xxf_ts = 1 374 | gt9xxnew_ts = 0 375 | gt82x = 1 376 | zet622x = 1 377 | aw5306_ts = 1 378 | 379 | ;---------------------------------------------------------------------------------- 380 | ;touch key configuration 381 | ;---------------------------------------------------------------------------------- 382 | [tkey_para] 383 | tkey_used = 0 384 | tkey_twi_id = 385 | tkey_twi_addr = 386 | tkey_int = 387 | 388 | ;---------------------------------------------------------------------------------- 389 | ;motor configuration 390 | ;---------------------------------------------------------------------------------- 391 | [motor_para] 392 | motor_used = 0 393 | motor_shake = port:power3<1><1> 394 | 395 | [nand0_para] 396 | nand0_support_2ch = 0 397 | 398 | nand0_used = 1 399 | nand0_we = port:PC00<2><0><1> 400 | nand0_ale = port:PC01<2><0><1> 401 | nand0_cle = port:PC02<2><0><1> 402 | nand0_ce1 = port:PC03<2><1><1> 403 | nand0_ce0 = port:PC04<2><1><1> 404 | nand0_nre = port:PC05<2><0><1> 405 | nand0_rb0 = port:PC06<2><1><1> 406 | nand0_rb1 = port:PC07<2><1><1> 407 | nand0_d0 = port:PC08<2><0><1> 408 | nand0_d1 = port:PC09<2><0><1> 409 | nand0_d2 = port:PC10<2><0><1> 410 | nand0_d3 = port:PC11<2><0><1> 411 | nand0_d4 = port:PC12<2><0><1> 412 | nand0_d5 = port:PC13<2><0><1> 413 | nand0_d6 = port:PC14<2><0><1> 414 | nand0_d7 = port:PC15<2><0><1> 415 | nand0_ndqs = port:PC16<2><0><1> 416 | nand0_ce2 = port:PC17<2><1><1> 417 | nand0_ce3 = port:PC18<2><1><1> 418 | 419 | nand0_regulator1 = "vcc-nand" 420 | nand0_regulator2 = "none" 421 | nand0_cache_level = 0x55aaaa55 422 | nand0_flush_cache_num = 0x55aaaa55 423 | nand0_capacity_level = 0x55aaaa55 424 | nand0_id_number_ctl = 0x55aaaa55 425 | nand0_print_level = 0x55aaaa55 426 | nand0_p0 = 0x55aaaa55 427 | nand0_p1 = 0x55aaaa55 428 | nand0_p2 = 0x55aaaa55 429 | nand0_p3 = 0x55aaaa55 430 | 431 | ;---------------------------------------------------------------------------------- 432 | ;disp init configuration 433 | ; 434 | ;disp_mode (0:screen0) 435 | ;screenx_output_type (0:none; 1:lcd; 3:hdmi;) 436 | ;screenx_output_mode (used for hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50) 437 | ; (5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60) 438 | ;fbx format (0:ARGB 1:ABGR 2:RGBA 3:BGRA 5:RGB565 8:RGB888 12:ARGB4444 16:ARGB1555 18:RGBA5551) 439 | ;fbx_width,fbx_height (framebuffer horizontal/vertical pixels, fix to output resolution while equal 0) 440 | ;---------------------------------------------------------------------------------- 441 | [disp] 442 | disp_init_enable = 1 443 | disp_mode = 0 444 | 445 | screen0_output_type = 3 446 | screen0_output_mode = 5 447 | 448 | screen1_output_type = 1 449 | screen1_output_mode = 5 450 | 451 | fb0_format = 0 452 | fb0_width = 0 453 | fb0_height = 0 454 | 455 | fb1_format = 0 456 | fb1_width = 0 457 | fb1_height = 0 458 | 459 | ;---------------------------------------------------------------------------------- 460 | ;lcd0 configuration 461 | 462 | ;lcd_if: 0:hv(sync+de); 1:8080; 2:ttl; 3:lvds; 4:dsi; 5:edp 463 | ;lcd_backlight lcd init backlight 464 | ;lcd_x: lcd horizontal resolution 465 | ;lcd_y: lcd vertical resolution 466 | ;lcd_width: width of lcd in mm 467 | ;lcd_height: height of lcd in mm 468 | ;lcd_dclk_freq: in MHZ unit 469 | ;lcd_pwm_freq: in HZ unit 470 | ;lcd_pwm_pol: lcd backlight PWM polarity 471 | ;lcd_pwm_max_limit lcd backlight PWM max limit(<=255) 472 | ;lcd_hbp: hsync back porch 473 | ;lcd_ht: hsync total cycle 474 | ;lcd_vbp: vsync back porch 475 | ;lcd_vt: vysnc total cycle 476 | ;lcd_hspw: hsync plus width 477 | ;lcd_vspw: vysnc plus width 478 | ;lcd_lvds_if: 0:single link; 1:dual link 479 | ;lcd_lvds_colordepth: 0:8bit; 1:6bit 480 | ;lcd_lvds_mode: 0:NS mode; 1:JEIDA mode 481 | ;lcd_frm: 0:disable; 1:enable rgb666 dither; 2:enable rgb656 dither 482 | ;lcd_hv_clk_phase lcd hv panel lock phase, 0:0 degree; 1:90 degree; 2: 180 degree; 3: 270 degree 483 | ;lcd_hv_sync_polarity lcd hv panel sync signals polarity 484 | ; 0:vsync active low, hsync active low; 1:vsync active high, hsync active low 485 | ; 2:vsync active low, hsync active high; 3:vsync active high, hsync active high 486 | ;lcd_gamma_en lcd gamma correction enable 487 | ;lcd_bright_curve_en lcd bright curve correction enable 488 | ;lcd_cmap_en lcd color map function enable 489 | ;---------------------------------------------------------------------------------- 490 | [lcd0] 491 | lcd_used = 0 492 | 493 | lcd_driver_name = "mb709_mipi" 494 | lcd_backlight = 50 495 | lcd_if = 4 496 | lcd_x = 1024 497 | lcd_y = 600 498 | lcd_width = 0 499 | lcd_height = 0 500 | lcd_dclk_freq = 55 501 | lcd_pwm_used = 1 502 | lcd_pwm_ch = 16 503 | lcd_pwm_freq = 50000 504 | lcd_pwm_pol = 1 505 | lcd_pwm_max_limit = 250 506 | lcd_hbp = 120 507 | lcd_ht = 1540 508 | lcd_hspw = 20 509 | 510 | lcd_vbp = 23 511 | lcd_vt = 635 512 | lcd_vspw = 2 513 | 514 | lcd_dsi_if = 2 515 | lcd_dsi_lane = 4 516 | lcd_dsi_format = 0 517 | lcd_dsi_eotp = 0 518 | lcd_dsi_vc = 0 519 | lcd_dsi_te = 0 520 | lcd_frm = 0 521 | lcd_gamma_en = 0 522 | lcd_bright_curve_en = 0 523 | lcd_cmap_en = 0 524 | 525 | lcd_bl_en = port:PH10<1><0><1> 526 | lcd_bl_en_power = "none" 527 | lcd_power = "vcc-mipi" 528 | lcd_fix_power = "vcc-dsi-33" 529 | lcd_gpio_0 = port:PD24<1><0><1> 530 | 531 | ;lcdd0 = port:PD12<3><0> 532 | ;lcdd1 = port:PD13<3><0> 533 | ;lcdd2 = port:PD14<3><0> 534 | ;lcdd3 = port:PD15<3><0> 535 | ;lcdd4 = port:PD16<3><0> 536 | ;lcdd5 = port:PD17<3><0> 537 | ;lcdd6 = port:PD18<3><0> 538 | ;lcdd7 = port:PD19<3><0> 539 | ;lcdd8 = port:PD20<3><0> 540 | ;lcdd9 = port:PD21<3><0> 541 | ;lcd_pin_power = "vcc-pd" 542 | 543 | [lcd0_suspend] 544 | ;lcdd0 = port:PD12<7><0> 545 | ;lcdd1 = port:PD13<7><0> 546 | ;lcdd2 = port:PD14<7><0> 547 | ;lcdd3 = port:PD15<7><0> 548 | ;lcdd4 = port:PD16<7><0> 549 | ;lcdd5 = port:PD17<7><0> 550 | ;lcdd6 = port:PD18<7><0> 551 | ;lcdd7 = port:PD19<7><0> 552 | ;lcdd8 = port:PD20<7><0> 553 | ;lcdd9 = port:PD21<7><0> 554 | 555 | [hdmi] 556 | hdmi_used = 1 557 | hdmi_power = "vcc-hdmi-33" 558 | hdmi_hdcp_enable = 0 559 | hdmi_cts_compatibility = 0 560 | 561 | ;---------------------------------------------------------------------------------- 562 | ;pwm config 563 | ;---------------------------------------------------------------------------------- 564 | [pwm0] 565 | pwm_used = 0 566 | pwm_positive = port:PD22<2><0> 567 | 568 | [pwm0_suspend] 569 | pwm_positive = port:PD22<7><0> 570 | 571 | [spwm0] 572 | s_pwm_used = 1 573 | pwm_positive = port:PL10<2><0> 574 | 575 | [spwm0_suspend] 576 | pwm_positive = port:PL10<7><0> 577 | 578 | [boot_disp] 579 | output_disp = 0 580 | output_type = 3 581 | output_mode = 5 582 | 583 | ;-------------------------------------------------------------------------------- 584 | ;csi (COMS Sensor Interface) configuration 585 | ;csi(x)_dev(x)_used: 0:disable 1:enable 586 | ;csi(x)_dev(x)_isp_used 0:not use isp 1:use isp 587 | ;csi(x)_dev(x)_fmt: 0:yuv 1:bayer raw rgb 588 | ;csi(x)_dev(x)_stby_mode: 0:not shut down power at standby 1:shut down power at standby 589 | ;csi(x)_dev(x)_vflip: flip in vertical direction 0:disable 1:enable 590 | ;csi(x)_dev(x)_hflip: flip in horizontal direction 0:disable 1:enable 591 | ;csi(x)_dev(x)_iovdd: camera module io power handle string, pmu power supply 592 | ;csi(x)_dev(x)_iovdd_vol: camera module io power voltage, pmu power supply 593 | ;csi(x)_dev(x)_avdd: camera module analog power handle string, pmu power supply 594 | ;csi(x)_dev(x)_avdd_vol: camera module analog power voltage, pmu power supply 595 | ;csi(x)_dev(x)_dvdd: camera module core power handle string, pmu power supply 596 | ;csi(x)_dev(x)_dvdd_vol: camera module core power voltage, pmu power supply 597 | ;csi(x)_dev(x)_afvdd: camera module vcm power handle string, pmu power supply 598 | ;csi(x)_dev(x)_afvdd_vol: camera module vcm power voltage, pmu power supply 599 | ;fill voltage in uV, e.g. iovdd = 2.8V, csix_iovdd_vol = 2800000 600 | ;fill handle string as below: 601 | ;axp22_eldo3 602 | ;axp22_dldo4 603 | ;axp22_eldo2 604 | ;fill handle string "" when not using any pmu power supply 605 | ;-------------------------------------------------------------------------------- 606 | 607 | [csi0] 608 | csi0_used = 1 609 | csi0_sensor_list = 1 610 | csi0_pck = port:PE00<2> 611 | csi0_mck = port:PE01<0><0><1><0> 612 | csi0_hsync = port:PE02<2> 613 | csi0_vsync = port:PE03<2> 614 | csi0_d0 = port:PE04<2> 615 | csi0_d1 = port:PE05<2> 616 | csi0_d2 = port:PE06<2> 617 | csi0_d3 = port:PE07<2> 618 | csi0_d4 = port:PE08<2> 619 | csi0_d5 = port:PE09<2> 620 | csi0_d6 = port:PE10<2> 621 | csi0_d7 = port:PE11<2> 622 | csi0_sck = port:PE12<2> 623 | csi0_sda = port:PE13<2> 624 | 625 | [csi0/csi0_dev0] 626 | csi0_dev0_used = 1 627 | csi0_dev0_mname = "s5k4ec" 628 | csi0_dev0_twi_addr = 0x5a 629 | csi0_dev0_pos = "rear" 630 | csi0_dev0_isp_used = 1 631 | csi0_dev0_fmt = 0 632 | csi0_dev0_stby_mode = 1 633 | csi0_dev0_vflip = 0 634 | csi0_dev0_hflip = 0 635 | csi0_dev0_iovdd = "iovdd-csi" 636 | csi0_dev0_iovdd_vol = 2800000 637 | csi0_dev0_avdd = "avdd-csi" 638 | csi0_dev0_avdd_vol = 2800000 639 | csi0_dev0_dvdd = "dvdd-csi-18" 640 | csi0_dev0_dvdd_vol = 1500000 641 | csi0_dev0_afvdd = "" 642 | csi0_dev0_afvdd_vol = 643 | csi0_dev0_power_en = 644 | csi0_dev0_reset = port:PE16<0><0><1><0> 645 | csi0_dev0_pwdn = port:PE17<0><0><1><0> 646 | csi0_dev0_flash_used = 0 647 | csi0_dev0_flash_type = 2 648 | csi0_dev0_flash_en = 649 | csi0_dev0_flash_mode = 650 | csi0_dev0_flvdd = "vdd-csi-led" 651 | csi0_dev0_flvdd_vol = 3300000 652 | csi0_dev0_af_pwdn = 653 | csi0_dev0_act_used = 0 654 | csi0_dev0_act_name = "ad5820_act" 655 | csi0_dev0_act_slave = 0x18 656 | 657 | [csi0/csi0_dev1] 658 | csi0_dev1_used = 0 659 | csi0_dev1_mname = "gc2145" 660 | csi0_dev1_twi_addr = 0x78 661 | csi0_dev1_pos = "front" 662 | csi0_dev1_isp_used = 1 663 | csi0_dev1_fmt = 0 664 | csi0_dev1_stby_mode = 1 665 | csi0_dev1_vflip = 0 666 | csi0_dev1_hflip = 0 667 | csi0_dev1_iovdd = "iovdd-csi" 668 | csi0_dev1_iovdd_vol = 2800000 669 | csi0_dev1_avdd = "avdd-csi" 670 | csi0_dev1_avdd_vol = 2800000 671 | csi0_dev1_dvdd = "dvdd-csi-18" 672 | csi0_dev1_dvdd_vol = 1800000 673 | csi0_dev1_afvdd = "" 674 | csi0_dev1_afvdd_vol = 675 | csi0_dev1_power_en = 676 | csi0_dev1_reset = port:PE16<0><0><1><0> 677 | csi0_dev1_pwdn = port:PE17<0><0><1><0> 678 | csi0_dev1_flash_used = 0 679 | csi0_dev1_flash_type = 2 680 | csi0_dev1_flash_en = 681 | csi0_dev1_flash_mode = 682 | csi0_dev1_flvdd = "vdd-csi-led" 683 | csi0_dev1_flvdd_vol = 3300000 684 | csi0_dev1_af_pwdn = 685 | csi0_dev1_act_used = 0 686 | csi0_dev1_act_name = "ad5820_act" 687 | csi0_dev1_act_slave = 0x18 688 | 689 | ;-------------------------------------------------------------------------------- 690 | ;tv configuration 691 | ; 692 | ;-------------------------------------------------------------------------------- 693 | [tvout_para] 694 | tvout_used = 695 | tvout_channel_num = 696 | tv_en = 697 | 698 | [tvin_para] 699 | tvin_used = 700 | tvin_channel_num = 701 | 702 | ; ------------------------------------------------------------------------------| 703 | ; de-interlace configuration 704 | ;-------------------------------------------------------------------------------- 705 | [di] 706 | di_used = 1 707 | 708 | ;-------------------------------------------------------------------------------- 709 | ; SDMMC PINS MAPPING | 710 | ; ------------------------------------------------------------------------------| 711 | ; Config Guide | 712 | ; sdc_used: 1-enable card, 0-disable card | 713 | ; non-removable:if you use as main memory,you should set it,for example eMMC | 714 | ; bus-width: card bus width, 1-1bit, 4-4bit, 8-8bit | 715 | ; sunxi-power-save-mode: if use sdio card,should not set it | 716 | ; vmmc:regulator for card/emmc power | 717 | ; vqmmc:regulator for card/emmc io power | 718 | ; vdmmc:regulator for card detect pin pull up power | 719 | ; other: GPIO Mapping configuration | 720 | ; ------------------------------------------------------------------------------| 721 | ; Note: | 722 | ; | 723 | ; | 724 | ; | 725 | ; | 726 | ; | 727 | ; | 728 | ;-------------------------------------------------------------------------------- 729 | 730 | [sdc0] 731 | sdc0_used = 1 732 | bus-width = 4 733 | sdc0_d1 = port:PF00<2><1><2> 734 | sdc0_d0 = port:PF01<2><1><2> 735 | sdc0_clk = port:PF02<2><1><2> 736 | sdc0_cmd = port:PF03<2><1><2> 737 | sdc0_d3 = port:PF04<2><1><2> 738 | sdc0_d2 = port:PF05<2><1><2> 739 | cd-gpios = port:PF06<0><1><2> 740 | sunxi-power-save-mode = 741 | vmmc = "none" 742 | vqmmc = "none" 743 | vdmmc = "vcc-sdc" 744 | 745 | [sdc1] 746 | sdc1_used = 1 747 | bus-width = 4 748 | sdc1_clk = port:PG00<2><1><3> 749 | sdc1_cmd = port:PG01<2><1><3> 750 | sdc1_d0 = port:PG02<2><1><3> 751 | sdc1_d1 = port:PG03<2><1><3> 752 | sdc1_d2 = port:PG04<2><1><3> 753 | sdc1_d3 = port:PG05<2><1><3> 754 | ;sunxi-power-save-mode = 755 | sd-uhs-sdr50 = 756 | sd-uhs-ddr50 = 757 | sd-uhs-sdr104 = 758 | cap-sdio-irq = 759 | keep-power-in-suspend = 760 | ignore-pm-notify = 761 | max-frequency = 150000000 762 | 763 | 764 | [sdc2] 765 | sdc2_used = 1 766 | non-removable = 767 | bus-width = 8 768 | sdc2_ds = port:PC01<3><1><3> 769 | sdc2_clk = port:PC05<3><1><3> 770 | sdc2_cmd = port:PC06<3><1><3> 771 | sdc2_d0 = port:PC08<3><1><3> 772 | sdc2_d1 = port:PC09<3><1><3> 773 | sdc2_d2 = port:PC10<3><1><3> 774 | sdc2_d3 = port:PC11<3><1><3> 775 | sdc2_d4 = port:PC12<3><1><3> 776 | sdc2_d5 = port:PC13<3><1><3> 777 | sdc2_d6 = port:PC14<3><1><3> 778 | sdc2_d7 = port:PC15<3><1><3> 779 | sdc2_emmc_rst = port:PC16<3><1><3> 780 | cd-gpios = 781 | sunxi-power-save-mode = 782 | sunxi-dis-signal-vol-sw = 783 | mmc-ddr-1_8v = 784 | mmc-hs200-1_8v = 785 | mmc-hs400-1_8v = 786 | max-frequency = 100000000 787 | sdc_tm4_sm0_freq0 = 0 788 | sdc_tm4_sm0_freq1 = 0 789 | sdc_tm4_sm1_freq0 = 0x00000000 790 | sdc_tm4_sm1_freq1 = 0 791 | sdc_tm4_sm2_freq0 = 0x00000000 792 | sdc_tm4_sm2_freq1 = 0 793 | sdc_tm4_sm3_freq0 = 0x05000000 794 | sdc_tm4_sm3_freq1 = 0x00000405 795 | sdc_tm4_sm4_freq0 = 0x00050000 796 | sdc_tm4_sm4_freq1 = 0x00000408 797 | vmmc = "vcc-emmc" 798 | vqmmc = "vcc-lpddr" 799 | ;vqmmc = "none" 800 | vdmmc = "none" 801 | 802 | ;[mmc3] 803 | ;mmc3_used = 0 804 | ;mmc3_detmode = 2 805 | ;mmc3_buswidth = 4 806 | ;mmc3_clk = port:PA10<2><1><2> 807 | ;mmc3_cmd = port:PA09<2><1><2> 808 | ;mmc3_d0 = port:PA11<2><1><2> 809 | ;mmc3_d1 = port:PA12<2><1><2> 810 | ;mmc3_d2 = port:PA13<2><1><2> 811 | ;mmc3_d3 = port:PA14<2><1><2> 812 | ;mmc3_det = 813 | ;mmc3_use_wp = 0 814 | ;mmc3_wp = 815 | ;mmc3_isio = 0 816 | ;mmc3_regulator = "none" 817 | 818 | ; ------------------------------------------------------------------------------| 819 | ; sim card configuration 820 | ;-------------------------------------------------------------------------------- 821 | [smc] 822 | smc_used = 823 | smc_rst = 824 | smc_vppen = 825 | smc_vppp = 826 | smc_det = 827 | smc_vccen = 828 | smc_sck = 829 | smc_sda = 830 | 831 | ;-------------------------------- 832 | ;[usbc0]:控制器0的配置。 833 | ;usb_used:USB使能标志。置1,表示系统中USB模块可用,置0,则表示系统USB禁用。 834 | ;usb_port_type:USB端口的使用情况。 0:device only;1:host only;2:OTG 835 | ;usb_detect_type:USB端口的检查方式。0:不做检测;1:vbus/id检查;2:id/dpdm检查 836 | ;usb_id_gpio:USB ID pin脚配置。具体请参考gpio配置说明。 837 | ;usb_det_vbus_gpio:USB DET_VBUS pin脚配置。具体请参考gpio配置说明。 838 | ;usb_drv_vbus_gpio:USB DRY_VBUS pin脚配置。具体请参考gpio配置说明。 839 | ;usb_det_vbus_gpio: "axp_ctrl",表示axp 提供 840 | ;-------------------------------- 841 | ;-------------------------------- 842 | ;--- USB0控制标志 843 | ;-------------------------------- 844 | [usbc0] 845 | usbc0_used = 1 846 | usb_port_type = 1 847 | usb_detect_type = 0 848 | usb_id_gpio = 849 | usb_det_vbus_gpio = 850 | usb_drv_vbus_gpio = 851 | usb_host_init_state = 1 852 | usb_regulator_io = "nocare" 853 | usb_wakeup_suspend = 1 854 | ;--- USB Device 855 | usb_luns = 3 856 | usb_serial_unique = 1 857 | usb_serial_number = "20080411" 858 | rndis_wceis = 1 859 | 860 | ;-------------------------------- 861 | ;--- USB1控制标志 862 | ;-------------------------------- 863 | [usbc1] 864 | usbc1_used = 1 865 | usb_port_type = 1 866 | usb_detect_type = 0 867 | usb_drv_vbus_gpio = 868 | usb_host_init_state = 1 869 | usb_regulator_io = "nocare" 870 | usb_wakeup_suspend = 1 871 | ;--- HSIC config 872 | usb_hsic_used = 0 873 | usb_hsic_regulator_io = "vcc-hsic-12" 874 | ;--- Marvell 4G HSIC 875 | usb_hsic_ctrl = 0 876 | usb_hsic_rdy_gpio = 877 | ;--- SMSC usb3503 HSIC HUB 878 | usb_hsic_usb3503_flag = 0 879 | usb_hsic_hub_connect_gpio = 880 | usb_hsic_int_n_gpio = 881 | usb_hsic_reset_n_gpio = 882 | 883 | ;-------------------------------- 884 | ;--- 序列号标志 885 | ;-------------------------------- 886 | [serial_feature] 887 | sn_filename = "sn.txt" 888 | 889 | ;-------------------------------------------------------------------------------- 890 | ; G sensor configuration 891 | ; gs_twi_id --- TWI ID for controlling Gsensor (0: TWI0, 1: TWI1, 2: TWI2) 892 | ;-------------------------------------------------------------------------------- 893 | [gsensor] 894 | compatible = "allwinner,sun50i-gsensor-para" 895 | gsensor_used = 0 896 | gsensor_twi_id = 1 897 | gsensor_twi_addr = 0x1d 898 | gsensor_vcc_io = "vcc-deviceio" 899 | gsensor_vcc_io_val = 3300 900 | gsensor_int1 = port:PH05<6><1> 901 | gsensor_int2 = port:PH06<6><1> 902 | 903 | ;-------------------------------------------------------------------------------- 904 | ; G sensor automatic detection configuration 905 | ;gsensor_detect_used --- Whether startup automatic inspection function. 1:used,0:unused 906 | ;Module name postposition 1 said detection, 0 means no detection. 907 | ;-------------------------------------------------------------------------------- 908 | [gsensor_list] 909 | compatible = "allwinner,sun50i-gsensor-list-para" 910 | gsensor_list__used = 1 911 | lsm9ds0_acc_mag = 1 912 | bma250 = 1 913 | mma8452 = 1 914 | mma7660 = 1 915 | mma865x = 1 916 | afa750 = 1 917 | lis3de_acc = 1 918 | lis3dh_acc = 1 919 | kxtik = 1 920 | dmard10 = 0 921 | dmard06 = 1 922 | mxc622x = 1 923 | fxos8700 = 1 924 | lsm303d = 0 925 | sc7a30 = 1 926 | 927 | ;-------------------------------------------------------------------------------- 928 | ;wlan configuration 929 | ;wlan_used: 0-not use, 1- use 930 | ;wlan_busnum: sdio/usb index 931 | ;clocks: external low power clock input (32.768KHz) 932 | ;wlan_power: input supply voltage 933 | ;wlan_io_regulator: wlan/sdio I/O voltage 934 | ;wlan_regon: power up/down internal regulators used by wifi section 935 | ;wlan_hostwake: wlan to wake-up host 936 | ;-------------------------------------------------------------------------------- 937 | [wlan] 938 | wlan_used = 1 939 | wlan_busnum = 1 940 | clocks = 941 | wlan_power = 942 | wlan_io_regulator = "vcc-wifi-io" 943 | wlan_regon = port:PL02<1><0> 944 | wlan_hostwake = port:PL03<6><0> 945 | efuse_map_path = "wifi_efuse_8189e_for_MB1019Q5.map" 946 | 947 | ;-------------------------------------------------------------------------------- 948 | ;bluetooth configuration 949 | ;bt_used: 0- no used, 1- used 950 | ;clocks: external low power clock input (32.768KHz) 951 | ;bt_power: input supply voltage 952 | ;bt_io_regulator: bluetooth I/O voltage 953 | ;bt_rst_n: power up/down internal regulators used by BT section 954 | ;-------------------------------------------------------------------------------- 955 | [bt] 956 | bt_used = 1 957 | clocks = 958 | bt_power = 959 | bt_io_regulator = "vcc-wifi-io" 960 | bt_rst_n = port:PL04<1><0> 961 | 962 | ;-------------------------------------------------------------------------------- 963 | ;bluetooth lpm configuration 964 | ;btlpm_used: 0- no used, 1- used 965 | ;uart_index: 0- uart0, 1- uart1, 2- uart2 966 | ;bt_wake: host wake-up bluetooth device 967 | ;bt_hostwake: bt device wake-up host 968 | ;-------------------------------------------------------------------------------- 969 | [btlpm] 970 | btlpm_used = 1 971 | uart_index = 1 972 | bt_wake = port:PL06<1><1> 973 | bt_hostwake = port:PL05<6><0> 974 | 975 | ;-------------------------------------------------------------------------------- 976 | ;3G configuration 977 | ;-------------------------------------------------------------------------------- 978 | [3g_para] 979 | 3g_used = 0 980 | 3g_usbc_num = 2 981 | 3g_uart_num = 0 982 | bb_vbat = port:PL03<1><0> 983 | bb_host_wake = port:PM00<1><0> 984 | bb_on = port:PM01<1><0> 985 | bb_pwr_on = port:PM03<1><0> 986 | bb_wake = port:PM04<1><0> 987 | bb_rf_dis = port:PM05<1><0> 988 | bb_rst = port:PM06<1><0> 989 | 3g_int = 990 | 991 | ;-------------------------------------------------------------------------------- 992 | ;gyroscope 993 | ;-------------------------------------------------------------------------------- 994 | [gyroscopesensor] 995 | compatible ="allwinner,sun50i-gyr_sensors-para" 996 | gyroscopesensor_used = 0 997 | gy_twi_id = 2 998 | gy_twi_addr = 0x6a 999 | gy_int1 = port:PA10<6><1> 1000 | gy_int2 = 1001 | 1002 | ;-------------------------------------------------------------------------------- 1003 | ; Gyro automatic detection configuration 1004 | ;gy_detect_used --- Whether startup automatic inspection function. 1:used,0:unused 1005 | ;Module name postposition 1 said detection, 0 means no detection. 1006 | ;-------------------------------------------------------------------------------- 1007 | [gy_list] 1008 | compatible ="allwinner,sun50i-gyr_sensors-list-para" 1009 | gy_list_used = 0 1010 | lsm9ds0_gyr = 1 1011 | l3gd20_gyr = 0 1012 | bmg160_gyr = 1 1013 | 1014 | 1015 | ;-------------------------------------------------------------------------------- 1016 | ;light sensor 1017 | ;-------------------------------------------------------------------------------- 1018 | [lightsensor] 1019 | compatible ="allwinner,sun50i-lsensors-para" 1020 | lightsensor_used =0 1021 | ls_twi_id = 2 1022 | ls_twi_addr = 0x23 1023 | ls_int = port:PA12<6><1> 1024 | 1025 | ;-------------------------------------------------------------------------------- 1026 | ; lsensor automatic detection configuration 1027 | ;ls_detect_used --- Whether startup automatic inspection function. 1:used,0:unused 1028 | ;Module name postposition 1 said detection, 0 means no detection. 1029 | ;-------------------------------------------------------------------------------- 1030 | [ls_list] 1031 | compatible ="allwinner,sun50i-lsensors-list-para" 1032 | ls_list_used =0 1033 | ltr_501als = 1 1034 | jsa1212 = 0 1035 | jsa1127 = 1 1036 | stk3x1x = 0 1037 | 1038 | ;-------------------------------------------------------------------------------- 1039 | ;compass 1040 | ;-------------------------------------------------------------------------------- 1041 | [compasssensor] 1042 | compatible ="allwinner,sun50i-compass-para" 1043 | compasssensor_used = 0 1044 | compass_twi_id = 2 1045 | compass_twi_addr = 0x0d 1046 | compass_int = port:PA11<6><1> 1047 | 1048 | 1049 | ;-------------------------------------------------------------------------------- 1050 | ; compass sensor automatic detection configuration 1051 | ;compass_detect_used --- Whether startup automatic inspection function. 1:used,0:unused 1052 | ;Module name postposition 1 said detection, 0 means no detection. 1053 | ;-------------------------------------------------------------------------------- 1054 | [compass_list] 1055 | compatible ="allwinner,sun50i-compass-list-para" 1056 | compass_list_used = 0 1057 | lsm9ds0 = 1 1058 | lsm303d = 0 1059 | ;akm8963 = 1 1060 | 1061 | ;-------------------------------------------------------------------------------- 1062 | ; NOTE :Make sure spdif_used = 0x1,spdifmach_used = 0x1, 1063 | ; if register the sound card spdif. 1064 | ;-------------------------------------------------------------------------------- 1065 | [spdif] 1066 | spdif_used = 0 1067 | [sndspdif] 1068 | sndspdif_used = 0 1069 | ;---------------------------------------------------------------------------------- 1070 | ; NOTE :Make sure daudio2_used = 0x1,sndhdmi_used = 0x1, 1071 | ; if register the sound card hdmi. 1072 | ;--------------------------------------------------------------------------------- 1073 | [daudio2] 1074 | daudio2_used = 1 1075 | [sndhdmi] 1076 | sndhdmi_used = 1 1077 | ;-------------------------------------------------------------------------------- 1078 | ;allwinner,pcm_lrck_period :16/32/64/128/256 1079 | ;allwinner,pcm_lrckr_period :no use 1080 | ;allwinner,slot_width_select :16bits/20bits/24bits/32bits 1081 | ;allwinner,pcm_lsb_first :0: msb first; 1: lsb first 1082 | ;allwinner,tx_data_mode :0: 16bit linear PCM; 1: 8bit linear PCM; 2: 8bit u-law; 3: 8bit a-law 1083 | ;allwinner,rx_data_mode :0: 16bit linear PCM; 1: 8bit linear PCM; 2: 8bit u-law; 3: 8bit a-law 1084 | ;allwinner,daudio_master :1: SND_SOC_DAIFMT_CBM_CFM(codec clk & FRM master) use 1085 | ; 2: SND_SOC_DAIFMT_CBS_CFM(codec clk slave & FRM master) not use 1086 | ; 3: SND_SOC_DAIFMT_CBM_CFS(codec clk master & frame slave) not use 1087 | ; 4: SND_SOC_DAIFMT_CBS_CFS(codec clk & FRM slave) use 1088 | ;allwinner,audio_format: 1:SND_SOC_DAIFMT_I2S(standard i2s format). use 1089 | ; 2:SND_SOC_DAIFMT_RIGHT_J(right justfied format). 1090 | ; 3:SND_SOC_DAIFMT_LEFT_J(left justfied format) 1091 | ; 4:SND_SOC_DAIFMT_DSP_A(pcm. MSB is available on 2nd BCLK rising edge after LRC rising edge). use 1092 | ; 5:SND_SOC_DAIFMT_DSP_B(pcm. MSB is available on 1nd BCLK rising edge after LRC rising edge) 1093 | ;allwinner,signal_inversion:1:SND_SOC_DAIFMT_NB_NF(normal bit clock + frame) use 1094 | ; 2:SND_SOC_DAIFMT_NB_IF(normal BCLK + inv FRM) 1095 | ; 3:SND_SOC_DAIFMT_IB_NF(invert BCLK + nor FRM) use 1096 | ; 4:SND_SOC_DAIFMT_IB_IF(invert BCLK + FRM) 1097 | ;allwinner,frametype :0: long frame = 2 clock width; 1: short frame 1098 | ;allwinner,tdm_config :0:pcm 1:i2s 1099 | ;allwinner,daudio0_used :0:not use 1:use 1100 | 1101 | ;-------------------------------------------------------------------------------- 1102 | ; NOTE :Make sure snddaudio0_used = 0x1,daudio1_used = 0x1, 1103 | ; if register the sound card DAUDIO1. 1104 | ;-------------------------------------------------------------------------------- 1105 | [snddaudio0] 1106 | snddaudio0_used = 0 1107 | ;----------------------------------------------------------------------------- 1108 | [daudio0] 1109 | pcm_lrck_period = 0x20 1110 | pcm_lrckr_period = 0x01 1111 | slot_width_select = 0x20 1112 | pcm_lsb_first = 0x0 1113 | tx_data_mode = 0x0 1114 | rx_data_mode = 0x0 1115 | daudio_master = 0x04 1116 | audio_format = 0x01 1117 | signal_inversion = 0x01 1118 | frametype = 0x0 1119 | tdm_config = 0x01 1120 | daudio0_used = 0 1121 | 1122 | ;------------------------------------------------------------------------------- 1123 | ; NOTE :Make sure snddaudio1_used = 0x1,daudio0_used = 0x1, 1124 | ; if register the sound card DAUDIO0. 1125 | ;-------------------------------------------------------------------------------- 1126 | [snddaudio1] 1127 | snddaudio1_used = 0 1128 | ;----------------------------------------------------------------------------- 1129 | [daudio1] 1130 | pcm_lrck_period = 0x20 1131 | pcm_lrckr_period = 0x01 1132 | slot_width_select = 0x20 1133 | pcm_lsb_first = 0x0 1134 | tx_data_mode = 0x0 1135 | rx_data_mode = 0x0 1136 | daudio_master = 0x04 1137 | audio_format = 0x01 1138 | signal_inversion = 0x01 1139 | frametype = 0x0 1140 | tdm_config = 0x01 1141 | daudio1_used = 0 1142 | ;---------------------------------------------------------------------------------------------------------- 1143 | ;-------------------------------------------------------------------------------------- 1144 | ;allwinner,headphonevol :headphone volume:0x0--0x3f 0db--(-62db) 1db/step 1145 | ;allwinner,spkervol : speaker volume:0x0--0x1f 0db-(-43.5db) 1.5db/step 1146 | ;allwinner,earpiecevol : earpiece volume:0x0--0x1f 0db-(-43.5db) 1.5db/step 1147 | ;allwinner,maingain : mainmic gain:0x0---0x7 0x0-0db 0x1:24db 3db/step 1148 | ;allwinner,headsetmicgain : headphonemic gain:0x0---0x7 0x0-0db 0x1:24db 3db/step 1149 | ;allwinner,adcagc_cfg : 1:use adcagc 0:no use 1150 | ;allwinner,adcdrc_cfg : 1:use adcdrc 0:no use 1151 | ;allwinner,adchpf_cfg : 1:use adchpf 0:no use 1152 | ;allwinner,dacdrc_cfg : 1:use adcdrc 0:no use 1153 | ;allwinner,dachpf_cfg : 1:use adchpf 0:no use 1154 | ;allwinner,aif2config : 1:use aif2 0:no use 1155 | ;allwinner,aif3config : 1:use aif3 0:no use 1156 | ;allwinner,hp_detect_case :0:low 1:high 1157 | ;-------------------------------------------------------------------------------- 1158 | ; NOTE :Make sure sndcodec_used = 0x1,i2s_used = 0x1 1159 | ; codec_used = 0x1,if register the sound card audiocodec. 1160 | ;--------------------------------------------------------------------------------- 1161 | [sndcodec] 1162 | sndcodec_used = 0x1 1163 | aif2fmt = 0x3 1164 | aif3fmt = 0x3 1165 | aif2master = 0x1 1166 | hp_detect_case = 0x1 1167 | ;------------------------------------------------------------------------------ 1168 | [i2s] 1169 | i2s_used = 0x1 1170 | ;------------------------------------------------------------------------------- 1171 | [codec] 1172 | codec_used = 0x1 1173 | headphonevol = 0x3b 1174 | spkervol = 0x1a 1175 | earpiecevol = 0x1e 1176 | maingain = 0x4 1177 | headsetmicgain = 0x4 1178 | adcagc_cfg = 0x0 1179 | adcdrc_cfg = 0x0 1180 | adchpf_cfg = 0x0 1181 | dacdrc_cfg = 0x0 1182 | dachpf_cfg = 0x0 1183 | aif2config = 0x0 1184 | aif3config = 0x0 1185 | aif1_lrlk_div = 0x40 1186 | aif2_lrlk_div = 0x40 1187 | pa_sleep_time = 0x15e 1188 | gpio-spk = port:PH07<2><1> 1189 | 1190 | ;---------------------------------------------------------------------------------- 1191 | ;ir --- infra remote configuration 1192 | ;---------------------------------------------------------------------------------- 1193 | [s_cir0] 1194 | s_cir0_used = 1 1195 | ir_power_key_code = 0x4D 1196 | ir_addr_code = 0x4040 1197 | 1198 | ;------------------------------------------------------------------------------------- 1199 | ;used ---0:not used,1:used 1200 | ;pmu_id ---0:axp19x,1:axp209,2:axp22x,3:axp806,4:axp808,5:axp809,6:axp803,7:axp813 1201 | ;pmu_twi_addr ---slave address 1202 | ;pmu_twi_id ---i2c bus number (0 TWI0, 1 TWI2, 2 TWI3) 1203 | ;pmu_irq_id ---irq number (0 irq0,1 irq1) 1204 | ;pmu_chg_ic_temp ---intelligence charge pmu temperature. when it is 0, this function is closed. 1205 | ;pmu_battery_rdc ---battery initial resistance 1206 | ;pmu_battery_cap ---battery capability,mAh 1207 | ;pmu_runtime_chgcur ---set initial charging current limite,mA, 300/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/ 1208 | ;pmu_suspend_chgcur ---set suspend charging current limite,mA, 300/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/ 1209 | ;pmu_shutdown_chgcur ---set shutdown charging current limite,mA, 300/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/ 1210 | ;pmu_init_chgvol ---set initial charing target voltage,mV,4100/4220/4200/4240 1211 | ;pmu_ac_vol ---set usb-ac limited voltage level,mV,4000/4100/4200/4300/4400/4500/4600/4700,0 - not limite 1212 | ;pmu_ac_cur ---set usb-ac limited current level,mA,500/900, 0 - not limite 1213 | ;pmu_usbpc_vol ---set usb-pc limited voltage level,mV,4000/4100/4200/4300/4400/4500/4600/4700,0 - not limite 1214 | ;pmu_usbpc_cur ---set usb-pc limited current level,mA,500/900, 0 - not limite 1215 | ;pmu_battery_warning_level1 ---low power warning high level,5%-20%,1%/step 1216 | ;pmu_battery_warning_level2 ---low power warning low level,0%-15%,1%/step 1217 | ;pmu_chgled_func ---CHGKED pin control, 0:controlled by pmu,1:controlled by Charger 1218 | ;pmu_chgled_type ---CHGLED Type select when pmu_chgled_func=0,0:Type A, 1:type B 1219 | ;pmu_bat_para1 ---battery indication at 3.13V 1220 | ;pmu_bat_para2 ---battery indication at 3.27V 1221 | ;pmu_bat_para3 ---battery indication at 3.34V 1222 | ;pmu_bat_para4 ---battery indication at 3.41V 1223 | ;pmu_bat_para5 ---battery indication at 3.48V 1224 | ;pmu_bat_para6 ---battery indication at 3.52V 1225 | ;pmu_bat_para7 ---battery indication at 3.55V 1226 | ;pmu_bat_para8 ---battery indication at 3.57V 1227 | ;pmu_bat_para9 ---battery indication at 3.59V 1228 | ;pmu_bat_para10 ---battery indication at 3.61V 1229 | ;pmu_bat_para11 ---battery indication at 3.63V 1230 | ;pmu_bat_para12 ---battery indication at 3.64V 1231 | ;pmu_bat_para13 ---battery indication at 3.66V 1232 | ;pmu_bat_para14 ---battery indication at 3.7V 1233 | ;pmu_bat_para15 ---battery indication at 3.73V 1234 | ;pmu_bat_para16 ---battery indication at 3.77V 1235 | ;pmu_bat_para17 ---battery indication at 3.78V 1236 | ;pmu_bat_para18 ---battery indication at 3.8V 1237 | ;pmu_bat_para19 ---battery indication at 3.82V 1238 | ;pmu_bat_para20 ---battery indication at 3.84V 1239 | ;pmu_bat_para21 ---battery indication at 3.85V 1240 | ;pmu_bat_para22 ---battery indication at 3.87V 1241 | ;pmu_bat_para23 ---battery indication at 3.91V 1242 | ;pmu_bat_para24 ---battery indication at 3.94V 1243 | ;pmu_bat_para25 ---battery indication at 3.98V 1244 | ;pmu_bat_para26 ---battery indication at 4.01V 1245 | ;pmu_bat_para27 ---battery indication at 4.05V 1246 | ;pmu_bat_para28 ---battery indication at 4.08V 1247 | ;pmu_bat_para29 ---battery indication at 4.1V 1248 | ;pmu_bat_para30 ---battery indication at 4.12V 1249 | ;pmu_bat_para31 ---battery indication at 4.14V 1250 | ;pmu_bat_para32 ---battery indication at 4.15V 1251 | ;pmu_bat_temp_enable ---battery temp detect enable 1252 | ;pmu_bat_charge_ltf ---charge battery temp low threshold voltage 1253 | ;pmu_bat_charge_htf ---charge battery temp high threshold voltage 1254 | ;pmu_bat_shutdown_ltf ---shutdown battery temp low threshold voltage 1255 | ;pmu_bat_shutdown_htf ---shutdown battery temp high threshold voltage 1256 | ;pmu_bat_temp_para1 ---battery temp -25 voltage 1257 | ;pmu_bat_temp_para2 ---battery temp -15 voltage 1258 | ;pmu_bat_temp_para3 ---battery temp -10 voltage 1259 | ;pmu_bat_temp_para4 ---battery temp -5 voltage 1260 | ;pmu_bat_temp_para5 ---battery temp 0 voltage 1261 | ;pmu_bat_temp_para6 ---battery temp 5 voltage 1262 | ;pmu_bat_temp_para7 ---battery temp 10 voltage 1263 | ;pmu_bat_temp_para8 ---battery temp 20 voltage 1264 | ;pmu_bat_temp_para9 ---battery temp 30 voltage 1265 | ;pmu_bat_temp_para10 ---battery temp 40 voltage 1266 | ;pmu_bat_temp_para11 ---battery temp 45 voltage 1267 | ;pmu_bat_temp_para12 ---battery temp 50 voltage 1268 | ;pmu_bat_temp_para13 ---battery temp 55 voltage 1269 | ;pmu_bat_temp_para14 ---battery temp 60 voltage 1270 | ;pmu_bat_temp_para15 ---battery temp 70 voltage 1271 | ;pmu_bat_temp_para16 ---battery temp 80 voltage 1272 | ;pmu_powkey_off_time ---set pek off time,ms, 4000/6000/8000/10000 1273 | ;pmu_powkey_off_func ---set pek off func, 0:shutdown,1:restart 1274 | ;pmu_powkey_off_en ---set pek offlevel powerdown or not, 0:not powerdown,1:powerdown 1275 | ;pmu_powkey_long_time ---set pek pek long irq time,ms,1000/1500/2000/2500 1276 | ;pmu_powkey_on_time ---set pek on time,ms,128/1000/2000/3000 1277 | ;power_start ---when system is in charging, shutdown is power off or resart;0:restart 1:poweroff 1278 | ;-------------------------------------------------------------------------------------------------------- 1279 | ;-------------------------------------------------------------------------------------------------------- 1280 | ;pmu0 is axp81x 1281 | ;-------------------------------------------------------------------------------------------------------- 1282 | [pmu0] 1283 | used = 1 1284 | pmu_id = 6 1285 | pmu_twi_addr = 0x34 1286 | pmu_twi_id = 1 1287 | pmu_irq_id = 64 1288 | pmu_IRQ_wakeup = 1 1289 | 1290 | pmu_chg_ic_temp = 0 1291 | pmu_battery_rdc = 88 1292 | pmu_battery_cap = 4800 1293 | pmu_runtime_chgcur = 450 1294 | pmu_suspend_chgcur = 1500 1295 | pmu_shutdown_chgcur = 1500 1296 | pmu_init_chgvol = 4200 1297 | pmu_ac_vol = 4000 1298 | pmu_ac_cur = 3500 1299 | pmu_usbpc_vol = 4400 1300 | pmu_usbpc_cur = 500 1301 | pmu_battery_warning_level1 = 15 1302 | pmu_battery_warning_level2 = 0 1303 | pmu_chgled_func = 0 1304 | pmu_chgled_type = 0 1305 | 1306 | pmu_bat_para1 = 0 1307 | pmu_bat_para2 = 0 1308 | pmu_bat_para3 = 0 1309 | pmu_bat_para4 = 0 1310 | pmu_bat_para5 = 0 1311 | pmu_bat_para6 = 0 1312 | pmu_bat_para7 = 1 1313 | pmu_bat_para8 = 1 1314 | pmu_bat_para9 = 2 1315 | pmu_bat_para10 = 3 1316 | pmu_bat_para11 = 4 1317 | pmu_bat_para12 = 10 1318 | pmu_bat_para13 = 17 1319 | pmu_bat_para14 = 26 1320 | pmu_bat_para15 = 41 1321 | pmu_bat_para16 = 46 1322 | pmu_bat_para17 = 51 1323 | pmu_bat_para18 = 56 1324 | pmu_bat_para19 = 59 1325 | pmu_bat_para20 = 65 1326 | pmu_bat_para21 = 69 1327 | pmu_bat_para22 = 75 1328 | pmu_bat_para23 = 79 1329 | pmu_bat_para24 = 83 1330 | pmu_bat_para25 = 89 1331 | pmu_bat_para26 = 95 1332 | pmu_bat_para27 = 98 1333 | pmu_bat_para28 = 100 1334 | pmu_bat_para29 = 100 1335 | pmu_bat_para30 = 100 1336 | pmu_bat_para31 = 100 1337 | pmu_bat_para32 = 100 1338 | 1339 | pmu_bat_temp_enable = 1 1340 | pmu_bat_charge_ltf = 2261 1341 | pmu_bat_charge_htf = 388 1342 | pmu_bat_shutdown_ltf = 3200 1343 | pmu_bat_shutdown_htf = 237 1344 | pmu_bat_temp_para1 = 7466 1345 | pmu_bat_temp_para2 = 4480 1346 | pmu_bat_temp_para3 = 3518 1347 | pmu_bat_temp_para4 = 2786 1348 | pmu_bat_temp_para5 = 2223 1349 | pmu_bat_temp_para6 = 1788 1350 | pmu_bat_temp_para7 = 1448 1351 | pmu_bat_temp_para8 = 969 1352 | pmu_bat_temp_para9 = 664 1353 | pmu_bat_temp_para10 = 466 1354 | pmu_bat_temp_para11 = 393 1355 | pmu_bat_temp_para12 = 333 1356 | pmu_bat_temp_para13 = 283 1357 | pmu_bat_temp_para14 = 242 1358 | pmu_bat_temp_para15 = 179 1359 | pmu_bat_temp_para16 = 134 1360 | 1361 | pmu_powkey_off_time = 6000 1362 | pmu_powkey_off_func = 0 1363 | pmu_powkey_off_en = 1 1364 | pmu_powkey_long_time = 1500 1365 | pmu_powkey_on_time = 1000 1366 | power_start = 3 1367 | 1368 | ;-------------------------------------------------------------------------------------------------------- 1369 | ;pmu0 is axp81x 1370 | ;regulator tree 1371 | ;-------------------------------------------------------------------------------------------------------- 1372 | [pmu0_regu] 1373 | regulator_count = 23 1374 | regulator1 = "axp81x_dcdc1 none vcc-nand vcc-emmc vcc-sdc vcc-usb-30 vcc-io vcc-pd" 1375 | regulator2 = "axp81x_dcdc2 none vdd-cpua" 1376 | regulator3 = "axp81x_dcdc3 none" 1377 | regulator4 = "axp81x_dcdc4 none" 1378 | regulator5 = "axp81x_dcdc5 none vcc-dram" 1379 | regulator6 = "axp81x_dcdc6 none vdd-sys" 1380 | regulator7 = "axp81x_dcdc7 none" 1381 | regulator8 = "axp81x_rtc none" 1382 | regulator9 = "axp81x_aldo1 none vdd-csi-led iovdd-csi vcc-pe" 1383 | regulator10 = "axp81x_aldo2 none vcc-pl" 1384 | regulator11 = "axp81x_aldo3 none vcc-avcc vcc-pll" 1385 | regulator12 = "axp81x_dldo1 none vcc-hdmi-33" 1386 | regulator13 = "axp81x_dldo2 none vcc-mipi" 1387 | regulator14 = "axp81x_dldo3 none avdd-csi" 1388 | regulator15 = "axp81x_dldo4 none vcc-deviceio" 1389 | regulator16 = "axp81x_eldo1 none vcc-cpvdd vcc-wifi-io vcc-pc vcc-pg" 1390 | regulator17 = "axp81x_eldo2 none vcc-lcd-0" 1391 | regulator18 = "axp81x_eldo3 none dvdd-csi-18" 1392 | regulator19 = "axp81x_fldo1 none vcc-hsic-12" 1393 | regulator20 = "axp81x_fldo2 none vdd-cpus"; 1394 | regulator21 = "axp81x_gpio0ldo none vcc-ctp" 1395 | regulator22 = "axp81x_gpio1ldo none" 1396 | regulator23 = "axp81x_dc1sw none vcc-lvds vcc-dsi-33" 1397 | 1398 | ;---------------------------------------------------------------------------------- 1399 | ;recovery and fastboot key 1400 | ;---------------------------------------------------------------------------------- 1401 | [recovery_key] 1402 | key_max = 0xc 1403 | key_min = 0xa 1404 | ;---------------------------------------------------------------------------------- 1405 | [fastboot_key] 1406 | key_max = 0x6 1407 | key_min = 0x4 1408 | 1409 | ;---------------------------------------------------------------------------------- 1410 | ; dvfs voltage-frequency table configuration 1411 | ; 1412 | ; max_freq: cpu maximum frequency, based on Hz 1413 | ; min_freq: cpu minimum frequency, based on Hz 1414 | ; 1415 | ; lv_count: count of lv_freq/lv_volt, must be < 16 1416 | ; 1417 | ; lv1: core vdd is 1.30v if cpu frequency is (1104Mhz, 1152Mhz] 1418 | ; lv2: core vdd is 1.26v if cpu frequency is (1008Mhz, 1104Mhz] 1419 | ; lv3: core vdd is 1.20v if cpu frequency is (816Mhz, 1008Mhz] 1420 | ; lv4: core vdd is 1.10v if cpu frequency is (648Mhz, 816Mhz] 1421 | ; lv5: core vdd is 1.04v if cpu frequency is (480Mhz, 648Mhz] 1422 | ; lv6: core vdd is 1.04v if cpu frequency is (480Mhz, 648Mhz] 1423 | ; lv7: core vdd is 1.04v if cpu frequency is (480Mhz, 648Mhz] 1424 | ; lv8: core vdd is 1.04v if cpu frequency is (480Mhz, 648Mhz] 1425 | ; 1426 | ;---------------------------------------------------------------------------------- 1427 | [dvfs_table] 1428 | ;extremity_freq = 1344000000 1429 | max_freq = 1248000000 1430 | min_freq = 480000000 1431 | 1432 | lv_count = 8 1433 | lv1_freq = 1248000000 1434 | lv1_volt = 1300 1435 | 1436 | lv2_freq = 1104000000 1437 | lv2_volt = 1260 1438 | 1439 | lv3_freq = 1008000000 1440 | lv3_volt = 1200 1441 | 1442 | lv4_freq = 816000000 1443 | lv4_volt = 1100 1444 | 1445 | lv5_freq = 648000000 1446 | lv5_volt = 1040 1447 | 1448 | lv6_freq = 0 1449 | lv6_volt = 1040 1450 | 1451 | lv7_freq = 0 1452 | lv7_volt = 1040 1453 | 1454 | lv8_freq = 0 1455 | lv8_volt = 1040 1456 | 1457 | ;---------------------------------------------------------------------------------- 1458 | ;s_uart0 config parameters 1459 | ;s_uart0_used --s_uart0 whether used for arisc debugging 1460 | ; 1461 | ;---------------------------------------------------------------------------------- 1462 | [s_uart0] 1463 | s_uart0_used = 1 1464 | s_uart0_tx = port:PL02<2> 1465 | s_uart0_rx = port:PL03<2> 1466 | 1467 | ;---------------------------------------------------------------------------------- 1468 | ;s_rsb0 config parameters 1469 | ;s_rsb0_used --s_rsb0 whether used for arisc 1470 | ; 1471 | ;---------------------------------------------------------------------------------- 1472 | [s_rsb0] 1473 | s_rsb0_used = 1 1474 | s_rsb0_sck = port:PL00<2><1><2> 1475 | s_rsb0_sda = port:PL01<2><1><2> 1476 | 1477 | ;---------------------------------------------------------------------------------- 1478 | ;s_jtag0 config parameters 1479 | ;s_jtag0_used --s_jtag0 whether used for arisc 1480 | ; 1481 | ;---------------------------------------------------------------------------------- 1482 | [s_jtag0] 1483 | s_jtag0_used = 0 1484 | s_jtag0_tms = port:PL04<2><1><2> 1485 | s_jtag0_tck = port:PL05<2><1><2> 1486 | s_jtag0_tdo = port:PL06<2><1><2> 1487 | s_jtag0_tdi = port:PL07<2><1><2> 1488 | 1489 | ;---------------------------------------------------------------------------------- 1490 | ;virtual device 1491 | ;virtual device for pinctrl testing 1492 | ;device have pin PA1 PA2 1493 | ;---------------------------------------------------------------------------------- 1494 | [Vdevice] 1495 | Vdevice_used = 1 1496 | Vdevice_0 = port:PB01<4><1><2> 1497 | Vdevice_1 = port:PB02<4><1><2> 1498 | 1499 | ;---------------------------------------------------------------------------------- 1500 | ;mali400 parameters 1501 | ;normal_freq : the normal frequency of gpu 1502 | ;scene_ctrl_status: scene control status, if this is enabled, android layer can ask 1503 | ; gpu driver to change frequency in certain scene 1504 | ;temp_ctrl_status : temperature control status, if this is enabled, the gpu frequency 1505 | ; will drop down if gpu's temperature is too high 1506 | ;---------------------------------------------------------------------------------- 1507 | [gpu_mali400_0] 1508 | normal_freq = 408 1509 | scene_ctrl_status = 0 1510 | temp_ctrl_status = 1 1511 | ;---------------------------------------------------------------------------------- 1512 | -------------------------------------------------------------------------------- /blobs/sys_config_pine64-sopine.fex: -------------------------------------------------------------------------------- 1 | ;A64 PAD application 2 | ;--------------------------------------------------------------------------------------------------------- 3 | ; 说明: 脚本中的字符串区分大小写,用户可以修改"="后面的数值,但是不要修改前面的字符串 4 | ; 描述gpio的形式:Port:端口+组内序号<功能分配><内部电阻状态><驱动能力><输出电平状态> 5 | ;--------------------------------------------------------------------------------------------------------- 6 | 7 | [product] 8 | version = "100" 9 | machine = "pine64-sopine" 10 | 11 | ;--------------------------------------------------------------------------------------------------------- 12 | ; eraseflag - 1 erase data partition, 0 - do not erase data partition 13 | ; next_work - action after burn, 0x0 by config, 0x1 normal, 0x2 reboot, 0x3 shutdown,0x4 reupdate ,0x5 boot 14 | ; debug_mode = 0 : do not print any message,debug_mode = 1 ,print debug message 15 | ;--------------------------------------------------------------------------------------------------------- 16 | [platform] 17 | eraseflag = 1 18 | 19 | ;--------------------------------------------------------------------------------------------------------- 20 | ; dragonboard_test default is 0,only in dragonboard card boot mode must be set 1 21 | ; If you modified dragonboard_test flag,before you pack imgage, you must be build kernel again. 22 | ;--------------------------------------------------------------------------------------------------------- 23 | [target] 24 | boot_clock = 1008 25 | storage_type = -1 26 | burn_key = 0 27 | 28 | ;---------------------------------------------------------------------------------- 29 | ; system configuration 30 | ; ? 31 | ;dcdc1_vol ---set dcdc1 voltage,mV,1600-3400,100mV/step 32 | ;dcdc2_vol ---set dcdc2 voltage,mV,600-1540,20mV/step 33 | ;dcdc3_vol ---set dcdc3 voltage,mV,600-1860,20mV/step 34 | ;dcdc4_vol ---set dcdc4 voltage,mV,600-1540,20mV/step 35 | ;dcdc5_vol ---set dcdc5 voltage,mV,1000-2550,50mV/step 36 | ;aldo2_vol ---set aldo2 voltage,mV,700-3300,100mV/step 37 | ;aldo3_vol ---set aldo3 voltage,mV,700-3300,100mV/step 38 | ;---------------------------------------------------------------------------------- 39 | 40 | [power_sply] 41 | dcdc1_vol = 1003300 42 | dcdc2_vol = 1001100 43 | dcdc6_vol = 1001100 44 | aldo1_vol = 2800 45 | aldo2_vol = 1001800 46 | aldo3_vol = 1003000 47 | dldo1_vol = 3300 48 | dldo2_vol = 3300 49 | dldo3_vol = 2800 50 | dldo4_vol = 1003300 51 | eldo1_vol = 1001800 52 | eldo2_vol = 1800 53 | eldo3_vol = 1800 54 | fldo1_vol = 1200 55 | fldo2_vol = 1001100 56 | gpio0_vol = 3100 57 | 58 | [card_boot] 59 | logical_start = 40960 60 | sprite_gpio0 = 61 | 62 | ;--------------------------------------------------------------------------------------------------------- 63 | ; if 1 == standby_mode, then support super standby; 64 | ; else, support normal standby. 65 | ;--------------------------------------------------------------------------------------------------------- 66 | [pm_para] 67 | standby_mode = 1 68 | 69 | [card0_boot_para] 70 | card_ctrl = 0 71 | card_high_speed = 1 72 | card_line = 4 73 | sdc_d1 = port:PF0<2><1><2> 74 | sdc_d0 = port:PF1<2><1><2> 75 | sdc_clk = port:PF2<2><1><2> 76 | sdc_cmd = port:PF3<2><1><2> 77 | sdc_d3 = port:PF4<2><1><2> 78 | sdc_d2 = port:PF5<2><1><2> 79 | 80 | [card2_boot_para] 81 | sdc_io_1v8 = 1 82 | card_ctrl = 2 83 | card_high_speed = 1 84 | card_line = 8 85 | sdc_ds = port:PC1<3><1><3> 86 | sdc_clk = port:PC5<3><1><3> 87 | sdc_cmd = port:PC6<3><1><3> 88 | sdc_d0 = port:PC8<3><1><3> 89 | sdc_d1 = port:PC9<3><1><3> 90 | sdc_d2 = port:PC10<3><1><3> 91 | sdc_d3 = port:PC11<3><1><3> 92 | sdc_d4 = port:PC12<3><1><3> 93 | sdc_d5 = port:PC13<3><1><3> 94 | sdc_d6 = port:PC14<3><1><3> 95 | sdc_d7 = port:PC15<3><1><3> 96 | sdc_emmc_rst = port:PC16<3><1><3> 97 | sdc_ex_dly_used = 1 98 | 99 | [twi_para] 100 | twi_port = 0 101 | twi_scl = port:PH0<2> 102 | twi_sda = port:PH1<2> 103 | 104 | [uart_para] 105 | uart_debug_port = 0 106 | uart_debug_tx = port:PB8<4><1> 107 | uart_debug_rx = port:PB9<4><1> 108 | 109 | [jtag_para] 110 | jtag_enable = 0 111 | jtag_ms = port:PB0<4> 112 | jtag_ck = port:PB1<4> 113 | jtag_do = port:PB2<4> 114 | jtag_di = port:PB3<4> 115 | 116 | [clock] 117 | pll4 = 300 118 | pll6 = 600 119 | pll8 = 360 120 | pll9 = 297 121 | pll10 = 264 122 | 123 | ;***************************************************************************** 124 | ;sdram configuration 125 | ; 126 | ;***************************************************************************** 127 | [dram_para] 128 | dram_clk = 552 129 | dram_type = 7 130 | dram_zq = 0x3b3bdd 131 | dram_odt_en = 0x1 132 | dram_para1 = 0x10E410E4 133 | dram_para2 = 0x1000 134 | dram_mr0 = 0x1840 135 | dram_mr1 = 0x40 136 | dram_mr2 = 0x18 137 | dram_mr3 = 0x2 138 | dram_tpr0 = 0x004A2195 139 | dram_tpr1 = 0x02424190 140 | dram_tpr2 = 0x0008B060 141 | dram_tpr3 = 0x050005dc 142 | dram_tpr4 = 0x0 143 | dram_tpr5 = 0x0 144 | dram_tpr6 = 0x0 145 | dram_tpr7 = 0x2a066198 146 | dram_tpr8 = 0x0 147 | dram_tpr9 = 0x0 148 | dram_tpr10 = 0x8808 149 | dram_tpr11 = 0x40a60066 150 | dram_tpr12 = 0x55550000 151 | dram_tpr13 = 0x04000900 152 | 153 | ;---------------------------------------------------------------------------------- 154 | ;os life cycle para configuration 155 | ;---------------------------------------------------------------------------------- 156 | 157 | ;------------------------------------------------------------------------------; 158 | ; 10/100/100Mbps Ethernet MAC Controller Configure ; 159 | ;------------------------------------------------------------------------------; 160 | ; 配置选项: ; 161 | ; gmac_used --- 1: gmac used, 0: not used ; 162 | ;------------------------------------------------------------------------------; 163 | ; MII GMII RGMII MII GMII RGMII MII GMII RGMII ; 164 | ;PA00~03 * * * PA10 * * PA20 * * * ; 165 | ; PA04 * PA11~14 * * * PA21 * * ; 166 | ; PA05 * PA15 * PA22 * * ; 167 | ; PA06 * PA16 * PA23 * * ; 168 | ; PA07 * PA17 * PA24 * * ; 169 | ; PA08 * * PA18 * PA25 * * ; 170 | ; PA09 * * * PA19 * * * PA26~27 * * * ; 171 | ;------------------------------------------------------------------------------; 172 | [gmac0] 173 | gmac0_used = 1 174 | 175 | gmac_txd0 = port:PD18<4> 176 | gmac_txd1 = port:PD17<4> 177 | gmac_txd2 = port:PD16<4> 178 | gmac_txd3 = port:PD15<4> 179 | ;gmac_txd4 = port:PA04<2> 180 | ;gmac_txd5 = port:PA05<2> 181 | ;gmac_txd6 = port:PA06<2> 182 | ;gmac_txd7 = port:PA07<2> 183 | ;gmac_txclk = port:PA08<2> 184 | gmac_txen = port:PD20<4> 185 | gmac_gtxclk = port:PD19<4> 186 | 187 | gmac_rxd0 = port:PD11<4> 188 | gmac_rxd1 = port:PD10<4> 189 | gmac_rxd2 = port:PD09<4> 190 | gmac_rxd3 = port:PD08<4> 191 | ;gmac_rxd4 = port:PA15<2> 192 | ;gmac_rxd5 = port:PA16<2> 193 | ;gmac_rxd6 = port:PA17<2> 194 | ;gmac_rxd7 = port:PA18<2> 195 | gmac_rxdv = port:PD13<4> 196 | gmac_rxclk = port:PD12<4> 197 | 198 | ;gmac_txerr = port:PA21<2> 199 | ;gmac_rxerr = port:PA22<2> 200 | ;gmac_col = port:PA23<2> 201 | ;gmac_crs = port:PA24<2> 202 | gmac_clkin = port:PD21<4> 203 | 204 | gmac_mdc = port:PD22<4> 205 | gmac_mdio = port:PD23<4> 206 | 207 | gmac_power1 = "axp81x_dc1sw:0" 208 | gmac_power2 = "" 209 | gmac_power3 = "" 210 | 211 | tx-delay = 2 212 | rx-delay = 2 213 | 214 | ;---------------------------------------------------------------------------------- 215 | ;i2c configuration 216 | ;---------------------------------------------------------------------------------- 217 | [twi0] 218 | twi0_used = 1 219 | twi0_scl = port:PH0<2> 220 | twi0_sda = port:PH1<2> 221 | 222 | [twi0_suspend] 223 | twi0_scl = port:PH0<7> 224 | twi0_sda = port:PH1<7> 225 | 226 | [twi1] 227 | twi1_used = 1 228 | twi1_scl = port:PH2<2> 229 | twi1_sda = port:PH3<2> 230 | 231 | [twi1_suspend] 232 | twi1_scl = port:PH2<7> 233 | twi1_sda = port:PH3<7> 234 | 235 | [twi2] 236 | twi2_used = 0 237 | twi2_scl = port:PE14<3> 238 | twi2_sda = port:PE15<3> 239 | 240 | [twi2_suspend] 241 | twi2_scl = port:PE14<7> 242 | twi2_sda = port:PE15<7> 243 | 244 | ;---------------------------------------------------------------------------------- 245 | ;TWI device configuration 246 | ;compatible --- device name 247 | ;reg --- device address 248 | ;---------------------------------------------------------------------------------- 249 | ;[twi0/twi_board0] 250 | ;compatible = 251 | ;reg = 252 | 253 | ;---------------------------------------------------------------------------------- 254 | ;uart configuration 255 | ;uart_port --- x (/dev/ttySx, x=0,1,2,...) 256 | ;uart_type --- 2 (2 wire), 4 (4 wire), 8 (8 wire, full function) 257 | ;---------------------------------------------------------------------------------- 258 | [uart0] 259 | uart0_used = 1 260 | uart0_port = 0 261 | uart0_type = 2 262 | uart0_tx = port:PB8<4><1> 263 | uart0_rx = port:PB9<4><1> 264 | 265 | [uart0_suspend] 266 | uart0_tx = port:PB8<7><1> 267 | uart0_rx = port:PB9<7><1> 268 | 269 | [uart1] 270 | uart1_used = 1 271 | uart1_port = 1 272 | uart1_type = 4 273 | uart1_tx = port:PG6<2><1> 274 | uart1_rx = port:PG7<2><1> 275 | uart1_rts = port:PG8<2><1> 276 | uart1_cts = port:PG9<2><1> 277 | 278 | [uart1_suspend] 279 | uart1_tx = port:PG6<7><1> 280 | uart1_rx = port:PG7<7><1> 281 | uart1_rts = port:PG8<7><1> 282 | uart1_cts = port:PG9<7><1> 283 | 284 | [uart2] 285 | uart2_used = 0 286 | uart2_port = 2 287 | uart2_type = 4 288 | uart2_tx = port:PB0<2><1> 289 | uart2_rx = port:PB1<2><1> 290 | uart2_rts = port:PB2<2><1> 291 | uart2_cts = port:PB3<2><1> 292 | 293 | [uart2_suspend] 294 | uart2_tx = port:PB0<7><1> 295 | uart2_rx = port:PB1<7><1> 296 | uart2_rts = port:PB2<7><1> 297 | uart2_cts = port:PB3<7><1> 298 | 299 | [uart3] 300 | uart3_used = 0 301 | uart3_port = 3 302 | uart3_type = 4 303 | uart3_tx = port:PH4<2><1> 304 | uart3_rx = port:PH5<2><1> 305 | uart3_rts = port:PH6<2><1> 306 | uart3_cts = port:PH7<2><1> 307 | 308 | [uart3_suspend] 309 | uart3_tx = port:PH4<7><1> 310 | uart3_rx = port:PH5<7><1> 311 | uart3_rts = port:PH6<7><1> 312 | uart3_cts = port:PH7<7><1> 313 | 314 | [uart4] 315 | uart4_used = 0 316 | uart4_port = 4 317 | uart4_type = 4 318 | uart4_tx = port:PD2<3><1> 319 | uart4_rx = port:PD3<3><1> 320 | uart4_rts = port:PD4<3><1> 321 | uart4_cts = port:PD5<3><1> 322 | 323 | [uart4_suspend] 324 | uart4_tx = port:PD2<7><1> 325 | uart4_rx = port:PD3<7><1> 326 | uart4_rts = port:PD4<7><1> 327 | uart4_cts = port:PD5<7><1> 328 | 329 | ;---------------------------------------------------------------------------------- 330 | ;SPI controller configuration 331 | ;---------------------------------------------------------------------------------- 332 | [spi0] 333 | spi0_used = 0 334 | spi0_cs_number = 1 335 | spi0_cs_bitmap = 1 336 | spi0_cs0 = port:PC3<4><1> 337 | spi0_sclk = port:PC2<4> 338 | spi0_mosi = port:PC0<4> 339 | spi0_miso = port:PC1<4> 340 | 341 | [spi0_suspend] 342 | spi0_cs0 = port:PC3<7><1> 343 | spi0_sclk = port:PC2<7> 344 | spi0_mosi = port:PC0<7> 345 | spi0_miso = port:PC1<7> 346 | 347 | [spi1] 348 | spi1_used = 0 349 | spi1_cs_number = 1 350 | spi1_cs_bitmap = 1 351 | spi1_cs0 = port:PD0<4><1> 352 | spi1_sclk = port:PD1<4> 353 | spi1_mosi = port:PD2<4> 354 | spi1_miso = port:PD3<4> 355 | 356 | [spi1_suspend] 357 | spi1_cs0 = port:PD0<7><1> 358 | spi1_sclk = port:PD1<7> 359 | spi1_mosi = port:PD2<7> 360 | spi1_miso = port:PD3<7> 361 | 362 | ;---------------------------------------------------------------------------------- 363 | ;SPI device configuration 364 | ;compatible --- device name 365 | ;spi-max-frequency --- work frequency 366 | ;reg --- chip select 367 | ;optional properties: spi-cpha, spi-cpol, spi-cs-high 368 | ;---------------------------------------------------------------------------------- 369 | ;[spi0/spi_board0] 370 | ;compatible = 371 | ;spi-max-frequency = 372 | ;reg = 373 | ;spi-cpha 374 | ;spi-cpol 375 | ;spi-cs-high 376 | 377 | ;---------------------------------------------------------------------------------- 378 | ;resistance tp configuration 379 | ;---------------------------------------------------------------------------------- 380 | [rtp_para] 381 | rtp_used = 0 382 | rtp_screen_size = 5 383 | rtp_regidity_level = 5 384 | rtp_press_threshold_enable = 0 385 | rtp_press_threshold = 0x1f40 386 | rtp_sensitive_level = 0xf 387 | rtp_exchange_x_y_flag = 0 388 | 389 | ;---------------------------------------------------------------------------------- 390 | ;capacitor tp configuration 391 | ;external int function 392 | ;wakeup output function 393 | ;notice --- tp_int_port & tp_io_port use the same port 394 | ;---------------------------------------------------------------------------------- 395 | [ctp] 396 | compatible = "allwinner,sun50i-ctp-para" 397 | ctp_used = 1 398 | ctp_name = "gt911_DB2" 399 | ctp_twi_id = 0 400 | ctp_twi_addr = 0x40 401 | ctp_screen_max_x = 1024 402 | ctp_screen_max_y = 600 403 | ctp_revert_x_flag = 1 404 | ctp_revert_y_flag = 1 405 | ctp_exchange_x_y_flag = 0 406 | 407 | ctp_int_port = port:PH04<6> 408 | ctp_wakeup = port:PH11<1><1> 409 | ctp_power_ldo = "vcc-ctp" 410 | ctp_power_ldo_vol = 3300 411 | ctp_power_io = 412 | 413 | ;-------------------------------------------------------------------------------- 414 | ; CTP automatic detection configuration 415 | ;ctp_detect_used --- Whether startup automatic inspection function. 1:used,0:unused 416 | ;Module name postposition 1 said detection, 0 means no detection. 417 | ;-------------------------------------------------------------------------------- 418 | [ctp_list] 419 | compatible = "allwinner,sun50i-ctp-list" 420 | ctp_list_used = 1 421 | 422 | gslX680new = 1 423 | gt9xx_ts = 0 424 | gt9xxf_ts = 1 425 | gt9xxnew_ts = 0 426 | gt82x = 1 427 | zet622x = 1 428 | aw5306_ts = 1 429 | 430 | ;---------------------------------------------------------------------------------- 431 | ;touch key configuration 432 | ;---------------------------------------------------------------------------------- 433 | [tkey_para] 434 | tkey_used = 0 435 | tkey_twi_id = 436 | tkey_twi_addr = 437 | tkey_int = 438 | 439 | ;---------------------------------------------------------------------------------- 440 | ;motor configuration 441 | ;---------------------------------------------------------------------------------- 442 | [motor_para] 443 | motor_used = 0 444 | motor_shake = port:power3<1><1> 445 | 446 | ;---------------------------------------------------------------------------------- 447 | ; nand0_dragonboard default is 0,only in dragonboard card boot mode must be set 1 448 | ;---------------------------------------------------------------------------------- 449 | [nand0_para] 450 | nand0_dragonboard = 0 451 | nand0_support_2ch = 0 452 | 453 | nand0_used = 1 454 | nand0_we = port:PC00<2><0><1> 455 | nand0_ale = port:PC01<2><0><1> 456 | nand0_cle = port:PC02<2><0><1> 457 | nand0_ce1 = port:PC03<2><1><1> 458 | nand0_ce0 = port:PC04<2><1><1> 459 | nand0_nre = port:PC05<2><0><1> 460 | nand0_rb0 = port:PC06<2><1><1> 461 | nand0_rb1 = port:PC07<2><1><1> 462 | nand0_d0 = port:PC08<2><0><1> 463 | nand0_d1 = port:PC09<2><0><1> 464 | nand0_d2 = port:PC10<2><0><1> 465 | nand0_d3 = port:PC11<2><0><1> 466 | nand0_d4 = port:PC12<2><0><1> 467 | nand0_d5 = port:PC13<2><0><1> 468 | nand0_d6 = port:PC14<2><0><1> 469 | nand0_d7 = port:PC15<2><0><1> 470 | nand0_ndqs = port:PC16<2><0><1> 471 | nand0_ce2 = port:PC17<2><1><1> 472 | nand0_ce3 = port:PC18<2><1><1> 473 | 474 | nand0_regulator1 = "vcc-nand" 475 | nand0_regulator2 = "none" 476 | nand0_cache_level = 0x55aaaa55 477 | nand0_flush_cache_num = 0x55aaaa55 478 | nand0_capacity_level = 0x55aaaa55 479 | nand0_id_number_ctl = 0x55aaaa55 480 | nand0_print_level = 0x55aaaa55 481 | nand0_p0 = 0x55aaaa55 482 | nand0_p1 = 0x55aaaa55 483 | nand0_p2 = 0x55aaaa55 484 | nand0_p3 = 0x55aaaa55 485 | 486 | ;---------------------------------------------------------------------------------- 487 | ;disp init configuration 488 | ; 489 | ;disp_mode (0:screen0) 490 | ;screenx_output_type (0:none; 1:lcd; 3:hdmi;) 491 | ;screenx_output_mode (used for hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50) 492 | ; (5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60) 493 | ;fbx format (0:ARGB 1:ABGR 2:RGBA 3:BGRA 5:RGB565 8:RGB888 12:ARGB4444 16:ARGB1555 18:RGBA5551) 494 | ;fbx_width,fbx_height (framebuffer horizontal/vertical pixels, fix to output resolution while equal 0) 495 | ;---------------------------------------------------------------------------------- 496 | [disp] 497 | disp_init_enable = 1 498 | disp_mode = 0 499 | 500 | screen0_output_type = 3 501 | screen0_output_mode = 5 502 | 503 | screen1_output_type = 1 504 | screen1_output_mode = 5 505 | 506 | fb0_format = 0 507 | fb0_width = 0 508 | fb0_height = 0 509 | 510 | fb1_format = 0 511 | fb1_width = 0 512 | fb1_height = 0 513 | 514 | ;---------------------------------------------------------------------------------- 515 | ;lcd0 configuration 516 | 517 | ;lcd_if: 0:hv(sync+de); 1:8080; 2:ttl; 3:lvds; 4:dsi; 5:edp 518 | ;lcd_backlight lcd init backlight 519 | ;lcd_x: lcd horizontal resolution 520 | ;lcd_y: lcd vertical resolution 521 | ;lcd_width: width of lcd in mm 522 | ;lcd_height: height of lcd in mm 523 | ;lcd_dclk_freq: in MHZ unit 524 | ;lcd_pwm_freq: in HZ unit 525 | ;lcd_pwm_pol: lcd backlight PWM polarity 526 | ;lcd_pwm_max_limit lcd backlight PWM max limit(<=255) 527 | ;lcd_hbp: hsync back porch 528 | ;lcd_ht: hsync total cycle 529 | ;lcd_vbp: vsync back porch 530 | ;lcd_vt: vysnc total cycle 531 | ;lcd_hspw: hsync plus width 532 | ;lcd_vspw: vysnc plus width 533 | ;lcd_lvds_if: 0:single link; 1:dual link 534 | ;lcd_lvds_colordepth: 0:8bit; 1:6bit 535 | ;lcd_lvds_mode: 0:NS mode; 1:JEIDA mode 536 | ;lcd_frm: 0:disable; 1:enable rgb666 dither; 2:enable rgb656 dither 537 | ;lcd_hv_clk_phase lcd hv panel lock phase, 0:0 degree; 1:90 degree; 2: 180 degree; 3: 270 degree 538 | ;lcd_hv_sync_polarity lcd hv panel sync signals polarity 539 | ; 0:vsync active low, hsync active low; 1:vsync active high, hsync active low 540 | ; 2:vsync active low, hsync active high; 3:vsync active high, hsync active high 541 | ;lcd_gamma_en lcd gamma correction enable 542 | ;lcd_bright_curve_en lcd bright curve correction enable 543 | ;lcd_cmap_en lcd color map function enable 544 | ;---------------------------------------------------------------------------------- 545 | [lcd0] 546 | lcd_used = 0 547 | 548 | lcd_driver_name = "mb709_mipi" 549 | lcd_backlight = 50 550 | lcd_if = 4 551 | lcd_x = 1024 552 | lcd_y = 600 553 | lcd_width = 0 554 | lcd_height = 0 555 | lcd_dclk_freq = 55 556 | lcd_pwm_used = 1 557 | lcd_pwm_ch = 16 558 | lcd_pwm_freq = 50000 559 | lcd_pwm_pol = 1 560 | lcd_pwm_max_limit = 250 561 | lcd_hbp = 120 562 | lcd_ht = 1540 563 | lcd_hspw = 20 564 | 565 | lcd_vbp = 23 566 | lcd_vt = 635 567 | lcd_vspw = 2 568 | 569 | lcd_dsi_if = 2 570 | lcd_dsi_lane = 4 571 | lcd_dsi_format = 0 572 | lcd_dsi_eotp = 0 573 | lcd_dsi_vc = 0 574 | lcd_dsi_te = 0 575 | lcd_frm = 0 576 | lcd_gamma_en = 0 577 | lcd_bright_curve_en = 0 578 | lcd_cmap_en = 0 579 | 580 | lcd_bl_en = port:PH10<1><0><1> 581 | lcd_bl_en_power = "none" 582 | lcd_power = "vcc-mipi" 583 | lcd_fix_power = "vcc-dsi-33" 584 | lcd_gpio_0 = port:PD24<1><0><1> 585 | 586 | ;lcdd0 = port:PD12<3><0> 587 | ;lcdd1 = port:PD13<3><0> 588 | ;lcdd2 = port:PD14<3><0> 589 | ;lcdd3 = port:PD15<3><0> 590 | ;lcdd4 = port:PD16<3><0> 591 | ;lcdd5 = port:PD17<3><0> 592 | ;lcdd6 = port:PD18<3><0> 593 | ;lcdd7 = port:PD19<3><0> 594 | ;lcdd8 = port:PD20<3><0> 595 | ;lcdd9 = port:PD21<3><0> 596 | ;lcd_pin_power = "vcc-pd" 597 | 598 | [lcd0_suspend] 599 | ;lcdd0 = port:PD12<7><0> 600 | ;lcdd1 = port:PD13<7><0> 601 | ;lcdd2 = port:PD14<7><0> 602 | ;lcdd3 = port:PD15<7><0> 603 | ;lcdd4 = port:PD16<7><0> 604 | ;lcdd5 = port:PD17<7><0> 605 | ;lcdd6 = port:PD18<7><0> 606 | ;lcdd7 = port:PD19<7><0> 607 | ;lcdd8 = port:PD20<7><0> 608 | ;lcdd9 = port:PD21<7><0> 609 | 610 | [hdmi] 611 | hdmi_used = 1 612 | hdmi_power = "vcc-hdmi-33" 613 | hdmi_hdcp_enable = 0 614 | hdmi_cts_compatibility = 0 615 | 616 | ;---------------------------------------------------------------------------------- 617 | ;pwm config 618 | ;---------------------------------------------------------------------------------- 619 | [pwm0] 620 | pwm_used = 0 621 | pwm_positive = port:PD22<2><0> 622 | 623 | [pwm0_suspend] 624 | pwm_positive = port:PD22<7><0> 625 | 626 | ;[pwm16] 627 | [spwm0] 628 | s_pwm0_used = 1 629 | pwm_positive = port:PL10<2><0> 630 | 631 | ;[pwm16_suspend] 632 | [spwm0_suspend] 633 | pwm_positive = port:PL10<7><0> 634 | 635 | [boot_disp] 636 | output_disp = 0 637 | output_type = 3 638 | output_mode = 5 639 | 640 | ;-------------------------------------------------------------------------------- 641 | ;csi (COMS Sensor Interface) configuration 642 | ;csi(x)_dev(x)_used: 0:disable 1:enable 643 | ;csi(x)_dev(x)_isp_used 0:not use isp 1:use isp 644 | ;csi(x)_dev(x)_fmt: 0:yuv 1:bayer raw rgb 645 | ;csi(x)_dev(x)_stby_mode: 0:not shut down power at standby 1:shut down power at standby 646 | ;csi(x)_dev(x)_vflip: flip in vertical direction 0:disable 1:enable 647 | ;csi(x)_dev(x)_hflip: flip in horizontal direction 0:disable 1:enable 648 | ;csi(x)_dev(x)_iovdd: camera module io power handle string, pmu power supply 649 | ;csi(x)_dev(x)_iovdd_vol: camera module io power voltage, pmu power supply 650 | ;csi(x)_dev(x)_avdd: camera module analog power handle string, pmu power supply 651 | ;csi(x)_dev(x)_avdd_vol: camera module analog power voltage, pmu power supply 652 | ;csi(x)_dev(x)_dvdd: camera module core power handle string, pmu power supply 653 | ;csi(x)_dev(x)_dvdd_vol: camera module core power voltage, pmu power supply 654 | ;csi(x)_dev(x)_afvdd: camera module vcm power handle string, pmu power supply 655 | ;csi(x)_dev(x)_afvdd_vol: camera module vcm power voltage, pmu power supply 656 | ;fill voltage in uV, e.g. iovdd = 2.8V, csix_iovdd_vol = 2800000 657 | ;fill handle string as below: 658 | ;axp22_eldo3 659 | ;axp22_dldo4 660 | ;axp22_eldo2 661 | ;fill handle string "" when not using any pmu power supply 662 | ;-------------------------------------------------------------------------------- 663 | 664 | [csi0] 665 | csi0_used = 1 666 | csi0_sensor_list = 1 667 | csi0_pck = port:PE00<2> 668 | csi0_mck = port:PE01<0><0><1><0> 669 | csi0_hsync = port:PE02<2> 670 | csi0_vsync = port:PE03<2> 671 | csi0_d0 = port:PE04<2> 672 | csi0_d1 = port:PE05<2> 673 | csi0_d2 = port:PE06<2> 674 | csi0_d3 = port:PE07<2> 675 | csi0_d4 = port:PE08<2> 676 | csi0_d5 = port:PE09<2> 677 | csi0_d6 = port:PE10<2> 678 | csi0_d7 = port:PE11<2> 679 | csi0_sck = port:PE12<2> 680 | csi0_sda = port:PE13<2> 681 | 682 | [csi0/csi0_dev0] 683 | csi0_dev0_used = 1 684 | csi0_dev0_mname = "s5k4ec" 685 | csi0_dev0_twi_addr = 0x5a 686 | csi0_dev0_pos = "rear" 687 | csi0_dev0_isp_used = 1 688 | csi0_dev0_fmt = 0 689 | csi0_dev0_stby_mode = 1 690 | csi0_dev0_vflip = 0 691 | csi0_dev0_hflip = 0 692 | csi0_dev0_iovdd = "iovdd-csi" 693 | csi0_dev0_iovdd_vol = 2800000 694 | csi0_dev0_avdd = "avdd-csi" 695 | csi0_dev0_avdd_vol = 2800000 696 | csi0_dev0_dvdd = "dvdd-csi-18" 697 | csi0_dev0_dvdd_vol = 1500000 698 | csi0_dev0_afvdd = "" 699 | csi0_dev0_afvdd_vol = 700 | csi0_dev0_power_en = 701 | csi0_dev0_reset = port:PE16<0><0><1><0> 702 | csi0_dev0_pwdn = port:PE17<0><0><1><0> 703 | csi0_dev0_flash_used = 0 704 | csi0_dev0_flash_type = 2 705 | csi0_dev0_flash_en = 706 | csi0_dev0_flash_mode = 707 | csi0_dev0_flvdd = "vdd-csi-led" 708 | csi0_dev0_flvdd_vol = 3300000 709 | csi0_dev0_af_pwdn = 710 | csi0_dev0_act_used = 0 711 | csi0_dev0_act_name = "ad5820_act" 712 | csi0_dev0_act_slave = 0x18 713 | 714 | [csi0/csi0_dev1] 715 | csi0_dev1_used = 0 716 | csi0_dev1_mname = "gc2145" 717 | csi0_dev1_twi_addr = 0x78 718 | csi0_dev1_pos = "front" 719 | csi0_dev1_isp_used = 1 720 | csi0_dev1_fmt = 0 721 | csi0_dev1_stby_mode = 1 722 | csi0_dev1_vflip = 0 723 | csi0_dev1_hflip = 0 724 | csi0_dev1_iovdd = "iovdd-csi" 725 | csi0_dev1_iovdd_vol = 2800000 726 | csi0_dev1_avdd = "avdd-csi" 727 | csi0_dev1_avdd_vol = 2800000 728 | csi0_dev1_dvdd = "dvdd-csi-18" 729 | csi0_dev1_dvdd_vol = 1800000 730 | csi0_dev1_afvdd = "" 731 | csi0_dev1_afvdd_vol = 732 | csi0_dev1_power_en = 733 | csi0_dev1_reset = port:PE16<0><0><1><0> 734 | csi0_dev1_pwdn = port:PE17<0><0><1><0> 735 | csi0_dev1_flash_used = 0 736 | csi0_dev1_flash_type = 2 737 | csi0_dev1_flash_en = 738 | csi0_dev1_flash_mode = 739 | csi0_dev1_flvdd = "vdd-csi-led" 740 | csi0_dev1_flvdd_vol = 3300000 741 | csi0_dev1_af_pwdn = 742 | csi0_dev1_act_used = 0 743 | csi0_dev1_act_name = "ad5820_act" 744 | csi0_dev1_act_slave = 0x18 745 | 746 | ;-------------------------------------------------------------------------------- 747 | ;tv configuration 748 | ; 749 | ;-------------------------------------------------------------------------------- 750 | [tvout_para] 751 | tvout_used = 752 | tvout_channel_num = 753 | tv_en = 754 | 755 | [tvin_para] 756 | tvin_used = 757 | tvin_channel_num = 758 | 759 | ; ------------------------------------------------------------------------------| 760 | ; de-interlace configuration 761 | ;-------------------------------------------------------------------------------- 762 | [di] 763 | di_used = 1 764 | 765 | ;-------------------------------------------------------------------------------- 766 | ; SDMMC PINS MAPPING | 767 | ; ------------------------------------------------------------------------------| 768 | ; Config Guide | 769 | ; sdc_used: 1-enable card, 0-disable card | 770 | ; non-removable:if you use as main memory,you should set it,for example eMMC | 771 | ; bus-width: card bus width, 1-1bit, 4-4bit, 8-8bit | 772 | ; sunxi-power-save-mode: if use sdio card,should not set it | 773 | ; vmmc:regulator for card/emmc power | 774 | ; vqmmc:regulator for card/emmc io power | 775 | ; vdmmc:regulator for card detect pin pull up power | 776 | ; other: GPIO Mapping configuration | 777 | ; ------------------------------------------------------------------------------| 778 | ; Note: | 779 | ; | 780 | ; | 781 | ; | 782 | ; | 783 | ; | 784 | ; | 785 | ;-------------------------------------------------------------------------------- 786 | 787 | [sdc0] 788 | sdc0_used = 1 789 | bus-width = 4 790 | sdc0_d1 = port:PF00<2><1><3> 791 | sdc0_d0 = port:PF01<2><1><3> 792 | sdc0_clk = port:PF02<2><1><3> 793 | sdc0_cmd = port:PF03<2><1><3> 794 | sdc0_d3 = port:PF04<2><0><2> 795 | sdc0_d2 = port:PF05<2><1><3> 796 | cd-gpios = port:PF06<0><1><3> 797 | sunxi-power-save-mode = 798 | sunxi-dis-signal-vol-sw = 799 | vmmc = "none" 800 | vqmmc = "none" 801 | vdmmc = "vcc-sdc" 802 | cd-inverted = 803 | data3-detect = 804 | 805 | [sdc1] 806 | sdc1_used = 1 807 | bus-width = 4 808 | sdc1_clk = port:PG00<2><1><3> 809 | sdc1_cmd = port:PG01<2><1><3> 810 | sdc1_d0 = port:PG02<2><1><3> 811 | sdc1_d1 = port:PG03<2><1><3> 812 | sdc1_d2 = port:PG04<2><1><3> 813 | sdc1_d3 = port:PG05<2><1><3> 814 | ;sunxi-power-save-mode = 815 | sd-uhs-sdr50 = 816 | sd-uhs-ddr50 = 817 | sd-uhs-sdr104 = 818 | cap-sdio-irq = 819 | keep-power-in-suspend = 820 | ignore-pm-notify = 821 | max-frequency = 150000000 822 | 823 | 824 | [sdc2] 825 | sdc2_used = 1 826 | non-removable = 827 | bus-width = 8 828 | sdc2_ds = port:PC01<3><1><3> 829 | sdc2_clk = port:PC05<3><1><3> 830 | sdc2_cmd = port:PC06<3><1><3> 831 | sdc2_d0 = port:PC08<3><1><3> 832 | sdc2_d1 = port:PC09<3><1><3> 833 | sdc2_d2 = port:PC10<3><1><3> 834 | sdc2_d3 = port:PC11<3><1><3> 835 | sdc2_d4 = port:PC12<3><1><3> 836 | sdc2_d5 = port:PC13<3><1><3> 837 | sdc2_d6 = port:PC14<3><1><3> 838 | sdc2_d7 = port:PC15<3><1><3> 839 | sdc2_emmc_rst = port:PC16<3><1><3> 840 | cd-gpios = 841 | sunxi-power-save-mode = 842 | sunxi-dis-signal-vol-sw = 843 | mmc-ddr-1_8v = 844 | mmc-hs200-1_8v = 845 | ;mmc-hs400-1_8v = 846 | max-frequency = 100000000 847 | sdc_tm4_sm0_freq0 = 0 848 | sdc_tm4_sm0_freq1 = 0 849 | sdc_tm4_sm1_freq0 = 0x00000000 850 | sdc_tm4_sm1_freq1 = 0 851 | sdc_tm4_sm2_freq0 = 0x00000000 852 | sdc_tm4_sm2_freq1 = 0 853 | sdc_tm4_sm3_freq0 = 0x05000000 854 | sdc_tm4_sm3_freq1 = 0x00000405 855 | sdc_tm4_sm4_freq0 = 0x00050000 856 | sdc_tm4_sm4_freq1 = 0x00000408 857 | vmmc = "vcc-emmc" 858 | vqmmc = "vcc-lpddr" 859 | ;vqmmc = "none" 860 | vdmmc = "none" 861 | 862 | ;[mmc3] 863 | ;mmc3_used = 0 864 | ;mmc3_detmode = 2 865 | ;mmc3_buswidth = 4 866 | ;mmc3_clk = port:PA10<2><1><2> 867 | ;mmc3_cmd = port:PA09<2><1><2> 868 | ;mmc3_d0 = port:PA11<2><1><2> 869 | ;mmc3_d1 = port:PA12<2><1><2> 870 | ;mmc3_d2 = port:PA13<2><1><2> 871 | ;mmc3_d3 = port:PA14<2><1><2> 872 | ;mmc3_det = 873 | ;mmc3_use_wp = 0 874 | ;mmc3_wp = 875 | ;mmc3_isio = 0 876 | ;mmc3_regulator = "none" 877 | 878 | ; ------------------------------------------------------------------------------| 879 | ; sim card configuration 880 | ;-------------------------------------------------------------------------------- 881 | [smc] 882 | smc_used = 883 | smc_rst = 884 | smc_vppen = 885 | smc_vppp = 886 | smc_det = 887 | smc_vccen = 888 | smc_sck = 889 | smc_sda = 890 | 891 | ;-------------------------------- 892 | ;[usbc0]: usbc0 configuration. 893 | ;usb_used: usb controller enable. 0-disable, 1-enable. 894 | ;usb_port_type: usb mode. 0-device, 1-host, 2-otg. 895 | ;usb_detect_type: usb hotplug detect mode. 0-none, 1-vbus/id detect, 2-id/dpdm detect. 896 | ;usb_detect_mode: usb otg switch has two config. 0-thread scan, 1-id gpio interrupt. 897 | ;usb_id_gpio: usb id detect IO. 898 | ;usb_det_vbus_gpio: USB DET_VBUS has two config. (1)gpio pin; (2)"axp_ctrl", use axp intf. 899 | ;usb_drv_vbus_gpio: USB DRY_VBUS has two config. (1)gpio pin; (2)"axp_ctrl", use axp intf. 900 | ;-------------------------------- 901 | ;-------------------------------- 902 | ;--- USB0 CONFIG 903 | ;-------------------------------- 904 | [usbc0] 905 | usbc0_used = 1 906 | usb_port_type = 1 907 | usb_detect_type = 0 908 | usb_detect_mode = 0 909 | usb_id_gpio = 910 | usb_det_vbus_gpio = 911 | usb_drv_vbus_gpio = 912 | usb_host_init_state = 1 913 | usb_regulator_io = "nocare" 914 | usb_wakeup_suspend = 1 915 | ;--- USB Device 916 | usb_luns = 3 917 | usb_serial_unique = 1 918 | usb_serial_number = "20080411" 919 | rndis_wceis = 1 920 | 921 | ;-------------------------------- 922 | ;--- USB1 CONFIG 923 | ;-------------------------------- 924 | [usbc1] 925 | usbc1_used = 1 926 | usb_port_type = 1 927 | usb_detect_type = 0 928 | usb_drv_vbus_gpio = 929 | usb_host_init_state = 1 930 | usb_regulator_io = "nocare" 931 | usb_wakeup_suspend = 1 932 | ;--- HSIC config 933 | usb_hsic_used = 0 934 | usb_hsic_regulator_io = "vcc-hsic-12" 935 | ;--- Marvell 4G HSIC 936 | usb_hsic_ctrl = 0 937 | usb_hsic_rdy_gpio = 938 | ;--- SMSC usb3503 HSIC HUB 939 | usb_hsic_usb3503_flag = 0 940 | usb_hsic_hub_connect_gpio = 941 | usb_hsic_int_n_gpio = 942 | usb_hsic_reset_n_gpio = 943 | 944 | ;-------------------------------- 945 | ;--- 序列号标志 946 | ;-------------------------------- 947 | [serial_feature] 948 | sn_filename = "sn.txt" 949 | 950 | ;-------------------------------------------------------------------------------- 951 | ; G sensor configuration 952 | ; gs_twi_id --- TWI ID for controlling Gsensor (0: TWI0, 1: TWI1, 2: TWI2) 953 | ;-------------------------------------------------------------------------------- 954 | [gsensor] 955 | compatible = "allwinner,sun50i-gsensor-para" 956 | gsensor_used = 0 957 | gsensor_twi_id = 1 958 | gsensor_twi_addr = 0x1d 959 | gsensor_vcc_io = "vcc-io" 960 | gsensor_vcc_io_val = 3300 961 | gsensor_int1 = port:PH05<6><1> 962 | gsensor_int2 = port:PH06<6><1> 963 | 964 | ;-------------------------------------------------------------------------------- 965 | ; G sensor automatic detection configuration 966 | ;gsensor_detect_used --- Whether startup automatic inspection function. 1:used,0:unused 967 | ;Module name postposition 1 said detection, 0 means no detection. 968 | ;-------------------------------------------------------------------------------- 969 | [gsensor_list] 970 | compatible = "allwinner,sun50i-gsensor-list-para" 971 | gsensor_list_used = 1 972 | lsm9ds0_acc_mag = 0 973 | bma250 = 1 974 | mma8452 = 0 975 | mma7660 = 0 976 | mma865x = 0 977 | afa750 = 0 978 | lis3de_acc = 0 979 | lis3dh_acc = 0 980 | kxtik = 0 981 | dmard10 = 0 982 | dmard06 = 0 983 | mxc622x = 0 984 | fxos8700 = 0 985 | lsm303d = 0 986 | sc7a30 = 0 987 | 988 | ;-------------------------------------------------------------------------------- 989 | ;wlan configuration 990 | ;wlan_used: 0-not use, 1- use 991 | ;wlan_busnum: sdio/usb index 992 | ;clocks: external low power clock input (32.768KHz) 993 | ;wlan_power: input supply voltage 994 | ;wlan_io_regulator: wlan/sdio I/O voltage 995 | ;wlan_regon: power up/down internal regulators used by wifi section 996 | ;wlan_hostwake: wlan to wake-up host 997 | ;-------------------------------------------------------------------------------- 998 | [wlan] 999 | wlan_used = 1 1000 | wlan_busnum = 1 1001 | clocks = 1002 | wlan_power = 1003 | wlan_io_regulator = "vcc-wifi-io" 1004 | wlan_regon = port:PL02<1><0> 1005 | wlan_hostwake = port:PL03<6><0> 1006 | 1007 | ;-------------------------------------------------------------------------------- 1008 | ;bluetooth configuration 1009 | ;bt_used: 0- no used, 1- used 1010 | ;clocks: external low power clock input (32.768KHz) 1011 | ;bt_power: input supply voltage 1012 | ;bt_io_regulator: bluetooth I/O voltage 1013 | ;bt_rst_n: power up/down internal regulators used by BT section 1014 | ;-------------------------------------------------------------------------------- 1015 | [bt] 1016 | bt_used = 1 1017 | clocks = 1018 | bt_power = 1019 | bt_io_regulator = "vcc-wifi-io" 1020 | bt_rst_n = port:PL04<1><0> 1021 | 1022 | ;-------------------------------------------------------------------------------- 1023 | ;bluetooth lpm configuration 1024 | ;btlpm_used: 0- no used, 1- used 1025 | ;uart_index: 0- uart0, 1- uart1, 2- uart2 1026 | ;bt_wake: host wake-up bluetooth device 1027 | ;bt_hostwake: bt device wake-up host 1028 | ;-------------------------------------------------------------------------------- 1029 | [btlpm] 1030 | btlpm_used = 1 1031 | uart_index = 1 1032 | bt_wake = port:PL06<1><1> 1033 | bt_hostwake = port:PL05<6><0> 1034 | 1035 | ;-------------------------------------------------------------------------------- 1036 | ;3G configuration 1037 | ;-------------------------------------------------------------------------------- 1038 | [3g_para] 1039 | 3g_used = 0 1040 | 3g_usbc_num = 2 1041 | 3g_uart_num = 0 1042 | bb_vbat = port:PL03<1><0> 1043 | bb_host_wake = port:PM00<1><0> 1044 | bb_on = port:PM01<1><0> 1045 | bb_pwr_on = port:PM03<1><0> 1046 | bb_wake = port:PM04<1><0> 1047 | bb_rf_dis = port:PM05<1><0> 1048 | bb_rst = port:PM06<1><0> 1049 | 3g_int = 1050 | 1051 | ;-------------------------------------------------------------------------------- 1052 | ;gyroscope 1053 | ;-------------------------------------------------------------------------------- 1054 | [gyroscopesensor] 1055 | compatible ="allwinner,sun50i-gyr_sensors-para" 1056 | gyroscopesensor_used = 0 1057 | gy_twi_id = 2 1058 | gy_twi_addr = 0x6a 1059 | gy_int1 = port:PA10<6><1> 1060 | gy_int2 = 1061 | 1062 | ;-------------------------------------------------------------------------------- 1063 | ; Gyro automatic detection configuration 1064 | ;gy_detect_used --- Whether startup automatic inspection function. 1:used,0:unused 1065 | ;Module name postposition 1 said detection, 0 means no detection. 1066 | ;-------------------------------------------------------------------------------- 1067 | [gy_list] 1068 | compatible ="allwinner,sun50i-gyr_sensors-list-para" 1069 | gy_list_used = 0 1070 | lsm9ds0_gyr = 1 1071 | l3gd20_gyr = 0 1072 | bmg160_gyr = 1 1073 | 1074 | 1075 | ;-------------------------------------------------------------------------------- 1076 | ;light sensor 1077 | ;-------------------------------------------------------------------------------- 1078 | [lightsensor] 1079 | compatible ="allwinner,sun50i-lsensors-para" 1080 | lightsensor_used =0 1081 | ls_twi_id = 2 1082 | ls_twi_addr = 0x23 1083 | ls_int = port:PA12<6><1> 1084 | 1085 | ;-------------------------------------------------------------------------------- 1086 | ; lsensor automatic detection configuration 1087 | ;ls_detect_used --- Whether startup automatic inspection function. 1:used,0:unused 1088 | ;Module name postposition 1 said detection, 0 means no detection. 1089 | ;-------------------------------------------------------------------------------- 1090 | [ls_list] 1091 | compatible ="allwinner,sun50i-lsensors-list-para" 1092 | ls_list_used =0 1093 | ltr_501als = 1 1094 | jsa1212 = 0 1095 | jsa1127 = 1 1096 | stk3x1x = 0 1097 | 1098 | ;-------------------------------------------------------------------------------- 1099 | ;compass 1100 | ;-------------------------------------------------------------------------------- 1101 | [compasssensor] 1102 | compatible ="allwinner,sun50i-compass-para" 1103 | compasssensor_used = 0 1104 | compass_twi_id = 2 1105 | compass_twi_addr = 0x0d 1106 | compass_int = port:PA11<6><1> 1107 | 1108 | 1109 | ;-------------------------------------------------------------------------------- 1110 | ; compass sensor automatic detection configuration 1111 | ;compass_detect_used --- Whether startup automatic inspection function. 1:used,0:unused 1112 | ;Module name postposition 1 said detection, 0 means no detection. 1113 | ;-------------------------------------------------------------------------------- 1114 | [compass_list] 1115 | compatible ="allwinner,sun50i-compass-list-para" 1116 | compass_list_used = 0 1117 | lsm9ds0 = 1 1118 | lsm303d = 0 1119 | ;akm8963 = 1 1120 | 1121 | ;-------------------------------------------------------------------------------- 1122 | ; NOTE :Make sure spdif_used = 0x1,spdifmach_used = 0x1, 1123 | ; if register the sound card spdif. 1124 | ;-------------------------------------------------------------------------------- 1125 | [spdif] 1126 | spdif_used = 0 1127 | [sndspdif] 1128 | sndspdif_used = 0 1129 | ;---------------------------------------------------------------------------------- 1130 | ; NOTE :Make sure daudio2_used = 0x1,sndhdmi_used = 0x1, 1131 | ; if register the sound card hdmi. 1132 | ;--------------------------------------------------------------------------------- 1133 | [daudio2] 1134 | daudio2_used = 1 1135 | [sndhdmi] 1136 | sndhdmi_used = 1 1137 | ;-------------------------------------------------------------------------------- 1138 | ;allwinner,pcm_lrck_period :16/32/64/128/256 1139 | ;allwinner,pcm_lrckr_period :no use 1140 | ;allwinner,slot_width_select :16bits/20bits/24bits/32bits 1141 | ;allwinner,pcm_lsb_first :0: msb first; 1: lsb first 1142 | ;allwinner,tx_data_mode :0: 16bit linear PCM; 1: 8bit linear PCM; 2: 8bit u-law; 3: 8bit a-law 1143 | ;allwinner,rx_data_mode :0: 16bit linear PCM; 1: 8bit linear PCM; 2: 8bit u-law; 3: 8bit a-law 1144 | ;allwinner,daudio_master :1: SND_SOC_DAIFMT_CBM_CFM(codec clk & FRM master) use 1145 | ; 2: SND_SOC_DAIFMT_CBS_CFM(codec clk slave & FRM master) not use 1146 | ; 3: SND_SOC_DAIFMT_CBM_CFS(codec clk master & frame slave) not use 1147 | ; 4: SND_SOC_DAIFMT_CBS_CFS(codec clk & FRM slave) use 1148 | ;allwinner,audio_format: 1:SND_SOC_DAIFMT_I2S(standard i2s format). use 1149 | ; 2:SND_SOC_DAIFMT_RIGHT_J(right justfied format). 1150 | ; 3:SND_SOC_DAIFMT_LEFT_J(left justfied format) 1151 | ; 4:SND_SOC_DAIFMT_DSP_A(pcm. MSB is available on 2nd BCLK rising edge after LRC rising edge). use 1152 | ; 5:SND_SOC_DAIFMT_DSP_B(pcm. MSB is available on 1nd BCLK rising edge after LRC rising edge) 1153 | ;allwinner,signal_inversion:1:SND_SOC_DAIFMT_NB_NF(normal bit clock + frame) use 1154 | ; 2:SND_SOC_DAIFMT_NB_IF(normal BCLK + inv FRM) 1155 | ; 3:SND_SOC_DAIFMT_IB_NF(invert BCLK + nor FRM) use 1156 | ; 4:SND_SOC_DAIFMT_IB_IF(invert BCLK + FRM) 1157 | ;allwinner,frametype :0: long frame = 2 clock width; 1: short frame 1158 | ;allwinner,tdm_config :0:pcm 1:i2s 1159 | ;allwinner,daudio0_used :0:not use 1:use 1160 | 1161 | ;-------------------------------------------------------------------------------- 1162 | ; NOTE :Make sure snddaudio0_used = 0x1,daudio1_used = 0x1, 1163 | ; if register the sound card DAUDIO1. 1164 | ;-------------------------------------------------------------------------------- 1165 | [snddaudio0] 1166 | snddaudio0_used = 0 1167 | ;----------------------------------------------------------------------------- 1168 | [daudio0] 1169 | pcm_lrck_period = 0x20 1170 | pcm_lrckr_period = 0x01 1171 | slot_width_select = 0x20 1172 | pcm_lsb_first = 0x0 1173 | tx_data_mode = 0x0 1174 | rx_data_mode = 0x0 1175 | daudio_master = 0x04 1176 | audio_format = 0x01 1177 | signal_inversion = 0x01 1178 | frametype = 0x0 1179 | tdm_config = 0x01 1180 | daudio0_used = 0 1181 | 1182 | ;------------------------------------------------------------------------------- 1183 | ; NOTE :Make sure snddaudio1_used = 0x1,daudio0_used = 0x1, 1184 | ; if register the sound card DAUDIO0. 1185 | ;-------------------------------------------------------------------------------- 1186 | [snddaudio1] 1187 | snddaudio1_used = 0 1188 | ;----------------------------------------------------------------------------- 1189 | [daudio1] 1190 | pcm_lrck_period = 0x20 1191 | pcm_lrckr_period = 0x01 1192 | slot_width_select = 0x20 1193 | pcm_lsb_first = 0x0 1194 | tx_data_mode = 0x0 1195 | rx_data_mode = 0x0 1196 | daudio_master = 0x04 1197 | audio_format = 0x01 1198 | signal_inversion = 0x01 1199 | frametype = 0x0 1200 | tdm_config = 0x01 1201 | daudio1_used = 0 1202 | ;---------------------------------------------------------------------------------------------------------- 1203 | ;-------------------------------------------------------------------------------------- 1204 | ;allwinner,headphonevol :headphone volume:0x0--0x3f 0db--(-62db) 1db/step 1205 | ;allwinner,spkervol : speaker volume:0x0--0x1f 0db-(-43.5db) 1.5db/step 1206 | ;allwinner,earpiecevol : earpiece volume:0x0--0x1f 0db-(-43.5db) 1.5db/step 1207 | ;allwinner,maingain : mainmic gain:0x0---0x7 0x0-0db 0x1:24db 3db/step 1208 | ;allwinner,headsetmicgain : headphonemic gain:0x0---0x7 0x0-0db 0x1:24db 3db/step 1209 | ;allwinner,adcagc_cfg : 1:use adcagc 0:no use 1210 | ;allwinner,adcdrc_cfg : 1:use adcdrc 0:no use 1211 | ;allwinner,adchpf_cfg : 1:use adchpf 0:no use 1212 | ;allwinner,dacdrc_cfg : 1:use adcdrc 0:no use 1213 | ;allwinner,dachpf_cfg : 1:use adchpf 0:no use 1214 | ;allwinner,aif2config : 1:use aif2 0:no use 1215 | ;allwinner,aif3config : 1:use aif3 0:no use 1216 | ;allwinner,hp_detect_case :0:low 1:high 1217 | ;-------------------------------------------------------------------------------- 1218 | ; NOTE :Make sure sndcodec_used = 0x1,i2s_used = 0x1 1219 | ; codec_used = 0x1,if register the sound card audiocodec. 1220 | ;--------------------------------------------------------------------------------- 1221 | [sndcodec] 1222 | sndcodec_used = 0x1 1223 | aif2fmt = 0x3 1224 | aif3fmt = 0x3 1225 | aif2master = 0x1 1226 | hp_detect_case = 0x1 1227 | ;------------------------------------------------------------------------------ 1228 | [i2s] 1229 | i2s_used = 0x1 1230 | ;------------------------------------------------------------------------------- 1231 | [codec] 1232 | codec_used = 0x1 1233 | headphonevol = 0x3b 1234 | spkervol = 0x1a 1235 | earpiecevol = 0x1e 1236 | maingain = 0x4 1237 | headsetmicgain = 0x4 1238 | adcagc_cfg = 0x0 1239 | adcdrc_cfg = 0x0 1240 | adchpf_cfg = 0x0 1241 | dacdrc_cfg = 0x0 1242 | dachpf_cfg = 0x0 1243 | aif2config = 0x0 1244 | aif3config = 0x0 1245 | aif1_lrlk_div = 0x40 1246 | aif2_lrlk_div = 0x40 1247 | pa_sleep_time = 0x15e 1248 | dac_digital_vol = 0x9898 1249 | gpio-spk = port:PH07<2><1> 1250 | 1251 | ;---------------------------------------------------------------------------------- 1252 | ;ir --- infra remote configuration 1253 | ;---------------------------------------------------------------------------------- 1254 | [s_cir0] 1255 | s_cir0_used = 1 1256 | ir_power_key_code = 0x4D 1257 | ir_addr_code = 0x4040 1258 | 1259 | ;------------------------------------------------------------------------------------- 1260 | ;used ---0:not used,1:used 1261 | ;pmu_id ---0:axp19x,1:axp209,2:axp22x,3:axp806,4:axp808,5:axp809,6:axp803,7:axp813 1262 | ;pmu_twi_addr ---slave address 1263 | ;pmu_twi_id ---i2c bus number (0 TWI0, 1 TWI2, 2 TWI3) 1264 | ;pmu_irq_id ---irq number (0 irq0,1 irq1) 1265 | ;pmu_chg_ic_temp ---intelligence charge pmu temperature. when it is 0, this function is closed. 1266 | ;pmu_battery_rdc ---battery initial resistance 1267 | ;pmu_battery_cap ---battery capability,mAh 1268 | ;pmu_runtime_chgcur ---set initial charging current limite,mA, 200/400/600/800/1000/1200/1400/1600/1800...3000/ 1269 | ;pmu_suspend_chgcur ---set suspend charging current limite,mA, 200/400/600/800/1000/1200/1400/1600/1800...3000/ 1270 | ;pmu_shutdown_chgcur ---set shutdown charging current limite,mA,200/400/600/800/1000/1200/1400/1600/1800...3000/ 1271 | ;pmu_init_chgvol ---set initial charing target voltage,mV,4100/4220/4200/4240 1272 | ;pmu_ac_vol ---set usb-ac limited voltage level,mV,4000/4100/4200/4300/4400/4500/4600/4700,0 - not limite 1273 | ;pmu_ac_cur ---set usb-ac limited current level,mA,500/900, 0 - not limite 1274 | ;pmu_usbpc_vol ---set usb-pc limited voltage level,mV,4000/4100/4200/4300/4400/4500/4600/4700,0 - not limite 1275 | ;pmu_usbpc_cur ---set usb-pc limited current level,mA,500/900, 0 - not limite 1276 | ;pmu_battery_warning_level1 ---low power warning high level,5%-20%,1%/step 1277 | ;pmu_battery_warning_level2 ---low power warning low level,0%-15%,1%/step 1278 | ;pmu_chgled_func ---CHGKED pin control, 0:controlled by pmu,1:controlled by Charger 1279 | ;pmu_chgled_type ---CHGLED Type select when pmu_chgled_func=0,0:Type A, 1:type B 1280 | ;pmu_bat_para1 ---battery indication at 3.13V 1281 | ;pmu_bat_para2 ---battery indication at 3.27V 1282 | ;pmu_bat_para3 ---battery indication at 3.34V 1283 | ;pmu_bat_para4 ---battery indication at 3.41V 1284 | ;pmu_bat_para5 ---battery indication at 3.48V 1285 | ;pmu_bat_para6 ---battery indication at 3.52V 1286 | ;pmu_bat_para7 ---battery indication at 3.55V 1287 | ;pmu_bat_para8 ---battery indication at 3.57V 1288 | ;pmu_bat_para9 ---battery indication at 3.59V 1289 | ;pmu_bat_para10 ---battery indication at 3.61V 1290 | ;pmu_bat_para11 ---battery indication at 3.63V 1291 | ;pmu_bat_para12 ---battery indication at 3.64V 1292 | ;pmu_bat_para13 ---battery indication at 3.66V 1293 | ;pmu_bat_para14 ---battery indication at 3.7V 1294 | ;pmu_bat_para15 ---battery indication at 3.73V 1295 | ;pmu_bat_para16 ---battery indication at 3.77V 1296 | ;pmu_bat_para17 ---battery indication at 3.78V 1297 | ;pmu_bat_para18 ---battery indication at 3.8V 1298 | ;pmu_bat_para19 ---battery indication at 3.82V 1299 | ;pmu_bat_para20 ---battery indication at 3.84V 1300 | ;pmu_bat_para21 ---battery indication at 3.85V 1301 | ;pmu_bat_para22 ---battery indication at 3.87V 1302 | ;pmu_bat_para23 ---battery indication at 3.91V 1303 | ;pmu_bat_para24 ---battery indication at 3.94V 1304 | ;pmu_bat_para25 ---battery indication at 3.98V 1305 | ;pmu_bat_para26 ---battery indication at 4.01V 1306 | ;pmu_bat_para27 ---battery indication at 4.05V 1307 | ;pmu_bat_para28 ---battery indication at 4.08V 1308 | ;pmu_bat_para29 ---battery indication at 4.1V 1309 | ;pmu_bat_para30 ---battery indication at 4.12V 1310 | ;pmu_bat_para31 ---battery indication at 4.14V 1311 | ;pmu_bat_para32 ---battery indication at 4.15V 1312 | ;pmu_bat_temp_enable ---battery temp detect enable 1313 | ;pmu_bat_charge_ltf ---charge battery temp low threshold voltage 1314 | ;pmu_bat_charge_htf ---charge battery temp high threshold voltage 1315 | ;pmu_bat_shutdown_ltf ---shutdown battery temp low threshold voltage 1316 | ;pmu_bat_shutdown_htf ---shutdown battery temp high threshold voltage 1317 | ;pmu_bat_temp_para1 ---battery temp -25 voltage 1318 | ;pmu_bat_temp_para2 ---battery temp -15 voltage 1319 | ;pmu_bat_temp_para3 ---battery temp -10 voltage 1320 | ;pmu_bat_temp_para4 ---battery temp -5 voltage 1321 | ;pmu_bat_temp_para5 ---battery temp 0 voltage 1322 | ;pmu_bat_temp_para6 ---battery temp 5 voltage 1323 | ;pmu_bat_temp_para7 ---battery temp 10 voltage 1324 | ;pmu_bat_temp_para8 ---battery temp 20 voltage 1325 | ;pmu_bat_temp_para9 ---battery temp 30 voltage 1326 | ;pmu_bat_temp_para10 ---battery temp 40 voltage 1327 | ;pmu_bat_temp_para11 ---battery temp 45 voltage 1328 | ;pmu_bat_temp_para12 ---battery temp 50 voltage 1329 | ;pmu_bat_temp_para13 ---battery temp 55 voltage 1330 | ;pmu_bat_temp_para14 ---battery temp 60 voltage 1331 | ;pmu_bat_temp_para15 ---battery temp 70 voltage 1332 | ;pmu_bat_temp_para16 ---battery temp 80 voltage 1333 | ;pmu_powkey_off_time ---set pek off time,ms, 4000/6000/8000/10000 1334 | ;pmu_powkey_off_func ---set pek off func, 0:shutdown,1:restart 1335 | ;pmu_powkey_off_en ---set pek offlevel powerdown or not, 0:not powerdown,1:powerdown 1336 | ;pmu_powkey_long_time ---set pek pek long irq time,ms,1000/1500/2000/2500 1337 | ;pmu_powkey_on_time ---set pek on time,ms,128/1000/2000/3000 1338 | ;power_start ---when system is in charging, shutdown is power off or resart;0:restart 1:poweroff 1339 | ;-------------------------------------------------------------------------------------------------------- 1340 | ;-------------------------------------------------------------------------------------------------------- 1341 | ;pmu0 is axp81x 1342 | ;-------------------------------------------------------------------------------------------------------- 1343 | [pmu0] 1344 | used = 1 1345 | pmu_id = 6 1346 | pmu_twi_addr = 0x34 1347 | pmu_twi_id = 1 1348 | pmu_irq_id = 64 1349 | pmu_IRQ_wakeup = 1 1350 | 1351 | pmu_chg_ic_temp = 0 1352 | pmu_battery_rdc = 88 1353 | pmu_battery_cap = 4800 1354 | pmu_runtime_chgcur = 450 1355 | pmu_suspend_chgcur = 1500 1356 | pmu_shutdown_chgcur = 1500 1357 | pmu_init_chgvol = 4200 1358 | pmu_ac_vol = 4000 1359 | pmu_ac_cur = 3500 1360 | pmu_usbpc_vol = 4400 1361 | pmu_usbpc_cur = 500 1362 | pmu_battery_warning_level1 = 15 1363 | pmu_battery_warning_level2 = 0 1364 | pmu_chgled_func = 0 1365 | pmu_chgled_type = 0 1366 | 1367 | pmu_bat_para1 = 0 1368 | pmu_bat_para2 = 0 1369 | pmu_bat_para3 = 0 1370 | pmu_bat_para4 = 0 1371 | pmu_bat_para5 = 0 1372 | pmu_bat_para6 = 0 1373 | pmu_bat_para7 = 1 1374 | pmu_bat_para8 = 1 1375 | pmu_bat_para9 = 2 1376 | pmu_bat_para10 = 3 1377 | pmu_bat_para11 = 4 1378 | pmu_bat_para12 = 10 1379 | pmu_bat_para13 = 17 1380 | pmu_bat_para14 = 26 1381 | pmu_bat_para15 = 41 1382 | pmu_bat_para16 = 46 1383 | pmu_bat_para17 = 51 1384 | pmu_bat_para18 = 56 1385 | pmu_bat_para19 = 59 1386 | pmu_bat_para20 = 65 1387 | pmu_bat_para21 = 69 1388 | pmu_bat_para22 = 75 1389 | pmu_bat_para23 = 79 1390 | pmu_bat_para24 = 83 1391 | pmu_bat_para25 = 89 1392 | pmu_bat_para26 = 95 1393 | pmu_bat_para27 = 98 1394 | pmu_bat_para28 = 100 1395 | pmu_bat_para29 = 100 1396 | pmu_bat_para30 = 100 1397 | pmu_bat_para31 = 100 1398 | pmu_bat_para32 = 100 1399 | 1400 | pmu_bat_temp_enable = 1 1401 | pmu_bat_charge_ltf = 2261 1402 | pmu_bat_charge_htf = 388 1403 | pmu_bat_shutdown_ltf = 3200 1404 | pmu_bat_shutdown_htf = 237 1405 | pmu_bat_temp_para1 = 7466 1406 | pmu_bat_temp_para2 = 4480 1407 | pmu_bat_temp_para3 = 3518 1408 | pmu_bat_temp_para4 = 2786 1409 | pmu_bat_temp_para5 = 2223 1410 | pmu_bat_temp_para6 = 1788 1411 | pmu_bat_temp_para7 = 1448 1412 | pmu_bat_temp_para8 = 969 1413 | pmu_bat_temp_para9 = 664 1414 | pmu_bat_temp_para10 = 466 1415 | pmu_bat_temp_para11 = 393 1416 | pmu_bat_temp_para12 = 333 1417 | pmu_bat_temp_para13 = 283 1418 | pmu_bat_temp_para14 = 242 1419 | pmu_bat_temp_para15 = 179 1420 | pmu_bat_temp_para16 = 134 1421 | 1422 | pmu_powkey_off_time = 6000 1423 | pmu_powkey_off_func = 0 1424 | pmu_powkey_off_en = 1 1425 | pmu_powkey_long_time = 1500 1426 | pmu_powkey_on_time = 1000 1427 | power_start = 3 1428 | 1429 | ;-------------------------------------------------------------------------------------------------------- 1430 | ;pmu0 is axp81x 1431 | ;regulator tree 1432 | ;-------------------------------------------------------------------------------------------------------- 1433 | [pmu0_regu] 1434 | regulator_count = 23 1435 | regulator1 = "axp81x_dcdc1 none vcc-nand vcc-emmc vcc-sdc vcc-usb-30 vcc-io vcc-pd vcc-emmcv vcc-emmcvq33 vcc-sdcvq33 vcc-sdcv vcc-sdcvd" 1436 | regulator2 = "axp81x_dcdc2 none vdd-cpua" 1437 | regulator3 = "axp81x_dcdc3 none" 1438 | regulator4 = "axp81x_dcdc4 none" 1439 | regulator5 = "axp81x_dcdc5 none vcc-dram" 1440 | regulator6 = "axp81x_dcdc6 none vdd-sys" 1441 | regulator7 = "axp81x_dcdc7 none" 1442 | regulator8 = "axp81x_rtc none" 1443 | regulator9 = "axp81x_aldo1 none vdd-csi-led iovdd-csi vcc-pe" 1444 | regulator10 = "axp81x_aldo2 none vcc-pl" 1445 | regulator11 = "axp81x_aldo3 none vcc-avcc vcc-pll" 1446 | regulator12 = "axp81x_dldo1 none vcc-hdmi-33" 1447 | regulator13 = "axp81x_dldo2 none vcc-mipi" 1448 | regulator14 = "axp81x_dldo3 none avdd-csi" 1449 | regulator15 = "axp81x_dldo4 none vcc-deviceio" 1450 | regulator16 = "axp81x_eldo1 none vcc-cpvdd vcc-wifi-io vcc-pc vcc-pg vcc-emmcvq18" 1451 | regulator17 = "axp81x_eldo2 none vcc-lcd-0" 1452 | regulator18 = "axp81x_eldo3 none dvdd-csi-18" 1453 | regulator19 = "axp81x_fldo1 none vcc-hsic-12" 1454 | regulator20 = "axp81x_fldo2 none vdd-cpus"; 1455 | regulator21 = "axp81x_gpio0ldo none vcc-ctp" 1456 | regulator22 = "axp81x_gpio1ldo none" 1457 | regulator23 = "axp81x_dc1sw none vcc-lvds vcc-dsi-33" 1458 | 1459 | ;---------------------------------------------------------------------------------- 1460 | ;recovery and fastboot key 1461 | ;---------------------------------------------------------------------------------- 1462 | [recovery_key] 1463 | key_max = 0xc 1464 | key_min = 0xa 1465 | ;---------------------------------------------------------------------------------- 1466 | [fastboot_key] 1467 | key_max = 0x6 1468 | key_min = 0x4 1469 | 1470 | ;---------------------------------------------------------------------------------- 1471 | ; dvfs voltage-frequency table configuration 1472 | ; 1473 | ; max_freq: cpu maximum frequency, based on Hz 1474 | ; min_freq: cpu minimum frequency, based on Hz 1475 | ; 1476 | ; lv_count: count of lv_freq/lv_volt, must be < 16 1477 | ; 1478 | ; lv1: core vdd is 1.30v if cpu frequency is (1104Mhz, 1152Mhz] 1479 | ; lv2: core vdd is 1.26v if cpu frequency is (1008Mhz, 1104Mhz] 1480 | ; lv3: core vdd is 1.20v if cpu frequency is (816Mhz, 1008Mhz] 1481 | ; lv4: core vdd is 1.10v if cpu frequency is (648Mhz, 816Mhz] 1482 | ; lv5: core vdd is 1.04v if cpu frequency is (480Mhz, 648Mhz] 1483 | ; lv6: core vdd is 1.04v if cpu frequency is (480Mhz, 648Mhz] 1484 | ; lv7: core vdd is 1.04v if cpu frequency is (480Mhz, 648Mhz] 1485 | ; lv8: core vdd is 1.04v if cpu frequency is (480Mhz, 648Mhz] 1486 | ; 1487 | ;---------------------------------------------------------------------------------- 1488 | [dvfs_table] 1489 | ;extremity_freq = 1344000000 1490 | max_freq = 1248000000 1491 | min_freq = 480000000 1492 | 1493 | lv_count = 8 1494 | lv1_freq = 1248000000 1495 | lv1_volt = 1300 1496 | 1497 | lv2_freq = 1104000000 1498 | lv2_volt = 1260 1499 | 1500 | lv3_freq = 1008000000 1501 | lv3_volt = 1200 1502 | 1503 | lv4_freq = 816000000 1504 | lv4_volt = 1100 1505 | 1506 | lv5_freq = 648000000 1507 | lv5_volt = 1040 1508 | 1509 | lv6_freq = 0 1510 | lv6_volt = 1040 1511 | 1512 | lv7_freq = 0 1513 | lv7_volt = 1040 1514 | 1515 | lv8_freq = 0 1516 | lv8_volt = 1040 1517 | 1518 | ;---------------------------------------------------------------------------------- 1519 | ;s_uart0 config parameters 1520 | ;s_uart0_used --s_uart0 whether used for arisc debugging 1521 | ; 1522 | ;---------------------------------------------------------------------------------- 1523 | [s_uart0] 1524 | s_uart0_used = 1 1525 | s_uart0_tx = port:PL02<2> 1526 | s_uart0_rx = port:PL03<2> 1527 | 1528 | ;---------------------------------------------------------------------------------- 1529 | ;s_rsb0 config parameters 1530 | ;s_rsb0_used --s_rsb0 whether used for arisc 1531 | ; 1532 | ;---------------------------------------------------------------------------------- 1533 | [s_rsb0] 1534 | s_rsb0_used = 1 1535 | s_rsb0_sck = port:PL00<2><1><2> 1536 | s_rsb0_sda = port:PL01<2><1><2> 1537 | 1538 | ;---------------------------------------------------------------------------------- 1539 | ;s_jtag0 config parameters 1540 | ;s_jtag0_used --s_jtag0 whether used for arisc 1541 | ; 1542 | ;---------------------------------------------------------------------------------- 1543 | [s_jtag0] 1544 | s_jtag0_used = 0 1545 | s_jtag0_tms = port:PL04<2><1><2> 1546 | s_jtag0_tck = port:PL05<2><1><2> 1547 | s_jtag0_tdo = port:PL06<2><1><2> 1548 | s_jtag0_tdi = port:PL07<2><1><2> 1549 | 1550 | ;---------------------------------------------------------------------------------- 1551 | ;virtual device 1552 | ;virtual device for pinctrl testing 1553 | ;device have pin PA1 PA2 1554 | ;---------------------------------------------------------------------------------- 1555 | [Vdevice] 1556 | Vdevice_used = 1 1557 | Vdevice_0 = port:PB01<4><1><2> 1558 | Vdevice_1 = port:PB02<4><1><2> 1559 | 1560 | ;---------------------------------------------------------------------------------- 1561 | ;mali400 parameters 1562 | ;normal_freq : the normal frequency of gpu 1563 | ;scene_ctrl_status: scene control status, if this is enabled, android layer can ask 1564 | ; gpu driver to change frequency in certain scene 1565 | ;temp_ctrl_status : temperature control status, if this is enabled, the gpu frequency 1566 | ; will drop down if gpu's temperature is too high 1567 | ;---------------------------------------------------------------------------------- 1568 | [gpu_mali400_0] 1569 | normal_freq = 408 1570 | scene_ctrl_status = 0 1571 | temp_ctrl_status = 1 1572 | ;---------------------------------------------------------------------------------- 1573 | -------------------------------------------------------------------------------- /blobs/uEnv.txt: -------------------------------------------------------------------------------- 1 | console=ttyS0,115200n8 2 | selinux=permissive 3 | enforcing=0 4 | optargs=no_console_suspend 5 | kernel_filename=kernel 6 | initrd_filename=ramdisk.img 7 | recovery_initrd_filename=ramdisk-recovery.img 8 | hardware=sun50iw1p1 9 | 10 | # INFO: 11 | # To enable one of below options, 12 | # uncomment them by removing # in front of name 13 | 14 | # To use android recovery: 15 | # Create empty file recovery.txt in root of this partition 16 | 17 | # To enable LCD or HDMI, if not changed it will use default (experimental) 18 | # disp_screen0=lcd or hdmi 19 | # disp_screen1=lcd or hdmi 20 | # disp_mode=screen0 or screen1 or dualhead or xinerama or clone or disabled 21 | 22 | # USB OTG port mode (experimental) 23 | # otg_mode=device or host or otg 24 | otg_mode=host 25 | 26 | # Configure contiguous memory allocation 27 | # This maybe required to be enlarged for 4K displays 28 | cma=384M 29 | 30 | # To change HDMI display mode: 31 | # hdmi_mode=480i 32 | # hdmi_mode=576i 33 | # hdmi_mode=480p 34 | # hdmi_mode=576p 35 | # hdmi_mode=720p50 36 | # hdmi_mode=720p60 37 | # hdmi_mode=1080i50 38 | # hdmi_mode=1080i60 39 | # hdmi_mode=1080p24 40 | # hdmi_mode=1080p50 41 | # hdmi_mode=1080p60 42 | # hdmi_mode=2160p30 43 | # hdmi_mode=2160p25 44 | # hdmi_mode=2160p24 45 | # hdmi_mode=800x480p 46 | # hdmi_mode=1024x600p 47 | 48 | # To enable DVI compatibilty: 49 | # disp_dvi_compat=on 50 | 51 | # To enable CSI camera, if not enabled it will use default: 52 | # camera_type=s5k4ec 53 | # camera_type=ov5640 54 | 55 | # Configure ethernet speed (Android-only) 56 | eth0_speed=auto 57 | # eth0_speed=1000 58 | # eth0_speed=100 59 | # eth0_speed=10 60 | 61 | # If you are having problems with running from eMMC, like Sandisk eMMC 62 | # It forces to use SDR-mode instead of HS-mode. 63 | # Enable eMMC compatibility mode: 64 | # emmc_compat=on 65 | 66 | # Enable enhanced eMMC speed (might not work), the HS200/150MHz: 67 | # emmc_compat=150mhz 68 | 69 | # Enable enhanced eMMC speed (might not work), the HS200/200MHz: 70 | # emmc_compat=200mhz 71 | 72 | # Disable HDMI CEC 73 | # hdmi_cec=0 74 | 75 | # Enable experimental HDMI CEC driver 76 | hdmi_cec=2 77 | 78 | # Allow to change LCD type (Pinebook-only) 79 | # pinebook_lcd_mode=batch1 80 | # pinebook_lcd_mode=batch2 81 | 82 | # Allow to execute user command 83 | user_cmd= 84 | -------------------------------------------------------------------------------- /boot/bat/bat0.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/bat/bat0.bmp -------------------------------------------------------------------------------- /boot/bat/bat1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/bat/bat1.bmp -------------------------------------------------------------------------------- /boot/bat/bat10.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/bat/bat10.bmp -------------------------------------------------------------------------------- /boot/bat/bat2.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/bat/bat2.bmp -------------------------------------------------------------------------------- /boot/bat/bat3.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/bat/bat3.bmp -------------------------------------------------------------------------------- /boot/bat/bat4.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/bat/bat4.bmp -------------------------------------------------------------------------------- /boot/bat/bat5.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/bat/bat5.bmp -------------------------------------------------------------------------------- /boot/bat/bat6.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/bat/bat6.bmp -------------------------------------------------------------------------------- /boot/bat/bat7.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/bat/bat7.bmp -------------------------------------------------------------------------------- /boot/bat/bat8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/bat/bat8.bmp -------------------------------------------------------------------------------- /boot/bat/bat9.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/bat/bat9.bmp -------------------------------------------------------------------------------- /boot/bat/battery.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/bat/battery.bmp -------------------------------------------------------------------------------- /boot/bat/battery_charge.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/bat/battery_charge.bmp -------------------------------------------------------------------------------- /boot/bat/bempty.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/bat/bempty.bmp -------------------------------------------------------------------------------- /boot/bat/bootlogo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/bat/bootlogo.bmp -------------------------------------------------------------------------------- /boot/bat/low_pwr.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/bat/low_pwr.bmp -------------------------------------------------------------------------------- /boot/boot.cmd: -------------------------------------------------------------------------------- 1 | # Adopted from: 2 | # https://github.com/igorpecovnik/lib/blob/master/config/bootscripts/boot-pine64-default.cmd 3 | # https://github.com/longsleep/u-boot-pine64/blob/55c9c8c8ac005b1c00ac948386c60c4a741ebaa9/include/configs/sun50iw1p1.h#L339 4 | 5 | # set_cmdline 6 | setenv bootargs "console=${console} enforcing=${enforcing} cma=${cma} ${optargs} androidboot.serialno=${sunxi_serial} androidboot.hardware=${hardware} androidboot.selinux=${selinux} earlyprintk=sunxi-uart,0x01c28000 loglevel=8 root=${root} eth0_speed=${eth0_speed}" 7 | 8 | run load_dtb 9 | 10 | # set display resolution from uEnv.txt or other environment file 11 | # default to 1080p30 12 | if test "${hdmi_mode}" = "480i"; then setenv fdt_hdmi_mode "<0x00000000>" 13 | elif test "${hdmi_mode}" = "576i"; then setenv fdt_hdmi_mode "<0x00000001>" 14 | elif test "${hdmi_mode}" = "480p"; then setenv fdt_hdmi_mode "<0x00000002>" 15 | elif test "${hdmi_mode}" = "576p"; then setenv fdt_hdmi_mode "<0x00000003>" 16 | elif test "${hdmi_mode}" = "720p50"; then setenv fdt_hdmi_mode "<0x00000004>" 17 | elif test "${hdmi_mode}" = "720p60"; then setenv fdt_hdmi_mode "<0x00000005>" 18 | elif test "${hdmi_mode}" = "1080i50"; then setenv fdt_hdmi_mode "<0x00000006>" 19 | elif test "${hdmi_mode}" = "1080i60"; then setenv fdt_hdmi_mode "<0x00000007>" 20 | elif test "${hdmi_mode}" = "1080p24"; then setenv fdt_hdmi_mode "<0x00000008>" 21 | elif test "${hdmi_mode}" = "1080p50"; then setenv fdt_hdmi_mode "<0x00000009>" 22 | elif test "${hdmi_mode}" = "1080p60"; then setenv fdt_hdmi_mode "<0x0000000a>" 23 | elif test "${hdmi_mode}" = "2160p30"; then setenv fdt_hdmi_mode "<0x0000001c>" 24 | elif test "${hdmi_mode}" = "2160p25"; then setenv fdt_hdmi_mode "<0x0000001d>" 25 | elif test "${hdmi_mode}" = "2160p24"; then setenv fdt_hdmi_mode "<0x0000001e>" 26 | elif test "${hdmi_mode}" = "800x480p"; then setenv fdt_hdmi_mode "<0x0000001f>" 27 | elif test "${hdmi_mode}" = "1024x600p"; then setenv fdt_hdmi_mode "<0x00000020>" 28 | else setenv fdt_hdmi_mode "<0x0000000a>" 29 | fi 30 | 31 | if test "${fdt_hdmi_mode}" != ""; then 32 | echo "HDMI mode: ${fdt_hdmi_mode}" 33 | fdt set /soc@01c00000/boot_disp output_mode "<0x00000000>" 34 | fdt set /soc@01c00000/disp@01000000 screen0_output_mode "${fdt_hdmi_mode}" 35 | fdt set /soc@01c00000/disp@01000000 screen1_output_mode "${fdt_hdmi_mode}" 36 | fi 37 | 38 | # set display for screen0 39 | if test "${disp_screen0}" = "lcd"; then 40 | echo "Using LCD for main screen" 41 | fdt set /soc@01c00000/disp@01000000 screen0_output_type "<0x00000001>" 42 | fdt set /soc@01c00000/boot_disp output_mode "<0x00000000>" 43 | 44 | # enable LCD screen 45 | fdt set /soc@01c00000/lcd0@01c0c000 status "okay" 46 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_used "<0x00000001>" 47 | 48 | # disable HDMI screen 49 | fdt set /soc@01c00000/hdmi@01ee0000 status "disabled" 50 | 51 | # enable touchpad 52 | fdt set /soc@01c00000/ctp status "okay" 53 | fdt set /soc@01c00000/ctp ctp_used "<0x00000001>" 54 | fdt set /soc@01c00000/ctp ctp_name "gt911_DB2" 55 | elif test "${disp_screen0}" = "hdmi"; then 56 | echo "Using HDMI for main screen" 57 | fdt set /soc@01c00000/boot_disp output_mode "<0x00000000>" 58 | fdt set /soc@01c00000/disp@01000000 screen0_output_type "<0x00000003>" 59 | 60 | # enable HDMI screen 61 | fdt set /soc@01c00000/hdmi@01ee0000 status "okay" 62 | 63 | # disable LCD screen 64 | fdt set /soc@01c00000/lcd0@01c0c000 status "disabled" 65 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_used "<0x00000000>" 66 | fi 67 | 68 | # set display for screen1 69 | if test "${disp_screen1}" = "lcd"; then 70 | echo "Using LCD for secondary screen" 71 | fdt set /soc@01c00000/disp@01000000 screen1_output_type "<0x00000001>" 72 | 73 | # enable LCD screen 74 | fdt set /soc@01c00000/lcd0@01c0c000 status "okay" 75 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_used "<0x00000001>" 76 | 77 | # enable touchpad 78 | fdt set /soc@01c00000/ctp status "okay" 79 | fdt set /soc@01c00000/ctp ctp_used "<0x00000001>" 80 | fdt set /soc@01c00000/ctp ctp_name "gt911_DB2" 81 | elif test "${disp_screen1}" = "hdmi"; then 82 | echo "Using HDMI for secondary screen" 83 | fdt set /soc@01c00000/disp@01000000 screen1_output_type "<0x00000003>" 84 | 85 | # enable HDMI screen 86 | fdt set /soc@01c00000/hdmi@01ee0000 status "okay" 87 | fi 88 | 89 | # set disp_mode 90 | if test "${disp_mode}" = "screen0"; then 91 | echo "Using screen0 as display" 92 | fdt set /soc@01c00000/disp@01000000 disp_mode "<0x00000000>" 93 | elif test "${disp_mode}" = "screen1"; then 94 | echo "Using screen1 as display" 95 | fdt set /soc@01c00000/disp@01000000 disp_mode "<0x00000001>" 96 | elif test "${disp_mode}" = "dualhead"; then 97 | echo "Using screen0 and screen1 as separate displays" 98 | fdt set /soc@01c00000/disp@01000000 disp_mode "<0x00000002>" 99 | elif test "${disp_mode}" = "xinerama"; then 100 | echo "Using screen0 and screen1 as one large screen" 101 | fdt set /soc@01c00000/disp@01000000 disp_mode "<0x00000003>" 102 | elif test "${disp_mode}" = "clone"; then 103 | echo "Clonning screen0 and screen1" 104 | fdt set /soc@01c00000/disp@01000000 disp_mode "<0x00000004>" 105 | elif test "${disp_mode}" = "disabled"; then 106 | echo "Disabling all screens" 107 | fdt set /soc@01c00000/disp@01000000 disp_mode "<0x00000000>" 108 | fdt set /soc@01c00000/hdmi@01ee0000 status "disabled" 109 | fdt set /soc@01c00000/lcd0@01c0c000 status "disabled" 110 | fi 111 | 112 | # HDMI CEC 113 | if test "${hdmi_cec}" = "2"; then 114 | echo "Using experimental HDMI CEC driver" 115 | fdt set /soc@01c00000/hdmi@01ee0000 hdmi_cec_support "<0x00000002>" 116 | else 117 | echo "HDMI CEC is disabled" 118 | fdt set /soc@01c00000/hdmi@01ee0000 hdmi_cec_support "<0x00000000>" 119 | fi 120 | 121 | # Pinebook LCD 122 | if test "${pinebook_lcd_mode}" = "batch1"; then 123 | echo "Fixing LCD parameters to use Pinebook Batch 1" 124 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_dclk_freq "<72>" 125 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_vbp "<20>" 126 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_vt "<860>" 127 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_vspw "<5>" 128 | elif test "${pinebook_lcd_mode}" = "batch2"; then 129 | echo "Fixing LCD parameters to use Pinebook Batch 2" 130 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_dclk_freq "<77>" 131 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_vbp "<7>" 132 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_vt "<790>" 133 | fdt set /soc@01c00000/lcd0@01c0c000 lcd_vspw "<4>" 134 | fi 135 | 136 | # DVI compatibility 137 | if test "${disp_dvi_compat}" = "on"; then 138 | fdt set /soc@01c00000/hdmi@01ee0000 hdmi_hdcp_enable "<0x00000000>" 139 | fdt set /soc@01c00000/hdmi@01ee0000 hdmi_cts_compatibility "<0x00000001>" 140 | fi 141 | 142 | # default, only set status 143 | if test "${camera_type}" = "s5k4ec"; then 144 | fdt set /soc@01c00000/vfe@0/ status "okay" 145 | fdt set /soc@01c00000/vfe@0/dev@0/ status "okay" 146 | fi 147 | 148 | # change name, i2c address and vdd voltage 149 | if test "${camera_type}" = "ov5640"; then 150 | fdt set /soc@01c00000/vfe@0/dev@0/ csi0_dev0_mname "ov5640" 151 | fdt set /soc@01c00000/vfe@0/dev@0/ csi0_dev0_twi_addr "<0x00000078>" 152 | fdt set /soc@01c00000/vfe@0/dev@0/ csi0_dev0_iovdd_vol "<0x001b7740>" 153 | fdt set /soc@01c00000/vfe@0/ status "okay" 154 | fdt set /soc@01c00000/vfe@0/dev@0/ status "okay" 155 | fi 156 | 157 | # set otg mode 158 | if test "${otg_mode}" = "device"; then 159 | echo "USB-OTG port is in device mode" 160 | fdt set /soc@01c00000/usbc0@0 usb_port_type "<0x00000000>" 161 | elif test "${otg_mode}" = "host"; then 162 | echo "USB-OTG port is in host mode" 163 | fdt set /soc@01c00000/usbc0@0 usb_port_type "<0x00000001>" 164 | elif test "${otg_mode}" = "otg"; then 165 | echo "USB-OTG port is in OTG mode" 166 | fdt set /soc@01c00000/usbc0@0 usb_port_type "<0x00000002>" 167 | fi 168 | 169 | if test "${emmc_compat}" = "on"; then 170 | echo "Enabling eMMC compatibility mode (Use SDR)..." 171 | fdt rm /soc@01c00000/sdmmc@01C11000 mmc-ddr-1_8v; 172 | fdt rm /soc@01c00000/sdmmc@01C11000 mmc-hs200-1_8v; 173 | fdt rm /soc@01c00000/sdmmc@01C11000 mmc-hs400-1_8v; 174 | elif test "${emmc_compat}" = "150mhz"; then 175 | echo "Enabling eMMC HS200 150MHz mode..." 176 | fdt set /soc@01c00000/sdmmc@01C11000 max-frequency "<0x8F0D180>"; 177 | elif test "${emmc_compat}" = "200mhz"; then 178 | echo "Enabling eMMC HS200 200MHz mode..." 179 | fdt set /soc@01c00000/sdmmc@01C11000 max-frequency "<0xBEBC200>"; 180 | fi 181 | 182 | # Execute user command 183 | if test "${user_cmd}" != ""; then 184 | echo "Executing ${user_cmd}..." 185 | run user_cmd 186 | fi 187 | 188 | if test "${boot_part}" = ""; then 189 | setenv boot_part "0:1" 190 | fi 191 | 192 | # Re-order SD or eMMC to always be a first device when booting 193 | if test "${boot_part}" = "0:1"; then 194 | echo "Booting from SD so moving eMMC definition..." 195 | fdt resize 196 | fdt dup /soc@01c00000/ sdmmc@01C11000 sdmmc@01C11001 197 | fdt rm /soc@01c00000/sdmmc@01C11000/ 198 | else 199 | echo "Booting from eMMC so moving SD definition..." 200 | fdt resize 201 | fdt dup /soc@01c00000/ sdmmc@01c0f000 sdmmc@01c0f001 202 | fdt rm /soc@01c00000/sdmmc@01c0f000/ 203 | fi 204 | 205 | if test "${boot_filename}" = ""; then 206 | # boot regular kernel 207 | if fatload mmc ${boot_part} ${initrd_addr} recovery.txt; then 208 | echo Using recovery... 209 | setenv initrd_filename "${recovery_initrd_filename}" 210 | fi 211 | echo "Loading kernel and initrd..." 212 | run load_kernel load_initrd boot_kernel 213 | else 214 | # check if recovery.txt is created and load recovery image 215 | if fatload mmc ${boot_part} ${initrd_addr} recovery.txt; then 216 | echo Loading recovery... 217 | fatload mmc ${boot_part} ${initrd_addr} ${recovery_filename} 218 | else 219 | echo Loading normal boot... 220 | fatload mmc ${boot_part} ${initrd_addr} ${boot_filename} 221 | fi 222 | 223 | # boot android image 224 | boota ${initrd_addr} 225 | fi 226 | -------------------------------------------------------------------------------- /boot/boot.scr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/boot.scr -------------------------------------------------------------------------------- /boot/bootlogo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/bootlogo.bmp -------------------------------------------------------------------------------- /boot/font24.sft: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/font24.sft -------------------------------------------------------------------------------- /boot/font32.sft: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/font32.sft -------------------------------------------------------------------------------- /boot/pine64/boot0-pine64-pinebook.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/pine64/boot0-pine64-pinebook.bin -------------------------------------------------------------------------------- /boot/pine64/boot0-pine64-pinebook1080p.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/pine64/boot0-pine64-pinebook1080p.bin -------------------------------------------------------------------------------- /boot/pine64/boot0-pine64-plus.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/pine64/boot0-pine64-plus.bin -------------------------------------------------------------------------------- /boot/pine64/boot0-pine64-sopine.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/pine64/boot0-pine64-sopine.bin -------------------------------------------------------------------------------- /boot/pine64/fes1-pine64-pinebook.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/pine64/fes1-pine64-pinebook.bin -------------------------------------------------------------------------------- /boot/pine64/fes1-pine64-pinebook1080p.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/pine64/fes1-pine64-pinebook1080p.bin -------------------------------------------------------------------------------- /boot/pine64/fes1-pine64-plus.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/pine64/fes1-pine64-plus.bin -------------------------------------------------------------------------------- /boot/pine64/fes1-pine64-sopine.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/pine64/fes1-pine64-sopine.bin -------------------------------------------------------------------------------- /boot/pine64/sun50i-a64-pine64-pinebook.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/pine64/sun50i-a64-pine64-pinebook.dtb -------------------------------------------------------------------------------- /boot/pine64/sun50i-a64-pine64-pinebook1080p.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/pine64/sun50i-a64-pine64-pinebook1080p.dtb -------------------------------------------------------------------------------- /boot/pine64/sun50i-a64-pine64-plus.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/pine64/sun50i-a64-pine64-plus.dtb -------------------------------------------------------------------------------- /boot/pine64/sun50i-a64-pine64-sopine.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/pine64/sun50i-a64-pine64-sopine.dtb -------------------------------------------------------------------------------- /boot/pine64/u-boot-pine64-pinebook.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/pine64/u-boot-pine64-pinebook.bin -------------------------------------------------------------------------------- /boot/pine64/u-boot-pine64-pinebook1080p.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/pine64/u-boot-pine64-pinebook1080p.bin -------------------------------------------------------------------------------- /boot/pine64/u-boot-pine64-plus.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/pine64/u-boot-pine64-plus.bin -------------------------------------------------------------------------------- /boot/pine64/u-boot-pine64-sopine.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/boot/pine64/u-boot-pine64-sopine.bin -------------------------------------------------------------------------------- /boot/uEnv.txt: -------------------------------------------------------------------------------- 1 | console=ttyS0,115200n8 2 | selinux=permissive 3 | enforcing=0 4 | optargs=no_console_suspend 5 | kernel_filename=kernel 6 | initrd_filename=ramdisk.img 7 | recovery_initrd_filename=ramdisk-recovery.img 8 | hardware=sun50iw1p1 9 | 10 | # INFO: 11 | # To enable one of below options, 12 | # uncomment them by removing # in front of name 13 | 14 | # To use android recovery: 15 | # Create empty file recovery.txt in root of this partition 16 | 17 | # To enable LCD or HDMI, if not changed it will use default (experimental) 18 | # disp_screen0=lcd or hdmi 19 | # disp_screen1=lcd or hdmi 20 | # disp_mode=screen0 or screen1 or dualhead or xinerama or clone or disabled 21 | 22 | # USB OTG port mode (experimental) 23 | # otg_mode=device or host or otg 24 | otg_mode=host 25 | 26 | # Configure contiguous memory allocation 27 | # This maybe required to be enlarged for 4K displays 28 | cma=384M 29 | 30 | # To change HDMI display mode: 31 | # hdmi_mode=480i 32 | # hdmi_mode=576i 33 | # hdmi_mode=480p 34 | # hdmi_mode=576p 35 | # hdmi_mode=720p50 36 | # hdmi_mode=720p60 37 | # hdmi_mode=1080i50 38 | # hdmi_mode=1080i60 39 | # hdmi_mode=1080p24 40 | # hdmi_mode=1080p50 41 | # hdmi_mode=1080p60 42 | # hdmi_mode=2160p30 43 | # hdmi_mode=2160p25 44 | # hdmi_mode=2160p24 45 | # hdmi_mode=800x480p 46 | # hdmi_mode=1024x600p 47 | 48 | # To enable DVI compatibilty: 49 | # disp_dvi_compat=on 50 | 51 | # To enable CSI camera, if not enabled it will use default: 52 | # camera_type=s5k4ec 53 | # camera_type=ov5640 54 | 55 | # Configure ethernet speed (Android-only) 56 | eth0_speed=auto 57 | # eth0_speed=1000 58 | # eth0_speed=100 59 | # eth0_speed=10 60 | 61 | # If you are having problems with running from eMMC, like Sandisk eMMC 62 | # It forces to use SDR-mode instead of HS-mode. 63 | # Enable eMMC compatibility mode: 64 | # emmc_compat=on 65 | 66 | # Enable enhanced eMMC speed (might not work), the HS200/150MHz: 67 | # emmc_compat=150mhz 68 | 69 | # Enable enhanced eMMC speed (might not work), the HS200/200MHz: 70 | # emmc_compat=200mhz 71 | 72 | # Disable HDMI CEC 73 | # hdmi_cec=0 74 | 75 | # Enable experimental HDMI CEC driver 76 | hdmi_cec=2 77 | 78 | # Allow to change LCD type (Pinebook-only) 79 | # pinebook_lcd_mode=batch1 80 | # pinebook_lcd_mode=batch2 81 | 82 | # Allow to execute user command 83 | user_cmd= 84 | -------------------------------------------------------------------------------- /build/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayufan-pine64/boot-tools/f660a97797e7b2f43486169001ce28f149b7e4ec/build/.gitkeep -------------------------------------------------------------------------------- /shell.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | ID=$(docker build -q - < Dockerfile) 6 | 7 | exec docker run -it --rm -v "$(pwd):$(pwd)" -w "$(pwd)" "$ID" "$@" 8 | --------------------------------------------------------------------------------