pv88060-regulator.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * pv88060-regulator.h - Regulator definitions for PV88060
  3. * Copyright (C) 2015 Powerventure Semiconductor Ltd.
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License
  7. * as published by the Free Software Foundation; either version 2
  8. * of the License, or (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. */
  15. #ifndef __PV88060_REGISTERS_H__
  16. #define __PV88060_REGISTERS_H__
  17. /* System Control and Event Registers */
  18. #define PV88060_REG_EVENT_A 0x04
  19. #define PV88060_REG_MASK_A 0x08
  20. #define PV88060_REG_MASK_B 0x09
  21. #define PV88060_REG_MASK_C 0x0A
  22. /* Regulator Registers */
  23. #define PV88060_REG_BUCK1_CONF0 0x1B
  24. #define PV88060_REG_BUCK1_CONF1 0x1C
  25. #define PV88060_REG_LDO1_CONF 0x1D
  26. #define PV88060_REG_LDO2_CONF 0x1E
  27. #define PV88060_REG_LDO3_CONF 0x1F
  28. #define PV88060_REG_LDO4_CONF 0x20
  29. #define PV88060_REG_LDO5_CONF 0x21
  30. #define PV88060_REG_LDO6_CONF 0x22
  31. #define PV88060_REG_LDO7_CONF 0x23
  32. #define PV88060_REG_SW1_CONF 0x3B
  33. #define PV88060_REG_SW2_CONF 0x3C
  34. #define PV88060_REG_SW3_CONF 0x3D
  35. #define PV88060_REG_SW4_CONF 0x3E
  36. #define PV88060_REG_SW5_CONF 0x3F
  37. #define PV88060_REG_SW6_CONF 0x40
  38. /* PV88060_REG_EVENT_A (addr=0x04) */
  39. #define PV88060_E_VDD_FLT 0x01
  40. #define PV88060_E_OVER_TEMP 0x02
  41. /* PV88060_REG_MASK_A (addr=0x08) */
  42. #define PV88060_M_VDD_FLT 0x01
  43. #define PV88060_M_OVER_TEMP 0x02
  44. /* PV88060_REG_BUCK1_CONF0 (addr=0x1B) */
  45. #define PV88060_BUCK_EN 0x80
  46. #define PV88060_VBUCK_MASK 0x7F
  47. /* PV88060_REG_LDO1/2/3/4/5/6/7_CONT */
  48. #define PV88060_LDO_EN 0x40
  49. #define PV88060_VLDO_MASK 0x3F
  50. /* PV88060_REG_SW1/2/3/4/5_CONF */
  51. #define PV88060_SW_EN 0x80
  52. /* PV88060_REG_BUCK1_CONF1 (addr=0x1C) */
  53. #define PV88060_BUCK_ILIM_SHIFT 2
  54. #define PV88060_BUCK_ILIM_MASK 0x0C
  55. #define PV88060_BUCK_MODE_SHIFT 0
  56. #define PV88060_BUCK_MODE_MASK 0x03
  57. #define PV88060_BUCK_MODE_SLEEP 0x00
  58. #define PV88060_BUCK_MODE_AUTO 0x01
  59. #define PV88060_BUCK_MODE_SYNC 0x02
  60. #endif /* __PV88060_REGISTERS_H__ */