mx31pdk: Add MC13783 PMIC support
PATCH 1/1 mx31pdk: Add MC13783 PMIC support
Add MC13783 PMIC support.
Tested by using the 'date' command, which reads the MC13783 RTC registers:
MX31PDK U-Boot > date
Date: 1970-01-01 (Thursday) Time: 2:22:35
Signed-off-by Fabio Estevam <[email protected]>
--- board/freescale/mx31pdk/mx31pdk.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
board/freescale/mx31pdk/mx31pdk.c +12 -0
@@ -30,6 +30,8 @@#include <asm/arch/imx-regs.h> #include <asm/arch/sys_proto.h> #include <watchdog.h> +#include <pmic.h> +#include <fsl_pmic.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -79,6 +81,16 @@ int board_init(void)int board_late_init (void ) { +u32 val; +struct pmic *p; + +pmic_init (); + p =get_pmic (); + +/* Enable RTC battery */ +pmic_reg_read (p,REG_POWER_CTL0 , &val); +pmic_reg_write (p,REG_POWER_CTL0 , val |COINCHEN ); +pmic_reg_write (p,REG_INT_STATUS1 ,RTCRSTI );#ifdef CONFIG_HW_WATCHDOG mxc_hw_watchdog_enable ();#endif
Signature · 1 line
1.6.0.4
PATCH 1/1 mx31pdk: Add MC13783 PMIC support
Quoted 32 lines · Fabio Estevam
Add MC13783 PMIC support.
Tested by using the 'date' command, which reads the MC13783 RTC registers:
MX31PDK U-Boot > date
Date: 1970-01-01 (Thursday) Time: 2:22:35Signed-off-by Fabio Estevam <[email protected]>--- board/freescale/mx31pdk/mx31pdk.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)board/freescale/mx31pdk/mx31pdk.c +5
-0@@ -30,6 +30,8 @@#include <asm/arch/imx-regs.h> #include <asm/arch/sys_proto.h> #include <watchdog.h> +#include <pmic.h> +#include <fsl_pmic.h> DECLARE_GLOBAL_DATA_PTR ;@@ -79,6 +81,16 @@ int board_init(void)int board_late_init (void ) { +u32 val; +struct pmic *p; +
board/freescale/mx31pdk/mx31pdk.c int board_init(void) · line 96
Quoted 10 lines
board/freescale/mx31pdk/mx31pdk.c +7
-0+pmic_init (); + p =get_pmic (); + +/* Enable RTC battery */ +pmic_reg_read (p,REG_POWER_CTL0 , &val); +pmic_reg_write (p,REG_POWER_CTL0 , val |COINCHEN ); +pmic_reg_write (p,REG_INT_STATUS1 ,RTCRSTI );#ifdef CONFIG_HW_WATCHDOG mxc_hw_watchdog_enable ();#endif
Applied to u-boot-imx (fix), thanks.
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 =====================================================================