2 +++ b/configs/mt7986a_bpi-r3-mini-emmc_defconfig
5 +CONFIG_POSITION_INDEPENDENT=y
6 +CONFIG_ARCH_MEDIATEK=y
7 +CONFIG_TARGET_MT7986=y
8 +CONFIG_TEXT_BASE=0x41e00000
9 +CONFIG_SYS_MALLOC_F_LEN=0x4000
10 +CONFIG_SYS_HAS_NONCACHED_MEMORY=y
11 +CONFIG_NR_DRAM_BANKS=1
12 +CONFIG_DEFAULT_DEVICE_TREE="mt7986a-bpi-r3-mini"
13 +CONFIG_DEFAULT_ENV_FILE="bananapi_bpi-r3-mini_emmc_env"
14 +CONFIG_DEFAULT_FDT_FILE="mediatek/mt7986a-bpi-r3-mini.dtb"
15 +CONFIG_OF_LIBFDT_OVERLAY=y
16 +CONFIG_OF_SYSTEM_SETUP=y
17 +CONFIG_DEBUG_UART_BASE=0x11002000
18 +CONFIG_DEBUG_UART_CLOCK=40000000
20 +CONFIG_SYS_LOAD_ADDR=0x46000000
21 +CONFIG_SMBIOS_PRODUCT_NAME=""
22 +CONFIG_AUTOBOOT_KEYED=y
24 +CONFIG_AUTOBOOT_MENU_SHOW=y
25 +CONFIG_CFB_CONSOLE_ANSI=y
26 +CONFIG_BOARD_LATE_INIT=y
30 +CONFIG_CMD_ENV_FLAGS=y
32 +CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
38 +CONFIG_SYS_PROMPT="MT7986> "
39 +CONFIG_CMD_BOOTMENU=y
49 +CONFIG_CMD_ENV_READMEM=y
50 +CONFIG_CMD_ERASEENV=y
54 +CONFIG_CMD_FS_GENERIC=y
62 +CONFIG_CMD_LINK_LOCAL=y
63 +# CONFIG_CMD_MBR is not set
70 +CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
76 +CONFIG_CMD_TFTPBOOT=y
79 +CONFIG_CMD_UBI_RENAME=y
91 +CONFIG_DISPLAY_CPUINFO=y
95 +CONFIG_DM_REGULATOR=y
96 +CONFIG_DM_REGULATOR_FIXED=y
97 +CONFIG_DM_REGULATOR_GPIO=y
101 +CONFIG_HUSH_PARSER=y
102 +CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
103 +CONFIG_SYS_RELOC_GD_ENV_ADDR=y
104 +CONFIG_VERSION_VARIABLE=y
105 +CONFIG_PARTITION_UUIDS=y
118 +CONFIG_PHY_MTK_TPHY=y
119 +CONFIG_PHY_ETHERNET_ID=y
124 +CONFIG_MEDIATEK_ETH=y
126 +CONFIG_PHY_AIROHA_EN8811H=y
127 +CONFIG_PHY_AIROHA_FW_IN_MMC=y
130 +CONFIG_MTD_UBI_FASTMAP=y
132 +CONFIG_PCIE_MEDIATEK=y
135 +CONFIG_PINCTRL_MT7622=y
136 +CONFIG_POWER_DOMAIN=y
137 +CONFIG_PRE_CONSOLE_BUFFER=y
138 +CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
139 +CONFIG_MTK_POWER_DOMAIN=y
144 +CONFIG_MMC_DEFAULT_DEV=1
145 +CONFIG_MMC_HS200_SUPPORT=y
147 +CONFIG_MMC_SUPPORTS_TUNING=y
148 +CONFIG_SUPPORT_EMMC_BOOT=y
151 +CONFIG_MTK_SPI_NAND=y
152 +CONFIG_MTK_SPI_NAND_MTD=y
153 +CONFIG_SYSRESET_WATCHDOG=y
158 +CONFIG_RANDOM_UUID=y
162 +CONFIG_USB_XHCI_HCD=y
163 +CONFIG_USB_XHCI_MTK=y
164 +CONFIG_USB_STORAGE=y
166 +CONFIG_ENV_OVERWRITE=y
167 +CONFIG_ENV_IS_IN_MMC=y
168 +CONFIG_ENV_OFFSET=0x400000
169 +CONFIG_ENV_OFFSET_REDUND=0x440000
170 +CONFIG_ENV_SIZE=0x40000
171 +CONFIG_ENV_SIZE_REDUND=0x40000
172 +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
173 +CONFIG_NET_RANDOM_ETHADDR=y
177 +CONFIG_SUPPORT_EMMC_BOOT=y
178 +CONFIG_MMC_HS200_SUPPORT=y
181 +CONFIG_MEDIATEK_ETH=y
184 +CONFIG_PINCTRL_MT7986=y
185 +CONFIG_POWER_DOMAIN=y
186 +CONFIG_MTK_POWER_DOMAIN=y
187 +CONFIG_DM_REGULATOR=y
188 +CONFIG_DM_REGULATOR_FIXED=y
192 +CONFIG_USE_DEFAULT_ENV_FILE=y
193 +CONFIG_MTD_SPI_NAND=y
196 +CONFIG_DM_SPI_FLASH=y
197 +CONFIG_SPI_FLASH_MTD=y
198 +CONFIG_SPI_FLASH_WINBOND=y
199 +# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
202 +CONFIG_CMD_NAND_TRIMFFS=y
203 +CONFIG_LMB_MAX_REGIONS=64
205 +CONFIG_IPADDR="192.168.1.1"
206 +CONFIG_USE_SERVERIP=y
207 +CONFIG_SERVERIP="192.168.1.254"
209 +++ b/configs/mt7986a_bpi-r3-mini-snand_defconfig
212 +CONFIG_POSITION_INDEPENDENT=y
213 +CONFIG_ARCH_MEDIATEK=y
214 +CONFIG_TARGET_MT7986=y
215 +CONFIG_TEXT_BASE=0x41e00000
216 +CONFIG_SYS_MALLOC_F_LEN=0x4000
217 +CONFIG_SYS_HAS_NONCACHED_MEMORY=y
218 +CONFIG_NR_DRAM_BANKS=1
219 +CONFIG_DEFAULT_DEVICE_TREE="mt7986a-bpi-r3-mini"
220 +CONFIG_DEFAULT_ENV_FILE="bananapi_bpi-r3-mini_snand_env"
221 +CONFIG_DEFAULT_FDT_FILE="mediatek/mt7986a-bpi-r3-mini.dtb"
222 +CONFIG_OF_LIBFDT_OVERLAY=y
223 +CONFIG_OF_SYSTEM_SETUP=y
224 +CONFIG_DEBUG_UART_BASE=0x11002000
225 +CONFIG_DEBUG_UART_CLOCK=40000000
227 +CONFIG_SYS_LOAD_ADDR=0x46000000
228 +CONFIG_SMBIOS_PRODUCT_NAME=""
229 +CONFIG_AUTOBOOT_KEYED=y
231 +CONFIG_AUTOBOOT_MENU_SHOW=y
232 +CONFIG_CFB_CONSOLE_ANSI=y
233 +CONFIG_BOARD_LATE_INIT=y
235 +CONFIG_BUTTON_GPIO=y
237 +CONFIG_CMD_ENV_FLAGS=y
239 +CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
245 +CONFIG_SYS_PROMPT="MT7986> "
246 +CONFIG_CMD_BOOTMENU=y
256 +CONFIG_CMD_ENV_READMEM=y
257 +CONFIG_CMD_ERASEENV=y
261 +CONFIG_CMD_FS_GENERIC=y
262 +CONFIG_CMD_FS_UUID=y
268 +CONFIG_CMD_LICENSE=y
269 +CONFIG_CMD_LINK_LOCAL=y
270 +# CONFIG_CMD_MBR is not set
277 +CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
278 +CONFIG_CMD_SF_TEST=y
283 +CONFIG_CMD_TFTPBOOT=y
284 +CONFIG_CMD_TFTPSRV=y
286 +CONFIG_CMD_UBI_RENAME=y
291 +CONFIG_CMD_SETEXPR=y
295 +CONFIG_CMD_STRINGS=y
298 +CONFIG_DISPLAY_CPUINFO=y
301 +CONFIG_DM_REGULATOR=y
302 +CONFIG_DM_REGULATOR_FIXED=y
303 +CONFIG_DM_REGULATOR_GPIO=y
307 +CONFIG_HUSH_PARSER=y
308 +CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
309 +CONFIG_SYS_RELOC_GD_ENV_ADDR=y
310 +CONFIG_VERSION_VARIABLE=y
311 +CONFIG_PARTITION_UUIDS=y
325 +CONFIG_PHY_MTK_TPHY=y
326 +CONFIG_PHY_ETHERNET_ID=y
331 +CONFIG_MEDIATEK_ETH=y
334 +CONFIG_MTD_UBI_FASTMAP=y
336 +CONFIG_PCIE_MEDIATEK=y
339 +CONFIG_PINCTRL_MT7622=y
340 +CONFIG_POWER_DOMAIN=y
341 +CONFIG_PRE_CONSOLE_BUFFER=y
342 +CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
343 +CONFIG_MTK_POWER_DOMAIN=y
348 +CONFIG_MMC_DEFAULT_DEV=1
349 +CONFIG_MMC_HS200_SUPPORT=y
351 +CONFIG_MMC_SUPPORTS_TUNING=y
352 +CONFIG_SUPPORT_EMMC_BOOT=y
355 +CONFIG_MTK_SPI_NAND=y
356 +CONFIG_MTK_SPI_NAND_MTD=y
357 +CONFIG_SYSRESET_WATCHDOG=y
362 +CONFIG_RANDOM_UUID=y
366 +CONFIG_USB_XHCI_HCD=y
367 +CONFIG_USB_XHCI_MTK=y
368 +CONFIG_USB_STORAGE=y
370 +CONFIG_ENV_OVERWRITE=y
371 +CONFIG_ENV_IS_IN_UBI=y
372 +CONFIG_ENV_UBI_PART="ubi"
373 +CONFIG_ENV_SIZE=0x1f000
374 +CONFIG_ENV_SIZE_REDUND=0x1f000
375 +CONFIG_ENV_UBI_VOLUME="ubootenv"
376 +CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
377 +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
378 +CONFIG_NET_RANDOM_ETHADDR=y
382 +CONFIG_SUPPORT_EMMC_BOOT=y
383 +CONFIG_MMC_HS200_SUPPORT=y
386 +CONFIG_MEDIATEK_ETH=y
388 +CONFIG_PHY_AIROHA_EN8811H=y
389 +CONFIG_PHY_AIROHA_FW_IN_UBI=y
392 +CONFIG_PINCTRL_MT7986=y
393 +CONFIG_POWER_DOMAIN=y
394 +CONFIG_MTK_POWER_DOMAIN=y
395 +CONFIG_DM_REGULATOR=y
396 +CONFIG_DM_REGULATOR_FIXED=y
400 +CONFIG_USE_DEFAULT_ENV_FILE=y
401 +CONFIG_MTD_SPI_NAND=y
404 +#CONFIG_DM_SPI_FLASH=y
405 +#CONFIG_SPI_FLASH_MTD=y
406 +#CONFIG_SPI_FLASH_WINBOND=y
407 +# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
410 +CONFIG_CMD_NAND_TRIMFFS=y
411 +CONFIG_LMB_MAX_REGIONS=64
413 +CONFIG_IPADDR="192.168.1.1"
414 +CONFIG_USE_SERVERIP=y
416 +++ b/bananapi_bpi-r3-mini_snand_env
419 +serverip=192.168.1.254
421 +console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
422 +bootargs=root=ubi.block=0,fit root=/dev/fit0
423 +bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
424 +bootconf=config-mt7986a-bananapi-bpi-r3-mini
426 +bootfile=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-initramfs-recovery.itb
427 +bootfile_bl2=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-snand-preloader.bin
428 +bootfile_fip=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-snand-bl31-uboot.fip
429 +bootfile_upg=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-squashfs-sysupgrade.itb
430 +bootfile_en8811h_fw=EthMD32.bin
431 +bootled_pwr=green:status
432 +bootled_rec=blue:status
433 +bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
436 +bootmenu_title=
\e[0;34m( ( (
\e[1;39mOpenWrt
\e[0;34m ) ) )
\e[0;36m[SPI-NAND]
\e[0m
437 +bootmenu_0=Initialize environment.=run _firstboot
438 +bootmenu_0d=Run default boot command.=run boot_default
439 +bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
440 +bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
441 +bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
442 +bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
443 +bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
444 +bootmenu_6=
\e[31mLoad Airoha EN8811H firmware via TFTP then write to NAND.
\e[0m=run boot_tftp_write_en8811h_fw ; run bootmenu_confirm_return
445 +bootmenu_7=
\e[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.
\e[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
446 +bootmenu_8=
\e[31mLoad BL2 preloader via TFTP then write to NAND.
\e[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
447 +bootmenu_9=Reboot.=reset
448 +bootmenu_10=Reset all settings to factory defaults.=run reset_factory ; reset
449 +boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
450 +boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
451 +boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
452 +boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
453 +boot_ubi=run boot_production ; run boot_recovery
454 +boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
455 +boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
456 +boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
457 +boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
458 +boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run ubi_write_fip && run reset_factory
459 +boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run snand_write_bl2
460 +boot_tftp_write_en8811h_fw=tftpboot $loadaddr $bootfile_en8811h_fw && run ubi_write_en8811h_fw
461 +part_default=production
462 +part_recovery=recovery
463 +reset_factory=mw $loadaddr 0xff 0x1f000 ; ubi write $loadaddr ubootenv 0x1f000 ; ubi write $loadaddr ubootenv2 0x1f000 ; ubi remove rootfs_data
464 +snand_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr 0x0 0x40000 && mtd write bl2 $loadaddr 0x40000 0x40000 && mtd write bl2 $loadaddr 0x80000 0x40000 && mtd write bl2 $loadaddr 0xc0000 0x40000
465 +ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x1f000 dynamic ; ubi check ubootenv2 || ubi create ubootenv2 0x1f000 dynamic
466 +ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
467 +ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
468 +ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
469 +ubi_read_emmc_install=ubi check emmc_install && ubi read $loadaddr emmc_install
470 +ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
471 +ubi_write_fip=ubi check fip && ubi remove fip ; ubi create fip 0x200000 static ; ubi write $loadaddr fip 0x200000
472 +ubi_write_en8811h_fw=ubi check en8811h-fw && ubi remove en8811h-fw ; ubi create en8811h-fw 0x24000 static ; ubi write $loadaddr en8811h-fw 0x24000
473 +ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
474 +ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
475 +_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
476 +_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
477 +_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
478 +_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title
\e[33m$ver
\e[0m"
480 +++ b/bananapi_bpi-r3-mini_emmc_env
483 +serverip=192.168.1.254
485 +console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
486 +bootargs=root=/dev/fit0
487 +bootcmd=if pstore check ; then run boot_recovery ; else run boot_emmc ; fi
488 +bootconf=config-mt7986a-bananapi-bpi-r3-mini
490 +bootfile=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-initramfs-recovery.itb
491 +bootfile_bl2=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-emmc-preloader.bin
492 +bootfile_fip=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-emmc-bl31-uboot.fip
493 +bootfile_upg=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-squashfs-sysupgrade.itb
494 +bootfile_en8811h_fw=EthMD32.bin
495 +bootled_pwr=green:status
496 +bootled_rec=blue:status
497 +bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
500 +bootmenu_title=
\e[0;34m( ( (
\e[1;39mOpenWrt
\e[0;34m ) ) )
\e[0;36m[eMMC]
\e[0m
501 +bootmenu_0=Initialize environment.=run _firstboot
502 +bootmenu_0d=Run default boot command.=run boot_default
503 +bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
504 +bootmenu_2=Boot production system from eMMC.=run boot_production ; run bootmenu_confirm_return
505 +bootmenu_3=Boot recovery system from eMMC.=run boot_recovery ; run bootmenu_confirm_return
506 +bootmenu_4=Load production system via TFTP then write to eMMC.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
507 +bootmenu_5=Load recovery system via TFTP then write to eMMC.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
508 +bootmenu_6=
\e[31mLoad Airoha EN8811H firmware via TFTP then write to NAND.
\e[0m=run boot_tftp_write_en8811h_fw ; run bootmenu_confirm_return
509 +bootmenu_7=
\e[31mLoad BL31+U-Boot FIP via TFTP then write to eMMC.
\e[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
510 +bootmenu_8=
\e[31mLoad BL2 preloader via TFTP then write to eMMC.
\e[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
511 +bootmenu_9=Reboot.=reset
512 +bootmenu_10=Reset all settings to factory defaults.=run reset_factory ; reset
513 +boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
514 +boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
515 +boot_production=led $bootled_pwr on ; run emmc_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
516 +boot_recovery=led $bootled_rec on ; run emmc_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
517 +boot_emmc=run boot_production ; run boot_recovery
518 +boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
519 +boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run emmc_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
520 +boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run emmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
521 +boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run emmc_write_fip
522 +boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run emmc_write_bl2
523 +boot_tftp_write_en8811h_fw=tftpboot $loadaddr $bootfile_en8811h_fw && run emmc_write_en8811h_fw
524 +boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
525 +mmc_write_vol=imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc erase 0x$part_addr 0x$image_size && mmc write $loadaddr 0x$part_addr 0x$image_size
526 +mmc_read_vol=mmc read $loadaddr $part_addr 0x100 && imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc read $loadaddr 0x$part_addr 0x$image_size && setexpr filesize $image_size * 0x200
527 +part_default=production
528 +part_recovery=recovery
529 +reset_factory=eraseenv && reset
530 +emmc_read_production=part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_read_vol
531 +emmc_read_recovery=part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_read_vol
532 +emmc_write_en8811h_fw=mmc partconf 0 1 2 2 && mmc erase 0x0 0x120 && mmc write $fileaddr 0x0 0x120 ; mmc partconf 0 1 1 0
533 +emmc_write_bl2=mmc partconf 0 1 1 1 && mmc erase 0x0 0x400 && mmc write $fileaddr 0x0 0x400 ; mmc partconf 0 1 1 0
534 +emmc_write_fip=mmc erase 0x3400 0x2000 && mmc write $fileaddr 0x3400 0x2000 && mmc erase 0x2000 0x800
535 +emmc_write_production=part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol
536 +emmc_write_recovery=part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol
537 +_init_env=setenv _init_env ; setenv _create_env ; saveenv ; saveenv
538 +_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
539 +_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
540 +_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title
\e[33m$ver
\e[0m"
542 +++ b/arch/arm/dts/mt7986a-bpi-r3-mini.dts
544 +// SPDX-License-Identifier: GPL-2.0-or-later
547 +#include "mt7986.dtsi"
548 +#include <dt-bindings/gpio/gpio.h>
549 +#include <dt-bindings/input/linux-event-codes.h>
552 + #address-cells = <1>;
554 + model = "Bananapi BPi-R3 Mini";
555 + compatible = "mediatek,mt7986", "mediatek,mt7986-rfb";
558 + stdout-path = &uart0;
559 + tick-timer = &timer0;
563 + device_type = "memory";
564 + reg = <0x40000000 0x80000000>;
568 + compatible = "gpio-keys";
572 + linux,code = <KEY_RESTART>;
573 + gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
578 + compatible = "gpio-leds";
580 + status_led: led-0 {
581 + label = "green:status";
582 + gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
586 + label = "blue:wlan2g";
587 + gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
591 + label = "blue:wlan5g";
592 + gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
596 + reg_1p8v: regulator-1p8v {
597 + compatible = "regulator-fixed";
598 + regulator-name = "fixed-1.8V";
599 + regulator-min-microvolt = <1800000>;
600 + regulator-max-microvolt = <1800000>;
602 + regulator-always-on;
605 + reg_3p3v: regulator-3p3v {
606 + compatible = "regulator-fixed";
607 + regulator-name = "fixed-3.3V";
608 + regulator-min-microvolt = <3300000>;
609 + regulator-max-microvolt = <3300000>;
611 + regulator-always-on;
617 + pinctrl-names = "default";
618 + pinctrl-0 = <&mdio_pins>;
620 + mediatek,gmac-id = <0>;
621 + phy-mode = "2500base-x";
622 + phy-handle = <&phy14>;
625 + compatible = "ethernet-phy-id03a2.a411";
628 + airoha,rx-pol-reverse;
630 + reset-gpios = <&gpio 49 GPIO_ACTIVE_LOW>;
631 + reset-assert-us = <10000>;
632 + reset-deassert-us = <20000>;
637 + pinctrl-names = "default";
638 + pinctrl-0 = <&mmc0_pins_default>;
640 + max-frequency = <200000000>;
643 + vmmc-supply = <®_3p3v>;
644 + vqmmc-supply = <®_1p8v>;
650 + mdio_pins: mdio-pins {
653 + groups = "mdc_mdio";
656 + conf-en8811-pwr-a {
658 + drive-strength = <MTK_DRIVE_8mA>;
659 + bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
663 + conf-en8811-pwr-b {
665 + drive-strength = <MTK_DRIVE_8mA>;
666 + bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
671 + mmc0_pins_default: mmc0default {
673 + function = "flash";
674 + groups = "emmc_51";
678 + pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2",
679 + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
680 + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
682 + drive-strength = <MTK_DRIVE_4mA>;
683 + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
688 + drive-strength = <MTK_DRIVE_6mA>;
689 + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
694 + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
698 + pins = "EMMC_RSTB";
699 + drive-strength = <MTK_DRIVE_4mA>;
700 + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
704 + spi_flash_pins: spi0-pins-func-1 {
706 + function = "flash";
707 + groups = "spi0", "spi0_wp_hold";
711 + pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
712 + drive-strength = <MTK_DRIVE_8mA>;
713 + bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
717 + pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
718 + drive-strength = <MTK_DRIVE_8mA>;
719 + bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
723 + pwm_pins: pwm0-pins-func-1 {
732 + pinctrl-names = "default";
733 + pinctrl-0 = <&pwm_pins>;
738 + #address-cells = <1>;
740 + pinctrl-names = "default";
741 + pinctrl-0 = <&spi_flash_pins>;
752 + compatible = "spi-nand";
754 + spi-max-frequency = <20000000>;
757 + compatible = "fixed-partitions";
758 + #address-cells = <1>;
763 + reg = <0x0 0x80000>;
768 + reg = <0x80000 0x7f80000>;
780 + status = "disabled";