act8846_pmic.h 600 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2015 Google, Inc
  4. * Written by Simon Glass <sjg@chromium.org>
  5. */
  6. #ifndef _PMIC_ACT8846_H_
  7. #define _PMIC_ACT8846_H_
  8. #include <asm/gpio.h>
  9. #define ACT8846_NUM_OF_REGS 12
  10. #define BUCK_VOL_MASK 0x3f
  11. #define LDO_VOL_MASK 0x3f
  12. #define BUCK_EN_MASK 0x80
  13. #define LDO_EN_MASK 0x80
  14. #define VOL_MIN_IDX 0x00
  15. #define VOL_MAX_IDX 0x3f
  16. struct act8846_reg_table {
  17. char *name;
  18. char reg_ctl;
  19. char reg_vol;
  20. };
  21. struct pmic_act8846 {
  22. struct pmic *pmic;
  23. int node; /*device tree node*/
  24. struct gpio_desc pwr_hold;
  25. struct udevice *dev;
  26. };
  27. #endif