Revisiting RK3399 LPDDR speeds - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111) +--- Forum: Pinebook Pro Hardware and Accessories (https://forum.pine64.org/forumdisplay.php?fid=116) +--- Thread: Revisiting RK3399 LPDDR speeds (/showthread.php?tid=15661) |
Revisiting RK3399 LPDDR speeds - Syonyk - 01-01-2022 As the world turns loony about computing, I've decided it's a good time to get back into some low level ARM hacking, and since I've been daily driving the PBP for a while (it's boring, it works, if you've not flashed the recent trackpad firmware go do so because it makes the trackpad absolutely acceptable), I figure I should hack on it a bit more. That a friend shipped me a spare one as dev hardware doesn't hurt... Anyway, some while ago, I was curious as to the DRAM training speed for the PBP: https://forum.pine64.org/showthread.php?tid=10398 The long and short of it is that the PBP runs the LPDDR4 at 800MHz. Buuuut, from that other thread, maybe it can run faster? I imagine most of us are running the bootloader from here: https://gitlab.manjaro.org/manjaro-arm/packages/core/uboot-pinebookpro-bsp Trimming the training a bit, you get: Code: DDR Version 1.15 20181010 DDR version 1.15, 2018/10/10, trains in at 800MHz. As generally acknowledge and expected. @tllim offered up a v1.11 933MHz driver in the other thread that was claimed to run the DDR4 faster. I built it thusly, from the rkbin tree: Code: tools/mkimage -n rk3399 -T rksd -d ../rk3399_ddr_933MHz_v1.11.bin idbloader.img And flashed it to the SD card. Result: Code: DDR Version 1.11 20180509 I'm confident that I've flashed the new .bin file, because it's version 1.11 - vs 1.15 from earlier. However, no signs of the 933MHz memory I was promised. However, exploring yet further, there's a newer file in the rkbin tree: rk3399_ddr_933MHz_v1.25.bin Well, let's try it out! And that does something far more interesting looking! Code: DDR Version 1.25 20210517 Version 1.25, as expected... and it manages to find some new rates, including 928MHz - which is close to 933Mhz. However, it then seems to settle in at 856MHz, vs the maximum rate found. At this point, I have my suspicions that this then somehow interacts with the dynamic DRAM scaling features that rk3399 has in the Linux kernel - but I've not gotten quite that far. Does anyone have any handy tips on how to get this to actually leave 928MHz the current speed, or how to get that selected later at runtime? Not sure if I'm barking down the right path here or not. There is then this document: https://usermanual.wiki/Document/RockchipDeveloperGuideDDREN.583134866/view It describes how to set up DDR frequency scaling in Linux. I cannot find any evidence of those dtb elements being present in the rk3399 dts section of the kernel. Is there a fork that has them? Theoretically the kernel has the rockchip frequency scaling by 5.x, given it was put in back in the 4.x series... RE: Revisiting RK3399 LPDDR speeds - Syonyk - 01-02-2022 I *think* the required bits for DDR frequency scaling are in the kernel, but nobody has shipped DTS files with any of the required sections. It also just makes a call down into the appropriate ATF layer to do the actual scaling, so requires support down there as well. I would hope the BSP UBoot/ATF have support, but I've not verified it yet. Will keep poking... |