hw_tps65217.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /**
  2. * @Component: PMIC
  3. *
  4. * @Filename: hw_tps65217.h
  5. *
  6. ============================================================================ */
  7. /*
  8. * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
  9. */
  10. /*
  11. * Redistribution and use in source and binary forms, with or without
  12. * modification, are permitted provided that the following conditions
  13. * are met:
  14. *
  15. * Redistributions of source code must retain the above copyright
  16. * notice, this list of conditions and the following disclaimer.
  17. *
  18. * Redistributions in binary form must reproduce the above copyright
  19. * notice, this list of conditions and the following disclaimer in the
  20. * documentation and/or other materials provided with the
  21. * distribution.
  22. *
  23. * Neither the name of Texas Instruments Incorporated nor the names of
  24. * its contributors may be used to endorse or promote products derived
  25. * from this software without specific prior written permission.
  26. *
  27. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  28. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  29. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  30. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  31. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  32. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  33. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  34. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  35. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  36. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  37. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  38. *
  39. */
  40. #ifndef __TPS65217_H__
  41. #define __TPS65217_H__
  42. /* Address of TPS65217(pmic) over I2C0 */
  43. #define PMIC_TPS65217_I2C_SLAVE_ADDR (0x24)
  44. /* Registers */
  45. #define CHIPID 0x00
  46. #define POWER_PATH 0x01
  47. #define INTERRUPT 0x02
  48. #define CHGCONFIG0 0x03
  49. #define CHGCONFIG1 0x04
  50. #define CHGCONFIG2 0x05
  51. #define CHGCONFIG3 0x06
  52. #define WLEDCTRL1 0x07
  53. #define WLEDCTRL2 0x08
  54. #define MUXCTRL 0x09
  55. #define STATUS 0x0A
  56. #define PASSWORD 0x0B
  57. #define PGOOD 0x0C
  58. #define DEFPG 0x0D
  59. #define DEFDCDC1 0x0E
  60. #define DEFDCDC2 0x0F
  61. #define DEFDCDC3 0x10
  62. #define DEFSLEW 0x11
  63. #define DEFLDO1 0x12
  64. #define DEFLDO2 0x13
  65. #define DEFLS1 0x14
  66. #define DEFLS2 0x15
  67. #define ENABLE 0x16
  68. #define DEFUVLO 0x18
  69. #define SEQ1 0x19
  70. #define SEQ2 0x1A
  71. #define SEQ3 0x1B
  72. #define SEQ4 0x1C
  73. #define SEQ5 0x1D
  74. #define SEQ6 0x1E
  75. #define PROT_LEVEL_NONE 0x00
  76. #define PROT_LEVEL_1 0x01
  77. #define PROT_LEVEL_2 0x02
  78. #define PASSWORD_LOCK_FOR_WRITE 0x00
  79. #define PASSWORD_UNLOCK 0x7D
  80. #define DCDC_GO 0x80
  81. #define MASK_ALL_BITS 0xFF
  82. #define USB_INPUT_CUR_LIMIT_MASK 0x03
  83. #define USB_INPUT_CUR_LIMIT_100MA 0x00
  84. #define USB_INPUT_CUR_LIMIT_500MA 0x01
  85. #define USB_INPUT_CUR_LIMIT_1300MA 0x02
  86. #define USB_INPUT_CUR_LIMIT_1800MA 0x03
  87. #define DCDC_VOLT_SEL_1275MV 0x0F
  88. #define DCDC_VOLT_SEL_1200MV (0x0C)
  89. #define DCDC_VOLT_SEL_1100MV (0x08)
  90. #define DCDC_VOLT_SEL_0950MV (0x02)
  91. #define LDO_MASK 0x1F
  92. #define LDO_VOLTAGE_OUT_3_3 0x1F
  93. #define PWR_SRC_USB_BITMASK 0x4
  94. #define PWR_SRC_AC_BITMASK 0x8
  95. #endif