3 * Stefano Babic, DENX Software Engineering, sbabic@denx.de.
5 * (C) Copyright 2009 Freescale Semiconductor, Inc.
7 * See file CREDITS for list of people who contributed to this
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of
13 * the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26 #ifndef __FSL_PMIC_H__
27 #define __FSL_PMIC_H__
30 * The registers of different PMIC has the same meaning
31 * but the bit positions of the fields can differ or
32 * some fields has a meaning only on some devices.
33 * You have to check with the internal SPI bitmap
34 * (see Freescale Documentation) to set the registers
35 * for the device you are using
68 REG_SETTING_0, /*30 */
105 #define GPO1EN (1 << 6)
106 #define GPO1STBY (1 << 7)
107 #define GPO2EN (1 << 8)
108 #define GPO2STBY (1 << 9)
109 #define GPO3EN (1 << 10)
110 #define GPO3STBY (1 << 11)
111 #define GPO4EN (1 << 12)
112 #define GPO4STBY (1 << 13)
113 #define PWGT1SPIEN (1 << 15)
114 #define PWGT2SPIEN (1 << 16)
115 #define PWUP (1 << 21)
117 /* Power Control 0 */
118 #define COINCHEN (1 << 23)
119 #define BATTDETEN (1 << 19)
121 /* Interrupt status 1 */
122 #define RTCRSTI (1 << 7)
124 void pmic_show_pmic_info(void);
125 void pmic_reg_write(u32 reg, u32 value);
126 u32 pmic_reg_read(u32 reg);