On Wed, Jul 13, 2016 at 3:48 AM, Stefano Babic <sba...@denx.de> wrote: > Hi Tim, > > On 17/06/2016 15:01, Tim Harvey wrote: >> This series addresses some stability issues related to voltage rails on >> the IMX6 based Gateworks Ventana product family. >> >> Tim Harvey (5): >> imx: mx6: export the set_ldo_voltage function >> imx: ventana: fix PMIC rail adjustments for IMX6SDL in ldo-bypass mode >> pmic: ltc3676: add regulator config function >> imx: ventana: use continuous PWM mode and 1MHz for LTC3676 PMIC >> regulators >> imx: ventana: enable ldo-bypass mode on compatible kernels if >> ldobypass env set >> >> arch/arm/cpu/armv7/mx6/soc.c | 8 +- >> arch/arm/include/asm/arch-mx6/sys_proto.h | 9 ++ >> board/gateworks/gw_ventana/common.c | 109 +++++++++++++++------ >> board/gateworks/gw_ventana/common.h | 3 +- >> board/gateworks/gw_ventana/gw_ventana.c | 152 >> +++++++++++++++++++++++++++++- >> drivers/power/pmic/pmic_ltc3676.c | 16 ++++ >> include/power/ltc3676_pmic.h | 40 ++++++++ >> 7 files changed, 301 insertions(+), 36 deletions(-) >> > > I do not find in my emailer 5/5 - I grab 0/5 for the answer. >
Stefano, If your missing 5/5 you can find it in my patches here: https://patchwork.ozlabs.org/project/uboot/list/?submitter=41730 > Patch 4/5 is like a trick, but I am asking if the same solution can be > used on other boards. The issue looks to me quite general, and if > ldo-bypass must be set depends on if there is a capable PMIC. 4/5 'ventana: use continuous PWM mode and 1MHz for LTC3676 PMIC regulators' was really about configuring the LTC3676 PMIC to use 'continuous PWM' instead of its power-on default of 'pulse skipping' mode which was just noisy enough to cause issues with the IMX6 when it was in ldo-bypass mode. Is this the patch you were thinking of and what was it you felt could be made more common? There definitely is a 'trick' to determine if the kernel uses ldo-bypass by examining its device-tree vddarm/vddsoc regulators in 'imx: ventana: fix PMIC rail adjustments for IMX6SDL in ldo-bypass mode' and there is another 'trick' perhaps in 'imx: ventana: enable ldo-bypass mode on compatible kernels if ldobypass env set' which involves changing a device-tree that is found to 'support' LDO-bypass mode but does not have it enabled but I'm not sure that is what you meant. > > What about to let this code become more general moving into imx-common ? > Do you see any issue why we shouldn't ? > I maybe should have split of this series into 3 sets but I figured I would lump them all together as they were all 'power/PMIC' related: 1/5: imx: mx6: export the set_ldo_voltage function 2/5: imx: ventana: fix PMIC rail adjustments for IMX6SDL in ldo-bypass mode - these resolved a 1 to 5% board hang for ldo-bypass mode 3/5: pmic: ltc3676: add regulator config function 4/5: imx: ventana: use continuous PWM mode and 1MHz for LTC3676 PMIC regulators - these resolved a general board stability issue due to noise sensitivity of the IMX6 when using ldo-bypass mode 5/5: imx: ventana: enable ldo-bypass mode on compatible kernels if ldobypass env set - this will re-assign regulators in the device-tree to enable ldo-bypass mode for device-tree's that are capable of running ldo-bypass mode but have it disabled As you likely know, IMX6 LDO-bypass requires board and kernel support such that the kernel must have a PMIC driver capable of adjusting vddarm and vddsoc within the range specified by the operation points in the device-tree. Additionally, the device-tree must reference the PMIC regulators and something in the kernel must put the IMX6 LDO's in 'bypass' mode by fully opening the FET's. Note that there is not yet support for LDO-bypass in the mainline kernel, so this is strictly used currently for Freescales downstream kernel currently. I found that the recommended voltage ranges when in ldo-bypass mode vs ldo-enabled mode don't overlap, specifically the maximum vddsoc for imx6sdl in LDO-bypass mode exceeds the minimum for LDO-enabled mode. I was able to prove that exceeding 1.21v for vddsoc when using ldo-bypass mode does indeed cause an issue with the PCIe core (hangs occasionally on init in the kernel). Therefore my only solution was to determine which mode was going to be used by the booting kernel and make adjustments while we could in the bootloader before booting the kernel. Now, after reviewing all of these to answer your questions I realize that: a) IMX6 ldo-bypass is not yet in the mainline Linux kernel b) IMX6 ldo-bypass may not be all that desirable anyway: the voltage tolerances are much tighter which could cause stability issues, it lowers the processor lifespan, and the power savings are not that great in general use cases c) the two tricks mentioned above only resolve issues that occur on boards with ldo-bypass enabled d) we switched our downstream Freescale vendor kernel a while back to use ldo-enabled mode because we felt it was more stable and improved part longevity. This was when I wrote '5/5: imx: ventana: enable ldo-bypass mode on compatible kernels if ldobypass env set' to allow users to still use it if their application was very power sensitive So, I think I'll drop this series as it doesn't pertain to mainline Linux kernels. I may re-write 4/5 and re-submit as I do feel that continuous PWM mode for the LTC3676 PMIC may be more suitable for sensitive rails in general. Regards, Tim _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot