adc_reg.h 92 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868
  1. #ifndef _ADC_REG_H_
  2. #define _ADC_REG_H_
  3. #include <drv_debug.h>
  4. #define Adc_kSourceCOMP1 YPP1 //YPP_INPUT
  5. #define Adc_kSourceCOMP2 YPP2 //YPP_INPUT2
  6. #define Adc_kSourceCOMP3 YPP3 //YPP_INPUT3
  7. #define Adc_kSourceSCART_RGB1 SCART_RGB1
  8. #define Adc_kSourceVGA DSUB //VGA
  9. //ADC register
  10. #define I2cAddrADC 0x9A
  11. #define MMIOAddrADC 0xbe150000
  12. //cs option
  13. /* 0x000[0]
  14. Reset all digital blocks */
  15. #define ADC_REG_adi_reset 0x00000000
  16. /* 0x000[1]
  17. 1: single direction debouncing (only low pulse)
  18. 0: double direction debouncing (high pulse and low pulse) */
  19. #define ADC_REG_cs_debounce 0x00210000
  20. /* 0x000[2]
  21. Csync input polarity adjust */
  22. #define ADC_REG_adi_pol_cs 0x00420000
  23. /* 0x000[3]
  24. 0: debouncing length controlled by sd_mode,
  25. 1: debouncing length controlled by register */
  26. #define ADC_REG_cs_db_ctrl 0x00630000
  27. /* 0x000[5:4]
  28. 3 types (use reg_cs_coast_sel and reg_cs_coast_every to form 5 combination) */
  29. #define ADC_REG_cs_coast_sel 0x00a40000
  30. /* 0x000[7:6]
  31. 0,3: both_stable = rstable_nom && fstable_nom
  32. 1: both_stable = rstable_nom
  33. 2: both_stable = fstable_nom */
  34. #define ADC_REG_cs_stable_condition 0x00e60000
  35. /* 0x001[4:0]
  36. Csync range stable threshold in rclk cycle(risng-to-risng, falling-to-falling) */
  37. #define ADC_REG_cs_rthd 0x00800001
  38. /* 0x001[7:5]
  39. Debounce delay select (only works when reg_cs_debounce = 1)
  40. 0: 4 cycles, 1: 9 cycles, 2: 14cycles, 3: 19 cycles,
  41. 4: 24cycles, 5: 29cycles, 6: 34cycles, 7: 39cycles */
  42. #define ADC_REG_cs_db_sel 0x00e50001
  43. /* 0x002[7:0]
  44. Csync number limitation for coast (Continuous stable line threshold), the value should
  45. larger than pulse-width of vsync and less than pulse-distance between two vsyncs */
  46. #define ADC_REG_cs_count_rise_lim 0x00e00002
  47. /* 0x003[5:0]
  48. Coast length */
  49. #define ADC_REG_cs_coast_length 0x00a00003
  50. /* 0x003[7:6]
  51. 1: dport 1 , others: dport 0 */
  52. #define ADC_REG_cs_dport_sel 0x00e60003
  53. /* 0x004[3:0]
  54. Post coast */
  55. #define ADC_REG_cs_post_coast 0x00600004
  56. /* 0x004[6:4]
  57. Pre coast */
  58. #define ADC_REG_cs_pre_coast 0x00c40004
  59. /* 0x004[7]
  60. 1: vs_level_cnt fast forwarded to its destination, when the threshold met */
  61. #define ADC_REG_cs_vsff 0x00e70004
  62. /* 0x005[2:0]
  63. Coast start line for type 0 */
  64. #define ADC_REG_cs_coast_start 0x00400005
  65. /* 0x005[3]
  66. 1:Set the coast output(coast_pw) to high until cs_stable_i2 */
  67. #define ADC_REG_cs_coast_defaulth 0x00630005
  68. /* 0x005[6:4]
  69. Csync (vsync) stable threshold in hsync count (for cs_stable_i)
  70. (stable threshold for field line count) */
  71. #define ADC_REG_cs_vstable_thd 0x00c40005
  72. // 0x005[7] reserved
  73. /* 0x006[7:0]
  74. Use "N" stable lines to search Htotal maximum value */
  75. #define ADC_REG_cs_httl_sch_range 0x00e00006
  76. /* 0x007[7:0]
  77. Coast start position for type 1 and 2 for indicating hsync */
  78. #define ADC_REG_cs_coast_pstart 0x00e00007
  79. /* 0x008[7:0]
  80. Coast end position for type 1 and 2 for indicating hsync */
  81. #define ADC_REG_cs_coast_pend 0x00e00008
  82. /* 0x009[0]
  83. Coast all except hsync */
  84. #define ADC_REG_cs_coast_every 0x00000009
  85. /* 0x009[1]
  86. Coast polarity adjust */
  87. #define ADC_REG_cs_coast_pol 0x00210009
  88. /* 0x009[2]
  89. Clamp polarity adjust */
  90. #define ADC_REG_cs_clamp_pol 0x00420009
  91. /* 0x009[3]
  92. Field polarity adjust */
  93. #define ADC_REG_cs_field_pol 0x00630009
  94. /* 0x009[7:4]
  95. Vsync inactive detection threshold
  96. 0: 2/16 htotal, 1: 3/16 htotal, 2: 4/16 htotal, 3: 5/16 htotal
  97. 4: 6/16 htotal, 5: 7/16 htotal, 6: 8/16 htotal, 7: 9/16 htotal
  98. 8: 1/16 htotal */
  99. #define ADC_REG_cs_vshp 0x00e40009
  100. /* 0x00a[7:0]
  101. Clamp start position after hsync (refer to Csync rising(second) edge) */
  102. #define ADC_REG_cs_clamp_start 0x00e0000a
  103. /* 0x00b[7:0]
  104. Clamp duration */
  105. #define ADC_REG_cs_clamp_width 0x00e0000b
  106. /* 0x00c[3:0]
  107. Vsync active detection threshold
  108. 0: 2/16 htotal, 1: 3/16 htotal, 2: 4/16 htotal, 3: 5/16 htotal
  109. 4: 6/16 htotal, 5: 7/16 htotal, 6: 8/16 htotal, 7: 9/16 htotal
  110. 8: 1/16 htotal */
  111. #define ADC_REG_cs_vslp 0x0060000c
  112. /* 0x00c[7:4]
  113. The 4 extentsion bits (MSB) for reg_cs_rthd */
  114. #define ADC_REG_cs_rthd_ms4b 0x00e4000c
  115. /* 0x00d[0]
  116. Select a field as output,
  117. 0: original, 1: alternative one */
  118. #define ADC_REG_cs_field_sel 0x0000000d
  119. /* 0x00d[2:1]
  120. Set the line center threshold for alternative field,
  121. 0: 4/16~12/16, 1: 2/16~10/16, 2: 6/16~14/16, 3: 7/16~15/16 */
  122. #define ADC_REG_dlc_thold_sel 0x0041000d
  123. /* 0x00d[5:4]
  124. Select a hsync as output,
  125. 0: hs masked by hs_filter,
  126. 1: hs masked by hs_filter_fpls_pass,
  127. 2: hs masked by hs_filter_spls_pass */
  128. #define ADC_REG_cs_hs_out_sel 0x00a4000d
  129. // 0x00d[7:6] reserved
  130. /* 0x00e[2:0]
  131. Select a vsync as output,
  132. 0: vs_active_org, 2: vs_active_autoend, 3: vs_active_2thold, 5: rg_vsync*/
  133. #define ADC_REG_cs_vs_sel 0x0040000e
  134. // 0x00e[5:3] reserved
  135. /* 0x00e[7:6]
  136. Set timeout for the coast-gen */
  137. #define ADC_REG_adi_rclk_freq 0x00e6000e
  138. /* 0x00f[3:0]
  139. Set a range to distinguish the pulse width of hsync, vsync, mv pulse */
  140. #define ADC_REG_cs_hpw_range 0x0060000f
  141. /* 0x00f[7:4]
  142. The stable count threshold to record the pulse width of hsync */
  143. #define ADC_REG_cs_hpw_scount_thold 0x00e4000f
  144. //cs2 option
  145. /* 0x010[7:0]
  146. Clamp start position after the reference Hsync-edge */
  147. #define ADC_REG_cs2_r_clamp_start 0x00e00010
  148. /* 0x011[7:0]
  149. Clamp duration after clamp start */
  150. #define ADC_REG_cs2_r_clamp_width 0x00e00011
  151. /* 0x012[7:0]
  152. Clamp start position after the reference Hsync-edge (rising for falling edge) */
  153. #define ADC_REG_cs2_g_clamp_start 0x00e00012
  154. /* 0x013[7:0]
  155. Clamp duration after clamp start */
  156. #define ADC_REG_cs2_g_clamp_width 0x00e00013
  157. /* 0x014[7:0]
  158. Clamp start position after the reference Hsync-edge (rising for falling edge) */
  159. #define ADC_REG_cs2_b_clamp_start 0x00e00014
  160. /* 0x015[7:0]
  161. Clamp duration after clamp start */
  162. #define ADC_REG_cs2_b_clamp_width 0x00e00015
  163. /* 0x016[0]
  164. Reference edge of H-sync for start clamping,
  165. 0: rising edge, 1:falling (leading) edge */
  166. #define ADC_REG_cs2_r_clamp_ref_edge 0x00000016
  167. /* 0x016[1]
  168. Reference edge of H-sync for start clamping,
  169. 0: rising edge, 1:falling (leading) edge */
  170. #define ADC_REG_cs2_g_clamp_ref_edge 0x00210016
  171. /* 0x016[2]
  172. Reference edge of H-sync for start clamping,
  173. 0: rising edge, 1:falling (leading) edge*/
  174. #define ADC_REG_cs2_b_clamp_ref_edge 0x00420016
  175. // 0x016[3] reserved
  176. /* 0x016[4]
  177. Select the clamp-enable to r-channel,
  178. 0:clamp from clamp-gen, 1:external clamp*/
  179. #define ADC_REG_o_rclamp_sel 0x00840016
  180. /* 0x016[5]
  181. Select the clamp-enable to g-channel,
  182. 0:clamp from clamp-gen, 1:external clamp*/
  183. #define ADC_REG_o_gclamp_sel 0x00a50016
  184. /* 0x016[6]
  185. Select the clamp-enable to b-channel,
  186. 0:clamp from clamp-gen, 1:external clamp*/
  187. #define ADC_REG_o_bclamp_sel 0x00c60016
  188. /* 0x016[7]
  189. Extension for r,g,b clamp, when this bit is high, rgb_clamp = ! X_clamp_sel */
  190. #define ADC_REG_o_rgbclamp_sel_extension 0x00e70016
  191. /* 0x017[0]
  192. Control the polarity of the hsync from cg to pll (by xor) */
  193. #define ADC_REG_ohs_pll_hsfcg_pol 0x00000017
  194. /* 0x017[1] */
  195. #define ADC_REG_icoast1_sel 0x00210017
  196. /* 0x017[2]
  197. Select the coast to sog-slicer,
  198. 0: coast_pw from coast-gen, 1:external coast */
  199. #define ADC_REG_icoast_sel 0x00420017
  200. /* 0x017[3]
  201. Select the Hsync to PLL(as reference clock),
  202. 0: Hsync from coast -gen, 1: slected external Hsync */
  203. #define ADC_REG_ohs_pll_sel 0x00630017
  204. /* 0x017[4] */
  205. #define ADC_REG_cs2_csync_tcg_sel 0x00840017
  206. /* 0x017[6:5]
  207. Select a coast to pll,
  208. 0: coast_fss, 1: coast_fcg, 2: external coast, 3: 1'b0 */
  209. #define ADC_REG_cs2_coast_tpll_sel 0x00c50017
  210. // 0x017[7] reserved
  211. /* 0x018[14:0] (0x019[6:0] ~ 0x018[7:0])
  212. Maximum H-sync period for SOG reset block */
  213. #define ADC_REG_cs2_rst_sog_maxhp 0x01c00018
  214. /* 0x019[6:0]
  215. Maximum H-sync period for SOG reset block bit 14~8 */
  216. #define ADC_REG_cs2_rst_sog_maxhp_en_14to8 0x00c00019
  217. /* 0x019[7]
  218. Enable the (maxhp) setting for SOG reset block,
  219. 0:disable, 1:enable */
  220. #define ADC_REG_cs2_rst_sog_maxhp_en 0x00e70019
  221. /* 0x01a[0]
  222. The second reset register for PLL,
  223. 0:non-active, 1:active (reset) */
  224. #define ADC_REG_cs2_pll_sw_rst 0x0000001a
  225. /* 0x01a[1]
  226. Software reset for PLL block,
  227. 0: controled by PLL register, 1:controlled by previous bit */
  228. #define ADC_REG_cs2_pll_rst_sel 0x0021001a
  229. /* 0x01a[2]
  230. Software reset for SOG digital circuit,
  231. 0:non-active, 1:active (reset) */
  232. #define ADC_REG_cs2_sog_sw_rst 0x0042001a
  233. /* 0x01a[3]
  234. Software control for the reset to SOG digital circuit,
  235. 0: reset by hw, 1: sw_ctrl */
  236. #define ADC_REG_cs2_sog_sw_rst_sel 0x0063001a
  237. /* 0x01a[3:2] */
  238. #define ADC_REG_cs2_sog_rst 0x0062001a
  239. /* 0x01a[4] */
  240. #define ADC_REG_cs2_pdiv_sw_rst 0x0084001a
  241. /* 0x01a[5] */
  242. #define ADC_REG_cs2_pdiv_sw_rst_ctrl 0x00a5001a
  243. // 0x01a[7:6] reserved
  244. /* 0x01b[3:0]
  245. Loss sync reset mask */
  246. #define ADC_REG_cs2_sog_lsync_rst_mask 0x0060001b
  247. /* 0x01b[5:4]
  248. Sogout select,
  249. 0: csync_tcg, 1: ext_hsync, 2: hsync_fcg, 3: hs_filter_fcg */
  250. #define ADC_REG_o_sog_sel 0x00a4001b
  251. // 0x01b[7:6] reserved
  252. /* 0x01c[0]
  253. Polarity adjust for external weak clamp,
  254. 0: original, 1: inverse */
  255. #define ADC_REG_ew_clamp_pol 0x0000001c
  256. /* 0x01c[1]
  257. Polarity adjust for external strong clamp,
  258. 0: original, 1: inverse */
  259. #define ADC_REG_es_clamp_pol 0x0021001c
  260. /* 0x01c[2]
  261. Polarity adjust for external coast,
  262. 0: original, 1: inverse */
  263. #define ADC_REG_e_coast_pol 0x0042001c
  264. // 0x01c[3] reserved
  265. /* 0x01c[4]
  266. Polarity adjust for external red clamp,
  267. 0: original, 1: inverse */
  268. #define ADC_REG_er_clamp_pol 0x0084001c
  269. /* 0x01c[5]
  270. Polarity adjust for external green clamp,
  271. 0: original, 1: inverse */
  272. #define ADC_REG_eg_clamp_pol 0x00a5001c
  273. /* 0x01c[6]
  274. Polarity adjust for external blue clamp,
  275. 0: original, 1: inverse */
  276. #define ADC_REG_eb_clamp_pol 0x00c6001c
  277. // 0x01c[7] reserved
  278. /* 0x01d[0]
  279. External Hsync select,
  280. 0: Hsync0, 1: Hsync1 */
  281. #define ADC_REG_e_hsync_sel 0x0000001d
  282. /* 0x01d[1]
  283. Polarity adjust for the selected external Hsync,
  284. 0: original, 1: inverse */
  285. #define ADC_REG_e_hsync_pol 0x0021001d
  286. /* 0x01d[2]
  287. External Vsync select,
  288. 0: Vsync0, 1: Vsync1 */
  289. #define ADC_REG_e_vsync_sel 0x0042001d
  290. /* 0x01d[3]
  291. Polarity adjust for the selected external Vsync,
  292. 0: original, 1: inverse */
  293. #define ADC_REG_e_vsync_pol 0x0063001d
  294. // 0x01d[7:4] reserved
  295. /* 0x01e[2:0]
  296. Select the output for hsout,
  297. 0: hsync_fpll, 1: external hsync, 2: hsync_fcg, 3: hs_filter_fcg, 4: ckpll_bf */
  298. #define ADC_REG_o_hsync_sel 0x0040001e
  299. /* 0x01e[3]
  300. Polarity adjust for the output Hsync,
  301. 0: original, 1: inverse */
  302. #define ADC_REG_o_hsync_pol 0x0063001e
  303. /* 0x01e[4]
  304. Pixel clock output select,
  305. 0: inverse-green clk, 1:green clock */
  306. #define ADC_REG_o_pclk_sel 0x00a4001e
  307. // 0x01e[7:6] reserved
  308. /* 0x01f[0]
  309. Vsync output select,
  310. 0: Vsync from coast-gen, 1: the selected external Vsync */
  311. #define ADC_REG_o_vsync_sel 0x0000001f
  312. /* 0x01f[1]
  313. Polarity adjust for the selected output Vsync,
  314. 0: original, 1: inverse */
  315. #define ADC_REG_o_vsync_pol 0x0021001f
  316. /* 0x01f[2]
  317. Vsync output select,
  318. 0: vsync_selected, 1: vsync_masked */
  319. #define ADC_REG_o_vsync_win_en 0x0042001f
  320. /* 0x01f[3]
  321. Polarity adjust for the output SOG,
  322. 0: original, 1: inverse */
  323. #define ADC_REG_o_sog_pol 0x0063001f
  324. /* 0x01f[5:4]
  325. Select a coast to mask sog,
  326. 0: coast_fss, 1: coast_fcg, 2: external coast, 3: 1'b0 */
  327. #define ADC_REG_o_coast_sel 0x00a4001f
  328. // 0x01f[7:6] reserved
  329. //cs3 option
  330. /* 0x020[11:0] (0x021[3:0] ~ 0x020[7:0])
  331. The delay of the pll-reset to sync-buffer reset (24MHz) */
  332. #define ADC_REG_sbuf_rst_dly 0x01600020
  333. /* 0x021[4]
  334. Enable the delay option for sync-buffer */
  335. #define ADC_REG_sbuf_rst_dly_en 0x00840021
  336. // 0x021[7:5] reserved
  337. // 0x022[7:0] reserved
  338. #define ADC_REG_dbg_temp 0x00e00022
  339. // 0x023[7:0] reserved
  340. /* 0x024[6:0]
  341. The 16LSBs of the debug port selection */
  342. #define ADC_REG_dbg_port_lw_sel 0x00c00024
  343. // 0x024[7] reserved
  344. /* 0x025[6:0]
  345. The 16MSBs of the debug port selection */
  346. #define ADC_REG_dbg_port_hw_sel 0x00c00025
  347. // 0x025[7] reserved
  348. /* 0x026[15:0] (0x027[7:0] ~ 0x026[7:0])
  349. The two clear bytes for clearing the interrupt vector bits */
  350. #define ADC_REG_int_clear_byte 0x01e00026
  351. /* 0x028[15:0] (0x029[7:0] ~ 0x028[7:0])
  352. The two mask bytes for masking the interrupt vector bits */
  353. #define ADC_REG_int_mask_byte 0x01e00028
  354. /* 0x02a[7:0]
  355. The timeout threshold for the cg-interrupt module */
  356. #define ADC_REG_cg_int_timeout 0x00e0002a
  357. /* 0x02b[7:0]
  358. The threshold for fast-coast interrupt */
  359. #define ADC_REG_cg_int_fcoast_period 0x00e0002b
  360. /* 0x02c[7:0]
  361. The threshold for unstable-coast interrupt */
  362. #define ADC_REG_cg_int_stable_coast_range 0x00e0002c
  363. /* 0x02d[3:0]
  364. Vsync window start */
  365. #define ADC_REG_vwindow_start 0x0060002d
  366. /* 0x02d[7:4]
  367. Vsync window start */
  368. #define ADC_REG_vwindow_width 0x00e4002d
  369. // 0x02e[7:0] reserved
  370. // 0x02f[7:0] reserved
  371. //PLL+VBG
  372. /* 0x030[7:0]
  373. The version of the p333 ADC */
  374. #define ADC_REG_revision 0x00e00030
  375. /* 0x032[0]
  376. ADC PLL reset,
  377. 0: reset,
  378. 1: normal */
  379. #define ADC_REG_pll_rstn 0x00000032
  380. /* 0x032[1]
  381. ADC PLL power control,
  382. 0: power down,
  383. 1: normal */
  384. #define ADC_REG_pll_pwdn 0x00210032
  385. /* 0x032[2]
  386. Independent PLL post divider reset pin,
  387. 0: reset,
  388. 1: normal */
  389. #define ADC_REG_pdiv_rstn 0x00420032
  390. /* 0x032[3]
  391. Independent PLL post divider reset pin,
  392. 0: disable,
  393. 1: enable */
  394. #define ADC_REG_pll_pdiv_en 0x00630032
  395. /* 0x032[7:4] */
  396. #define ADC_REG_pll_i2ctrl 0x00e40032
  397. /* 0x033[1:0] */
  398. #define ADC_REG_pll_gb_vb 0x00200033
  399. /* 0x033[2] */
  400. #define ADC_REG_pll_pout_rstj 0x00420033
  401. // 0x033[3] reserved
  402. /* 0x033[7:4] */
  403. #define ADC_REG_pll_ictrl 0x00e40033
  404. // 0x034[0] reserved
  405. /* 0x034[5:1]
  406. Clock to R channel phase selector(131: 3-ch phase selector). */
  407. #define ADC_REG_pll_phase_r_sel 0x00a10034
  408. // 0x034[7:6] reserved
  409. // 0x035[0] reserved
  410. /* 0x035[5:1]
  411. Clock to G channel phase selector(131: removed). */
  412. #define ADC_REG_pll_phase_g_sel 0x00a10035
  413. // 0x035[7:6] reserved
  414. // 0x036[0] reserved
  415. /* 0x036[5:1]
  416. Clock to B channel phase selector(131: removed). */
  417. #define ADC_REG_pll_phase_b_sel 0x00a10036
  418. // 0x036[7:6] reserved
  419. /* 0x037[7:0] */
  420. #define ADC_REG_pll_mul_LSBs 0x00e00037
  421. /* 0x038[4:0]
  422. ADC PLL Multiplier N. */
  423. #define ADC_REG_pll_mul_MSBs 0x00600038
  424. // 0x038[7:5] reserved
  425. /* 0x039[1:0]
  426. Phase divider stage1 setting, its value is 2^x, where x is reg value.
  427. b'00: 1, b'01: 2, b'10: 4, b'11: 8 */
  428. #define ADC_REG_pll_div_sel 0x00200039
  429. /* 0x039[3:2]
  430. Phase divider stage2 setting, its value is 2+x, where x is reg value.
  431. b'00: 2, b'01: 3, b'10: 4, b'11: 5 */
  432. #define ADC_REG_pll_divb_sel 0x00620039
  433. /* 0x039[4]
  434. External pixel clock select,
  435. 0: PLL-SOG pixel sampling clock,
  436. 1: external pixel clock input mode. */
  437. #define ADC_REG_pll_extpclk_sel 0x00840039
  438. // 0x039[7:5] reserved
  439. /* 0x03a[6:0] */
  440. #define ADC_REG_pll_gb_vc 0x00c0003a
  441. // 0x03a[7] reserved
  442. // 0x03b[7:0] reserved
  443. /* 0x03c[3:0]
  444. Bandgap voltage control.
  445. 0: max, f: min. */
  446. #define ADC_REG_vbg_v_ctrl 0x0060003c
  447. /* 0x03c[7:4]
  448. Bias current control, need 4-16 decoder.
  449. 0: max, f: min. */
  450. #define ADC_REG_vbg_i_ctrl 0x00e4003c
  451. /* 0x03d[0]
  452. Bandgap power down control. */
  453. #define ADC_REG_vbg_pwdn 0x0000003d
  454. // 0x03d[7:1] reserved
  455. /* 0x03e[5:0] */
  456. #define ADC_REG_pll_ext_pclk_dly 0x00a0003e
  457. // 0x03e[7:6] reserved
  458. /* 0x03f[3:0] (removed)
  459. Setting the pulse with, by pixel clock. */
  460. #define ADC_REG_pll_hsync_pw 0x0060003f
  461. /* 0x03f[5:4]
  462. ADCPLL reference select.
  463. 0: ckpll_bf(YPbPr),
  464. 1: ext_hsync(VGA),
  465. 2: reg_dco_bx2(AV),
  466. 3: reg_dco_bx2(AV). */
  467. #define ADC_REG_pll_ref_sel 0x00a4003f
  468. /* 0x03f[7:6] */
  469. #define ADC_REG_pll_refdiv 0x00e6003f
  470. //cs4 option
  471. /* 0x040[5:0]
  472. Second clamp_en for RGB channels, the start is set when
  473. the clamp should be start after vsync pass, this value can't
  474. larger than the reg_cs_count_rise_lim in cg-register*/
  475. #define ADC_REG_cs_clamp2nd_start 0x00a00040
  476. // 0x040[6] reserved
  477. /* 0x040[7]
  478. The clamp enable select,
  479. 0: original, 1: clamp_en_2nd */
  480. #define ADC_REG_cs_clamp_sel 0x00e70040
  481. /* 0x041[4:0]
  482. Stable hsout period threshold for the unstable hsout
  483. period estimation. */
  484. #define ADC_REG_shsp_thold 0x00800041
  485. /* 0x041[7:5]
  486. The number of unstable hsout pulses to assert interrupt
  487. for unstable hsout period. */
  488. #define ADC_REG_ushsp_pls_thold 0x00e50041
  489. /* 0x042[7:0]
  490. Max macro vision period, this should not >= 1080p h-period. */
  491. #define ADC_REG_mv_period_thold 0x00e00042
  492. /* 0x043[7:0]
  493. Stable range for the mv pulse periods. */
  494. #define ADC_REG_mv_srange 0x00e00043
  495. /* 0x044[1:0]
  496. Timeout control for macro vision detector,
  497. 0: 36ms, 1: 72ms, 2: 144ms, 3: 18ms */
  498. #define ADC_REG_mv_tout_thold 0x00200044
  499. // 0x044[7:2] reserved
  500. /* 0x045[3:0]
  501. How many mv pulses to reckon as macro vision signal detected. */
  502. #define ADC_REG_mv_pls_thold 0x00600045
  503. /* 0x045[4]
  504. The polarity control for the csync input of coast-gen. */
  505. #define ADC_REG_csync_in_cg_pol_ctrl 0x00840045
  506. /* 0x045[5]
  507. Select a input for coast-gen block,
  508. 0: sog from sog-slicer,
  509. 1: C-sync from external H,V-sync (pc_mode) */
  510. #define ADC_REG_csync_tcg_sel 0x00a50045
  511. // 0x045[7:6] reserved
  512. /* 0x046[0]
  513. Extend the debug port of coast-gen. */
  514. #define ADC_REG_cg_dport_ext 0x00000046
  515. // 0x046[1] reserved
  516. /* 0x046[3:2]
  517. Timeout control for cih (Csync In Hsync) detector,
  518. 0: 36ms, 1: 72ms, 2: 144ms, 3: 18ms */
  519. #define ADC_REG_cstout_ctrl 0x00620046
  520. /* 0x046[5:4]
  521. Timeout control for v-sync active detector,
  522. 0: 36ms, 1: 72ms, 2: 144ms, 3: 18ms */
  523. #define ADC_REG_vs_atout_ctrl 0x00a40046
  524. /* 0x046[7:6]
  525. Timeout control for h-sync active detector,
  526. 0: 36ms, 1: 72ms, 2: 144ms, 3: 18ms */
  527. #define ADC_REG_hs_atout_ctrl 0x00e60046
  528. /* 0x047[7:0]
  529. Timeout threshold for clamp interrupt, the computing formula is
  530. 40ns * (reg_clamp_int_tout_thold<<8 | 0x64) */
  531. #define ADC_REG_clamp_int_tout_thold 0x00e00047
  532. /* 0x048[7:0]
  533. High to low threshold for degiltch module. */
  534. #define ADC_REG_dg_h2l_thold 0x00e00048
  535. /* 0x049[7:0]
  536. Low to high threshold for degiltch module. */
  537. #define ADC_REG_dg_l2h_thold 0x00e00049
  538. /* 0x04a[0]
  539. Extension to the reg_cs_debounce,
  540. 0: two direction, 1: one_direction,
  541. 2: regen csync, 3: deglitched csync */
  542. #define ADC_REG_db_sel_ext 0x0000004a
  543. /* 0x04a[1]
  544. Disable the auto-detection of csync in hsync. */
  545. #define ADC_REG_pc_cs_dtor_ctrl_disable 0x0021004a
  546. /* 0x04a[3:2] */
  547. #define ADC_REG_csync_pcmode_sw_ctrl 0x0062004a
  548. /* 0x04a[4]
  549. Priority of the auto source select,
  550. 1: pcmode, 0: ypp */
  551. #define ADC_REG_ss_priority 0x0084004a
  552. /* 0x04a[5]
  553. Auto source select mode,
  554. 0:auto, 1:manual */
  555. #define ADC_REG_ss_mode 0x00a5004a
  556. /* 0x04a[7:6]
  557. Software control for the csync enable fromm sslicer,*/
  558. #define ADC_REG_csync_en_sw_ctrl 0x00e6004a
  559. /* 0x04b[0]
  560. reg_csync_en_sw_ctrl[1] ? reg_csync_en_sw_ctrl[0] : csync_en */
  561. #define ADC_REG_8b_10b_ctrl 0x0000004b
  562. /* 0x04b[1]
  563. Postive glitch elimination option,
  564. 1: on, 0: off */
  565. #define ADC_REG_hs_samples_clk_sel 0x0021004b
  566. /* 0x04b[3:2]
  567. Select a source for degitch block,
  568. 0:csync, 1:synct, 2:cs_gen */
  569. #define ADC_REG_source_sel 0x0062004b
  570. /* 0x04b[6:4]
  571. Multi-edge counter reset */
  572. #define ADC_REG_mecounter_max 0x00c4004b
  573. /* 0x04b[7]
  574. 0: cs2_llpll, 1: rg_hsync */
  575. #define ADC_REG_hs_fcg_sel 0x00e7004b
  576. /* 0x04c[5:0]
  577. Stable range for regen block, based on 20ns */
  578. #define ADC_REG_stable_range_for_rg 0x00a0004c
  579. /* 0x04c[7:6]
  580. Select a source to regen-csync block,
  581. 0: auto, 1: csync_fpls (deglitched), 2: a, 3: b */
  582. #define ADC_REG_psfedge_sw_ctrl 0x00e6004c
  583. /* 0x04d[1:0]
  584. Pulse width control for regenerated hsync. */
  585. #define ADC_REG_rg_hwidth_ctrl 0x0020004d
  586. /* 0x04d[3:2]
  587. Select the pulse to stable edge detector,
  588. 0: fpls, 1: rpls, 2: valid_rise, 3: valid_fall */
  589. #define ADC_REG_edge_pls_tsetdor_ctrl 0x0062004d
  590. /* 0x04d[6:4]
  591. The threshold for regenerated-vsync */
  592. #define ADC_REG_rg_vsthold_ctrl 0x00c4004d
  593. // 0x04d[7] reserved
  594. /* 0x04e[1:0]
  595. 0: auto, 1: vsync, 2: a, 3: b */
  596. #define ADC_REG_rg_vs_sel 0x0020004e
  597. /* 0x04e[3:2]
  598. Status register select for address c0-cf. */
  599. #define ADC_REG_cg_st_reg_sel 0x0062004e
  600. /* 0x04e[4]
  601. Select a period for regen block,
  602. 0: dynamic, */
  603. #define ADC_REG_ref_period_sel 0x0084004e
  604. /* 0x04e[5] */
  605. #define ADC_REG_vs_for_pwc_sel 0x00a5004e
  606. /* 0x04e[6] */
  607. #define ADC_REG_vs_for_pwc_pol 0x00c6004e
  608. // 0x04e[7] reserved
  609. /* 0x04f[0] */
  610. #define ADC_REG_extn_wclamp 0x0000004f
  611. /* 0x04f[1] */
  612. #define ADC_REG_extn_sclamp 0x0021004f
  613. /* 0x04f[2] */
  614. #define ADC_REG_7b_10b_ctrl 0x0042004f
  615. /* 0x04f[3] */
  616. #define ADC_REG_6b_10b_ctrl 0x0063004f
  617. /* 0x04f[5:4] */
  618. #define ADC_REG_cg_source_sel 0x00a4004f
  619. /* 0x04f[6]
  620. 1080p option */
  621. #define ADC_REG_db_sel_ext1 0x00c6004f
  622. /* 0x04f[7] */
  623. #define ADC_REG_calibration_sel 0x00c6004f
  624. //LCG_SCH
  625. /* 0x050[0] */
  626. #define ADC_REG_lcg_pwdn 0x00000050
  627. /* 0x050[1]
  628. Atuo gain control. */
  629. #define ADC_REG_lcg_autogain 0x00210050
  630. // 0x050[3:2] reserved
  631. /* 0x050[6:4]
  632. Red channel input select.
  633. 0: VGA,
  634. 1: YPbPr,
  635. 6: internal(AWB) */
  636. #define ADC_REG_lcg_rch_sel 0x00c40050
  637. // 0x050[7] reserved
  638. /* 0x051[2:0]
  639. Green channel input select.
  640. 0: VGA,
  641. 1: YPbPr,
  642. 6: internal(AWB) */
  643. #define ADC_REG_lcg_gch_sel 0x00400051
  644. // 0x051[3] reserved
  645. /* 0x051[6:4]
  646. Red channel input select.
  647. 0: VGA,
  648. 1: YPbPr,
  649. 6: internal(AWB) */
  650. #define ADC_REG_lcg_bch_sel 0x00c40051
  651. // 0x051[7] reserved
  652. /* 0x052[4:0]
  653. Red channel clamping voltage select(See STG1 clamp table). */
  654. #define ADC_REG_r_sb1 0x00800052
  655. // 0x052[7:5] reserved
  656. /* 0x053[4:0]
  657. Green channel clamping voltage select(See STG1 clamp table). */
  658. #define ADC_REG_g_sb1 0x00800053
  659. // 0x053[7:5] reserved
  660. /* 0x054[4:0]
  661. Blue channel clamping voltage select(See STG1 clamp table). */
  662. #define ADC_REG_b_sb1 0x00800054
  663. // 0x054[7:5] reserved
  664. /* 0x055[3:0]
  665. Red channel clamping voltage select, LSB. */
  666. #define ADC_REG_r_sb2 0x00600055
  667. /* 0x055[7:4]
  668. Green channel clamping voltage select, LSB.
  669. 00: VREFP,
  670. 01: VCM,
  671. 10: VREFN */
  672. #define ADC_REG_g_sb2 0x00e40055
  673. /* 0x056[3:0]
  674. Blue channel clamping voltage select, LSB. */
  675. #define ADC_REG_b_sb2 0x00600056
  676. /* 0x056[4] */
  677. #define ADC_REG_lcg_clamp_mode_rb 0x00840056
  678. // 0x056[7:5] reserved
  679. // 0x057[7:0] reserved
  680. /* 0x058[3:0]
  681. Signal bandwidth control, its value is determined by the
  682. pixel clock of current timing. (i.e. the PixelClock of
  683. timing table multiply reference sampling enlarge rate) */
  684. #define ADC_REG_sch_pbw_ctrl 0x00600058
  685. /* 0x058[7:4]
  686. Reference bandwidth control, its value is determined by
  687. the pixel clock of current timing. (i.e. the PixelClock
  688. of timing table multiply reference sampling enlarge rate) */
  689. #define ADC_REG_sch_ref_pbw_ctrl 0x00e40058
  690. /* 0x059[0]
  691. R channel power down. */
  692. #define ADC_REG_sch_pwdn_r 0x00000059
  693. /* 0x059[1]
  694. G channel power down. */
  695. #define ADC_REG_sch_pwdn_g 0x00210059
  696. /* 0x059[2]
  697. B channel power down. */
  698. #define ADC_REG_sch_pwdn_b 0x00420059
  699. // 0x059[3] reserved
  700. /* 0x059[4] */
  701. #define ADC_REG_sch_e15db_r 0x00840059
  702. /* 0x059[5] */
  703. #define ADC_REG_sch_e15db_g 0x00a50059
  704. /* 0x059[6] */
  705. #define ADC_REG_sch_e15db_b 0x00c60059
  706. // 0x059[7] reserved
  707. /* 0x05a[2:0]
  708. Red channel ADC common mode select. From 0.56V to 0.63V, 10mv each step. */
  709. #define ADC_REG_lcg_r33vcm_sel 0x0040005a
  710. // 0x05a[3] reserved
  711. /* 0x05a[6:4]
  712. Green channel ADC common mode select. From 0.56V to 0.63V, 10mv each step. */
  713. #define ADC_REG_lcg_g33vcm_sel 0x00c4005a
  714. // 0x05a[7] reserved
  715. /* 0x05b[2:0]
  716. Blue channel ADC common mode select. From 0.56V to 0.63V, 10mv each step. */
  717. #define ADC_REG_lcg_b33vcm_sel 0x0040005b
  718. // 0x05b[3] reserved
  719. /* 0x05b[6:4]
  720. Red channel ADC common mode select. From 0.47V to 0.54V, 10mv each step */
  721. #define ADC_REG_r_12vcm_sel 0x00c4005b
  722. // 0x05b[7] reserved
  723. /* 0x05c[2:0]
  724. Green channel ADC common mode select. From 0.47V to 0.54V, 10mv each step */
  725. #define ADC_REG_g_12vcm_sel 0x0040005c
  726. // 0x05c[3] reserved
  727. /* 0x05c[6:4]
  728. Blue channel ADC common mode select. From 0.47V to 0.54V, 10mv each step */
  729. #define ADC_REG_b_12vcm_sel 0x00c4005c
  730. // 0x05c[7] reserved
  731. /* 0x05d[0]
  732. VCMI option,
  733. 0: tracking VCMI(default), 1: external VCMI */
  734. #define ADC_REG_12vcm_sel_msb 0x0000005d
  735. // 0x05d[3:1] reserved
  736. /* 0x05d[4] */
  737. #define ADC_REG_sch_clamp_mode_g 0x0084005d
  738. // 0x05d[7:5] reserved
  739. /* 0x05e[2:0]
  740. Auto-gain reference voltage select.
  741. 000: 1050mv, 001: 1040mv, 010: 560mv, 011: 550mv, 100: 800mv */
  742. #define ADC_REG_lcg_awbsel12v 0x0040005e
  743. // 0x05e[3] reserved
  744. /* 0x05e[4]
  745. Enhance pull down(when signal channel not selected).
  746. 1= enable, 0=disable. */
  747. #define ADC_REG_r_epd12v 0x0084005e
  748. /* 0x05e[5]
  749. Enhance pull down(when signal channel not selected).
  750. 1= enable, 0=disable. */
  751. #define ADC_REG_g_epd12v 0x00a5005e
  752. /* 0x05e[6]
  753. Enhance pull down(when signal channel not selected).
  754. 1= enable, 0=disable. */
  755. #define ADC_REG_b_epd12v 0x00c6005e
  756. // 0x05e[7] reserved
  757. // 0x05f[7:0] reserved
  758. /* 0x060[2:0]
  759. Red channel gain control, MSB. */
  760. #define ADC_REG_lcg_rmp1 0x00400060
  761. // 0x060[3] reserved
  762. /* 0x060[6:4]
  763. reserved */
  764. #define ADC_REG_lcg_rmn1 0x00c40060
  765. // 0x060[7] reserved
  766. /* 0x061[5:0]
  767. Red channel gain control, MSB. */
  768. #define ADC_REG_lcg_rmp2 0x00a00061
  769. // 0x061[7:6] reserved
  770. /* 0x062[5:0]
  771. reserved */
  772. #define ADC_REG_lcg_rmn2 0x00a00062
  773. // 0x062[7:6] reserved
  774. /* 0x063[2:0]
  775. Green channel gain control, MSB. */
  776. #define ADC_REG_lcg_gmp1 0x00400063
  777. // 0x063[3] reserved
  778. /* 0x0x63[6:4]
  779. reserved */
  780. #define ADC_REG_lcg_gmn1 0x00c40063
  781. // 0x063[7] reserved
  782. /* 0x064[5:0]
  783. Green channel gain control, MSB. */
  784. #define ADC_REG_lcg_gmp2 0x00a00064
  785. // 0x064[7:6] reserved
  786. /* 0x065[5:0]
  787. reserved */
  788. #define ADC_REG_lcg_gmn2 0x00a00065
  789. // 0x065[7:6] reserved
  790. /* 0x066[2:0]
  791. Blue channel gain control, MSB. */
  792. #define ADC_REG_lcg_bmp1 0x00400066
  793. // 0x066[3] reserved
  794. /* 0x0x66[6:4]
  795. reserved */
  796. #define ADC_REG_lcg_bmn1 0x00c40066
  797. // 0x066[7] reserved
  798. /* 0x067[5:0]
  799. Blue channel gain control, MSB. */
  800. #define ADC_REG_lcg_bmp2 0x00a00067
  801. // 0x067[7:6] reserved
  802. /* 0x068[5:0]
  803. reserved */
  804. #define ADC_REG_lcg_bmn2 0x00a00068
  805. // 0x068[7:6] reserved
  806. /* 0x069[0] (removed)
  807. Enable ADC reference output mode. Connect to register. 1= enable.
  808. At this mode. All channel clamping voltage select should all be "0". */
  809. #define ADC_REG_lcg_refdbg_en 0x00000069
  810. /* 0x069[1]
  811. External reference voltage input mode.
  812. At this mode, All channel gain control should all be "0".*/
  813. #define ADC_REG_lcg_extref_in_en 0x00210069
  814. // 0x069[3:2] reserved
  815. /* 0x069[5:4]
  816. ADC reference output select. Connec to register.
  817. 00: VREFP,
  818. 01: VCM,
  819. 10: VREFN,
  820. 11: AWB */
  821. #define ADC_REG_lcg_refdbg_sel_temp 0x00a40069
  822. // 0x069[7:6] reserved
  823. /* 0x06a[3:0]
  824. Efuse write enable. */
  825. #define ADC_REG_efuse_en_th 0x0060006a
  826. // 0x06a[7:4] reserved
  827. // 0x06b[7:0] reserved
  828. /* 0x06c[3:0]
  829. Schmitt trigger high threshold voltage select.(See ref_stg1_table2_p131 file) */
  830. #define ADC_REG_sog_smth12v 0x0060006c
  831. /* 0x06c[7:4]
  832. Schmitt trigger low threshold voltage select.(See ref_stg1_table2_p131 file) */
  833. #define ADC_REG_sog_smtl12v 0x00e4006c
  834. /* 0x6c[7:0]
  835. Combine Schmitt trigger low and high threshold voltage select.(See ref_stg1_table2_p131 file) */
  836. #define ADC_REG_sog_smthr12v 0x00e0006c
  837. /* 0x06d[3:0]
  838. SOG Clamp Voltage Select, from 1.433v to 1.183v, 16.67mV/step.(See ref_stg1_table2_p131 file) */
  839. #define ADC_REG_sog_clamp 0x0060006d
  840. /* 0x06d[6:4]
  841. {129[7], 6d[4]}, 00=2 close, 01=ch1, 10=ch2, 11=ch3 */
  842. #define ADC_REG_sog_ch_sel 0x00c4006d
  843. // 0x06d[7] reserved
  844. /* 0x06e[1:0]
  845. SOG Comparator Reference Voltage Select, from 1.86v to 1.23v, 10mV/step. */
  846. #define ADC_REG_sog_cmp 0x0020006e
  847. // 0x06e[2] reserved
  848. /* 0x06e[3] */
  849. #define ADC_REG_sog_pwdn_ef 0x0063006e
  850. /* 0x06e[4]
  851. SOG Power down. */
  852. #define ADC_REG_sog_pwdn 0x0084006e
  853. /* 0x06e[5] */
  854. #define ADC_REG_smt_high_sel 0x00a5006e
  855. /* 0x06e[6] */
  856. #define ADC_REG_smt_low_sel 0x00c6006e
  857. /* 0x06e[7] */
  858. #define ADC_REG_smt_out_sel 0x00e7006e
  859. /* 0x070[2:0]
  860. Sync tip find top enter offset. */
  861. #define ADC_REG_st_top_enter_offset 0x00400070
  862. //0x070[3] reserved
  863. /* 0x070[7:4]
  864. Sync tip find top enter threshold. */
  865. #define ADC_REG_st_top_enter_th 0x00e40070
  866. /* 0x071[2:0]
  867. Sync tip find top exit offset. */
  868. #define ADC_REG_st_top_exit_offset 0x00400071
  869. // 0x071[3] reserved
  870. /* 0x071[7:4]
  871. Sync tip find top exit threshold. */
  872. #define ADC_REG_st_top_exit_th 0x00e40071
  873. /* 0x072[4:0]
  874. Sync tip find bottom threshold. */
  875. #define ADC_REG_st_bot_range 0x00800072
  876. /* 0x072[7:5]
  877. Add cs_gen timing plus on sync tip top threshold. */
  878. #define ADC_REG_st_top_cgplus 0x00e50072
  879. /* 0x073[2:0]
  880. synct_smt option on cur_state=D, fir & iir1 & iir2. */
  881. #define ADC_REG_synct_smt_sth 0x00400073
  882. /* 0x073[3]
  883. Disable synct accumalate. */
  884. #define ADC_REG_synct_acc_dis 0x00630073
  885. /* 0x073[4]
  886. synct_smt option on cur_state!=D,
  887. 0: fir, 1: fir & iir1. */
  888. #define ADC_REG_synct_smt_ini 0x00840073
  889. /* 0x073[5]
  890. synct_iir2_smt long tail mask. */
  891. #define ADC_REG_synct_iir2_smt_mask 0x00a50073
  892. /* 0x073[7:6]
  893. synct option,
  894. 0: org, 1: smt, 2: org+smt, 3: 1'b0. "
  895. */
  896. #define ADC_REG_synct_smt_opt 0x00e60073
  897. /* 0x074[2:0] */
  898. #define ADC_REG_smt_fir_th 0x00400074
  899. /* 0x074[3] */
  900. #define ADC_REG_smt_fir_strong 0x00630074
  901. /* 0x074[7:4]
  902. Accumulate synct exit threshold. */
  903. #define ADC_REG_st_acc_exit_th 0x00e40074
  904. /* 0x075[5:0]
  905. Accumulate synct enter threshold. */
  906. #define ADC_REG_st_acc_enter_th 0x00a00075
  907. // 0x075[7:6] reserved
  908. /* 0x076[3:0]
  909. Set minimum line width. */
  910. #define ADC_REG_min_line_wdth_opt 0x00600076
  911. /* 0x076[7:4]
  912. Set maximum line width. */
  913. #define ADC_REG_max_line_wdth_opt 0x00e40076
  914. /* 0x077[3:0]
  915. Set minimum low width.*/
  916. #define ADC_REG_min_line_wdth 0x00600077
  917. /* 0x077[7:4]
  918. Set maximum low width. */
  919. #define ADC_REG_max_line_wdth 0x00e40077
  920. /* 0x078[3:0]
  921. Low width threshold for sync valid rising. */
  922. #define ADC_REG_synct_low_wdth 0x00600078
  923. // 0x078[7:4] reserved
  924. /* 0x079[3:0]
  925. Line counter threshold A for sync valid rising. */
  926. #define ADC_REG_hs_vld_r_maska 0x00600079
  927. /* 0x079[7:4]
  928. Line counter threshold B for sync valid rising. */
  929. #define ADC_REG_hs_vld_r_maskb 0x00e40079
  930. /* 0x07a[0]
  931. Enable sync valid rise reset to avoid too early rising. */
  932. #define ADC_REG_hs_vld_1rst_en 0x0000007a
  933. /* 0x07a[1]
  934. In line_wdth decision, skip line_cnt=line2_cnt. */
  935. #define ADC_REG_lwdth_skip_l2cnt 0x0021007a
  936. // 0x07a[2] reserved
  937. /* 0x07a[3]
  938. Enable re-caculate line width on cur_state=C. */
  939. #define ADC_REG_rewidth_en 0x0063007a
  940. /* 0x07a[4]
  941. Skip post vsync blanking during re-caculate line width state. */
  942. #define ADC_REG_rewidth_skip_postvb 0x0084007a
  943. /* 0x07a[5]
  944. Enable accumulated sync low counter. */
  945. #define ADC_REG_low_cnt_acc_en 0x00a5007a
  946. /* 0x07a[6]
  947. Enable sync low width mask on vsync blanking. */
  948. #define ADC_REG_low_wdth_vblank_mask 0x00c6007a
  949. /* 0x07a[7] */
  950. #define ADC_REG_ml_dis 0x00e7007a
  951. /* 0x07b[3:0]
  952. Stable line width threshold range. */
  953. #define ADC_REG_line_stable_thd 0x0060007b
  954. /* 0x07b[4]
  955. Enable check mline_wdth=min_line_wdth. */
  956. #define ADC_REG_mlwdth_chk_lw 0x0084007b
  957. /* 0x07b[5]
  958. Skip line_wdth_fstable for mline_wdth. */
  959. #define ADC_REG_mlwdth_skip_lfw 0x00a5007b
  960. /* 0x07b[6]
  961. Skip line_wdth_tstable for mline_wdth. */
  962. #define ADC_REG_mlwdth_skip_tlw 0x00c6007b
  963. /* 0x07b[7] */
  964. #define ADC_REG_mlwdth_skip_l2w 0x00e7007b
  965. /* 0x07c[1:0]
  966. Base threshold of vsync detect vs_synct base source :
  967. (quad_min_find+st_find)/2 */
  968. #define ADC_REG_vs_synct_base_opt 0x0020007c
  969. // 0x07c[2] reserved
  970. /* 0x07c[3]
  971. Top threshold of vsync detect
  972. 0: vsync_top,
  973. 1: synct_top */
  974. #define ADC_REG_vs_synct_top_opt 0x0063007c
  975. /* 0x07c[7:4]
  976. Sync tip find threshold on vsync. */
  977. #define ADC_REG_vs_synct_th 0x00e4007c
  978. /* 0x07d[3:0]
  979. Accumulated enter threshold of vsync detect. */
  980. #define ADC_REG_vs_acc_enter_th 0x0060007d
  981. /* 0x07d[7:4]
  982. Accumulated exit threshold of vsync detect. */
  983. #define ADC_REG_vs_acc_exit_th 0x00e4007d
  984. /* 0x07e[0]
  985. Sub pass_t end option. */
  986. #define ADC_REG_sub_pass_end_opt 0x0000007e
  987. /* 0x07e[1]
  988. Enable max sync tip detect on cur_stae=6. */
  989. #define ADC_REG_wait_v_max_tip_en 0x0021007e
  990. // 0x07e[3:2]
  991. /* 0x07e[4]
  992. Skip vsync rising toggle constraint in vsync detect. */
  993. #define ADC_REG_vs_skip_vtog_cnt 0x0084007e
  994. /* 0x07e[5]
  995. Skip line width constraint in vsync detect. */
  996. #define ADC_REG_vs_skip_mline_wdth 0x00a5007e
  997. /* 0x07e[6]
  998. Skip low width constraint in vsync detect. */
  999. #define ADC_REG_vs_skip_mlow_wdth 0x00c6007e
  1000. // 0x07e[7] reserved
  1001. /* 0x07f[0]
  1002. Enable iir1 filter in middle level search in vsync. */
  1003. #define ADC_REG_mid_mask_iir1_sel 0x0000007f
  1004. /* 0x07f[1]
  1005. Tip height option
  1006. 0: Initial tip height 'h10,
  1007. 1: Initial tip height 'h14 */
  1008. #define ADC_REG_tip_height_opt 0x0021007f
  1009. // 0x07f[3:2] reserved
  1010. /* 0x07f[5:4]
  1011. Macro-vision height check
  1012. 0: disable check,
  1013. 1: >1.25 tip height,
  1014. 2: >1.50 tip height,
  1015. 3: >2.00 tip height */
  1016. #define ADC_REG_mv_height_chk 0x00a4007f
  1017. /* 0x07f[7:6]
  1018. Tip height shrink option
  1019. 0: tri_height > 8/16 * tip_heigh,
  1020. 1: tri_height > 7/16 * tip_heigh,
  1021. 2: tri_height > 6/16 * tip_heigh,
  1022. 3: tri_height > 5/16 * tip_heigh */
  1023. #define ADC_REG_tip_h_sh_opt 0x00e6007f
  1024. //SOG
  1025. /* 0x080[7:0]
  1026. Set up line, >576i line period(64us); default=80us. */
  1027. #define ADC_REG_line 0x00e00080
  1028. /* 0x081[4:0]
  1029. Signal in/off detect threshold. */
  1030. #define ADC_REG_det_on_th 0x00800081
  1031. // 0x081[5] reserved
  1032. /* 0x081[7:6]
  1033. Options of stay period on cur_state3,
  1034. 0: 2ms, 1: 4ms, 2: 8ms, 3: 16ms */
  1035. #define ADC_REG_det_period_opt 0x00e60081
  1036. /* 0x082[2:0]
  1037. Siync loss voltage range on cur_state=D. */
  1038. #define ADC_REG_cpt_loss_range 0x00400082
  1039. /* 0x082[3]
  1040. Enable sync loss voltage detect fucntion. */
  1041. #define ADC_REG_cpt_loss_en 0x00630082
  1042. /* 0x082[7:4]
  1043. Sync loss timing range on cur_state=D. */
  1044. #define ADC_REG_vblank_ini_length 0x00e40082
  1045. /* 0x083[1:0]
  1046. Length option of passing vsync & post-EQ & MV for clamping. */
  1047. #define ADC_REG_loss_sync_opt 0x00200083
  1048. /* 0x083[2]
  1049. Vsync front proch detect. */
  1050. #define ADC_REG_vs_fp_wdth 0x00420083
  1051. /* 0x083[3]
  1052. Skip of vsync front porch detect. */
  1053. #define ADC_REG_skip_vs_fp 0x00630083
  1054. /* 0x083[4]
  1055. Skip of twice vsync detect which can get more reliable tip height. */
  1056. #define ADC_REG_skip_twice_vsync 0x00840083
  1057. // 0x083[7:5] reserved
  1058. /* 0x084[3:0]
  1059. Signal sum clip limit. */
  1060. #define ADC_REG_st_sum_clip_limit 0x00600084
  1061. /* 0x084[7:4]
  1062. Signal sum clip threshold of strong increase. */
  1063. #define ADC_REG_st_sum_clip_sith 0x00e40084
  1064. /* 0x085[3:0]
  1065. Signal sum clip threshold of weak increase. */
  1066. #define ADC_REG_st_sum_clip_with 0x00600085
  1067. /* 0x085[7:4]
  1068. Signal sum clip threshold of decrease. */
  1069. #define ADC_REG_st_sum_clip_dth 0x00e40085
  1070. /* 0x086[0]
  1071. Enable signal sum clip threshold of decrease. */
  1072. #define ADC_REG_st_sum_clip_dec 0x00000086
  1073. /* 0x086[1]
  1074. Enable signal sum clip threshold of strong increase. */
  1075. #define ADC_REG_st_sum_clip_sinc 0x00210086
  1076. /* 0x086[2]
  1077. Enable signal sum clip threshold of weak increase. */
  1078. #define ADC_REG_st_sum_clip_winc 0x00420086
  1079. // 0x086[3] reserved
  1080. /* 0x086[4]
  1081. 0/1 8tap/16tap FIR1 filter(filter signal sum). */
  1082. #define ADC_REG_st_fir1_strong 0x00840086
  1083. /* 0x086[5]
  1084. 0/1 8tap/16tap FIR2 filter(filter FIR1 filter). */
  1085. #define ADC_REG_st_fir2_strong 0x00a50086
  1086. /* 0x086[7:6]
  1087. FIR1/FIR2 filter option, add one bit in 55nm. */
  1088. #define ADC_REG_st_filt_opt 0x00e60086
  1089. /* 0x087[1:0]
  1090. IIR1 filter strength st_iir1_filt alpha = 4/32(weak), 2/32, 1/32 (strong). */
  1091. #define ADC_REG_st_iir1_strength 0x00200087
  1092. /* 0x087[3:2]
  1093. IIR2 filter strength st_iir2_filt alpha = 4/128(strong), 2/128, 1/128 (strong++). */
  1094. #define ADC_REG_st_iir2_strength 0x00620087
  1095. /* 0x087[5:4]
  1096. Filter option for sync tip search,
  1097. 0: auto (st_filt as Vblank & HD),
  1098. 1: auto (st_filt as HD),
  1099. 2: st_iir1_filt,
  1100. 3: st_filt */
  1101. #define ADC_REG_st_srch_filt_opt 0x00a40087
  1102. // 0x087[7:6] reserved
  1103. /* 0x088[0]
  1104. Enable stable strong clamp start. */
  1105. #define ADC_REG_stb_sc_1st_update 0x00000088
  1106. /* 0x088[1]
  1107. Enable stable strong clamp vsync rising. */
  1108. #define ADC_REG_stb_sc_vs_update 0x00210088
  1109. /* 0x088[2]
  1110. Enable stable strong clamp vsync update. */
  1111. #define ADC_REG_stb_vs_sc_update 0x00420088
  1112. /* 0x088[3]
  1113. Enable initial strong clamp vsync update. */
  1114. #define ADC_REG_ini_vs_sc_update 0x00630088
  1115. /* 0x088[4]
  1116. Enable tip average update. */
  1117. #define ADC_REG_tip_ave_update 0x00840088
  1118. /* 0x088[5]
  1119. Enable high minimun tip value update. */
  1120. #define ADC_REG_high_min_update 0x00a50088
  1121. /* 0x088[6]
  1122. Enable wide tip update. */
  1123. #define ADC_REG_wide_low_update 0x00c60088
  1124. /* 0x088[7]
  1125. Enable loss sync update. */
  1126. #define ADC_REG_loss_sync_update 0x00e70088
  1127. /* 0x089[0]
  1128. Enable too low sync tip update. */
  1129. #define ADC_REG_synct_too_low_update 0x00000089
  1130. // 0x089[1] reserved
  1131. /* 0x089[2]
  1132. High minimum find option,
  1133. 0: normal, 1: strong */
  1134. #define ADC_REG_high_min_strong 0x00420089
  1135. /* 0x089[3]
  1136. Sync tip average find option,
  1137. 0: normal, 1: strong */
  1138. #define ADC_REG_tip_ave_strong 0x00630089
  1139. /* 0x089[5:4]
  1140. Sync minimum find option on cur_state=D. */
  1141. #define ADC_REG_st_stb_src 0x00a40089
  1142. /* 0x089[7:6]
  1143. Sync minimum type on cur_state=D. */
  1144. #define ADC_REG_st_cpt_find_opt 0x00e60089
  1145. /* 0x08a[7:0]
  1146. HD sync bottom level ratio(hsync/line ratio). */
  1147. #define ADC_REG_stbot_wdth_hd 0x00e0008a
  1148. /* 0x08b[7:0]
  1149. SD sync bottom level ratio(hsync/line ratio). */
  1150. #define ADC_REG_stbot_wdth_sd 0x00e0008b
  1151. /* 0x08c[0]
  1152. Enable sync bottom level find. */
  1153. #define ADC_REG_st_bot_find_en 0x0000008c
  1154. /* 0x08c[3:1]
  1155. Vsync mask width using in tip average find. */
  1156. #define ADC_REG_tip_ave_vmask_wdth 0x0061008c
  1157. /* 0x08c[5:4]
  1158. HD mode detect option. */
  1159. #define ADC_REG_hd_mode_det_opt 0x00a4008c
  1160. // 0x08c[7:6] reserved
  1161. /* 0x08d[2:0]
  1162. Tip average rise mask. */
  1163. #define ADC_REG_tip_ave_rise_mask 0x0040008d
  1164. /* 0x08d[3]
  1165. Enable vsync mask in tip average find. */
  1166. #define ADC_REG_tip_ave_vsync_mask 0x0063008d
  1167. /* 0x08d[5:4]
  1168. Falling to rising(sync width) option for tip average. */
  1169. #define ADC_REG_tip_ave_f2r_opt 0x00a4008d
  1170. /* 0x08d[7:6]
  1171. Minimum sync width for tip average. */
  1172. #define ADC_REG_tip_ave_min_wdth 0x00e6008d
  1173. /* 0x08e[1:0]
  1174. Tip average offset. */
  1175. #define ADC_REG_tip_ave_offset 0x0020008e
  1176. // 0x08e[3:2] reserved
  1177. /* 0x08e[7:4]
  1178. Stable range of sync minimum value. */
  1179. #define ADC_REG_cpt_range 0x00e4008e
  1180. /* 0x08f[6:0]
  1181. Sync tip comparator voltage. */
  1182. #define ADC_REG_cpt_vol 0x00c0008f
  1183. /* 0x08f[7]
  1184. Enable dynamic comparator voltage. */
  1185. #define ADC_REG_dyn_cpt_vol_en 0x00e7008f
  1186. //auto phase
  1187. /* 0x090[9:0] (0x091[1:0] ~ 0x090[7:0]) */
  1188. #define ADC_REG_aphase_es_hthold 0x01200090
  1189. // 0x091[7:2] reserved
  1190. /* 0x092[9:0] (0x093[1:0] ~ 0x092[7:0]) */
  1191. #define ADC_REG_aphase_es_lthold 0x01200092
  1192. // 0x093[7:2] reserved
  1193. /* 0x094[3:0]
  1194. the times for edge search, max:8,
  1195. 1: search one edge and return the value,
  1196. 2: search edge twice and return the average,
  1197. 3: search three edges and return accumulated value,
  1198. 4: ?? */
  1199. #define ADC_REG_aphase_es_accnumber 0x00600094
  1200. /* 0x094[4]
  1201. Start to edge-search, the rising edge of this signal is used to start edge search. */
  1202. #define ADC_REG_aphase_es_start 0x00840094
  1203. // 0x094[7:5] reserved
  1204. /* 0x095[4:0]
  1205. [4]: dump scheme,
  1206. 0: value-based,
  1207. 1: hsync-based
  1208. [3:0]: latch point after hsync, counted by pixel clock */
  1209. #define ADC_REG_aphase_es_hdelay 0x00800095
  1210. // 0x095[7:5] reserved
  1211. // 0x096[7:0] reserved
  1212. // 0x097[7:0] reserved
  1213. /* 0x098[7:0]
  1214. Start point of csync-like generator. */
  1215. #define ADC_REG_csgen_start 0x00e00098
  1216. /* 0x099[0]
  1217. Enable cs_gen mode by hs_valid rise,
  1218. 0: csgen1 base on hs_valid_fall,
  1219. 1: csgen1 base on hs_valid_rise */
  1220. #define ADC_REG_csgen_hs_vld_r 0x00000099
  1221. /* 0x099[3:1]
  1222. Vsync mask end threshold count by vblank_t. */
  1223. #define ADC_REG_vsync_mask_vb_th 0x00610099
  1224. /* 0x099[7:4]
  1225. Vsync mask width in cs_gen mode. */
  1226. #define ADC_REG_csgen_vblk_total 0x00e40099
  1227. /* 0x09a[3:0]
  1228. Csync xor start. */
  1229. #define ADC_REG_cs_xor_start 0x0060009a
  1230. /* 0x09a[7:4]
  1231. Csync xor width. */
  1232. #define ADC_REG_cs_xor_wdth 0x00e4009a
  1233. /* 0x09b[1:0]
  1234. Option for start & width counter. */
  1235. #define ADC_REG_cs_xor_opt 0x0020009b
  1236. /* 0x09b[2] */
  1237. #define ADC_REG_hs_vldf_th_en 0x0042009b
  1238. /* 0x09b[3] */
  1239. #define ADC_REG_hs_vldf_th_ext 0x0063009b
  1240. /* 0x09b[5:4]
  1241. Threshold to enable smt by tip_height. */
  1242. #define ADC_REG_smt_auto_opt 0x00a4009b
  1243. /* 0x09b[6]
  1244. Vtotal counter edge select,
  1245. 0: hs_valid_fall,
  1246. 1: hs_valid_rise */
  1247. #define ADC_REG_vttl_edge_sel 0x00c6009b
  1248. /* 0x09b[7]
  1249. Manaul tip_height threshold to enable smt. */
  1250. #define ADC_REG_smt_manual_en 0x00e7009b
  1251. /* 0x09c[0]
  1252. Enable pre-coast mask. */
  1253. #define ADC_REG_pre_coast_mask_en 0x0000009c
  1254. /* 0x09c[1]
  1255. Enable post-coast mask. */
  1256. #define ADC_REG_pst_coast_msk_en 0x0021009c
  1257. /* 0x09c[2]
  1258. Msb vsync mask end threshold. */
  1259. #define ADC_REG_vsync_mask_endex 0x0042009c
  1260. /* 0x09c[3]
  1261. Vsync mask end count by
  1262. 0:vtotal_cnt,
  1263. 1: vblank_t. */
  1264. #define ADC_REG_vsync_mask_vb_en 0x0063009c
  1265. /* 0x09c[7:4]
  1266. Post-coast mask start. */
  1267. #define ADC_REG_pst_coast_msk_start 0x00e4009c
  1268. /* 0x09d[7:0]
  1269. Post-coast mask end. */
  1270. #define ADC_REG_pst_coast_msk_end 0x00e0009d
  1271. /* 0x09e[3:0]
  1272. Vsync mask start, 9*2 valid edge(line). */
  1273. #define ADC_REG_vsync_mask_start 0x0060009e
  1274. /* 0x09e[7:4]
  1275. Vsync mask end, f*2 valid edge(line). */
  1276. #define ADC_REG_vsync_mask_end 0x00e4009e
  1277. /* 0x09f[0] */
  1278. #define ADC_REG_debug_out_b 0x0000009f
  1279. /* 0x09f[1] */
  1280. #define ADC_REG_debug_out_c 0x0021009f
  1281. /* 0x09f[2] */
  1282. #define ADC_REG_debug_out_i 0x0042009f
  1283. /* 0x09f[3] */
  1284. #define ADC_REG_debug_out_j 0x0063009f
  1285. /* 0x09f[4] */
  1286. #define ADC_REG_debug_out_k 0x0084009f
  1287. /* 0x09f[5] */
  1288. #define ADC_REG_debug_out_m 0x00a5009f
  1289. /* 0x09f[6] */
  1290. #define ADC_REG_debug_out_n 0x00c6009f
  1291. /* 0x09f[5] */
  1292. #define ADC_REG_debug_out_o 0x00e7009f
  1293. //CVBS
  1294. /* 0x0a0[1:0]
  1295. G channel SIF model clamp current select. */
  1296. #define ADC_REG_adjsifclr12v2 0x002000a0
  1297. /* 0x0a0[3:2]
  1298. R channel SIF model clamp current select. */
  1299. #define ADC_REG_adjsifclr12v3 0x006200a0
  1300. /* 0x0a0[5:4]
  1301. G channel clamp model select(See STG1 clamp table),
  1302. 0: RGB mode,
  1303. 1: Component mode. */
  1304. #define ADC_REG_cvbs_clamp_mode_g 0x00a400a0
  1305. // 0x0a0[7:6] reserved
  1306. /* 0x0a1[1:0]
  1307. Red and blue channel clamp mode select.(See STG1 clamp table).
  1308. 0: RGB mode,
  1309. 1: Component mode. */
  1310. #define ADC_REG_cvbs_clamp_mode_rb 0x002000a1
  1311. // 0x0a1[3:2] reserved
  1312. /* 0x0a1[4]
  1313. Select B channel AFE mode */
  1314. #define ADC_REG_b_scvbs12 0x008400a1
  1315. /* 0x0a1[5] */
  1316. #define ADC_REG_b_sypp12 0x00a500a1
  1317. // 0x0a1[7:6] reserved
  1318. /* 0x0a2[7:0] */
  1319. #define ADC_REG_cs_clamp_width_ns 0x00e000a2
  1320. /* 0x0a3[0]
  1321. Select R channel AFE mode */
  1322. #define ADC_REG_R_SYPP120 0x000000a3
  1323. /* 0x0a3[1]
  1324. Select R channel AFE mode */
  1325. #define ADC_REG_R_SYPP121 0x002100a3
  1326. /* 0x0a3[2] */
  1327. #define ADC_REG_R_SCVBS12 0x004200a3
  1328. /* 0x0a3[3]
  1329. Select G channel AFE mode */
  1330. #define ADC_REG_G_SYPP120 0x006300a3
  1331. /* 0x0a3[4]
  1332. Select G channel AFE mode */
  1333. #define ADC_REG_G_SYPP121 0x008400a3
  1334. /* 0x0a3[5] */
  1335. #define ADC_REG_G_SCVBS12 0x00a500a3
  1336. /* 0x0a3[6]
  1337. Select B channel AFE mode */
  1338. #define ADC_REG_B_SYPP120 0x00c600a3
  1339. /* 0x0a3[7]
  1340. Select B channel AFE mode */
  1341. #define ADC_REG_B_SYPP121 0x00e700a3
  1342. /* 0x0a4[2:0] */
  1343. #define ADC_REG_CHR_SIFCLK_SEL 0x004000a4
  1344. // 0x0a4[3] reserved
  1345. /* 0x0a4[4]
  1346. SIF clock select */
  1347. #define ADC_REG_PLL12V10 0x008400a4
  1348. /* 0x0a4[5] */
  1349. #define ADC_REG_PLL12V11 0x00a500a4
  1350. /* 0x0a4[6] */
  1351. #define ADC_REG_PLL12V20 0x00c600a4
  1352. /* 0x0a4[7] */
  1353. #define ADC_REG_PLL12V21 0x00e700a4
  1354. /* 0x0a4[7:4] */
  1355. #define ADC_REG_PLL12V 0x00e400a4
  1356. /* 0x0a5[0] */
  1357. #define ADC_REG_CVBSO_PWD12 0x000000a5
  1358. /* 0x0a5[1] */
  1359. #define ADC_REG_COMPVSEL12V 0x002100a5
  1360. /* 0x0a5[2] */
  1361. #define ADC_REG_C5SWEN12V 0x004200a5
  1362. // 0x0a5[3] reserved
  1363. /* 0x0a5[4] */
  1364. #define ADC_REG_ADCPLL12V30 0x008400a5
  1365. /* 0x0a5[5] */
  1366. #define ADC_REG_ADCPLL12V31 0x00a500a5
  1367. // 0x0a5[7:6] reserved
  1368. /* 0x0a6[1:0] */
  1369. #define ADC_REG_pll_12v 0x002000a6
  1370. /* 0x0a6[3:2] (removed)
  1371. Adjust PLL OP bias current. */
  1372. #define ADC_REG_pll_opctr 0x006200a6
  1373. /* 0x0a6[5:4] (removed)
  1374. Adjust PLL bias current. */
  1375. #define ADC_REG_pll_vb2str 0x00a400a6
  1376. /* 0x0a6[7:6]
  1377. Pll Gain bit. */
  1378. #define ADC_REG_pll_gb_MSBs 0x00e600a6
  1379. /* 0x0a7[1:0]
  1380. PLL charge pump, set PLL band width. */
  1381. #define ADC_REG_pll_i2ctrl_MSBs 0x002000a7
  1382. /* 0x0a7[3:2]
  1383. PLL charge pump, set PLL band width. */
  1384. #define ADC_REG_pll_ictrl_MSBs 0x006200a7
  1385. /* 0x0a7[5:4]
  1386. External pixel clock mode,
  1387. 0: ext_pxclk,
  1388. 1: cvbs_clk (XTAL 24.576 MHz),
  1389. 2: cvbs_49M (49.152 MHz),
  1390. 3: NC */
  1391. #define ADC_REG_ext_clk_muxsel 0x00a400a7
  1392. /* 0x0a7[7:6]
  1393. B channel SIF model clamp current select */
  1394. #define ADC_REG_adjsifclr12v1 0x00e600a7
  1395. /* 0x0a8[3:0]
  1396. When to enable the blank-diff after the first vsync, the unit is 16 lines. */
  1397. #define ADC_REG_diff_en_start 0x006000a8
  1398. /* 0x0a8[5:4] */
  1399. #define ADC_REG_adc_mode 0x00a400a8
  1400. /* 0x0a8[6] */
  1401. #define ADC_REG_av_clamp_mode 0x00c600a8
  1402. /* 0x0a8[7] */
  1403. #define ADC_REG_clamp_mode 0x00e700a8
  1404. /* 0x0a9[2:0] */
  1405. #define ADC_REG_av_r_pg12v1 0x004000a9
  1406. // 0x0a9[3] reserved
  1407. /* 0x0a9[6:4] */
  1408. #define ADC_REG_av_g_pg12v1 0x00c400a9
  1409. // 0x0a9[7] reserved
  1410. /* 0x0aa[2:0]
  1411. External VCMI level (10mV each step),
  1412. b'000: 380mV, b'100: 400mV(default), b'111: 450mV */
  1413. #define ADC_REG_b_pg12v1 0x004000aa
  1414. // 0x0aa[3] reserved
  1415. /* 0x0aa[4] */
  1416. #define ADC_REG_cvclamp_en 0x008400aa
  1417. /* 0x0aa[5] */
  1418. #define ADC_REG_wclamp_disable 0x00a500aa
  1419. /* 0x0aa[6]
  1420. Software control for the diff-enable signal. */
  1421. #define ADC_REG_diff_en_sw_ctrl 0x00c600aa
  1422. /* 0x0aa[7]
  1423. Software control for the the strong clamp of cvbs,
  1424. 0: strong clamp after weak clamp,
  1425. 1: strong clamp is unconcerned with weak clamp */
  1426. #define ADC_REG_sclamp_sw_ctrl 0x00e700aa
  1427. /* 0x0ab[4:0] */
  1428. #define ADC_REG_av_r_pg12v2 0x008000ab
  1429. // 0x0ab[7:5] reserved
  1430. /* 0x0ac[4:0] */
  1431. #define ADC_REG_av_g_pg12v2 0x008000ac
  1432. // 0x0ac[7:5] reserved
  1433. /* 0x0ad[4:0] */
  1434. #define ADC_REG_av_b_pg12v2 0x008000ad
  1435. // 0x0ad[5] reserved
  1436. /* 0x0ad[6] */
  1437. #define ADC_REG_y_out_mode 0x00c600ad
  1438. /* 0x0ad[7] */
  1439. #define ADC_REG_y_out_switch_mode 0x00e700ad
  1440. /* 0x0ae[0] */
  1441. #define ADC_REG_y_sifclampen12v 0x000000ae
  1442. /* 0x0ae[1] */
  1443. #define ADC_REG_r_sifclampen12v 0x002100ae
  1444. /* 0x0ae[2] */
  1445. #define ADC_REG_g_sifclampen12v 0x004200ae
  1446. /* 0x0ae[3] */
  1447. #define ADC_REG_b_sifclampen12v 0x006300ae
  1448. /* 0x0ae[4]
  1449. Negative the diff value in 2's complement. */
  1450. #define ADC_REG_diff_negative 0x008400ae
  1451. /* 0x0ae[5]
  1452. Polarity control for the vsync_t,
  1453. 1: inversed vsync_t */
  1454. #define ADC_REG_vsyncct_pol_ctrl 0x00a500ae
  1455. /* 0x0ae[6]
  1456. Polarity control for the cpump_t,
  1457. 1: inversed cpump_t */
  1458. #define ADC_REG_cpumpt_pol_ctrl 0x00c600ae
  1459. /* 0x0ae[7]
  1460. Mask the cpump_t during the vsync_t is active (low). */
  1461. #define ADC_REG_cpumpt_maskiv 0x00e700ae
  1462. /* 0x0af[1:0]
  1463. When to de-assert the weak clamp when the no_signal_flag = 0,
  1464. 0: immediately, 1: the rising edge,
  1465. 2: the falling edge,
  1466. 3: the rising edge of the vsync_t */
  1467. #define ADC_REG_wclamp_ref_edge 0x002000af
  1468. /* 0x0af[2]
  1469. Weak clamp is the strong clamp of the g-channel when this bit is set */
  1470. #define ADC_REG_wclamp_byg 0x004200af
  1471. /* 0x0af[3]
  1472. Mask the rgb-clamp with no-signal_flag,
  1473. 0:non-mask, 1: mask */
  1474. #define ADC_REG_scout_mask 0x006300af
  1475. // 0x0af[7:4] reserved
  1476. /* 0x0b0[1:0]
  1477. 0: component1, 1: component2, 2: component3 */
  1478. #define ADC_REG_sog_clamp_sel 0x002000b0
  1479. /* 0x0b0[2]
  1480. External weak clamp. */
  1481. #define ADC_REG_extn_wc 0x004200b0
  1482. /* 0x0b0[3]
  1483. External strong clamp. */
  1484. #define ADC_REG_extn_sc 0x006300b0
  1485. /* 0x0b0[6:4]
  1486. Weak clamp turn on width on cur_state=1. */
  1487. #define ADC_REG_wclamp_lcnt 0x00c400b0
  1488. // 0x0b0[7] reserved
  1489. /* 0x0b1[3:0]
  1490. Strong clamp mask end. */
  1491. #define ADC_REG_sclamp_mask_end 0x006000b1
  1492. /* 0x0b1[6:4]
  1493. Strong clamp mask start. */
  1494. #define ADC_REG_sclamp_mask_start 0x00c400b1
  1495. /* 0x0b1[7]
  1496. Enable strong clamp mask. */
  1497. #define ADC_REG_sclamp_mask_en 0x00e700b1
  1498. /* 0x0b2[3:0]
  1499. Sum threshold of conditional strong clamp on cur_state=1. */
  1500. #define ADC_REG_cond_sc_sum_th 0x006000b2
  1501. /* 0x0b2[7:4]
  1502. Filter threshold of conditional strong clamp on cur_state=1. */
  1503. #define ADC_REG_cond_sc_filt_th 0x00e400b2
  1504. /* 0x0b3[3:0]
  1505. Initial strong clamp start on cur_state=9. */
  1506. #define ADC_REG_ini_sc_start 0x006000b3
  1507. /* 0x0b3[7:4]
  1508. Initial strong clamp width on cur_state=9. */
  1509. #define ADC_REG_ini_sc_wdth 0x00e400b3
  1510. /* 0x0b4[5:0]
  1511. Initial strong clamp latency on cur_state=9. */
  1512. #define ADC_REG_ini_sc_latency 0x00a000b4
  1513. /* 0x0b4[7:6]
  1514. Round count limimt of initial strong clamp,
  1515. 0: f, 1: 1f, 2: 3f, 3: 7f */
  1516. #define ADC_REG_ini_sc_rlimit 0x00e600b4
  1517. /* 0x0b5[0]
  1518. Enable vsync strong clamp. */
  1519. #define ADC_REG_vs_sclamp_en 0x000000b5
  1520. /* 0x0b5[1]
  1521. Enable vsync strong clamp on cur_state=D. */
  1522. #define ADC_REG_stb_vs_sclamp_en 0x002100b5
  1523. /* 0x0b5[2]
  1524. Enable csync check of strong clamp. */
  1525. #define ADC_REG_sc_smt_chk 0x004200b5
  1526. /* 0x0b5[3]
  1527. Enable synct check of strong clamp. */
  1528. #define ADC_REG_sc_synct_chk 0x006300b5
  1529. /* 0x0b5[4]
  1530. Skip vsync strong clamp or not,
  1531. 0: always clamp, 1: skip V. */
  1532. #define ADC_REG_sc_vsync_skip 0x008400b5
  1533. /* 0x0b5[5] */
  1534. #define ADC_REG_vssc_smt_chk 0x00a500b5
  1535. /* 0x0b5[7:6]
  1536. Stable strong clamp width option. */
  1537. #define ADC_REG_stb1_sc_wdth_opt 0x00e600b5
  1538. /* 0x0b6[3:0]
  1539. Vsync strong clamp start on cur_state=D. */
  1540. #define ADC_REG_vs_sc_start 0x006000b6
  1541. /* 0x0b6[7:4]
  1542. Vsync strong clamp width on cur_state=D. */
  1543. #define ADC_REG_vs_sc_wdth 0x00e400b6
  1544. /* 0x0b7[3:0]
  1545. Strong clamp1 start on cur_state=D. */
  1546. #define ADC_REG_sc1_start 0x006000b7
  1547. /* 0x0b7[7:4]
  1548. Strong clamp1 width on cur_state=D. */
  1549. #define ADC_REG_sc1_wdth 0x00e400b7
  1550. /* 0x0b8[3:0]
  1551. Strong clamp2 start on cur_state=D. */
  1552. #define ADC_REG_sc2_start 0x006000b8
  1553. /* 0x0b8[7:4]
  1554. Strong clamp2 width on cur_state=D. */
  1555. #define ADC_REG_sc2_wdth 0x00e400b8
  1556. /* 0x0b9[1:0]
  1557. Strong clamp throttling option,
  1558. 0: contiguous 1T,
  1559. 1: contiguous 2T,
  1560. 2: contiguous 4T,
  1561. 3: contiguous 4T */
  1562. #define ADC_REG_sc_throt_opt 0x002000b9
  1563. /* 0x0b9[2]
  1564. Stable strong clamp select,
  1565. 0: en_stb1_sclamp | en_stb2_sclamp,
  1566. 1: en_stb1_sclamp */
  1567. #define ADC_REG_sc1_sc2_sel 0x004200b9
  1568. // 0x0b9[3] reserved
  1569. /* 0x0b9[6:4]
  1570. Vsync initial strong clamp throttling option. */
  1571. #define ADC_REG_sc_ini_vs_sth 0x00c400b9
  1572. // 0x0b9[7] reserved
  1573. /* 0x0ba[2:0]
  1574. Vsync stable strong clamp throttling option. */
  1575. #define ADC_REG_sc_stb_vs_sth 0x004000ba
  1576. // 0x0ba[3] reserved
  1577. /* 0x0ba[6:4]
  1578. Stable strong clamp throttling option. */
  1579. #define ADC_REG_sc_stb_sth 0x00c400ba
  1580. // 0x0ba[7] reserved
  1581. /* 0x0bb[3:0]
  1582. FIR1 filter low boundary for stable strong clamp. */
  1583. #define ADC_REG_sc_lowbound 0x006000bb
  1584. /* 0x0bb[7:4]
  1585. FIR1 filter high boundary for stable strong clamp. */
  1586. #define ADC_REG_sc_highbound 0x00e400bb
  1587. /* 0x0bc[3:0]
  1588. i2p-mode rising edge detect low threshold. */
  1589. #define ADC_REG_i2p_rise_lth 0x006000bc
  1590. /* 0x0bc[7:4]
  1591. i2p-mode rising edge detect high threshold. */
  1592. #define ADC_REG_i2p_rise_hth 0x00e400bc
  1593. /* 0x0bd[3:0]
  1594. i2p-mode line width detect low threshold. */
  1595. #define ADC_REG_i2p_wdth_lth 0x006000bd
  1596. /* 0x0bd[7:4]
  1597. i2p-mode line width detect high threshold. */
  1598. #define ADC_REG_i2p_wdth_hth 0x00e400bd
  1599. /* 0x0be[3:0]
  1600. i2p-mode line detect threshold. */
  1601. #define ADC_REG_i2p_wdth_det_th 0x006000be
  1602. /* 0xbe[4]
  1603. i2p-mode detect option,
  1604. 0: rising, 1: width. */
  1605. #define ADC_REG_i2p_opt 0x008400be
  1606. /* 0xbe[5]
  1607. Round count extend of initila strong clamp. */
  1608. #define ADC_REG_ini_sc_extend 0x00a500be
  1609. /* 0xbe[6]
  1610. cs_gen shape select in vsync,
  1611. 0: smt, 1: synct. */
  1612. #define ADC_REG_csgen_vw_opt 0x00c600be
  1613. // 0x0be[7] reserved
  1614. /* 0x0bf[1:0] */
  1615. #define ADC_REG_sc_vblankt1 0x002000bf
  1616. /* 0x0bf[3:2]
  1617. Vsync strong clamp blank number. */
  1618. #define ADC_REG_sc_vblankt2 0x006200bf
  1619. /* 0x0bf[7:4]
  1620. Stable vsync strong clamp blank number. */
  1621. #define ADC_REG_vblank_stb_length 0x00e400bf
  1622. //coast-gen with 4e[3:2] = 0(default)
  1623. /* 0x0c0[15:0] (0x0c1[7:0] ~ 0x0c0[7:0]) */
  1624. #define ADC_STA_shp_width 0x01e000c0
  1625. /* 0x0c2[0] */
  1626. #define ADC_STA_field_i 0x000000c2
  1627. /* 0x0c2[1] */
  1628. #define ADC_STA_cstable_i2 0x002100c2
  1629. /* 0x0c2[2] */
  1630. #define ADC_STA_cstable_i 0x004200c2
  1631. /* 0x0c2[3] */
  1632. #define ADC_STA_cs_active 0x006300c2
  1633. /* 0x0c2[4] */
  1634. #define ADC_STA_cs_fall 0x008400c2
  1635. /* 0x0c2[5] */
  1636. #define ADC_STA_cs_rise 0x00a500c2
  1637. /* 0x0c2[6] */
  1638. #define ADC_STA_csync_en 0x00c600c2
  1639. /* 0x0c2[7] */
  1640. #define ADC_STA_timeout 0x00e700c2
  1641. /* 0x0c3[7:0] */
  1642. #define ADC_STA_tou_vcnt 0x00e000c3
  1643. /* 0x0c4[15:0] (0x0c5[7:0] ~ 0x0c4[7:0]) */
  1644. #define ADC_STA_lvcnt 0x01e000c4
  1645. /* 0x0c6[15:0] (0x0c7[7:0] ~ 0x0c6[7:0]) */
  1646. #define ADC_STA_htotal 0x01e000c6
  1647. /* 0x0c8[15:0] (0x0c9[7:0] ~ 0x0c8[7:0]) */
  1648. #define ADC_STA_latched_stable_vtotal 0x01e000c8
  1649. /* 0x0ca[15:0] (0x0cb[7:0] ~ 0x0ca[7:0]) */
  1650. #define ADC_STA_latched_stable_htotal 0x01e000ca
  1651. /* 0x0cc[0] */
  1652. #define ADC_STA_rstable_nom 0x000000cc
  1653. /* 0x0cc[1] */
  1654. #define ADC_STA_fstable_nom 0x002100cc
  1655. /* 0x0cc[2] */
  1656. #define ADC_STA_both_stable 0x004200cc
  1657. /* 0x0cc[63:8] ( 0xcf[7:0] ~ 0xce[7:0] ~ 0xcd[7:0] ) */
  1658. #define ADC_STA_svp_width 0x03e800cc
  1659. //coast-gen with 4e[3:2] = 2
  1660. /* 0x0c0[15:0] (0x0c1[7:0] ~ 0x0c0[7:0]) */
  1661. #define ADC_STA_oe_period_current 0x01e000c0
  1662. /* 0x0c2[15:0] (0x0c3[7:0] ~ 0x0c2[7:0]) */
  1663. #define ADC_STA_sp_conf 0x01e000c2
  1664. /* 0x0c4[15:0] (0x0c5[7:0] ~ 0x0c4[7:0]) */
  1665. #define ADC_STA_stable_period 0x01e000c4
  1666. /* 0x0c6[15:0] (0x0c7[7:0] ~ 0x0c6[7:0]) */
  1667. #define ADC_STA_hp_counter 0x01e000c6
  1668. /* 0x0c8[15:0] (0x0c9[7:0] ~ 0x0c8[7:0]) */
  1669. #define ADC_STA_hw_counter 0x01e000c8
  1670. /* 0x0ca[15:0] (0x0cb[7:0] ~ 0x0ca[7:0]) */
  1671. #define ADC_STA_vs_counter 0x01e000ca
  1672. /* 0x0cc[15:0] (0x0cd[7:0] ~ 0x0cc[7:0]) */
  1673. #define ADC_STA_vs_redge_thold 0x01e000cc
  1674. //coast-gen with 4e[3:2] = 3
  1675. /* 0x0c0[15:0] (0x0c1[7:0] ~ 0x0c0[7:0]) */
  1676. #define ADC_STA_counta_576i 0x01e000c0
  1677. /* 0x0c2[15:0] (0x0c3[7:0] ~ 0x0c2[7:0]) */
  1678. #define ADC_STA_counta_480i 0x01e000c2
  1679. /* 0x0c4[15:0] (0x0c5[7:0] ~ 0x0c4[7:0]) */
  1680. #define ADC_STA_counta_1080i 0x01e000c4
  1681. /* 0x0c6[15:0] (0x0c7[7:0] ~ 0x0c6[7:0]) */
  1682. #define ADC_STA_vs_lcounter_a 0x01e000c6
  1683. //SOG slicer
  1684. /* 0x0d0[7:0]
  1685. Current SoG state
  1686. 1: clamp signal to working zone(700mV~1650mV)
  1687. 2: check device signal swing,
  1688. [swing<75mV] => state 3
  1689. [swing>75mV] => state 4
  1690. 3: redetect clamp after short period of time, the waiting time is controled by reg_sog_loss_sync_opt(0x83[1:0])
  1691. 4: stmin_find
  1692. 5: stbot_find
  1693. 6: waiting for Vsync, this will check SoG low count
  1694. 7: Vsync is found, and Vsync strong clamp will pull the lowest signal voltage to 1.066V
  1695. 8: find a Hsync rising edge for confirming the correctness of clamping result
  1696. 9: clamp the bottom of Hsync to improve the signal stability, the target is 1.066V+50mV
  1697. a: stmin_refind
  1698. b: stbot_refind
  1699. c: check the lowest level of Hsync
  1700. [lowest = 1.066V+50mV] => state d
  1701. [lowest ??1.066V+50mV] => state 8
  1702. d: signal stable
  1703. e: ?
  1704. f: signal unstable, its judging rule are
  1705. - there are no Hsync for 40??in state 6 c d
  1706. - repeat state 8 9 a b c loop for 32 times*/
  1707. #define ADC_STA_cur_state 0x00e000d0
  1708. /* 0x0d1[4:0] */
  1709. #define ADC_STA_int_sc_rcnt 0x008000d1
  1710. // 0x0d1[7:5] reserved
  1711. // 0x0d2[7:0] reserved
  1712. // 0x0d3[7:0] reserved
  1713. /* 0x0d4[9:0] (0x0d5[1:0] ~ 0x0d4[7:0]) */
  1714. #define ADC_STA_mlow_wdth 0x012000d4
  1715. /* 0x0d4[19:10] (0x0d6[3:0] ~ 0x0d5[7:2]) */
  1716. #define ADC_STA_low_wdth 0x016200d5
  1717. // 0x0d6[7:4] reserved
  1718. /* 0x0d7[7:0] */
  1719. #define ADC_STA_sine_moise_acc_cnt 0x00e000d7
  1720. /* 0x0d8[7:0] */
  1721. #define ADC_STA_sta_hs_slew 0x00e000d8
  1722. /* 0x0d9[7:0] */
  1723. #define ADC_STA_min_find 0x00e000d9
  1724. /* 0x0da[7:0] */
  1725. #define ADC_STA_mid_find 0x00e000da
  1726. /* 0x0db[7:0] */
  1727. #define ADC_STA_max_find 0x00e000db
  1728. /* 0x0dc[12:0] (0x0dd[4:0] ~ 0x0dc[7:0]) */
  1729. #define ADC_STA_mline_wdth 0x01a000dc
  1730. // 0x0dd[7:5] reserved
  1731. /* 0x0dc[28:16] (0x0df[4:0] ~ 0x0de[7:0]) */
  1732. #define ADC_STA_line_wdth 0x01a000de
  1733. // 0x0df[7:5] reserved
  1734. //auto phase
  1735. /* 0x0e0[15:0] */
  1736. #define ADC_STA_pd1_dout 0x01e000e0
  1737. /* 0x0e2[15:0] */
  1738. #define ADC_STA_pd2_dout 0x01e000e2
  1739. /* 0x0e4[15:0] */
  1740. #define ADC_STA_pd3_dout 0x01e000e4
  1741. /* 0x0e6[15:0] */
  1742. #define ADC_STA_pd4_dout 0x01e000e6
  1743. /* 0x0e8[15:0] */
  1744. #define ADC_STA_pd5_dout 0x01e000e8
  1745. /* 0x0ea[15:0] */
  1746. #define ADC_STA_pd6_dout 0x01e000ea
  1747. /* 0x0ec[15:0] */
  1748. #define ADC_STA_pd7_dout 0x01e000ec
  1749. /* 0x0ee[7:0] */
  1750. #define ADC_STA_d2h_counter 0x00e000ee
  1751. /* 0x0ef[0] */
  1752. #define ADC_STA_esearch_done 0x000000ef
  1753. // 0x0ef[7:1] reserved
  1754. //-------Read only-------
  1755. //interrupt
  1756. /* 0x0f0[3:0]
  1757. Sync lost interrupt
  1758. [0]: Input signal swing is smaller than 75mV, indicating no signal.
  1759. [1]: Input signal swing is more than 75mV, indicating signal in.
  1760. [2]: There is no hsync edge detected in 80ms period, and SOG state is 0xf6,0xf8 or 0xfd
  1761. [3]: There is no hsync edge detected in 40ms period, or the DC level of Hsync decreasing 30mV */
  1762. #define ADC_STA_loss_sync 0x006000f0
  1763. /* 0x0f0[4]
  1764. Inverse of STA_ext_hsync_active (for VGA). */
  1765. #define ADC_STA_ext_hsync_non_active 0x008400f0
  1766. /* 0x0f0[5]
  1767. Continuous 3 external hsync rising edges are detected (for VGA). */
  1768. #define ADC_STA_ext_hsync_active 0x00a500f0
  1769. /* 0x0f0[6]
  1770. Time out interrupt for clamp processing(clamp failed due to hsync lost).
  1771. The timeout threshold reference to reg_clamp_int_tout_thold(0x47[7:0]). */
  1772. #define ADC_STA_clamp_int 0x00c600f0
  1773. /* 0x0f0[7]
  1774. Detect whether Hsync for VIP is stable or not. The judging rule is continuous
  1775. 4 hsync edges(0x04[7:5]) are bigger than the reference threshold (0x04[4:0]). */
  1776. #define ADC_STA_us_hsout 0x00e700f0
  1777. /* 0x0f1[0]
  1778. Inverse of STA_fast_coast. */
  1779. #define ADC_STA_unstable_coast 0x000000f1
  1780. /* 0x0f1[1]
  1781. Continuous 3 hsync rising edges are detected after SoG stable. */
  1782. #define ADC_STA_fast_coast 0x002100f1
  1783. /* 0x0f1[2]
  1784. Interrupt for I-mode to P-mode tansfering. */
  1785. #define ADC_STA_coast_ntimer 0x004200f1
  1786. /* 0x0f1[3] */
  1787. #define ADC_STA_coast_etimer 0x006300f1
  1788. /* 0x0f1[4]
  1789. There is no hsync detected in the time period of (0x0d[7:6]). */
  1790. #define ADC_STA_cs_stable_i2_fedge 0x008400f1
  1791. /* 0x0f1[5]
  1792. Check whether current Vtotal is equal to the previous Vtotal. */
  1793. #define ADC_STA_cs_stable_i2_redge 0x00a500f1
  1794. /* 0x0f1[6]
  1795. smt out miss. This interrupt is enabled by reg_cs2_rst_sog_maxhp_en(0x19[7])
  1796. and its threshold is reg_cs2_rst_sog_maxhp(0x19[6:0]~0x18[7:0]). */
  1797. #define ADC_STA_hsync_miss 0x00c600f1
  1798. /* 0x0f1[7]
  1799. coast period is unstable (rising edge for coast period < 11.5μs) */
  1800. #define ADC_STA_clear_pll_rst_rbit 0x00e700f1
  1801. /* 0x0f0[15:0] (0x0f1[7:0] ~ 0x0f0[7:0]) */
  1802. #define ADC_STA_interrupt 0x01e000f0
  1803. //interrupt status
  1804. /* 0x0f2[11:0] (0x0f3[3:0] ~ 0x0f2[7:0]) */
  1805. #define ADC_STA_prev_coast_period 0x018000f2
  1806. /* 0x0f4[11:0] (0x0f5[3:0] ~ 0x0f4[7:0]) */
  1807. #define ADC_STA_coast_period_counter 0x018000f4
  1808. // 0x0f5[7:4] reserved
  1809. /* 0x0f6[7:0] */
  1810. #define ADC_STA_normal_timer 0x00e000f6
  1811. /* 0x0f7[2:0] */
  1812. #define ADC_STA_urc_counter 0x004000f7
  1813. // 0x0f7[3] reserved
  1814. /* 0x0f7[6:4] */
  1815. #define ADC_STA_cs_pls_counter 0x00c400f7
  1816. /* 0x0f7[7] */
  1817. #define ADC_STA_cs_stable_i2 0x00e700f7
  1818. /* 0x0f8[7:0] */
  1819. #define ADC_STA_edge_timer 0x00e000f8
  1820. // 0x0f9[7:0] reserved
  1821. //active
  1822. /* 0x0fa[0] */
  1823. #define ADC_STA_clamp_active 0x000000fa
  1824. /* 0x0fa[1] */
  1825. #define ADC_STA_clamp_interrupt 0x002100fa
  1826. // 0x0fa[7:2] reserved
  1827. // 0x0fb[7:0] reserved
  1828. /* 0x0fc[0] */
  1829. #define ADC_STA_csync_plrty 0x000000fc
  1830. /* 0x0fc[1] */
  1831. #define ADC_STA_csync_active 0x002100fc
  1832. /* 0x0fc[2] */
  1833. #define ADC_STA_csync_flag_fcsdtor 0x004200fc
  1834. // 0x0fc[3] reserved
  1835. /* 0x0fc[4] */
  1836. #define ADC_STA_hs_plrty 0x008400fc
  1837. /* 0x0fc[5] */
  1838. #define ADC_STA_hs_active 0x00a500fc
  1839. /* 0x0fc[6] */
  1840. #define ADC_STA_csync_in_hsync_flag 0x00c600fc
  1841. // 0x0fc[7] reserved
  1842. /* 0x0fd[0] */
  1843. #define ADC_STA_vs_plrty 0x000000fd
  1844. /* 0x0fd[1] */
  1845. #define ADC_STA_vs_active 0x002100fd
  1846. // 0x0fd[7:2] reserved
  1847. /* 0x0fe[7:0] */
  1848. #define ADC_STA_ctp_compout 0x00e000fe
  1849. /* 0x0fe[3:0] */
  1850. #define ADC_STA_ctp_range 0x006000fe
  1851. // 0x0fe[7:4] reserved
  1852. // 0x0ff[7:0] reserved
  1853. //10x for 9561
  1854. /* 0x100[7:0]
  1855. Deglitch High to Low threshold. */
  1856. #define ADC_REG_hvdg_h2l_thold 0x00e00100
  1857. /* 0x101[7:0]
  1858. Deglitch Low to High threshold. */
  1859. #define ADC_REG_hvdg_l2h_thold 0x00e00101
  1860. /* 0x102[7:0] */
  1861. #define ADC_REG_hvcs_httl_sch_range 0x00e00102
  1862. /* 0x103[0]
  1863. Adi polarity. */
  1864. #define ADC_REG_hvadi_pol_cs 0x00000103
  1865. /* 0x103[2:1] */
  1866. #define ADC_REG_hvdg_source_sel 0x00410103
  1867. // 0x103[7:3] reserved
  1868. /* 0x104[7:0]
  1869. R channel clamp power down start. */
  1870. #define ADC_REG_r_clamppdn_st 0x00e00104
  1871. /* 0x105[7:0]
  1872. R channel clamp power down end. */
  1873. #define ADC_REG_r_clamppdn_end 0x00e00105
  1874. /* 0x106[7:0]
  1875. G channel clamp power down start. */
  1876. #define ADC_REG_g_clamppdn_st 0x00e00106
  1877. /* 0x107[7:0]
  1878. G channel clamp power down end. */
  1879. #define ADC_REG_g_clamppdn_end 0x00e00107
  1880. /* 0x108[7:0]
  1881. B channel clamp power down start. */
  1882. #define ADC_REG_b_clamppdn_st 0x00e00108
  1883. /* 0x109[7:0]
  1884. B channel clamp power down end. */
  1885. #define ADC_REG_b_clamppdn_end 0x00e00109
  1886. /* 0x10a[1:0]
  1887. 10: output 0, 11: output 1, 0x: output R clamp power down. */
  1888. #define ADC_REG_r_clamppdn_mod 0x0020010a
  1889. /* 0x10a[3:2]
  1890. 10: output 0, 11: output 1, 0x: output G clamp power down. */
  1891. #define ADC_REG_g_clamppdn_mod 0x0062010a
  1892. /* 0x10a[5:4]
  1893. 10: output 0, 11: output 1, 0x: output B clamp power down. */
  1894. #define ADC_REG_b_clamppdn_mod 0x00a4010a
  1895. /* 0x10a[6]
  1896. Rising edge or falling edge. */
  1897. #define ADC_REG_clamppdn_edge 0x00c6010a
  1898. /* 0x10a[7]
  1899. RGB clamp power down enable. */
  1900. #define ADC_REG_clamppdn_en 0x00e7010a
  1901. /* 0x10b[0]
  1902. R clamp power down polarity. */
  1903. #define ADC_REG_r_clamppdn_pol 0x0000010b
  1904. /* 0x10b[1]
  1905. G clamp power down polarity. */
  1906. #define ADC_REG_g_clamppdn_pol 0x0021010b
  1907. /* 0x10b[2]
  1908. B clamp power down polarity. */
  1909. #define ADC_REG_b_clamppdn_pol 0x0042010b
  1910. // 0x10b[7:3] reserved
  1911. /* 0x10c[7:0]
  1912. Y channel clamp power down start. */
  1913. #define ADC_REG_y_clamppdn_st 0x00e0010c
  1914. /* 0x10d[7:0]
  1915. Y channel clamp power down end. */
  1916. #define ADC_REG_y_clamppdn_end 0x00e0010d
  1917. /* 0x10e[1:0]
  1918. 10: output 0, 11: output 1, 0x: output Y clamp power down. */
  1919. #define ADC_REG_y_clamppdn_mod 0x0020010e
  1920. /* 0x10e[2]
  1921. Y clamp power down polarity. */
  1922. #define ADC_REG_y_clamppdn_pol 0x0042010e
  1923. /* 0x10e[3]
  1924. nsignal polarity. */
  1925. #define ADC_REG_nsignal_pol 0x0063010e
  1926. /* 0x10e[4]
  1927. Y clamp power down enable. */
  1928. #define ADC_REG_yclamppdn_en 0x0084010e
  1929. // 0x10e[7:5] reserved
  1930. /* 0x10f[7:0] */
  1931. #define ADC_REG_vsynth 0x00e0010f
  1932. // 0x110 ~ 0x11f reserved
  1933. //12x for 9561
  1934. /* 0x120[1:0] */
  1935. #define ADC_REG_adjdmclr12v1 0x00200120
  1936. /* 0x120[3:2]
  1937. Y channel SIF model clamp current select. */
  1938. #define ADC_REG_adjsifclr12v4 0x00620120
  1939. /* 0x120[4] */
  1940. #define ADC_REG_dmclampen12v 0x00840120
  1941. /* 0x120[5] */
  1942. #define ADC_REG_e15dby 0x00a50120
  1943. /* 0x120[7:6] */
  1944. #define ADC_REG_clamp_mode_y 0x00e60120
  1945. /* 0x121[0] */
  1946. #define ADC_REG_pwdny 0x00000121
  1947. /* 0x121[3:1] */
  1948. #define ADC_REG_y_12vcm_sel 0x00610121
  1949. /* 0x121[6:4] */
  1950. #define ADC_REG_y_33vcm_sel 0x00c40121
  1951. /* 0x121[7] */
  1952. #define ADC_REG_refinsel12v 0x00e70121
  1953. /* 0x122[2:0] */
  1954. #define ADC_REG_y_chsel 0x00400122
  1955. /* 0x122[3] */
  1956. #define ADC_REG_y_ffadj12v 0x00630122
  1957. /* 0x122[4] */
  1958. #define ADC_REG_y_lgadj12v 0x00840122
  1959. /* 0x122[5] */
  1960. #define ADC_REG_y_mn10y 0x00a50122
  1961. /* 0x122[9:6] (0x123[1:0] ~ 0x122[7:6])*/
  1962. #define ADC_REG_y_mn1 0x01260122
  1963. /* 0x123[7:2] */
  1964. #define ADC_REG_y_mn2 0x00e20123
  1965. /* 0x124[3:0] */
  1966. #define ADC_REG_y_mp1 0x00600124
  1967. /* 0x124[4] */
  1968. #define ADC_REG_y_mp10y 0x00840124
  1969. /* 0x124[5] */
  1970. #define ADC_REG_av_y_pgmsb 0x00c50124
  1971. // 0x124[7:6] reserved
  1972. /* 0x125[3:0] */
  1973. #define ADC_REG_y_pga12v1 0x00600125
  1974. /* 0x125[7:4] */
  1975. #define ADC_REG_y_pga12v2_bit0to3 0x00e40125
  1976. /* 0x126[0] */
  1977. #define ADC_REG_y_pga12v2_bit4 0x00000126
  1978. /* 0x126[1] */
  1979. #define ADC_REG_y_pden12v 0x00210126
  1980. /* 0x126[3:2] */
  1981. #define ADC_REG_y_refch12v 0x00620126
  1982. /* 0x126[4] */
  1983. #define ADC_REG_y_tswmiden12v 0x00840126
  1984. /* 0x126[5] */
  1985. #define ADC_REG_y_refclampsel12v 0x00a50126
  1986. /* 0x126[6] */
  1987. #define ADC_REG_y_intrefen12v 0x00c60126
  1988. // 0x126[7] reserved
  1989. /* 0x127[1:0] */
  1990. #define ADC_REG_y_pga12v3 0x00200127
  1991. // 0x127[3:2] reserved
  1992. /* 0x127[7:4] */
  1993. #define ADC_REG_y_sb2 0x00e40127
  1994. /* 0x128[4:0] */
  1995. #define ADC_REG_y_sb1 0x00800128
  1996. /* 0x128[6:5] */
  1997. #define ADC_REG_y_sypp12 0x00c50128
  1998. /* 0x128[7] */
  1999. #define ADC_REG_y_clamp_en 0x00e70128
  2000. /* 0x129[1:0] */
  2001. #define ADC_REG_y_scvbs12 0x00200129
  2002. // 0x129[3:2] reserved
  2003. /* 0x129[5:4] */
  2004. #define ADC_REG_lpfmod12v 0x00a40129
  2005. /* 0x129[6] */
  2006. #define ADC_REG_vbgren 0x00c60129
  2007. /* 0x129[7] */
  2008. #define ADC_REG_sog_ch1_sel 0x00e70129
  2009. //coast200 for debounce
  2010. // 0x12a[2:0] reserved
  2011. /* 0x12a[3] */
  2012. #define ADC_REG_refclk_db_sel 0x0063012a
  2013. // 0x12a[7:4] reserved
  2014. /* 0x12b[0] */
  2015. #define ADC_REG_refclk_cs_sel 0x0000012b
  2016. // 0x12b[7:1] reserved
  2017. /* 0x12c[5:0] */
  2018. #define ADC_REG_diffin_max 0x00a0012c
  2019. /* 0x12c[7:6] */
  2020. #define ADC_REG_diffmod 0x00e6012c
  2021. /* 0x12d[5:0] */
  2022. #define ADC_REG_diffinc_max 0x00a0012d
  2023. /* 0x12d[6] */
  2024. #define ADC_REG_rwclampeco 0x00c6012d
  2025. /* 0x12d[7] */
  2026. #define ADC_REG_sog_gaincomp_en 0x00e7012d
  2027. /* 0x12e[0] */
  2028. #define ADC_REG_sog_smtl_dbsen 0x0000012e
  2029. /* 0x12e[1] */
  2030. #define ADC_REG_gainop 0x0021012e
  2031. // 0x12e[3:2] reserved
  2032. /* 0x12e[7:4]
  2033. {R_SMTH_CAP_H, R_SMTH_CAP_L, R_SMTL_CAP_H, R_SMTL_CAP_L} */
  2034. #define ADC_REG_smt_cap
  2035. // 0c12f[7:0] reserved
  2036. /* 0x130[0]
  2037. Auto offset function enable;
  2038. 0: disable,
  2039. 1: enable*/
  2040. #define ADC_REG_auto_ofsen 0x00000130
  2041. // 0x130[1] reserved
  2042. /* 0x130[3:2]
  2043. Debug select. */
  2044. #define ADC_REG_aofs_dbg_sel 0x00620130
  2045. /* 0x130[4]
  2046. Auto offset function enable. */
  2047. #define ADC_REG_auto_ofs0op 0x00840130
  2048. // 0x130[7:5] reserved
  2049. /* 0x130[6]
  2050. Hsync polarity adjustment. */
  2051. #define ADC_REG_aof_hpol 0x00c60130
  2052. /* 0x130[7]
  2053. Vsync polarity adjustment. */
  2054. #define ADC_REG_aof_vpol 0x00e70130
  2055. /* 0x131[7:0]
  2056. To get RGB value in blank region from the programmed line count. */
  2057. #define ADC_REG_aof_lstart 0x00e00131
  2058. /* 0x132[7:0]
  2059. To get RGB value in blank region from the programmed pixel count. */
  2060. #define ADC_REG_aof_pstart 0x00e00132
  2061. /* 0x133[3:0]
  2062. Number of pixel to get average value of RGB in blank region. */
  2063. #define ADC_REG_aof_pwidth 0x00600133
  2064. /* 0x133[7:4]
  2065. Number of lines to get average value of RGB in blank region. */
  2066. #define ADC_REG_aof_lwidth 0x00e40133
  2067. /* 0x135[1:0] ~ 0x134[7:0]
  2068. R channel target value in blank region. */
  2069. #define ADC_REG_r_target 0x01200134
  2070. // 0x135[7:2] reserved
  2071. /* 0x137[1:0] ~ 0x136[7:0]
  2072. G channel target value in blank region. */
  2073. #define ADC_REG_reg_g_target 0x01200136
  2074. // 0x137[7:2] reserved
  2075. /* 0x139[1:0] ~ 0x138[7:0]
  2076. G channel target value in blank region. */
  2077. #define ADC_REG_reg_b_target 0x01200138
  2078. // 0x139[7:2] reserved
  2079. /* 0x13a[1:0]
  2080. Alpha parameter (1/8, 1/16, 1/32, and 1/64). */
  2081. #define ADC_REG_power 0x0020013a
  2082. // 0x13a[2] reserved
  2083. /* 0x13a[3]
  2084. Auto offset software reset. */
  2085. #define ADC_REG_sw_rst 0x0063013a
  2086. // 0x13a[7:4] reserved
  2087. // 0x13b ~ 0x13f reserved
  2088. //PLL Reg 14x
  2089. /* 0x140[7:0]
  2090. Decide by fraction part of divider. */
  2091. #define ADC_REG_datain_ini_7to0 0x00e00140
  2092. /* 0x141[7:0]
  2093. Decide by fraction part of divider. */
  2094. #define ADC_REG_datain_ini_15to8 0x00e00141
  2095. /* 0x142[0]
  2096. Decide by fraction part of divider. */
  2097. #define ADC_REG_datain_ini_16 0x00000142
  2098. /* 0x142[1]
  2099. PLL reference for AV source. */
  2100. #define ADC_REG_dco_bx2 0x00210142
  2101. /* 0x142[2]
  2102. Enable clock for dram,
  2103. 0: off, 1: on */
  2104. #define ADC_REG_dco_en_fdiv 0x00420142
  2105. // 0x142[3] reserved
  2106. /* 0x142[7:4]
  2107. Selection of debug information. */
  2108. #define ADC_REG_dbgsela 0x00e40142
  2109. /* 0x143[7:0]
  2110. DCO divider for feedback clock(N+1), its value is calcultaed
  2111. according to formula,
  2112. febdiv = (VCO / [system CLK] ) - 1 */
  2113. #define ADC_REG_dco_febdiv 0x00e00143
  2114. /* 0x144[5:0]
  2115. DCO gain bit, its value might adopt different settings according
  2116. to VCO range, where the VCO is computation result of the formula below,
  2117. VCO = [pixel clock] x [multiply value of 3 stages pxDiv(0x146)]
  2118. [5]: removed,
  2119. [4]: EN_CAP,
  2120. [3:0]: Gain bit */
  2121. #define ADC_REG_dco_gb 0x00a00144
  2122. /* 0x144[6]
  2123. Reset of DCO divider
  2124. 0: reset ,
  2125. 1: normal. */
  2126. #define ADC_REG_dco_pdiv_rstj 0x00c60144
  2127. /* 0x144[7]
  2128. Reference signal for DCO
  2129. 0: off, 1: on */
  2130. #define ADC_REG_dco_refin 0x00e70144
  2131. /* 0x145[7:0]
  2132. Current of pump, its value might adopt different settings according
  2133. to VCO range, where the VCO is computation result of the formula
  2134. VCO = [pixel clock] x [multipy value of 3 stages pxDiv]
  2135. [3:0] 0: min, f: max,
  2136. [7:4] removed from 40nm */
  2137. #define ADC_REG_dco_ictrl 0x00e00145
  2138. /* 0x146[7:0]
  2139. Dual loop divider for pixel clock(N+1), there are 3 stage dividers,
  2140. - 1st divider is setup in pll_div_sel(0x39[1:0]),
  2141. - 2nd divider is setup in pll_divb_sel(0x39[3:2]),
  2142. - 3rd divider is constant value 4,
  2143. and the formula of dlpll_pxdiv is
  2144. dlpll_pxdiv = ([1st div] x [2nd div] x [3rd div]) -1 */
  2145. #define ADC_REG_dlpll_pxdiv 0x00e00146
  2146. /* 0x147[4:0]
  2147. DCO divider for reference clock.
  2148. [0]: N+1,
  2149. [4:1]: removed. */
  2150. #define ADC_REG_dco_refdiv 0x00800147
  2151. /* 0x147[5]
  2152. Reset for dual loop divider.
  2153. 0: reset,
  2154. 1: normal */
  2155. #define ADC_REG_dlpll_pdiv_rstj 0x00a50147
  2156. /* 0x147[7:6]
  2157. Dual loop line divider MSB 2bits. */
  2158. #define ADC_REG_r_pll_opi 0x00e60147
  2159. /* 0x148[7:0]
  2160. Dual loop line divider LSB [7:0] of 12bits12bits, the value is equal to (Htotal -1),
  2161. where Htotal value comes from h_total of timing table and multiply its sampling
  2162. enlarge rate. */
  2163. #define ADC_REG_pll_febdiv_7to0 0x00e00148
  2164. /* 0x149[3:0] Dual loop line divider LSB [11:8] of 12bits12bits, the value is equal to (Htotal -1),
  2165. where Htotal value comes from h_total of timing table and multiply its sampling
  2166. enlarge rate. */
  2167. #define ADC_REG_pll_febdiv_11to8 0x00600149
  2168. //digital offset enable
  2169. /* 0x149[6] */
  2170. #define ADC_REG_beofst_en0 0x00c60149
  2171. /* 0x149[7] */
  2172. #define ADC_REG_beofst_en1 0x00e70149
  2173. /* 0x14a[0]
  2174. LDO's power down2. */
  2175. #define ADC_REG_ldo_pwd 0x0000014a
  2176. /* 0x14a[1]
  2177. LDO's power down1 lead over power down2. */
  2178. #define ADC_REG_ldo_pwde 0x0021014a
  2179. /* 0x14a[2]
  2180. Reset for sigma delta modulator(SDM). */
  2181. #define ADC_REG_sdmresetj 0x0042014a
  2182. /* 0x14a[3]
  2183. Achitecture selection for SDM */
  2184. #define ADC_REG_sdm_type_sel 0x0063014a
  2185. /* 0x14a[6:4]
  2186. Selection for bandgap voltage(131 removed) */
  2187. #define ADC_REG_vbg_sel 0x00c4014a
  2188. /* 0x14a[7]
  2189. Sign of datain ini. */
  2190. #define ADC_REG_sign_datain_ini 0x00e7014a
  2191. //digital offset value
  2192. /* 0x14b[7:0]
  2193. Only uses 9 bits,
  2194. MSB for sign bit: 0 means "-" and 1 means "+",
  2195. other bits mean offset values. */
  2196. #define ADC_REG_dofst_r_7to0 0x00e0014b
  2197. /* 0x14c[1:0]
  2198. Only uses 9 bits,
  2199. MSB for sign bit: 0 means "-" and 1 means "+",
  2200. other bits mean offset values. */
  2201. #define ADC_REG_dofst_r 0x0020014c
  2202. /* 0x14c[7:2]
  2203. Only uses 9 bits,
  2204. MSB for sign bit: 0 means "-" and 1 means "+",
  2205. other bits mean offset values. */
  2206. #define ADC_REG_dofst_g_5to0 0x00e2014c
  2207. /* 0x14d[1:0]
  2208. Only uses 9 bits,
  2209. MSB for sign bit: 0 means "-" and 1 means "+",
  2210. other bits mean offset values. */
  2211. #define ADC_REG_dofst_g_7to6 0x0020014d
  2212. /* 0x14d[3:2]
  2213. Only uses 9 bits,
  2214. MSB for sign bit: 0 means "-" and 1 means "+",
  2215. other bits mean offset values. */
  2216. #define ADC_REG_dofst_g 0x0062014d
  2217. /* 0x14d[7:4]
  2218. Only uses 9 bits,
  2219. MSB for sign bit: 0 means "-" and 1 means "+",
  2220. other bits mean offset values. */
  2221. #define ADC_REG_dofst_b_3to0 0x00e4014d
  2222. /* 0x14e[3:0]
  2223. Only uses 9 bits,
  2224. MSB for sign bit: 0 means "-" and 1 means "+",
  2225. other bits mean offset values. */
  2226. #define ADC_REG_dofst_b_7to4 0x0060014e
  2227. /* 0x14e[5:4]
  2228. Only uses 9 bits,
  2229. MSB for sign bit: 0 means "-" and 1 means "+",
  2230. other bits mean offset values. */
  2231. #define ADC_REG_dofst_b 0x00c4014e
  2232. /* 0x14e[7:6]
  2233. Only uses 9 bits,
  2234. MSB for sign bit: 0 means "-" and 1 means "+",
  2235. other bits mean offset values. */
  2236. #define ADC_REGdofst_y_1to0 0x00e6014e
  2237. /* 0x14f[5:0]
  2238. Only uses 9 bits,
  2239. MSB for sign bit: 0 means "-" and 1 means "+",
  2240. other bits mean offset values. */
  2241. #define ADC_REGdofst_y_7to2 0x00c0014f
  2242. /* 0x14f[7:6]
  2243. Only uses 9 bits,
  2244. MSB for sign bit: 0 means "-" and 1 means "+",
  2245. other bits mean offset values. */
  2246. #define ADC_REGdofst_y 0x00e6014f
  2247. //PLL Reg 15x
  2248. /* 0x150[7:0]
  2249. Fraction part of iir_fbpn1's multiplier. */
  2250. #define ADC_REG_iir_fbpn1_f 0x00e00150
  2251. /* 0x151[7:0]
  2252. Integer part of iir_fbpn1's multiplier. */
  2253. #define ADC_REG_iir_fbpn1_i_7to0 0x00e00151
  2254. /* 0x152[0]
  2255. Integer part of iir_fbpn1's multiplier. */
  2256. #define ADC_REG_iir_fbpn1_i_8 0x00000152
  2257. // 0x152[3:1] reserved
  2258. /* 0x152[7:4] */
  2259. #define ADC_REG_dlpll_dbgselb 0x00e40152
  2260. /* 0x153[7:0]
  2261. Fraction part of iir_fbppn1's multiplier. */
  2262. #define ADC_REG_iir_fbppn1_f 0x00e00153
  2263. /* 0x154[7:0]
  2264. Integer part of iir_fbppn1's multiplier. */
  2265. #define ADC_REG_iir_fbppn1_i_7to0 0x00e00154
  2266. /* 0x155[0]
  2267. Integer part of iir_fbppn1's multiplier. */
  2268. #define ADC_REG_iir_fbppn1_i_8 0x00000155
  2269. // 0x155[7:1] reserved
  2270. /* 0x156[7:0]
  2271. Fraction part of iir_fwn1's multiplier. */
  2272. #define ADC_REG_iir_fwn1_f 0x00e00156
  2273. /* 0x157[7:0]
  2274. Integer part of iir_fwn1's multiplier. */
  2275. #define ADC_REG_iir_fwn1_i_7to0 0x00e00157
  2276. /* 0x158[0]
  2277. Integer part of iir_fwn1's multiplier. */
  2278. #define ADC_REG_iir_fwn1_i_8 0x00000158
  2279. // 0x158[7:1] reserved
  2280. /* 0x159[7:0]
  2281. Fraction part of iir_fwpn1's multiplier. */
  2282. #define ADC_REG_iir_fwpn1_f 0x00e00159
  2283. /* 0x15a[7:0]
  2284. Integer part of iir_fwpn1's multiplier. */
  2285. #define ADC_REG_iir_fwpn1_i_7to0 0x00e0015a
  2286. /* 0x15b[0]
  2287. Integer part of iir_fwpn1's multiplier. */
  2288. #define ADC_REG_iir_fwpn1_i_8 0x0000015b
  2289. // 0x15b[7:1] reserved
  2290. /* 0x15c[7:0]
  2291. Fraction part of iir_fwppn1's multiplier. */
  2292. #define ADC_REG_iir_fwppn1_f 0x00e0015c
  2293. /* 0x15d[7:0]
  2294. Integer part of iir_fwppn1's multiplier. */
  2295. #define ADC_REG_iir_fwppn1_i_7to0 0x00e0015d
  2296. /* 0x15e[7:0]
  2297. Integer part of iir_fwppn1's multiplier. */
  2298. #define ADC_REG_iir_fwppn1_i_8 0x00e0015e
  2299. /* 0x15f[1:0]
  2300. IIR_DFF clock selection
  2301. 00: sdmsyn,
  2302. 01: sdmsyn/2,
  2303. 10: sdmsyn/4,
  2304. 11: sdmsyn/8 */
  2305. #define ADC_REG_iirclk_div_sel 0x0020015f
  2306. // 0x15f[7:2] reserved
  2307. //digital gain enable 16x
  2308. /* 0x161[1:0] ~ 0x160[7:0]
  2309. ref_stg1 R-channel differential reference positive-negative level option,
  2310. b'0000: 540mV,
  2311. b'0010: 500mV(default) ,
  2312. ... (-20mV for each step on high 4 bits)
  2313. b'1111: 240mV */
  2314. #define ADC_REG_dgain_r 0x01200160
  2315. /* 0x162[3:0] ~ 0x161[7:2]
  2316. ref_stg1 G-channel differential reference positive-negative level option,
  2317. b'0000: 540mV,
  2318. b'0010: 500mV(default) ,
  2319. ... (-20mV for each step on high 4 bits)
  2320. b'1111: 240mV */
  2321. #define ADC_REG_dgain_g 0x02220161
  2322. /* 0x163[5:0] ~ 0x162[7:4]
  2323. ref_stg1 B-channel differential reference positive-negative level option,
  2324. b'0000: 540mV,
  2325. b'0010: 500mV(default) ,
  2326. ... (-20mV for each step on high 4 bits)
  2327. b'1111: 240mV */
  2328. #define ADC_REG_dgain_b 0x01a40162
  2329. // 0c163[7:6] reserved
  2330. /* 0x165[1:0] ~ 0x164[7:0] */
  2331. #define ADC_REG_dgain_y 0x01200164
  2332. /* 0x166[0] */
  2333. #define ADC_REG_begain_en0 0x00000166
  2334. /* 0x166[1] */
  2335. #define ADC_REG_begain_en1 0x00210166
  2336. /* 0x166[2] */
  2337. #define ADC_REG_dgain_op0 0x00420166
  2338. /* 0x166[3] */
  2339. #define ADC_REG_dgain_op1 0x00630166
  2340. /* 0x166[4] */
  2341. #define ADC_REG_dgain_dbgsel 0x00840166
  2342. /* 0x166[5] */
  2343. #define ADC_REG_gcvbsen 0x00a50166
  2344. /* 0x166[6] */
  2345. #define ADC_REG_yclk_gcvbsen 0x00c60166
  2346. /* 0x166[7] */
  2347. #define ADC_REG_invyclk_gcvbsen 0x00e70166
  2348. //for 330CA
  2349. /* 0x167[1:0]
  2350. 2'b00 sel vga; 2'b01 sel ypp1; 2'b10 sel ypp2_ref; 2'b11 sel av_ref */
  2351. #define ADC_REG_r_refch12v 0x00200167
  2352. /* 0x167[3:2]
  2353. 2'b00 sel vga; 2'b01 sel ypp1; 2'b10 sel ypp2_ref; 2'b11 sel av_ref */
  2354. #define ADC_REG_g_refch12v 0x00620167
  2355. /* 0x167[5:4]
  2356. 2'b00 sel vga; 2'b01 sel ypp1; 2'b10 sel ypp2_ref; 2'b11 sel av_ref */
  2357. #define ADC_REG_b_refch12v 0x00a40167
  2358. // 0x167[7:6] reserved
  2359. /* 0x168[0]
  2360. R channel low pass filter mode. */
  2361. #define ADC_REG_r_lpfmod12v 0x00000168
  2362. /* 0x168[1]
  2363. G channel low pass filter mode. */
  2364. #define ADC_REG_g_lpfmod12v 0x00210168
  2365. /* 0x168[2]
  2366. B channel low pass filter mode. */
  2367. #define ADC_REG_b_lpfmod12v 0x00420168
  2368. // 0x168[3] reserved
  2369. /* 0x168[4]
  2370. 1'b0: CVBS mode;1'b1 RGB mode */
  2371. #define ADC_REG_r_refclampsel12v 0x00840168
  2372. /* 0x168[5]
  2373. 1'b0: CVBS mode;1'b1 RGB mode */
  2374. #define ADC_REG_g_refclampsel12v 0x00a50168
  2375. /* 0x168[6]
  2376. 1'b0: CVBS mode;1'b1 RGB mode */
  2377. #define ADC_REG_b_refclampsel12v 0x00c60168
  2378. // 0x168[7] reserved
  2379. /* 0x169[0]
  2380. R channel interal/external reference enable.
  2381. 0: internal reference; 1: externel reference */
  2382. #define ADC_REG_r_intrefen12v 0x00000169
  2383. /* 0x169[1]
  2384. G channel interal/external reference enable.
  2385. 0: internal reference; 1: externel reference */
  2386. #define ADC_REG_g_intrefen12v 0x00210169
  2387. /* 0x169[2]
  2388. B channel interal/external reference enable.
  2389. 0: internal reference; 1: externel reference */
  2390. #define ADC_REG_b_intrefen12v 0x00420169
  2391. // 0x169[3] reserved
  2392. /* 0x169[4]
  2393. av_ref pull down enable */
  2394. #define ADC_REG_epdy_12v 0x00840169
  2395. /* 0x169[5] */
  2396. #define ADC_REG_clamp_ictrl12v 0x00a50169
  2397. // 0x169[7:5] reserved
  2398. //331_g0
  2399. /* 0x16a[0] */
  2400. #define ADC_REG_r_pden12v 0x0000016a
  2401. /* 0x16a[1] */
  2402. #define ADC_REG_g_pden12v 0x0021016a
  2403. /* 0x16a[2] */
  2404. #define ADC_REG_b_pden12v 0x0042016a
  2405. // 0x16a[3] reserved
  2406. /* 0x16a[4] */
  2407. #define ADC_REG_r_tswmiden12v 0x0084016a
  2408. /* 0x16a[5] */
  2409. #define ADC_REG_g_tswmiden12v 0x00a5016a
  2410. /* 0x16a[6] */
  2411. #define ADC_REG_b_tswmiden12v 0x00c6016a
  2412. // 0x16a[7] reserved
  2413. /* 0x16b[5:0] */
  2414. #define ADC_REG_cal_manual_th 0x00a0016b
  2415. /* 0x16b[6]
  2416. Enable VBG source selection according to HW control. */
  2417. #define ADC_REG_cal_manual_en 0x00c6016b
  2418. /* 0x16b[7] */
  2419. #define ADC_REG_cal_rstn 0x00e7016b
  2420. /* 0x16c[3:0]
  2421. LVDS current calibration adjuster stop threshold. */
  2422. #define ADC_REG_cal_stop_th 0x0060016c
  2423. // 0x16c[7:4] reserved
  2424. /* 0x16d[5:0]
  2425. [4]: VBG source selection.
  2426. 0: from DEMOD, 1: from AUDIO */
  2427. #define ADC_REG_cal_sw_ctrl_th 0x00a0016d
  2428. /* 0x16d[6]
  2429. Enable VBG source selection according to SW control. */
  2430. #define ADC_REG_cal_sw_ctrl_en 0x00c6016d
  2431. /* 0x16d[7] */
  2432. #define ADC_REG_sden12v 0x00e7016d
  2433. /* 0x16e[1:0] */
  2434. #define ADC_REG_g_vr_sel 0x0021016e
  2435. /* 0x16e[3:2] */
  2436. #define ADC_REG_y_vr_sel 0x0062016e
  2437. // 0x16e[7:4] reserved
  2438. // 0x16f[7:0] reserved
  2439. /* 0x171[1:0] ~ 0x170[7:0]
  2440. The parameter of tap 0. */
  2441. #define ADC_REG_r_fir_z0m 0x01200170
  2442. /* 0x172[3:0] ~ 0x171[7:2]
  2443. The parameter of tap 1. */
  2444. #define ADC_REG_r_fir_z1m 0x02220171
  2445. /* 0x173[5:0] ~ 0x172[7:4]
  2446. The parameter of tap 2. */
  2447. #define ADC_REG_r_fir_z2m 0x01a40172
  2448. // 0c173[7:6] reserved
  2449. /* 0x175[1:0] ~ 0x174[7:0]
  2450. The parameter of tap 3. */
  2451. #define ADC_REG_r_fir_z3m 0x01200174
  2452. /* 0x176[3:0] ~ 0x175[7:2]
  2453. The parameter of tap 4. */
  2454. #define ADC_REG_r_fir_z4m 0x02220175
  2455. /* 0x177[5:0] ~ 0x176[7:4]
  2456. The parameter of tap 5. */
  2457. #define ADC_REG_r_fir_z5m 0x01a40176
  2458. // 0c177[7:6] reserved
  2459. /* 0x179[1:0] ~ 0x178[7:0]
  2460. The parameter of tap 6. */
  2461. #define ADC_REG_r_fir_z6m 0x01200178
  2462. /* 0x17a[3:0] ~ 0x179[7:2]
  2463. The parameter of tap 7. */
  2464. #define ADC_REG_r_fir_z7m 0x02220179
  2465. // 0x17a[7:4] reserved
  2466. /* 0x17b[0]
  2467. The sign bit of tap 0. */
  2468. #define ADC_REG_r_sign_fir_z0 0x0000017b
  2469. /* 0x17b[1]
  2470. The sign bit of tap 1. */
  2471. #define ADC_REG_r_sign_fir_z1 0x0021017b
  2472. /* 0x17b[2]
  2473. The sign bit of tap 2. */
  2474. #define ADC_REG_r_sign_fir_z2 0x0042017b
  2475. /* 0x17b[3]
  2476. The sign bit of tap 3. */
  2477. #define ADC_REG_r_sign_fir_z3 0x0063017b
  2478. /* 0x17b[4]
  2479. The sign bit of tap 4. */
  2480. #define ADC_REG_r_sign_fir_z4 0x0084017b
  2481. /* 0x17b[5]
  2482. The sign bit of tap 5. */
  2483. #define ADC_REG_r_sign_fir_z5 0x00a5017b
  2484. /* 0x17b[6]
  2485. The sign bit of tap 6. */
  2486. #define ADC_REG_r_sign_fir_z6 0x00c6017b
  2487. /* 0x17b[7]
  2488. The sign bit of tap 7. */
  2489. #define ADC_REG_r_sign_fir_z7 0x00e7017b
  2490. /* 0x17c[1:0]
  2491. 00: 1X fs, 01: 2X fs. */
  2492. #define ADC_REG_r_clk_rate 0x0020017c
  2493. /* 0x17c[2]
  2494. Bypass the FIR filter. */
  2495. #define ADC_REG_r_bypass_fir 0x0042017c
  2496. /* 0x17c[3]
  2497. Rising/failing edge trigger for decimation filter. */
  2498. #define ADC_REG_r_data_sel 0x0063017c
  2499. // 0x17c[7:4] reserved
  2500. // 0x17d[7:0] reserved
  2501. /* 0x17e[7:0]
  2502. Power down the No. 15~0 SOG-comparator. */
  2503. #define ADC_REG_sogcomp_pwdn12v_0to7 0x00e0017e
  2504. /* 0x17f[7:0]
  2505. Power down the No. 15~0 SOG-comparator. */
  2506. #define ADC_REG_sogcomp_pwdn12v_8to15 0x00e0017f
  2507. /* 0x181[1:0] ~ 0x180[7:0]
  2508. The parameter of tap 0. */
  2509. #define ADC_REG_g_fir_z0m 0x01200180
  2510. /* 0x182[3:0] ~ 0x181[7:2]
  2511. The parameter of tap 1. */
  2512. #define ADC_REG_g_fir_z1m 0x02220181
  2513. /* 0x183[5:0] ~ 0x182[7:4]
  2514. The parameter of tap 2. */
  2515. #define ADC_REG_g_fir_z2m 0x01a40182
  2516. // 0c183[7:6] reserved
  2517. /* 0x185[1:0] ~ 0x184[7:0]
  2518. The parameter of tap 3. */
  2519. #define ADC_REG_g_fir_z3m 0x01200184
  2520. /* 0x186[3:0] ~ 0x185[7:2]
  2521. The parameter of tap 4. */
  2522. #define ADC_REG_g_fir_z4m 0x02220185
  2523. /* 0x187[5:0] ~ 0x186[7:4]
  2524. The parameter of tap 5. */
  2525. #define ADC_REG_g_fir_z5m 0x01a40186
  2526. // 0c187[7:6] reserved
  2527. /* 0x189[1:0] ~ 0x188[7:0]
  2528. The parameter of tap 6. */
  2529. #define ADC_REG_g_fir_z6m 0x01200188
  2530. /* 0x18a[3:0] ~ 0x189[7:2]
  2531. The parameter of tap 7. */
  2532. #define ADC_REG_g_fir_z7m 0x02220189
  2533. // 0x18a[7:4] reserved
  2534. /* 0x18b[0]
  2535. The sign bit of tap 0. */
  2536. #define ADC_REG_g_sign_fir_z0 0x0000018b
  2537. /* 0x18b[1]
  2538. The sign bit of tap 1. */
  2539. #define ADC_REG_g_sign_fir_z1 0x0021018b
  2540. /* 0x18b[2]
  2541. The sign bit of tap 2. */
  2542. #define ADC_REG_g_sign_fir_z2 0x0042018b
  2543. /* 0x18b[3]
  2544. The sign bit of tap 3. */
  2545. #define ADC_REG_g_sign_fir_z3 0x0063018b
  2546. /* 0x18b[4]
  2547. The sign bit of tap 4. */
  2548. #define ADC_REG_g_sign_fir_z4 0x0084018b
  2549. /* 0x18b[5]
  2550. The sign bit of tap 5. */
  2551. #define ADC_REG_g_sign_fir_z5 0x00a5018b
  2552. /* 0x18b[6]
  2553. The sign bit of tap 6. */
  2554. #define ADC_REG_g_sign_fir_z6 0x00c6018b
  2555. /* 0x18b[7]
  2556. The sign bit of tap 7. */
  2557. #define ADC_REG_g_sign_fir_z7 0x00e7018b
  2558. /* 0x18c[1:0]
  2559. 00: 1X fs, 01: 2X fs. */
  2560. #define ADC_REG_g_clk_rate 0x0020018c
  2561. /* 0x18c[2]
  2562. Bypass the FIR filter. */
  2563. #define ADC_REG_g_bypass_fir 0x0042018c
  2564. /* 0x18c[3]
  2565. Rising/failing edge trigger for decimation filter. */
  2566. #define ADC_REG_g_data_sel 0x0063018c
  2567. // 0x18c[7:4] reserved
  2568. // 0x18d[7:0] reserved
  2569. // 0x18e[7:0] reserved
  2570. // 0x18f[7:0] reserved
  2571. /* 0x191[1:0] ~ 0x190[7:0]
  2572. The parameter of tap 0. */
  2573. #define ADC_REG_b_fir_z0m 0x01200190
  2574. /* 0x192[3:0] ~ 0x191[7:2]
  2575. The parameter of tap 1. */
  2576. #define ADC_REG_b_fir_z1m 0x02220191
  2577. /* 0x193[5:0] ~ 0x192[7:4]
  2578. The parameter of tap 2. */
  2579. #define ADC_REG_b_fir_z2m 0x01a40192
  2580. // 0c193[7:6] reserved
  2581. /* 0x195[1:0] ~ 0x194[7:0]
  2582. The parameter of tap 3. */
  2583. #define ADC_REG_b_fir_z3m 0x01200194
  2584. /* 0x196[3:0] ~ 0x195[7:2]
  2585. The parameter of tap 4. */
  2586. #define ADC_REG_b_fir_z4m 0x02220195
  2587. /* 0x197[5:0] ~ 0x196[7:4]
  2588. The parameter of tap 5. */
  2589. #define ADC_REG_b_fir_z5m 0x01a40196
  2590. // 0c197[7:6] reserved
  2591. /* 0x199[1:0] ~ 0x198[7:0]
  2592. The parameter of tap 6. */
  2593. #define ADC_REG_b_fir_z6m 0x01200198
  2594. /* 0x19a[3:0] ~ 0x199[7:2]
  2595. The parameter of tap 7. */
  2596. #define ADC_REG_b_fir_z7m 0x02220199
  2597. // 0x19a[7:4] reserved
  2598. /* 0x19b[0]
  2599. The sign bit of tap 0. */
  2600. #define ADC_REG_b_sign_fir_z0 0x0000019b
  2601. /* 0x19b[1]
  2602. The sign bit of tap 1. */
  2603. #define ADC_REG_b_sign_fir_z1 0x0021019b
  2604. /* 0x19b[2]
  2605. The sign bit of tap 2. */
  2606. #define ADC_REG_b_sign_fir_z2 0x0042019b
  2607. /* 0x19b[3]
  2608. The sign bit of tap 3. */
  2609. #define ADC_REG_b_sign_fir_z3 0x0063019b
  2610. /* 0x19b[4]
  2611. The sign bit of tap 4. */
  2612. #define ADC_REG_b_sign_fir_z4 0x0084019b
  2613. /* 0x19b[5]
  2614. The sign bit of tap 5. */
  2615. #define ADC_REG_b_sign_fir_z5 0x00a5019b
  2616. /* 0x19b[6]
  2617. The sign bit of tap 6. */
  2618. #define ADC_REG_b_sign_fir_z6 0x00c6019b
  2619. /* 0x19b[7]
  2620. The sign bit of tap 7. */
  2621. #define ADC_REG_b_sign_fir_z7 0x00e7019b
  2622. /* 0x19c[1:0]
  2623. 00: 1X fs, 01: 2X fs. */
  2624. #define ADC_REG_b_clk_rate 0x0020019c
  2625. /* 0x19c[2]
  2626. Bypass the FIR filter. */
  2627. #define ADC_REG_b_bypass_fir 0x0042019c
  2628. /* 0x19c[3]
  2629. Rising/failing edge trigger for decimation filter. */
  2630. #define ADC_REG_b_data_sel 0x0063019c
  2631. // 0x19c[7:4] reserved
  2632. // 0x19d[7:0] reserved
  2633. // 0x19e[7:0] reserved
  2634. // 0x19f[7:0] reserved
  2635. /* 0x1a1[1:0] ~ 0x1a0[7:0]
  2636. The parameter of tap 0. */
  2637. #define ADC_REG_y_fir_z0m 0x012001a0
  2638. /* 0x1a2[3:0] ~ 0x1a1[7:2]
  2639. The parameter of tap 1. */
  2640. #define ADC_REG_y_fir_z1m 0x022201a1
  2641. /* 0x1a3[5:0] ~ 0x1a2[7:4]
  2642. The parameter of tap 2. */
  2643. #define ADC_REG_y_fir_z2m 0x01a401a2
  2644. // 0c1a3[7:6] reserved
  2645. /* 0x1a5[1:0] ~ 0x1a4[7:0]
  2646. The parameter of tap 3. */
  2647. #define ADC_REG_y_fir_z3m 0x012001a4
  2648. /* 0x196[3:0] ~ 0x1a5[7:2]
  2649. The parameter of tap 4. */
  2650. #define ADC_REG_y_fir_z4m 0x022201a5
  2651. /* 0x1a7[5:0] ~ 0x1a6[7:4]
  2652. The parameter of tap 5. */
  2653. #define ADC_REG_y_fir_z5m 0x01a401a6
  2654. // 0c1a7[7:6] reserved
  2655. /* 0x1a9[1:0] ~ 0x1a8[7:0]
  2656. The parameter of tap 6. */
  2657. #define ADC_REG_y_fir_z6m 0x012001a8
  2658. /* 0x1aa[3:0] ~ 0x1a9[7:2]
  2659. The parameter of tap 7. */
  2660. #define ADC_REG_y_fir_z7m 0x022201a9
  2661. // 0x1aa[7:4] reserved
  2662. /* 0x1ab[0]
  2663. The sign bit of tap 0. */
  2664. #define ADC_REG_y_sign_fir_z0 0x000001ab
  2665. /* 0x1ab[1]
  2666. The sign bit of tap 1. */
  2667. #define ADC_REG_y_sign_fir_z1 0x002101ab
  2668. /* 0x1ab[2]
  2669. The sign bit of tap 2. */
  2670. #define ADC_REG_y_sign_fir_z2 0x004201ab
  2671. /* 0x1ab[3]
  2672. The sign bit of tap 3. */
  2673. #define ADC_REG_y_sign_fir_z3 0x006301ab
  2674. /* 0x1ab[4]
  2675. The sign bit of tap 4. */
  2676. #define ADC_REG_y_sign_fir_z4 0x008401ab
  2677. /* 0x1ab[5]
  2678. The sign bit of tap 5. */
  2679. #define ADC_REG_y_sign_fir_z5 0x00a501ab
  2680. /* 0x1ab[6]
  2681. The sign bit of tap 6. */
  2682. #define ADC_REG_y_sign_fir_z6 0x00c601ab
  2683. /* 0x1ab[7]
  2684. The sign bit of tap 7. */
  2685. #define ADC_REG_y_sign_fir_z7 0x00e701ab
  2686. /* 0x1ac[1:0]
  2687. 00: 1X fs, 01: 2X fs. */
  2688. #define ADC_REG_y_clk_rate 0x002001ac
  2689. /* 0x1ac[2]
  2690. Bypass the FIR filter. */
  2691. #define ADC_REG_y_bypass_fir 0x004201ac
  2692. /* 0x1ac[3]
  2693. Rising/failing edge trigger for decimation filter. */
  2694. #define ADC_REG_y_data_sel 0x006301ac
  2695. // 0x1ac[7:4] reserved
  2696. // 0x1ad[7:0] reserved
  2697. // 0x1ae[7:0] reserved
  2698. // 0x1af[7:0] reserved
  2699. #define ADC_REG_coast_pw_resize 0x006201b0
  2700. //coast 200
  2701. /* 0x1b0[1:0]
  2702. Line update mode,
  2703. 0: line_fall_wdth,
  2704. 1: line_wdth,
  2705. 2: mline_wdth,
  2706. 3: line_fwdth_avg */
  2707. #define ADC_REG_coast200_line_update 0x002001b0
  2708. /* 0x1b0[3:2]
  2709. Coast out select,
  2710. 0: 200|resize,
  2711. 1: 200&resize,
  2712. 2: 200,
  2713. 3: resize */
  2714. #define ADC_REG_coast_out_sel 0x006201b0
  2715. /* 0x1b0[5:4]
  2716. Coast200 start option,
  2717. 0: fall_cnt,
  2718. 1: smt_dly&fall_cnt,
  2719. 2: dg_fall,
  2720. 3: pw_fall */
  2721. #define ADC_REG_coast200_start_opt 0x00a401b0
  2722. /* 0x1b0[7:6]
  2723. Coast200 end option,
  2724. 0: smt_fall,
  2725. 1: smt_dg_fall,
  2726. 2: forward count(end1),
  2727. 3: backward count(end2) */
  2728. #define ADC_REG_coast200_end_opt 0x00e601b0
  2729. /* 0x1b1[7:0]
  2730. Coast200 start with backward count. */
  2731. #define ADC_REG_coast200_start 0x00e001b1
  2732. /* 0x1b2[3:0]
  2733. End with forward count. */
  2734. #define ADC_REG_coast200_end1 0x006001b2
  2735. /* 0x1b2[7:4]
  2736. End with backward count. */
  2737. #define ADC_REG_coast200_end2 0x00e401b2
  2738. /* 0x1b3[3:0]
  2739. Coast200 have to subtract filter offset. */
  2740. #define ADC_REG_filt_offset 0x006001b3
  2741. /* 0x1b3[5:4]
  2742. Smt coast select. */
  2743. #define ADC_REG_coast_smt_sel 0x00a401b3
  2744. /* 0x1b3[7:6]
  2745. Hsync valid fall decision. */
  2746. #define ADC_REG_hs_valid_fall 0x00e601b3
  2747. /* 0x1b4[7:0]
  2748. Line threshold of hsync valid fall decision. */
  2749. #define ADC_REG_hs_vld_f_wdth 0x00e001b4
  2750. /* 0x1b5[3:0]
  2751. Prev mask start threshold, 6*2 valid edge(line). */
  2752. #define ADC_reg_prev_mask_th 0x006001b5
  2753. /* 0x1b5[4]
  2754. Prev mask enable for en_stb1_sclamp. */
  2755. #define ADC_reg_prev_mask1_en 0x008401b5
  2756. /* 0x1b5[5]
  2757. Prev mask enable for throttling. */
  2758. #define ADC_reg_prev_mask2_en 0x00a501b5
  2759. /* 0x1b5[7:6]
  2760. Enable vsync mask to pll,
  2761. 0: ~vsync_mask,
  2762. 1: 1'b1,
  2763. 2: vsync_mask,
  2764. 3: 1'b0 */
  2765. #define ADC_reg_vsync_mask_tpll_en 0x00e601b5
  2766. /* 0x1b6[2:0]
  2767. Prev mask strong clamp throttling type. */
  2768. #define ADC_reg_sc_stb_pv_sth 0x004001b6
  2769. // 0x1b6[3] reserved
  2770. /* 0x1b6[4]
  2771. Vsync mask for line_wdth, low_wdth, line_fall_wdth. */
  2772. #define ADC_reg_vsync_mask_en1 0x008401b6
  2773. /* 0x1b6[5]
  2774. Vsync mask for coast200_line_update. */
  2775. #define ADC_reg_vsync_mask_en2 0x00a501b6
  2776. /* 0x1b6[7:6]
  2777. When to enable vsync_mask,
  2778. 0: can't use,
  2779. 1: means start vsync mask in 3rd V, ""stb_vcnt <= reg_vsync_mask_stb_cnt. */
  2780. #define ADC_reg_vsync_mask_stb_cnt 0x00e601b6
  2781. /* 0x1b7[7:0]
  2782. Sign of 8 terms */
  2783. #define ADC_REG_bwmfir_sign 0x00e001b7
  2784. /* 0x1b8[7:0]
  2785. 1st term(0+15) coeffient. */
  2786. #define ADC_REG_bwmfir_coeff0 0x00e001b8
  2787. /* 0x1b9[7:0]
  2788. 2nd term(1+14) coeffient. */
  2789. #define ADC_REG_bwmfir_coeff1 0x00e001b9
  2790. /* 0x1ba[7:0]
  2791. 3rd term(2+13) coeffient. */
  2792. #define ADC_REG_bwmfir_coeff2 0x00e001ba
  2793. /* 0x1bb[7:0]
  2794. 4th term(3+12) coeffient. */
  2795. #define ADC_REG_bwmfir_coeff3 0x00e001bb
  2796. /* 0x1bc[7:0]
  2797. 5th term(4+11) coeffient. */
  2798. #define ADC_REG_bwmfir_coeff4 0x00e001bc
  2799. /* 0x1bd[7:0]
  2800. 6th term(5+10) coeffient. */
  2801. #define ADC_REG_bwmfir_coeff5 0x00e001bd
  2802. /* 0x1be[7:0]
  2803. 7th term(6+9) coeffient. */
  2804. #define ADC_REG_bwmfir_coeff6 0x00e001be
  2805. /* 0x1bf[7:0]
  2806. 8th term(7+8) coeffient. */
  2807. #define ADC_REG_bwmfir_coeff7 0x00e001bf
  2808. //system aux register
  2809. #define GLB_REG_ALWAYS_HSI 0x10000039
  2810. //system main register
  2811. #define GLB_REG_VCLK_DIV_RSTN 0x1021012f //0x12f[1] ADC_PLL reference divider reset
  2812. #define GLB_REG_global_reset 0x10e7014b //[31] global reset
  2813. #define GLB_REG_ECO_FIELD_SEL 0x10e70149 // 0x149[7]
  2814. #define GLB_REG_VADC_REF_SEL_24M 0x10c60149 // 0x149[6] 24 MHz reference selector. 0: CPLL, 1: Crystal
  2815. #define GLB_REG_YPP200MCLK_DIV 0x1060015c
  2816. #define GLB_REG_YPP200MCLK_DIV_VALID 0x1084015c
  2817. #define GLB_REG_YPP200MCLK_DIV_RSTN 0x10a5015c
  2818. #define GLB_REG_A1ECO_CPLL_CEN_COMP 0x10e701b1 // 0x1b1[7]
  2819. #define GLB_REG_A1ECO_CPLL_PTXCLK_DIV 0x10c001b1 // 0x1b1[6:0]
  2820. #define GLB_REG_DEMOD_PWDN_BG 0x10e70215 //0x215[7] DMADC's BGP
  2821. //OffsetComposation
  2822. #define COMOFFSET_REG_cal_str 0x10422017 //[2] enable read data
  2823. #define COMOFFSET_REG_even_odd_data 0x13e001dc //[31:0] read even and odd data
  2824. #define COMOFFSET_REG_h_str 0x10602016 //[3:0] position
  2825. #define COMOFFSET_REG_cal_adc_sel 0x10202017 //[1:0] channel selection
  2826. #define COMOFFSET_REG_tst_en 0x10602019 //[3:0] [0] Enable coast_period
  2827. //Debug port
  2828. #define DEBUG_PROT_20 0x11e00020 //[15:0]
  2829. #endif