sym827-regulator.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Copyright (c) 2015 MediaTek Inc.
  3. * Author: HenryC.Chen <henryc.chen@mediatek.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. */
  14. #ifndef __SYM827_REGISTERS_H__
  15. #define __SYM827_REGISTERS_H__
  16. #define SYM827_REG_VSEL_0 0x00
  17. #define SYM827_REG_VSEL_1 0x01
  18. #define SYM827_REG_CONTROL 0x02
  19. #define SYM827_REG_ID_1 0x03
  20. #define SYM827_REG_ID_2 0x04
  21. #define SYM827_REG_PGOOD 0x05
  22. #define SYM827_BUCK_ENABLE 0x01
  23. #define SYM827_BUCK_DISABLE 0x00
  24. #define SYM827_BUCK_EN_SHIFT 0x07
  25. #define SYM827_BUCK_EN_MASK 0x80
  26. #define SYM827_BUCK_MODE_SHIFT 0x06
  27. #define SYM827_BUCK_MODE_MASK 0x40
  28. #define SYM827_BUCK_NSEL_SHIFT 0x00
  29. #define SYM827_BUCK_NSEL_MASK 0x3F
  30. #define SYM827_REG_SLEW_RATE_SHIFT 0x04
  31. #define SYM827_REG_SLEW_RATE_MASK 0x07
  32. #define SYM827_ID_VENDOR_SHIFT 0x05
  33. #define SYM827_ID_VENDOR_MASK 0xE0
  34. #define SYM827_ID_DIE_ID_SHIFT 0x00
  35. #define SYM827_ID_DIE_ID_MASK 0x0F
  36. #define SYM827_ID_DIE_REV_SHIFT 0x00
  37. #define SYM827_ID_DIE_REV_MASK 0x0F
  38. #define SYM827_PGOOD_SHIFT 0x07
  39. #define SYM827_PGOOD_MASK 0x80
  40. #define SYM827_VENDOR_ID 0x80
  41. #ifdef CONFIG_ARCH_MT8163
  42. extern void slp_cpu_dvs_en(bool en);
  43. void set_slp_spm_deepidle_flags(bool en);
  44. extern void spm_sodi_cpu_dvs_en(bool en);
  45. #endif
  46. #endif