registers.h 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108
  1. /*
  2. * registers.h - REGISTERS H for DA9062
  3. * Copyright (C) 2015 Dialog Semiconductor Ltd.
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License
  7. * as published by the Free Software Foundation; either version 2
  8. * of the License, or (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. */
  15. #ifndef __DA9062_H__
  16. #define __DA9062_H__
  17. #define DA9062_PMIC_DEVICE_ID 0x62
  18. #define DA9062_PMIC_VARIANT_MRC_AA 0x01
  19. #define DA9062_I2C_PAGE_SEL_SHIFT 1
  20. /*
  21. * Registers
  22. */
  23. #define DA9062AA_PAGE_CON 0x000
  24. #define DA9062AA_STATUS_A 0x001
  25. #define DA9062AA_STATUS_B 0x002
  26. #define DA9062AA_STATUS_D 0x004
  27. #define DA9062AA_FAULT_LOG 0x005
  28. #define DA9062AA_EVENT_A 0x006
  29. #define DA9062AA_EVENT_B 0x007
  30. #define DA9062AA_EVENT_C 0x008
  31. #define DA9062AA_IRQ_MASK_A 0x00A
  32. #define DA9062AA_IRQ_MASK_B 0x00B
  33. #define DA9062AA_IRQ_MASK_C 0x00C
  34. #define DA9062AA_CONTROL_A 0x00E
  35. #define DA9062AA_CONTROL_B 0x00F
  36. #define DA9062AA_CONTROL_C 0x010
  37. #define DA9062AA_CONTROL_D 0x011
  38. #define DA9062AA_CONTROL_E 0x012
  39. #define DA9062AA_CONTROL_F 0x013
  40. #define DA9062AA_PD_DIS 0x014
  41. #define DA9062AA_GPIO_0_1 0x015
  42. #define DA9062AA_GPIO_2_3 0x016
  43. #define DA9062AA_GPIO_4 0x017
  44. #define DA9062AA_GPIO_WKUP_MODE 0x01C
  45. #define DA9062AA_GPIO_MODE0_4 0x01D
  46. #define DA9062AA_GPIO_OUT0_2 0x01E
  47. #define DA9062AA_GPIO_OUT3_4 0x01F
  48. #define DA9062AA_BUCK2_CONT 0x020
  49. #define DA9062AA_BUCK1_CONT 0x021
  50. #define DA9062AA_BUCK4_CONT 0x022
  51. #define DA9062AA_BUCK3_CONT 0x024
  52. #define DA9062AA_LDO1_CONT 0x026
  53. #define DA9062AA_LDO2_CONT 0x027
  54. #define DA9062AA_LDO3_CONT 0x028
  55. #define DA9062AA_LDO4_CONT 0x029
  56. #define DA9062AA_DVC_1 0x032
  57. #define DA9062AA_COUNT_S 0x040
  58. #define DA9062AA_COUNT_MI 0x041
  59. #define DA9062AA_COUNT_H 0x042
  60. #define DA9062AA_COUNT_D 0x043
  61. #define DA9062AA_COUNT_MO 0x044
  62. #define DA9062AA_COUNT_Y 0x045
  63. #define DA9062AA_ALARM_S 0x046
  64. #define DA9062AA_ALARM_MI 0x047
  65. #define DA9062AA_ALARM_H 0x048
  66. #define DA9062AA_ALARM_D 0x049
  67. #define DA9062AA_ALARM_MO 0x04A
  68. #define DA9062AA_ALARM_Y 0x04B
  69. #define DA9062AA_SECOND_A 0x04C
  70. #define DA9062AA_SECOND_B 0x04D
  71. #define DA9062AA_SECOND_C 0x04E
  72. #define DA9062AA_SECOND_D 0x04F
  73. #define DA9062AA_SEQ 0x081
  74. #define DA9062AA_SEQ_TIMER 0x082
  75. #define DA9062AA_ID_2_1 0x083
  76. #define DA9062AA_ID_4_3 0x084
  77. #define DA9062AA_ID_12_11 0x088
  78. #define DA9062AA_ID_14_13 0x089
  79. #define DA9062AA_ID_16_15 0x08A
  80. #define DA9062AA_ID_22_21 0x08D
  81. #define DA9062AA_ID_24_23 0x08E
  82. #define DA9062AA_ID_26_25 0x08F
  83. #define DA9062AA_ID_28_27 0x090
  84. #define DA9062AA_ID_30_29 0x091
  85. #define DA9062AA_ID_32_31 0x092
  86. #define DA9062AA_SEQ_A 0x095
  87. #define DA9062AA_SEQ_B 0x096
  88. #define DA9062AA_WAIT 0x097
  89. #define DA9062AA_EN_32K 0x098
  90. #define DA9062AA_RESET 0x099
  91. #define DA9062AA_BUCK_ILIM_A 0x09A
  92. #define DA9062AA_BUCK_ILIM_B 0x09B
  93. #define DA9062AA_BUCK_ILIM_C 0x09C
  94. #define DA9062AA_BUCK2_CFG 0x09D
  95. #define DA9062AA_BUCK1_CFG 0x09E
  96. #define DA9062AA_BUCK4_CFG 0x09F
  97. #define DA9062AA_BUCK3_CFG 0x0A0
  98. #define DA9062AA_VBUCK2_A 0x0A3
  99. #define DA9062AA_VBUCK1_A 0x0A4
  100. #define DA9062AA_VBUCK4_A 0x0A5
  101. #define DA9062AA_VBUCK3_A 0x0A7
  102. #define DA9062AA_VLDO1_A 0x0A9
  103. #define DA9062AA_VLDO2_A 0x0AA
  104. #define DA9062AA_VLDO3_A 0x0AB
  105. #define DA9062AA_VLDO4_A 0x0AC
  106. #define DA9062AA_VBUCK2_B 0x0B4
  107. #define DA9062AA_VBUCK1_B 0x0B5
  108. #define DA9062AA_VBUCK4_B 0x0B6
  109. #define DA9062AA_VBUCK3_B 0x0B8
  110. #define DA9062AA_VLDO1_B 0x0BA
  111. #define DA9062AA_VLDO2_B 0x0BB
  112. #define DA9062AA_VLDO3_B 0x0BC
  113. #define DA9062AA_VLDO4_B 0x0BD
  114. #define DA9062AA_BBAT_CONT 0x0C5
  115. #define DA9062AA_INTERFACE 0x105
  116. #define DA9062AA_CONFIG_A 0x106
  117. #define DA9062AA_CONFIG_B 0x107
  118. #define DA9062AA_CONFIG_C 0x108
  119. #define DA9062AA_CONFIG_D 0x109
  120. #define DA9062AA_CONFIG_E 0x10A
  121. #define DA9062AA_CONFIG_G 0x10C
  122. #define DA9062AA_CONFIG_H 0x10D
  123. #define DA9062AA_CONFIG_I 0x10E
  124. #define DA9062AA_CONFIG_J 0x10F
  125. #define DA9062AA_CONFIG_K 0x110
  126. #define DA9062AA_CONFIG_M 0x112
  127. #define DA9062AA_TRIM_CLDR 0x120
  128. #define DA9062AA_GP_ID_0 0x121
  129. #define DA9062AA_GP_ID_1 0x122
  130. #define DA9062AA_GP_ID_2 0x123
  131. #define DA9062AA_GP_ID_3 0x124
  132. #define DA9062AA_GP_ID_4 0x125
  133. #define DA9062AA_GP_ID_5 0x126
  134. #define DA9062AA_GP_ID_6 0x127
  135. #define DA9062AA_GP_ID_7 0x128
  136. #define DA9062AA_GP_ID_8 0x129
  137. #define DA9062AA_GP_ID_9 0x12A
  138. #define DA9062AA_GP_ID_10 0x12B
  139. #define DA9062AA_GP_ID_11 0x12C
  140. #define DA9062AA_GP_ID_12 0x12D
  141. #define DA9062AA_GP_ID_13 0x12E
  142. #define DA9062AA_GP_ID_14 0x12F
  143. #define DA9062AA_GP_ID_15 0x130
  144. #define DA9062AA_GP_ID_16 0x131
  145. #define DA9062AA_GP_ID_17 0x132
  146. #define DA9062AA_GP_ID_18 0x133
  147. #define DA9062AA_GP_ID_19 0x134
  148. #define DA9062AA_DEVICE_ID 0x181
  149. #define DA9062AA_VARIANT_ID 0x182
  150. #define DA9062AA_CUSTOMER_ID 0x183
  151. #define DA9062AA_CONFIG_ID 0x184
  152. /*
  153. * Bit fields
  154. */
  155. /* DA9062AA_PAGE_CON = 0x000 */
  156. #define DA9062AA_PAGE_SHIFT 0
  157. #define DA9062AA_PAGE_MASK 0x3f
  158. #define DA9062AA_WRITE_MODE_SHIFT 6
  159. #define DA9062AA_WRITE_MODE_MASK BIT(6)
  160. #define DA9062AA_REVERT_SHIFT 7
  161. #define DA9062AA_REVERT_MASK BIT(7)
  162. /* DA9062AA_STATUS_A = 0x001 */
  163. #define DA9062AA_NONKEY_SHIFT 0
  164. #define DA9062AA_NONKEY_MASK 0x01
  165. #define DA9062AA_DVC_BUSY_SHIFT 2
  166. #define DA9062AA_DVC_BUSY_MASK BIT(2)
  167. /* DA9062AA_STATUS_B = 0x002 */
  168. #define DA9062AA_GPI0_SHIFT 0
  169. #define DA9062AA_GPI0_MASK 0x01
  170. #define DA9062AA_GPI1_SHIFT 1
  171. #define DA9062AA_GPI1_MASK BIT(1)
  172. #define DA9062AA_GPI2_SHIFT 2
  173. #define DA9062AA_GPI2_MASK BIT(2)
  174. #define DA9062AA_GPI3_SHIFT 3
  175. #define DA9062AA_GPI3_MASK BIT(3)
  176. #define DA9062AA_GPI4_SHIFT 4
  177. #define DA9062AA_GPI4_MASK BIT(4)
  178. /* DA9062AA_STATUS_D = 0x004 */
  179. #define DA9062AA_LDO1_ILIM_SHIFT 0
  180. #define DA9062AA_LDO1_ILIM_MASK 0x01
  181. #define DA9062AA_LDO2_ILIM_SHIFT 1
  182. #define DA9062AA_LDO2_ILIM_MASK BIT(1)
  183. #define DA9062AA_LDO3_ILIM_SHIFT 2
  184. #define DA9062AA_LDO3_ILIM_MASK BIT(2)
  185. #define DA9062AA_LDO4_ILIM_SHIFT 3
  186. #define DA9062AA_LDO4_ILIM_MASK BIT(3)
  187. /* DA9062AA_FAULT_LOG = 0x005 */
  188. #define DA9062AA_TWD_ERROR_SHIFT 0
  189. #define DA9062AA_TWD_ERROR_MASK 0x01
  190. #define DA9062AA_POR_SHIFT 1
  191. #define DA9062AA_POR_MASK BIT(1)
  192. #define DA9062AA_VDD_FAULT_SHIFT 2
  193. #define DA9062AA_VDD_FAULT_MASK BIT(2)
  194. #define DA9062AA_VDD_START_SHIFT 3
  195. #define DA9062AA_VDD_START_MASK BIT(3)
  196. #define DA9062AA_TEMP_CRIT_SHIFT 4
  197. #define DA9062AA_TEMP_CRIT_MASK BIT(4)
  198. #define DA9062AA_KEY_RESET_SHIFT 5
  199. #define DA9062AA_KEY_RESET_MASK BIT(5)
  200. #define DA9062AA_NSHUTDOWN_SHIFT 6
  201. #define DA9062AA_NSHUTDOWN_MASK BIT(6)
  202. #define DA9062AA_WAIT_SHUT_SHIFT 7
  203. #define DA9062AA_WAIT_SHUT_MASK BIT(7)
  204. /* DA9062AA_EVENT_A = 0x006 */
  205. #define DA9062AA_E_NONKEY_SHIFT 0
  206. #define DA9062AA_E_NONKEY_MASK 0x01
  207. #define DA9062AA_E_ALARM_SHIFT 1
  208. #define DA9062AA_E_ALARM_MASK BIT(1)
  209. #define DA9062AA_E_TICK_SHIFT 2
  210. #define DA9062AA_E_TICK_MASK BIT(2)
  211. #define DA9062AA_E_WDG_WARN_SHIFT 3
  212. #define DA9062AA_E_WDG_WARN_MASK BIT(3)
  213. #define DA9062AA_E_SEQ_RDY_SHIFT 4
  214. #define DA9062AA_E_SEQ_RDY_MASK BIT(4)
  215. #define DA9062AA_EVENTS_B_SHIFT 5
  216. #define DA9062AA_EVENTS_B_MASK BIT(5)
  217. #define DA9062AA_EVENTS_C_SHIFT 6
  218. #define DA9062AA_EVENTS_C_MASK BIT(6)
  219. /* DA9062AA_EVENT_B = 0x007 */
  220. #define DA9062AA_E_TEMP_SHIFT 1
  221. #define DA9062AA_E_TEMP_MASK BIT(1)
  222. #define DA9062AA_E_LDO_LIM_SHIFT 3
  223. #define DA9062AA_E_LDO_LIM_MASK BIT(3)
  224. #define DA9062AA_E_DVC_RDY_SHIFT 5
  225. #define DA9062AA_E_DVC_RDY_MASK BIT(5)
  226. #define DA9062AA_E_VDD_WARN_SHIFT 7
  227. #define DA9062AA_E_VDD_WARN_MASK BIT(7)
  228. /* DA9062AA_EVENT_C = 0x008 */
  229. #define DA9062AA_E_GPI0_SHIFT 0
  230. #define DA9062AA_E_GPI0_MASK 0x01
  231. #define DA9062AA_E_GPI1_SHIFT 1
  232. #define DA9062AA_E_GPI1_MASK BIT(1)
  233. #define DA9062AA_E_GPI2_SHIFT 2
  234. #define DA9062AA_E_GPI2_MASK BIT(2)
  235. #define DA9062AA_E_GPI3_SHIFT 3
  236. #define DA9062AA_E_GPI3_MASK BIT(3)
  237. #define DA9062AA_E_GPI4_SHIFT 4
  238. #define DA9062AA_E_GPI4_MASK BIT(4)
  239. /* DA9062AA_IRQ_MASK_A = 0x00A */
  240. #define DA9062AA_M_NONKEY_SHIFT 0
  241. #define DA9062AA_M_NONKEY_MASK 0x01
  242. #define DA9062AA_M_ALARM_SHIFT 1
  243. #define DA9062AA_M_ALARM_MASK BIT(1)
  244. #define DA9062AA_M_TICK_SHIFT 2
  245. #define DA9062AA_M_TICK_MASK BIT(2)
  246. #define DA9062AA_M_WDG_WARN_SHIFT 3
  247. #define DA9062AA_M_WDG_WARN_MASK BIT(3)
  248. #define DA9062AA_M_SEQ_RDY_SHIFT 4
  249. #define DA9062AA_M_SEQ_RDY_MASK BIT(4)
  250. /* DA9062AA_IRQ_MASK_B = 0x00B */
  251. #define DA9062AA_M_TEMP_SHIFT 1
  252. #define DA9062AA_M_TEMP_MASK BIT(1)
  253. #define DA9062AA_M_LDO_LIM_SHIFT 3
  254. #define DA9062AA_M_LDO_LIM_MASK BIT(3)
  255. #define DA9062AA_M_DVC_RDY_SHIFT 5
  256. #define DA9062AA_M_DVC_RDY_MASK BIT(5)
  257. #define DA9062AA_M_VDD_WARN_SHIFT 7
  258. #define DA9062AA_M_VDD_WARN_MASK BIT(7)
  259. /* DA9062AA_IRQ_MASK_C = 0x00C */
  260. #define DA9062AA_M_GPI0_SHIFT 0
  261. #define DA9062AA_M_GPI0_MASK 0x01
  262. #define DA9062AA_M_GPI1_SHIFT 1
  263. #define DA9062AA_M_GPI1_MASK BIT(1)
  264. #define DA9062AA_M_GPI2_SHIFT 2
  265. #define DA9062AA_M_GPI2_MASK BIT(2)
  266. #define DA9062AA_M_GPI3_SHIFT 3
  267. #define DA9062AA_M_GPI3_MASK BIT(3)
  268. #define DA9062AA_M_GPI4_SHIFT 4
  269. #define DA9062AA_M_GPI4_MASK BIT(4)
  270. /* DA9062AA_CONTROL_A = 0x00E */
  271. #define DA9062AA_SYSTEM_EN_SHIFT 0
  272. #define DA9062AA_SYSTEM_EN_MASK 0x01
  273. #define DA9062AA_POWER_EN_SHIFT 1
  274. #define DA9062AA_POWER_EN_MASK BIT(1)
  275. #define DA9062AA_POWER1_EN_SHIFT 2
  276. #define DA9062AA_POWER1_EN_MASK BIT(2)
  277. #define DA9062AA_STANDBY_SHIFT 3
  278. #define DA9062AA_STANDBY_MASK BIT(3)
  279. #define DA9062AA_M_SYSTEM_EN_SHIFT 4
  280. #define DA9062AA_M_SYSTEM_EN_MASK BIT(4)
  281. #define DA9062AA_M_POWER_EN_SHIFT 5
  282. #define DA9062AA_M_POWER_EN_MASK BIT(5)
  283. #define DA9062AA_M_POWER1_EN_SHIFT 6
  284. #define DA9062AA_M_POWER1_EN_MASK BIT(6)
  285. /* DA9062AA_CONTROL_B = 0x00F */
  286. #define DA9062AA_WATCHDOG_PD_SHIFT 1
  287. #define DA9062AA_WATCHDOG_PD_MASK BIT(1)
  288. #define DA9062AA_FREEZE_EN_SHIFT 2
  289. #define DA9062AA_FREEZE_EN_MASK BIT(2)
  290. #define DA9062AA_NRES_MODE_SHIFT 3
  291. #define DA9062AA_NRES_MODE_MASK BIT(3)
  292. #define DA9062AA_NONKEY_LOCK_SHIFT 4
  293. #define DA9062AA_NONKEY_LOCK_MASK BIT(4)
  294. #define DA9062AA_NFREEZE_SHIFT 5
  295. #define DA9062AA_NFREEZE_MASK (0x03 << 5)
  296. #define DA9062AA_BUCK_SLOWSTART_SHIFT 7
  297. #define DA9062AA_BUCK_SLOWSTART_MASK BIT(7)
  298. /* DA9062AA_CONTROL_C = 0x010 */
  299. #define DA9062AA_DEBOUNCING_SHIFT 0
  300. #define DA9062AA_DEBOUNCING_MASK 0x07
  301. #define DA9062AA_AUTO_BOOT_SHIFT 3
  302. #define DA9062AA_AUTO_BOOT_MASK BIT(3)
  303. #define DA9062AA_OTPREAD_EN_SHIFT 4
  304. #define DA9062AA_OTPREAD_EN_MASK BIT(4)
  305. #define DA9062AA_SLEW_RATE_SHIFT 5
  306. #define DA9062AA_SLEW_RATE_MASK (0x03 << 5)
  307. #define DA9062AA_DEF_SUPPLY_SHIFT 7
  308. #define DA9062AA_DEF_SUPPLY_MASK BIT(7)
  309. /* DA9062AA_CONTROL_D = 0x011 */
  310. #define DA9062AA_TWDSCALE_SHIFT 0
  311. #define DA9062AA_TWDSCALE_MASK 0x07
  312. /* DA9062AA_CONTROL_E = 0x012 */
  313. #define DA9062AA_RTC_MODE_PD_SHIFT 0
  314. #define DA9062AA_RTC_MODE_PD_MASK 0x01
  315. #define DA9062AA_RTC_MODE_SD_SHIFT 1
  316. #define DA9062AA_RTC_MODE_SD_MASK BIT(1)
  317. #define DA9062AA_RTC_EN_SHIFT 2
  318. #define DA9062AA_RTC_EN_MASK BIT(2)
  319. #define DA9062AA_V_LOCK_SHIFT 7
  320. #define DA9062AA_V_LOCK_MASK BIT(7)
  321. /* DA9062AA_CONTROL_F = 0x013 */
  322. #define DA9062AA_WATCHDOG_SHIFT 0
  323. #define DA9062AA_WATCHDOG_MASK 0x01
  324. #define DA9062AA_SHUTDOWN_SHIFT 1
  325. #define DA9062AA_SHUTDOWN_MASK BIT(1)
  326. #define DA9062AA_WAKE_UP_SHIFT 2
  327. #define DA9062AA_WAKE_UP_MASK BIT(2)
  328. /* DA9062AA_PD_DIS = 0x014 */
  329. #define DA9062AA_GPI_DIS_SHIFT 0
  330. #define DA9062AA_GPI_DIS_MASK 0x01
  331. #define DA9062AA_PMIF_DIS_SHIFT 2
  332. #define DA9062AA_PMIF_DIS_MASK BIT(2)
  333. #define DA9062AA_CLDR_PAUSE_SHIFT 4
  334. #define DA9062AA_CLDR_PAUSE_MASK BIT(4)
  335. #define DA9062AA_BBAT_DIS_SHIFT 5
  336. #define DA9062AA_BBAT_DIS_MASK BIT(5)
  337. #define DA9062AA_OUT32K_PAUSE_SHIFT 6
  338. #define DA9062AA_OUT32K_PAUSE_MASK BIT(6)
  339. #define DA9062AA_PMCONT_DIS_SHIFT 7
  340. #define DA9062AA_PMCONT_DIS_MASK BIT(7)
  341. /* DA9062AA_GPIO_0_1 = 0x015 */
  342. #define DA9062AA_GPIO0_PIN_SHIFT 0
  343. #define DA9062AA_GPIO0_PIN_MASK 0x03
  344. #define DA9062AA_GPIO0_TYPE_SHIFT 2
  345. #define DA9062AA_GPIO0_TYPE_MASK BIT(2)
  346. #define DA9062AA_GPIO0_WEN_SHIFT 3
  347. #define DA9062AA_GPIO0_WEN_MASK BIT(3)
  348. #define DA9062AA_GPIO1_PIN_SHIFT 4
  349. #define DA9062AA_GPIO1_PIN_MASK (0x03 << 4)
  350. #define DA9062AA_GPIO1_TYPE_SHIFT 6
  351. #define DA9062AA_GPIO1_TYPE_MASK BIT(6)
  352. #define DA9062AA_GPIO1_WEN_SHIFT 7
  353. #define DA9062AA_GPIO1_WEN_MASK BIT(7)
  354. /* DA9062AA_GPIO_2_3 = 0x016 */
  355. #define DA9062AA_GPIO2_PIN_SHIFT 0
  356. #define DA9062AA_GPIO2_PIN_MASK 0x03
  357. #define DA9062AA_GPIO2_TYPE_SHIFT 2
  358. #define DA9062AA_GPIO2_TYPE_MASK BIT(2)
  359. #define DA9062AA_GPIO2_WEN_SHIFT 3
  360. #define DA9062AA_GPIO2_WEN_MASK BIT(3)
  361. #define DA9062AA_GPIO3_PIN_SHIFT 4
  362. #define DA9062AA_GPIO3_PIN_MASK (0x03 << 4)
  363. #define DA9062AA_GPIO3_TYPE_SHIFT 6
  364. #define DA9062AA_GPIO3_TYPE_MASK BIT(6)
  365. #define DA9062AA_GPIO3_WEN_SHIFT 7
  366. #define DA9062AA_GPIO3_WEN_MASK BIT(7)
  367. /* DA9062AA_GPIO_4 = 0x017 */
  368. #define DA9062AA_GPIO4_PIN_SHIFT 0
  369. #define DA9062AA_GPIO4_PIN_MASK 0x03
  370. #define DA9062AA_GPIO4_TYPE_SHIFT 2
  371. #define DA9062AA_GPIO4_TYPE_MASK BIT(2)
  372. #define DA9062AA_GPIO4_WEN_SHIFT 3
  373. #define DA9062AA_GPIO4_WEN_MASK BIT(3)
  374. /* DA9062AA_GPIO_WKUP_MODE = 0x01C */
  375. #define DA9062AA_GPIO0_WKUP_MODE_SHIFT 0
  376. #define DA9062AA_GPIO0_WKUP_MODE_MASK 0x01
  377. #define DA9062AA_GPIO1_WKUP_MODE_SHIFT 1
  378. #define DA9062AA_GPIO1_WKUP_MODE_MASK BIT(1)
  379. #define DA9062AA_GPIO2_WKUP_MODE_SHIFT 2
  380. #define DA9062AA_GPIO2_WKUP_MODE_MASK BIT(2)
  381. #define DA9062AA_GPIO3_WKUP_MODE_SHIFT 3
  382. #define DA9062AA_GPIO3_WKUP_MODE_MASK BIT(3)
  383. #define DA9062AA_GPIO4_WKUP_MODE_SHIFT 4
  384. #define DA9062AA_GPIO4_WKUP_MODE_MASK BIT(4)
  385. /* DA9062AA_GPIO_MODE0_4 = 0x01D */
  386. #define DA9062AA_GPIO0_MODE_SHIFT 0
  387. #define DA9062AA_GPIO0_MODE_MASK 0x01
  388. #define DA9062AA_GPIO1_MODE_SHIFT 1
  389. #define DA9062AA_GPIO1_MODE_MASK BIT(1)
  390. #define DA9062AA_GPIO2_MODE_SHIFT 2
  391. #define DA9062AA_GPIO2_MODE_MASK BIT(2)
  392. #define DA9062AA_GPIO3_MODE_SHIFT 3
  393. #define DA9062AA_GPIO3_MODE_MASK BIT(3)
  394. #define DA9062AA_GPIO4_MODE_SHIFT 4
  395. #define DA9062AA_GPIO4_MODE_MASK BIT(4)
  396. /* DA9062AA_GPIO_OUT0_2 = 0x01E */
  397. #define DA9062AA_GPIO0_OUT_SHIFT 0
  398. #define DA9062AA_GPIO0_OUT_MASK 0x07
  399. #define DA9062AA_GPIO1_OUT_SHIFT 3
  400. #define DA9062AA_GPIO1_OUT_MASK (0x07 << 3)
  401. #define DA9062AA_GPIO2_OUT_SHIFT 6
  402. #define DA9062AA_GPIO2_OUT_MASK (0x03 << 6)
  403. /* DA9062AA_GPIO_OUT3_4 = 0x01F */
  404. #define DA9062AA_GPIO3_OUT_SHIFT 0
  405. #define DA9062AA_GPIO3_OUT_MASK 0x07
  406. #define DA9062AA_GPIO4_OUT_SHIFT 3
  407. #define DA9062AA_GPIO4_OUT_MASK (0x03 << 3)
  408. /* DA9062AA_BUCK2_CONT = 0x020 */
  409. #define DA9062AA_BUCK2_EN_SHIFT 0
  410. #define DA9062AA_BUCK2_EN_MASK 0x01
  411. #define DA9062AA_BUCK2_GPI_SHIFT 1
  412. #define DA9062AA_BUCK2_GPI_MASK (0x03 << 1)
  413. #define DA9062AA_BUCK2_CONF_SHIFT 3
  414. #define DA9062AA_BUCK2_CONF_MASK BIT(3)
  415. #define DA9062AA_VBUCK2_GPI_SHIFT 5
  416. #define DA9062AA_VBUCK2_GPI_MASK (0x03 << 5)
  417. /* DA9062AA_BUCK1_CONT = 0x021 */
  418. #define DA9062AA_BUCK1_EN_SHIFT 0
  419. #define DA9062AA_BUCK1_EN_MASK 0x01
  420. #define DA9062AA_BUCK1_GPI_SHIFT 1
  421. #define DA9062AA_BUCK1_GPI_MASK (0x03 << 1)
  422. #define DA9062AA_BUCK1_CONF_SHIFT 3
  423. #define DA9062AA_BUCK1_CONF_MASK BIT(3)
  424. #define DA9062AA_VBUCK1_GPI_SHIFT 5
  425. #define DA9062AA_VBUCK1_GPI_MASK (0x03 << 5)
  426. /* DA9062AA_BUCK4_CONT = 0x022 */
  427. #define DA9062AA_BUCK4_EN_SHIFT 0
  428. #define DA9062AA_BUCK4_EN_MASK 0x01
  429. #define DA9062AA_BUCK4_GPI_SHIFT 1
  430. #define DA9062AA_BUCK4_GPI_MASK (0x03 << 1)
  431. #define DA9062AA_BUCK4_CONF_SHIFT 3
  432. #define DA9062AA_BUCK4_CONF_MASK BIT(3)
  433. #define DA9062AA_VBUCK4_GPI_SHIFT 5
  434. #define DA9062AA_VBUCK4_GPI_MASK (0x03 << 5)
  435. /* DA9062AA_BUCK3_CONT = 0x024 */
  436. #define DA9062AA_BUCK3_EN_SHIFT 0
  437. #define DA9062AA_BUCK3_EN_MASK 0x01
  438. #define DA9062AA_BUCK3_GPI_SHIFT 1
  439. #define DA9062AA_BUCK3_GPI_MASK (0x03 << 1)
  440. #define DA9062AA_BUCK3_CONF_SHIFT 3
  441. #define DA9062AA_BUCK3_CONF_MASK BIT(3)
  442. #define DA9062AA_VBUCK3_GPI_SHIFT 5
  443. #define DA9062AA_VBUCK3_GPI_MASK (0x03 << 5)
  444. /* DA9062AA_LDO1_CONT = 0x026 */
  445. #define DA9062AA_LDO1_EN_SHIFT 0
  446. #define DA9062AA_LDO1_EN_MASK 0x01
  447. #define DA9062AA_LDO1_GPI_SHIFT 1
  448. #define DA9062AA_LDO1_GPI_MASK (0x03 << 1)
  449. #define DA9062AA_LDO1_PD_DIS_SHIFT 3
  450. #define DA9062AA_LDO1_PD_DIS_MASK BIT(3)
  451. #define DA9062AA_VLDO1_GPI_SHIFT 5
  452. #define DA9062AA_VLDO1_GPI_MASK (0x03 << 5)
  453. #define DA9062AA_LDO1_CONF_SHIFT 7
  454. #define DA9062AA_LDO1_CONF_MASK BIT(7)
  455. /* DA9062AA_LDO2_CONT = 0x027 */
  456. #define DA9062AA_LDO2_EN_SHIFT 0
  457. #define DA9062AA_LDO2_EN_MASK 0x01
  458. #define DA9062AA_LDO2_GPI_SHIFT 1
  459. #define DA9062AA_LDO2_GPI_MASK (0x03 << 1)
  460. #define DA9062AA_LDO2_PD_DIS_SHIFT 3
  461. #define DA9062AA_LDO2_PD_DIS_MASK BIT(3)
  462. #define DA9062AA_VLDO2_GPI_SHIFT 5
  463. #define DA9062AA_VLDO2_GPI_MASK (0x03 << 5)
  464. #define DA9062AA_LDO2_CONF_SHIFT 7
  465. #define DA9062AA_LDO2_CONF_MASK BIT(7)
  466. /* DA9062AA_LDO3_CONT = 0x028 */
  467. #define DA9062AA_LDO3_EN_SHIFT 0
  468. #define DA9062AA_LDO3_EN_MASK 0x01
  469. #define DA9062AA_LDO3_GPI_SHIFT 1
  470. #define DA9062AA_LDO3_GPI_MASK (0x03 << 1)
  471. #define DA9062AA_LDO3_PD_DIS_SHIFT 3
  472. #define DA9062AA_LDO3_PD_DIS_MASK BIT(3)
  473. #define DA9062AA_VLDO3_GPI_SHIFT 5
  474. #define DA9062AA_VLDO3_GPI_MASK (0x03 << 5)
  475. #define DA9062AA_LDO3_CONF_SHIFT 7
  476. #define DA9062AA_LDO3_CONF_MASK BIT(7)
  477. /* DA9062AA_LDO4_CONT = 0x029 */
  478. #define DA9062AA_LDO4_EN_SHIFT 0
  479. #define DA9062AA_LDO4_EN_MASK 0x01
  480. #define DA9062AA_LDO4_GPI_SHIFT 1
  481. #define DA9062AA_LDO4_GPI_MASK (0x03 << 1)
  482. #define DA9062AA_LDO4_PD_DIS_SHIFT 3
  483. #define DA9062AA_LDO4_PD_DIS_MASK BIT(3)
  484. #define DA9062AA_VLDO4_GPI_SHIFT 5
  485. #define DA9062AA_VLDO4_GPI_MASK (0x03 << 5)
  486. #define DA9062AA_LDO4_CONF_SHIFT 7
  487. #define DA9062AA_LDO4_CONF_MASK BIT(7)
  488. /* DA9062AA_DVC_1 = 0x032 */
  489. #define DA9062AA_VBUCK1_SEL_SHIFT 0
  490. #define DA9062AA_VBUCK1_SEL_MASK 0x01
  491. #define DA9062AA_VBUCK2_SEL_SHIFT 1
  492. #define DA9062AA_VBUCK2_SEL_MASK BIT(1)
  493. #define DA9062AA_VBUCK4_SEL_SHIFT 2
  494. #define DA9062AA_VBUCK4_SEL_MASK BIT(2)
  495. #define DA9062AA_VBUCK3_SEL_SHIFT 3
  496. #define DA9062AA_VBUCK3_SEL_MASK BIT(3)
  497. #define DA9062AA_VLDO1_SEL_SHIFT 4
  498. #define DA9062AA_VLDO1_SEL_MASK BIT(4)
  499. #define DA9062AA_VLDO2_SEL_SHIFT 5
  500. #define DA9062AA_VLDO2_SEL_MASK BIT(5)
  501. #define DA9062AA_VLDO3_SEL_SHIFT 6
  502. #define DA9062AA_VLDO3_SEL_MASK BIT(6)
  503. #define DA9062AA_VLDO4_SEL_SHIFT 7
  504. #define DA9062AA_VLDO4_SEL_MASK BIT(7)
  505. /* DA9062AA_COUNT_S = 0x040 */
  506. #define DA9062AA_COUNT_SEC_SHIFT 0
  507. #define DA9062AA_COUNT_SEC_MASK 0x3f
  508. #define DA9062AA_RTC_READ_SHIFT 7
  509. #define DA9062AA_RTC_READ_MASK BIT(7)
  510. /* DA9062AA_COUNT_MI = 0x041 */
  511. #define DA9062AA_COUNT_MIN_SHIFT 0
  512. #define DA9062AA_COUNT_MIN_MASK 0x3f
  513. /* DA9062AA_COUNT_H = 0x042 */
  514. #define DA9062AA_COUNT_HOUR_SHIFT 0
  515. #define DA9062AA_COUNT_HOUR_MASK 0x1f
  516. /* DA9062AA_COUNT_D = 0x043 */
  517. #define DA9062AA_COUNT_DAY_SHIFT 0
  518. #define DA9062AA_COUNT_DAY_MASK 0x1f
  519. /* DA9062AA_COUNT_MO = 0x044 */
  520. #define DA9062AA_COUNT_MONTH_SHIFT 0
  521. #define DA9062AA_COUNT_MONTH_MASK 0x0f
  522. /* DA9062AA_COUNT_Y = 0x045 */
  523. #define DA9062AA_COUNT_YEAR_SHIFT 0
  524. #define DA9062AA_COUNT_YEAR_MASK 0x3f
  525. #define DA9062AA_MONITOR_SHIFT 6
  526. #define DA9062AA_MONITOR_MASK BIT(6)
  527. /* DA9062AA_ALARM_S = 0x046 */
  528. #define DA9062AA_ALARM_SEC_SHIFT 0
  529. #define DA9062AA_ALARM_SEC_MASK 0x3f
  530. #define DA9062AA_ALARM_STATUS_SHIFT 6
  531. #define DA9062AA_ALARM_STATUS_MASK (0x03 << 6)
  532. /* DA9062AA_ALARM_MI = 0x047 */
  533. #define DA9062AA_ALARM_MIN_SHIFT 0
  534. #define DA9062AA_ALARM_MIN_MASK 0x3f
  535. /* DA9062AA_ALARM_H = 0x048 */
  536. #define DA9062AA_ALARM_HOUR_SHIFT 0
  537. #define DA9062AA_ALARM_HOUR_MASK 0x1f
  538. /* DA9062AA_ALARM_D = 0x049 */
  539. #define DA9062AA_ALARM_DAY_SHIFT 0
  540. #define DA9062AA_ALARM_DAY_MASK 0x1f
  541. /* DA9062AA_ALARM_MO = 0x04A */
  542. #define DA9062AA_ALARM_MONTH_SHIFT 0
  543. #define DA9062AA_ALARM_MONTH_MASK 0x0f
  544. #define DA9062AA_TICK_TYPE_SHIFT 4
  545. #define DA9062AA_TICK_TYPE_MASK BIT(4)
  546. #define DA9062AA_TICK_WAKE_SHIFT 5
  547. #define DA9062AA_TICK_WAKE_MASK BIT(5)
  548. /* DA9062AA_ALARM_Y = 0x04B */
  549. #define DA9062AA_ALARM_YEAR_SHIFT 0
  550. #define DA9062AA_ALARM_YEAR_MASK 0x3f
  551. #define DA9062AA_ALARM_ON_SHIFT 6
  552. #define DA9062AA_ALARM_ON_MASK BIT(6)
  553. #define DA9062AA_TICK_ON_SHIFT 7
  554. #define DA9062AA_TICK_ON_MASK BIT(7)
  555. /* DA9062AA_SECOND_A = 0x04C */
  556. #define DA9062AA_SECONDS_A_SHIFT 0
  557. #define DA9062AA_SECONDS_A_MASK 0xff
  558. /* DA9062AA_SECOND_B = 0x04D */
  559. #define DA9062AA_SECONDS_B_SHIFT 0
  560. #define DA9062AA_SECONDS_B_MASK 0xff
  561. /* DA9062AA_SECOND_C = 0x04E */
  562. #define DA9062AA_SECONDS_C_SHIFT 0
  563. #define DA9062AA_SECONDS_C_MASK 0xff
  564. /* DA9062AA_SECOND_D = 0x04F */
  565. #define DA9062AA_SECONDS_D_SHIFT 0
  566. #define DA9062AA_SECONDS_D_MASK 0xff
  567. /* DA9062AA_SEQ = 0x081 */
  568. #define DA9062AA_SEQ_POINTER_SHIFT 0
  569. #define DA9062AA_SEQ_POINTER_MASK 0x0f
  570. #define DA9062AA_NXT_SEQ_START_SHIFT 4
  571. #define DA9062AA_NXT_SEQ_START_MASK (0x0f << 4)
  572. /* DA9062AA_SEQ_TIMER = 0x082 */
  573. #define DA9062AA_SEQ_TIME_SHIFT 0
  574. #define DA9062AA_SEQ_TIME_MASK 0x0f
  575. #define DA9062AA_SEQ_DUMMY_SHIFT 4
  576. #define DA9062AA_SEQ_DUMMY_MASK (0x0f << 4)
  577. /* DA9062AA_ID_2_1 = 0x083 */
  578. #define DA9062AA_LDO1_STEP_SHIFT 0
  579. #define DA9062AA_LDO1_STEP_MASK 0x0f
  580. #define DA9062AA_LDO2_STEP_SHIFT 4
  581. #define DA9062AA_LDO2_STEP_MASK (0x0f << 4)
  582. /* DA9062AA_ID_4_3 = 0x084 */
  583. #define DA9062AA_LDO3_STEP_SHIFT 0
  584. #define DA9062AA_LDO3_STEP_MASK 0x0f
  585. #define DA9062AA_LDO4_STEP_SHIFT 4
  586. #define DA9062AA_LDO4_STEP_MASK (0x0f << 4)
  587. /* DA9062AA_ID_12_11 = 0x088 */
  588. #define DA9062AA_PD_DIS_STEP_SHIFT 4
  589. #define DA9062AA_PD_DIS_STEP_MASK (0x0f << 4)
  590. /* DA9062AA_ID_14_13 = 0x089 */
  591. #define DA9062AA_BUCK1_STEP_SHIFT 0
  592. #define DA9062AA_BUCK1_STEP_MASK 0x0f
  593. #define DA9062AA_BUCK2_STEP_SHIFT 4
  594. #define DA9062AA_BUCK2_STEP_MASK (0x0f << 4)
  595. /* DA9062AA_ID_16_15 = 0x08A */
  596. #define DA9062AA_BUCK4_STEP_SHIFT 0
  597. #define DA9062AA_BUCK4_STEP_MASK 0x0f
  598. #define DA9062AA_BUCK3_STEP_SHIFT 4
  599. #define DA9062AA_BUCK3_STEP_MASK (0x0f << 4)
  600. /* DA9062AA_ID_22_21 = 0x08D */
  601. #define DA9062AA_GP_RISE1_STEP_SHIFT 0
  602. #define DA9062AA_GP_RISE1_STEP_MASK 0x0f
  603. #define DA9062AA_GP_FALL1_STEP_SHIFT 4
  604. #define DA9062AA_GP_FALL1_STEP_MASK (0x0f << 4)
  605. /* DA9062AA_ID_24_23 = 0x08E */
  606. #define DA9062AA_GP_RISE2_STEP_SHIFT 0
  607. #define DA9062AA_GP_RISE2_STEP_MASK 0x0f
  608. #define DA9062AA_GP_FALL2_STEP_SHIFT 4
  609. #define DA9062AA_GP_FALL2_STEP_MASK (0x0f << 4)
  610. /* DA9062AA_ID_26_25 = 0x08F */
  611. #define DA9062AA_GP_RISE3_STEP_SHIFT 0
  612. #define DA9062AA_GP_RISE3_STEP_MASK 0x0f
  613. #define DA9062AA_GP_FALL3_STEP_SHIFT 4
  614. #define DA9062AA_GP_FALL3_STEP_MASK (0x0f << 4)
  615. /* DA9062AA_ID_28_27 = 0x090 */
  616. #define DA9062AA_GP_RISE4_STEP_SHIFT 0
  617. #define DA9062AA_GP_RISE4_STEP_MASK 0x0f
  618. #define DA9062AA_GP_FALL4_STEP_SHIFT 4
  619. #define DA9062AA_GP_FALL4_STEP_MASK (0x0f << 4)
  620. /* DA9062AA_ID_30_29 = 0x091 */
  621. #define DA9062AA_GP_RISE5_STEP_SHIFT 0
  622. #define DA9062AA_GP_RISE5_STEP_MASK 0x0f
  623. #define DA9062AA_GP_FALL5_STEP_SHIFT 4
  624. #define DA9062AA_GP_FALL5_STEP_MASK (0x0f << 4)
  625. /* DA9062AA_ID_32_31 = 0x092 */
  626. #define DA9062AA_WAIT_STEP_SHIFT 0
  627. #define DA9062AA_WAIT_STEP_MASK 0x0f
  628. #define DA9062AA_EN32K_STEP_SHIFT 4
  629. #define DA9062AA_EN32K_STEP_MASK (0x0f << 4)
  630. /* DA9062AA_SEQ_A = 0x095 */
  631. #define DA9062AA_SYSTEM_END_SHIFT 0
  632. #define DA9062AA_SYSTEM_END_MASK 0x0f
  633. #define DA9062AA_POWER_END_SHIFT 4
  634. #define DA9062AA_POWER_END_MASK (0x0f << 4)
  635. /* DA9062AA_SEQ_B = 0x096 */
  636. #define DA9062AA_MAX_COUNT_SHIFT 0
  637. #define DA9062AA_MAX_COUNT_MASK 0x0f
  638. #define DA9062AA_PART_DOWN_SHIFT 4
  639. #define DA9062AA_PART_DOWN_MASK (0x0f << 4)
  640. /* DA9062AA_WAIT = 0x097 */
  641. #define DA9062AA_WAIT_TIME_SHIFT 0
  642. #define DA9062AA_WAIT_TIME_MASK 0x0f
  643. #define DA9062AA_WAIT_MODE_SHIFT 4
  644. #define DA9062AA_WAIT_MODE_MASK BIT(4)
  645. #define DA9062AA_TIME_OUT_SHIFT 5
  646. #define DA9062AA_TIME_OUT_MASK BIT(5)
  647. #define DA9062AA_WAIT_DIR_SHIFT 6
  648. #define DA9062AA_WAIT_DIR_MASK (0x03 << 6)
  649. /* DA9062AA_EN_32K = 0x098 */
  650. #define DA9062AA_STABILISATION_TIME_SHIFT 0
  651. #define DA9062AA_STABILISATION_TIME_MASK 0x07
  652. #define DA9062AA_CRYSTAL_SHIFT 3
  653. #define DA9062AA_CRYSTAL_MASK BIT(3)
  654. #define DA9062AA_DELAY_MODE_SHIFT 4
  655. #define DA9062AA_DELAY_MODE_MASK BIT(4)
  656. #define DA9062AA_OUT_CLOCK_SHIFT 5
  657. #define DA9062AA_OUT_CLOCK_MASK BIT(5)
  658. #define DA9062AA_RTC_CLOCK_SHIFT 6
  659. #define DA9062AA_RTC_CLOCK_MASK BIT(6)
  660. #define DA9062AA_EN_32KOUT_SHIFT 7
  661. #define DA9062AA_EN_32KOUT_MASK BIT(7)
  662. /* DA9062AA_RESET = 0x099 */
  663. #define DA9062AA_RESET_TIMER_SHIFT 0
  664. #define DA9062AA_RESET_TIMER_MASK 0x3f
  665. #define DA9062AA_RESET_EVENT_SHIFT 6
  666. #define DA9062AA_RESET_EVENT_MASK (0x03 << 6)
  667. /* DA9062AA_BUCK_ILIM_A = 0x09A */
  668. #define DA9062AA_BUCK3_ILIM_SHIFT 0
  669. #define DA9062AA_BUCK3_ILIM_MASK 0x0f
  670. /* DA9062AA_BUCK_ILIM_B = 0x09B */
  671. #define DA9062AA_BUCK4_ILIM_SHIFT 0
  672. #define DA9062AA_BUCK4_ILIM_MASK 0x0f
  673. /* DA9062AA_BUCK_ILIM_C = 0x09C */
  674. #define DA9062AA_BUCK1_ILIM_SHIFT 0
  675. #define DA9062AA_BUCK1_ILIM_MASK 0x0f
  676. #define DA9062AA_BUCK2_ILIM_SHIFT 4
  677. #define DA9062AA_BUCK2_ILIM_MASK (0x0f << 4)
  678. /* DA9062AA_BUCK2_CFG = 0x09D */
  679. #define DA9062AA_BUCK2_PD_DIS_SHIFT 5
  680. #define DA9062AA_BUCK2_PD_DIS_MASK BIT(5)
  681. #define DA9062AA_BUCK2_MODE_SHIFT 6
  682. #define DA9062AA_BUCK2_MODE_MASK (0x03 << 6)
  683. /* DA9062AA_BUCK1_CFG = 0x09E */
  684. #define DA9062AA_BUCK1_PD_DIS_SHIFT 5
  685. #define DA9062AA_BUCK1_PD_DIS_MASK BIT(5)
  686. #define DA9062AA_BUCK1_MODE_SHIFT 6
  687. #define DA9062AA_BUCK1_MODE_MASK (0x03 << 6)
  688. /* DA9062AA_BUCK4_CFG = 0x09F */
  689. #define DA9062AA_BUCK4_VTTR_EN_SHIFT 3
  690. #define DA9062AA_BUCK4_VTTR_EN_MASK BIT(3)
  691. #define DA9062AA_BUCK4_VTT_EN_SHIFT 4
  692. #define DA9062AA_BUCK4_VTT_EN_MASK BIT(4)
  693. #define DA9062AA_BUCK4_PD_DIS_SHIFT 5
  694. #define DA9062AA_BUCK4_PD_DIS_MASK BIT(5)
  695. #define DA9062AA_BUCK4_MODE_SHIFT 6
  696. #define DA9062AA_BUCK4_MODE_MASK (0x03 << 6)
  697. /* DA9062AA_BUCK3_CFG = 0x0A0 */
  698. #define DA9062AA_BUCK3_PD_DIS_SHIFT 5
  699. #define DA9062AA_BUCK3_PD_DIS_MASK BIT(5)
  700. #define DA9062AA_BUCK3_MODE_SHIFT 6
  701. #define DA9062AA_BUCK3_MODE_MASK (0x03 << 6)
  702. /* DA9062AA_VBUCK2_A = 0x0A3 */
  703. #define DA9062AA_VBUCK2_A_SHIFT 0
  704. #define DA9062AA_VBUCK2_A_MASK 0x7f
  705. #define DA9062AA_BUCK2_SL_A_SHIFT 7
  706. #define DA9062AA_BUCK2_SL_A_MASK BIT(7)
  707. /* DA9062AA_VBUCK1_A = 0x0A4 */
  708. #define DA9062AA_VBUCK1_A_SHIFT 0
  709. #define DA9062AA_VBUCK1_A_MASK 0x7f
  710. #define DA9062AA_BUCK1_SL_A_SHIFT 7
  711. #define DA9062AA_BUCK1_SL_A_MASK BIT(7)
  712. /* DA9062AA_VBUCK4_A = 0x0A5 */
  713. #define DA9062AA_VBUCK4_A_SHIFT 0
  714. #define DA9062AA_VBUCK4_A_MASK 0x7f
  715. #define DA9062AA_BUCK4_SL_A_SHIFT 7
  716. #define DA9062AA_BUCK4_SL_A_MASK BIT(7)
  717. /* DA9062AA_VBUCK3_A = 0x0A7 */
  718. #define DA9062AA_VBUCK3_A_SHIFT 0
  719. #define DA9062AA_VBUCK3_A_MASK 0x7f
  720. #define DA9062AA_BUCK3_SL_A_SHIFT 7
  721. #define DA9062AA_BUCK3_SL_A_MASK BIT(7)
  722. /* DA9062AA_VLDO1_A = 0x0A9 */
  723. #define DA9062AA_VLDO1_A_SHIFT 0
  724. #define DA9062AA_VLDO1_A_MASK 0x3f
  725. #define DA9062AA_LDO1_SL_A_SHIFT 7
  726. #define DA9062AA_LDO1_SL_A_MASK BIT(7)
  727. /* DA9062AA_VLDO2_A = 0x0AA */
  728. #define DA9062AA_VLDO2_A_SHIFT 0
  729. #define DA9062AA_VLDO2_A_MASK 0x3f
  730. #define DA9062AA_LDO2_SL_A_SHIFT 7
  731. #define DA9062AA_LDO2_SL_A_MASK BIT(7)
  732. /* DA9062AA_VLDO3_A = 0x0AB */
  733. #define DA9062AA_VLDO3_A_SHIFT 0
  734. #define DA9062AA_VLDO3_A_MASK 0x3f
  735. #define DA9062AA_LDO3_SL_A_SHIFT 7
  736. #define DA9062AA_LDO3_SL_A_MASK BIT(7)
  737. /* DA9062AA_VLDO4_A = 0x0AC */
  738. #define DA9062AA_VLDO4_A_SHIFT 0
  739. #define DA9062AA_VLDO4_A_MASK 0x3f
  740. #define DA9062AA_LDO4_SL_A_SHIFT 7
  741. #define DA9062AA_LDO4_SL_A_MASK BIT(7)
  742. /* DA9062AA_VBUCK2_B = 0x0B4 */
  743. #define DA9062AA_VBUCK2_B_SHIFT 0
  744. #define DA9062AA_VBUCK2_B_MASK 0x7f
  745. #define DA9062AA_BUCK2_SL_B_SHIFT 7
  746. #define DA9062AA_BUCK2_SL_B_MASK BIT(7)
  747. /* DA9062AA_VBUCK1_B = 0x0B5 */
  748. #define DA9062AA_VBUCK1_B_SHIFT 0
  749. #define DA9062AA_VBUCK1_B_MASK 0x7f
  750. #define DA9062AA_BUCK1_SL_B_SHIFT 7
  751. #define DA9062AA_BUCK1_SL_B_MASK BIT(7)
  752. /* DA9062AA_VBUCK4_B = 0x0B6 */
  753. #define DA9062AA_VBUCK4_B_SHIFT 0
  754. #define DA9062AA_VBUCK4_B_MASK 0x7f
  755. #define DA9062AA_BUCK4_SL_B_SHIFT 7
  756. #define DA9062AA_BUCK4_SL_B_MASK BIT(7)
  757. /* DA9062AA_VBUCK3_B = 0x0B8 */
  758. #define DA9062AA_VBUCK3_B_SHIFT 0
  759. #define DA9062AA_VBUCK3_B_MASK 0x7f
  760. #define DA9062AA_BUCK3_SL_B_SHIFT 7
  761. #define DA9062AA_BUCK3_SL_B_MASK BIT(7)
  762. /* DA9062AA_VLDO1_B = 0x0BA */
  763. #define DA9062AA_VLDO1_B_SHIFT 0
  764. #define DA9062AA_VLDO1_B_MASK 0x3f
  765. #define DA9062AA_LDO1_SL_B_SHIFT 7
  766. #define DA9062AA_LDO1_SL_B_MASK BIT(7)
  767. /* DA9062AA_VLDO2_B = 0x0BB */
  768. #define DA9062AA_VLDO2_B_SHIFT 0
  769. #define DA9062AA_VLDO2_B_MASK 0x3f
  770. #define DA9062AA_LDO2_SL_B_SHIFT 7
  771. #define DA9062AA_LDO2_SL_B_MASK BIT(7)
  772. /* DA9062AA_VLDO3_B = 0x0BC */
  773. #define DA9062AA_VLDO3_B_SHIFT 0
  774. #define DA9062AA_VLDO3_B_MASK 0x3f
  775. #define DA9062AA_LDO3_SL_B_SHIFT 7
  776. #define DA9062AA_LDO3_SL_B_MASK BIT(7)
  777. /* DA9062AA_VLDO4_B = 0x0BD */
  778. #define DA9062AA_VLDO4_B_SHIFT 0
  779. #define DA9062AA_VLDO4_B_MASK 0x3f
  780. #define DA9062AA_LDO4_SL_B_SHIFT 7
  781. #define DA9062AA_LDO4_SL_B_MASK BIT(7)
  782. /* DA9062AA_BBAT_CONT = 0x0C5 */
  783. #define DA9062AA_BCHG_VSET_SHIFT 0
  784. #define DA9062AA_BCHG_VSET_MASK 0x0f
  785. #define DA9062AA_BCHG_ISET_SHIFT 4
  786. #define DA9062AA_BCHG_ISET_MASK (0x0f << 4)
  787. /* DA9062AA_INTERFACE = 0x105 */
  788. #define DA9062AA_IF_BASE_ADDR_SHIFT 4
  789. #define DA9062AA_IF_BASE_ADDR_MASK (0x0f << 4)
  790. /* DA9062AA_CONFIG_A = 0x106 */
  791. #define DA9062AA_PM_I_V_SHIFT 0
  792. #define DA9062AA_PM_I_V_MASK 0x01
  793. #define DA9062AA_PM_O_TYPE_SHIFT 2
  794. #define DA9062AA_PM_O_TYPE_MASK BIT(2)
  795. #define DA9062AA_IRQ_TYPE_SHIFT 3
  796. #define DA9062AA_IRQ_TYPE_MASK BIT(3)
  797. #define DA9062AA_PM_IF_V_SHIFT 4
  798. #define DA9062AA_PM_IF_V_MASK BIT(4)
  799. #define DA9062AA_PM_IF_FMP_SHIFT 5
  800. #define DA9062AA_PM_IF_FMP_MASK BIT(5)
  801. #define DA9062AA_PM_IF_HSM_SHIFT 6
  802. #define DA9062AA_PM_IF_HSM_MASK BIT(6)
  803. /* DA9062AA_CONFIG_B = 0x107 */
  804. #define DA9062AA_VDD_FAULT_ADJ_SHIFT 0
  805. #define DA9062AA_VDD_FAULT_ADJ_MASK 0x0f
  806. #define DA9062AA_VDD_HYST_ADJ_SHIFT 4
  807. #define DA9062AA_VDD_HYST_ADJ_MASK (0x07 << 4)
  808. /* DA9062AA_CONFIG_C = 0x108 */
  809. #define DA9062AA_BUCK_ACTV_DISCHRG_SHIFT 2
  810. #define DA9062AA_BUCK_ACTV_DISCHRG_MASK BIT(2)
  811. #define DA9062AA_BUCK1_CLK_INV_SHIFT 3
  812. #define DA9062AA_BUCK1_CLK_INV_MASK BIT(3)
  813. #define DA9062AA_BUCK4_CLK_INV_SHIFT 4
  814. #define DA9062AA_BUCK4_CLK_INV_MASK BIT(4)
  815. #define DA9062AA_BUCK3_CLK_INV_SHIFT 6
  816. #define DA9062AA_BUCK3_CLK_INV_MASK BIT(6)
  817. /* DA9062AA_CONFIG_D = 0x109 */
  818. #define DA9062AA_GPI_V_SHIFT 0
  819. #define DA9062AA_GPI_V_MASK 0x01
  820. #define DA9062AA_NIRQ_MODE_SHIFT 1
  821. #define DA9062AA_NIRQ_MODE_MASK BIT(1)
  822. #define DA9062AA_SYSTEM_EN_RD_SHIFT 2
  823. #define DA9062AA_SYSTEM_EN_RD_MASK BIT(2)
  824. #define DA9062AA_FORCE_RESET_SHIFT 5
  825. #define DA9062AA_FORCE_RESET_MASK BIT(5)
  826. /* DA9062AA_CONFIG_E = 0x10A */
  827. #define DA9062AA_BUCK1_AUTO_SHIFT 0
  828. #define DA9062AA_BUCK1_AUTO_MASK 0x01
  829. #define DA9062AA_BUCK2_AUTO_SHIFT 1
  830. #define DA9062AA_BUCK2_AUTO_MASK BIT(1)
  831. #define DA9062AA_BUCK4_AUTO_SHIFT 2
  832. #define DA9062AA_BUCK4_AUTO_MASK BIT(2)
  833. #define DA9062AA_BUCK3_AUTO_SHIFT 4
  834. #define DA9062AA_BUCK3_AUTO_MASK BIT(4)
  835. /* DA9062AA_CONFIG_G = 0x10C */
  836. #define DA9062AA_LDO1_AUTO_SHIFT 0
  837. #define DA9062AA_LDO1_AUTO_MASK 0x01
  838. #define DA9062AA_LDO2_AUTO_SHIFT 1
  839. #define DA9062AA_LDO2_AUTO_MASK BIT(1)
  840. #define DA9062AA_LDO3_AUTO_SHIFT 2
  841. #define DA9062AA_LDO3_AUTO_MASK BIT(2)
  842. #define DA9062AA_LDO4_AUTO_SHIFT 3
  843. #define DA9062AA_LDO4_AUTO_MASK BIT(3)
  844. /* DA9062AA_CONFIG_H = 0x10D */
  845. #define DA9062AA_BUCK1_2_MERGE_SHIFT 3
  846. #define DA9062AA_BUCK1_2_MERGE_MASK BIT(3)
  847. #define DA9062AA_BUCK2_OD_SHIFT 5
  848. #define DA9062AA_BUCK2_OD_MASK BIT(5)
  849. #define DA9062AA_BUCK1_OD_SHIFT 6
  850. #define DA9062AA_BUCK1_OD_MASK BIT(6)
  851. /* DA9062AA_CONFIG_I = 0x10E */
  852. #define DA9062AA_NONKEY_PIN_SHIFT 0
  853. #define DA9062AA_NONKEY_PIN_MASK 0x03
  854. #define DA9062AA_nONKEY_SD_SHIFT 2
  855. #define DA9062AA_nONKEY_SD_MASK BIT(2)
  856. #define DA9062AA_WATCHDOG_SD_SHIFT 3
  857. #define DA9062AA_WATCHDOG_SD_MASK BIT(3)
  858. #define DA9062AA_KEY_SD_MODE_SHIFT 4
  859. #define DA9062AA_KEY_SD_MODE_MASK BIT(4)
  860. #define DA9062AA_HOST_SD_MODE_SHIFT 5
  861. #define DA9062AA_HOST_SD_MODE_MASK BIT(5)
  862. #define DA9062AA_INT_SD_MODE_SHIFT 6
  863. #define DA9062AA_INT_SD_MODE_MASK BIT(6)
  864. #define DA9062AA_LDO_SD_SHIFT 7
  865. #define DA9062AA_LDO_SD_MASK BIT(7)
  866. /* DA9062AA_CONFIG_J = 0x10F */
  867. #define DA9062AA_KEY_DELAY_SHIFT 0
  868. #define DA9062AA_KEY_DELAY_MASK 0x03
  869. #define DA9062AA_SHUT_DELAY_SHIFT 2
  870. #define DA9062AA_SHUT_DELAY_MASK (0x03 << 2)
  871. #define DA9062AA_RESET_DURATION_SHIFT 4
  872. #define DA9062AA_RESET_DURATION_MASK (0x03 << 4)
  873. #define DA9062AA_TWOWIRE_TO_SHIFT 6
  874. #define DA9062AA_TWOWIRE_TO_MASK BIT(6)
  875. #define DA9062AA_IF_RESET_SHIFT 7
  876. #define DA9062AA_IF_RESET_MASK BIT(7)
  877. /* DA9062AA_CONFIG_K = 0x110 */
  878. #define DA9062AA_GPIO0_PUPD_SHIFT 0
  879. #define DA9062AA_GPIO0_PUPD_MASK 0x01
  880. #define DA9062AA_GPIO1_PUPD_SHIFT 1
  881. #define DA9062AA_GPIO1_PUPD_MASK BIT(1)
  882. #define DA9062AA_GPIO2_PUPD_SHIFT 2
  883. #define DA9062AA_GPIO2_PUPD_MASK BIT(2)
  884. #define DA9062AA_GPIO3_PUPD_SHIFT 3
  885. #define DA9062AA_GPIO3_PUPD_MASK BIT(3)
  886. #define DA9062AA_GPIO4_PUPD_SHIFT 4
  887. #define DA9062AA_GPIO4_PUPD_MASK BIT(4)
  888. /* DA9062AA_CONFIG_M = 0x112 */
  889. #define DA9062AA_NSHUTDOWN_PU_SHIFT 1
  890. #define DA9062AA_NSHUTDOWN_PU_MASK BIT(1)
  891. #define DA9062AA_WDG_MODE_SHIFT 3
  892. #define DA9062AA_WDG_MODE_MASK BIT(3)
  893. #define DA9062AA_OSC_FRQ_SHIFT 4
  894. #define DA9062AA_OSC_FRQ_MASK (0x0f << 4)
  895. /* DA9062AA_TRIM_CLDR = 0x120 */
  896. #define DA9062AA_TRIM_CLDR_SHIFT 0
  897. #define DA9062AA_TRIM_CLDR_MASK 0xff
  898. /* DA9062AA_GP_ID_0 = 0x121 */
  899. #define DA9062AA_GP_0_SHIFT 0
  900. #define DA9062AA_GP_0_MASK 0xff
  901. /* DA9062AA_GP_ID_1 = 0x122 */
  902. #define DA9062AA_GP_1_SHIFT 0
  903. #define DA9062AA_GP_1_MASK 0xff
  904. /* DA9062AA_GP_ID_2 = 0x123 */
  905. #define DA9062AA_GP_2_SHIFT 0
  906. #define DA9062AA_GP_2_MASK 0xff
  907. /* DA9062AA_GP_ID_3 = 0x124 */
  908. #define DA9062AA_GP_3_SHIFT 0
  909. #define DA9062AA_GP_3_MASK 0xff
  910. /* DA9062AA_GP_ID_4 = 0x125 */
  911. #define DA9062AA_GP_4_SHIFT 0
  912. #define DA9062AA_GP_4_MASK 0xff
  913. /* DA9062AA_GP_ID_5 = 0x126 */
  914. #define DA9062AA_GP_5_SHIFT 0
  915. #define DA9062AA_GP_5_MASK 0xff
  916. /* DA9062AA_GP_ID_6 = 0x127 */
  917. #define DA9062AA_GP_6_SHIFT 0
  918. #define DA9062AA_GP_6_MASK 0xff
  919. /* DA9062AA_GP_ID_7 = 0x128 */
  920. #define DA9062AA_GP_7_SHIFT 0
  921. #define DA9062AA_GP_7_MASK 0xff
  922. /* DA9062AA_GP_ID_8 = 0x129 */
  923. #define DA9062AA_GP_8_SHIFT 0
  924. #define DA9062AA_GP_8_MASK 0xff
  925. /* DA9062AA_GP_ID_9 = 0x12A */
  926. #define DA9062AA_GP_9_SHIFT 0
  927. #define DA9062AA_GP_9_MASK 0xff
  928. /* DA9062AA_GP_ID_10 = 0x12B */
  929. #define DA9062AA_GP_10_SHIFT 0
  930. #define DA9062AA_GP_10_MASK 0xff
  931. /* DA9062AA_GP_ID_11 = 0x12C */
  932. #define DA9062AA_GP_11_SHIFT 0
  933. #define DA9062AA_GP_11_MASK 0xff
  934. /* DA9062AA_GP_ID_12 = 0x12D */
  935. #define DA9062AA_GP_12_SHIFT 0
  936. #define DA9062AA_GP_12_MASK 0xff
  937. /* DA9062AA_GP_ID_13 = 0x12E */
  938. #define DA9062AA_GP_13_SHIFT 0
  939. #define DA9062AA_GP_13_MASK 0xff
  940. /* DA9062AA_GP_ID_14 = 0x12F */
  941. #define DA9062AA_GP_14_SHIFT 0
  942. #define DA9062AA_GP_14_MASK 0xff
  943. /* DA9062AA_GP_ID_15 = 0x130 */
  944. #define DA9062AA_GP_15_SHIFT 0
  945. #define DA9062AA_GP_15_MASK 0xff
  946. /* DA9062AA_GP_ID_16 = 0x131 */
  947. #define DA9062AA_GP_16_SHIFT 0
  948. #define DA9062AA_GP_16_MASK 0xff
  949. /* DA9062AA_GP_ID_17 = 0x132 */
  950. #define DA9062AA_GP_17_SHIFT 0
  951. #define DA9062AA_GP_17_MASK 0xff
  952. /* DA9062AA_GP_ID_18 = 0x133 */
  953. #define DA9062AA_GP_18_SHIFT 0
  954. #define DA9062AA_GP_18_MASK 0xff
  955. /* DA9062AA_GP_ID_19 = 0x134 */
  956. #define DA9062AA_GP_19_SHIFT 0
  957. #define DA9062AA_GP_19_MASK 0xff
  958. /* DA9062AA_DEVICE_ID = 0x181 */
  959. #define DA9062AA_DEV_ID_SHIFT 0
  960. #define DA9062AA_DEV_ID_MASK 0xff
  961. /* DA9062AA_VARIANT_ID = 0x182 */
  962. #define DA9062AA_VRC_SHIFT 0
  963. #define DA9062AA_VRC_MASK 0x0f
  964. #define DA9062AA_MRC_SHIFT 4
  965. #define DA9062AA_MRC_MASK (0x0f << 4)
  966. /* DA9062AA_CUSTOMER_ID = 0x183 */
  967. #define DA9062AA_CUST_ID_SHIFT 0
  968. #define DA9062AA_CUST_ID_MASK 0xff
  969. /* DA9062AA_CONFIG_ID = 0x184 */
  970. #define DA9062AA_CONFIG_REV_SHIFT 0
  971. #define DA9062AA_CONFIG_REV_MASK 0xff
  972. #endif /* __DA9062_H__ */