]> git.sur5r.net Git - u-boot/blobdiff - include/power/s2mps11.h
common/memsize.c: Increase save array for supporting memory size > 4GB
[u-boot] / include / power / s2mps11.h
index 5da47198a4b85ce7e8a8b13549268fcb9c5b9843..22b38fff7032b510d646dac4e7f00723727d8d06 100644 (file)
@@ -106,4 +106,59 @@ enum s2mps11_reg {
 
 #define S2MPS11_LDO26_ENABLE   0xec
 
+#define S2MPS11_LDO_NUM                26
+#define S2MPS11_BUCK_NUM       10
+
+/* Driver name */
+#define S2MPS11_BUCK_DRIVER    "s2mps11_buck"
+#define S2MPS11_OF_BUCK_PREFIX "BUCK"
+#define S2MPS11_LDO_DRIVER     "s2mps11_ldo"
+#define S2MPS11_OF_LDO_PREFIX  "LDO"
+
+/* BUCK */
+#define S2MPS11_BUCK_VOLT_MASK 0xff
+#define S2MPS11_BUCK9_VOLT_MASK        0x1f
+
+#define S2MPS11_BUCK_LSTEP     6250
+#define S2MPS11_BUCK_HSTEP     12500
+#define S2MPS11_BUCK9_STEP     25000
+
+#define S2MPS11_BUCK_UV_MIN    600000
+#define S2MPS11_BUCK_UV_HMIN   750000
+#define S2MPS11_BUCK9_UV_MIN   1400000
+
+#define S2MPS11_BUCK_VOLT_MAX_HEX      0xA0
+#define S2MPS11_BUCK5_VOLT_MAX_HEX     0xDF
+#define S2MPS11_BUCK7_8_10_VOLT_MAX_HEX        0xDC
+#define S2MPS11_BUCK9_VOLT_MAX_HEX     0x5F
+
+#define S2MPS11_BUCK_MODE_SHIFT                6
+#define S2MPS11_BUCK_MODE_MASK         (0x3)
+#define S2MPS11_BUCK_MODE_OFF          (0x0 << 6)
+#define S2MPS11_BUCK_MODE_STANDBY      (0x1 << 6)
+#define S2MPS11_BUCK_MODE_ON           (0x3 << 6)
+
+/* LDO */
+#define S2MPS11_LDO_VOLT_MASK          0x3F
+#define S2MPS11_LDO_VOLT_MAX_HEX       0x3F
+
+#define S2MPS11_LDO_STEP       25000
+#define S2MPS11_LDO_UV_MIN     800000
+
+#define S2MPS11_LDO_MODE_MASK          0x3
+#define S2MPS11_LDO_MODE_SHIFT         6
+
+#define S2MPS11_LDO_MODE_OFF           (0x0 << 6)
+#define S2MPS11_LDO_MODE_STANDBY       (0x1 << 6)
+#define S2MPS11_LDO_MODE_STANDBY_LPM   (0x2 << 6)
+#define S2MPS11_LDO_MODE_ON            (0x3 << 6)
+
+enum {
+       OP_OFF = 0,
+       OP_LPM,
+       OP_STANDBY,
+       OP_STANDBY_LPM,
+       OP_ON,
+};
+
 #endif