From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mx31pdk: Add MC13783 PMIC support
Date: Tue, 25 Oct 2011 09:58:35 +0200 [thread overview]
Message-ID: <4EA66C2B.3000301@denx.de> (raw)
In-Reply-To: <1319470348-6865-1-git-send-email-fabio.estevam@freescale.com>
On 10/24/2011 05:32 PM, Fabio Estevam wrote:
> 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 <fabio.estevam@freescale.com>
> ---
> board/freescale/mx31pdk/mx31pdk.c | 12 ++++++++++++
> 1 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c
> index 0e7e0ce..9f8bc53 100644
> --- a/board/freescale/mx31pdk/mx31pdk.c
> +++ b/board/freescale/mx31pdk/mx31pdk.c
> @@ -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
Applied to u-boot-imx (fix), thanks.
Best regards,
Stefano Babic
--
=====================================================================
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
=====================================================================
prev parent reply other threads:[~2011-10-25 7:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-24 15:32 [U-Boot] [PATCH] mx31pdk: Add MC13783 PMIC support Fabio Estevam
2011-10-25 7:58 ` Stefano Babic [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EA66C2B.3000301@denx.de \
--to=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox