Banana PI BPI-R4 CPU overclocking

I successfully overclocked the MT7988A to 2.4G, which greatly improved the running score. In this way, you can wrestle with Broadcom and Qualcomm

This is where the modification comes in

2 Likes

Interesting work. Thanks for sharing.

Have you checked the CPU temperature when stressed at 2.4GHz? And what cooling do you use?

In the case of running the CoreMark CPU under full load, the temperature of the radiator still comes to 55°, and it is estimated that it can exceed 80° without the radiator under full load

Here’s the radiator I use

1 Like

Brilliant! Temperature increase is well under control. Another sound reason for going with a beefier cooling solution. A 33% CPU performance uplift for free.

Hi @fwa233

I quickly tried this on kernel 6.9.2 and got the following kernel panic. Any idea why it’s not working?

[    T0] Booting Linux on physical CPU 0x0000000000 [0x411fd090]
[    T0] Linux version 6.9.2-1 (builder@ironbox) (gcc (GCC) 14.1.1 20240507, GNU ld (GNU Binutils) 2.42.0) #1 SMP PREEMPT Tue May 28 14:32:42 BST 2024
[    T0] Machine model: Banana Pi BPI-R4
[    T0] earlycon: uart8250 at MMIO32 0x0000000011000000 (options '')
[    T0] printk: legacy bootconsole [uart8250] enabled
[    T0] Memory limited to 3072MB
[    T0] efi: UEFI not found.
[    T0] OF: reserved mem: 0x0000000042ff0000..0x0000000042ffffff (64 KiB) map non-reusable ramoops@42ff0000
[    T0] OF: reserved mem: 0x0000000043000000..0x000000004304ffff (320 KiB) nomap non-reusable secmon@43000000
[    T0] Zone ranges:
[    T0]   DMA      [mem 0x0000000040000000-0x00000000ffffffff]
[    T0]   DMA32    empty
[    T0]   Normal   empty
[    T0] Movable zone start for each node
[    T0] Early memory node ranges
[    T0]   node   0: [mem 0x0000000040000000-0x0000000042ffffff]
[    T0]   node   0: [mem 0x0000000043000000-0x000000004304ffff]
[    T0]   node   0: [mem 0x0000000043050000-0x00000000ffffffff]
[    T0] Initmem setup node 0 [mem 0x0000000040000000-0x00000000ffffffff]
[    T0] psci: probing for conduit method from DT.
[    T0] psci: PSCIv1.1 detected in firmware.
[    T0] psci: Using standard PSCI v0.2 function IDs
[    T0] psci: MIGRATE_INFO_TYPE not supported.
[    T0] psci: SMC Calling Convention v1.4
[    T0] percpu: Embedded 30 pages/cpu s84776 r8192 d29912 u122880
[    T0] pcpu-alloc: s84776 r8192 d29912 u122880 alloc=30*4096
[    T0] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    T0] Detected VIPT I-cache on CPU0
[    T0] CPU features: detected: GIC system register CPU interface
[    T0] CPU features: detected: Spectre-BHB
[    T0] CPU features: detected: ARM erratum 858921
[    T0] alternatives: applying boot alternatives
[    T0] Kernel command line: board=bpi-r4 console=ttyS0,115200n1 earlycon=uart8250,mmio32,0x11000000 root=/dev/mmcblk0p6 rootfstype=ext4 rootwait debug=7 mem=3G
[    T0] Unknown kernel command line parameters "board=bpi-r4", will be passed to user space.
[    T0] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    T0] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    T0] Built 1 zonelists, mobility grouping on.  Total pages: 774144
[    T0] mem auto-init: stack:all(zero), heap alloc:on, heap free:on
[    T0] mem auto-init: clearing system memory may take some time...
[    T0] software IO TLB: SWIOTLB bounce buffer size adjusted to 3MB
[    T0] software IO TLB: area num 4.
[    T0] software IO TLB: SWIOTLB bounce buffer size roundup to 4MB
[    T0] software IO TLB: mapped [mem 0x00000000fbc00000-0x00000000fc000000] (4MB)
[    T0] Memory: 3052864K/3145728K available (14848K kernel code, 1848K rwdata, 4388K rodata, 4480K init, 378K bss, 92864K reserved, 0K cma-reserved)
[    T0] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    T0] trace event string verifier disabled
[    T0] rcu: Preemptible hierarchical RCU implementation.
[    T0] rcu:   RCU event tracing is enabled.
[    T0]        Trampoline variant of Tasks RCU enabled.
[    T0]        Tracing variant of Tasks RCU enabled.
[    T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    T0] RCU Tasks: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[    T0] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[    T0] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    T0] GICv3: GIC: Using split EOI/Deactivate mode
[    T0] GICv3: 416 SPIs implemented
[    T0] GICv3: 0 Extended SPIs implemented
[    T0] Root IRQ handler: gic_handle_irq
[    T0] GICv3: GICv3 features: 16 PPIs
[    T0] GICv3: CPU0: found redistributor 0 region 0:0x000000000c080000
[    T0] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    T0] arch_timer: Enabling local workaround for ARM erratum 858921
[    T0] arch_timer: CPU0: Trapping CNTVCT access
[    T0] arch_timer: cp15 timer(s) running at 13.00MHz (phys).
[    T0] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2ff89eacb, max_idle_ns: 440795202429 ns
[    T0] sched_clock: 56 bits at 13MHz, resolution 76ns, wraps every 4398046511101ns
[    T0] Console: colour dummy device 80x25
[    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=130000)
[    T0] pid_max: default: 32768 minimum: 301
[    T0] LSM: initializing lsm=capability,landlock,yama,safesetid,evm
[    T0] landlock: Up and running.
[    T0] Yama: becoming mindful.
[    T0] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    T0] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    T1] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    T1] rcu: Hierarchical SRCU implementation.
[    T1] rcu:   Max phase no-delay instances is 1000.
[    T1] EFI services will not be available.
[    T1] smp: Bringing up secondary CPUs ...
[    T0] Detected VIPT I-cache on CPU1
[    T0] GICv3: CPU1: found redistributor 1 region 0:0x000000000c0a0000
[    T0] arch_timer: Enabling local workaround for ARM erratum 858921
[    T0] arch_timer: CPU1: Trapping CNTVCT access
[    T0] CPU1: Booted secondary processor 0x0000000001 [0x411fd090]
[    T0] Detected VIPT I-cache on CPU2
[    T0] GICv3: CPU2: found redistributor 2 region 0:0x000000000c0c0000
[    T0] arch_timer: Enabling local workaround for ARM erratum 858921
[    T0] arch_timer: CPU2: Trapping CNTVCT access
[    T0] CPU2: Booted secondary processor 0x0000000002 [0x411fd090]
[    T0] Detected VIPT I-cache on CPU3
[    T0] GICv3: CPU3: found redistributor 3 region 0:0x000000000c0e0000
[    T0] arch_timer: Enabling local workaround for ARM erratum 858921
[    T0] arch_timer: CPU3: Trapping CNTVCT access
[    T0] CPU3: Booted secondary processor 0x0000000003 [0x411fd090]
[    T1] smp: Brought up 1 node, 4 CPUs
[    T1] SMP: Total of 4 processors activated.
[    T1] CPU: All CPU(s) started at EL2
[    T1] CPU features: detected: 32-bit EL0 Support
[    T1] CPU features: detected: CRC32 instructions
[    T1] alternatives: applying system-wide alternatives
[    T1] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    T1] devtmpfs: initialized
[    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    T1] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    T1] pinctrl core: initialized pinctrl subsystem
[    T1] DMI not present or invalid.
[    T1] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    T1] DMA: preallocated 512 KiB GFP_KERNEL pool for atomic allocations
[    T1] DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    T1] DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    T1] audit: initializing netlink subsys (disabled)
[   T38] audit: type=2000 audit(0.210:1): state=initialized audit_enabled=0 res=1
[    T1] thermal_sys: Registered thermal governor 'bang_bang'
[    T1] thermal_sys: Registered thermal governor 'step_wise'
[    T1] thermal_sys: Registered thermal governor 'user_space'
[    T1] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    T1] ASID allocator initialised with 65536 entries
[    T1] pstore: Using crash dump compression: deflate
[    T1] printk: legacy console [ramoops-1] enabled
[    T1] pstore: Registered ramoops as persistent store backend
[    T1] ramoops: using 0x10000@0x42ff0000, ecc: 0
[    T1] Modules: 26224 pages in range for non-PLT usage
[    T1] Modules: 517744 pages in range for PLT usage
[    T1] cryptd: max_cpu_qlen set to 1000
[    T1] raid6: neonx8   gen()  4205 MB/s
[    T1] raid6: neonx4   gen()  4552 MB/s
[    T1] raid6: neonx2   gen()  3592 MB/s
[    T1] raid6: neonx1   gen()  2766 MB/s
[    T1] raid6: int64x8  gen()  1938 MB/s
[    T1] raid6: int64x4  gen()  2146 MB/s
[    T1] raid6: int64x2  gen()  2074 MB/s
[    T1] raid6: int64x1  gen()  1691 MB/s
[    T1] raid6: using algorithm neonx4 gen() 4552 MB/s
[    T1] raid6: .... xor() 3348 MB/s, rmw enabled
[    T1] raid6: using neon recovery algorithm
[    T1] iommu: Default domain type: Translated
[    T1] iommu: DMA domain TLB invalidation policy: strict mode
[    T1] SCSI subsystem initialized
[    T1] libata version 3.00 loaded.
[    T1] usbcore: registered new interface driver usbfs
[    T1] usbcore: registered new interface driver hub
[    T1] usbcore: registered new device driver usb
[    T1] NetLabel: Initializing
[    T1] NetLabel:  domain hash size = 128
[    T1] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
[    T1] NetLabel:  unlabeled traffic allowed by default
[    T1] vgaarb: loaded
[    T1] clocksource: Switched to clocksource arch_sys_counter
[    T1] VFS: Disk quotas dquot_6.6.0
[    T1] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    T1] NET: Registered PF_INET protocol family
[    T1] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    T1] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    T1] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    T1] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    T1] TCP bind hash table entries: 32768 (order: 8, 1048576 bytes, linear)
[    T1] TCP: Hash tables configured (established 32768 bind 32768)
[    T1] MPTCP token hash table entries: 4096 (order: 4, 98304 bytes, linear)
[    T1] UDP hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    T1] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    T1] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    T1] NET: Registered PF_XDP protocol family
[    T1] PCI: CLS 0 bytes, default 64
[    T1] Initialise system trusted keyrings
[    T1] Key type blacklist registered
[    T1] workingset: timestamp_bits=46 max_order=20 bucket_order=0
[    T1] xor: measuring software checksum speed
[    T1]    8regs           :  5800 MB/sec
[    T1]    32regs          :  5861 MB/sec
[    T1]    arm64_neon      :  4176 MB/sec
[    T1] xor: using function: 32regs (5861 MB/sec)
[    T1] async_tx: api initialized (async)
[    T1] Key type asymmetric registered
[    T1] Asymmetric key parser 'x509' registered
[    T1] io scheduler mq-deadline registered
[    T1] io scheduler kyber registered
[    T1] mtk-xsphy soc:xphy@11e10000: failed to get ref_clk(id-1)
[    T1] mtk-socinfo mtk-socinfo.0.auto: error -ENOENT: Failed to get socinfo data
[    T1] mtk-socinfo mtk-socinfo.0.auto: probe with driver mtk-socinfo failed with error -2
[    T1] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    T1] printk: legacy console [ttyS0] disabled
[    T1] 11000000.serial: ttyS0 at MMIO 0x11000000 (irq = 99, base_baud = 2500000) is a ST16650V2
[    T1] printk: legacy console [ttyS0] enabled
[    T1] printk: legacy console [ttyS0] enabled
[    T1] printk: legacy bootconsole [uart8250] disabled
[    T1] printk: legacy bootconsole [uart8250] disabled
[    T1] brd: module loaded
[    T1] loop: module loaded
[    T1] spi-nand spi0.0: Winbond SPI NAND was found.
[    T1] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    T1] 2 fixed-partitions partitions found on MTD device spi0.0
[    T1] OF: Bad cell count for /soc/spi@11007000/spi_nand@0/partitions
[    T1] OF: Bad cell count for /soc/spi@11007000/spi_nand@0/partitions
[    T1] Creating 2 MTD partitions on "spi0.0":
[    T1] 0x000000000000-0x000000200000 : "bl2"
[    T1] 0x000000200000-0x000008000000 : "ubi"
[    T1] ubi0: default fastmap pool size: 50
[    T1] ubi0: default fastmap WL pool size: 25
[    T1] ubi0: attaching mtd1
[    T1] ubi0: scanning is finished
[    T1] ubi0: attached mtd1 (name "ubi", size 126 MiB)
[    T1] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    T1] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    T1] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    T1] ubi0: good PEBs: 1008, bad PEBs: 0, corrupted PEBs: 0
[    T1] ubi0: user volume: 7, internal volumes: 1, max. volumes count: 128
[    T1] ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 0
[    T1] ubi0: available PEBs: 0, total reserved PEBs: 1008, PEBs reserved for bad PEB handling: 20
[  T780] ubi0: background thread "ubi_bgt0d" started, PID 780
[    T1] usbcore: registered new interface driver cdc_wdm
[    T1] usbcore: registered new interface driver uas
[    T1] usbcore: registered new interface driver usb-storage
[    T1] i2c_dev: i2c /dev entries driver
[    T1] i2c 0-0064: Fixed dependency cycle(s) with /soc/i2c@11003000/rt5190a@64/regulators/buck1
[    T1] pca954x 1-0070: supply vdd not found, using dummy regulator
[    T1] rtc-pcf8563 2-0051: low voltage detected, date/time is not reliable.
[    T1] rtc-pcf8563 2-0051: registered as rtc0
[    T1] rtc-pcf8563 2-0051: low voltage detected, date/time is not reliable.
[    T1] rtc-pcf8563 2-0051: hctosys: unable to read the hardware clock
[    T1] at24 2-0057: supply vcc not found, using dummy regulator
[    T1] at24 2-0057: 256 byte 24c02 EEPROM, writable, 1 bytes/write
[    T1] i2c i2c-1: Added multiplexed i2c bus 2
[    T1] i2c i2c-1: Added multiplexed i2c bus 3
[    T1] i2c i2c-1: Added multiplexed i2c bus 4
[    T1] i2c i2c-1: Added multiplexed i2c bus 5
[    T1] pca954x 1-0070: registered 4 multiplexed busses for I2C switch pca9545
[    T1] mtk-wdt 1001c000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    T1] device-mapper: uevent: version 1.0.3
[    T1] device-mapper: ioctl: 4.48.0-ioctl (2023-03-01) initialised: [email protected]
[    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[    T1] device-mapper: multipath historical-service-time: version 0.1.1 loaded
[    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[  T743] mtk-msdc 11230000.mmc: Got CD GPIO
[   T49] ------------[ cut here ]------------
[   T49] kernel BUG at drivers/regulator/core.c:492!
[   T49] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
[   T49] Modules linked in:
[   T49] CPU: 2 PID: 49 Comm: kworker/2:1 Tainted: G                T  6.9.2-1 #1
[   T49] Hardware name: Banana Pi BPI-R4 (DT)
[   T49] Workqueue: events dbs_work_handler
[    C0] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=52 arg=00000C00; host->error=0x00000002
[   T49] pstate: 20400005 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    C0] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=52 arg=80000C08; host->error=0x00000002
[   T49] pc : regulator_check_voltage+0xfc/0x13c
[   T49] lr : regulator_set_voltage_unlocked+0x94/0x180
[    C0] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=5 arg=00000000; host->error=0x00000002
[   T49] sp : ffffffc082173b70
[    C0] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=5 arg=00000000; host->error=0x00000002
[   T49] x29: ffffffc082173b70 x28: 00000000000cf850 x27: ffffff80bf956890
[    C0] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=5 arg=00000000; host->error=0x00000002
[   T49] x26: ffffff8002266cd8 x25: ffffff8002266c80 x24: 0000000000000000
[    C0] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=5 arg=00000000; host->error=0x00000002
[   T49] x23: ffffff8000ecd000 x22: 0000000000000000 x21: ffffff80003aa800
[   T49] x20: 00000000000f4240 x19: ffffff8000ecd000 x18: 0000000000000000
[   T49] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
[   T49] x14: 0000000000000000 x13: 006963633a6d726f x12: 6674616c703a7265
[   T48] mmc0: host does not support reading read-only switch, assuming write-enable
[   T49] x11: 7f7f7f7f7f7f7f7f x10: 0000000000000000 x9 : 0000000000000000
[   T48] mmc0: new high speed SDXC card at address 0001
[   T49] x8 : ffffffc082173a20 x7 : 0000000000000000 x6 : 00000000000f4240
[   T49] x5 : 00000000000dbba0 x4 : 0000000000000000 x3 : 0000000000000000
[   T49] x2 : ffffffc082173bb8 x1 : ffffffc082173bbc x0 : ffffff80003aa800
[   T49] Call trace:
[   T49]  regulator_check_voltage+0xfc/0x13c
[   T49]  regulator_set_voltage+0x60/0xc4
[   T49]  mtk_cpufreq_set_target+0x1f4/0x3a0
[   T49]  __cpufreq_driver_target+0x294/0x884
[   T49]  od_dbs_update+0x15c/0x1f8
[   T49]  dbs_work_handler+0x40/0x90
[   T49]  process_one_work+0x198/0x480
[   T49]  worker_thread+0x308/0x430
[   T49]  kthread+0xfc/0x114
[   T49]  ret_from_fork+0x10/0x20
[   T49] Code: 6b04001f 54fffd4b 2a0003e4 17ffffea (d4210000)
[   T49] ---[ end trace 0000000000000000 ]---
[   T49] pstore: backend (ramoops) writing error (-28)
[   T49] Kernel panic - not syncing: Oops - BUG: Fatal exception
[   T49] SMP: stopping secondary CPUs
[   T49] Kernel Offset: disabled
[   T49] CPU features: 0x0,00000081,00100000,4200420b
[   T49] Memory Limit: 3072 MB
[   T49] Rebooting in 10 seconds..

Try with less ambitious value first, say 1.9GHz. Keep the voltage untouched. Gradually raise the Ghz until crash.

You can try switching to a 5.4 kernel. If it’s not due to the kernel, you can try raising the voltage. Some CPUs may not have a good physical condition

Successfully overclocked my BPI R4 from 1.8GHz to 2.24GHz on stock voltage with modified OpenWrt snapshot.

Just briefly tested but stability is excellent on ‘openssl speed’ run on all cores for 10 mins. Temperature is barely 2C higher. Power consumption is 0.8W more. This is huge profit and a low hanging fruit. Will explore more on a future day to optimise power, frequency & temperature.

Does anyone know which TSMC process node fabricates FiLogic 880 ?

I think I read somewhere that it is TSMC N6, but not sure.

1 Like

@fwa233 is your 2.4 overclock stable in hot summer ?

Wait, mine shows 1080000000, instead of 1800000000. File ./BPI-Router-Linux/arch/arm64/boot/dts/mediatek/mt7988a.dtsi from @frank-w 's repo.

image

i took dts parts mostly from @dangowrt, is 1800000000 right here?

can you share your dts ? thank you

mt7988 is 12nm, but mt7996 WiFi is 6nm.

Here is mine, but i failed to test it. Probably missed a prompt on the build.sh. Going to test again today or tomorow. mt7988a.dtsi (35.5 KB)

1 Like