-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DVFS #6
Comments
Hmm... feeling somewhat stupid now since I forgot that OPi PC 2 isn't equipped with SY8113B (switching between 1.1V and 1.3V only) but comes with SY8106A instead (fine grained voltage adjustments). So my proposed values for OPi PC 2 above are all more or less nonsense (but the basic principle might help cure OS images for the smaller H3 Oranges). But already as a reference for all those guys eagerly trying to 'overclock' H5. Simply take the two hours and read carefully through longsleep/build-pine64-image#3 first. H5 has a way more capable GPU than A64 so thermal issues are even more an issue. And undervoltage is always a nice way to decrease stability/reliabity and great for data corruption. |
@ThomasKaiser |
Anyone already tried this out (pmuic_type = <0x2>;):
At least with A64 it was necessary to make this change already within u-boot since DVFS settings were ignored when only adjusting the values in the Voltage values adjusted to comments here. |
@ehoutsma @tkggithub @sv1eia this needs some testing (and I can't test any more since I sent my board to the person who did mainline u-boot support for H5 weeks ago) |
@ThomasKaiser |
No, it's not about this
|
I'll run a few tests in the morning. If it isn't overwritten the fdt commands are helpfull. |
@ehoutsma Hmm... can't work anyway (was just a thought since with H3 legacy kernel it's just like that). Maybe the magic is contained somewhere here: axpdummy or https://github.com/OrangePiLibra/OrangePi_H5SDK/tree/master/u-boot/drivers/arisc |
The arisc seems to load the dvfs from fdt. But we'll find out tomorrow. |
Hmm... |
The initial dvfs table is loaded in the binary scp's header by the update_scp tool. Then it is also loaded from u-boot and transferred to scp (arisc, ar100, or cpu-s however you prefer to name it), I would also not rule out the arisc code from the kernel that could interact with dvfs. Regarding u-boot: How the table is actually (mis)used :) within the arisc core ... still remains unknown at least for me as I have only seen the binary. I still have few questions about the scp binary as at least the version it reports seems to be for an a33 and not h5.
|
Well, now that @ehoutsma confirmed that mainline H3 ths patches work in a similar way with H5 I won't spend any more time on this BSP mess. Small note: https://github.com/igorpecovnik/linux/search?utf8=%E2%9C%93&q=pmuic_type Not a single reference to And I know I'm repeating myself: but dvfs stuff has to happen in u-boot already so please don't fiddle around with |
Again wrong (my search in H3 legacy kernel was in empty master branch instead of sun8i branch). In H3 legacy kernel |
@ThomasKaiser I altered the dvfs_table, changing the max_freq from 1008MHz to 816MHz in the user dtb, and that is reflected in the cpufreq_max_freq and the max freq is limited to 816MHz. Max_freq still seems to be limited to 1008MHz. I can't test wether changing the freq/voltage combination is applied since I can't read the sy8106a at the moment and I haven't seen proof that the sy8106a is used anyway. Altering the budget cooling works as well from user dtb. |
@ehoutsma The kernel has calls to the monitor (BL31) to request a specific freq. I tried for instance setting 1.2Ghz as scaling_max and that was clamped to 1.08Ghz. One way to check if voltage is taken into consideration would be to modd the 480Mhz voltage. On idle the cpu sits mostly there. With an external power meter you can see if there is any significant diff from changing the voltage for instance from 1.1V to 1,3V. If there is one then you know that your dvfs voltage table is used. I still need to adapt a suitable plug for my usb power meter and maybe I'll be able to test it over the weekend. |
Adapting the DVFS table, changing max_freq to 816MHz works from the start, to increase the speed, I had to change the cooling_budget_table as well, but that worked like a charm. Enter 1152 in both the max_freq and cooling_budget_table makes it run at 1152 MHz, but still at 1100mV, changing lv1_volt doesn't help. |
@ehoutsma |
Measure the voltage at the 1V1C point. |
@ehoutsma |
Having investigated a bit more the issue, I think there is at least some redesign of dvfs from the lichee SDK. The more interesting part is that arisc_axp.c from kernel/drivers/arisc/interfaces does have functions that issue BL31 calls (that should end-up in the arisc core) to set some voltages. Look for the ARM_SVC_ARISC_SET_PMU_VOLT define for more info. Whether those calls are for cpu voltages or other peripherals I don't know yet. :) Anyway, the short story is that the dvfs table is no longer (properly) loaded by uboot. |
I decided to dig a bit on the hardware side and at least for my setup (using a slightly modded BL31 from the lichee SDK) I could see no trace of any activity on the TWI (I2C) bus going to SY8106A during normal run of OPI PC2. |
I succeeded to finally get some very limited output from arisc. The missing bit for me was that arisc uses a separate uart for debug (using pins PL02(tx) and PL03(rx)). PL03 does not seem to be even routed but at least PL02 is available as it is also used to set usb0 voltage. I did took out for now R41 so that when enabling PL02 for serial not to toggle usb0 power and I enabled the arisc serial. This is for instance some output:
Maybe the "pmu is not exist" is relevant as it seems to claim that there is a missing configuration. Does anyone know what this "pmu is not exist" from arisc really means? |
Hi @BuddyZhang1, Or at least can someone confirm that the SCP binary has code to handle SY8106A? |
Call for testers. In the meantime due to kind souls continually improving things (thanks @ehoutsma !) we have DVFS running with latest mainline kernel. So any board owners involved here wanting to help please feel free to try it out, do some stress tests and report back then: https://forum.armbian.com/index.php/topic/2869-armbian-for-orangepi-pc2-allwinner-h5/?p=23975 |
Did you ever try out to specify the upper 1.3V dvfs operating points the 'usual' way:11300
vs.1100
?(please don't forget to allow/add 2 more states above 1008 MHz in
cpu_budget_cool
too). I would believe there's a test point on the board to measure and at least cpuburn-a53 should be able to confirm reliability.BTW: In case that works, then please check situation with all H3 boards too -- at least all images I tried so far from Xunlong's download section were broken here and specified the upper voltage wrong. For details please see: https://forum.armbian.com/index.php/topic/724-quick-review-of-orange-pi-one/
The text was updated successfully, but these errors were encountered: