User Tools

Site Tools



en:bpi-r4:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:bpi-r4:start [2024/02/14 19:01] – [linux] franken:bpi-r4:start [2024/04/28 11:48] – [rtc] frank
Line 31: Line 31:
  
 {{:en:bpi-r4:bpi-r4_v1.1_top.jpg?direct&400 |}} {{ :en:bpi-r4:bpi-r4_v1.1_bottom.jpg?direct&400|}} {{:en:bpi-r4:bpi-r4_v1.1_top.jpg?direct&400 |}} {{ :en:bpi-r4:bpi-r4_v1.1_bottom.jpg?direct&400|}}
 +
 +
 +
 +===== thermal =====
 +
 +  cat /sys/class/thermal/thermal_zone0/temp
 +
 +Uses lvts driver
 +
 +Thermalpad size: https://forum.banana-pi.org/t/banana-pi-bpi-r4-heatsink-and-case-design/16638/53
 +
 +==== testing fan ====
 +
 +by default first trip point is set to 40°C and second is 85°C...for testing the fan it is a bit high when using a passive heatsink. so just set first to 35 and second to 45.
 +<code>
 +root@bpi-r4-v11:/sys/class/thermal/thermal_zone0
 +# cat trip_point_4_temp
 +40000
 +root@bpi-r4-v11:/sys/class/thermal/thermal_zone0
 +# cat trip_point_3_temp
 +85000
 +root@bpi-r4-v11:/sys/class/thermal/thermal_zone0
 +# echo 45000 > trip_point_3_temp
 +root@bpi-r4-v11:/sys/class/thermal/thermal_zone0
 +# echo 35000 > trip_point_4_temp
 +root@bpi-r4-v11:/sys/class/thermal/thermal_zone0
 +</code>
 ===== Network ===== ===== Network =====
  
Line 103: Line 130:
 {{ :en:bpi-r4:bpi-r4-gpio.png?direct&400 |}} {{ :en:bpi-r4:bpi-r4-gpio.png?direct&400 |}}
  
 +===== eeprom =====
 +
 +BPI-R4 has an eeprom on i2c-mux channel 0
 +
 +  [ 1.515672] at24 2-0057: 256 byte 24c02 EEPROM, writable, 1 bytes/write
 +
 +write-mode (wp-gpio is linked to green led):
 +<code>
 +# echo 0 > /sys/devices/platform/gpio-leds/leds/green:status/brightness
 +root@bpi-r4-v11:~
 +# echo "test" > /sys/bus/i2c/devices/2-0057/eeprom
 +root@bpi-r4-v11:~
 +# hexdump -C /sys/bus/i2c/devices/2-0057/eeprom
 +00000000  74 65 73 74 0a ff ff ff  ff ff ff ff ff ff ff ff  |test............|
 +00000010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
 +*
 +00000100
 +root@bpi-r4-v11:~
 +# echo 1 > /sys/devices/platform/gpio-leds/leds/green:status/brightness
 +root@bpi-r4-v11:~
 +</code>
 +
 +===== rtc =====
 +
 +Battery connection looks like charging circuit for ml2032. You should not connect non-rechargeable battery like cr2032.
 +
 +https://forum.banana-pi.org/t/bpi-r3-bpi-r4-does-the-bpi-r3-r4-have-a-rtc/17763/36
 +
 +Connector is JST with 1.25mm pitch
 +
 +RTC time will survive software reboot
 +<code>
 +# dmesg | grep rtc
 +[    1.479923] rtc-pcf8563 2-0051: low voltage detected, date/time is not reliable.
 +[    1.487390] rtc-pcf8563 2-0051: registered as rtc0
 +[    1.493378] rtc-pcf8563 2-0051: low voltage detected, date/time is not reliable.
 +[    1.500771] rtc-pcf8563 2-0051: hctosys: unable to read the hardware clock
 +root@bpi-r4-v11:~
 +# date -s "2024-04-27 09:55 CEST"
 +Sat Apr 27 07:55:00 UTC 2024
 +root@bpi-r4-v11:~
 +# hwclock -w
 +root@bpi-r4-v11:~
 +# hwclock -r
 +2024-04-27 07:56:23.979830+00:00
 +root@bpi-r4-v11:~
 +# reboot
 +...
 +root@bpi-r4-v11:~
 +# dmesg | grep rtc
 +[    1.480067] rtc-pcf8563 2-0051: registered as rtc0
 +[    1.486061] rtc-pcf8563 2-0051: setting system clock to 2024-04-27T07:56:53 )
 +root@bpi-r4-v11:~
 +# date
 +Sat Apr 27 08:00:46 UTC 2024
 +root@bpi-r4-v11:~
 +</code>
 ===== uboot/ATF ===== ===== uboot/ATF =====
  
Line 108: Line 192:
 currently use these: currently use these:
  
-  * uboot: https://github.com/frank-w/u-boot/tree/2023-10-bpi+  * uboot: https://github.com/frank-w/u-boot/tree/2024-04-bpi
   * ATF: https://github.com/frank-w/u-boot/tree/mtk-atf   * ATF: https://github.com/frank-w/u-boot/tree/mtk-atf
  
Line 215: Line 299:
  
 ==== openwrt ==== ==== openwrt ====
 +
 +=== upstream ===
 +
 +same as for r3
 +
 +https://forum.banana-pi.org/t/banana-pi-r3-bsp-source-code/14257/2
 +
 +but select BananaPi BPI-R4 of course :)
 +
 +i had to do a "make distclean" after "git pull" followed by the documented steps
 +
 +<code>
 +# Update the feeds
 +./scripts/feeds update -a
 +./scripts/feeds install -a
 +
 +make menuconfig
 +#select "Target System (MediaTek Ralink ARM)" => "Subtarget (Filogic 8x0 (MT798x))" => "Target Profile (Bananapi BPi-R4)"
 +make -j$(nproc)
 +</code>
 +
 +then write the sdcard image...
 +
 +  gunzip -c bin/targets/mediatek/filogic/openwrt-mediatek-filogic-bananapi_bpi-r4-sdcard.img.gz | sudo dd bs=1M status=progress conv=notrunc,fsync of=/dev/sdX
 +
 +=== downstream (sdk) ===
  
   * clone openwrt master   * clone openwrt master
Line 242: Line 352:
   tar -xf bin/targets/mediatek/filogic/openwrt-mediatek-filogic-mediatek_mt7988a-rfb-nand-squashfs-sysupgrade.bin sysupgrade-mediatek_mt7988a-rfb-nand/kernel   tar -xf bin/targets/mediatek/filogic/openwrt-mediatek-filogic-mediatek_mt7988a-rfb-nand-squashfs-sysupgrade.bin sysupgrade-mediatek_mt7988a-rfb-nand/kernel
   dumpimage -l sysupgrade-mediatek_mt7988a-rfb-nand/kernel   dumpimage -l sysupgrade-mediatek_mt7988a-rfb-nand/kernel
 +  
 +  tftpboot 0x50000000 openwrt-mediatek-filogic-bananapi_bpi-r4-initramfs-recovery.itb
 +  bootm 0x50000000#config-mt7988a-bananapi-bpi-r4#mt7988a-bananapi-bpi-r4-sd
      
 ===== Known Issues ===== ===== Known Issues =====
  
-* Card in M.2 slot causes i2c issues (sfp not detected): https://forum.banana-pi.org/t/bpi-r4-nvme-i2c/17152/2+  * Card in M.2 slot causes i2c issues (sfp not detected): https://forum.banana-pi.org/t/bpi-r4-nvme-i2c/17152/2 
 +  * pcie2 and some others (offloading with 4G, multiple ppe, rss/lro) not yet working (https://forum.banana-pi.org/t/banana-pi-bpi-r4-wifi-7-router-board-with-mediatek-mt7988a-filogic-880-4g-ram-and-8g-emmc/15757/241)
en/bpi-r4/start.txt · Last modified: 2024/05/13 17:48 by frank