Skip to contentSkip to conversation

MC13892: Add SWx buck switchers definitions

PATCH New Marek Vasut 2 participants 5 messages Jan 18, 2011 – Jan 19, 2011 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 MC13892: Add SWx buck switchers definitions

Define voltages configurable on SWx buck switchers.

---
v2: Add note about SWxHI

 include/mc13892.h |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)
include/mc13892.h +39 -0
index 61c3e6e..a1078a5 100644
@@ -160,4 +160,43 @@
 /* Reg Power Control 2*/
 #define WDIRESET	(1 << 12)
 
+/* Buck Switchers (SW1,2,3,4) Output Voltage */
+/* 
+ * NOTE: These values are for SWxHI = 0,
+ * SWxHI = 1 adds 0.5V to the desired voltage
+ */
+#define SWx_0_600V	0
+#define SWx_0_625V	1
+#define SWx_0_650V	2
+#define SWx_0_675V	3
+#define SWx_0_700V	4
+#define SWx_0_725V	5
+#define SWx_0_750V	6
+#define SWx_0_775V	7
+#define SWx_0_800V	8
+#define SWx_0_825V	9
+#define SWx_0_850V	10
+#define SWx_0_875V	11
+#define SWx_0_900V	12
+#define SWx_0_925V	13
+#define SWx_0_950V	14
+#define SWx_0_975V	15
+#define SWx_1_000V	16
+#define SWx_1_025V	17
+#define SWx_1_050V	18
+#define SWx_1_075V	19
+#define SWx_1_100V	20
+#define SWx_1_125V	21
+#define SWx_1_150V	22
+#define SWx_1_175V	23
+#define SWx_1_200V	24
+#define SWx_1_225V	25
+#define SWx_1_250V	26
+#define SWx_1_275V	27
+#define SWx_1_300V	28
+#define SWx_1_325V	29
+#define SWx_1_350V	30
+#define SWx_1_375V	31
+#define SWx_VOLT_MASK	0x1F
+
 #endif
Signature · 1 line
1.7.2.3
#1 lore raw

PATCH RESEND 2/3 MX51EVK: Use SWx macros in PMIC init

---
 board/freescale/mx51evk/mx51evk.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
board/freescale/mx51evk/mx51evk.c +4 -3
index 2160d5a..bcf1934 100644
@@ -198,17 +198,18 @@ static void power_init(void)
 
 	/* Set core voltage to 1.1V */
 	val = pmic_reg_read(REG_SW_0);
-	val = (val & (~0x1F)) | 0x14;
+	val = (val & (~SWx_VOLT_MASK)) | SWx_1_100V;
 	pmic_reg_write(REG_SW_0, val);
 
 	/* Setup VCC (SW2) to 1.25 */
 	val = pmic_reg_read(REG_SW_1);
-	val = (val & (~0x1F)) | 0x1A;
+	val = (val & (~SWx_VOLT_MASK)) | SWx_1_250V;
+
 	pmic_reg_write(REG_SW_1, val);
 
 	/* Setup 1V2_DIG1 (SW3) to 1.25 */
 	val = pmic_reg_read(REG_SW_2);
-	val = (val & (~0x1F)) | 0x1A;
+	val = (val & (~SWx_VOLT_MASK)) | SWx_1_250V;
 	pmic_reg_write(REG_SW_2, val);
 	udelay(50);
 
Signature · 1 line
1.7.2.3
#2 lore raw

PATCH RESEND 2/3 MX51EVK: Use SWx macros in PMIC init

Quoted 1 line · Marek Vasut

[...]

Quoted 7 lines
board/freescale/mx51evk/mx51evk.c +0 -0
index 2160d5a..bcf1934 100644
@@ -198,17 +198,18 @@ static void power_init(void)
 
  	/* Set core voltage to 1.1V */

board/freescale/mx51evk/mx51evk.c static void power_init(void) · line 207

Quoted 10 lines
board/freescale/mx51evk/mx51evk.c +3 -2
  	val = pmic_reg_read(REG_SW_0);
-	val = (val&  (~0x1F)) | 0x14;
+	val = (val&  (~SWx_VOLT_MASK)) | SWx_1_100V;
  	pmic_reg_write(REG_SW_0, val);
 
  	/* Setup VCC (SW2) to 1.25 */
  	val = pmic_reg_read(REG_SW_1);
-	val = (val&  (~0x1F)) | 0x1A;
+	val = (val&  (~SWx_VOLT_MASK)) | SWx_1_250V;
+

Stray newline?

WBR, Sergei

#3 lore raw

PATCH RESEND 2/3 MX51EVK: Use SWx macros in PMIC init

Quoted 19 lines · On Wednesday 19 January 2011 12:15:33 Sergei Shtylyov wrote:
Quoted 1 line · Marek Vasut

[...]

Quoted 14 lines
(quoted diff) +0 -0

b/board/freescale/mx51evk/mx51evk.c index 2160d5a..bcf1934 100644

board/freescale/mx51evk/mx51evk.c +1 -1
@@ -198,17 +198,18 @@ static void power_init(void)
 
  	/* Set core voltage to 1.1V */
  	val = pmic_reg_read(REG_SW_0);
 
-	val = (val&  (~0x1F)) | 0x14;
+	val = (val&  (~SWx_VOLT_MASK)) | SWx_1_100V;
 
  	pmic_reg_write(REG_SW_0, val);
 
Quoted 8 lines

board/freescale/mx51evk/mx51evk.c static void power_init(void)

Quoted 6 lines
board/freescale/mx51evk/mx51evk.c +2 -1
  	/* Setup VCC (SW2) to 1.25 */
  	val = pmic_reg_read(REG_SW_1);
 
-	val = (val&  (~0x1F)) | 0x1A;
+	val = (val&  (~SWx_VOLT_MASK)) | SWx_1_250V;
+

Stray newline?

Nice catch, thanks

Quoted 2 lines

WBR, Sergei

#4 lore raw

PATCH v4 3/3 iMX5: EfikaMX: Preliminary board support

In reply to Marek Vasut

Supported:
MMC
IDE
PMIC
SPI flash
LEDs

I can boot the kernel supplied by freescale/genesi with this from MMC card and/or PATA disk.

---
v4:
* Remove "NOTE: if (is_soc_rev(CHIP_REV_2_0) >= 0)" comment
* Fix "bold" multiline comments

 MAINTAINERS                |    1 +
 board/efikamx/Makefile     |   52 ++++
 board/efikamx/config.mk    |   25 ++
 board/efikamx/efikamx.c    |  693 ++++++++++++++++++++++++++++++++++++++++++++
 board/efikamx/imximage.cfg |  122 ++++++++
 boards.cfg                 |    1 +
 include/configs/efikamx.h  |  232 +++++++++++++++
 7 files changed, 1126 insertions(+), 0 deletions(-)
 create mode 100644 board/efikamx/Makefile
 create mode 100644 board/efikamx/config.mk
 create mode 100644 board/efikamx/efikamx.c
 create mode 100644 board/efikamx/imximage.cfg
 create mode 100644 include/configs/efikamx.h
MAINTAINERS +1 -0
index a799037..8f1b1b6 100644
@@ -823,6 +823,7 @@ Marek Vasut <[email protected]>
 	palmtc		xscale
 	vpac270		xscale
 	zipitz2		xscale
+ 	efikamx		i.MX51
 
 Hugo Villeneuve <[email protected]>
 
board/efikamx/Makefile new file +52 -0

52 lines not on this page · raw message

board/efikamx/config.mk new file +25 -0
new file mode 100644
index 0000000..6e90671
@@ -0,0 +1,25 @@
+#
+# Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+CONFIG_SYS_TEXT_BASE = 0x97800000
+IMX_CONFIG = $(SRCTREE)/board/$(BOARDDIR)/imximage.cfg
+ALL += $(obj)u-boot.imx
board/efikamx/efikamx.c new file +693 -0

693 lines not on this page · raw message

board/efikamx/imximage.cfg new file +122 -0

122 lines not on this page · raw message

boards.cfg +1 -0
index 3497408..1b2e5e2 100644
@@ -105,6 +105,7 @@ magnesium                    arm         arm926ejs   imx27lite           logicpd
 omap5912osk                  arm         arm926ejs   -                   ti             omap
 edminiv2                     arm         arm926ejs   -                   LaCie          orion5x
 ca9x4_ct_vxp                 arm         armv7       vexpress            armltd
+efikamx                      arm         armv7       efikamx             -              mx5
 mx51evk                      arm         armv7       mx51evk             freescale      mx5
 vision2                      arm         armv7       vision2             ttcontrol      mx5
 omap3_overo                  arm         armv7       overo               -              omap3
include/configs/efikamx.h new file +232 -0

232 lines not on this page · raw message

Signature · 1 line
1.7.2.3