On Wed, 15 Oct 2014 12:10:44 +0200 Hans de Goede <hdego...@redhat.com> wrote:
> Some fex files contain wrong values, causing stability issues. > > Signed-off-by: Hans de Goede <hdego...@redhat.com> > --- > drivers/power/axp152.c | 22 ++++++++++++---------- > 1 file changed, 12 insertions(+), 10 deletions(-) > > diff --git a/drivers/power/axp152.c b/drivers/power/axp152.c > index 77132e1..3b8e68f 100644 > --- a/drivers/power/axp152.c > +++ b/drivers/power/axp152.c > @@ -541,15 +541,17 @@ static struct regulator_init_data > regl_init_data[AXP152_REGULATOR_COUNT] = { > .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, > } > }, > - [axp152_dcdc3] = { /* Vddr, power on 1.5V, Android from fex */ > + [axp152_dcdc3] = { /* Vddr, power on 1.5V, use u-boot value */ > .num_consumer_supplies = 1, > .consumer_supplies = &axp152_dcdc3_supply, > .constraints = { > - .min_uV = 1500 * 1000, > - .max_uV = 1500 * 1000, > + .min_uV = 1000 * 1000, > + .max_uV = 1600 * 1000, > .always_on = 1, > - .apply_uV = 1, > - .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, > + /* > + * We do not allow changing the DRAM voltage, because > + * of stability, so no REGULATOR_CHANGE_VOLTAGE. > + */ > } > }, > [axp152_dcdc4] = { /* Vcpu, power on 1.25V, Android from fex */ > @@ -622,11 +624,11 @@ static int __init axp_board_init(void) > > /* Note we ignore the dcdc2_vol key as dcdc2 is set by the dvfs code */ > > - ret = script_parser_fetch("target", "dcdc3_vol", &val, sizeof(int)); > - if (ret == 0) { > - regl_init_data[axp152_dcdc3].constraints.min_uV = val * 1000; > - regl_init_data[axp152_dcdc3].constraints.max_uV = val * 1000; > - } > + /* > + * Note we ignore the dcdc3_vol key as that sometimes contains wrong > + * values make the dram unstable, instead we stick with the bootloader > + * set voltage. > + */ > > ret = script_parser_fetch("target", "dcdc4_vol", &val, sizeof(int)); > if (ret == 0) { Thanks, looks good. Should we also try ti preserve the dcdc4 value from the bootloader for AXP152? It provides power for VDD-DLL, just like dcdc3 in the case of AXP209. Regarding other differences, on Allwinner A10/A20, VCC-DRAM seems to be usually taking 1.5V from some other sources (not as a direct output from AXP209). BTW, this is inconsistent with my older patch https://github.com/linux-sunxi/linux-sunxi/commit/5052b83aa44dc16d6662d8d9d936166c139ad8c5 I tried to make it deliberately spammy, so that if anyone encounters any regression, identifying the root cause would be easy. However your approach is clearly more correct. Acked-by: Siarhei Siamashka <siarhei.siamas...@gmail.com> -- Best regards, Siarhei Siamashka -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.