As there have been some discussion about the regulator coupler internally, I checked how this works and if the current code is fine. The algorithm works like this:
The OPP has <min_uV optimal_uV max_uV> defined. The GPU core and mem regulators are coupled with <max_spread_uV>. The regulator core tries to reach optimal voltage for both regulators (so the exact same voltage for both of them) by changing the voltage of both regulators, since they are coupled. It alternates between them and always makes sure the difference is not exceeding the max. allowed spread.
So if max-spread is 0, the core is not allowed to change the voltage at all. Also 1 won't work either, since the rk806 DCDC regulators cannot be configured in 1µV steps. Thus 1 is effectively the same as 0. Effectively using a small value for max-spread means the regulator framework needs to do many intermediate steps to reach the final voltage, because it will alternate between the regulators and change their voltage using the max-spread as step size. Having a bigger value allows doing the transition with less intermediate steps and should be preferred, as long as it does not negatively impact the hardware.
Looking at the voltages used by the GPU, the OPPs are specified to be 0.675V (300 MHz) - 0.85V (1GHz). So the effective total range is 0.175V. The current code allows a maximum spread between the regulators of 100mV. So the regulator core can go from minimal voltage to maximum voltage in 3 steps:
Now the question is - does the temporary rather big difference between core and mem voltage negatively effect the hardware? IDK that part. Ideally it is documented in the TRM, but I have not yet found anything.
I had a look at the downstream code for dual-regulator OPP handling. drivers/soc/rockchip/rockchip_opp_select.c has a OPP calibration routine, which always first sets mem and then core (independent of voltage going up or down) and does not care for the spread at all. So I think for now I will upstream with the 100mV max-spread.
Considering the CPU is using 10mV and Mediatek is also using 10mV max-spread for this feature with previous GPU generations, I also changed to 10mV. Better safe then sorry. We can always increase it, when we get more information at a later point in time.