|
| 1 | +# Banana Pi BPI-R64 |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +<img align="right" src="banana_pi_bpi-r64_interface.jpg" alt="Board Overview" width=400 padding=10> |
| 6 | + |
| 7 | +The Banana Pi BPI-R64 is a networking board based on the MediaTek MT7622 |
| 8 | +(dual Cortex-A53, AArch64) SoC. |
| 9 | + |
| 10 | +### Hardware Features |
| 11 | + |
| 12 | +- MediaTek MT7622 ARM Cortex-A53 dual-core processor @ 1.35 GHz |
| 13 | +- 1 GB DDR3L RAM |
| 14 | +- 8 GB eMMC storage |
| 15 | +- microSD card slot |
| 16 | +- MT7531 Gigabit Ethernet switch (4x LAN + 1x WAN) |
| 17 | +- MT7603E built-in 2.4 GHz WiFi |
| 18 | +- USB 3.0 port |
| 19 | +- 2x Mini PCIe slots |
| 20 | + |
| 21 | +### Default Network Configuration |
| 22 | + |
| 23 | +Infix comes preconfigured with: |
| 24 | + |
| 25 | +- **LAN ports** (lan0-lan3): Bridged for internal networking |
| 26 | +- **WAN port**: DHCP client enabled for internet connectivity |
| 27 | +- **WiFi** (wifi0-ap): Bridged to LAN (MT7615 PCIe card if fitted, otherwise MT7603E) |
| 28 | + |
| 29 | +## Boot Switch Reference |
| 30 | + |
| 31 | +<img align="right" src="bpi-r64-sw1.png" alt="SW1 Boot Switch" width=90 padding=10> |
| 32 | + |
| 33 | +The BPI-R64 uses a 2-position DIP switch (SW1) to select the boot device |
| 34 | +order. The MT7622 Boot ROM tries devices in the order listed and falls |
| 35 | +back to the next if no valid BL2 is found at the expected location. |
| 36 | + |
| 37 | +| SW1 | Boot device | Use case | |
| 38 | +|-----|-------------|----------------------------| |
| 39 | +| OFF | eMMC | Production eMMC boot | |
| 40 | +| ON | SD card | SD card boot / development | |
| 41 | + |
| 42 | +> [!NOTE] |
| 43 | +> SinoVoip has exposed only one bit of the MT7622's two-bit `BOOT_SEL[1:0]` |
| 44 | +> strapping field via SW1, with `BOOT_SEL[1]` hardwired high. This limits the |
| 45 | +> board to eMMC (`10b`) and SD (`11b`) boot; the SPI-NOR and SPI-NAND modes |
| 46 | +> available on the MT7622 reference board (`00b`, `01b`) are not selectable. |
| 47 | +
|
| 48 | +## Getting Started |
| 49 | + |
| 50 | +### Quick Start with SD Card |
| 51 | + |
| 52 | +1. **Flash the image to an SD card** (the filename includes the version, e.g. |
| 53 | + `infix-25.01-bpi-r64-sdcard.img`): |
| 54 | + |
| 55 | +<img align="right" src="debug-uart.png" alt="Debug UART" width=100 padding=10> |
| 56 | + |
| 57 | + ```sh |
| 58 | + dd if=infix-*-bpi-r64-sdcard.img of=/dev/sdX bs=4M status=progress |
| 59 | + ``` |
| 60 | + |
| 61 | +2. **Set boot switch:** SW1 ON (SD card boot) |
| 62 | +3. **Insert SD card and power on** |
| 63 | +4. **Connect console:** 115200 8N1 — use the dedicated Debug UART header |
| 64 | + just below the 40-pin GPIO header; pins are labeled GND, RX, TX on the board |
| 65 | +5. **Default login:** `admin` / `admin` |
| 66 | + |
| 67 | +## Installing to eMMC |
| 68 | + |
| 69 | +Unlike the BPI-R3 (where SD and eMMC share a bus, requiring a NAND intermediate |
| 70 | +step), the BPI-R64 has separate controllers for SD (mmc1/MSDC1) and eMMC |
| 71 | +(mmc0/MSDC0). You can write directly to eMMC while booted from SD. |
| 72 | + |
| 73 | +### eMMC Boot ROM Behaviour |
| 74 | + |
| 75 | +> [!IMPORTANT] |
| 76 | +> The MT7622 Boot ROM reads BL2 from the eMMC BOOT0 hardware partition (offset |
| 77 | +> 0), not from the User Data Area where the main disk image lives. The |
| 78 | +> installation procedure below writes BL2 to BOOT0 separately to handle this. |
| 79 | +
|
| 80 | +### Procedure |
| 81 | + |
| 82 | +Boot from SD and write the eMMC image from U-Boot using a FAT32-formatted USB |
| 83 | +drive. |
| 84 | + |
| 85 | +#### Step 1: Boot from SD card |
| 86 | + |
| 87 | +1. Set SW1 to ON (SD boot) |
| 88 | +2. Insert SD card with Infix |
| 89 | +3. Power on and break into U-Boot (press Ctrl-C during boot) |
| 90 | + |
| 91 | +#### Step 2: Write the eMMC image from U-Boot |
| 92 | + |
| 93 | +Place `infix-bpi-r64-emmc.img` and `bl2.img` on a FAT32-formatted USB drive, |
| 94 | +then from the U-Boot prompt: |
| 95 | + |
| 96 | +``` |
| 97 | +usb start |
| 98 | +fatload usb 0:1 0x44000000 infix-bpi-r64-emmc.img |
| 99 | +setexpr blocks ${filesize} / 0x200 |
| 100 | +mmc dev 0 |
| 101 | +mmc write 0x44000000 0x0 ${blocks} |
| 102 | +``` |
| 103 | + |
| 104 | +#### Step 3: Write BL2 to eMMC BOOT0 |
| 105 | + |
| 106 | +``` |
| 107 | +fatload usb 0:1 0x44000000 bl2.img |
| 108 | +mmc partconf 0 1 1 1 |
| 109 | +setexpr blkcnt ${filesize} + 0x1ff |
| 110 | +setexpr blkcnt ${blkcnt} / 0x200 |
| 111 | +mmc write 0x44000000 0x0 ${blkcnt} |
| 112 | +mmc partconf 0 1 1 0 |
| 113 | +``` |
| 114 | + |
| 115 | +#### Step 4: Boot from eMMC |
| 116 | + |
| 117 | +1. Power off the board |
| 118 | +2. Set SW1 to OFF (eMMC boot) |
| 119 | +3. Remove SD card and USB drive |
| 120 | +4. Power on |
| 121 | + |
| 122 | +## Platform Notes |
| 123 | + |
| 124 | +### mmc0 = eMMC, mmc1 = SD |
| 125 | + |
| 126 | +On MT7622, MSDC0 (mmc0) is the 8-bit eMMC controller and MSDC1 (mmc1) is the |
| 127 | +4-bit SD card controller — the reverse of many other platforms. |
| 128 | + |
| 129 | +## Building |
| 130 | + |
| 131 | +```sh |
| 132 | +# Bootloader only (SD) |
| 133 | +make O=x-boot-bpir64-sd bpi_r64_sd_boot_defconfig && make O=x-boot-bpir64-sd |
| 134 | + |
| 135 | +# Bootloader only (eMMC) |
| 136 | +make O=x-boot-bpir64-emmc bpi_r64_emmc_boot_defconfig && make O=x-boot-bpir64-emmc |
| 137 | + |
| 138 | +# Compose SD image (pass the Infix rootfs output directory) |
| 139 | +utils/mkimage.sh -b x-boot-bpir64-sd -r x-aarch64/images bananapi-bpi-r64 |
| 140 | + |
| 141 | +# Compose eMMC image |
| 142 | +utils/mkimage.sh -b x-boot-bpir64-emmc -r x-aarch64/images -t emmc bananapi-bpi-r64 |
| 143 | +``` |
0 commit comments