pwrap_hal.h 91 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311
  1. #ifndef __PMIC_WRAP_REGS_H__
  2. #define __PMIC_WRAP_REGS_H__
  3. #ifndef CONFIG_OF
  4. #include <mach/mt_reg_base.h>
  5. #include <mach/mt_irq.h>
  6. #endif
  7. #include "mt-plat/sync_write.h"
  8. #define PMIC_WRAP_DEBUG
  9. #define PWRAPTAG "[PWRAP] "
  10. #ifdef PMIC_WRAP_DEBUG
  11. #define PWRAPDEB(fmt, arg...) printk(PWRAPTAG "cpuid=%d," fmt, raw_smp_processor_id(), ##arg)
  12. /* #define PWRAPLOG(fmt, arg...) printk(PWRAPTAG fmt,##arg) */
  13. #define PWRAPFUC(fmt, arg...) printk(PWRAPTAG "cpuid=%d,%s\n", raw_smp_processor_id(), __func__)
  14. /* #define PWRAPFUC(fmt, arg...) printk(PWRAPTAG "%s\n", __FUNCTION__) */
  15. #endif
  16. /* typedef unsigned int u32; */
  17. /* typedef signed int s32; */
  18. #define PWRAPLOG(fmt, arg...) printk(PWRAPTAG fmt, ##arg)
  19. #define PWRAPERR(fmt, arg...) printk(PWRAPTAG "ERROR,line=%d " fmt, __LINE__, ##arg)
  20. #define PWRAPREG(fmt, arg...) printk(PWRAPTAG fmt, ##arg)
  21. /************************ROME BringUp *********************/
  22. /* #define PMIC_WRAP_NO_PMIC ///TODO: Fix me //if BringUp doesn't had PMIC, need open this */
  23. /**********************************************************/
  24. #define SLV_6328
  25. /* #define SLV_6332 */
  26. #ifdef CONFIG_OF
  27. extern void __iomem *pwrap_base;
  28. #define PMIC_WRAP_BASE (pwrap_base)
  29. #define MT_PMIC_WRAP_IRQ_ID (pwrap_irq)
  30. #define INFRACFG_AO_REG_BASE (infracfg_ao_base)
  31. #define TOPCKGEN_BASE (topckgen_base)
  32. #else
  33. #define PMIC_WRAP_BASE (PWRAP_BASE) /* 0x1000D000 */
  34. #define MT_PMIC_WRAP_IRQ_ID PMIC_WRAP_ERR_IRQ_BIT_ID
  35. #define INFRACFG_AO_REG_BASE (INFRACFG_AO_BASE)
  36. #define TOPCKGEN_BASE (CKSYS_BASE)
  37. #endif
  38. /* #define CKSYS_BASE (INFRA_BASE) */
  39. #define PMIC_WRAP_REG_RANGE 85.5
  40. #define PMIC_WRAP_REG_MAX 0xF000F154
  41. /* -------macro for timeout setting-------------------------------- */
  42. /******************************************************************************
  43. global variable and sys interface
  44. ******************************************************************************/
  45. #define TIMEOUT_RESET 0x7D0 /* 2000us */
  46. #define TIMEOUT_READ 0x7D0 /* 2000us */
  47. #define TIMEOUT_WAIT_IDLE 0x7D0 /* 2000us */
  48. /* -------macro for spi clock config-------------------------------- */
  49. #define CLK_CFG_4_CLR (TOPCKGEN_BASE+0x088) /* 6582 */
  50. #define CLK_CFG_5_CLR (TOPCKGEN_BASE+0x098) /* 6593 */
  51. #define CLK_SPI_CK_26M 0x70000
  52. /* -------macro for spi clock config-------------------------------- */
  53. /* #define CLK_CFG_8 (AP_RGU_BASE+0x164) //6585 */
  54. /* #define CLK_CFG_4 (TOPRGU_BASE+0x150) //6582 */
  55. /* #define PMIC_WRAP_RDDMY1 ((PMIC_WRAP_BASE+0x14)) */
  56. /* #define PMIC_WRAP_SIG_ADR1 ((PMIC_WRAP_BASE+0xD0)) */
  57. /* #define PMIC_WRAP_SIG_MODE1 ((PMIC_WRAP_BASE+0xD4)) */
  58. /* #define PMIC_WRAP_SIG_VALUE1 ((PMIC_WRAP_BASE+0xD8)) */
  59. /* #define PMIC_WRAP_SIG_ERRVAL1 ((PMIC_WRAP_BASE+0xDC)) */
  60. /* #define PMIC_WRAP_PMIC_IRQ_ADR ((PMIC_WRAP_BASE+0x13C)) */
  61. /* #define PMIC_WRAP_PMIC_IRQ_MASK ((PMIC_WRAP_BASE+0x140)) */
  62. #if defined(CONFIG_ARCH_MT6735M)
  63. #include "pwrap_hal_d2.h"
  64. #else
  65. #define PMIC_WRAP_MUX_SEL ((unsigned int *)(PMIC_WRAP_BASE+0x0))
  66. #define PMIC_WRAP_WRAP_EN ((unsigned int *)(PMIC_WRAP_BASE+0x4))
  67. #define PMIC_WRAP_DIO_EN ((unsigned int *)(PMIC_WRAP_BASE+0x8))
  68. #define PMIC_WRAP_SIDLY ((unsigned int *)(PMIC_WRAP_BASE+0xC))
  69. #define PMIC_WRAP_RDDMY ((unsigned int *)(PMIC_WRAP_BASE+0x10))
  70. #define PMIC_WRAP_SI_CK_CON ((unsigned int *)(PMIC_WRAP_BASE+0x14))
  71. #define PMIC_WRAP_CSHEXT_WRITE ((unsigned int *)(PMIC_WRAP_BASE+0x18))
  72. #define PMIC_WRAP_CSHEXT_READ ((unsigned int *)(PMIC_WRAP_BASE+0x1C))
  73. #define PMIC_WRAP_CSLEXT_START ((unsigned int *)(PMIC_WRAP_BASE+0x20))
  74. #define PMIC_WRAP_CSLEXT_END ((unsigned int *)(PMIC_WRAP_BASE+0x24))
  75. #define PMIC_WRAP_STAUPD_PRD ((unsigned int *)(PMIC_WRAP_BASE+0x28))
  76. #define PMIC_WRAP_STAUPD_GRPEN ((unsigned int *)(PMIC_WRAP_BASE+0x2C))
  77. #define PMIC_WRAP_EINT_STA0_ADR ((unsigned int *)(PMIC_WRAP_BASE+0x30))
  78. #define PMIC_WRAP_EINT_STA1_ADR ((unsigned int *)(PMIC_WRAP_BASE+0x34))
  79. #define PMIC_WRAP_EINT_STA ((unsigned int *)(PMIC_WRAP_BASE+0x38))
  80. #define PMIC_WRAP_EINT_CLR ((unsigned int *)(PMIC_WRAP_BASE+0x3C))
  81. #define PMIC_WRAP_STAUPD_MAN_TRIG ((unsigned int *)(PMIC_WRAP_BASE+0x40))
  82. #define PMIC_WRAP_STAUPD_STA ((unsigned int *)(PMIC_WRAP_BASE+0x44))
  83. #define PMIC_WRAP_WRAP_STA ((unsigned int *)(PMIC_WRAP_BASE+0x48))
  84. #define PMIC_WRAP_HARB_INIT ((unsigned int *)(PMIC_WRAP_BASE+0x4C))
  85. #define PMIC_WRAP_HARB_HPRIO ((unsigned int *)(PMIC_WRAP_BASE+0x50))
  86. #define PMIC_WRAP_HIPRIO_ARB_EN ((unsigned int *)(PMIC_WRAP_BASE+0x54))
  87. #define PMIC_WRAP_HARB_STA0 ((unsigned int *)(PMIC_WRAP_BASE+0x58))
  88. #define PMIC_WRAP_HARB_STA1 ((unsigned int *)(PMIC_WRAP_BASE+0x5C))
  89. #define PMIC_WRAP_MAN_EN ((unsigned int *)(PMIC_WRAP_BASE+0x60))
  90. #define PMIC_WRAP_MAN_CMD ((unsigned int *)(PMIC_WRAP_BASE+0x64))
  91. #define PMIC_WRAP_MAN_RDATA ((unsigned int *)(PMIC_WRAP_BASE+0x68))
  92. #define PMIC_WRAP_MAN_VLDCLR ((unsigned int *)(PMIC_WRAP_BASE+0x6C))
  93. #define PMIC_WRAP_WACS0_EN ((unsigned int *)(PMIC_WRAP_BASE+0x70))
  94. #define PMIC_WRAP_INIT_DONE0 ((unsigned int *)(PMIC_WRAP_BASE+0x74))
  95. #define PMIC_WRAP_WACS0_CMD ((unsigned int *)(PMIC_WRAP_BASE+0x78))
  96. #define PMIC_WRAP_WACS0_RDATA ((unsigned int *)(PMIC_WRAP_BASE+0x7C))
  97. #define PMIC_WRAP_WACS0_VLDCLR ((unsigned int *)(PMIC_WRAP_BASE+0x80))
  98. #define PMIC_WRAP_WACS1_EN ((unsigned int *)(PMIC_WRAP_BASE+0x84))
  99. #define PMIC_WRAP_INIT_DONE1 ((unsigned int *)(PMIC_WRAP_BASE+0x88))
  100. #define PMIC_WRAP_WACS1_CMD ((unsigned int *)(PMIC_WRAP_BASE+0x8C))
  101. #define PMIC_WRAP_WACS1_RDATA ((unsigned int *)(PMIC_WRAP_BASE+0x90))
  102. #define PMIC_WRAP_WACS1_VLDCLR ((unsigned int *)(PMIC_WRAP_BASE+0x94))
  103. #define PMIC_WRAP_WACS2_EN ((unsigned int *)(PMIC_WRAP_BASE+0x98))
  104. #define PMIC_WRAP_INIT_DONE2 ((unsigned int *)(PMIC_WRAP_BASE+0x9C))
  105. #define PMIC_WRAP_WACS2_CMD ((unsigned int *)(PMIC_WRAP_BASE+0xA0))
  106. #define PMIC_WRAP_WACS2_RDATA ((unsigned int *)(PMIC_WRAP_BASE+0xA4))
  107. #define PMIC_WRAP_WACS2_VLDCLR ((unsigned int *)(PMIC_WRAP_BASE+0xA8))
  108. #define PMIC_WRAP_WACS3_EN ((unsigned int *)(PMIC_WRAP_BASE+0xAC))
  109. #define PMIC_WRAP_INIT_DONE3 ((unsigned int *)(PMIC_WRAP_BASE+0xB0))
  110. #define PMIC_WRAP_WACS3_CMD ((unsigned int *)(PMIC_WRAP_BASE+0xB4))
  111. #define PMIC_WRAP_WACS3_RDATA ((unsigned int *)(PMIC_WRAP_BASE+0xB8))
  112. #define PMIC_WRAP_WACS3_VLDCLR ((unsigned int *)(PMIC_WRAP_BASE+0xBC))
  113. #define PMIC_WRAP_INT_EN ((unsigned int *)(PMIC_WRAP_BASE+0xC0))
  114. #define PMIC_WRAP_INT_FLG_RAW ((unsigned int *)(PMIC_WRAP_BASE+0xC4))
  115. #define PMIC_WRAP_INT_FLG ((unsigned int *)(PMIC_WRAP_BASE+0xC8))
  116. #define PMIC_WRAP_INT_CLR ((unsigned int *)(PMIC_WRAP_BASE+0xCC))
  117. #define PMIC_WRAP_SIG_ADR ((unsigned int *)(PMIC_WRAP_BASE+0xD0))
  118. #define PMIC_WRAP_SIG_MODE ((unsigned int *)(PMIC_WRAP_BASE+0xD4))
  119. #define PMIC_WRAP_SIG_VALUE ((unsigned int *)(PMIC_WRAP_BASE+0xD8))
  120. #define PMIC_WRAP_SIG_ERRVAL ((unsigned int *)(PMIC_WRAP_BASE+0xDC))
  121. #define PMIC_WRAP_CRC_EN ((unsigned int *)(PMIC_WRAP_BASE+0xE0))
  122. #define PMIC_WRAP_TIMER_EN ((unsigned int *)(PMIC_WRAP_BASE+0xE4))
  123. #define PMIC_WRAP_TIMER_STA ((unsigned int *)(PMIC_WRAP_BASE+0xE8))
  124. #define PMIC_WRAP_WDT_UNIT ((unsigned int *)(PMIC_WRAP_BASE+0xEC))
  125. #define PMIC_WRAP_WDT_SRC_EN ((unsigned int *)(PMIC_WRAP_BASE+0xF0))
  126. #define PMIC_WRAP_WDT_FLG ((unsigned int *)(PMIC_WRAP_BASE+0xF4))
  127. #define PMIC_WRAP_DEBUG_INT_SEL ((unsigned int *)(PMIC_WRAP_BASE+0xF8))
  128. #define PMIC_WRAP_DVFS_ADR0 ((unsigned int *)(PMIC_WRAP_BASE+0xFC))
  129. #define PMIC_WRAP_DVFS_WDATA0 ((unsigned int *)(PMIC_WRAP_BASE+0x100))
  130. #define PMIC_WRAP_DVFS_ADR1 ((unsigned int *)(PMIC_WRAP_BASE+0x104))
  131. #define PMIC_WRAP_DVFS_WDATA1 ((unsigned int *)(PMIC_WRAP_BASE+0x108))
  132. #define PMIC_WRAP_DVFS_ADR2 ((unsigned int *)(PMIC_WRAP_BASE+0x10C))
  133. #define PMIC_WRAP_DVFS_WDATA2 ((unsigned int *)(PMIC_WRAP_BASE+0x110))
  134. #define PMIC_WRAP_DVFS_ADR3 ((unsigned int *)(PMIC_WRAP_BASE+0x114))
  135. #define PMIC_WRAP_DVFS_WDATA3 ((unsigned int *)(PMIC_WRAP_BASE+0x118))
  136. #define PMIC_WRAP_DVFS_ADR4 ((unsigned int *)(PMIC_WRAP_BASE+0x11C))
  137. #define PMIC_WRAP_DVFS_WDATA4 ((unsigned int *)(PMIC_WRAP_BASE+0x120))
  138. #define PMIC_WRAP_DVFS_ADR5 ((unsigned int *)(PMIC_WRAP_BASE+0x124))
  139. #define PMIC_WRAP_DVFS_WDATA5 ((unsigned int *)(PMIC_WRAP_BASE+0x128))
  140. #define PMIC_WRAP_DVFS_ADR6 ((unsigned int *)(PMIC_WRAP_BASE+0x12C))
  141. #define PMIC_WRAP_DVFS_WDATA6 ((unsigned int *)(PMIC_WRAP_BASE+0x130))
  142. #define PMIC_WRAP_DVFS_ADR7 ((unsigned int *)(PMIC_WRAP_BASE+0x134))
  143. #define PMIC_WRAP_DVFS_WDATA7 ((unsigned int *)(PMIC_WRAP_BASE+0x138))
  144. #define PMIC_WRAP_DVFS_ADR8 ((unsigned int *)(PMIC_WRAP_BASE+0x13C))
  145. #define PMIC_WRAP_DVFS_WDATA8 ((unsigned int *)(PMIC_WRAP_BASE+0x140))
  146. #define PMIC_WRAP_DVFS_ADR9 ((unsigned int *)(PMIC_WRAP_BASE+0x144))
  147. #define PMIC_WRAP_DVFS_WDATA9 ((unsigned int *)(PMIC_WRAP_BASE+0x148))
  148. #define PMIC_WRAP_DVFS_ADR10 ((unsigned int *)(PMIC_WRAP_BASE+0x14C))
  149. #define PMIC_WRAP_DVFS_WDATA10 ((unsigned int *)(PMIC_WRAP_BASE+0x150))
  150. #define PMIC_WRAP_DVFS_ADR11 ((unsigned int *)(PMIC_WRAP_BASE+0x154))
  151. #define PMIC_WRAP_DVFS_WDATA11 ((unsigned int *)(PMIC_WRAP_BASE+0x158))
  152. #define PMIC_WRAP_DVFS_ADR12 ((unsigned int *)(PMIC_WRAP_BASE+0x15C))
  153. #define PMIC_WRAP_DVFS_WDATA12 ((unsigned int *)(PMIC_WRAP_BASE+0x160))
  154. #define PMIC_WRAP_DVFS_ADR13 ((unsigned int *)(PMIC_WRAP_BASE+0x164))
  155. #define PMIC_WRAP_DVFS_WDATA13 ((unsigned int *)(PMIC_WRAP_BASE+0x168))
  156. #define PMIC_WRAP_DVFS_ADR14 ((unsigned int *)(PMIC_WRAP_BASE+0x16C))
  157. #define PMIC_WRAP_DVFS_WDATA14 ((unsigned int *)(PMIC_WRAP_BASE+0x170))
  158. #define PMIC_WRAP_DVFS_ADR15 ((unsigned int *)(PMIC_WRAP_BASE+0x174))
  159. #define PMIC_WRAP_DVFS_WDATA15 ((unsigned int *)(PMIC_WRAP_BASE+0x178))
  160. #define PMIC_WRAP_SPMINF_STA ((unsigned int *)(PMIC_WRAP_BASE+0x17C))
  161. #define PMIC_WRAP_CIPHER_KEY_SEL ((unsigned int *)(PMIC_WRAP_BASE+0x180))
  162. #define PMIC_WRAP_CIPHER_IV_SEL ((unsigned int *)(PMIC_WRAP_BASE+0x184))
  163. #define PMIC_WRAP_CIPHER_EN ((unsigned int *)(PMIC_WRAP_BASE+0x188))
  164. #define PMIC_WRAP_CIPHER_RDY ((unsigned int *)(PMIC_WRAP_BASE+0x18C))
  165. #define PMIC_WRAP_CIPHER_MODE ((unsigned int *)(PMIC_WRAP_BASE+0x190))
  166. #define PMIC_WRAP_CIPHER_SWRST ((unsigned int *)(PMIC_WRAP_BASE+0x194))
  167. #define PMIC_WRAP_DCM_EN ((unsigned int *)(PMIC_WRAP_BASE+0x198))
  168. #define PMIC_WRAP_DCM_DBC_PRD ((unsigned int *)(PMIC_WRAP_BASE+0x19C))
  169. #define PMIC_WRAP_EXT_CK ((unsigned int *)(PMIC_WRAP_BASE+0x1A0))
  170. #define PMIC_WRAP_ADC_CMD_ADDR ((unsigned int *)(PMIC_WRAP_BASE+0x1A4))
  171. #define PMIC_WRAP_PWRAP_ADC_CMD ((unsigned int *)(PMIC_WRAP_BASE+0x1A8))
  172. #define PMIC_WRAP_ADC_RDATA_ADDR ((unsigned int *)(PMIC_WRAP_BASE+0x1AC))
  173. #define PMIC_WRAP_GPS_STA ((unsigned int *)(PMIC_WRAP_BASE+0x1B0))
  174. #define PMIC_WRAP_SWRST ((unsigned int *)(PMIC_WRAP_BASE+0x1B4))
  175. #define PMIC_WRAP_MD_ADC_RDATA_ADDR_LATEST ((unsigned int *)(PMIC_WRAP_BASE+0x1B8))
  176. #define PMIC_WRAP_MD_ADC_RDATA_ADDR_WP ((unsigned int *)(PMIC_WRAP_BASE+0x1BC))
  177. #define PMIC_WRAP_MD_ADC_RDATA_ADDR0 ((unsigned int *)(PMIC_WRAP_BASE+0x1C0))
  178. #define PMIC_WRAP_MD_ADC_RDATA_ADDR1 ((unsigned int *)(PMIC_WRAP_BASE+0x1C4))
  179. #define PMIC_WRAP_MD_ADC_RDATA_ADDR2 ((unsigned int *)(PMIC_WRAP_BASE+0x1C8))
  180. #define PMIC_WRAP_MD_ADC_RDATA_ADDR3 ((unsigned int *)(PMIC_WRAP_BASE+0x1CC))
  181. #define PMIC_WRAP_MD_ADC_RDATA_ADDR4 ((unsigned int *)(PMIC_WRAP_BASE+0x1D0))
  182. #define PMIC_WRAP_MD_ADC_RDATA_ADDR5 ((unsigned int *)(PMIC_WRAP_BASE+0x1D4))
  183. #define PMIC_WRAP_MD_ADC_RDATA_ADDR6 ((unsigned int *)(PMIC_WRAP_BASE+0x1D8))
  184. #define PMIC_WRAP_MD_ADC_RDATA_ADDR7 ((unsigned int *)(PMIC_WRAP_BASE+0x1DC))
  185. #define PMIC_WRAP_MD_ADC_RDATA_ADDR8 ((unsigned int *)(PMIC_WRAP_BASE+0x1E0))
  186. #define PMIC_WRAP_MD_ADC_RDATA_ADDR9 ((unsigned int *)(PMIC_WRAP_BASE+0x1E4))
  187. #define PMIC_WRAP_MD_ADC_RDATA_ADDR10 ((unsigned int *)(PMIC_WRAP_BASE+0x1E8))
  188. #define PMIC_WRAP_MD_ADC_RDATA_ADDR11 ((unsigned int *)(PMIC_WRAP_BASE+0x1EC))
  189. #define PMIC_WRAP_MD_ADC_RDATA_ADDR12 ((unsigned int *)(PMIC_WRAP_BASE+0x1F0))
  190. #define PMIC_WRAP_MD_ADC_RDATA_ADDR13 ((unsigned int *)(PMIC_WRAP_BASE+0x1F4))
  191. #define PMIC_WRAP_MD_ADC_RDATA_ADDR14 ((unsigned int *)(PMIC_WRAP_BASE+0x1F8))
  192. #define PMIC_WRAP_MD_ADC_RDATA_ADDR15 ((unsigned int *)(PMIC_WRAP_BASE+0x1FC))
  193. #define PMIC_WRAP_MD_ADC_RDATA_ADDR16 ((unsigned int *)(PMIC_WRAP_BASE+0x200))
  194. #define PMIC_WRAP_MD_ADC_RDATA_ADDR17 ((unsigned int *)(PMIC_WRAP_BASE+0x204))
  195. #define PMIC_WRAP_MD_ADC_RDATA_ADDR18 ((unsigned int *)(PMIC_WRAP_BASE+0x208))
  196. #define PMIC_WRAP_MD_ADC_RDATA_ADDR19 ((unsigned int *)(PMIC_WRAP_BASE+0x20C))
  197. #define PMIC_WRAP_MD_ADC_RDATA_ADDR20 ((unsigned int *)(PMIC_WRAP_BASE+0x210))
  198. #define PMIC_WRAP_MD_ADC_RDATA_ADDR21 ((unsigned int *)(PMIC_WRAP_BASE+0x214))
  199. #define PMIC_WRAP_MD_ADC_RDATA_ADDR22 ((unsigned int *)(PMIC_WRAP_BASE+0x218))
  200. #define PMIC_WRAP_MD_ADC_RDATA_ADDR23 ((unsigned int *)(PMIC_WRAP_BASE+0x21C))
  201. #define PMIC_WRAP_MD_ADC_RDATA_ADDR24 ((unsigned int *)(PMIC_WRAP_BASE+0x220))
  202. #define PMIC_WRAP_MD_ADC_RDATA_ADDR25 ((unsigned int *)(PMIC_WRAP_BASE+0x224))
  203. #define PMIC_WRAP_MD_ADC_RDATA_ADDR26 ((unsigned int *)(PMIC_WRAP_BASE+0x228))
  204. #define PMIC_WRAP_MD_ADC_RDATA_ADDR27 ((unsigned int *)(PMIC_WRAP_BASE+0x22C))
  205. #define PMIC_WRAP_MD_ADC_RDATA_ADDR28 ((unsigned int *)(PMIC_WRAP_BASE+0x230))
  206. #define PMIC_WRAP_MD_ADC_RDATA_ADDR29 ((unsigned int *)(PMIC_WRAP_BASE+0x234))
  207. #define PMIC_WRAP_MD_ADC_RDATA_ADDR30 ((unsigned int *)(PMIC_WRAP_BASE+0x238))
  208. #define PMIC_WRAP_MD_ADC_RDATA_ADDR31 ((unsigned int *)(PMIC_WRAP_BASE+0x23C))
  209. #define PMIC_WRAP_MD_ADC_STA0 ((unsigned int *)(PMIC_WRAP_BASE+0x240))
  210. #define PMIC_WRAP_MD_ADC_STA1 ((unsigned int *)(PMIC_WRAP_BASE+0x244))
  211. #define PMIC_WRAP_MD_ADC_STA2 ((unsigned int *)(PMIC_WRAP_BASE+0x248))
  212. /* -----macro for wrapper regsister-------------------------------------------------------- */
  213. #define GET_STAUPD_DLE_CNT(x) ((x>>0) & 0x00000007)
  214. #define GET_STAUPD_ALE_CNT(x) ((x>>3) & 0x00000007)
  215. #define GET_STAUPD_FSM(x) ((x>>6) & 0x00000007)
  216. #define GET_WRAP_CH_DLE_RESTCNT(x) ((x>>0) & 0x00000007)
  217. #define GET_WRAP_CH_ALE_RESTCNT(x) ((x>>3) & 0x00000003)
  218. #define GET_WRAP_AG_DLE_RESTCNT(x) ((x>>5) & 0x00000003)
  219. #define GET_WRAP_CH_W(x) ((x>>7) & 0x00000001)
  220. #define GET_WRAP_CH_REQ(x) ((x>>8) & 0x00000001)
  221. #define GET_AG_WRAP_W(x) ((x>>9) & 0x00000001)
  222. #define GET_AG_WRAP_REQ(x) ((x>>10) & 0x00000001)
  223. #define GET_WRAP_FSM(x) ((x>>11) & 0x0000000f)
  224. #define GET_HARB_WRAP_WDATA(x) ((x>>0) & 0x0000ffff)
  225. #define GET_HARB_WRAP_ADR(x) ((x>>16) & 0x00007fff)
  226. #define GET_HARB_WRAP_REQ(x) ((x>>31) & 0x00000001)
  227. #define GET_HARB_DLE_EMPTY(x) ((x>>0) & 0x00000001)
  228. #define GET_HARB_DLE_FULL(x) ((x>>1) & 0x00000001)
  229. #define GET_HARB_VLD(x) ((x>>2) & 0x00000001)
  230. #define GET_HARB_DLE_OWN(x) ((x>>3) & 0x0000000f)
  231. #define GET_HARB_OWN(x) ((x>>7) & 0x0000000f)
  232. #define GET_HARB_DLE_RESTCNT(x) ((x>>11) & 0x0000000f)
  233. #define GET_AG_HARB_REQ(x) ((x>>15) & 0x000003ff)
  234. #define GET_HARB_WRAP_W(x) ((x>>25) & 0x00000001)
  235. #define GET_HARB_WRAP_REQ0(x) ((x>>26) & 0x00000001)
  236. #define GET_SPI_WDATA(x) ((x>>0) & 0x000000ff)
  237. #define GET_SPI_OP(x) ((x>>8) & 0x0000001f)
  238. #define GET_SPI_W(x) ((x>>13) & 0x00000001)
  239. #define GET_MAN_RDATA(x) ((x>>0) & 0x000000ff)
  240. #define GET_MAN_FSM(x) ((x>>8) & 0x00000007)
  241. #define GET_MAN_REQ(x) ((x>>11) & 0x00000001)
  242. #define GET_WACS0_WDATA(x) ((x>>0) & 0x0000ffff)
  243. #define GET_WACS0_ADR(x) ((x>>16) & 0x00007fff)
  244. #define GET_WACS0_WRITE(x) ((x>>31) & 0x00000001)
  245. #define GET_WACS0_RDATA(x) ((x>>0) & 0x0000ffff)
  246. #define GET_WACS0_FSM(x) ((x>>16) & 0x00000007)
  247. #define GET_WACS0_REQ(x) ((x>>19) & 0x00000001)
  248. #define GET_SYNC_IDLE0(x) ((x>>20) & 0x00000001)
  249. #define GET_INIT_DONE0(x) ((x>>21) & 0x00000001)
  250. #define GET_SYS_IDLE0(x) ((x>>22) & 0x00000001)
  251. #define GET_WACS0_FIFO_FILLCNT(x) ((x>>24) & 0x0000000f)
  252. #define GET_WACS0_FIFO_FREECNT(x) ((x>>28) & 0x0000000f)
  253. #define GET_WACS1_WDATA(x) ((x>>0) & 0x0000ffff)
  254. #define GET_WACS1_ADR(x) ((x>>16) & 0x00007fff)
  255. #define GET_WACS1_WRITE(x) ((x>>31) & 0x00000001)
  256. #define GET_WACS1_RDATA(x) ((x>>0) & 0x0000ffff)
  257. #define GET_WACS1_FSM(x) ((x>>16) & 0x00000007)
  258. #define GET_WACS1_REQ(x) ((x>>19) & 0x00000001)
  259. #define GET_SYNC_IDLE1(x) ((x>>20) & 0x00000001)
  260. #define GET_INIT_DONE1(x) ((x>>21) & 0x00000001)
  261. #define GET_SYS_IDLE1(x) ((x>>22) & 0x00000001)
  262. #define GET_WACS1_FIFO_FILLCNT(x) ((x>>24) & 0x0000000f)
  263. #define GET_WACS1_FIFO_FREECNT(x) ((x>>28) & 0x0000000f)
  264. #define GET_WACS2_WDATA(x) ((x>>0) & 0x0000ffff)
  265. #define GET_WACS2_ADR(x) ((x>>16) & 0x00007fff)
  266. #define GET_WACS2_WRITE(x) ((x>>31) & 0x00000001)
  267. #define GET_WACS2_RDATA(x) ((x>>0) & 0x0000ffff)
  268. #define GET_WACS2_FSM(x) ((x>>16) & 0x00000007)
  269. #define GET_WACS2_REQ(x) ((x>>19) & 0x00000001)
  270. #define GET_SYNC_IDLE2(x) ((x>>20) & 0x00000001)
  271. #define GET_INIT_DONE2(x) ((x>>21) & 0x00000001)
  272. #define GET_SYS_IDLE2(x) ((x>>22) & 0x00000001)
  273. #define GET_WACS2_FIFO_FILLCNT(x) ((x>>24) & 0x0000000f)
  274. #define GET_WACS2_FIFO_FREECNT(x) ((x>>28) & 0x0000000f)
  275. #define GET_WACS3_WDATA(x) ((x>>0) & 0x0000ffff)
  276. #define GET_WACS3_ADR(x) ((x>>16) & 0x00007fff)
  277. #define GET_WACS3_WRITE(x) ((x>>31) & 0x00000001)
  278. #define GET_WACS3_RDATA(x) ((x>>0) & 0x0000ffff)
  279. #define GET_WACS3_FSM(x) ((x>>16) & 0x00000007)
  280. #define GET_WACS3_REQ(x) ((x>>19) & 0x00000001)
  281. #define GET_SYNC_IDLE3(x) ((x>>20) & 0x00000001)
  282. #define GET_INIT_DONE3(x) ((x>>21) & 0x00000001)
  283. #define GET_SYS_IDLE3(x) ((x>>22) & 0x00000001)
  284. #define GET_WACS3_FIFO_FILLCNT(x) ((x>>24) & 0x0000000f)
  285. #define GET_WACS3_FIFO_FREECNT(x) ((x>>28) & 0x0000000f)
  286. #define GET_PWRAP_GPS_ACK(x) ((x>>0) & 0x00000001)
  287. #define GET_GPS_PWRAP_REQ(x) ((x>>1) & 0x00000001)
  288. #define GET_GPSINF_DLE_CNT(x) ((x>>4) & 0x00000003)
  289. #define GET_GPSINF_ALE_CNT(x) ((x>>6) & 0x00000003)
  290. #define GET_GPS_INF_FSM(x) ((x>>8) & 0x00000007)
  291. #define GET_PWRAP_GPS_WDATA(x) ((x>>17) & 0x00007fff)
  292. #define GET_PWRAP_MD_ADC_NORM_DATA(x) ((x>>0) & 0x0000ffff)
  293. #define GET_PWRAP_MD_ADC_INIT_DATA(x) ((x>>16) & 0x0000ffff)
  294. #define GET_BUF_MD_ADC_RDATA(x) ((x>>0) & 0x0000ffff)
  295. #define GET_MD_ADC_BUF_WDATA(x) ((x>>16) & 0x0000ffff)
  296. #endif
  297. /* Macros */
  298. #define ENABLE 1
  299. #define DISABLE 0
  300. #define DISABLE_ALL 0
  301. /* #define PWRAP_ENABLE_DCM WRAP_WR32(PMIC_WRAP_DCM_EN, ENABLE) */
  302. /* #define PWRAP_DISABLE_DCM WRAP_WR32(PMIC_WRAP_DCM_EN, DISABLE) */
  303. /* #define PWRAP_DISABLE_DCM_DBC_PRD WRAP_WR32(PMIC_WRAP_DCM_DBC_PRD, DISABLE) */
  304. /* #define PWRAP_SET_DCM_DBC_PRD(x) WRAP_WR32(PMIC_WRAP_DCM_DBC_PRD, x) */
  305. /* */
  306. /* #define PWRAP_ENABLE WRAP_WR32(PMIC_WRAP_WRAP_EN,ENABLE) //enable wrap */
  307. /* #define PWRAP_DISABLE WRAP_WR32(PMIC_WRAP_WRAP_EN,DISABLE) //disable wrap */
  308. /* HIPRIS_ARB */
  309. #define MDINF (1 << 0)
  310. #define WACS0 (1 << 1)
  311. #define WACS1 (1 << 2)
  312. #if defined(CONFIG_ARCH_MT6735M)
  313. #define WACS2 (1 << 4)
  314. #else
  315. #define WACS2 (1 << 5)
  316. #endif
  317. #define DVFSINF (1 << 3)
  318. #define STAUPD (1 << 5)
  319. #define GPSINF (1 << 6)
  320. /* #define PWRAP_HIPRIO_ARB_EN(x) WRAP_WR32(PMIC_WRAP_HIPRIO_ARB_EN,x)//need read back reg */
  321. /* #define PWRAP_ENABLE_WACS2 WRAP_WR32(PMIC_WRAP_WACS2_EN,ENABLE) */
  322. /* MUX SEL */
  323. #define WRAPPER_MODE 0
  324. #define MANUAL_MODE 1
  325. /* OP TYPE */
  326. #define OP_TYPE_CK 0 /* for MT6323 */
  327. #define OP_TYPE_CSL 1 /* for MT6320 */
  328. #define MSB 1 /* for MT6323 */
  329. #define LSB 0 /* for MT6320 */
  330. /* SIG mode */
  331. #define CHECK_CRC 0
  332. #define CHECK_SIG 1
  333. /* macro for staupd sta fsm */
  334. #define STAUPD_FSM_IDLE (0x00)
  335. #define STAUPD_FSM_REQ (0x02)
  336. #define STAUPD_FSM_WFDLE (0x04) /* wait for dle,wait for read data done, */
  337. /* macro for WRAP_STA FSM */
  338. /* #define WRAP_STA_FSM_IDLE (0x00) */
  339. /* #define WRAP_STA_IDLE (0x00) */
  340. /* macro for MAN_RDATA FSM */
  341. #define MAN_FSM_NO_REQ (0x00)
  342. #define MAN_FSM_IDLE (0x00)
  343. #define MAN_FSM_REQ (0x02)
  344. #define MAN_FSM_WFDLE (0x04) /* wait for dle,wait for read data done, */
  345. #define MAN_FSM_WFVLDCLR (0x06)
  346. /* macro for WACS_FSM */
  347. #define WACS_FSM_IDLE (0x00)
  348. #define WACS_FSM_REQ (0x02)
  349. #define WACS_FSM_WFDLE (0x04) /* wait for dle,wait for read data done, */
  350. #define WACS_FSM_WFVLDCLR (0x06) /* finish read data , wait for valid flag clearing */
  351. #define WACS_INIT_DONE (0x01)
  352. #define WACS_SYNC_IDLE (0x01)
  353. #define WACS_SYNC_BUSY (0x00)
  354. /* -----macro for regsister@PMIC ------------------------------------------------- */
  355. #define SWCHR_REG_BASE (0x8000)
  356. #define MT6332_DEW_DIO_EN ((SWCHR_REG_BASE+0x00F6))
  357. #define MT6332_DEW_READ_TEST ((SWCHR_REG_BASE+0x00F8))
  358. #define MT6332_DEW_WRITE_TEST ((SWCHR_REG_BASE+0x00FA))
  359. #define MT6332_DEW_CRC_SWRST ((SWCHR_REG_BASE+0x00FC))
  360. #define MT6332_DEW_CRC_EN ((SWCHR_REG_BASE+0x00FE))
  361. #define MT6332_DEW_CRC_VAL ((SWCHR_REG_BASE+0x0100))
  362. #define MT6332_DEW_DBG_MON_SEL ((SWCHR_REG_BASE+0x0102))
  363. #define MT6332_DEW_CIPHER_KEY_SEL ((SWCHR_REG_BASE+0x0104))
  364. #define MT6332_DEW_CIPHER_IV_SEL ((SWCHR_REG_BASE+0x0106))
  365. #define MT6332_DEW_CIPHER_EN ((SWCHR_REG_BASE+0x0108))
  366. #define MT6332_DEW_CIPHER_RDY ((SWCHR_REG_BASE+0x010A))
  367. #define MT6332_DEW_CIPHER_MODE ((SWCHR_REG_BASE+0x010C))
  368. #define MT6332_DEW_CIPHER_SWRST ((SWCHR_REG_BASE+0x010E))
  369. #define MT6332_DEW_RDDMY_NO ((SWCHR_REG_BASE+0x0110))
  370. /*
  371. #define MT6328_PMIC_REG_BASE (0x0000)
  372. #define MT6328_DEW_DIO_EN ((unsigned int)(MT6328_PMIC_REG_BASE+0x02D4))
  373. #define MT6328_DEW_READ_TEST ((unsigned int)(MT6328_PMIC_REG_BASE+0x02D6))
  374. #define MT6328_DEW_WRITE_TEST ((unsigned int)(MT6328_PMIC_REG_BASE+0x02D8))
  375. #define MT6328_DEW_CRC_SWRST ((unsigned int)(MT6328_PMIC_REG_BASE+0x02DA))
  376. #define MT6328_DEW_CRC_EN ((unsigned int)(MT6328_PMIC_REG_BASE+0x02DC))
  377. #define MT6328_DEW_CRC_VAL ((unsigned int)(MT6328_PMIC_REG_BASE+0x02DE))
  378. #define MT6328_DEW_DBG_MON_SEL ((unsigned int)(MT6328_PMIC_REG_BASE+0x02E0))
  379. #define MT6328_DEW_CIPHER_KEY_SEL ((unsigned int)(MT6328_PMIC_REG_BASE+0x02E2))
  380. #define MT6328_DEW_CIPHER_IV_SEL ((unsigned int)(MT6328_PMIC_REG_BASE+0x02E4))
  381. #define MT6328_DEW_CIPHER_EN ((unsigned int)(MT6328_PMIC_REG_BASE+0x02E6))
  382. #define MT6328_DEW_CIPHER_RDY ((unsigned int)(MT6328_PMIC_REG_BASE+0x02E8))
  383. #define MT6328_DEW_CIPHER_MODE ((unsigned int)(MT6328_PMIC_REG_BASE+0x02EA))
  384. #define MT6328_DEW_CIPHER_SWRST ((unsigned int)(MT6328_PMIC_REG_BASE+0x02EC))
  385. #define MT6328_DEW_RDDMY_NO ((unsigned int)(MT6328_PMIC_REG_BASE+0x02EE))
  386. */
  387. #define MT6328_PMIC_REG_BASE (0x0000)
  388. #define MT6328_STRUP_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0000))
  389. #define MT6328_STRUP_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0002))
  390. #define MT6328_STRUP_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0004))
  391. #define MT6328_STRUP_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0006))
  392. #define MT6328_STRUP_CON5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0008))
  393. #define MT6328_STRUP_CON6 ((unsigned int)(MT6328_PMIC_REG_BASE+0x000A))
  394. #define MT6328_STRUP_CON7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x000C))
  395. #define MT6328_STRUP_CON8 ((unsigned int)(MT6328_PMIC_REG_BASE+0x000E))
  396. #define MT6328_STRUP_CON9 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0010))
  397. #define MT6328_STRUP_CON10 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0012))
  398. #define MT6328_STRUP_CON11 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0014))
  399. #define MT6328_STRUP_CON12 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0016))
  400. #define MT6328_STRUP_CON13 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0018))
  401. #define MT6328_STRUP_CON14 ((unsigned int)(MT6328_PMIC_REG_BASE+0x001A))
  402. #define MT6328_STRUP_CON15 ((unsigned int)(MT6328_PMIC_REG_BASE+0x001C))
  403. #define MT6328_STRUP_CON16 ((unsigned int)(MT6328_PMIC_REG_BASE+0x001E))
  404. #define MT6328_STRUP_CON17 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0020))
  405. #define MT6328_STRUP_CON18 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0022))
  406. #define MT6328_STRUP_CON19 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0024))
  407. #define MT6328_STRUP_CON20 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0026))
  408. #define MT6328_STRUP_CON21 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0028))
  409. #define MT6328_STRUP_CON22 ((unsigned int)(MT6328_PMIC_REG_BASE+0x002A))
  410. #define MT6328_STRUP_CON23 ((unsigned int)(MT6328_PMIC_REG_BASE+0x002C))
  411. #define MT6328_STRUP_CON24 ((unsigned int)(MT6328_PMIC_REG_BASE+0x002E))
  412. #define MT6328_STRUP_CON25 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0030))
  413. #define MT6328_STRUP_CON26 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0032))
  414. #define MT6328_STRUP_CON27 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0034))
  415. #define MT6328_STRUP_CON28 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0036))
  416. #define MT6328_STRUP_CON29 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0038))
  417. #define MT6328_STRUP_CON30 ((unsigned int)(MT6328_PMIC_REG_BASE+0x003A))
  418. #define MT6328_STRUP_CON31 ((unsigned int)(MT6328_PMIC_REG_BASE+0x003C))
  419. #define MT6328_STRUP_CON32 ((unsigned int)(MT6328_PMIC_REG_BASE+0x003E))
  420. #define MT6328_STRUP_ANA_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0040))
  421. #define MT6328_HWCID ((unsigned int)(MT6328_PMIC_REG_BASE+0x0200))
  422. #define MT6328_SWCID ((unsigned int)(MT6328_PMIC_REG_BASE+0x0202))
  423. #define MT6328_TOP_CON ((unsigned int)(MT6328_PMIC_REG_BASE+0x0204))
  424. #define MT6328_TEST_OUT ((unsigned int)(MT6328_PMIC_REG_BASE+0x0206))
  425. #define MT6328_TEST_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0208))
  426. #define MT6328_TEST_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x020A))
  427. #define MT6328_TESTMODE_SW ((unsigned int)(MT6328_PMIC_REG_BASE+0x020C))
  428. #define MT6328_EN_STATUS0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x020E))
  429. #define MT6328_EN_STATUS1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0210))
  430. #define MT6328_EN_STATUS2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0212))
  431. #define MT6328_OCSTATUS0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0214))
  432. #define MT6328_OCSTATUS1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0216))
  433. #define MT6328_OCSTATUS2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0218))
  434. #define MT6328_PGDEBSTATUS ((unsigned int)(MT6328_PMIC_REG_BASE+0x021A))
  435. #define MT6328_PGSTATUS ((unsigned int)(MT6328_PMIC_REG_BASE+0x021C))
  436. #define MT6328_THERMALSTATUS ((unsigned int)(MT6328_PMIC_REG_BASE+0x021E))
  437. #define MT6328_TOPSTATUS ((unsigned int)(MT6328_PMIC_REG_BASE+0x0220))
  438. #define MT6328_TDSEL_CON ((unsigned int)(MT6328_PMIC_REG_BASE+0x0222))
  439. #define MT6328_RDSEL_CON ((unsigned int)(MT6328_PMIC_REG_BASE+0x0224))
  440. #define MT6328_SMT_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0226))
  441. #define MT6328_SMT_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0228))
  442. #define MT6328_SMT_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x022A))
  443. #define MT6328_DRV_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x022C))
  444. #define MT6328_DRV_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x022E))
  445. #define MT6328_DRV_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0230))
  446. #define MT6328_DRV_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0232))
  447. #define MT6328_TOP_STATUS ((unsigned int)(MT6328_PMIC_REG_BASE+0x0234))
  448. #define MT6328_TOP_STATUS_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x0236))
  449. #define MT6328_TOP_STATUS_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x0238))
  450. #define MT6328_RGS_ANA_MON ((unsigned int)(MT6328_PMIC_REG_BASE+0x023A))
  451. #define MT6328_TOP_CKPDN_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x023C))
  452. #define MT6328_TOP_CKPDN_CON0_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x023E))
  453. #define MT6328_TOP_CKPDN_CON0_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x0240))
  454. #define MT6328_TOP_CKPDN_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0242))
  455. #define MT6328_TOP_CKPDN_CON1_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x0244))
  456. #define MT6328_TOP_CKPDN_CON1_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x0246))
  457. #define MT6328_TOP_CKPDN_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0248))
  458. #define MT6328_TOP_CKPDN_CON2_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x024A))
  459. #define MT6328_TOP_CKPDN_CON2_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x024C))
  460. #define MT6328_TOP_CKPDN_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x024E))
  461. #define MT6328_TOP_CKPDN_CON3_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x0250))
  462. #define MT6328_TOP_CKPDN_CON3_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x0252))
  463. #define MT6328_TOP_CKPDN_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0254))
  464. #define MT6328_TOP_CKPDN_CON4_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x0256))
  465. #define MT6328_TOP_CKPDN_CON4_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x0258))
  466. #define MT6328_TOP_CKSEL_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x025A))
  467. #define MT6328_TOP_CKSEL_CON0_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x025C))
  468. #define MT6328_TOP_CKSEL_CON0_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x025E))
  469. #define MT6328_TOP_CKSEL_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0260))
  470. #define MT6328_TOP_CKSEL_CON1_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x0262))
  471. #define MT6328_TOP_CKSEL_CON1_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x0264))
  472. #define MT6328_TOP_CKSEL_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0266))
  473. #define MT6328_TOP_CKSEL_CON2_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x0268))
  474. #define MT6328_TOP_CKSEL_CON2_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x026A))
  475. #define MT6328_TOP_CKDIVSEL_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x026C))
  476. #define MT6328_TOP_CKDIVSEL_CON0_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x026E))
  477. #define MT6328_TOP_CKDIVSEL_CON0_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x0270))
  478. #define MT6328_TOP_CKDIVSEL_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0272))
  479. #define MT6328_TOP_CKDIVSEL_CON1_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x0274))
  480. #define MT6328_TOP_CKDIVSEL_CON1_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x0276))
  481. #define MT6328_TOP_CKHWEN_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0278))
  482. #define MT6328_TOP_CKHWEN_CON0_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x027A))
  483. #define MT6328_TOP_CKHWEN_CON0_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x027C))
  484. #define MT6328_TOP_CKHWEN_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x027E))
  485. #define MT6328_TOP_CKHWEN_CON1_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x0280))
  486. #define MT6328_TOP_CKHWEN_CON1_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x0282))
  487. #define MT6328_TOP_CKTST_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0284))
  488. #define MT6328_TOP_CKTST_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0286))
  489. #define MT6328_TOP_CKTST_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0288))
  490. #define MT6328_TOP_CLKSQ ((unsigned int)(MT6328_PMIC_REG_BASE+0x028A))
  491. #define MT6328_TOP_CLKSQ_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x028C))
  492. #define MT6328_TOP_CLKSQ_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x028E))
  493. #define MT6328_TOP_CLKSQ_RTC ((unsigned int)(MT6328_PMIC_REG_BASE+0x0290))
  494. #define MT6328_TOP_CLKSQ_RTC_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x0292))
  495. #define MT6328_TOP_CLKSQ_RTC_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x0294))
  496. #define MT6328_TOP_CLK_TRIM ((unsigned int)(MT6328_PMIC_REG_BASE+0x0296))
  497. #define MT6328_TOP_RST_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0298))
  498. #define MT6328_TOP_RST_CON0_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x029A))
  499. #define MT6328_TOP_RST_CON0_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x029C))
  500. #define MT6328_TOP_RST_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x029E))
  501. #define MT6328_TOP_RST_MISC ((unsigned int)(MT6328_PMIC_REG_BASE+0x02A0))
  502. #define MT6328_TOP_RST_MISC_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x02A2))
  503. #define MT6328_TOP_RST_MISC_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x02A4))
  504. #define MT6328_TOP_RST_STATUS ((unsigned int)(MT6328_PMIC_REG_BASE+0x02A6))
  505. #define MT6328_TOP_RST_STATUS_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x02A8))
  506. #define MT6328_TOP_RST_STATUS_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x02AA))
  507. #define MT6328_INT_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x02AC))
  508. #define MT6328_INT_CON0_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x02AE))
  509. #define MT6328_INT_CON0_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x02B0))
  510. #define MT6328_INT_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x02B2))
  511. #define MT6328_INT_CON1_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x02B4))
  512. #define MT6328_INT_CON1_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x02B6))
  513. #define MT6328_INT_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x02B8))
  514. #define MT6328_INT_CON2_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x02BA))
  515. #define MT6328_INT_CON2_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x02BC))
  516. #define MT6328_INT_MISC_CON ((unsigned int)(MT6328_PMIC_REG_BASE+0x02BE))
  517. #define MT6328_INT_MISC_CON_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x02C0))
  518. #define MT6328_INT_MISC_CON_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x02C2))
  519. #define MT6328_INT_STATUS0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x02C4))
  520. #define MT6328_INT_STATUS1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x02C6))
  521. #define MT6328_INT_STATUS2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x02C8))
  522. #define MT6328_OC_GEAR_0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x02CA))
  523. #define MT6328_FQMTR_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x02CC))
  524. #define MT6328_FQMTR_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x02CE))
  525. #define MT6328_FQMTR_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x02D0))
  526. #define MT6328_RG_SPI_CON ((unsigned int)(MT6328_PMIC_REG_BASE+0x02D2))
  527. #define MT6328_DEW_DIO_EN ((unsigned int)(MT6328_PMIC_REG_BASE+0x02D4))
  528. #define MT6328_DEW_READ_TEST ((unsigned int)(MT6328_PMIC_REG_BASE+0x02D6))
  529. #define MT6328_DEW_WRITE_TEST ((unsigned int)(MT6328_PMIC_REG_BASE+0x02D8))
  530. #define MT6328_DEW_CRC_SWRST ((unsigned int)(MT6328_PMIC_REG_BASE+0x02DA))
  531. #define MT6328_DEW_CRC_EN ((unsigned int)(MT6328_PMIC_REG_BASE+0x02DC))
  532. #define MT6328_DEW_CRC_VAL ((unsigned int)(MT6328_PMIC_REG_BASE+0x02DE))
  533. #define MT6328_DEW_DBG_MON_SEL ((unsigned int)(MT6328_PMIC_REG_BASE+0x02E0))
  534. #define MT6328_DEW_CIPHER_KEY_SEL ((unsigned int)(MT6328_PMIC_REG_BASE+0x02E2))
  535. #define MT6328_DEW_CIPHER_IV_SEL ((unsigned int)(MT6328_PMIC_REG_BASE+0x02E4))
  536. #define MT6328_DEW_CIPHER_EN ((unsigned int)(MT6328_PMIC_REG_BASE+0x02E6))
  537. #define MT6328_DEW_CIPHER_RDY ((unsigned int)(MT6328_PMIC_REG_BASE+0x02E8))
  538. #define MT6328_DEW_CIPHER_MODE ((unsigned int)(MT6328_PMIC_REG_BASE+0x02EA))
  539. #define MT6328_DEW_CIPHER_SWRST ((unsigned int)(MT6328_PMIC_REG_BASE+0x02EC))
  540. #define MT6328_DEW_RDDMY_NO ((unsigned int)(MT6328_PMIC_REG_BASE+0x02EE))
  541. #define MT6328_INT_TYPE_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x02F0))
  542. #define MT6328_INT_TYPE_CON0_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x02F2))
  543. #define MT6328_INT_TYPE_CON0_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x02F4))
  544. #define MT6328_INT_TYPE_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x02F6))
  545. #define MT6328_INT_TYPE_CON1_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x02F8))
  546. #define MT6328_INT_TYPE_CON1_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x02FA))
  547. #define MT6328_INT_TYPE_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x02FC))
  548. #define MT6328_INT_TYPE_CON2_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x02FE))
  549. #define MT6328_INT_TYPE_CON2_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x0300))
  550. #define MT6328_INT_STA ((unsigned int)(MT6328_PMIC_REG_BASE+0x0302))
  551. #define MT6328_BUCK_ALL_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0400))
  552. #define MT6328_BUCK_ALL_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0402))
  553. #define MT6328_BUCK_ALL_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0404))
  554. #define MT6328_BUCK_ALL_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0406))
  555. #define MT6328_BUCK_ALL_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0408))
  556. #define MT6328_BUCK_ALL_CON5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x040A))
  557. #define MT6328_BUCK_ALL_CON6 ((unsigned int)(MT6328_PMIC_REG_BASE+0x040C))
  558. #define MT6328_BUCK_ALL_CON9 ((unsigned int)(MT6328_PMIC_REG_BASE+0x040E))
  559. #define MT6328_BUCK_ALL_CON12 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0410))
  560. #define MT6328_BUCK_ALL_CON13 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0412))
  561. #define MT6328_BUCK_ALL_CON14 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0414))
  562. #define MT6328_BUCK_ALL_CON16 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0416))
  563. #define MT6328_BUCK_ALL_CON18 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0418))
  564. #define MT6328_BUCK_ALL_CON19 ((unsigned int)(MT6328_PMIC_REG_BASE+0x041A))
  565. #define MT6328_BUCK_ALL_CON20 ((unsigned int)(MT6328_PMIC_REG_BASE+0x041C))
  566. #define MT6328_BUCK_ALL_CON21 ((unsigned int)(MT6328_PMIC_REG_BASE+0x041E))
  567. #define MT6328_BUCK_ALL_CON22 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0420))
  568. #define MT6328_BUCK_ALL_CON23 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0422))
  569. #define MT6328_BUCK_ALL_CON24 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0424))
  570. #define MT6328_BUCK_ALL_CON25 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0426))
  571. #define MT6328_BUCK_ALL_CON26 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0428))
  572. #define MT6328_BUCK_ALL_CON27 ((unsigned int)(MT6328_PMIC_REG_BASE+0x042A))
  573. #define MT6328_BUCK_ALL_CON28 ((unsigned int)(MT6328_PMIC_REG_BASE+0x042C))
  574. #define MT6328_SMPS_TOP_ANA_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x042E))
  575. #define MT6328_SMPS_TOP_ANA_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0430))
  576. #define MT6328_SMPS_TOP_ANA_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0432))
  577. #define MT6328_SMPS_TOP_ANA_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0434))
  578. #define MT6328_SMPS_TOP_ANA_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0436))
  579. #define MT6328_SMPS_TOP_ANA_CON5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0438))
  580. #define MT6328_SMPS_TOP_ANA_CON6 ((unsigned int)(MT6328_PMIC_REG_BASE+0x043A))
  581. #define MT6328_SMPS_TOP_ANA_CON7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x043C))
  582. #define MT6328_SMPS_TOP_ANA_CON8 ((unsigned int)(MT6328_PMIC_REG_BASE+0x043E))
  583. #define MT6328_VCORE_ANA_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0440))
  584. #define MT6328_VCORE_ANA_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0442))
  585. #define MT6328_VCORE_ANA_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0444))
  586. #define MT6328_VCORE_ANA_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0446))
  587. #define MT6328_VCORE_ANA_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0448))
  588. #define MT6328_VSYS22_ANA_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x044A))
  589. #define MT6328_VSYS22_ANA_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x044C))
  590. #define MT6328_VSYS22_ANA_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x044E))
  591. #define MT6328_VSYS22_ANA_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0450))
  592. #define MT6328_VSYS22_ANA_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0452))
  593. #define MT6328_VPROC_ANA_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0454))
  594. #define MT6328_VPROC_ANA_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0456))
  595. #define MT6328_VPROC_ANA_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0458))
  596. #define MT6328_VPROC_ANA_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x045A))
  597. #define MT6328_VPROC_ANA_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x045C))
  598. #define MT6328_OSC32_ANA_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x045E))
  599. #define MT6328_OSC32_ANA_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0460))
  600. #define MT6328_VPA_ANA_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0462))
  601. #define MT6328_VPA_ANA_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0464))
  602. #define MT6328_VPA_ANA_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0466))
  603. #define MT6328_VPA_ANA_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0468))
  604. #define MT6328_VLTE_ANA_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x046A))
  605. #define MT6328_VLTE_ANA_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x046C))
  606. #define MT6328_VLTE_ANA_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x046E))
  607. #define MT6328_VLTE_ANA_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0470))
  608. #define MT6328_VLTE_ANA_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0472))
  609. #define MT6328_VPROC_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0474))
  610. #define MT6328_VPROC_CON7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0482))
  611. #define MT6328_VPROC_CON8 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0484))
  612. #define MT6328_VPROC_CON9 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0486))
  613. #define MT6328_VPROC_CON10 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0488))
  614. #define MT6328_VPROC_CON11 ((unsigned int)(MT6328_PMIC_REG_BASE+0x048A))
  615. #define MT6328_VPROC_CON12 ((unsigned int)(MT6328_PMIC_REG_BASE+0x048C))
  616. #define MT6328_VPROC_CON13 ((unsigned int)(MT6328_PMIC_REG_BASE+0x048E))
  617. #define MT6328_VPROC_CON14 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0490))
  618. #define MT6328_VPROC_CON15 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0492))
  619. #define MT6328_VPROC_CON16 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0494))
  620. #define MT6328_VPROC_CON17 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0496))
  621. #define MT6328_VPROC_CON18 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0498))
  622. #define MT6328_VPROC_CON19 ((unsigned int)(MT6328_PMIC_REG_BASE+0x049A))
  623. #define MT6328_VSRAM_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x049C))
  624. #define MT6328_VSRAM_CON7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04AA))
  625. #define MT6328_VSRAM_CON8 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04AC))
  626. #define MT6328_VSRAM_CON9 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04AE))
  627. #define MT6328_VSRAM_CON10 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04B0))
  628. #define MT6328_VSRAM_CON11 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04B2))
  629. #define MT6328_VSRAM_CON12 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04B4))
  630. #define MT6328_VSRAM_CON13 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04B6))
  631. #define MT6328_VSRAM_CON14 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04B8))
  632. #define MT6328_VSRAM_CON18 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04C0))
  633. #define MT6328_VSRAM_CON19 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04C2))
  634. #define MT6328_VLTE_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04C4))
  635. #define MT6328_VLTE_CON7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04D2))
  636. #define MT6328_VLTE_CON8 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04D4))
  637. #define MT6328_VLTE_CON9 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04D6))
  638. #define MT6328_VLTE_CON10 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04D8))
  639. #define MT6328_VLTE_CON11 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04DA))
  640. #define MT6328_VLTE_CON12 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04DC))
  641. #define MT6328_VLTE_CON13 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04DE))
  642. #define MT6328_VLTE_CON14 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04E0))
  643. #define MT6328_VLTE_CON15 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04E2))
  644. #define MT6328_VLTE_CON16 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04E4))
  645. #define MT6328_VLTE_CON17 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04E6))
  646. #define MT6328_VLTE_CON18 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04E8))
  647. #define MT6328_VLTE_CON19 ((unsigned int)(MT6328_PMIC_REG_BASE+0x04EA))
  648. #define MT6328_VCORE1_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0600))
  649. #define MT6328_VCORE1_CON7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x060E))
  650. #define MT6328_VCORE1_CON8 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0610))
  651. #define MT6328_VCORE1_CON9 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0612))
  652. #define MT6328_VCORE1_CON10 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0614))
  653. #define MT6328_VCORE1_CON11 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0616))
  654. #define MT6328_VCORE1_CON12 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0618))
  655. #define MT6328_VCORE1_CON13 ((unsigned int)(MT6328_PMIC_REG_BASE+0x061A))
  656. #define MT6328_VCORE1_CON14 ((unsigned int)(MT6328_PMIC_REG_BASE+0x061C))
  657. #define MT6328_VCORE1_CON15 ((unsigned int)(MT6328_PMIC_REG_BASE+0x061E))
  658. #define MT6328_VCORE1_CON16 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0620))
  659. #define MT6328_VCORE1_CON17 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0622))
  660. #define MT6328_VCORE1_CON18 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0624))
  661. #define MT6328_VCORE1_CON19 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0626))
  662. #define MT6328_VSYS22_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0628))
  663. #define MT6328_VSYS22_CON7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0636))
  664. #define MT6328_VSYS22_CON8 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0638))
  665. #define MT6328_VSYS22_CON9 ((unsigned int)(MT6328_PMIC_REG_BASE+0x063A))
  666. #define MT6328_VSYS22_CON10 ((unsigned int)(MT6328_PMIC_REG_BASE+0x063C))
  667. #define MT6328_VSYS22_CON11 ((unsigned int)(MT6328_PMIC_REG_BASE+0x063E))
  668. #define MT6328_VSYS22_CON12 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0640))
  669. #define MT6328_VSYS22_CON13 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0642))
  670. #define MT6328_VSYS22_CON14 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0644))
  671. #define MT6328_VSYS22_CON15 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0646))
  672. #define MT6328_VSYS22_CON16 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0648))
  673. #define MT6328_VSYS22_CON17 ((unsigned int)(MT6328_PMIC_REG_BASE+0x064A))
  674. #define MT6328_VSYS22_CON18 ((unsigned int)(MT6328_PMIC_REG_BASE+0x064C))
  675. #define MT6328_VSYS22_CON19 ((unsigned int)(MT6328_PMIC_REG_BASE+0x064E))
  676. #define MT6328_VPA_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0650))
  677. #define MT6328_VPA_CON7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x065E))
  678. #define MT6328_VPA_CON8 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0660))
  679. #define MT6328_VPA_CON9 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0662))
  680. #define MT6328_VPA_CON10 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0664))
  681. #define MT6328_VPA_CON11 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0666))
  682. #define MT6328_VPA_CON12 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0668))
  683. #define MT6328_VPA_CON13 ((unsigned int)(MT6328_PMIC_REG_BASE+0x066A))
  684. #define MT6328_VPA_CON14 ((unsigned int)(MT6328_PMIC_REG_BASE+0x066C))
  685. #define MT6328_VPA_CON15 ((unsigned int)(MT6328_PMIC_REG_BASE+0x066E))
  686. #define MT6328_VPA_CON16 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0670))
  687. #define MT6328_VPA_CON17 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0672))
  688. #define MT6328_VPA_CON18 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0674))
  689. #define MT6328_VPA_CON19 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0676))
  690. #define MT6328_VPA_CON20 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0678))
  691. #define MT6328_VPA_CON21 ((unsigned int)(MT6328_PMIC_REG_BASE+0x067A))
  692. #define MT6328_VPA_CON22 ((unsigned int)(MT6328_PMIC_REG_BASE+0x067C))
  693. #define MT6328_VPA_CON23 ((unsigned int)(MT6328_PMIC_REG_BASE+0x067E))
  694. #define MT6328_VPA_CON24 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0680))
  695. #define MT6328_BUCK_K_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0682))
  696. #define MT6328_BUCK_K_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0684))
  697. #define MT6328_BUCK_K_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0686))
  698. #define MT6328_BUCK_K_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0688))
  699. #define MT6328_ZCD_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0800))
  700. #define MT6328_ZCD_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0802))
  701. #define MT6328_ZCD_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0804))
  702. #define MT6328_ZCD_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0806))
  703. #define MT6328_ZCD_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0808))
  704. #define MT6328_ZCD_CON5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x080A))
  705. #define MT6328_ISINK0_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x080C))
  706. #define MT6328_ISINK0_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x080E))
  707. #define MT6328_ISINK0_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0810))
  708. #define MT6328_ISINK0_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0812))
  709. #define MT6328_ISINK1_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0814))
  710. #define MT6328_ISINK1_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0816))
  711. #define MT6328_ISINK1_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0818))
  712. #define MT6328_ISINK1_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x081A))
  713. #define MT6328_ISINK2_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x081C))
  714. #define MT6328_ISINK3_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x081E))
  715. #define MT6328_ISINK_ANA0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0820))
  716. #define MT6328_ISINK_ANA1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0822))
  717. #define MT6328_ISINK_PHASE_DLY ((unsigned int)(MT6328_PMIC_REG_BASE+0x0824))
  718. #define MT6328_ISINK_SFSTR ((unsigned int)(MT6328_PMIC_REG_BASE+0x0826))
  719. #define MT6328_ISINK_EN_CTRL ((unsigned int)(MT6328_PMIC_REG_BASE+0x0828))
  720. #define MT6328_ISINK_MODE_CTRL ((unsigned int)(MT6328_PMIC_REG_BASE+0x082A))
  721. #define MT6328_VTCXO_0_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A00))
  722. #define MT6328_VTCXO_1_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A02))
  723. #define MT6328_VAUD28_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A04))
  724. #define MT6328_VAUX18_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A06))
  725. #define MT6328_VRF18_0_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A08))
  726. #define MT6328_VRF18_0_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A0A))
  727. #define MT6328_VCAMA_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A0C))
  728. #define MT6328_VCN28_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A0E))
  729. #define MT6328_VCN33_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A10))
  730. #define MT6328_VCN33_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A12))
  731. #define MT6328_VCN33_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A14))
  732. #define MT6328_VRF18_1_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A16))
  733. #define MT6328_VRF18_1_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A18))
  734. #define MT6328_VUSB33_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A1A))
  735. #define MT6328_VMCH_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A1C))
  736. #define MT6328_VMCH_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A1E))
  737. #define MT6328_VMC_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A20))
  738. #define MT6328_VMC_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A22))
  739. #define MT6328_VEMC_3V3_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A24))
  740. #define MT6328_VEMC_3V3_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A26))
  741. #define MT6328_VIO28_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A28))
  742. #define MT6328_VCAMAF_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A2A))
  743. #define MT6328_VGP1_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A2C))
  744. #define MT6328_VGP1_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A2E))
  745. #define MT6328_VEFUSE_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A30))
  746. #define MT6328_VSIM1_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A32))
  747. #define MT6328_VSIM2_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A34))
  748. #define MT6328_VIO18_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A36))
  749. #define MT6328_VIBR_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A38))
  750. #define MT6328_VCN18_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A3A))
  751. #define MT6328_VCAM_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A3C))
  752. #define MT6328_VCAMIO_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A3E))
  753. #define MT6328_LDO_VSRAM_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A40))
  754. #define MT6328_LDO_VSRAM_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A42))
  755. #define MT6328_VTREF_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A44))
  756. #define MT6328_VM_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A46))
  757. #define MT6328_VM_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A48))
  758. #define MT6328_VRTC_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A4A))
  759. #define MT6328_LDO_OCFB0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A4C))
  760. #define MT6328_ALDO_ANA_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A4E))
  761. #define MT6328_ADLDO_ANA_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A50))
  762. #define MT6328_ADLDO_ANA_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A52))
  763. #define MT6328_ADLDO_ANA_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A54))
  764. #define MT6328_ADLDO_ANA_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A56))
  765. #define MT6328_ADLDO_ANA_CON5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A58))
  766. #define MT6328_ADLDO_ANA_CON6 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A5A))
  767. #define MT6328_ADLDO_ANA_CON7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A5C))
  768. #define MT6328_ADLDO_ANA_CON8 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A5E))
  769. #define MT6328_ADLDO_ANA_CON9 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A60))
  770. #define MT6328_ADLDO_ANA_CON10 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A62))
  771. #define MT6328_ADLDO_ANA_CON11 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A64))
  772. #define MT6328_ADLDO_ANA_CON12 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A66))
  773. #define MT6328_ADLDO_ANA_CON13 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A68))
  774. #define MT6328_DLDO_ANA_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A6A))
  775. #define MT6328_DLDO_ANA_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A6C))
  776. #define MT6328_DLDO_ANA_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A6E))
  777. #define MT6328_DLDO_ANA_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A70))
  778. #define MT6328_DLDO_ANA_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A72))
  779. #define MT6328_DLDO_ANA_CON5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A74))
  780. #define MT6328_SLDO_ANA_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A76))
  781. #define MT6328_SLDO_ANA_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A78))
  782. #define MT6328_SLDO_ANA_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A7A))
  783. #define MT6328_SLDO_ANA_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A7C))
  784. #define MT6328_SLDO_ANA_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A7E))
  785. #define MT6328_SLDO_ANA_CON5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A80))
  786. #define MT6328_SLDO_ANA_CON6 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A82))
  787. #define MT6328_SLDO_ANA_CON7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A84))
  788. #define MT6328_SLDO_ANA_CON8 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A86))
  789. #define MT6328_SLDO_ANA_CON9 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A88))
  790. #define MT6328_SLDO_ANA_CON10 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A8A))
  791. #define MT6328_LDO_RSV_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A8C))
  792. #define MT6328_LDO_RSV_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A8E))
  793. #define MT6328_SPK_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A90))
  794. #define MT6328_SPK_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A92))
  795. #define MT6328_SPK_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A94))
  796. #define MT6328_SPK_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A96))
  797. #define MT6328_SPK_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A98))
  798. #define MT6328_SPK_CON5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A9A))
  799. #define MT6328_SPK_CON6 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A9C))
  800. #define MT6328_SPK_CON7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0A9E))
  801. #define MT6328_SPK_CON8 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0AA0))
  802. #define MT6328_SPK_CON9 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0AA2))
  803. #define MT6328_SPK_CON10 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0AA4))
  804. #define MT6328_SPK_CON11 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0AA6))
  805. #define MT6328_SPK_CON12 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0AA8))
  806. #define MT6328_SPK_CON13 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0AAA))
  807. #define MT6328_SPK_CON14 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0AAC))
  808. #define MT6328_SPK_CON15 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0AAE))
  809. #define MT6328_SPK_CON16 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0AB0))
  810. #define MT6328_SPK_ANA_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0AB2))
  811. #define MT6328_SPK_ANA_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0AB4))
  812. #define MT6328_SPK_ANA_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0AB6))
  813. #define MT6328_OTP_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C00))
  814. #define MT6328_OTP_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C02))
  815. #define MT6328_OTP_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C04))
  816. #define MT6328_OTP_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C06))
  817. #define MT6328_OTP_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C08))
  818. #define MT6328_OTP_CON5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C0A))
  819. #define MT6328_OTP_CON6 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C0C))
  820. #define MT6328_OTP_CON7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C0E))
  821. #define MT6328_OTP_CON8 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C10))
  822. #define MT6328_OTP_CON9 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C12))
  823. #define MT6328_OTP_CON10 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C14))
  824. #define MT6328_OTP_CON11 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C16))
  825. #define MT6328_OTP_CON12 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C18))
  826. #define MT6328_OTP_CON13 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C1A))
  827. #define MT6328_OTP_CON14 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C1C))
  828. #define MT6328_OTP_DOUT_0_15 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C1E))
  829. #define MT6328_OTP_DOUT_16_31 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C20))
  830. #define MT6328_OTP_DOUT_32_47 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C22))
  831. #define MT6328_OTP_DOUT_48_63 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C24))
  832. #define MT6328_OTP_DOUT_64_79 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C26))
  833. #define MT6328_OTP_DOUT_80_95 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C28))
  834. #define MT6328_OTP_DOUT_96_111 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C2A))
  835. #define MT6328_OTP_DOUT_112_127 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C2C))
  836. #define MT6328_OTP_DOUT_128_143 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C2E))
  837. #define MT6328_OTP_DOUT_144_159 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C30))
  838. #define MT6328_OTP_DOUT_160_175 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C32))
  839. #define MT6328_OTP_DOUT_176_191 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C34))
  840. #define MT6328_OTP_DOUT_192_207 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C36))
  841. #define MT6328_OTP_DOUT_208_223 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C38))
  842. #define MT6328_OTP_DOUT_224_239 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C3A))
  843. #define MT6328_OTP_DOUT_240_255 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C3C))
  844. #define MT6328_OTP_DOUT_256_271 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C3E))
  845. #define MT6328_OTP_DOUT_272_287 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C40))
  846. #define MT6328_OTP_DOUT_288_303 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C42))
  847. #define MT6328_OTP_DOUT_304_319 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C44))
  848. #define MT6328_OTP_DOUT_320_335 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C46))
  849. #define MT6328_OTP_DOUT_336_351 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C48))
  850. #define MT6328_OTP_DOUT_352_367 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C4A))
  851. #define MT6328_OTP_DOUT_368_383 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C4C))
  852. #define MT6328_OTP_DOUT_384_399 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C4E))
  853. #define MT6328_OTP_DOUT_400_415 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C50))
  854. #define MT6328_OTP_DOUT_416_431 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C52))
  855. #define MT6328_OTP_DOUT_432_447 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C54))
  856. #define MT6328_OTP_DOUT_448_463 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C56))
  857. #define MT6328_OTP_DOUT_464_479 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C58))
  858. #define MT6328_OTP_DOUT_480_495 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C5A))
  859. #define MT6328_OTP_DOUT_496_511 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C5C))
  860. #define MT6328_OTP_VAL_0_15 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C5E))
  861. #define MT6328_OTP_VAL_16_31 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C60))
  862. #define MT6328_OTP_VAL_32_47 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C62))
  863. #define MT6328_OTP_VAL_48_63 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C64))
  864. #define MT6328_OTP_VAL_64_79 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C66))
  865. #define MT6328_OTP_VAL_80_95 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C68))
  866. #define MT6328_OTP_VAL_96_111 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C6A))
  867. #define MT6328_OTP_VAL_112_127 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C6C))
  868. #define MT6328_OTP_VAL_128_143 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C6E))
  869. #define MT6328_OTP_VAL_144_159 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C70))
  870. #define MT6328_OTP_VAL_160_175 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C72))
  871. #define MT6328_OTP_VAL_176_191 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C74))
  872. #define MT6328_OTP_VAL_192_207 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C76))
  873. #define MT6328_OTP_VAL_208_223 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C78))
  874. #define MT6328_OTP_VAL_224_239 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C7A))
  875. #define MT6328_OTP_VAL_240_255 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C7C))
  876. #define MT6328_OTP_VAL_256_271 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C7E))
  877. #define MT6328_OTP_VAL_272_287 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C80))
  878. #define MT6328_OTP_VAL_288_303 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C82))
  879. #define MT6328_OTP_VAL_304_319 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C84))
  880. #define MT6328_OTP_VAL_320_335 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C86))
  881. #define MT6328_OTP_VAL_336_351 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C88))
  882. #define MT6328_OTP_VAL_352_367 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C8A))
  883. #define MT6328_OTP_VAL_368_383 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C8C))
  884. #define MT6328_OTP_VAL_384_399 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C8E))
  885. #define MT6328_OTP_VAL_400_415 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C90))
  886. #define MT6328_OTP_VAL_416_431 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C92))
  887. #define MT6328_OTP_VAL_432_447 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C94))
  888. #define MT6328_OTP_VAL_448_463 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C96))
  889. #define MT6328_OTP_VAL_464_479 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C98))
  890. #define MT6328_OTP_VAL_480_495 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C9A))
  891. #define MT6328_OTP_VAL_496_511 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C9C))
  892. #define MT6328_RTC_MIX_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0C9E))
  893. #define MT6328_RTC_MIX_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CA0))
  894. #define MT6328_RTC_MIX_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CA2))
  895. #define MT6328_FGADC_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CA4))
  896. #define MT6328_FGADC_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CA6))
  897. #define MT6328_FGADC_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CA8))
  898. #define MT6328_FGADC_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CAA))
  899. #define MT6328_FGADC_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CAC))
  900. #define MT6328_FGADC_CON5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CAE))
  901. #define MT6328_FGADC_CON6 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CB0))
  902. #define MT6328_FGADC_CON7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CB2))
  903. #define MT6328_FGADC_CON8 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CB4))
  904. #define MT6328_FGADC_CON9 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CB6))
  905. #define MT6328_FGADC_CON10 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CB8))
  906. #define MT6328_FGADC_CON11 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CBA))
  907. #define MT6328_FGADC_CON12 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CBC))
  908. #define MT6328_FGADC_CON13 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CBE))
  909. #define MT6328_FGADC_CON14 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CC0))
  910. #define MT6328_FGADC_CON15 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CC2))
  911. #define MT6328_FGADC_CON16 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CC4))
  912. #define MT6328_FGADC_CON17 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CC6))
  913. #define MT6328_FGADC_CON18 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CC8))
  914. #define MT6328_FGADC_CON19 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CCA))
  915. #define MT6328_FGADC_CON20 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CCC))
  916. #define MT6328_FGADC_CON21 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CCE))
  917. #define MT6328_FGADC_CON22 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CD0))
  918. #define MT6328_FGADC_CON23 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CD2))
  919. #define MT6328_FGADC_CON24 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CD4))
  920. #define MT6328_FGADC_CON25 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CD6))
  921. #define MT6328_FGADC_CON26 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CD8))
  922. #define MT6328_FGADC_CON27 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CDA))
  923. #define MT6328_AUDDEC_ANA_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CDC))
  924. #define MT6328_AUDDEC_ANA_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CDE))
  925. #define MT6328_AUDDEC_ANA_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CE0))
  926. #define MT6328_AUDDEC_ANA_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CE2))
  927. #define MT6328_AUDDEC_ANA_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CE4))
  928. #define MT6328_AUDDEC_ANA_CON5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CE6))
  929. #define MT6328_AUDDEC_ANA_CON6 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CE8))
  930. #define MT6328_AUDDEC_ANA_CON7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CEA))
  931. #define MT6328_AUDDEC_ANA_CON8 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CEC))
  932. #define MT6328_AUDENC_ANA_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CEE))
  933. #define MT6328_AUDENC_ANA_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CF0))
  934. #define MT6328_AUDENC_ANA_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CF2))
  935. #define MT6328_AUDENC_ANA_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CF4))
  936. #define MT6328_AUDENC_ANA_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CF6))
  937. #define MT6328_AUDENC_ANA_CON5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CF8))
  938. #define MT6328_AUDENC_ANA_CON6 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CFA))
  939. #define MT6328_AUDENC_ANA_CON7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CFC))
  940. #define MT6328_AUDENC_ANA_CON8 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0CFE))
  941. #define MT6328_AUDENC_ANA_CON9 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0D00))
  942. #define MT6328_AUDENC_ANA_CON10 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0D02))
  943. #define MT6328_AUDNCP_CLKDIV_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0D04))
  944. #define MT6328_AUDNCP_CLKDIV_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0D06))
  945. #define MT6328_AUDNCP_CLKDIV_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0D08))
  946. #define MT6328_AUDNCP_CLKDIV_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0D0A))
  947. #define MT6328_AUDNCP_CLKDIV_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0D0C))
  948. #define MT6328_AUXADC_ADC0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E00))
  949. #define MT6328_AUXADC_ADC1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E02))
  950. #define MT6328_AUXADC_ADC2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E04))
  951. #define MT6328_AUXADC_ADC3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E06))
  952. #define MT6328_AUXADC_ADC4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E08))
  953. #define MT6328_AUXADC_ADC5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E0A))
  954. #define MT6328_AUXADC_ADC6 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E0C))
  955. #define MT6328_AUXADC_ADC7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E0E))
  956. #define MT6328_AUXADC_ADC8 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E10))
  957. #define MT6328_AUXADC_ADC9 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E12))
  958. #define MT6328_AUXADC_ADC10 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E14))
  959. #define MT6328_AUXADC_ADC11 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E16))
  960. #define MT6328_AUXADC_ADC12 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E18))
  961. #define MT6328_AUXADC_ADC13 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E1A))
  962. #define MT6328_AUXADC_ADC14 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E1C))
  963. #define MT6328_AUXADC_ADC15 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E1E))
  964. #define MT6328_AUXADC_ADC16 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E20))
  965. #define MT6328_AUXADC_ADC17 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E22))
  966. #define MT6328_AUXADC_ADC18 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E24))
  967. #define MT6328_AUXADC_ADC19 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E26))
  968. #define MT6328_AUXADC_ADC20 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E28))
  969. #define MT6328_AUXADC_ADC21 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E2A))
  970. #define MT6328_AUXADC_ADC22 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E2C))
  971. #define MT6328_AUXADC_ADC23 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E2E))
  972. #define MT6328_AUXADC_ADC24 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E30))
  973. #define MT6328_AUXADC_ADC25 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E32))
  974. #define MT6328_AUXADC_ADC26 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E34))
  975. #define MT6328_AUXADC_ADC27 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E36))
  976. #define MT6328_AUXADC_ADC28 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E38))
  977. #define MT6328_AUXADC_ADC29 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E3A))
  978. #define MT6328_AUXADC_ADC30 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E3C))
  979. #define MT6328_AUXADC_ADC31 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E3E))
  980. #define MT6328_AUXADC_ADC32 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E40))
  981. #define MT6328_AUXADC_ADC33 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E42))
  982. #define MT6328_AUXADC_BUF0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E44))
  983. #define MT6328_AUXADC_BUF1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E46))
  984. #define MT6328_AUXADC_BUF2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E48))
  985. #define MT6328_AUXADC_BUF3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E4A))
  986. #define MT6328_AUXADC_BUF4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E4C))
  987. #define MT6328_AUXADC_BUF5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E4E))
  988. #define MT6328_AUXADC_BUF6 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E50))
  989. #define MT6328_AUXADC_BUF7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E52))
  990. #define MT6328_AUXADC_BUF8 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E54))
  991. #define MT6328_AUXADC_BUF9 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E56))
  992. #define MT6328_AUXADC_BUF10 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E58))
  993. #define MT6328_AUXADC_BUF11 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E5A))
  994. #define MT6328_AUXADC_BUF12 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E5C))
  995. #define MT6328_AUXADC_BUF13 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E5E))
  996. #define MT6328_AUXADC_BUF14 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E60))
  997. #define MT6328_AUXADC_BUF15 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E62))
  998. #define MT6328_AUXADC_BUF16 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E64))
  999. #define MT6328_AUXADC_BUF17 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E66))
  1000. #define MT6328_AUXADC_BUF18 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E68))
  1001. #define MT6328_AUXADC_BUF19 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E6A))
  1002. #define MT6328_AUXADC_BUF20 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E6C))
  1003. #define MT6328_AUXADC_BUF21 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E6E))
  1004. #define MT6328_AUXADC_BUF22 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E70))
  1005. #define MT6328_AUXADC_BUF23 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E72))
  1006. #define MT6328_AUXADC_BUF24 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E74))
  1007. #define MT6328_AUXADC_BUF25 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E76))
  1008. #define MT6328_AUXADC_BUF26 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E78))
  1009. #define MT6328_AUXADC_BUF27 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E7A))
  1010. #define MT6328_AUXADC_BUF28 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E7C))
  1011. #define MT6328_AUXADC_BUF29 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E7E))
  1012. #define MT6328_AUXADC_BUF30 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E80))
  1013. #define MT6328_AUXADC_BUF31 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E82))
  1014. #define MT6328_AUXADC_STA0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E84))
  1015. #define MT6328_AUXADC_STA1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E86))
  1016. #define MT6328_AUXADC_RQST0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E88))
  1017. #define MT6328_AUXADC_RQST0_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E8A))
  1018. #define MT6328_AUXADC_RQST0_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E8C))
  1019. #define MT6328_AUXADC_RQST1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E8E))
  1020. #define MT6328_AUXADC_RQST1_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E90))
  1021. #define MT6328_AUXADC_RQST1_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E92))
  1022. #define MT6328_AUXADC_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E94))
  1023. #define MT6328_AUXADC_CON0_SET ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E96))
  1024. #define MT6328_AUXADC_CON0_CLR ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E98))
  1025. #define MT6328_AUXADC_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E9A))
  1026. #define MT6328_AUXADC_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E9C))
  1027. #define MT6328_AUXADC_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0E9E))
  1028. #define MT6328_AUXADC_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EA0))
  1029. #define MT6328_AUXADC_CON5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EA2))
  1030. #define MT6328_AUXADC_CON6 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EA4))
  1031. #define MT6328_AUXADC_CON7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EA6))
  1032. #define MT6328_AUXADC_CON8 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EA8))
  1033. #define MT6328_AUXADC_CON9 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EAA))
  1034. #define MT6328_AUXADC_CON10 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EAC))
  1035. #define MT6328_AUXADC_CON11 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EAE))
  1036. #define MT6328_AUXADC_CON12 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EB0))
  1037. #define MT6328_AUXADC_CON13 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EB2))
  1038. #define MT6328_AUXADC_CON14 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EB4))
  1039. #define MT6328_AUXADC_CON15 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EB6))
  1040. #define MT6328_AUXADC_CON16 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EB8))
  1041. #define MT6328_AUXADC_AUTORPT0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EBA))
  1042. #define MT6328_AUXADC_LBAT0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EBC))
  1043. #define MT6328_AUXADC_LBAT1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EBE))
  1044. #define MT6328_AUXADC_LBAT2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EC0))
  1045. #define MT6328_AUXADC_LBAT3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EC2))
  1046. #define MT6328_AUXADC_LBAT4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EC4))
  1047. #define MT6328_AUXADC_LBAT5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EC6))
  1048. #define MT6328_AUXADC_LBAT6 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EC8))
  1049. #define MT6328_AUXADC_ACCDET ((unsigned int)(MT6328_PMIC_REG_BASE+0x0ECA))
  1050. #define MT6328_AUXADC_THR0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0ECC))
  1051. #define MT6328_AUXADC_THR1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0ECE))
  1052. #define MT6328_AUXADC_THR2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0ED0))
  1053. #define MT6328_AUXADC_THR3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0ED2))
  1054. #define MT6328_AUXADC_THR4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0ED4))
  1055. #define MT6328_AUXADC_THR5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0ED6))
  1056. #define MT6328_AUXADC_THR6 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0ED8))
  1057. #define MT6328_AUXADC_EFUSE0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EDA))
  1058. #define MT6328_AUXADC_EFUSE1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EDC))
  1059. #define MT6328_AUXADC_EFUSE2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EDE))
  1060. #define MT6328_AUXADC_EFUSE3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EE0))
  1061. #define MT6328_AUXADC_EFUSE4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EE2))
  1062. #define MT6328_AUXADC_EFUSE5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EE4))
  1063. #define MT6328_AUXADC_DBG0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EE6))
  1064. #define MT6328_AUXADC_IMP0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EE8))
  1065. #define MT6328_AUXADC_IMP1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EEA))
  1066. #define MT6328_AUXADC_VISMPS0_1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EEC))
  1067. #define MT6328_AUXADC_VISMPS0_2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EEE))
  1068. #define MT6328_AUXADC_VISMPS0_3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EF0))
  1069. #define MT6328_AUXADC_VISMPS0_4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EF2))
  1070. #define MT6328_AUXADC_VISMPS0_5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EF4))
  1071. #define MT6328_AUXADC_VISMPS0_6 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EF6))
  1072. #define MT6328_AUXADC_VISMPS0_7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EF8))
  1073. #define MT6328_AUXADC_LBAT2_1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EFA))
  1074. #define MT6328_AUXADC_LBAT2_2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EFC))
  1075. #define MT6328_AUXADC_LBAT2_3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0EFE))
  1076. #define MT6328_AUXADC_LBAT2_4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F00))
  1077. #define MT6328_AUXADC_LBAT2_5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F02))
  1078. #define MT6328_AUXADC_LBAT2_6 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F04))
  1079. #define MT6328_AUXADC_LBAT2_7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F06))
  1080. #define MT6328_AUXADC_MDBG_0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F08))
  1081. #define MT6328_AUXADC_MDBG_1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F0A))
  1082. #define MT6328_AUXADC_MDBG_2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F0C))
  1083. #define MT6328_AUXADC_MDRT_0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F0E))
  1084. #define MT6328_AUXADC_MDRT_1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F10))
  1085. #define MT6328_AUXADC_MDRT_2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F12))
  1086. #define MT6328_ACCDET_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F14))
  1087. #define MT6328_ACCDET_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F16))
  1088. #define MT6328_ACCDET_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F18))
  1089. #define MT6328_ACCDET_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F1A))
  1090. #define MT6328_ACCDET_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F1C))
  1091. #define MT6328_ACCDET_CON5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F1E))
  1092. #define MT6328_ACCDET_CON6 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F20))
  1093. #define MT6328_ACCDET_CON7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F22))
  1094. #define MT6328_ACCDET_CON8 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F24))
  1095. #define MT6328_ACCDET_CON9 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F26))
  1096. #define MT6328_ACCDET_CON10 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F28))
  1097. #define MT6328_ACCDET_CON11 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F2A))
  1098. #define MT6328_ACCDET_CON12 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F2C))
  1099. #define MT6328_ACCDET_CON13 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F2E))
  1100. #define MT6328_ACCDET_CON14 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F30))
  1101. #define MT6328_ACCDET_CON15 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F32))
  1102. #define MT6328_ACCDET_CON16 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F34))
  1103. #define MT6328_ACCDET_CON17 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F36))
  1104. #define MT6328_ACCDET_CON18 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F38))
  1105. #define MT6328_ACCDET_CON19 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F3A))
  1106. #define MT6328_ACCDET_CON20 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F3C))
  1107. #define MT6328_ACCDET_CON21 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F3E))
  1108. #define MT6328_ACCDET_CON22 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F40))
  1109. #define MT6328_ACCDET_CON23 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F42))
  1110. #define MT6328_ACCDET_CON24 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F44))
  1111. #define MT6328_ACCDET_CON25 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F46))
  1112. #define MT6328_CHR_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F48))
  1113. #define MT6328_CHR_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F4A))
  1114. #define MT6328_CHR_CON2 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F4C))
  1115. #define MT6328_CHR_CON3 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F4E))
  1116. #define MT6328_CHR_CON4 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F50))
  1117. #define MT6328_CHR_CON5 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F52))
  1118. #define MT6328_CHR_CON6 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F54))
  1119. #define MT6328_CHR_CON7 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F56))
  1120. #define MT6328_CHR_CON8 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F58))
  1121. #define MT6328_CHR_CON9 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F5A))
  1122. #define MT6328_CHR_CON10 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F5C))
  1123. #define MT6328_CHR_CON11 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F5E))
  1124. #define MT6328_CHR_CON12 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F60))
  1125. #define MT6328_CHR_CON13 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F62))
  1126. #define MT6328_CHR_CON14 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F64))
  1127. #define MT6328_CHR_CON15 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F66))
  1128. #define MT6328_CHR_CON16 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F68))
  1129. #define MT6328_CHR_CON17 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F6A))
  1130. #define MT6328_CHR_CON18 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F6C))
  1131. #define MT6328_CHR_CON19 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F6E))
  1132. #define MT6328_CHR_CON20 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F70))
  1133. #define MT6328_CHR_CON21 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F72))
  1134. #define MT6328_CHR_CON22 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F74))
  1135. #define MT6328_CHR_CON23 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F76))
  1136. #define MT6328_CHR_CON24 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F78))
  1137. #define MT6328_CHR_CON25 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F7A))
  1138. #define MT6328_CHR_CON26 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F7C))
  1139. #define MT6328_CHR_CON27 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F7E))
  1140. #define MT6328_CHR_CON28 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F80))
  1141. #define MT6328_CHR_CON29 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F82))
  1142. #define MT6328_CHR_CON30 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F84))
  1143. #define MT6328_CHR_CON31 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F86))
  1144. #define MT6328_CHR_CON32 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F88))
  1145. #define MT6328_CHR_CON33 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F8A))
  1146. #define MT6328_CHR_CON34 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F8C))
  1147. #define MT6328_CHR_CON35 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F8E))
  1148. #define MT6328_CHR_CON36 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F90))
  1149. #define MT6328_CHR_CON37 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F92))
  1150. #define MT6328_CHR_CON38 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F94))
  1151. #define MT6328_CHR_CON39 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F96))
  1152. #define MT6328_CHR_CON40 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F98))
  1153. #define MT6328_CHR_CON41 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F9A))
  1154. #define MT6328_CHR_CON42 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F9C))
  1155. #define MT6328_BATON_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0F9E))
  1156. #define MT6328_CHR_CON43 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0FA0))
  1157. #define MT6328_EOSC_CALI_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0FAA))
  1158. #define MT6328_EOSC_CALI_CON1 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0FAC))
  1159. #define MT6328_VRTC_PWM_CON0 ((unsigned int)(MT6328_PMIC_REG_BASE+0x0FAE))
  1160. /* -----PMIC_WRAP INT register for PMIC ------------------------------------------------- */
  1161. /* #define MT6328_INT_STA (PMIC_REG_BASE+0x01B4) //0x01B4 */
  1162. #define MT6328_INT_STA ((unsigned int)(MT6328_PMIC_REG_BASE+0x0302))
  1163. #define MT6332_INT_STA (SWCHR_REG_BASE+0x0112) /* 0x8112 */
  1164. /* ///////////////////////////////////////////////////////////////////////////////////////// */
  1165. /*
  1166. #define AUXADC_CON21 (PMIC_REG_BASE+0x076C)
  1167. #define AUXADC_ADC12 (PMIC_REG_BASE+0x072C)
  1168. #define AUXADC_ADC13 (PMIC_REG_BASE+0x072E)
  1169. #define AUXADC_ADC14 (PMIC_REG_BASE+0x0730)
  1170. #define AUXADC_CON2 (PMIC_REG_BASE+0x0746)
  1171. #define AUXADC_CON3 (PMIC_REG_BASE+0x0748)
  1172. #define EFUSE_VAL_0_15 (PMIC_REG_BASE+0x060E)
  1173. #define EFUSE_VAL_16_31 (PMIC_REG_BASE+0x0610)
  1174. #define EFUSE_VAL_32_47 (PMIC_REG_BASE+0x0612)
  1175. #define EFUSE_VAL_48_63 (PMIC_REG_BASE+0x0614)
  1176. #define EFUSE_VAL_64_79 (PMIC_REG_BASE+0x0616)
  1177. */
  1178. /* -----macro for dewrapper defaule value------------------------------------------------------- */
  1179. #define MT6328_DEFAULT_VALUE_READ_TEST 0x5aa5
  1180. #define WRITE_TEST_DEFAULT_VALUE 0x0
  1181. #define WRITE_TEST_EXT_DEFAULT_VALUE 0x0
  1182. #define MT6332_DEFAULT_VALUE_READ_TEST 0xa55a
  1183. #define MT6328_WRITE_TEST_VALUE 0x1234
  1184. #define MT6332_WRITE_TEST_VALUE 0x4321
  1185. #define WRAP_ACCESS_TEST_REG MT6328_DEW_WRITE_TEST
  1186. #define WRAP_ACCESS_TEST_EXT_REG MT6332_DEW_WRITE_TEST
  1187. /* -----macro for manual commnd -------------------------------------------------------- */
  1188. #define OP_WR (0x1)
  1189. #define OP_RD (0x0)
  1190. #define OP_CSH (0x0)
  1191. #define OP_CSL (0x1)
  1192. #define OP_CK (0x2)
  1193. #define OP_OUTS (0x8)
  1194. #define OP_OUTD (0x9)
  1195. #define OP_OUTQ (0xA)
  1196. #define OP_INS (0xC)
  1197. #define OP_INS0 (0xD)
  1198. #define OP_IND (0xE)
  1199. #define OP_INQ (0xF)
  1200. #define OP_OS2IS (0x10)
  1201. #define OP_OS2ID (0x11)
  1202. #define OP_OS2IQ (0x12)
  1203. #define OP_OD2IS (0x13)
  1204. #define OP_OD2ID (0x14)
  1205. #define OP_OD2IQ (0x15)
  1206. #define OP_OQ2IS (0x16)
  1207. #define OP_OQ2ID (0x17)
  1208. #define OP_OQ2IQ (0x18)
  1209. #define OP_OSNIS (0x19)
  1210. #define OP_ODNID (0x1A)
  1211. #define E_PWR_INVALID_ARG 1
  1212. #define E_PWR_INVALID_RW 2
  1213. #define E_PWR_INVALID_ADDR 3
  1214. #define E_PWR_INVALID_WDAT 4
  1215. #define E_PWR_INVALID_OP_MANUAL 5
  1216. #define E_PWR_NOT_IDLE_STATE 6
  1217. #define E_PWR_NOT_INIT_DONE 7
  1218. #define E_PWR_NOT_INIT_DONE_READ 8
  1219. #define E_PWR_WAIT_IDLE_TIMEOUT 9
  1220. #define E_PWR_WAIT_IDLE_TIMEOUT_READ 10
  1221. #define E_PWR_INIT_SIDLY_FAIL 11
  1222. #define E_PWR_RESET_TIMEOUT 12
  1223. #define E_PWR_TIMEOUT 13
  1224. #define E_PWR_INIT_RESET_SPI 20
  1225. #define E_PWR_INIT_SIDLY 21
  1226. #define E_PWR_INIT_REG_CLOCK 22
  1227. #define E_PWR_INIT_ENABLE_PMIC 23
  1228. #define E_PWR_INIT_DIO 24
  1229. #define E_PWR_INIT_CIPHER 25
  1230. #define E_PWR_INIT_WRITE_TEST 26
  1231. #define E_PWR_INIT_ENABLE_CRC 27
  1232. #define E_PWR_INIT_ENABLE_DEWRAP 28
  1233. #define E_PWR_READ_TEST_FAIL 30
  1234. #define E_PWR_WRITE_TEST_FAIL 31
  1235. #define E_PWR_SWITCH_DIO 32
  1236. /* -----macro for read/write register -------------------------------------------------------- */
  1237. /* #define WRAP_RD32(addr) (*(volatile u32 *)(addr)) */
  1238. /* #define WRAP_WR32(addr,data) ((*(volatile u32 *)(addr)) = (u32)data) */
  1239. /* #define WRAP_SET_BIT(BS,REG) ((*(volatile u32*)(REG)) |= (u32)(BS)) */
  1240. /* #define WRAP_CLR_BIT(BS,REG) ((*(volatile u32*)(REG)) &= ~((u32)(BS))) */
  1241. #define WRAP_RD32(addr) __raw_readl((void *)addr)
  1242. #define WRAP_WR32(addr, val) mt_reg_sync_writel((val), ((void *)addr))
  1243. #define WRAP_SET_BIT(BS, REG) mt_reg_sync_writel((__raw_readl((void *)REG) | (u32)(BS)), ((void *)REG))
  1244. #define WRAP_CLR_BIT(BS, REG) mt_reg_sync_writel((__raw_readl((void *)REG) & (~(u32)(BS))), ((void *)REG))
  1245. /* -----------------soft reset -------------------------------------------------------- */
  1246. #define INFRA_GLOBALCON_RST0 (INFRACFG_AO_REG_BASE+0x030)
  1247. #define INFRA_GLOBALCON_RST1 (INFRACFG_AO_REG_BASE+0x034)
  1248. #define PWRAP_SOFT_RESET WRAP_SET_BIT(1<<7, INFRA_GLOBALCON_RST0)
  1249. #define PWRAP_CLEAR_SOFT_RESET_BIT WRAP_CLR_BIT(1<<7, INFRA_GLOBALCON_RST1)
  1250. #define PERI_GLOBALCON_RST1 (PERICFG_BASE+0x004)
  1251. #endif /* __PMIC_WRAP_REGS_H__ */