MC13892: Add SWx buck switchers definitions
PATCH 1/3 MC13892: Add SWx buck switchers definitions
Define voltages configurable on SWx buck switchers.
--- include/mc13892.h | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-)
include/mc13892.h +35 -0
@@ -160,4 +160,39 @@/* Reg Power Control 2*/ #define WDIRESET (1 << 12) +/* Buck Switchers (SW1,2,3,4) Output 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
PATCH 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
@@ -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
PATCH 2/3 MX51EVK: Use SWx macros in PMIC init
board/freescale/mx51evk/mx51evk.c
Quoted 9 lines · Marek Vasut
Signed-off-by Marek Vasut <[email protected]>--- board/freescale/mx51evk/mx51evk.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)board/freescale/mx51evk/mx51evk.c +0
-0
Thanks to fix this board, too.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================
PATCH 2/3 MX51EVK: Use SWx macros in PMIC init
In reply to Marek VasutHello.
Quoted 15 lines · Marek Vasut
Signed-off-by Marek Vasut<[email protected]>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);/* Setup VCC (SW2) to 1.25 */
board/freescale/mx51evk/mx51evk.c static void power_init(void) · line 212
Quoted 10 lines
board/freescale/mx51evk/mx51evk.c +3
-2val =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;
Could drop the useless parens around ~x, while at it...
WBR, Sergei
PATCH v3 3/3 iMX5: EfikaMX: Preliminary board support
In reply to Marek VasutSupported:
MMC
IDE
PMIC
SPI flash
LEDs
I can boot the kernel supplied by freescale/genesi with this from MMC card and/or PATA disk.
---
v3: Use SWx definitions as proposed by Stefano
MAINTAINERS | 1 + board/efikamx/Makefile | 52 ++++ board/efikamx/config.mk | 25 ++ board/efikamx/efikamx.c | 695 ++++++++++++++++++++++++++++++++++++++++++++ board/efikamx/imximage.cfg | 122 ++++++++ boards.cfg | 1 + include/configs/efikamx.h | 232 +++++++++++++++ 7 files changed, 1128 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
@@ -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
@@ -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 +695 -0
695 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
@@ -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
PATCH v3 3/3 iMX5: EfikaMX: Preliminary board support
Dear Marek Vasut,
Quoted 6 lines · In message <[email protected]> you wrote:
Supported:
MMC
IDE
PMIC
SPI flash
LEDs
...
Quoted 3 lines
+/******************************************************************************
+ * Compile-time error checking
+ ******************************************************************************/
Incorrect multiline comment style.
I really do not understand why you submit this again, after we discussed this in lenght both by e-main and on IRC.
Please fix it globally, the code will not go in as is.
board/efikamx/efikamx.c line 68
Quoted 4 lines
board/efikamx/efikamx.c new file +4
-0+/****************************************************************************** +* Board identification +******************************************************************************/ +static u32 board_rev;
Be careful!! This way board_rev will be located in bss, and BSS data MUST NOT be accessed before relocation, but it appears you to this.
This must be fixed.
board/efikamx/efikamx.c line 631
Quoted 4 lines
board/efikamx/efikamx.c new file +4
-0+int board_init (void ) +{ + gd->bd->bi_arch_number =MACH_TYPE_MX51_LANGE51 ; + gd->bd->bi_boot_params =PHYS_SDRAM_1 +0x100 ;
Is this the correct MACH_TYPE for the EfikaMX board?
include/configs/efikamx.h line 51
Quoted 9 lines
include/configs/efikamx.h new file +9
-0+/* +* Bootloader Components Configuration +*/ +#define CONFIG_CMD_SPI +#define CONFIG_CMD_SF +#define CONFIG_CMD_MMC +#define CONFIG_CMD_FAT +#define CONFIG_CMD_IDE +#undef CONFIG_CMD_IMLS
PLease be consistent - either always use space after #define (recommended), or always use TAB, but do not mix both styles.
include/configs/efikamx.h line 67
Quoted 7 lines
include/configs/efikamx.h new file +7
-0+/* +* ATAG setup +*/ +#define CONFIG_CMDLINE_TAG 1/* enable passing of ATAGs */ +#define CONFIG_REVISION_TAG 1 +#define CONFIG_SETUP_MEMORY_TAGS 1 +#define CONFIG_INITRD_TAG 1
Please omit all these '1'. Please fix globally...
include/configs/efikamx.h line 94
Quoted 2 lines
include/configs/efikamx.h new file +2
-0+#define CONFIG_HARD_SPI 1 +#define CONFIG_MXC_SPI 1
... i.e. here and in similar places, too.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Calm down, it's *__only* ones and zeroes.
PATCH v3 3/3 iMX5: EfikaMX: Preliminary board support
Quoted 3 lines · On Wednesday 19 January 2011 09:49:41 Wolfgang Denk wrote:
Dear Marek Vasut,
In message <[email protected]> you
Quoted 17 lines · wrote:
Quoted 6 lines
Supported:
MMC
IDE
PMIC
SPI flash
LEDs...
Quoted 5 lines
+/*********************************************************************** ******* + * Compile-time error checking
+
************************************************************************
******/Incorrect multiline comment style.
Quoted 4 lines
I really do not understand why you submit this again, after we discussed this in lenght both by e-main and on IRC.
Please fix it globally, the code will not go in as is.
Mistake, sorry ... I have it fixed in my tree, just checked.
Quoted 11 lines
Quoted 6 lines
+/*********************************************************************** ******* + * Board identification
+
************************************************************************
******/ +static u32board_rev;Be careful!! This way
board_revwill be located in bss, and BSS data MUST NOT be accessed before relocation, but it appears you to this.This must be fixed.
Dang, good catch, thanks.
Quoted 7 lines
board/efikamx/efikamx.c line 631
Quoted 5 lines
board/efikamx/efikamx.c new file +4
-0+int board_init (void ) +{ + gd->bd->bi_arch_number =MACH_TYPE_MX51_LANGE51 ; + gd->bd->bi_boot_params =PHYS_SDRAM_1 +0x100 ;Is this the correct
MACH_TYPEfor the EfikaMX board?
Apparently it is, they renamed the thing. Lange is probably a codename.
Quoted 24 lines
include/configs/efikamx.h line 51
Quoted 10 lines
include/configs/efikamx.h new file +9
-0+/* +* Bootloader Components Configuration +*/ +#define CONFIG_CMD_SPI +#define CONFIG_CMD_SF +#define CONFIG_CMD_MMC +#define CONFIG_CMD_FAT +#define CONFIG_CMD_IDE +#undef CONFIG_CMD_IMLSPLease be consistent - either always use space after #define (recommended), or always use TAB, but do not mix both styles.
include/configs/efikamx.h line 67
Quoted 7 lines
include/configs/efikamx.h new file +7
-0+/* +* ATAG setup +*/ +#define CONFIG_CMDLINE_TAG 1/* enable passing of ATAGs */ +#define CONFIG_REVISION_TAG 1 +#define CONFIG_SETUP_MEMORY_TAGS 1 +#define CONFIG_INITRD_TAG 1Please omit all these '1'. Please fix globally...
Quoted 4 lines
include/configs/efikamx.h line 94
Quoted 2 lines
include/configs/efikamx.h new file +2
-0+#define CONFIG_HARD_SPI 1 +#define CONFIG_MXC_SPI 1... i.e. here and in similar places, too.
Fixed in v4, thanks for the review
Quoted 5 lines
Best regards,
Wolfgang Denk
PATCH 1/3 MC13892: Add SWx buck switchers definitions
In reply to Marek VasutHi, Marek,
2011/1/19 Marek Vasut <[email protected]>:
Quoted 39 lines
Define voltages configurable on SWx buck switchers.
Signed-off-by Marek Vasut <[email protected]>---
?include/mc13892.h | ? 35 +++++++++++++++++++++++++++++++++++ ?1 files changed, 35 insertions(+), 0 deletions(-)include/mc13892.h +0
-0@@ -160,4 +160,39 @@?/* Reg Power Control 2*/
?#define WDIRESET ? ? ? (1 << 12)include/mc13892.h +24
-0+/* Buck Switchers (SW1,2,3,4) Output 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
include/mc13892.h
Quoted 10 lines
include/mc13892.h +10
-0+#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
This definition is for SWxHI=0 (Volts), had better state it in the comments,
Quoted 10 lines
+
?#endif
--
1.7.2.3_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH 1/3 MC13892: Add SWx buck switchers definitions
In reply to Marek VasutQuoted 7 lines · Marek Vasut
Define voltages configurable on SWx buck switchers.
Signed-off-by Marek Vasut <[email protected]>--- include/mc13892.h | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-)
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================