diff options
author | Daniel Golle <daniel@makrotopia.org> | 2022-07-13 04:30:32 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2022-08-30 13:36:28 +0100 |
commit | a96382c1bb204698cd43e82193877c10e4b63027 (patch) | |
tree | 8731bd46ed0128f54440ba5d30ce79b6de54322b /target/linux/mediatek/filogic | |
parent | 38f7e932a5bbbf0f6dbc64ac05aa59e27c7ceec6 (diff) | |
download | upstream-a96382c1bb204698cd43e82193877c10e4b63027.tar.gz upstream-a96382c1bb204698cd43e82193877c10e4b63027.tar.bz2 upstream-a96382c1bb204698cd43e82193877c10e4b63027.zip |
mediatek: add support for Bananapi BPi-R3
The Bananapi BPi-R3 is a development router board built around the
MediaTek Filogic 830 (MT7986A) SoC.
The board can boot either from microSD, SPI-NAND, SPI-NOR or eMMC.
Only either SPI-NAND or SPI-NOR can be used at the same time, also only
either microSD or eMMC can be used. The various storage options can be
selected using small SMD switches on the board.
Specs:
* MediaTek MT7986A (Filogic 830) 4x ARM Cortex A53
* 4T4R 2.4G 802.11bgnax (MT7975N)
* 4T4R 5G 802.11anac/ax (MT7975P)
* 2 GB DDR4 RAM
* 8 GB eMMC
* 128 MB SPI-NAND flash
* 32 MB SPI-NOR flash
* on-board MT7531 GbE switch
* 2x SFP+ (1 GbE / 2.5 GbE)
* 5x GbE network port
* miniPCIe slot (only USB 2.0 connected)
* uSIM slot (connected to miniPCIe interface)
* M.2 KEY-E PCIe interface (PCIe x2)
* microSD card interface
* 26 PIN GPIO
Hardware details: https://wiki.banana-pi.org/Banana_Pi_BPI-R3
Working:
* all 4 boot methods incl. installation via U-Boot, sysupgrade, ...
* copper LAN and WAN ports
* SFP1 (connected to gmac1, eth1 in Linux)
* WiFi
* LEDs
* Buttons
* PSTORE/ramoops based dual-boot
Not Working (missing driver features):
* SFP2 (connected to MT7531 switch)
Untested:
* M.2/NGFF slot (PCIe x2)
* mPCIe slot (USB 2.0 + SIM)
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/mediatek/filogic')
-rw-r--r-- | target/linux/mediatek/filogic/base-files/etc/board.d/02_network | 4 | ||||
-rwxr-xr-x | target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh | 41 |
2 files changed, 44 insertions, 1 deletions
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index 9168e4d399..13afc2a3dc 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -12,6 +12,10 @@ mediatek_setup_interfaces() mediatek,mt7986b-rfb) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan ;; + bananapi,bpi-r3) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 sfp2" "eth1 wan" + ucidef_set_interface_macaddr "wan" "$(macaddr_add $(cat /sys/class/net/eth0/address) 1)" + ;; *) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan ;; diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index bdb3309faa..13b5b64fb6 100755 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -5,8 +5,26 @@ platform_do_upgrade() { local file_type=$(identify $1) case "$board" in + bananapi,bpi-r3) + export_bootdevice + export_partdevice rootdev 0 + case "$rootdev" in + mmc*) + CI_ROOTDEV="$rootdev" + CI_KERNPART="production" + emmc_do_upgrade "$1" + ;; + mtdblock*) + PART_NAME="fit" + default_do_upgrade "$1" + ;; + ubiblock*) + CI_KERNPART="fit" + nand_do_upgrade "$1" + ;; + esac + ;; *) - nand_do_upgrade "$1" ;; esac } @@ -20,6 +38,13 @@ platform_check_image() { [ "$#" -gt 1 ] && return 1 case "$board" in + bananapi,bpi-r3) + [ "$magic" != "d00dfeed" ] && { + echo "Invalid image type." + return 1 + } + return 0 + ;; *) nand_do_platform_check "$board" "$1" return 0 @@ -28,3 +53,17 @@ platform_check_image() { return 0 } + +platform_copy_config() { + case "$(board_name)" in + bananapi,bpi-r3) + export_bootdevice + export_partdevice rootdev 0 + case "$rootdev" in + mmc*) + emmc_copy_config + ;; + esac + ;; + esac +} |