Skip to contentSkip to conversation

omap4: set voltage according to mpu freq

PATCH Superseded Jan Weitzel 3 participants 7 messages May 28, 2013 – Jun 12, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 omap4: set voltage according to mpu freq

For OMAP4460 omap4_scale_vcores must set the voltage according to mpu freq.

OPP100 700MHz 1210mV
OPPTB 920MHz 1320mV
OPPNT 1200MHz 1380mV

---
 arch/arm/boards/archosg9/lowlevel.c             |    2 +-
 arch/arm/boards/panda/lowlevel.c                |    2 +-
 arch/arm/boards/pcm049/lowlevel.c               |    2 +-
 arch/arm/boards/phycard-a-xl2/lowlevel.c        |    2 +-
 arch/arm/mach-omap/include/mach/omap4-silicon.h |    2 +-
 arch/arm/mach-omap/omap4_generic.c              |    6 +++---
 6 files changed, 8 insertions(+), 8 deletions(-)
arch/arm/boards/archosg9/lowlevel.c +1 -1
index 0334693..0fae6da 100644
@@ -49,7 +49,7 @@ static noinline void archosg9_init_lowlevel(void)
 	set_muxconf_regs();
 
 	/* Set VCORE1 = 1.3 V, VCORE2 = VCORE3 = 1.21V */
-	omap4_scale_vcores(TPS62361_VSEL0_GPIO);
+	omap4_scale_vcores(TPS62361_VSEL0_GPIO, 1380);
 
 	/* Enable all clocks */
 	omap4_enable_all_clocks();
arch/arm/boards/panda/lowlevel.c +1 -1
index ed1dc6f..591ff2f 100644
@@ -70,7 +70,7 @@ static void noinline panda_init_lowlevel(void)
 	omap4_ddr_init(&ddr_regs_400_mhz_2cs, &core);
 
 	/* Set VCORE1 = 1.3 V, VCORE2 = VCORE3 = 1.21V */
-	omap4_scale_vcores(TPS62361_VSEL0_GPIO);
+	omap4_scale_vcores(TPS62361_VSEL0_GPIO, 1210);
 }
 
 void barebox_arm_reset_vector(void)
arch/arm/boards/pcm049/lowlevel.c +1 -1
index 33519f7..8548868 100644
@@ -109,7 +109,7 @@ static void noinline pcm049_init_lowlevel(void)
 #endif
 
 	/* Set VCORE1 = 1.3 V, VCORE2 = VCORE3 = 1.21V */
-	omap4_scale_vcores(TPS62361_VSEL0_GPIO);
+	omap4_scale_vcores(TPS62361_VSEL0_GPIO, 1320);
 
 	writel(CM_SYS_CLKSEL_19M2, CM_SYS_CLKSEL);
 
arch/arm/boards/phycard-a-xl2/lowlevel.c +1 -1
index 07505ff..3750bae 100644
@@ -58,7 +58,7 @@ static noinline void pcaaxl2_init_lowlevel(void)
 	omap4_ddr_init(&ddr_regs_mt42L64M64_25_400_mhz, &core);
 
 	/* Set VCORE1 = 1.3 V, VCORE2 = VCORE3 = 1.21V */
-	omap4_scale_vcores(TPS62361_VSEL0_GPIO);
+	omap4_scale_vcores(TPS62361_VSEL0_GPIO, 1320);
 
 	writel(CM_SYS_CLKSEL_19M2, CM_SYS_CLKSEL);
 
arch/arm/mach-omap/include/mach/omap4-silicon.h +1 -1
index 9e82435..5684a38 100644
@@ -211,7 +211,7 @@ struct dpll_param;
 void omap4_ddr_init(const struct ddr_regs *, const struct dpll_param *);
 void omap4_power_i2c_send(u32);
 unsigned int omap4_revision(void);
-noinline int omap4_scale_vcores(unsigned vsel0_pin);
+noinline int omap4_scale_vcores(unsigned vsel0_pin, unsigned volt_mv);
 
 #endif
 
arch/arm/mach-omap/omap4_generic.c +3 -3
index 38993be..1eeaf30 100644
@@ -511,7 +511,7 @@ static void __iomem *omap4_get_gpio_base(unsigned gpio)
 
 #define I2C_SLAVE 0x12
 
-noinline int omap4_scale_vcores(unsigned vsel0_pin)
+noinline int omap4_scale_vcores(unsigned vsel0_pin, unsigned volt_mv)
 {
 	void __iomem *base;
 	unsigned int rev = omap4_revision();
@@ -529,8 +529,8 @@ noinline int omap4_scale_vcores(unsigned vsel0_pin)
 		 * Setup SET1 and SET0 with right values so that kernel
 		 * can use either of them based on its needs.
 		 */
-		omap4_do_scale_tps62361(TPS62361_REG_ADDR_SET0, 1430);
-		omap4_do_scale_tps62361(TPS62361_REG_ADDR_SET1, 1430);
+		omap4_do_scale_tps62361(TPS62361_REG_ADDR_SET0, volt_mv);
+		omap4_do_scale_tps62361(TPS62361_REG_ADDR_SET1, volt_mv);
 
 		/*
 		 * Select SET1 in TPS62361:
Signature · 7 lines
1.7.0.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw
Quoted 95 lines · Jan Weitzel

For OMAP4460 omap4_scale_vcores must set the voltage according to mpu freq.

OPP100 700MHz 1210mV
OPPTB 920MHz 1320mV
OPPNT 1200MHz 1380mV

---
 arch/arm/boards/archosg9/lowlevel.c             |    2 +-
 arch/arm/boards/panda/lowlevel.c                |    2 +-
 arch/arm/boards/pcm049/lowlevel.c               |    2 +-
 arch/arm/boards/phycard-a-xl2/lowlevel.c        |    2 +-
 arch/arm/mach-omap/include/mach/omap4-silicon.h |    2 +-
 arch/arm/mach-omap/omap4_generic.c              |    6 +++---
 6 files changed, 8 insertions(+), 8 deletions(-)
arch/arm/boards/archosg9/lowlevel.c +1 -1
index 0334693..0fae6da 100644
@@ -49,7 +49,7 @@ static noinline void archosg9_init_lowlevel(void)
 	set_muxconf_regs();
 
 	/* Set VCORE1 = 1.3 V, VCORE2 = VCORE3 = 1.21V */
-	omap4_scale_vcores(TPS62361_VSEL0_GPIO);
+	omap4_scale_vcores(TPS62361_VSEL0_GPIO, 1380);
 
 	/* Enable all clocks */
 	omap4_enable_all_clocks();
arch/arm/boards/panda/lowlevel.c +1 -1
index ed1dc6f..591ff2f 100644
@@ -70,7 +70,7 @@ static void noinline panda_init_lowlevel(void)
 	omap4_ddr_init(&ddr_regs_400_mhz_2cs, &core);
 
 	/* Set VCORE1 = 1.3 V, VCORE2 = VCORE3 = 1.21V */
-	omap4_scale_vcores(TPS62361_VSEL0_GPIO);
+	omap4_scale_vcores(TPS62361_VSEL0_GPIO, 1210);
 }
 
 void barebox_arm_reset_vector(void)
arch/arm/boards/pcm049/lowlevel.c +1 -1
index 33519f7..8548868 100644
@@ -109,7 +109,7 @@ static void noinline pcm049_init_lowlevel(void)
 #endif
 
 	/* Set VCORE1 = 1.3 V, VCORE2 = VCORE3 = 1.21V */
-	omap4_scale_vcores(TPS62361_VSEL0_GPIO);
+	omap4_scale_vcores(TPS62361_VSEL0_GPIO, 1320);
 
 	writel(CM_SYS_CLKSEL_19M2, CM_SYS_CLKSEL);
 
arch/arm/boards/phycard-a-xl2/lowlevel.c +1 -1
index 07505ff..3750bae 100644
@@ -58,7 +58,7 @@ static noinline void pcaaxl2_init_lowlevel(void)
 	omap4_ddr_init(&ddr_regs_mt42L64M64_25_400_mhz, &core);
 
 	/* Set VCORE1 = 1.3 V, VCORE2 = VCORE3 = 1.21V */
-	omap4_scale_vcores(TPS62361_VSEL0_GPIO);
+	omap4_scale_vcores(TPS62361_VSEL0_GPIO, 1320);
 
 	writel(CM_SYS_CLKSEL_19M2, CM_SYS_CLKSEL);
 
arch/arm/mach-omap/include/mach/omap4-silicon.h +1 -1
index 9e82435..5684a38 100644
@@ -211,7 +211,7 @@ struct dpll_param;
 void omap4_ddr_init(const struct ddr_regs *, const struct dpll_param *);
 void omap4_power_i2c_send(u32);
 unsigned int omap4_revision(void);
-noinline int omap4_scale_vcores(unsigned vsel0_pin);
+noinline int omap4_scale_vcores(unsigned vsel0_pin, unsigned volt_mv);
 
 #endif
 
arch/arm/mach-omap/omap4_generic.c +1 -1
index 38993be..1eeaf30 100644
@@ -511,7 +511,7 @@ static void __iomem *omap4_get_gpio_base(unsigned gpio)
 
 #define I2C_SLAVE 0x12
 
-noinline int omap4_scale_vcores(unsigned vsel0_pin)
+noinline int omap4_scale_vcores(unsigned vsel0_pin, unsigned volt_mv)
 {
 	void __iomem *base;
 	unsigned int rev = omap4_revision();

arch/arm/mach-omap/omap4_generic.c noinline int omap4_scale_vcores(unsigned vsel0_pin) · line 533

Quoted 7 lines
arch/arm/mach-omap/omap4_generic.c +2 -2
@@ -529,8 +529,8 @@ noinline int omap4_scale_vcores(unsigned vsel0_pin)
 		 * Setup SET1 and SET0 with right values so that kernel
 		 * can use either of them based on its needs.
 		 */
-		omap4_do_scale_tps62361(TPS62361_REG_ADDR_SET0, 1430);
-		omap4_do_scale_tps62361(TPS62361_REG_ADDR_SET1, 1430);
+		omap4_do_scale_tps62361(TPS62361_REG_ADDR_SET0, volt_mv);
+		omap4_do_scale_tps62361(TPS62361_REG_ADDR_SET1, volt_mv);

This adds a parameter volt_mv which is written to some register, but only on a omap4460.
This is all very nonobvious to me. I wonder if this setup could be improved somehow to leave a better feeling? How about separating omap4430 and omap4460 setup? Then maybe omap4430 wouldn't have to pass a meaningles parameter to this function.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

Am Donnerstag, den 30.05.2013, 11:39 +0200 schrieb Sascha Hauer:

Quoted 102 lines · Jan Weitzel
Quoted 101 lines

For OMAP4460 omap4_scale_vcores must set the voltage according to mpu freq.

OPP100 700MHz 1210mV
OPPTB 920MHz 1320mV
OPPNT 1200MHz 1380mV

---
 arch/arm/boards/archosg9/lowlevel.c             |    2 +-
 arch/arm/boards/panda/lowlevel.c                |    2 +-
 arch/arm/boards/pcm049/lowlevel.c               |    2 +-
 arch/arm/boards/phycard-a-xl2/lowlevel.c        |    2 +-
 arch/arm/mach-omap/include/mach/omap4-silicon.h |    2 +-
 arch/arm/mach-omap/omap4_generic.c              |    6 +++---
 6 files changed, 8 insertions(+), 8 deletions(-)
arch/arm/boards/archosg9/lowlevel.c +1 -1
index 0334693..0fae6da 100644
@@ -49,7 +49,7 @@ static noinline void archosg9_init_lowlevel(void)
 	set_muxconf_regs();
 
 	/* Set VCORE1 = 1.3 V, VCORE2 = VCORE3 = 1.21V */
-	omap4_scale_vcores(TPS62361_VSEL0_GPIO);
+	omap4_scale_vcores(TPS62361_VSEL0_GPIO, 1380);
 
 	/* Enable all clocks */
 	omap4_enable_all_clocks();
arch/arm/boards/panda/lowlevel.c +1 -1
index ed1dc6f..591ff2f 100644
@@ -70,7 +70,7 @@ static void noinline panda_init_lowlevel(void)
 	omap4_ddr_init(&ddr_regs_400_mhz_2cs, &core);
 
 	/* Set VCORE1 = 1.3 V, VCORE2 = VCORE3 = 1.21V */
-	omap4_scale_vcores(TPS62361_VSEL0_GPIO);
+	omap4_scale_vcores(TPS62361_VSEL0_GPIO, 1210);
 }
 
 void barebox_arm_reset_vector(void)
arch/arm/boards/pcm049/lowlevel.c +1 -1
index 33519f7..8548868 100644
@@ -109,7 +109,7 @@ static void noinline pcm049_init_lowlevel(void)
 #endif
 
 	/* Set VCORE1 = 1.3 V, VCORE2 = VCORE3 = 1.21V */
-	omap4_scale_vcores(TPS62361_VSEL0_GPIO);
+	omap4_scale_vcores(TPS62361_VSEL0_GPIO, 1320);
 
 	writel(CM_SYS_CLKSEL_19M2, CM_SYS_CLKSEL);
 
arch/arm/boards/phycard-a-xl2/lowlevel.c +1 -1
index 07505ff..3750bae 100644
@@ -58,7 +58,7 @@ static noinline void pcaaxl2_init_lowlevel(void)
 	omap4_ddr_init(&ddr_regs_mt42L64M64_25_400_mhz, &core);
 
 	/* Set VCORE1 = 1.3 V, VCORE2 = VCORE3 = 1.21V */
-	omap4_scale_vcores(TPS62361_VSEL0_GPIO);
+	omap4_scale_vcores(TPS62361_VSEL0_GPIO, 1320);
 
 	writel(CM_SYS_CLKSEL_19M2, CM_SYS_CLKSEL);
 
arch/arm/mach-omap/include/mach/omap4-silicon.h +1 -1
index 9e82435..5684a38 100644
@@ -211,7 +211,7 @@ struct dpll_param;
 void omap4_ddr_init(const struct ddr_regs *, const struct dpll_param *);
 void omap4_power_i2c_send(u32);
 unsigned int omap4_revision(void);
-noinline int omap4_scale_vcores(unsigned vsel0_pin);
+noinline int omap4_scale_vcores(unsigned vsel0_pin, unsigned volt_mv);
 
 #endif
 
arch/arm/mach-omap/omap4_generic.c +2 -3
index 38993be..1eeaf30 100644
@@ -511,7 +511,7 @@ static void __iomem *omap4_get_gpio_base(unsigned gpio)
 
 #define I2C_SLAVE 0x12
 
-noinline int omap4_scale_vcores(unsigned vsel0_pin)
+noinline int omap4_scale_vcores(unsigned vsel0_pin, unsigned volt_mv)
 {
 	void __iomem *base;
 	unsigned int rev = omap4_revision();
@@ -529,8 +529,8 @@ noinline int omap4_scale_vcores(unsigned vsel0_pin)
 		 * Setup SET1 and SET0 with right values so that kernel
 		 * can use either of them based on its needs.
 		 */
-		omap4_do_scale_tps62361(TPS62361_REG_ADDR_SET0, 1430);
-		omap4_do_scale_tps62361(TPS62361_REG_ADDR_SET1, 1430);
+		omap4_do_scale_tps62361(TPS62361_REG_ADDR_SET0, volt_mv);
Quoted 8 lines

arch/arm/mach-omap/omap4_generic.c noinline int omap4_scale_vcores(unsigned vsel0_pin) · line 533

Quoted 1 line
arch/arm/mach-omap/omap4_generic.c +1 -0
+		omap4_do_scale_tps62361(TPS62361_REG_ADDR_SET1, volt_mv);

This adds a parameter volt_mv which is written to some register, but only on a omap4460.
This is all very nonobvious to me. I wonder if this setup could be improved somehow to leave a better feeling? How about separating omap4430 and omap4460 setup? Then maybe omap4430 wouldn't have to pass a meaningles parameter to this function.

The first parameter (gpio) is also meaningles, I send a patch which also splits omap4_scale_vcores

Jan

Quoted 3 lines

Sascha

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#3 lore raw

PATCH v2 1/1 omap4: set voltage according to mpu freq

For OMAP4460 omap4_scale_vcores must set the voltage according to mpu freq.

OPP100 700MHz 1210mV
OPPTB 920MHz 1320mV
OPPNT 1200MHz 1380mV

---
v2: split omap4_scale_vcores

 arch/arm/boards/archosg9/lowlevel.c             |    3 +-
 arch/arm/boards/panda/lowlevel.c                |    7 +-
 arch/arm/boards/pcm049/lowlevel.c               |    9 ++-
 arch/arm/boards/phycard-a-xl2/lowlevel.c        |    9 ++-
 arch/arm/mach-omap/include/mach/omap4-silicon.h |    3 +-
 arch/arm/mach-omap/omap4_generic.c              |   96 +++++++++++++----------
 6 files changed, 74 insertions(+), 53 deletions(-)
arch/arm/boards/archosg9/lowlevel.c +1 -2
index 0334693..49c1541 100644
@@ -48,8 +48,7 @@ static noinline void archosg9_init_lowlevel(void)
 
 	set_muxconf_regs();
 
-	/* Set VCORE1 = 1.3 V, VCORE2 = VCORE3 = 1.21V */
-	omap4_scale_vcores(TPS62361_VSEL0_GPIO);
+	omap4460_scale_vcores(TPS62361_VSEL0_GPIO, 1380);
 
 	/* Enable all clocks */
 	omap4_enable_all_clocks();
arch/arm/boards/panda/lowlevel.c +5 -2
index ed1dc6f..5d3490f 100644
@@ -52,6 +52,7 @@ static void noinline panda_init_lowlevel(void)
 	struct dpll_param per = OMAP4_PER_DPLL_PARAM_38M4;
 	struct dpll_param abe = OMAP4_ABE_DPLL_PARAM_38M4;
 	struct dpll_param usb = OMAP4_USB_DPLL_PARAM_38M4;
+	unsigned int rev = omap4_revision();
 
 	writel(CM_SYS_CLKSEL_38M4, CM_SYS_CLKSEL);
 
@@ -69,8 +70,10 @@ static void noinline panda_init_lowlevel(void)
 
 	omap4_ddr_init(&ddr_regs_400_mhz_2cs, &core);
 
-	/* Set VCORE1 = 1.3 V, VCORE2 = VCORE3 = 1.21V */
-	omap4_scale_vcores(TPS62361_VSEL0_GPIO);
+	if (rev < OMAP4460_ES1_0)
+		omap4430_scale_vcores();
+	else
+		omap4460_scale_vcores(TPS62361_VSEL0_GPIO, 1210);
 }
 
 void barebox_arm_reset_vector(void)
arch/arm/boards/pcm049/lowlevel.c +6 -3
index c855bff..aa6502d 100644
@@ -99,6 +99,7 @@ static void noinline pcm049_init_lowlevel(void)
 	struct dpll_param per = OMAP4_PER_DPLL_PARAM_19M2;
 	struct dpll_param abe = OMAP4_ABE_DPLL_PARAM_19M2;
 	struct dpll_param usb = OMAP4_USB_DPLL_PARAM_19M2;
+	unsigned int rev = omap4_revision();
 
 	set_muxconf_regs();
 
@@ -108,13 +109,15 @@ static void noinline pcm049_init_lowlevel(void)
 	omap4_ddr_init(&ddr_regs_mt42L64M64_25_400_mhz, &core);
 #endif
 
-	/* Set VCORE1 = 1.3 V, VCORE2 = VCORE3 = 1.21V */
-	omap4_scale_vcores(TPS62361_VSEL0_GPIO);
+	if (rev < OMAP4460_ES1_0)
+		omap4430_scale_vcores();
+	else
+		omap4460_scale_vcores(TPS62361_VSEL0_GPIO, 1320);
 
 	writel(CM_SYS_CLKSEL_19M2, CM_SYS_CLKSEL);
 
 	/* Configure all DPLL's */
-	if (omap4_revision() < OMAP4460_ES1_0)
+	if (rev < OMAP4460_ES1_0)
 		omap4_configure_mpu_dpll(&mpu44xx);
 	else
 		omap4_configure_mpu_dpll(&mpu4460);
arch/arm/boards/phycard-a-xl2/lowlevel.c +6 -3
index 07505ff..86d7c51 100644
@@ -52,18 +52,21 @@ static noinline void pcaaxl2_init_lowlevel(void)
 	struct dpll_param per = OMAP4_PER_DPLL_PARAM_19M2;
 	struct dpll_param abe = OMAP4_ABE_DPLL_PARAM_19M2;
 	struct dpll_param usb = OMAP4_USB_DPLL_PARAM_19M2;
+	unsigned int rev = omap4_revision();
 
 	set_muxconf_regs();
 
 	omap4_ddr_init(&ddr_regs_mt42L64M64_25_400_mhz, &core);
 
-	/* Set VCORE1 = 1.3 V, VCORE2 = VCORE3 = 1.21V */
-	omap4_scale_vcores(TPS62361_VSEL0_GPIO);
+	if (ref < OMAP4460_ES1_0)
+		omap4430_scale_vcores();
+	else
+		omap4460_scale_vcores(TPS62361_VSEL0_GPIO, 1320);
 
 	writel(CM_SYS_CLKSEL_19M2, CM_SYS_CLKSEL);
 
 	/* Configure all DPLL's at 100% OPP */
-	if (omap4_revision() < OMAP4460_ES1_0)
+	if (rev < OMAP4460_ES1_0)
 		omap4_configure_mpu_dpll(&mpu44xx);
 	else
 		omap4_configure_mpu_dpll(&mpu4460);
arch/arm/mach-omap/include/mach/omap4-silicon.h +2 -1
index 9e82435..ba48c30 100644
@@ -211,7 +211,8 @@ struct dpll_param;
 void omap4_ddr_init(const struct ddr_regs *, const struct dpll_param *);
 void omap4_power_i2c_send(u32);
 unsigned int omap4_revision(void);
-noinline int omap4_scale_vcores(unsigned vsel0_pin);
+noinline int omap4430_scale_vcores(void);
+noinline int omap4460_scale_vcores(unsigned vsel0_pin, unsigned volt_mv);
 
 #endif
 
arch/arm/mach-omap/omap4_generic.c +54 -42

127 lines not on this page · raw message

Signature · 7 lines
1.7.0.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#4 lore raw
Quoted 7 lines · Jan Weitzel
arch/arm/mach-omap/omap4_generic.c +7 -0
+noinline int omap4460_scale_vcores(unsigned vsel0_pin, unsigned volt_mv)
+{
+       void __iomem *base;
+       u32 val = 0;
+
+       /* For VC bypass only VCOREx_CGF_FORCE  is necessary and
+        * VCOREx_CFG_VOLTAGE  changes can be discarded

arch/arm/mach-omap/omap4_generic.c noinline int omap4_scale_vcores(unsigned vsel0_pin) · line 570

Quoted 10 lines
arch/arm/mach-omap/omap4_generic.c +10 -0
+        */
+       writel(0, OMAP44XX_PRM_VC_CFG_I2C_MODE);
+       writel(0x6026, OMAP44XX_PRM_VC_CFG_I2C_CLK);
+
+       /* TPS - supplies vdd_mpu on 4460
+        * Setup SET1 and SET0 with right values so that kernel
+        * can use either of them based on its needs.
+        */
+
+       omap4_do_scale_tps62361(TPS62361_REG_ADDR_SET0, volt_mv);

Just a nitpick - the general rule of TPS+OMAP4460 integration is *NOT* to program SET0 register. this is intended to be at boot voltage required to be used when reboot due to s/w controlled or h/w watchdog.

Review

Quoted 2 lines
(quoted diff) +2 -0
+       omap4_do_scale_tps62361(TPS62361_REG_ADDR_SET1, volt_mv);
+

Regards,
Nishanth Menon

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#5 lore raw
Quoted 13 lines · On Thu, Jun 06, 2013 at 08:40:46AM -0500, [email protected] wrote:
Quoted 12 lines · Jan Weitzel
arch/arm/mach-omap/omap4_generic.c +12 -0
+noinline int omap4460_scale_vcores(unsigned vsel0_pin, unsigned volt_mv)
+{
+       void __iomem *base;
+       u32 val = 0;
+
+       /* For VC bypass only VCOREx_CGF_FORCE  is necessary and
+        * VCOREx_CFG_VOLTAGE  changes can be discarded
+        */
+       writel(0, OMAP44XX_PRM_VC_CFG_I2C_MODE);
+       writel(0x6026, OMAP44XX_PRM_VC_CFG_I2C_CLK);
+
+       /* TPS - supplies vdd_mpu on 4460
Quoted 8 lines

arch/arm/mach-omap/omap4_generic.c noinline int omap4_scale_vcores(unsigned vsel0_pin) · line 570

Quoted 5 lines
arch/arm/mach-omap/omap4_generic.c +5 -0
+        * Setup SET1 and SET0 with right values so that kernel
+        * can use either of them based on its needs.
+        */
+
+       omap4_do_scale_tps62361(TPS62361_REG_ADDR_SET0, volt_mv);

Just a nitpick - the general rule of TPS+OMAP4460 integration is *NOT* to program SET0 register. this is intended to be at boot voltage required to be used when reboot due to s/w controlled or h/w watchdog.

So this line should simply be removed?

Ok, this line is only moved and not introduced in this patch, so it should be fine to apply this patch and leave this for a separate patch.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#6 lore raw

Am Samstag, den 08.06.2013, 15:21 +0200 schrieb Sascha Hauer:

Quoted 23 lines · On Thu, Jun 06, 2013 at 08:40:46AM -0500, [email protected] wrote:
Quoted 13 lines · Jan Weitzel
Quoted 12 lines
arch/arm/mach-omap/omap4_generic.c +12 -0
+noinline int omap4460_scale_vcores(unsigned vsel0_pin, unsigned volt_mv)
+{
+       void __iomem *base;
+       u32 val = 0;
+
+       /* For VC bypass only VCOREx_CGF_FORCE  is necessary and
+        * VCOREx_CFG_VOLTAGE  changes can be discarded
+        */
+       writel(0, OMAP44XX_PRM_VC_CFG_I2C_MODE);
+       writel(0x6026, OMAP44XX_PRM_VC_CFG_I2C_CLK);
+
+       /* TPS - supplies vdd_mpu on 4460
Quoted 8 lines

arch/arm/mach-omap/omap4_generic.c noinline int omap4_scale_vcores(unsigned vsel0_pin) · line 570

Quoted 5 lines
arch/arm/mach-omap/omap4_generic.c +5 -0
+        * Setup SET1 and SET0 with right values so that kernel
+        * can use either of them based on its needs.
+        */
+
+       omap4_do_scale_tps62361(TPS62361_REG_ADDR_SET0, volt_mv);

Just a nitpick - the general rule of TPS+OMAP4460 integration is *NOT* to program SET0 register. this is intended to be at boot voltage required to be used when reboot due to s/w controlled or h/w watchdog.

Quoted 4 lines

So this line should simply be removed?

Ok, this line is only moved and not introduced in this patch, so it should be fine to apply this patch and leave this for a separate patch.

I create a separate patch. I had the problem that our gpio module (gpio6) goes low due to a reset at init time. Must fix this in kernel.

Jan

Quoted 3 lines

Sascha

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox