Difference between revisions of "Getting Started with BPI-W3"

From Banana Pi Wiki
Jump to: navigation, search
(41 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[zh:快速上手 香蕉派 BPI-R3]]
+
=Introduction=
==Introduction==
+
[[File:Banana Pi BPI-W3 LGA 1.jpg|thumb|[[Banana Pi BPI-W3]] with Rockchip RK3588 chip design]]
[[File:Banana_pi_751.jpg]]
+
[[File:Banana_Pi_BPI-RK3588-LGA_5.jpg|thumb| RK3588 LGA BGA core board with Rockchip RK3588]]
 +
[[File:BPI-RK3588_board_core_2.jpg|thumb|[[BPI-RK3588 Core board and development Kit]] Gold finger interface core board]]
 +
[[File:Banana_pi_BPI-R1_1.JPG|thumb|[[Banana Pi BPI-R1]] Allwinner A20]]
 +
[[File:BPI-R2_3.JPG|thumb|[[Banana Pi BPI-R2]] with MTK MT7623N chip design]]
 +
[[File:Banana_Pi_BPI-R2_Pro_1_750.jpg|thumb|[[Banana Pi BPI-R2 Pro]] Rockchip RK3568 design]]
 +
[[File:BPI-R64_3.JPG|thumb|[[Banana Pi BPI-R64]] MTK MT7622]]
 +
[[File:O2A0500.jpg|thumb|[[Banana Pi BPI-W2]] with Realtek RTD1296 chip design]]
 +
[[File:Banana_Pi_BPI-R3_Router_2.jpg|thumb|[[Banana Pi BPI-R3]] with MediaTek MT7986(Filogic 830)]]
 +
[[File:Banana_Pi_BPI-M2S_1.jpg|thumb|[[Banana Pi BPI-M2S]] Amlogic A311D chip]]
 +
=specifications=
  
Banana Pi BPI-R3 Router board with MediaTek MT7986(Filogic 830) quad core ARM A53 + MT7531A chip design ,2G DDR RAM ,8G eMMC flash onboard,It is a very high performance open source router development board,support Wi-Fi 6/6E 2.4G wifi use MT7975N and 5G wifi use MT7975P, support 2 SFP 2.5GbE port, and 5 GbE network port.
+
=Linux=
 +
The below steps is to flash linux release image into BPI-W3
 +
==Prepare==
 +
:1. Good Type-C data cable for image download into EMMC
 +
:2. Usb to ttl cable if you need debug, default baudrate is 1500000.
 +
:3. Windows or Linux PC.
 +
:4. Download the Linux Release Image [https://wiki.banana-pi.org/Banana_Pi_BPI-W3#Image Release Linux Release Image], and confirm that the md5 checksum is correct before flashing.
 +
Note: The below picture is for BPI-W3's Debug Connecting, the red usb cable is Type-C data cable for image downloadthe three colors usb to ttl cable is linux serial console, please install CH340E's USB convert serial driver.
 +
:[[File:linux_download.jpg|820px]]
  
==MediaTek MT7986(Filogic 830)==
+
==Starting the board for the first time==
 +
BPI-W3 can be started with eMMC Module or μSD Card..
  
The MT7986(Filogic 830) integrates four Arm Cortex-A53 cores up to 2GHz with up to 18,000 DMIPs of processing power and 6Gbps of dual 4x4 Wi-Fi 6/6E connectivity. It has two 2.5g Ethernet interfaces and serial peripheral interfaces (SPI). Filogic 830‘s built-in hardware acceleration engine enables fast and reliable Wi-Fi offloading and wireless network connection. In addition, the chip supports Mediatek FastPath™ technology, which is suitable for games, AR/VR and other low-latency applications.
+
===Install Whole Image with Usb Download Tool===
  
Wi-fi 6E has many advantages over its predecessors, including lower latency, larger bandwidth capacity and faster transmission rates. Wireless network devices supporting the 6GHz band mainly use 160MHz wide channel and 6GHz uncongested bandwidth to provide multigigabit transmission and low-latency wi-fi connection, providing reliable wireless network for streaming media, games, AR/VR and other applications.
+
====Windows Driver install====
 +
1. Download and install [https://download.banana-pi.dev/d/ca025d76afd448aabc63/files/?p=%2FTools%2Fimage_download_tools%2FDriverAssitant_v5.11.zip Rockchip USB driver]
 +
:[[File:driver_install_2.PNG]]
  
 +
2. Download [https://download.banana-pi.dev/d/ca025d76afd448aabc63/files/?p=%2FTools%2Fimage_download_tools%2FUpdate-EMMC-Tools.zip Rockchip USB Download Tool for EMMC upgrade]
 +
:This tool defaults language is Chinese. you can change it to English after extract the package. Open RKDevTool_Release_v2.84/config.ini with an text editor (like notepad). The starting lines are:
  
==Key Features==
+
  #Language Selection: Selected=1(Chinese); Selected=2(English)
 +
  [Language]
 +
  Kinds=2
 +
  Selected=2
 +
  LangPath=Language\
  
*. MediaTek MT7986(Filogic 830) Quad core ARM Cortex A53+MT7531 chip design
+
3. Open RKDevTool.exe, Switch to the “upgrade firmware” page. Press the “firmware” button to open the image file to be upgraded. The upgrade tool displays detailed firmware information.
*. Wifi 6/6E 4x4 2.4G Wifi(MT7975N) +4x4 5G Wifi(MT7975P)
+
  Note: Because Linux's release image is very large, So you need wait for a long time when Software open and analysis the image file.
*. 2G DDR RAM
+
:[[File:Bpi-r2pro-Firmware.png]]
*. 8G eMMC flash
 
*. 2 SFP 2.5GbE
 
*. 5 GbE network port
 
*. POE support (optional)
 
*. Mini PCIe via USB
 
*. M.2 KEY-E PCIe inerface
 
*. Mciro SD card interface
 
*. 26 PIN GPIO
 
  
=Development=
+
4. Disconnect power adapter, connect dual male usb cable from the top usb host port to PC.Use the Type-C data cable to connect one end to the PC and the other end to the BPI-W3 board.
==Basic Development==
 
===Prepare to develop===
 
  * Prepare 8G/above TF card, USB-Serial interface, Ubuntu System
 
  * Using your USB-Serial Connect debug console on BPI-R3
 
  
  [[Image:R3_debug_console.jpg|320px]]
+
5. There have two usb download mode for image upgrade.
  
  * R3 bootstrap and device select Jumper Setting
+
:*'''Uboot Usb Download Mode (loader mode)'''
  [[Image:BPI-R3-Jumper.png|320px]]
+
::It's supposed to use this way if board already flashed a bootable uboot before.
 +
:*'''Maskrom Usb Download Mode'''
  
  Note: SW1-A and SW1-B is for boot strap selecting;
+
:Press the Recovery button or Maskrom button beside 3pin uart header and hold, connect the power adapter or press the RST button if power adapter already connected, about two seconds later, release the button. PC will Identify the device if RK usb driver installed correctly.
        SW1-C is that SPI-Nand or SPI-Nor Device is connected to CPU's SPI bus;
+
:[[File:device_manage.PNG]]
        SW1-D is that SD Card or EMMC device is connected tp CPU's EMMC bus.
 
 
  * Examples:
 
    All Jumper is High.
 
    [[Image:BPI-R3-Jumper-ALL-High.png|320px]]
 
  
    All Jumper is Low.
+
:The download tool also show the download mode if device connected.
    [[Image:BPI-R3-Jumper-ALL-Low.png|320px]]
+
:[[File:load_download.PNG]]
  
===How to burn image to SD card===
+
:[[File:maskrom_download.PNG]]
  A. Note: burn image to SD card on linux computer
 
    1.You could download latest image from our forum
 
    * Here is the example image link:
 
 
 
    2.Install bpi-tools on your Ubuntu. If you can't access this URL or any other problems, please go to [https://github.com/BPI-SINOVOIP/bpi-tools bpi-tools repo] and install this tools manually.
 
    * apt-get install pv
 
    * curl -sL https://github.com/BPI-SINOVOIP/bpi-tools/raw/master/bpi-tools | sudo -E bash
 
 
 
    3.After you download the image, insert your TF card into your Ubuntu
 
    * Execute "bpi-copy xxx.img /dev/sdx" to install image on your TF card
 
 
 
    4.After step 3, then you can insert your TF card into R3, and press power button to setup R3
 
  B. Note: burn image to SD card on windows computer
 
    1. Download the tools from the website:  https://sourceforge.net/projects/win32diskimager/
 
    2. Install the tools into Windows computer.
 
    3. flash image into SD card.
 
 
 
C. Change Boot Jumper to boot from SD, Enable SD Card Device.
 
    [[Image:BPI-R3-Jumper-ALL-High.png|320px]]
 
  
====How to burn image to onboard eMMC====
+
6. Press the “upgrade” button to start the upgrade.
  Note: because SD card and EMMC device share one SOC's interface, you need flash one SD image firstly, then R3 boot from SD card, then flash nand image into Nand, then change boot strap to boot from nand,  you need flash EMMC image into EMMC. Finally you change bootstrap to boot from EMMC.
+
:[[File:upgrade.PNG]]
  
  Before burning image to eMMC, please prepare a SD card with flashed bootable image and a USB disk. Let's take OpenWrt image (mtk-bpi-r3-SD-WAN1-SFP1-20220619-single-image.img, mtk-bpi-r3-NAND-WAN1-SFP1-20220619-single-image.bin, bl2_emmc.img, mtk-bpi-r3-EMMC-WAN1-SFP1-20220619-single-image.img) for example, the steps are below:
+
7: If the upgrade fails, you can try to erase the Emmc by pressing the EraseFlash button first, and then upgrade image again.
 +
:[[File:erase.PNG]]
  
  1. Insert the flashed SD card and power on to start the board.(the image "mtk-bpi-r3-SD-WAN1-SFP1-20220619-single-image.img" on the SD card can be OpenWrt or other linux OS like ubuntu...)
+
===Install Separate Images with Usb Download Tool===
 +
1. Download [https://download.banana-pi.dev/d/ca025d76afd448aabc63/files/?p=%2FTools%2Fimage_download_tools%2FUpdate-EMMC-Tools.zip Rockchip USB Download Tool for EMMC upgrade]
 +
2. Open RKDevTool.exe, Switch to the “Download Image” page. The upgrade tool displays detailed all firmware image information. Then all image file is ready, you may push "run", the upgrade process begin.
 +
  Note: Because Linux's release package, Example: Ubuntu-22.04-Desktop-EMMCBoot-rockdev-MT7531SW-DSA.zip, unzip it into the same folder "Update-EMMC-Tools" inside.
 +
:[[File:Bpi-r2pro-emmc-flash.png]]
  
  2. Copy Nand bootable and EMMC boot OpenWrt image(mtk-bpi-r3-NAND-WAN1-SFP1-20220619-single-image.bin, bl2_emmc.img, mtk-bpi-r3-EMMC-WAN1-SFP1-20220619-single-image.img) to USB disk, if the image is compressed please uncompress it before copying to USB disk.
+
===Install Image with SDcard===
  
  3. Plug in USB disk to the board, and mount the USB to /mnt or other directory as follows: (you can skip mounting if it is mounted automatically)
+
1. Download Rockchip [https://download.banana-pi.dev/d/ca025d76afd448aabc63/files/?p=%2FTools%2Fimage_download_tools%2FUpdate-SD-Tools.zip SDDiskTool].
    * mount -t vfat /dev/sda1 /mnt
 
    * change your directory to the mounting point, here is : cd /mnt
 
  
  4. Execute following command to enable and copy image to nand flash:
+
2. Insert microSD card to Windows PC, 8GB sdcard size at least.
    * mtd erase /dev/mtd0
 
    * dd if=mtk-bpi-r3-NAND-WAN1-SFP1-20220619-single-image.bin of=/dev/mtdblock0
 
  
  5. Shutdown, remove SD card, and change bootstrap to boot from nand flash and change SD/EMMC switch jumper to EMMC, restart the board from Nand Flash.
+
3. Run SD_Firmware_Tool, check the “Upgrade Firmware” box and select the correct removable disk device, Choose firmware image, then Click Create button to make it and wait until it is finshed
    Note: Enable EMMC device, boot strap is from nand
+
:[[File:sd_download.png]]
    [[Image:BPI-R3-Jumper-Flash-EMMC.png|320px]]
 
  
  6. repeat step 3, mount u-disk to /mnt, Execute following command to enable and copy image to EMMC device:
+
4. Safely remove the microSD card, insert it into the R2pro board, power on the board, it will start Linux System.
    * mount -t vfat /dev/sda1 /mnt
 
    * echo 0 > /sys/block/mmcblk0boot0/force_ro
 
    * dd if=bl2_emmc.img of=/dev/mmcblk0boot0
 
    * dd if=mtk-bpi-r3-EMMC-WAN1-SFP1-20220619-single-image.img of=/dev/mmcblk0
 
    * mmc bootpart enable 1 1 /dev/mmcblk0
 
  
  7. power off R3 board, remove u-disk driver, change bootstrap to boot from emmc device.
+
==Build Linux BSP Source Code==
    Note: Enable EMMC device, boot strap is from EMMC.
+
:1. Get Linux source code
    [[Image:BPI-R3-Jumper-Boot-EMMC.png|320px]]
 
  
=== Network-Configuration===
+
  $ git clone https://github.com/BPI-SINOVOIP/BPI-W3-BSP
*Network-Configuration refer to: http://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r2:network:start
 
*Network Interface: eth1, lan0 is for WAN; lan4, rax0, lan2, lan5, ra0, lan3, lan1 is for LAN,  ra0 is for 2.4G wireless, rax0 is for 5G wireless.
 
  
[[Image:BPI-R3_network_interface.jpg|640px]]
+
:2. Build the Linux BSP Source code
  
root@OpenWrt:/# ifconfig
+
==Dual Display==
 +
  Note: All linux Image suuport dual display HDMI and MIPI-DSI together, MIPI-DSI only support 1200x1920.
 +
  Note: HDMI Display
 +
:[[File:HDMI.jpg|640px]]
 +
  Note: MIPI-DSI panel Display
 +
:[[File:mipi-dsi.jpg|640px]]
  
br-lan    Link encap:Ethernet  HWaddr EE:A1:57:81:CA:19
+
==Wlan&BT==
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
+
:J14 M.2 KEY E Slot is used for connect Wlan&BT adapter, default image support RTL8822CE(PCIE+USB) and RTL8822CS(SDIO+UART).
          inet6 addr: fe80::eca1:57ff:fe81:ca19/64 Scope:Link
 
          inet6 addr: fd63:8bea:d5ce::1/60 Scope:Global
 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 
          TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:1000
 
          RX bytes:0 (0.0 B) TX bytes:2418 (2.3 KiB)
 
  
br-wan    Link encap:Ethernet  HWaddr EE:A1:57:81:CA:19
+
==HDMI RX==
          inet6 addr: fe80::eca1:57ff:fe81:ca19/64 Scope:Link
+
The ArmSoM-w3 uses an hdmi_in port built into the rk3588 chip,You can use the v4l2 command to test the hdmi in interface.
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 
          TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:1000
 
          RX bytes:0 (0.0 B)  TX bytes:8538 (8.3 KiB)
 
  
eth0      Link encap:Ethernet  HWaddr EE:A1:57:81:CA:19
+
====View all video nodes====
          inet6 addr: fe80::eca1:57ff:fe81:ca19/64 Scope:Link
+
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
+
  ls /dev/video*
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 
          TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:1000
 
          RX bytes:0 (0.0 B)  TX bytes:4408 (4.3 KiB)
 
          Interrupt:124
 
 
 
eth1      Link encap:Ethernet  HWaddr 4A:BB:84:B4:5D:3F
 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 
          TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:1000
 
          RX bytes:0 (0.0 B)  TX bytes:8674 (8.4 KiB)
 
          Interrupt:124
 
 
 
lan0      Link encap:Ethernet  HWaddr EE:A1:57:81:CA:19
 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
 
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:1000
 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
 
 
 
lan1      Link encap:Ethernet  HWaddr EE:A1:57:81:CA:19
 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
 
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:1000
 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
 
 
 
lan2      Link encap:Ethernet  HWaddr EE:A1:57:81:CA:19
 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
 
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:1000
 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
 
 
 
lan3      Link encap:Ethernet  HWaddr EE:A1:57:81:CA:19
 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
 
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:1000
 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
 
 
 
lan4      Link encap:Ethernet  HWaddr EE:A1:57:81:CA:19
 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
 
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:1000
 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
 
 
 
lan5      Link encap:Ethernet  HWaddr EE:A1:57:81:CA:19
 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 
          TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:1000
 
          RX bytes:0 (0.0 B)  TX bytes:2418 (2.3 KiB)
 
 
 
lo        Link encap:Local Loopback
 
          inet addr:127.0.0.1  Mask:255.0.0.0
 
          inet6 addr: ::1/128 Scope:Host
 
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
 
          RX packets:56 errors:0 dropped:0 overruns:0 frame:0
 
          TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:1000
 
          RX bytes:4368 (4.2 KiB)  TX bytes:4368 (4.2 KiB)
 
 
 
ra0      Link encap:Ethernet  HWaddr 00:0C:43:26:60:38
 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:1000
 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
 
          Interrupt:6
 
 
 
rax0      Link encap:Ethernet  HWaddr 02:0C:43:36:60:38
 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:1000
 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
 
 
 
root@OpenWrt:/# brctl show br-wan
 
 
 
bridge name    bridge id              STP enabled    interfaces
 
br-wan          7fff.eea15781ca19      no              lan0, eth1
 
 
 
root@OpenWrt:/# brctl show br-lan
 
 
 
bridge name    bridge id              STP enabled    interfaces
 
br-lan          7fff.eea15781ca19      no              lan4, rax0, lan2, lan5, ra0, lan3, lan1
 
 
 
root@OpenWrt:/#
 
 
 
==Advanced Development==
 
===GPIO===
 
====26 Pins Definition====
 
 
 
[[Image:R3_gpio_40.jpg]]
 
 
 
====GPIO Control====
 
* echo xxx > /sys/class/gpio/export
 
* echo in/out > /sys/class/gpio/gpioxxx/direction
 
* echo 0/1 > /sys/class/gpio/gpioxxx/value
 
 
 
Check the base gpio, you could see mine is 411
 
 
 
[[Image:BPI-R3-GPIO-Base.jpg]]
 
 
 
For example: if you want to change gpio 22 as out highlevel, you need input commands like this:
 
 
 
* echo 433(22+411) > /sys/class/gpio/export
 
* echo out > /sys/class/gpio/gpio433/direction
 
* echo 1 > /sys/class/gpio/gpio433/value
 
 
 
===FAN===
 
 
 
[[Image:FAN.png]]
 
 
 
* R317 for 5V FAN and R318 for 12V FAN.
 
* CN23 supports PWM control while CN22 does not support.
 
 
 
====PWM FAN Control====
 
* echo 0 > /sys/class/pwm/pwmchip0/export
 
* echo 10000 > /sys/class/pwm/pwmchip0/pwm0/period
 
* echo 5000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
 
* echo normal > /sys/class/pwm/pwmchip0/pwm0/polarity
 
* echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
 
 
 
===miniPCIe slot===
 
currently, miniPCIe slot only support one USB 4G module, example: EC25
 
when you insert one EC25 module, you may check it.
 
 
 
[[Image:BPI-R3-miniPCIe-Slot-EC25.jpg]]
 
 
 
===SFP===
 
After high and low temperature test, the following modules are suppoted by BPI-R3:
 
 
 
[[Image:SFP.png]]
 
  
===4G&5G===
+
====Look for the rk hdmirx device====
* BPI-R3 supports 4G LTE EC25.
+
Run the v4l2-ctl -d command to specify the vidoe node. Run the -D command to view the node information. Check the rk_hdmirx device using the Driver name.
* If you want to use 5G on BPI-R3:
 
    1. Insert 5G dongle into USB3.0.
 
    2. Connect RG200U-CN to mini PCIe, connect SoC through USB2.0(speed limited).
 
    3. Make an RG200U-CN LGA adapter board and insert it into M.2 KEY M.
 
Note: The availability of 4G/5G depends on the local carrier frequency band.
 
  
===Ap mode on BPI-R3===
+
# v4l2-ctl -d /dev/video0 -D
 +
Driver Info:
 +
Driver name : rk_hdmirx
 +
Card type : rk_hdmirx
 +
Bus info : fdee0000.hdmirx-controller
 +
Driver version : 5.10.66
 +
Capabilities : 0x84201000
 +
Video Capture Multiplanar
 +
Streaming
 +
Extended Pix Format
 +
Device Capabilities
 +
Device Caps : 0x04201000
 +
Video Capture Multiplanar
 +
Streaming
 +
Extended Pix Format
  
* ra0  is MT7986a 2.4G wifi
+
====Query resolution and image format====
* rax0 is MT7986a 5G wifi
+
To query the current resolution and image format:
  
===Wifi & Serial cable===
+
# v4l2-ctl -d /dev/video17 --get-fmt-video
* '''If the chip type of serial cable is pl2303, the driver fails to load the firmware apparently and thus the wifi can't work.'''
+
Format Video Capture Multiplanar:
* '''Other types including cp2102,ch340 and FDTI are all available, serial cable vlotage must be 3.3v LVTTL standard.
+
Width/Height : 3840/2160
'''
+
Pixel Format : 'NV16'
'''UART_TX0 is the Boot Strapping PIN and must be kept low during power-on.'''
+
Field : None
 +
Number of planes : 1
 +
Flags : premultiplied-alpha, 000000fe
 +
Colorspace : Unknown (1025fcdc)
 +
Transfer Function : Unknown (00000020)
 +
YCbCr Encoding : Unknown (000000ff)
 +
Quantization : Default
 +
Plane 0 :
 +
Bytes per Line : 3840
 +
Size Image : 16588800
  
[[Image:Strapping.png|720px]]
+
====Grab image file====
 +
Save the image file to the device, adb pull to the PC, and view it through 7yuv and other tools:
  
==FAQ==
+
v4l2-ctl --verbose -d /dev/video17 \
*MT7986a Reference Manual for Develope Board(BPi)
+
--set-fmt-video=width=3840,height=2160,pixelformat='NV16' \
::Google Drive:https://drive.google.com/file/d/1biSJmxnIpNzQroYDg9mtPtSTAv4i0DFf/view?usp=sharing
+
--stream-mmap=4 --stream-skip=3 \
 +
--stream-to=/data/4k60_nv16.yuv \
 +
--stream-count=5 --stream-poll
  
='''Reference Link'''=
+
====Querying the HDMI RX status====
 +
Query the current status of HDMI RX, including signal locking, image format, Timings information, Pixl Clk, etc.
  
http://forum.banana-pi.org/
+
# cat /d/hdmirx/status
 +
status: plugin
 +
Clk-Ch:Lock Ch0:Lock Ch1:Lock Ch2:Lock
 +
Ch0-Err:0 Ch1-Err:0 Ch2-Err:0
 +
Color Format: YUV422 Store Format: YUV422 (8 bit)
 +
Mode: 3840x2160p60 (4400x2250) hfp:172 hs:92 hbp:296 vfp:8 vs:10 vbp:72
 +
Pixel Clk: 594024000

Revision as of 23:40, 24 May 2023

Introduction

Banana Pi BPI-W3 with Rockchip RK3588 chip design
RK3588 LGA BGA core board with Rockchip RK3588
BPI-RK3588 Core board and development Kit Gold finger interface core board
Banana Pi BPI-R1 Allwinner A20
Banana Pi BPI-R2 with MTK MT7623N chip design
Banana Pi BPI-R2 Pro Rockchip RK3568 design
Banana Pi BPI-W2 with Realtek RTD1296 chip design
Banana Pi BPI-R3 with MediaTek MT7986(Filogic 830)
Banana Pi BPI-M2S Amlogic A311D chip

specifications

Linux

The below steps is to flash linux release image into BPI-W3

Prepare

1. Good Type-C data cable for image download into EMMC
2. Usb to ttl cable if you need debug, default baudrate is 1500000.
3. Windows or Linux PC.
4. Download the Linux Release Image Release Linux Release Image, and confirm that the md5 checksum is correct before flashing.

Note: The below picture is for BPI-W3's Debug Connecting, the red usb cable is Type-C data cable for image download, the three colors usb to ttl cable is linux serial console, please install CH340E's USB convert serial driver.

Linux download.jpg

Starting the board for the first time

BPI-W3 can be started with eMMC Module or μSD Card..

Install Whole Image with Usb Download Tool

Windows Driver install

1. Download and install Rockchip USB driver

Driver install 2.PNG

2. Download Rockchip USB Download Tool for EMMC upgrade

This tool defaults language is Chinese. you can change it to English after extract the package. Open RKDevTool_Release_v2.84/config.ini with an text editor (like notepad). The starting lines are:
 #Language Selection: Selected=1(Chinese); Selected=2(English)
 [Language]
 Kinds=2
 Selected=2
 LangPath=Language\

3. Open RKDevTool.exe, Switch to the “upgrade firmware” page. Press the “firmware” button to open the image file to be upgraded. The upgrade tool displays detailed firmware information.

  Note: Because Linux's release image is very large, So you need wait for a long time when Software open and analysis the image file.
Bpi-r2pro-Firmware.png

4. Disconnect power adapter, connect dual male usb cable from the top usb host port to PC.Use the Type-C data cable to connect one end to the PC and the other end to the BPI-W3 board.

5. There have two usb download mode for image upgrade.

  • Uboot Usb Download Mode (loader mode)
It's supposed to use this way if board already flashed a bootable uboot before.
  • Maskrom Usb Download Mode
Press the Recovery button or Maskrom button beside 3pin uart header and hold, connect the power adapter or press the RST button if power adapter already connected, about two seconds later, release the button. PC will Identify the device if RK usb driver installed correctly.
Device manage.PNG
The download tool also show the download mode if device connected.
Load download.PNG
Maskrom download.PNG

6. Press the “upgrade” button to start the upgrade.

Upgrade.PNG

7: If the upgrade fails, you can try to erase the Emmc by pressing the EraseFlash button first, and then upgrade image again.

Erase.PNG

Install Separate Images with Usb Download Tool

1. Download Rockchip USB Download Tool for EMMC upgrade 2. Open RKDevTool.exe, Switch to the “Download Image” page. The upgrade tool displays detailed all firmware image information. Then all image file is ready, you may push "run", the upgrade process begin.

  Note: Because Linux's release package, Example: Ubuntu-22.04-Desktop-EMMCBoot-rockdev-MT7531SW-DSA.zip, unzip it into the same folder "Update-EMMC-Tools" inside.
Bpi-r2pro-emmc-flash.png

Install Image with SDcard

1. Download Rockchip SDDiskTool.

2. Insert microSD card to Windows PC, 8GB sdcard size at least.

3. Run SD_Firmware_Tool, check the “Upgrade Firmware” box and select the correct removable disk device, Choose firmware image, then Click Create button to make it and wait until it is finshed

Sd download.png

4. Safely remove the microSD card, insert it into the R2pro board, power on the board, it will start Linux System.

Build Linux BSP Source Code

1. Get Linux source code
 $ git clone https://github.com/BPI-SINOVOIP/BPI-W3-BSP
2. Build the Linux BSP Source code

Dual Display

  Note: All linux Image suuport dual display HDMI and MIPI-DSI together, MIPI-DSI only support 1200x1920.
  Note: HDMI Display
HDMI.jpg
  Note: MIPI-DSI panel Display
Mipi-dsi.jpg

Wlan&BT

J14 M.2 KEY E Slot is used for connect Wlan&BT adapter, default image support RTL8822CE(PCIE+USB) and RTL8822CS(SDIO+UART).

HDMI RX

The ArmSoM-w3 uses an hdmi_in port built into the rk3588 chip,You can use the v4l2 command to test the hdmi in interface.

View all video nodes

ls /dev/video*

Look for the rk hdmirx device

Run the v4l2-ctl -d command to specify the vidoe node. Run the -D command to view the node information. Check the rk_hdmirx device using the Driver name.

# v4l2-ctl -d /dev/video0 -D
Driver Info:
Driver name : rk_hdmirx
Card type : rk_hdmirx
Bus info : fdee0000.hdmirx-controller
Driver version : 5.10.66
Capabilities : 0x84201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04201000
Video Capture Multiplanar
Streaming
Extended Pix Format

Query resolution and image format

To query the current resolution and image format:

# v4l2-ctl -d /dev/video17 --get-fmt-video
Format Video Capture Multiplanar:
Width/Height : 3840/2160
Pixel Format : 'NV16'
Field : None
Number of planes : 1
Flags : premultiplied-alpha, 000000fe
Colorspace : Unknown (1025fcdc)
Transfer Function : Unknown (00000020)
YCbCr Encoding : Unknown (000000ff)
Quantization : Default
Plane 0 :
Bytes per Line : 3840
Size Image : 16588800

Grab image file

Save the image file to the device, adb pull to the PC, and view it through 7yuv and other tools:

v4l2-ctl --verbose -d /dev/video17 \
--set-fmt-video=width=3840,height=2160,pixelformat='NV16' \
--stream-mmap=4 --stream-skip=3 \
--stream-to=/data/4k60_nv16.yuv \
--stream-count=5 --stream-poll

Querying the HDMI RX status

Query the current status of HDMI RX, including signal locking, image format, Timings information, Pixl Clk, etc.

# cat /d/hdmirx/status
status: plugin
Clk-Ch:Lock Ch0:Lock Ch1:Lock Ch2:Lock
Ch0-Err:0 Ch1-Err:0 Ch2-Err:0
Color Format: YUV422 Store Format: YUV422 (8 bit)
Mode: 3840x2160p60 (4400x2250) hfp:172 hs:92 hbp:296 vfp:8 vs:10 vbp:72
Pixel Clk: 594024000