From 9c9835ebceb5465d4d2cbe94e9fa091a24a88d1a Mon Sep 17 00:00:00 2001 From: Fugang Duan Date: Thu, 4 May 2017 16:36:13 +0800 Subject: MLK-14777 imx: mx6ul/mx6ull/mx7d: correct the usage of the macro PFUZE3000_SW1AB_SETP() Commit:894a4b4da7e2 add the voltage configuration macro that base on the 0.1mV precision, and i.MX6UL/i.MX6ULL/i.MX7D use the macro as 1mV prevision that cause the conversion are wrong, then some boards cannot boot up in ldo bypass mode. The patch just correct the usage of PFUZE3000_SW1AB_SETP(). Signed-off-by: Fugang Duan --- board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 8 ++++---- board/freescale/mx6ullevk/mx6ullevk.c | 8 ++++---- board/freescale/mx7d_12x12_ddr3_arm2/mx7d_12x12_ddr3_arm2.c | 2 +- board/freescale/mx7d_12x12_lpddr3_arm2/mx7d_12x12_lpddr3_arm2.c | 2 +- board/freescale/mx7d_19x19_ddr3_arm2/mx7d_19x19_ddr3_arm2.c | 4 ++-- board/freescale/mx7d_19x19_lpddr3_arm2/mx7d_19x19_lpddr3_arm2.c | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c index 1c67d99..2aea9d0 100644 --- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c +++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c @@ -252,11 +252,11 @@ void ldo_mode_set(int ldo_bypass) /* decrease VDDARM to 1.275V */ pmic_reg_read(p, PFUZE3000_SW1BVOLT, &value); value &= ~0x1f; - value |= PFUZE3000_SW1AB_SETP(1275); + value |= PFUZE3000_SW1AB_SETP(12750); pmic_reg_write(p, PFUZE3000_SW1BVOLT, value); set_anatop_bypass(1); - vddarm = PFUZE3000_SW1AB_SETP(1175); + vddarm = PFUZE3000_SW1AB_SETP(11750); pmic_reg_read(p, PFUZE3000_SW1BVOLT, &value); value &= ~0x1f; @@ -329,11 +329,11 @@ void ldo_mode_set(int ldo_bypass) /* decrease VDDARM to 1.275V */ value = pmic_reg_read(dev, PFUZE3000_SW1BVOLT); value &= ~0x1f; - value |= PFUZE3000_SW1AB_SETP(1275); + value |= PFUZE3000_SW1AB_SETP(12750); pmic_reg_write(dev, PFUZE3000_SW1BVOLT, value); set_anatop_bypass(1); - vddarm = PFUZE3000_SW1AB_SETP(1175); + vddarm = PFUZE3000_SW1AB_SETP(11750); value = pmic_reg_read(dev, PFUZE3000_SW1BVOLT); value &= ~0x1f; diff --git a/board/freescale/mx6ullevk/mx6ullevk.c b/board/freescale/mx6ullevk/mx6ullevk.c index aef4ce9..507343e 100644 --- a/board/freescale/mx6ullevk/mx6ullevk.c +++ b/board/freescale/mx6ullevk/mx6ullevk.c @@ -125,11 +125,11 @@ void ldo_mode_set(int ldo_bypass) /* decrease VDDARM to 1.275V */ pmic_reg_read(p, PFUZE3000_SW1BVOLT, &value); value &= ~0x1f; - value |= PFUZE3000_SW1AB_SETP(1275); + value |= PFUZE3000_SW1AB_SETP(12750); pmic_reg_write(p, PFUZE3000_SW1BVOLT, value); set_anatop_bypass(1); - vddarm = PFUZE3000_SW1AB_SETP(1175); + vddarm = PFUZE3000_SW1AB_SETP(11750); pmic_reg_read(p, PFUZE3000_SW1BVOLT, &value); value &= ~0x1f; @@ -202,11 +202,11 @@ void ldo_mode_set(int ldo_bypass) /* decrease VDDARM to 1.275V */ value = pmic_reg_read(dev, PFUZE3000_SW1BVOLT); value &= ~0x1f; - value |= PFUZE3000_SW1AB_SETP(1275); + value |= PFUZE3000_SW1AB_SETP(12750); pmic_reg_write(dev, PFUZE3000_SW1BVOLT, value); set_anatop_bypass(1); - vddarm = PFUZE3000_SW1AB_SETP(1175); + vddarm = PFUZE3000_SW1AB_SETP(11750); value = pmic_reg_read(dev, PFUZE3000_SW1BVOLT); value &= ~0x1f; diff --git a/board/freescale/mx7d_12x12_ddr3_arm2/mx7d_12x12_ddr3_arm2.c b/board/freescale/mx7d_12x12_ddr3_arm2/mx7d_12x12_ddr3_arm2.c index ff07969..d5dbc3c 100644 --- a/board/freescale/mx7d_12x12_ddr3_arm2/mx7d_12x12_ddr3_arm2.c +++ b/board/freescale/mx7d_12x12_ddr3_arm2/mx7d_12x12_ddr3_arm2.c @@ -153,7 +153,7 @@ int power_init_board(void) /* set SW1B normal voltage to 0.975V */ reg = pmic_reg_read(dev, PFUZE3000_SW1BVOLT); reg &= ~0x1f; - reg |= PFUZE3000_SW1AB_SETP(975); + reg |= PFUZE3000_SW1AB_SETP(9750); pmic_reg_write(dev, PFUZE3000_SW1BVOLT, reg); return 0; diff --git a/board/freescale/mx7d_12x12_lpddr3_arm2/mx7d_12x12_lpddr3_arm2.c b/board/freescale/mx7d_12x12_lpddr3_arm2/mx7d_12x12_lpddr3_arm2.c index 4f8425e..692f158 100644 --- a/board/freescale/mx7d_12x12_lpddr3_arm2/mx7d_12x12_lpddr3_arm2.c +++ b/board/freescale/mx7d_12x12_lpddr3_arm2/mx7d_12x12_lpddr3_arm2.c @@ -622,7 +622,7 @@ int power_init_board(void) /* set SW1B normal voltage to 0.975V */ reg = pmic_reg_read(dev, PFUZE3000_SW1BVOLT); reg &= ~0x1f; - reg |= PFUZE3000_SW1AB_SETP(975); + reg |= PFUZE3000_SW1AB_SETP(9750); pmic_reg_write(dev, PFUZE3000_SW1BVOLT, reg); return 0; diff --git a/board/freescale/mx7d_19x19_ddr3_arm2/mx7d_19x19_ddr3_arm2.c b/board/freescale/mx7d_19x19_ddr3_arm2/mx7d_19x19_ddr3_arm2.c index 881b6a1..b3d4621 100644 --- a/board/freescale/mx7d_19x19_ddr3_arm2/mx7d_19x19_ddr3_arm2.c +++ b/board/freescale/mx7d_19x19_ddr3_arm2/mx7d_19x19_ddr3_arm2.c @@ -565,7 +565,7 @@ int power_init_board(void) /* set SW1B normal voltage to 0.975V */ pmic_reg_read(p, PFUZE3000_SW1BVOLT, ®); reg &= ~0x1f; - reg |= PFUZE3000_SW1AB_SETP(975); + reg |= PFUZE3000_SW1AB_SETP(9750); pmic_reg_write(p, PFUZE3000_SW1BVOLT, reg); return 0; @@ -604,7 +604,7 @@ int power_init_board(void) /* set SW1B normal voltage to 0.975V */ reg = pmic_reg_read(dev, PFUZE3000_SW1BVOLT); reg &= ~0x1f; - reg |= PFUZE3000_SW1AB_SETP(975); + reg |= PFUZE3000_SW1AB_SETP(9750); pmic_reg_write(dev, PFUZE3000_SW1BVOLT, reg); return 0; diff --git a/board/freescale/mx7d_19x19_lpddr3_arm2/mx7d_19x19_lpddr3_arm2.c b/board/freescale/mx7d_19x19_lpddr3_arm2/mx7d_19x19_lpddr3_arm2.c index e26a789..eee112a 100644 --- a/board/freescale/mx7d_19x19_lpddr3_arm2/mx7d_19x19_lpddr3_arm2.c +++ b/board/freescale/mx7d_19x19_lpddr3_arm2/mx7d_19x19_lpddr3_arm2.c @@ -556,7 +556,7 @@ int power_init_board(void) /* set SW1B normal voltage to 0.975V */ pmic_reg_read(p, PFUZE3000_SW1BVOLT, ®); reg &= ~0x1f; - reg |= PFUZE3000_SW1AB_SETP(975); + reg |= PFUZE3000_SW1AB_SETP(9750); pmic_reg_write(p, PFUZE3000_SW1BVOLT, reg); return 0; @@ -595,7 +595,7 @@ int power_init_board(void) /* set SW1B normal voltage to 0.975V */ reg = pmic_reg_read(dev, PFUZE3000_SW1BVOLT); reg &= ~0x1f; - reg |= PFUZE3000_SW1AB_SETP(975); + reg |= PFUZE3000_SW1AB_SETP(9750); pmic_reg_write(dev, PFUZE3000_SW1BVOLT, reg); return 0; -- cgit v1.1