en:bpi-r3:start
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
en:bpi-r3:start [2022/11/05 12:09] – [USB / PCIe] frank | en:bpi-r3:start [2023/11/09 19:27] – [linux] frank | ||
---|---|---|---|
Line 4: | Line 4: | ||
===== Hardware ===== | ===== Hardware ===== | ||
- | * mt7986a | + | * MT7986(Filogic 830) quad core ARM A53 SoC |
- | * mt7531 | + | * MT7531A |
+ | * 2G DDR RAM | ||
+ | * 8G eMMC flash, SPI-NAND (128 MiB), SPI-NOR (32 MiB) | ||
+ | * dual-band wifi: | ||
+ | * 2.4G use MT7975N | ||
+ | * 5G (wifi 6/ | ||
+ | * 2 SFP 2.5GbE and 5 GbE RJ45 ports | ||
+ | * mPCIe slot with only USB 2.0 connected for 4G modem | ||
+ | * M.2 slot key-M with only PCIe x2 interface (no sata/usb) for nvme (key B+M) or wifi-card for 6E (maybe adapter needed) | ||
+ | V1.0: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | |||
+ | V1.1: | ||
+ | |||
+ | {{: | ||
+ | ==== debug-uart ==== | ||
+ | |||
+ | 3v3 TTL | ||
+ | |||
+ | Usb2serial adapters supported: ch340 (no G), | ||
+ | |||
+ | With Profilic, cp2102, ch340G wifi firmware does not start [[https:// | ||
- | {{:en:bpi-r3:bpi-r3_top.jpg? | + | Gnd-gnd,rx-tx,tx-rx |
+ | 115200 8n1 (8databits, | ||
==== bootmedium ==== | ==== bootmedium ==== | ||
* SD / eMMC sharing 1 mmc-controller in SoC | * SD / eMMC sharing 1 mmc-controller in SoC | ||
* SD 4bit bus, eMMC 8bit | * SD 4bit bus, eMMC 8bit | ||
- | * switched first 4 data-lanes by sw6 (bottom) | + | * switched first 4 data-lanes by sw6/D (bottom |
* SPI NAND/NOR sharing SPI0-Bus | * SPI NAND/NOR sharing SPI0-Bus | ||
- | * CS switched by sw5 | + | * CS switched by sw5/C |
- | sw2 on top of board near debug-uart chooses between SPI and MMC | + | sw2/B on top of board near debug-uart chooses between SPI and MMC |
- | {{ : | + | see [[uboot# |
==== Network connections ==== | ==== Network connections ==== | ||
< | < | ||
- | gmac1----(p6)mt7531(P1-4)--LANx4 | + | gmac1 (eth0) |
- | | + | (P1-4) -- LANx4 |
- | | + | (p5/lan4) ---- right SFP slot (sfp2) |
- | gmac2----left SFP slot | + | gmac2 (eth1) |
</ | </ | ||
Line 35: | Line 59: | ||
=== SFP === | === SFP === | ||
- | We have both sfp recognized | + | We have both sfp slots recognized |
mount -t debugfs none / | mount -t debugfs none / | ||
- | cat / | + | |
+ | | ||
+ | |||
+ | Some sfp are still not recognized (e.g. gpon).maybe quirks are needed. | ||
+ | |||
+ | After some phylink-conversion there are some issues with 2g5 sfp on left sfp/eth1. A workaround is disabling autoneg on the interface | ||
+ | |||
+ | ethtool -s eth1 autoneg off | ||
+ | |||
+ | Left sfp does not support vlan in linux 6.1 because tag is stripped. | ||
+ | |||
+ | Power: "All SFP power supplies are connected to the system VDD33" which is 3v3/8A [[https:// | ||
+ | |||
+ | == 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 | [[https:// | ||
+ | |||
+ | 2g5 sfp currently detected only if autoneg is turned off. | ||
+ | |||
+ | ethtool -s eth1 autoneg off | ||
+ | ethtool -s lan4 autoneg off | ||
+ | |||
+ | Eric works on phy driver which looks very good now for 6.6 (6.5-next), | ||
=== WIFI === | === WIFI === | ||
Line 46: | Line 95: | ||
[[WLAN]] | [[WLAN]] | ||
+ | |||
+ | Antenna mounting https:// | ||
+ | |||
+ | Antenna order by band (5g in corners): https:// | ||
+ | |||
+ | WED (wireless dispatch - hw offloading): | ||
+ | |||
+ | https:// | ||
+ | |||
+ | > You need to edit / | ||
+ | > options mt7915e wed_enable=Y | ||
+ | |||
+ | |||
+ | zgrep ' | ||
+ | lsmod | ||
+ | cat / | ||
+ | conntrack -L #should show HW_OFFLOAD when traffic is offloaded | ||
+ | cat / | ||
==== USB / PCIe ==== | ==== USB / PCIe ==== | ||
+ | |||
+ | The USB3.0 socket of R3 can only provide a maximum current of 1400mA. [[https:// | ||
{{ : | {{ : | ||
Line 52: | Line 121: | ||
mPCIe slot is usb-only with SIM connector (bottom of board). PCIe is mapped to m.2 key-m slot for nvme SSD | 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 | + | Sata possible via M.2 KEY-M 2lane interface on bottom side of board (needs PCIe-2-Sata controller!) |
I tested mpcie slot with an em7455 [[LTE]] module (+key b adapter) | I tested mpcie slot with an em7455 [[LTE]] module (+key b adapter) | ||
+ | |||
+ | for m.2-slot there is a patch if nvme is not recognized: https:// | ||
==== GPIO ==== | ==== GPIO ==== | ||
[[gpio]] | [[gpio]] | ||
+ | ==== thermal ==== | ||
+ | |||
+ | cat / | ||
+ | |||
+ | Thermalpad size: https:// | ||
+ | |||
+ | Change pwm of fan from 5v to 12v (R317/ | ||
+ | [[https:// | ||
+ | [[https:// | ||
+ | |||
+ | Mt76: | ||
+ | |||
+ | cat / | ||
+ | |||
+ | 2g4/5g difference: https:// | ||
+ | |||
+ | FAN-Connector: | ||
+ | |||
+ | 5V pwm fan: https:// | ||
+ | |||
+ | trigger pwm-fan: | ||
+ | |||
+ | echo 1 > / | ||
+ | ==== leds ==== | ||
+ | |||
+ | available via sysfs: | ||
+ | |||
+ | * green: power | ||
+ | * blue: status | ||
+ | |||
+ | additional with function | ||
+ | |||
+ | * wf2g | ||
+ | * wf5g | ||
+ | * ssd: blinks on write access on m2-slot (nvme) | ||
+ | * lte: reported to work by daniel | ||
+ | |||
+ | Wifi-leds are fixed in my 6.1 tree and in mt76 master. | ||
+ | |||
+ | ==== case ==== | ||
+ | |||
+ | https:// | ||
+ | |||
+ | Case from finas: | ||
+ | https:// | ||
+ | |||
+ | Higher version added here: | ||
+ | |||
+ | |||
+ | https:// | ||
===== Software ===== | ===== Software ===== | ||
==== partition layout ==== | ==== partition layout ==== | ||
+ | |||
+ | blocks á 512 byte | ||
+ | |||
+ | ^ | ||
+ | ^ bl2 | 34 - 8191 | in boot0 | | ||
+ | ^ u-boot-env | 8192 - 9215 || | ||
+ | ^ factory | 9216 - 13311 || | ||
+ | ^ fip | 13312 - 17407 || | ||
+ | ^ kernel | 17408 - 222207 (100MB) | ||
+ | ^ rootfs | 222208 - 12805120 (6144 MB) || | ||
+ | |||
+ | bytes (start,size in hex) | ||
+ | ^ | ||
+ | ^ bl2 | 0x0, 0x80000 | ||
+ | ^ u-boot-env | - | 0x40000, 0x40000 | ||
+ | ^ reserved | ||
+ | ^ factory | 0x80000, 0x300000 | ||
+ | ^ fip | 0x380000, 0x200000 | ||
+ | ^ recovery | - | 0x180000, 0xa80000 | ||
+ | ^ fit | - | 0xc00000, 0x1400000 | ||
+ | ^ ubi | 0x580000, 0x7a80000 | ||
+ | |||
+ | |||
+ | === GPT binaries === | ||
32MB kernel/ | 32MB kernel/ | ||
{{ : | {{ : | ||
- | create own partition table: (currently i try to port to python3,but get crc error, so only python2-support): | + | create own partition table: (currently i tried to port to python3,but get crc error, so only python2-support): |
https:// | https:// | ||
Line 74: | Line 219: | ||
Created a gpt with 100mb kernel+6GB root partition with an python2 venv | Created a gpt with 100mb kernel+6GB root partition with an python2 venv | ||
- | https:// | ||
+ | https:// | ||
+ | |||
+ | https:// | ||
+ | |||
+ | 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. | ||
+ | |||
+ | Uboot (sw reboot): | ||
+ | < | ||
+ | find_valid_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 | ||
+ | |||
+ | === manual GPT creation === | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | === Emmc partition creation === | ||
+ | |||
+ | Todo...currently only via linux initrd from nor/usb | ||
+ | |||
+ | It is possible to create gpt in uboot. Example for rk3568: | ||
+ | |||
+ | https:// | ||
+ | |||
+ | https:// | ||
+ | |||
+ | This creates a env var with the partition definition for rk3568 (not bpi-r3): | ||
+ | |||
+ | < | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | </ | ||
+ | |||
+ | Which can be used like this: | ||
+ | |||
+ | mmc dev 0 | ||
+ | gpt write mmc 0 $partitions | ||
+ | |||
+ | defined table this way (blocks only): | ||
+ | |||
+ | < | ||
+ | setenv partitions " | ||
+ | </ | ||
+ | |||
+ | but i got error on write...maybe because a gpt already exists | ||
+ | |||
+ | < | ||
+ | MT7986> printenv partitions | ||
+ | partitions=uuid_disk=; | ||
+ | MT7986> mmc dev 0 | ||
+ | switch to partitions #0, OK | ||
+ | mmc0(part 0) is current device | ||
+ | MT7986> gpt write mmc 0 $partitions | ||
+ | Writing GPT: error! | ||
+ | </ | ||
==== atf / u-boot ==== | ==== atf / u-boot ==== | ||
Line 86: | Line 296: | ||
==== linux ==== | ==== linux ==== | ||
- | [[https:// | + | Own repo: https:// |
- | + | ||
- | Own repo: https:// | + | |
< | < | ||
Line 94: | Line 302: | ||
./build.sh #build kernel | ./build.sh #build kernel | ||
</ | </ | ||
- | Then copy bpi-r3.itb to card and start from uboot with commands listed above (setenv, fatload, bootm) | + | Then copy bpi-r3.itb to card and start from [[uboot# |
=== openwrt === | === openwrt === | ||
- | https://git.openwrt.org/? | + | configuration: [[openwrt]] |
- | https:// | + | https:// |
+ | |||
+ | Build instructions: | ||
+ | https:// | ||
+ | |||
+ | Or using firmware selector (currently only snapshot): https:// | ||
+ | |||
+ | changing to kernel 6.1: https:// | ||
+ | |||
+ | Install: https:// | ||
+ | |||
+ | opkg update | ||
+ | opkg install luci-ssl | ||
+ | |||
+ | Change network config without luci: https://forum.banana-pi.org/ | ||
+ | |||
+ | Add more space on storage: | ||
+ | https://forum.banana-pi.org/ | ||
+ | https:// | ||
+ | |||
+ | |||
+ | Modifications from user va1der: https:// | ||
=== debian === | === 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/ | ||
+ | |||
+ | writing image to sdcard (image not ready yet): | ||
+ | |||
+ | gunzip -c bpi-r3_sdmmc_bullseye.img.gz | sudo dd bs=1M status=progress conv=notrunc, | ||
+ | |||
+ | / | ||
+ | < | ||
+ | deb http:// | ||
+ | deb-src http:// | ||
+ | deb http:// | ||
+ | deb-src http:// | ||
+ | deb https:// | ||
+ | deb-src http:// | ||
+ | </ | ||
< | < | ||
Line 112: | Line 361: | ||
root@bpi-r3: | root@bpi-r3: | ||
</ | </ | ||
+ | |||
+ | dnsmasq vs. systemd-resolved: | ||
+ | " | ||
+ | |||
+ | https:// | ||
+ | |||
===== issues ===== | ===== issues ===== | ||
Line 119: | Line 374: | ||
V1.1: | V1.1: | ||
- | * wifi is not recognized | + | * wifi firmware cannot be started |
- | * bpi reports only affects profilic adapters | + | * bpi reports only affects profilic adapters, ch340, |
+ | * I tested cp2102 (not working), | ||
+ | * Possible fix: | ||
* reset-bug still there | * reset-bug still there | ||
- | * is reported to be fixed in v1.2 (untested) | + | * is reported to be fixed (removed R171 and R173) in newer v1.1 |
+ | * tested in uboot with my v1.1 r3 in uboot and plugged m.2 nvme: | ||
+ | * < | ||
+ | gpio: pin 9 (gpio 9) value is 1 //initial value | ||
+ | MT7986> gpio input 9 | ||
+ | gpio: pin 9 (gpio 9) value is 0 // | ||
* dual-nor (no nand) reported by 1 user [[https:// | * dual-nor (no nand) reported by 1 user [[https:// | ||
+ | * wifi temperature issue (2g4 seems wrong): https:// | ||
en/bpi-r3/start.txt · Last modified: 2024/04/23 12:31 by frank