2 +++ b/configs/mt7986a_bpi-r3-mini-emmc_defconfig
5 +CONFIG_SYS_HAS_NONCACHED_MEMORY=y
6 +CONFIG_POSITION_INDEPENDENT=y
7 +CONFIG_ARCH_MEDIATEK=y
8 +CONFIG_TEXT_BASE=0x41e00000
9 +CONFIG_SYS_MALLOC_F_LEN=0x4000
10 +CONFIG_NR_DRAM_BANKS=1
11 +CONFIG_ENV_SIZE=0x40000
12 +CONFIG_ENV_OFFSET=0x400000
13 +CONFIG_DEFAULT_DEVICE_TREE="mt7986a-bpi-r3-mini"
14 +CONFIG_OF_LIBFDT_OVERLAY=y
15 +CONFIG_TARGET_MT7986=y
16 +CONFIG_SYS_LOAD_ADDR=0x46000000
17 +CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
18 +CONFIG_DEBUG_UART_BASE=0x11002000
19 +CONFIG_DEBUG_UART_CLOCK=40000000
20 +CONFIG_ENV_OFFSET_REDUND=0x440000
26 +CONFIG_AUTOBOOT_KEYED=y
27 +CONFIG_AUTOBOOT_MENU_SHOW=y
28 +CONFIG_OF_SYSTEM_SETUP=y
29 +CONFIG_DEFAULT_FDT_FILE="mediatek/mt7986a-bpi-r3-mini.dtb"
31 +CONFIG_PRE_CONSOLE_BUFFER=y
33 +# CONFIG_BOARD_INIT is not set
34 +CONFIG_BOARD_LATE_INIT=y
36 +CONFIG_SYS_PROMPT="MT7986> "
39 +# CONFIG_CMD_BOOTEFI_BOOTMGR is not set
40 +CONFIG_CMD_BOOTMENU=y
42 +CONFIG_CMD_ERASEENV=y
43 +CONFIG_CMD_ENV_FLAGS=y
59 +CONFIG_CMD_LINK_LOCAL=y
67 +CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
73 +CONFIG_CMD_FS_GENERIC=y
76 +CONFIG_CMD_UBI_RENAME=y
78 +CONFIG_ENV_OVERWRITE=y
79 +CONFIG_ENV_IS_IN_MMC=y
80 +CONFIG_ENV_REDUNDANT=y
81 +CONFIG_ENV_RELOC_GD_ENV_ADDR=y
82 +CONFIG_ENV_USE_DEFAULT_ENV_TEXT_FILE=y
83 +CONFIG_ENV_DEFAULT_ENV_TEXT_FILE="defenvs/bananapi_bpi-r3-mini_emmc_env"
84 +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
85 +CONFIG_VERSION_VARIABLE=y
88 +CONFIG_IPADDR="192.168.1.1"
89 +CONFIG_USE_SERVERIP=y
90 +CONFIG_SERVERIP="192.168.1.254"
91 +CONFIG_NET_RANDOM_ETHADDR=y
102 +CONFIG_SUPPORT_EMMC_BOOT=y
103 +CONFIG_MMC_HS200_SUPPORT=y
107 +CONFIG_MTD_SPI_NAND=y
108 +CONFIG_DM_SPI_FLASH=y
109 +CONFIG_SPI_FLASH_WINBOND=y
110 +# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
111 +CONFIG_SPI_FLASH_MTD=y
112 +CONFIG_MTD_UBI_FASTMAP=y
114 +CONFIG_PHY_AIROHA_EN8811H=y
115 +CONFIG_PHY_AIROHA_FW_IN_MMC=y
116 +CONFIG_PHY_ETHERNET_ID=y
120 +CONFIG_MEDIATEK_ETH=y
121 +CONFIG_PCIE_MEDIATEK=y
123 +CONFIG_PHY_MTK_TPHY=y
126 +CONFIG_PINCTRL_MT7622=y
127 +CONFIG_PINCTRL_MT7986=y
128 +CONFIG_POWER_DOMAIN=y
129 +CONFIG_MTK_POWER_DOMAIN=y
130 +CONFIG_DM_REGULATOR=y
131 +CONFIG_DM_REGULATOR_FIXED=y
132 +CONFIG_DM_REGULATOR_GPIO=y
138 +CONFIG_SERIAL_RX_BUFFER=y
144 +CONFIG_USB_XHCI_HCD=y
145 +CONFIG_USB_XHCI_MTK=y
146 +CONFIG_USB_STORAGE=y
150 +++ b/configs/mt7986a_bpi-r3-mini-snand_defconfig
153 +CONFIG_SYS_HAS_NONCACHED_MEMORY=y
154 +CONFIG_POSITION_INDEPENDENT=y
155 +CONFIG_ARCH_MEDIATEK=y
156 +CONFIG_TEXT_BASE=0x41e00000
157 +CONFIG_SYS_MALLOC_F_LEN=0x4000
158 +CONFIG_NR_DRAM_BANKS=1
159 +CONFIG_DEFAULT_DEVICE_TREE="mt7986a-bpi-r3-mini"
160 +CONFIG_OF_LIBFDT_OVERLAY=y
161 +CONFIG_TARGET_MT7986=y
162 +CONFIG_SYS_LOAD_ADDR=0x46000000
163 +CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
164 +CONFIG_DEBUG_UART_BASE=0x11002000
165 +CONFIG_DEBUG_UART_CLOCK=40000000
171 +CONFIG_AUTOBOOT_KEYED=y
172 +CONFIG_AUTOBOOT_MENU_SHOW=y
173 +CONFIG_OF_SYSTEM_SETUP=y
174 +CONFIG_DEFAULT_FDT_FILE="mediatek/mt7986a-bpi-r3-mini.dtb"
176 +CONFIG_PRE_CONSOLE_BUFFER=y
178 +# CONFIG_BOARD_INIT is not set
179 +CONFIG_BOARD_LATE_INIT=y
180 +CONFIG_HUSH_PARSER=y
181 +CONFIG_SYS_PROMPT="MT7986> "
183 +CONFIG_CMD_LICENSE=y
184 +# CONFIG_CMD_BOOTEFI_BOOTMGR is not set
185 +CONFIG_CMD_BOOTMENU=y
187 +CONFIG_CMD_ERASEENV=y
188 +CONFIG_CMD_ENV_FLAGS=y
189 +CONFIG_CMD_STRINGS=y
199 +CONFIG_CMD_TFTPSRV=y
203 +CONFIG_CMD_LINK_LOCAL=y
211 +CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
217 +CONFIG_CMD_FS_GENERIC=y
218 +CONFIG_CMD_FS_UUID=y
220 +CONFIG_CMD_UBI_RENAME=y
222 +CONFIG_ENV_OVERWRITE=y
223 +CONFIG_ENV_IS_IN_UBI=y
224 +CONFIG_ENV_REDUNDANT=y
225 +CONFIG_ENV_UBI_PART="ubi"
226 +CONFIG_ENV_UBI_VOLUME="ubootenv"
227 +CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
228 +CONFIG_ENV_RELOC_GD_ENV_ADDR=y
229 +CONFIG_ENV_USE_DEFAULT_ENV_TEXT_FILE=y
230 +CONFIG_ENV_DEFAULT_ENV_TEXT_FILE="defenvs/bananapi_bpi-r3-mini_snand_env"
231 +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
232 +CONFIG_VERSION_VARIABLE=y
235 +CONFIG_IPADDR="192.168.1.1"
236 +CONFIG_USE_SERVERIP=y
237 +CONFIG_NET_RANDOM_ETHADDR=y
242 +CONFIG_BUTTON_GPIO=y
248 +CONFIG_SUPPORT_EMMC_BOOT=y
249 +CONFIG_MMC_HS200_SUPPORT=y
253 +CONFIG_MTD_SPI_NAND=y
254 +CONFIG_MTD_UBI_FASTMAP=y
256 +CONFIG_PHY_AIROHA_EN8811H=y
257 +CONFIG_PHY_ETHERNET_ID=y
261 +CONFIG_MEDIATEK_ETH=y
262 +CONFIG_PCIE_MEDIATEK=y
264 +CONFIG_PHY_MTK_TPHY=y
267 +CONFIG_PINCTRL_MT7622=y
268 +CONFIG_PINCTRL_MT7986=y
269 +CONFIG_POWER_DOMAIN=y
270 +CONFIG_MTK_POWER_DOMAIN=y
271 +CONFIG_DM_REGULATOR=y
272 +CONFIG_DM_REGULATOR_FIXED=y
273 +CONFIG_DM_REGULATOR_GPIO=y
279 +CONFIG_SERIAL_RX_BUFFER=y
285 +CONFIG_USB_XHCI_HCD=y
286 +CONFIG_USB_XHCI_MTK=y
287 +CONFIG_USB_STORAGE=y
291 +++ b/defenvs/bananapi_bpi-r3-mini_snand_env
294 +serverip=192.168.1.254
296 +console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
297 +bootargs=root=ubi.block=0,fit root=/dev/fit0 rootwait
298 +bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
299 +bootconf=config-mt7986a-bananapi-bpi-r3-mini
301 +bootfile=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-initramfs-recovery.itb
302 +bootfile_bl2=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-snand-preloader.bin
303 +bootfile_fip=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-snand-bl31-uboot.fip
304 +bootfile_upg=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-squashfs-sysupgrade.itb
305 +bootfile_en8811h_fw=EthMD32.bin
306 +bootled_pwr=green:status
307 +bootled_rec=blue:status
308 +bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
311 +bootmenu_title=
\e[0;34m( ( (
\e[1;39mOpenWrt
\e[0;34m ) ) )
\e[0;36m[SPI-NAND]
\e[0m
312 +bootmenu_0=Initialize environment.=run _firstboot
313 +bootmenu_0d=Run default boot command.=run boot_default
314 +bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
315 +bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
316 +bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
317 +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
318 +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
319 +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
320 +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
321 +bootmenu_8=
\e[31mLoad BL2 preloader via TFTP then write to NAND.
\e[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
322 +bootmenu_9=Reboot.=reset
323 +bootmenu_10=Reset all settings to factory defaults.=run reset_factory ; reset
324 +boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
325 +boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
326 +boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
327 +boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
328 +boot_ubi=run boot_production ; run boot_recovery
329 +boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
330 +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
331 +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
332 +boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
333 +boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run ubi_write_fip && run reset_factory
334 +boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run snand_write_bl2
335 +boot_tftp_write_en8811h_fw=tftpboot $loadaddr $bootfile_en8811h_fw && run ubi_write_en8811h_fw
336 +part_default=production
337 +part_recovery=recovery
338 +reset_factory=mw $loadaddr 0xff 0x1f000 ; ubi write $loadaddr ubootenv 0x1f000 ; ubi write $loadaddr ubootenv2 0x1f000 ; ubi remove rootfs_data
339 +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
340 +ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x1f000 dynamic ; ubi check ubootenv2 || ubi create ubootenv2 0x1f000 dynamic
341 +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
342 +ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
343 +ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
344 +ubi_read_emmc_install=ubi check emmc_install && ubi read $loadaddr emmc_install
345 +ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
346 +ubi_write_fip=run ubi_remove_rootfs ; ubi check fip && ubi remove fip ; ubi create fip 0x200000 static ; ubi write $loadaddr fip 0x200000
347 +ubi_write_en8811h_fw=ubi check en8811h-fw && ubi remove en8811h-fw ; ubi create en8811h-fw 0x24000 static ; ubi write $loadaddr en8811h-fw 0x24000
348 +ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
349 +ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
350 +_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
351 +_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
352 +_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
353 +_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title
\e[33m$ver
\e[0m"
355 +++ b/defenvs/bananapi_bpi-r3-mini_emmc_env
358 +serverip=192.168.1.254
360 +console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
361 +bootargs=root=/dev/fit0 rootwait
362 +bootcmd=if pstore check ; then run boot_recovery ; else run boot_emmc ; fi
363 +bootconf=config-mt7986a-bananapi-bpi-r3-mini
365 +bootfile=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-initramfs-recovery.itb
366 +bootfile_bl2=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-emmc-preloader.bin
367 +bootfile_fip=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-emmc-bl31-uboot.fip
368 +bootfile_upg=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-squashfs-sysupgrade.itb
369 +bootfile_en8811h_fw=EthMD32.bin
370 +bootled_pwr=green:status
371 +bootled_rec=blue:status
372 +bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
375 +bootmenu_title=
\e[0;34m( ( (
\e[1;39mOpenWrt
\e[0;34m ) ) )
\e[0;36m[eMMC]
\e[0m
376 +bootmenu_0=Initialize environment.=run _firstboot
377 +bootmenu_0d=Run default boot command.=run boot_default
378 +bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
379 +bootmenu_2=Boot production system from eMMC.=run boot_production ; run bootmenu_confirm_return
380 +bootmenu_3=Boot recovery system from eMMC.=run boot_recovery ; run bootmenu_confirm_return
381 +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
382 +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
383 +bootmenu_6=
\e[31mLoad Airoha EN8811H firmware via TFTP then write to eMMC.
\e[0m=run boot_tftp_write_en8811h_fw ; run bootmenu_confirm_return
384 +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
385 +bootmenu_8=
\e[31mLoad BL2 preloader via TFTP then write to eMMC.
\e[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
386 +bootmenu_9=Reboot.=reset
387 +bootmenu_10=Reset all settings to factory defaults.=run reset_factory ; reset
388 +boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
389 +boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
390 +boot_production=led $bootled_pwr on ; run emmc_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
391 +boot_recovery=led $bootled_rec on ; run emmc_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
392 +boot_emmc=run boot_production ; run boot_recovery
393 +boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
394 +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
395 +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
396 +boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run emmc_write_fip
397 +boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run emmc_write_bl2
398 +boot_tftp_write_en8811h_fw=tftpboot $loadaddr $bootfile_en8811h_fw && run emmc_write_en8811h_fw
399 +boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
400 +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
401 +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
402 +part_default=production
403 +part_recovery=recovery
404 +reset_factory=eraseenv && reset
405 +emmc_read_production=part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_read_vol
406 +emmc_read_recovery=part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_read_vol
407 +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
408 +emmc_write_bl2=mmc partconf 0 1 1 1 && mmc erase 0x0 0x400 && mmc write $fileaddr 0x0 0x400 ; mmc partconf 0 1 1 0
409 +emmc_write_fip=mmc erase 0x3400 0x2000 && mmc write $fileaddr 0x3400 0x2000 && mmc erase 0x2000 0x800
410 +emmc_write_production=part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol
411 +emmc_write_recovery=part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol
412 +_init_env=setenv _init_env ; setenv _create_env ; saveenv ; saveenv
413 +_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
414 +_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
415 +_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title
\e[33m$ver
\e[0m"
417 +++ b/arch/arm/dts/mt7986a-bpi-r3-mini.dts
419 +// SPDX-License-Identifier: GPL-2.0-or-later
422 +#include "mt7986.dtsi"
423 +#include <dt-bindings/gpio/gpio.h>
424 +#include <dt-bindings/input/linux-event-codes.h>
427 + #address-cells = <1>;
429 + model = "Bananapi BPi-R3 Mini";
430 + compatible = "mediatek,mt7986", "mediatek,mt7986-rfb";
433 + stdout-path = &uart0;
434 + tick-timer = &timer0;
438 + device_type = "memory";
439 + reg = <0x40000000 0x80000000>;
443 + compatible = "gpio-keys";
447 + linux,code = <KEY_RESTART>;
448 + gpios = <&pio 7 GPIO_ACTIVE_LOW>;
453 + compatible = "gpio-leds";
455 + status_led: led-0 {
456 + label = "green:status";
457 + gpios = <&pio 19 GPIO_ACTIVE_HIGH>;
461 + label = "blue:wlan2g";
462 + gpios = <&pio 1 GPIO_ACTIVE_HIGH>;
466 + label = "blue:wlan5g";
467 + gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
471 + reg_1p8v: regulator-1p8v {
472 + compatible = "regulator-fixed";
473 + regulator-name = "fixed-1.8V";
474 + regulator-min-microvolt = <1800000>;
475 + regulator-max-microvolt = <1800000>;
477 + regulator-always-on;
480 + reg_3p3v: regulator-3p3v {
481 + compatible = "regulator-fixed";
482 + regulator-name = "fixed-3.3V";
483 + regulator-min-microvolt = <3300000>;
484 + regulator-max-microvolt = <3300000>;
486 + regulator-always-on;
492 + pinctrl-names = "default";
493 + pinctrl-0 = <&mdio_pins>;
495 + mediatek,gmac-id = <0>;
496 + phy-mode = "2500base-x";
497 + phy-handle = <&phy14>;
500 + compatible = "ethernet-phy-id03a2.a411";
505 + reset-gpios = <&pio 49 GPIO_ACTIVE_LOW>;
506 + reset-assert-us = <10000>;
507 + reset-deassert-us = <20000>;
512 + pinctrl-names = "default";
513 + pinctrl-0 = <&mmc0_pins_default>;
515 + max-frequency = <200000000>;
518 + vmmc-supply = <®_3p3v>;
519 + vqmmc-supply = <®_1p8v>;
525 + mdio_pins: mdio-pins {
528 + groups = "mdc_mdio";
531 + conf-en8811-pwr-a {
533 + drive-strength = <MTK_DRIVE_8mA>;
534 + bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
538 + conf-en8811-pwr-b {
540 + drive-strength = <MTK_DRIVE_8mA>;
541 + bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
546 + mmc0_pins_default: mmc0default {
548 + function = "flash";
549 + groups = "emmc_51";
553 + pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2",
554 + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
555 + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
557 + drive-strength = <MTK_DRIVE_4mA>;
558 + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
563 + drive-strength = <MTK_DRIVE_6mA>;
564 + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
569 + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
573 + pins = "EMMC_RSTB";
574 + drive-strength = <MTK_DRIVE_4mA>;
575 + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
579 + spi_flash_pins: spi0-pins-func-1 {
581 + function = "flash";
582 + groups = "spi0", "spi0_wp_hold";
586 + pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
587 + drive-strength = <MTK_DRIVE_8mA>;
588 + bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
592 + pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
593 + drive-strength = <MTK_DRIVE_8mA>;
594 + bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
598 + pwm_pins: pwm0-pins-func-1 {
607 + pinctrl-names = "default";
608 + pinctrl-0 = <&pwm_pins>;
613 + #address-cells = <1>;
615 + pinctrl-names = "default";
616 + pinctrl-0 = <&spi_flash_pins>;
627 + compatible = "spi-nand";
629 + spi-max-frequency = <20000000>;
632 + compatible = "fixed-partitions";
633 + #address-cells = <1>;
638 + reg = <0x0 0x200000>;
643 + reg = <0x200000 0x7e00000>;
655 + status = "disabled";