User Tools

Site Tools


Translations:
en

en:bpi-r2pro:start

Bananapi-R2 Pro

hardware

  • Rockchip RK3568 Quad-core ARM Cortex-A55 CPU TRM (Technical Reference Manual)
  • Rockchip RK809 PMIC
  • switch:
    • v00:RTL8367RB-VB-CG Switch chip (datasheet)
      • gmac1/eth0 - only for lan-ports (wan-port directly connected to gmac0/eth1 via RTL8211 PHY)
    • 1.0: mt7531be chip (datasheet)
      • vendor provides phy driver,dsa driver mainline but will need some changes
      • gmacs now swapped (gmac1 for wan,gmac0 with switch for lan)
  • debug-uart is fixed to 1.5 mbaud,which is not supported by common usb2serial adapters (like my cp2102). More info here
    • working adapters: ch340g, ft232rl, cp2104
    • minicom -D /dev/ttyUSB1 -b 1500000
    • on v1.0 micro-usb can be used as debug-uart too
  • ethernet/switch (rtl8367 phy+dsa driver,mt7531 only phy driver)/poweroff/reset/usb3/sata working in my repo, pcie (on v00 sometimes) working, leds (green + blue) working (green is ON-indicator)
  • upper usb-Port (usbdrd3_0: usb@fcc00000,bus 2-1) has phy configured in rk3568.dtsi (combphy0 does not exist on rk3566), lower port (usbdrd3_1: usb@fd000000,bus 4-1) is configured in rk356x.dtsi (combphy1)
  • combphy2 is used for sata2 (sata@fc800000)
  • if emmc is bootable, it will be booted first, sdcard boot is only possible when pressing sw1 while poweron (till bl2 is shown)

Software

ATF

Uboot

https://github.com/rockchip-linux/u-boot/blob/next-dev/configs/rk3568_defconfig

https://forum.pine64.org/showthread.php?tid=14507

My own work:

https://github.com/frank-w/u-boot/tree/2022-01-bpi-r2-pro

default boot way is via BPI-BOOT/extlinux/extlinux.conf

menu title Select the boot mode
#timeout 1/10s
TIMEOUT 50
DEFAULT linux

LABEL linux
    #KERNEL bpi-r2pro.itb
    linux Image_5.17.gz
    fdt rk3568-bpi-r2-pro.dtb
    initrd /rootfs.cpio.lz4
    #APPEND root=/dev/mmcblk1p3 rootwait rw earlyprintk
    append earlycon=uart8250,mmio32,0xfe660000 console=ttyS2,1500000n8

LABEL linux-5.18-hdmi
    #KERNEL bpi-r2pro.itb
    linux Image_5.18_hdmi.gz
    fdt rk3568-bpi-r2-pro-hdmi.dtb
    initrd /rootfs.cpio.lz4
    #APPEND root=/dev/mmcblk1p3 rootwait rw earlyprintk
    append earlycon=uart8250,mmio32,0xfe660000 console=tty1 fbcon=map:0 console=ttyS2,1500000n8

barebox

alternative to uboot as bootloader, supports ethernet/tftp-boot (wan-port only due to missing switch driver)

barebox

Image creation

Current way is spl-uboot in idblock.bin loading full uboot (fip,uboot.img) on separate partition (p1).

partition-layout from peter geis:

https://gitlab.com/pgwipeout/quartz64_ci/-/blob/main/.gitlab-ci.yml#L103

i use version from manjaro in my build.sh

This way works with downstream (2017.x) and upstream (2021.10+) uboot. Barebox does not need uboot partition,but for compatibility reasons partition should be there.

Linux

Network

  • wan-port directly connected
  • lan-ports over switch
    • v00: 3 switch drivers available, selectable in dts (in next2 tree all drivers are builtin):
      1. vendor phy driver (drivers/net/phy/rtk, CONFIG_RTL8367RB_GSW)
      2. my reduced phy driver (drivers/net/phy/rtl8367s_mdio.c, CONFIG_NET_REALTEK_MDIO)
      3. dsa driver (drivers/net/dsa/realtek/, CONFIG_NET_DSA_REALTEK)
    • v1.0:
      • phy driver working in 5.17
      • dsa driver detects switch/ports after disabling resets,but no traffic yet

Further trees (like 5.17-r2pro*) will not contain the full phy driver,only my reduced version and dsa.

display stuff

vop2 driver (needed for HDMI)

V5 seems to work good for 720p, 1080p and 4k

https://github.com/frank-w/BPI-R2-4.14/commits/5.17-r2pro-hdmi

Hdmi audio and gpu support

Have hdmi output, hdmi audio, gpu works with peters defconfig.

needs actual userspace (e.g. ubuntu 21.10) and ppa: https://launchpad.net/~kisak/+archive/ubuntu/kisak-mesa

in wayland/weston (have installed gnome too)

apt install gnome weston gl2mark

weston-info shows resolution

debugging

# mount -t debugfs none /sys/kernel/debug/
# cat /sys/kernel/debug/gpio
# cat /sys/kernel/debug/pinctrl
# cat /sys/kernel/debug/regulator/regulator_summary

other

en/bpi-r2pro/start.txt · Last modified: 2022/04/18 09:30 by frank