pv88060-regulator.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * pv88060-regulator.h - Regulator definitions for PV88060
  4. * Copyright (C) 2015 Powerventure Semiconductor Ltd.
  5. */
  6. #ifndef __PV88060_REGISTERS_H__
  7. #define __PV88060_REGISTERS_H__
  8. /* System Control and Event Registers */
  9. #define PV88060_REG_EVENT_A 0x04
  10. #define PV88060_REG_MASK_A 0x08
  11. #define PV88060_REG_MASK_B 0x09
  12. #define PV88060_REG_MASK_C 0x0A
  13. /* Regulator Registers */
  14. #define PV88060_REG_BUCK1_CONF0 0x1B
  15. #define PV88060_REG_BUCK1_CONF1 0x1C
  16. #define PV88060_REG_LDO1_CONF 0x1D
  17. #define PV88060_REG_LDO2_CONF 0x1E
  18. #define PV88060_REG_LDO3_CONF 0x1F
  19. #define PV88060_REG_LDO4_CONF 0x20
  20. #define PV88060_REG_LDO5_CONF 0x21
  21. #define PV88060_REG_LDO6_CONF 0x22
  22. #define PV88060_REG_LDO7_CONF 0x23
  23. #define PV88060_REG_SW1_CONF 0x3B
  24. #define PV88060_REG_SW2_CONF 0x3C
  25. #define PV88060_REG_SW3_CONF 0x3D
  26. #define PV88060_REG_SW4_CONF 0x3E
  27. #define PV88060_REG_SW5_CONF 0x3F
  28. #define PV88060_REG_SW6_CONF 0x40
  29. /* PV88060_REG_EVENT_A (addr=0x04) */
  30. #define PV88060_E_VDD_FLT 0x01
  31. #define PV88060_E_OVER_TEMP 0x02
  32. /* PV88060_REG_MASK_A (addr=0x08) */
  33. #define PV88060_M_VDD_FLT 0x01
  34. #define PV88060_M_OVER_TEMP 0x02
  35. /* PV88060_REG_BUCK1_CONF0 (addr=0x1B) */
  36. #define PV88060_BUCK_EN 0x80
  37. #define PV88060_VBUCK_MASK 0x7F
  38. /* PV88060_REG_LDO1/2/3/4/5/6/7_CONT */
  39. #define PV88060_LDO_EN 0x40
  40. #define PV88060_VLDO_MASK 0x3F
  41. /* PV88060_REG_SW1/2/3/4/5_CONF */
  42. #define PV88060_SW_EN 0x80
  43. /* PV88060_REG_BUCK1_CONF1 (addr=0x1C) */
  44. #define PV88060_BUCK_ILIM_SHIFT 2
  45. #define PV88060_BUCK_ILIM_MASK 0x0C
  46. #define PV88060_BUCK_MODE_SHIFT 0
  47. #define PV88060_BUCK_MODE_MASK 0x03
  48. #define PV88060_BUCK_MODE_SLEEP 0x00
  49. #define PV88060_BUCK_MODE_AUTO 0x01
  50. #define PV88060_BUCK_MODE_SYNC 0x02
  51. #endif /* __PV88060_REGISTERS_H__ */