User Tools

Site Tools


Translations of this page:

en:bpi-r3:start

BananaPi R3

Hardware

  • MT7986(Filogic 830) quad core ARM A53 SoC
  • MT7531A Ethernet-switch
  • 2G DDR RAM
  • 8G eMMC flash, SPI-NAND, SPI-NOR
  • 2.4G wifi use MT7975N and 5G wifi use MT7975P frontend
  • 2 SFP 2.5GbE and 5 GbE RJ45 ports

V1.0:

V1.1:

debug-uart

Usb2serial adapters supported: ch340,cp2102,FT4232

Gnd-gnd,rx-tx,tx-rx

115200 8n1 (8databits,1 startbit), no flow control

bootmedium

  • SD / eMMC sharing 1 mmc-controller in SoC
    • SD 4bit bus, eMMC 8bit
    • switched first 4 data-lanes by sw6/D (bottom on v1.0)
  • SPI NAND/NOR sharing SPI0-Bus
    • CS switched by sw5/C

sw2/B on top of board near debug-uart chooses between SPI and MMC

see bootmedium_selection for boot selection table

Network connections

gmac1 (eth0) ---- (p6)mt7531(P0) ---- WAN
                            (P1-4) -- LANx4
                            (p5) ---- right SFP slot (sfp2)
gmac2 (eth1) ---- left SFP slot (sfp1)

https://forum.banana-pi.org/t/bpi-r3-information/12897/4

SFP

We have both sfp slots recognized and working

mount -t debugfs none /sys/kernel/debug/
cat /sys/kernel/debug/sfp1/state

Some sfp are still not recognized (e.g. gpon).

Left sfp does not support vlan in linux 6.1.

compatibility
  • class: Fibre MM/SM, Copper RJ45, ONT
  • bandwidth: 1G/2G5 (only)
class vendor / short part no supported bandwidth state Link comment
Fibre MM H!Fibre for cisco ASF85-24-X2-D 1000baseX only working Amazon vendor hifibre_glc-sx-mmd.txt

WIFI

USB / PCIe

The USB3.0 socket of R3 can only provide a maximum current of 1400mA. source

mPCIe slot is usb-only with SIM connector (bottom of board). PCIe is mapped to m.2 key-m slot for nvme SSD

Sata possible via M.2 KEY-M 2lane interface on bottom side of board

I tested mpcie slot with an em7455 LTE module (+key b adapter)

GPIO

thermal

cat /sys/class/thermal/thermal_zone0/temp

Thermalpad size: https://forum.banana-pi.org/t/banana-pi-r3-fan-with-pwm/14406/28

Mt76:

cat /sys/class/ieee80211/phy*/hwmon*/temp1_input

2g4/5g difference: https://github.com/openwrt/mt76/issues/729

leds

available via sysfs:

  • green: power
  • blue: status

additional with function

  • wf2g (mapped by mt76 driver and creates sysfs entry) - can be switched on but not off
  • wf5g (mapped through pinctrl, but no sysctl entry and not mapped into mt76 driver afaik)
  • ssd: blinks on write access on m2-slot (nvme)
  • lte: reported to work by daniel

Wifi-leds are fixed in my 6.1-r3 tree and in mt76 master.

case

Software

partition layout

32MB kernel/256MB root: gpt_sd-20220216.bin

create own partition table: (currently i tried to port to python3,but get crc error, so only python2-support):

https://github.com/frank-w/BPI-R3-bsp/tree/r3-atf/tools/mediatek/gpt_editor

(cd tools/mediatek/gpt_editor/;python mtk_gpt.py --i example/mt7986-sd.json --o GPT_SD)

Created a gpt with 100mb kernel+6GB root partition with an python2 venv

https://github.com/frank-w/u-boot/blob/r3-atf/gpt_sdmmc_100m6g.img

https://github.com/frank-w/u-boot/blob/r3-atf/gpt_emmc_100m6g.img

Gpt img file may cause errors when using parted (main and backup gpt corrupt) or gpt errors in uboot on reboot. This can be also caused by backup-gpt not overridden by image (end of disk).

Parted:

Error: Both the primary and backup GPT tables are corrupt.  Try making a fresh table, and using Parted's rescue feature to recover partitions.

Uboot (sw reboot):

*** ERROR: Can't read GPT Entries ***
find_valid_gpt: *** ERROR: Invalid GPT ***

This can be fixed with sgdisk by exporting and re-importing the gpt

sudo sgdisk --backup=bpi-r3_sgdisk.gpt /dev/sdb
sudo sgdisk --load-backup=bpi-r3_sgdisk.gpt /dev/sdb

script for creating gpt with sgdisk/losetup

atf / u-boot

linux

Own repo: https://github.com/frank-w/BPI-R2-4.14/commits/6.1-main

./build.sh importconfig
./build.sh #build kernel

Then copy bpi-r3.itb to card and start from u-boot

openwrt

debian

create image with build.sh createimg from my uboot-repo (atf-r3 branch after building uboot+atf) and add rootfs+kernel

generated GPT from mtk-script has some problems with parted (partprobe reports main gpt is damaged), but it can be mounted with losetup -P

sudo losetup -P $LDEV $IMGDIR/$IMGNAME.img

writing image to sdcard (image not ready yet):

gunzip -c bpi-r3_sdmmc_bullseye.img.gz | sudo dd bs=1M status=progress conv=notrunc,fsync of=/dev/sdX

/etc/apt/sources.list:

deb http://ftp.de.debian.org/debian bullseye main contrib non-free
deb-src http://ftp.de.debian.org/debian bullseye main contrib non-free
deb http://ftp.de.debian.org/debian bullseye-updates main contrib non-free
deb-src http://ftp.de.debian.org/debian bullseye-updates main contrib non-free
deb https://security.debian.org/debian-security bullseye-security main contrib non-free
deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free
root@bpi-r3:~# date -s "2022-09-18 18:02:00+0200"
root@bpi-r3:~# ip link set lan4 up
root@bpi-r3:~# ip addr add 192.168.0.19/24 dev lan4       
root@bpi-r3:~# ip route add default via 192.168.0.10     
root@bpi-r3:~# apt update
root@bpi-r3:~# apt install pciutils usbutils traceroute iperf3 net-tools psmisc wget curl

dnsmasq vs. systemd-resolved: “Another process is already listening on TCP socket 127.0.0.53:53”

https://unix.stackexchange.com/a/319501

issues

V1.0:

  • reset switch low/pressed when card in m2 slot (link)

V1.1:

  • wifi is not recognized when debug-uart connected (link)
    • bpi reports only affects profilic adapters, ch340,cp2102,FT4232 are ok (link)
  • reset-bug still there
    • is reported to be fixed (removed R171 and R173) in newer v1.1 (untested)
  • dual-nor (no nand) reported by 1 user link
en/bpi-r3/start.txt · Last modified: 2023/02/02 08:26 by frank