Merge tag 'tpm-030822' of https://source.denx.de/u-boot/custodians/u-boot-tpm
[platform/kernel/u-boot.git] / include / axp_pmic.h
index 10091d0..01ebba6 100644 (file)
@@ -5,22 +5,26 @@
  * X-Powers AX Power Management IC support header
  */
 #ifndef _AXP_PMIC_H_
+#define _AXP_PMIC_H_
+
+#include <stdbool.h>
 
-#ifdef CONFIG_AXP152_POWER
 #include <axp152.h>
-#endif
-#ifdef CONFIG_AXP209_POWER
 #include <axp209.h>
-#endif
-#ifdef CONFIG_AXP221_POWER
 #include <axp221.h>
-#endif
-#ifdef CONFIG_AXP809_POWER
+#include <axp305.h>
 #include <axp809.h>
-#endif
-#ifdef CONFIG_AXP818_POWER
 #include <axp818.h>
-#endif
+
+#define AXP_PMIC_MODE_REG              0x3e
+#define AXP_PMIC_MODE_I2C              0x00
+#define AXP_PMIC_MODE_P2WI             0x3e
+#define AXP_PMIC_MODE_RSB              0x7c
+
+#define AXP_PMIC_PRI_DEVICE_ADDR       0x3a3
+#define AXP_PMIC_PRI_RUNTIME_ADDR      0x2d
+#define AXP_PMIC_SEC_DEVICE_ADDR       0x745
+#define AXP_PMIC_SEC_RUNTIME_ADDR      0x3a
 
 int axp_set_dcdc1(unsigned int mvolt);
 int axp_set_dcdc2(unsigned int mvolt);