From patchwork Thu Aug 19 11:42:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Jander X-Patchwork-Id: 71822 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: wd@gemini.denx.de Delivered-To: wd@gemini.denx.de Received: from diddl.denx.de (diddl.denx.de [10.0.0.6]) by gemini.denx.de (Postfix) with ESMTP id 5D594157D71 for ; Thu, 19 Aug 2010 14:11:34 +0200 (CEST) Received: from diddl.denx.de (localhost.localdomain [127.0.0.1]) by diddl.denx.de (Postfix) with ESMTP id 4BAA1316EC0F for ; Thu, 19 Aug 2010 14:11:34 +0200 (MEST) Received: from pop.mnet-online.de by diddl.denx.de with POP3 (fetchmail-6.3.17) for (single-drop); Thu, 19 Aug 2010 14:11:34 +0200 (MEST) Received: from murder ([192.168.6.180]) by backend2 (Cyrus v2.2.12) with LMTPA; Thu, 19 Aug 2010 14:10:51 +0200 X-Sieve: CMU Sieve 2.2 Received: from mail.m-online.net (localhost [127.0.0.1]) by frontend3.mail.m-online.net (Cyrus v2.2.12) with LMTPA; Thu, 19 Aug 2010 14:10:51 +0200 Received: from scanner-4.m-online.net (scanner-4.mail.m-online.net [192.168.1.18]) by mail.m-online.net (Postfix) with ESMTP id 0B5B61C000B2; Thu, 19 Aug 2010 14:10:51 +0200 (CEST) Received: from mxin-1.m-online.net ([192.168.6.164]) by scanner-4.m-online.net (scanner-4.m-online.net [192.168.1.18]) (amavisd-new, port 10026) with ESMTP id 30656-05-2; Thu, 19 Aug 2010 14:10:49 +0200 (CEST) Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by mxin-1.m-online.net (Postfix) with ESMTP id 8BC0D46C0B1; Thu, 19 Aug 2010 14:10:48 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0FADD280A7; Thu, 19 Aug 2010 14:10:11 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Yile7DdWzXJS; Thu, 19 Aug 2010 14:10:10 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 865C6280A9; Thu, 19 Aug 2010 14:09:52 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D9ECD2808F for ; Thu, 19 Aug 2010 14:09:44 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tSuUWPvYxV-o for ; Thu, 19 Aug 2010 14:09:44 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from protonic.prtnl (protonic.xs4all.nl [213.84.116.84]) by theia.denx.de (Postfix) with ESMTP id 0495528089 for ; Thu, 19 Aug 2010 14:09:38 +0200 (CEST) Received: from localhost.localdomain (archvile.prtnl [192.168.1.153]) by protonic.prtnl (Postfix) with ESMTP id 9968629EBB; Thu, 19 Aug 2010 13:43:00 +0200 (CEST) From: David Jander To: u-boot@lists.denx.de Date: Thu, 19 Aug 2010 13:42:32 +0200 Message-Id: <3b6cafa5af1ffc86641912d81a423ec0d2f39ba6.1282213859.git.david@protonic.nl> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: References: <1282218154-5564-1-git-send-email-david@protonic.nl> <2742a1d58389e0f76fee54c9833ac4d98039a5c4.1282213859.git.david@protonic.nl> In-Reply-To: <2742a1d58389e0f76fee54c9833ac4d98039a5c4.1282213859.git.david@protonic.nl> References: <2742a1d58389e0f76fee54c9833ac4d98039a5c4.1282213859.git.david@protonic.nl> Cc: David Jander Subject: [U-Boot] [PATCH 3/4] mc13982 driver: corrected/added some definitions according to latest user-manual X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Virus-Scanned: by amavisd-new at m-online.net Signed-off-by: David Jander --- include/fsl_pmic.h | 2 +- include/mc13892.h | 41 +++++++++++++++++++++++++++++++++-------- 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/include/fsl_pmic.h b/include/fsl_pmic.h index e3abde6..2f2aa7d 100644 --- a/include/fsl_pmic.h +++ b/include/fsl_pmic.h @@ -112,7 +112,7 @@ enum { #define GPO4STBY (1 << 13) #define PWGT1SPIEN (1 << 15) #define PWGT2SPIEN (1 << 16) -#define PWUP (1 << 21) +#define GPO4ADIN (1 << 21) /* Power Control 0 */ #define COINCHEN (1 << 23) diff --git a/include/mc13892.h b/include/mc13892.h index b291757..4eea6af 100644 --- a/include/mc13892.h +++ b/include/mc13892.h @@ -29,29 +29,51 @@ /* REG_CHARGE */ -#define VCHRG0 0 +#define VCHRG0 (1 << 0) #define VCHRG1 (1 << 1) #define VCHRG2 (1 << 2) #define ICHRG0 (1 << 3) #define ICHRG1 (1 << 4) #define ICHRG2 (1 << 5) #define ICHRG3 (1 << 6) -#define ICHRGTR0 (1 << 7) -#define ICHRGTR1 (1 << 8) -#define ICHRGTR2 (1 << 9) +#define TREN (1 << 7) +#define ACKLPB (1 << 8) +#define THCHKB (1 << 9) #define FETOVRD (1 << 10) #define FETCTRL (1 << 11) #define RVRSMODE (1 << 13) -#define OVCTRL0 (1 << 15) -#define OVCTRL1 (1 << 16) -#define UCHEN (1 << 17) +#define PLIM0 (1 << 15) +#define PLIM1 (1 << 16) +#define PLIMDIS (1 << 17) #define CHRGLEDEN (1 << 18) -#define CHRGRAWPDEN (1 << 19) +#define CHGTMRRST (1 << 19) #define CHGRESTART (1 << 20) #define CHGAUTOB (1 << 21) #define CYCLB (1 << 22) #define CHGAUTOVIB (1 << 23) + +/* Power Control 2 (reg 15) */ +#define RESTARTEN (1 << 0) +#define PWRON1RSTEN (1 << 1) +#define PWRON2RSTEN (1 << 2) +#define PWRON3RSTEN (1 << 3) +#define PWRON1DBNC0 (1 << 4) +#define PWRON1DBNC1 (1 << 5) +#define PWRON2DBNC0 (1 << 6) +#define PWRON2DBNC1 (1 << 7) +#define PWRON3DBNC0 (1 << 8) +#define PWRON3DBNC1 (1 << 9) +#define STANDBYINV (1 << 10) +#define STANDBYSECINV (1 << 11) +#define WDIRESET (1 << 12) +#define SPIDRV0 (1 << 13) +#define SPIDRV1 (1 << 14) +#define CLK32KDRV0 (1 << 17) +#define CLK32KDRV1 (1 << 18) +#define STBYDLY0 (1 << 22) +#define STBYDLY1 (1 << 23) + /* REG_SETTING_0/1 */ #define VO_1_20V 0 #define VO_1_30V 1 @@ -84,6 +106,9 @@ #define SWMODE_PFM_PFM 15 #define SWMODE_MASK 0x0F +/* Switchers 4 (reg 28) */ +#define SWILIMB (1 << 22) + #define SWMODE1_SHIFT 0 #define SWMODE2_SHIFT 10 #define SWMODE3_SHIFT 0