]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - include/palmas.h
arm: imx: hab: Define HAB_RVT_BASE according to the processor version
[people/ms/u-boot.git] / include / palmas.h
index aff48b5dfcbd43345ff49aa6cf41dd59878a0099..d366c98d22e2e48f5ab857b54051f4945192ef6b 100644 (file)
@@ -2,23 +2,7 @@
  * (C) Copyright 2012-2013
  * Texas Instruments, <www.ti.com>
  *
- * 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
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 #ifndef PALMAS_H
 #define PALMAS_H
 #define LDO1_CTRL              0x50
 #define LDO1_VOLTAGE           0x51
 
+/* LDO1 control/voltage for LP873x */
+#define LP873X_LDO1_ADDR       0x60
+#define LP873X_LDO1_CTRL       0x9
+#define LP873X_LDO1_VOLTAGE    0xa
+#define LP873X_LDO_VOLT_3V0    0x19
+#define LP873X_LDO_VOLT_1V8    0xa
+#define LP873X_LDO_CTRL_EN     (0x1 << 0)
+#define LP873X_LDO_CTRL_EN_PINCTRL     (0x1 << 1)
+#define LP873X_LDO_CTRL_RDIS_EN        (0x1 << 2)
+
+/* LDO2 control/voltage */
+#define LDO2_CTRL              0x52
+#define LDO2_VOLTAGE           0x53
+
+/* LDO2 control/voltage */
+#define LDO4_CTRL              0x5e
+#define LDO4_VOLTAGE           0x5f
+
 /* LDO9 control/voltage */
 #define LDO9_CTRL              0x60
 #define LDO9_VOLTAGE           0x61
@@ -47,6 +49,7 @@
 /* LDOUSB control/voltage */
 #define LDOUSB_CTRL            0x64
 #define LDOUSB_VOLTAGE         0x65
+#define LDO_CTRL               0x6a
 
 /* Control of 32 kHz audio clock */
 #define CLK32KGAUDIO_CTRL      0xd5
 #define SMPS9_CTRL             0x38
 #define SMPS9_VOLTAGE          0x3b
 
+/* SMPS10_CTRL */
+#define SMPS10_CTRL            0x3c
+#define SMPS10_MODE_ACTIVE_D   0x0d
+
 /* Bit field definitions for SMPSx_CTRL */
 #define SMPS_MODE_ACT_AUTO     1
 #define SMPS_MODE_ACT_ECO      2
@@ -126,9 +133,11 @@ static inline int palmas_i2c_read_u8(u8 chip_no, u8 reg, u8 *val)
 }
 
 void palmas_init_settings(void);
-int palmas_mmc1_poweron_ldo(void);
+int palmas_mmc1_poweron_ldo(uint ldo_volt, uint ldo_ctrl, uint voltage);
+int lp873x_mmc1_poweron_ldo(uint voltage);
 int twl603x_mmc1_set_ldo9(u8 vsel);
 int twl603x_audio_power(u8 on);
 int twl603x_enable_bb_charge(u8 bb_fields);
+int palmas_enable_ss_ldo(void);
 
 #endif /* PALMAS_H */