cp_freq_bias.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _CP_FREQ_BIAS_H_
  13. #define _CP_FREQ_BIAS_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_CP_FREQ_BIAS_BASE (0x12080000)
  17. typedef volatile struct
  18. {
  19. uint32_t raw_int_sts; // 0x00000000
  20. uint32_t int_en; // 0x00000004
  21. uint32_t masked_int_sts; // 0x00000008
  22. uint32_t int_clr; // 0x0000000c
  23. uint32_t freq_bias_ctrl_0; // 0x00000010
  24. uint32_t freq_bias_ctrl_1; // 0x00000014
  25. uint32_t freq_bias_ctrl_2; // 0x00000018
  26. uint32_t freq_bias_ctrl_3; // 0x0000001c
  27. uint32_t freq_bias_ctrl_4; // 0x00000020
  28. uint32_t freq_bias_ctrl_5; // 0x00000024
  29. uint32_t freq_bias_ctrl_6; // 0x00000028
  30. uint32_t freq_bias_ctrl_7; // 0x0000002c
  31. uint32_t freq_bias_ctrl_8; // 0x00000030
  32. uint32_t freq_bias_ctrl_9; // 0x00000034
  33. uint32_t freq_bias_soft_val; // 0x00000038
  34. uint32_t freq_bias_upd_cnter; // 0x0000003c
  35. uint32_t freq_bias_temp_upd_cnter; // 0x00000040
  36. uint32_t freq_bias_ctrl_10; // 0x00000044
  37. uint32_t freq_bias_ctrl_11; // 0x00000048
  38. uint32_t freq_bias_ctrl_12; // 0x0000004c
  39. uint32_t freq_bias_ctrl_13; // 0x00000050
  40. uint32_t freq_bias_ctrl_14; // 0x00000054
  41. uint32_t __88[10]; // 0x00000058
  42. uint32_t freq_bias_status0; // 0x00000080
  43. uint32_t freq_bias_status1; // 0x00000084
  44. uint32_t freq_bias_status2; // 0x00000088
  45. uint32_t freq_bias_status3; // 0x0000008c
  46. uint32_t freq_bias_status4; // 0x00000090
  47. uint32_t freq_bias_ctrl_15; // 0x00000094
  48. uint32_t freq_bias_ctrl_16; // 0x00000098
  49. uint32_t freq_bias_ctrl_17; // 0x0000009c
  50. uint32_t freq_bias_ctrl_18; // 0x000000a0
  51. uint32_t freq_bias_ctrl_19; // 0x000000a4
  52. uint32_t freq_bias_ctrl_20; // 0x000000a8
  53. uint32_t freq_bias_ctrl_21; // 0x000000ac
  54. uint32_t freq_bias_ctrl_22; // 0x000000b0
  55. uint32_t freq_bias_ctrl_23; // 0x000000b4
  56. uint32_t freq_bias_ctrl_24; // 0x000000b8
  57. uint32_t freq_bias_ctrl_25; // 0x000000bc
  58. uint32_t freq_bias_ctrl_26; // 0x000000c0
  59. uint32_t freq_bias_ctrl_27; // 0x000000c4
  60. uint32_t freq_bias_ctrl_28; // 0x000000c8
  61. uint32_t freq_bias_ctrl_29; // 0x000000cc
  62. uint32_t freq_bias_ctrl_30; // 0x000000d0
  63. uint32_t freq_bias_ctrl_31; // 0x000000d4
  64. uint32_t freq_bias_ctrl_32; // 0x000000d8
  65. uint32_t freq_bias_ctrl_33; // 0x000000dc
  66. uint32_t freq_bias_rpt0; // 0x000000e0
  67. uint32_t freq_bias_rpt1; // 0x000000e4
  68. uint32_t freq_bias_rpt2; // 0x000000e8
  69. uint32_t freq_bias_rpt3; // 0x000000ec
  70. uint32_t freq_bias_rpt4; // 0x000000f0
  71. } HWP_CP_FREQ_BIAS_T;
  72. #define hwp_cpFreqBias ((HWP_CP_FREQ_BIAS_T *)REG_ACCESS_ADDRESS(REG_CP_FREQ_BIAS_BASE))
  73. // freq_bias_ctrl_0
  74. typedef union {
  75. uint32_t v;
  76. struct
  77. {
  78. uint32_t cal_en_temp : 1; // [0]
  79. uint32_t osc_cal_en_temp : 1; // [1]
  80. uint32_t __2_2 : 1; // [2]
  81. uint32_t thm_adc_dump_en : 1; // [3]
  82. uint32_t filter_en_temp : 1; // [4]
  83. uint32_t osc_temp_filter_en : 1; // [5]
  84. uint32_t __7_6 : 2; // [7:6]
  85. uint32_t edge_sel_temp : 1; // [8]
  86. uint32_t srst_inter_thm : 1; // [9]
  87. uint32_t osc_edge_sel_temp : 1; // [10]
  88. uint32_t srst_osc_inter_thm : 1; // [11]
  89. uint32_t freq_bias_src_mode : 1; // [12]
  90. uint32_t freq_bias_mode1 : 1; // [13]
  91. uint32_t switch_enb : 1; // [14]
  92. uint32_t input_flag : 1; // [15]
  93. uint32_t temp_comp_shift : 4; // [19:16]
  94. uint32_t osc_temp_comp_shift : 4; // [23:20]
  95. uint32_t freq_bias_mode : 1; // [24]
  96. uint32_t osc_src_mode : 1; // [25]
  97. uint32_t ext_chan_sel_mode : 1; // [26]
  98. uint32_t ext_chan_sel_sw : 1; // [27]
  99. uint32_t frac_freq_div_en : 1; // [28]
  100. uint32_t __31_29 : 3; // [31:29]
  101. } b;
  102. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_0_T;
  103. // freq_bias_ctrl_1
  104. typedef union {
  105. uint32_t v;
  106. struct
  107. {
  108. uint32_t intergration_len_temp : 20; // [19:0]
  109. uint32_t __31_20 : 12; // [31:20]
  110. } b;
  111. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_1_T;
  112. // freq_bias_ctrl_2
  113. typedef union {
  114. uint32_t v;
  115. struct
  116. {
  117. uint32_t c0_temp : 16; // [15:0]
  118. uint32_t __31_16 : 16; // [31:16]
  119. } b;
  120. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_2_T;
  121. // freq_bias_ctrl_3
  122. typedef union {
  123. uint32_t v;
  124. struct
  125. {
  126. uint32_t c1_temp : 16; // [15:0]
  127. uint32_t __31_16 : 16; // [31:16]
  128. } b;
  129. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_3_T;
  130. // freq_bias_ctrl_4
  131. typedef union {
  132. uint32_t v;
  133. struct
  134. {
  135. uint32_t c2_temp : 16; // [15:0]
  136. uint32_t __31_16 : 16; // [31:16]
  137. } b;
  138. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_4_T;
  139. // freq_bias_ctrl_5
  140. typedef union {
  141. uint32_t v;
  142. struct
  143. {
  144. uint32_t c3_temp : 16; // [15:0]
  145. uint32_t __31_16 : 16; // [31:16]
  146. } b;
  147. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_5_T;
  148. // freq_bias_ctrl_7
  149. typedef union {
  150. uint32_t v;
  151. struct
  152. {
  153. uint32_t ext_conf_en : 1; // [0]
  154. uint32_t ext_conf_sync_order : 1; // [1]
  155. uint32_t ext_conf_clk_init_val : 1; // [2]
  156. uint32_t __3_3 : 1; // [3]
  157. uint32_t ext_conf_best_pos : 5; // [8:4]
  158. uint32_t __11_9 : 3; // [11:9]
  159. uint32_t ext_conf_first_pls_pos : 4; // [15:12]
  160. uint32_t ext_conf_cnter_max : 5; // [20:16]
  161. uint32_t __23_21 : 3; // [23:21]
  162. uint32_t ext_conf_clk_init_pos : 4; // [27:24]
  163. uint32_t ext_conf_clk_inv_pos : 4; // [31:28]
  164. } b;
  165. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_7_T;
  166. // freq_bias_ctrl_8
  167. typedef union {
  168. uint32_t v;
  169. struct
  170. {
  171. uint32_t osc_temp_offset : 20; // [19:0]
  172. uint32_t __31_20 : 12; // [31:20]
  173. } b;
  174. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_8_T;
  175. // freq_bias_ctrl_9
  176. typedef union {
  177. uint32_t v;
  178. struct
  179. {
  180. uint32_t osc_c0_temp : 16; // [15:0]
  181. uint32_t __31_16 : 16; // [31:16]
  182. } b;
  183. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_9_T;
  184. // freq_bias_soft_val
  185. typedef union {
  186. uint32_t v;
  187. struct
  188. {
  189. uint32_t freq_bias_soft_val : 26; // [25:0]
  190. uint32_t __30_26 : 5; // [30:26]
  191. uint32_t freq_bias_soft_val_upd : 1; // [31]
  192. } b;
  193. } REG_CP_FREQ_BIAS_FREQ_BIAS_SOFT_VAL_T;
  194. // freq_bias_ctrl_10
  195. typedef union {
  196. uint32_t v;
  197. struct
  198. {
  199. uint32_t osc_c1_temp : 16; // [15:0]
  200. uint32_t __31_16 : 16; // [31:16]
  201. } b;
  202. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_10_T;
  203. // freq_bias_ctrl_11
  204. typedef union {
  205. uint32_t v;
  206. struct
  207. {
  208. uint32_t osc_c2_temp : 16; // [15:0]
  209. uint32_t __31_16 : 16; // [31:16]
  210. } b;
  211. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_11_T;
  212. // freq_bias_ctrl_12
  213. typedef union {
  214. uint32_t v;
  215. struct
  216. {
  217. uint32_t osc_c3_temp : 16; // [15:0]
  218. uint32_t __31_16 : 16; // [31:16]
  219. } b;
  220. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_12_T;
  221. // freq_bias_ctrl_13
  222. typedef union {
  223. uint32_t v;
  224. struct
  225. {
  226. uint32_t adc_delay_num : 20; // [19:0]
  227. uint32_t tsx_data_num : 6; // [25:20]
  228. uint32_t osc_data_num : 6; // [31:26]
  229. } b;
  230. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_13_T;
  231. // freq_bias_ctrl_14
  232. typedef union {
  233. uint32_t v;
  234. struct
  235. {
  236. uint32_t ext_conf_frac_en : 1; // [0]
  237. uint32_t ext_conf_frac_sync_order : 1; // [1]
  238. uint32_t ext_conf_frac_clk_sel : 1; // [2]
  239. uint32_t __3_3 : 1; // [3]
  240. uint32_t ext_conf_frac_cnter_max : 4; // [7:4]
  241. uint32_t ext_conf_first_pls_pos : 4; // [11:8]
  242. uint32_t ext_conf_toggle_pos : 4; // [15:12]
  243. uint32_t ext_conf_toggle_neg : 4; // [19:16]
  244. uint32_t __31_20 : 12; // [31:20]
  245. } b;
  246. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_14_T;
  247. // freq_bias_status0
  248. typedef union {
  249. uint32_t v;
  250. struct
  251. {
  252. uint32_t freq_bias : 26; // [25:0], read only
  253. uint32_t __30_26 : 5; // [30:26]
  254. uint32_t freq_raw_bias_upd : 1; // [31], read only
  255. } b;
  256. } REG_CP_FREQ_BIAS_FREQ_BIAS_STATUS0_T;
  257. // freq_bias_status1
  258. typedef union {
  259. uint32_t v;
  260. struct
  261. {
  262. uint32_t freq_bias_temp : 20; // [19:0], read only
  263. uint32_t __30_20 : 11; // [30:20]
  264. uint32_t freq_bias_integer_upd : 1; // [31], read only
  265. } b;
  266. } REG_CP_FREQ_BIAS_FREQ_BIAS_STATUS1_T;
  267. // freq_bias_status2
  268. typedef union {
  269. uint32_t v;
  270. struct
  271. {
  272. uint32_t osc_freq_bias : 26; // [25:0], read only
  273. uint32_t __30_26 : 5; // [30:26]
  274. uint32_t osc_freq_raw_bias_upd : 1; // [31], read only
  275. } b;
  276. } REG_CP_FREQ_BIAS_FREQ_BIAS_STATUS2_T;
  277. // freq_bias_status3
  278. typedef union {
  279. uint32_t v;
  280. struct
  281. {
  282. uint32_t osc_freq_bias_temp : 20; // [19:0], read only
  283. uint32_t __30_20 : 11; // [30:20]
  284. uint32_t osc_freq_bias_integer_upd : 1; // [31], read only
  285. } b;
  286. } REG_CP_FREQ_BIAS_FREQ_BIAS_STATUS3_T;
  287. // freq_bias_status4
  288. typedef union {
  289. uint32_t v;
  290. struct
  291. {
  292. uint32_t freq_bias_sum : 26; // [25:0], read only
  293. uint32_t __30_26 : 5; // [30:26]
  294. uint32_t freq_bias_sum_upd : 1; // [31], read only
  295. } b;
  296. } REG_CP_FREQ_BIAS_FREQ_BIAS_STATUS4_T;
  297. // freq_bias_ctrl_15
  298. typedef union {
  299. uint32_t v;
  300. struct
  301. {
  302. uint32_t osc_alpha : 16; // [15:0]
  303. uint32_t osc_rate_deltat : 16; // [31:16]
  304. } b;
  305. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_15_T;
  306. // freq_bias_ctrl_16
  307. typedef union {
  308. uint32_t v;
  309. struct
  310. {
  311. uint32_t osc_t2reset_cnt_clr : 1; // [0]
  312. uint32_t osc_t2reset_num : 6; // [6:1]
  313. uint32_t osc_freq_bias_sel : 1; // [7]
  314. uint32_t __31_8 : 24; // [31:8]
  315. } b;
  316. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_16_T;
  317. // freq_bias_ctrl_17
  318. typedef union {
  319. uint32_t v;
  320. struct
  321. {
  322. uint32_t tsx_alpha : 16; // [15:0]
  323. uint32_t tsx_rate_deltat : 16; // [31:16]
  324. } b;
  325. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_17_T;
  326. // freq_bias_ctrl_18
  327. typedef union {
  328. uint32_t v;
  329. struct
  330. {
  331. uint32_t tsx_t2reset_cnt_clr : 1; // [0]
  332. uint32_t __1_1 : 1; // [1]
  333. uint32_t tsx_smth_coef : 5; // [6:2]
  334. uint32_t tsx_ratehys_coef : 12; // [18:7]
  335. uint32_t tsx_fcalth_coef : 12; // [30:19]
  336. uint32_t tsx_freq_bias_sel : 1; // [31]
  337. } b;
  338. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_18_T;
  339. // freq_bias_ctrl_19
  340. typedef union {
  341. uint32_t v;
  342. struct
  343. {
  344. uint32_t tsx_fcalth_osft : 26; // [25:0]
  345. uint32_t tsx_t2reset_num : 6; // [31:26]
  346. } b;
  347. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_19_T;
  348. // freq_bias_ctrl_20
  349. typedef union {
  350. uint32_t v;
  351. struct
  352. {
  353. uint32_t tsx_age_th : 16; // [15:0]
  354. uint32_t tsx_age_th_inv : 16; // [31:16]
  355. } b;
  356. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_20_T;
  357. // freq_bias_ctrl_21
  358. typedef union {
  359. uint32_t v;
  360. struct
  361. {
  362. uint32_t tsx_ratehys_ofst : 16; // [15:0]
  363. uint32_t tsx_maxtemp_rate_th : 16; // [31:16]
  364. } b;
  365. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_21_T;
  366. // freq_bias_ctrl_32
  367. typedef union {
  368. uint32_t v;
  369. struct
  370. {
  371. uint32_t tsx_rate_tab_val20 : 16; // [15:0]
  372. uint32_t __31_16 : 16; // [31:16]
  373. } b;
  374. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_32_T;
  375. // freq_bias_ctrl_33
  376. typedef union {
  377. uint32_t v;
  378. struct
  379. {
  380. uint32_t tsx_temp_th : 20; // [19:0]
  381. uint32_t tsx_smth_sft : 3; // [22:20]
  382. uint32_t __31_23 : 9; // [31:23]
  383. } b;
  384. } REG_CP_FREQ_BIAS_FREQ_BIAS_CTRL_33_T;
  385. // freq_bias_rpt0
  386. typedef union {
  387. uint32_t v;
  388. struct
  389. {
  390. uint32_t osc_temp : 20; // [19:0], read only
  391. uint32_t __31_20 : 12; // [31:20]
  392. } b;
  393. } REG_CP_FREQ_BIAS_FREQ_BIAS_RPT0_T;
  394. // freq_bias_rpt1
  395. typedef union {
  396. uint32_t v;
  397. struct
  398. {
  399. uint32_t osc_temp2 : 28; // [27:0], read only
  400. uint32_t __31_28 : 4; // [31:28]
  401. } b;
  402. } REG_CP_FREQ_BIAS_FREQ_BIAS_RPT1_T;
  403. // freq_bias_rpt2
  404. typedef union {
  405. uint32_t v;
  406. struct
  407. {
  408. uint32_t tsx_temp : 20; // [19:0], read only
  409. uint32_t __31_20 : 12; // [31:20]
  410. } b;
  411. } REG_CP_FREQ_BIAS_FREQ_BIAS_RPT2_T;
  412. // freq_bias_rpt3
  413. typedef union {
  414. uint32_t v;
  415. struct
  416. {
  417. uint32_t tsx_temp2 : 28; // [27:0], read only
  418. uint32_t __31_28 : 4; // [31:28]
  419. } b;
  420. } REG_CP_FREQ_BIAS_FREQ_BIAS_RPT3_T;
  421. // freq_bias_rpt4
  422. typedef union {
  423. uint32_t v;
  424. struct
  425. {
  426. uint32_t tsx_fcal : 26; // [25:0], read only
  427. uint32_t __31_26 : 6; // [31:26]
  428. } b;
  429. } REG_CP_FREQ_BIAS_FREQ_BIAS_RPT4_T;
  430. // freq_bias_ctrl_0
  431. #define CP_FREQ_BIAS_CAL_EN_TEMP (1 << 0)
  432. #define CP_FREQ_BIAS_OSC_CAL_EN_TEMP (1 << 1)
  433. #define CP_FREQ_BIAS_THM_ADC_DUMP_EN (1 << 3)
  434. #define CP_FREQ_BIAS_FILTER_EN_TEMP (1 << 4)
  435. #define CP_FREQ_BIAS_OSC_TEMP_FILTER_EN (1 << 5)
  436. #define CP_FREQ_BIAS_EDGE_SEL_TEMP (1 << 8)
  437. #define CP_FREQ_BIAS_SRST_INTER_THM (1 << 9)
  438. #define CP_FREQ_BIAS_OSC_EDGE_SEL_TEMP (1 << 10)
  439. #define CP_FREQ_BIAS_SRST_OSC_INTER_THM (1 << 11)
  440. #define CP_FREQ_BIAS_FREQ_BIAS_SRC_MODE (1 << 12)
  441. #define CP_FREQ_BIAS_FREQ_BIAS_MODE1 (1 << 13)
  442. #define CP_FREQ_BIAS_SWITCH_ENB (1 << 14)
  443. #define CP_FREQ_BIAS_INPUT_FLAG (1 << 15)
  444. #define CP_FREQ_BIAS_TEMP_COMP_SHIFT(n) (((n)&0xf) << 16)
  445. #define CP_FREQ_BIAS_OSC_TEMP_COMP_SHIFT(n) (((n)&0xf) << 20)
  446. #define CP_FREQ_BIAS_FREQ_BIAS_MODE (1 << 24)
  447. #define CP_FREQ_BIAS_OSC_SRC_MODE (1 << 25)
  448. #define CP_FREQ_BIAS_EXT_CHAN_SEL_MODE (1 << 26)
  449. #define CP_FREQ_BIAS_EXT_CHAN_SEL_SW (1 << 27)
  450. #define CP_FREQ_BIAS_FRAC_FREQ_DIV_EN (1 << 28)
  451. // freq_bias_ctrl_1
  452. #define CP_FREQ_BIAS_INTERGRATION_LEN_TEMP(n) (((n)&0xfffff) << 0)
  453. // freq_bias_ctrl_2
  454. #define CP_FREQ_BIAS_C0_TEMP(n) (((n)&0xffff) << 0)
  455. // freq_bias_ctrl_3
  456. #define CP_FREQ_BIAS_C1_TEMP(n) (((n)&0xffff) << 0)
  457. // freq_bias_ctrl_4
  458. #define CP_FREQ_BIAS_C2_TEMP(n) (((n)&0xffff) << 0)
  459. // freq_bias_ctrl_5
  460. #define CP_FREQ_BIAS_C3_TEMP(n) (((n)&0xffff) << 0)
  461. // freq_bias_ctrl_7
  462. #define CP_FREQ_BIAS_EXT_CONF_EN (1 << 0)
  463. #define CP_FREQ_BIAS_EXT_CONF_SYNC_ORDER (1 << 1)
  464. #define CP_FREQ_BIAS_EXT_CONF_CLK_INIT_VAL (1 << 2)
  465. #define CP_FREQ_BIAS_EXT_CONF_BEST_POS(n) (((n)&0x1f) << 4)
  466. #define CP_FREQ_BIAS_FREQ_BIAS_CTRL_7_EXT_CONF_FIRST_PLS_POS(n) (((n)&0xf) << 12)
  467. #define CP_FREQ_BIAS_EXT_CONF_CNTER_MAX(n) (((n)&0x1f) << 16)
  468. #define CP_FREQ_BIAS_EXT_CONF_CLK_INIT_POS(n) (((n)&0xf) << 24)
  469. #define CP_FREQ_BIAS_EXT_CONF_CLK_INV_POS(n) (((n)&0xf) << 28)
  470. // freq_bias_ctrl_8
  471. #define CP_FREQ_BIAS_OSC_TEMP_OFFSET(n) (((n)&0xfffff) << 0)
  472. // freq_bias_ctrl_9
  473. #define CP_FREQ_BIAS_OSC_C0_TEMP(n) (((n)&0xffff) << 0)
  474. // freq_bias_soft_val
  475. #define CP_FREQ_BIAS_FREQ_BIAS_SOFT_VAL(n) (((n)&0x3ffffff) << 0)
  476. #define CP_FREQ_BIAS_FREQ_BIAS_SOFT_VAL_UPD (1 << 31)
  477. // freq_bias_ctrl_10
  478. #define CP_FREQ_BIAS_OSC_C1_TEMP(n) (((n)&0xffff) << 0)
  479. // freq_bias_ctrl_11
  480. #define CP_FREQ_BIAS_OSC_C2_TEMP(n) (((n)&0xffff) << 0)
  481. // freq_bias_ctrl_12
  482. #define CP_FREQ_BIAS_OSC_C3_TEMP(n) (((n)&0xffff) << 0)
  483. // freq_bias_ctrl_13
  484. #define CP_FREQ_BIAS_ADC_DELAY_NUM(n) (((n)&0xfffff) << 0)
  485. #define CP_FREQ_BIAS_TSX_DATA_NUM(n) (((n)&0x3f) << 20)
  486. #define CP_FREQ_BIAS_OSC_DATA_NUM(n) (((n)&0x3f) << 26)
  487. // freq_bias_ctrl_14
  488. #define CP_FREQ_BIAS_EXT_CONF_FRAC_EN (1 << 0)
  489. #define CP_FREQ_BIAS_EXT_CONF_FRAC_SYNC_ORDER (1 << 1)
  490. #define CP_FREQ_BIAS_EXT_CONF_FRAC_CLK_SEL (1 << 2)
  491. #define CP_FREQ_BIAS_EXT_CONF_FRAC_CNTER_MAX(n) (((n)&0xf) << 4)
  492. #define CP_FREQ_BIAS_FREQ_BIAS_CTRL_14_EXT_CONF_FIRST_PLS_POS(n) (((n)&0xf) << 8)
  493. #define CP_FREQ_BIAS_EXT_CONF_TOGGLE_POS(n) (((n)&0xf) << 12)
  494. #define CP_FREQ_BIAS_EXT_CONF_TOGGLE_NEG(n) (((n)&0xf) << 16)
  495. // freq_bias_status0
  496. #define CP_FREQ_BIAS_FREQ_BIAS(n) (((n)&0x3ffffff) << 0)
  497. #define CP_FREQ_BIAS_FREQ_RAW_BIAS_UPD (1 << 31)
  498. // freq_bias_status1
  499. #define CP_FREQ_BIAS_FREQ_BIAS_TEMP(n) (((n)&0xfffff) << 0)
  500. #define CP_FREQ_BIAS_FREQ_BIAS_INTEGER_UPD (1 << 31)
  501. // freq_bias_status2
  502. #define CP_FREQ_BIAS_OSC_FREQ_BIAS(n) (((n)&0x3ffffff) << 0)
  503. #define CP_FREQ_BIAS_OSC_FREQ_RAW_BIAS_UPD (1 << 31)
  504. // freq_bias_status3
  505. #define CP_FREQ_BIAS_OSC_FREQ_BIAS_TEMP(n) (((n)&0xfffff) << 0)
  506. #define CP_FREQ_BIAS_OSC_FREQ_BIAS_INTEGER_UPD (1 << 31)
  507. // freq_bias_status4
  508. #define CP_FREQ_BIAS_FREQ_BIAS_SUM(n) (((n)&0x3ffffff) << 0)
  509. #define CP_FREQ_BIAS_FREQ_BIAS_SUM_UPD (1 << 31)
  510. // freq_bias_ctrl_15
  511. #define CP_FREQ_BIAS_OSC_ALPHA(n) (((n)&0xffff) << 0)
  512. #define CP_FREQ_BIAS_OSC_RATE_DELTAT(n) (((n)&0xffff) << 16)
  513. // freq_bias_ctrl_16
  514. #define CP_FREQ_BIAS_OSC_T2RESET_CNT_CLR (1 << 0)
  515. #define CP_FREQ_BIAS_OSC_T2RESET_NUM(n) (((n)&0x3f) << 1)
  516. #define CP_FREQ_BIAS_OSC_FREQ_BIAS_SEL (1 << 7)
  517. // freq_bias_ctrl_17
  518. #define CP_FREQ_BIAS_TSX_ALPHA(n) (((n)&0xffff) << 0)
  519. #define CP_FREQ_BIAS_TSX_RATE_DELTAT(n) (((n)&0xffff) << 16)
  520. // freq_bias_ctrl_18
  521. #define CP_FREQ_BIAS_TSX_T2RESET_CNT_CLR (1 << 0)
  522. #define CP_FREQ_BIAS_TSX_SMTH_COEF(n) (((n)&0x1f) << 2)
  523. #define CP_FREQ_BIAS_TSX_RATEHYS_COEF(n) (((n)&0xfff) << 7)
  524. #define CP_FREQ_BIAS_TSX_FCALTH_COEF(n) (((n)&0xfff) << 19)
  525. #define CP_FREQ_BIAS_TSX_FREQ_BIAS_SEL (1 << 31)
  526. // freq_bias_ctrl_19
  527. #define CP_FREQ_BIAS_TSX_FCALTH_OSFT(n) (((n)&0x3ffffff) << 0)
  528. #define CP_FREQ_BIAS_TSX_T2RESET_NUM(n) (((n)&0x3f) << 26)
  529. // freq_bias_ctrl_20
  530. #define CP_FREQ_BIAS_TSX_AGE_TH(n) (((n)&0xffff) << 0)
  531. #define CP_FREQ_BIAS_TSX_AGE_TH_INV(n) (((n)&0xffff) << 16)
  532. // freq_bias_ctrl_21
  533. #define CP_FREQ_BIAS_TSX_RATEHYS_OFST(n) (((n)&0xffff) << 0)
  534. #define CP_FREQ_BIAS_TSX_MAXTEMP_RATE_TH(n) (((n)&0xffff) << 16)
  535. // freq_bias_ctrl_32
  536. #define CP_FREQ_BIAS_TSX_RATE_TAB_VAL20(n) (((n)&0xffff) << 0)
  537. // freq_bias_ctrl_33
  538. #define CP_FREQ_BIAS_TSX_TEMP_TH(n) (((n)&0xfffff) << 0)
  539. #define CP_FREQ_BIAS_TSX_SMTH_SFT(n) (((n)&0x7) << 20)
  540. // freq_bias_rpt0
  541. #define CP_FREQ_BIAS_OSC_TEMP(n) (((n)&0xfffff) << 0)
  542. // freq_bias_rpt1
  543. #define CP_FREQ_BIAS_OSC_TEMP2(n) (((n)&0xfffffff) << 0)
  544. // freq_bias_rpt2
  545. #define CP_FREQ_BIAS_TSX_TEMP(n) (((n)&0xfffff) << 0)
  546. // freq_bias_rpt3
  547. #define CP_FREQ_BIAS_TSX_TEMP2(n) (((n)&0xfffffff) << 0)
  548. // freq_bias_rpt4
  549. #define CP_FREQ_BIAS_TSX_FCAL(n) (((n)&0x3ffffff) << 0)
  550. #endif // _CP_FREQ_BIAS_H_