
I have an i.MX6Q powered by the pfuze100 regulator with DM_PMIC, DM_REGULATOR, and OF_CONTROL enabled along wtih CMD_REGULATOR and CMD_PMIC.
Our device tree is configured to use the minimum and max voltage ratings for the parts on the board, and not the absolute min and max ratings for the PMIC itself.
For example, I have the device tree setup for one regulator as follows:
sw2_reg: sw2 { regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-name = "gen_3v3"; regulator-boot-on; regulator-always-on; };
However, when I read the value with 'regulator dev gen_3v3; regulator status' it returns 4550000 which exceeds the max value. Physically reading this voltage on a scope show the correct value, so the PMIC is regulating to what I want and expect.
When I look at the regulator driver, it appears as if we're taking the value returned from the PMIC, masking it off, multiplying it by the value of step, then adding it the min_uV value, but this seems wrong if min = max.
If print the value of min_uV, it matches the minimum value from the device tree. Since the Min and max are both the same, adding anything to the min value would exceed the max.
I compared this to the Linux driver, and the Linux driver has some hard-coded values that it uses for min and max as opposed to using the device tree, however, if I try to overrride the values of min_uV by replacing them with the value passed from the Linux driver, it still returns an incorrect value. I've tried to disect the Linux driver, but I haven't been able to figure out excactly how it determines the values. When I am in Linux, however, the returned values are correct, so Linux is doing something correct, whereas the U-Boot isn't.
Might someone have any suggestions?
for sure the switching regulators are wrong. I haven't fully tested all the regulators.
adam