tvafe_regs.h 136 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056
  1. /*
  2. * TVAFE register bit-field definition
  3. * Sorted by the appearing order of registers in am_regs.h.
  4. *
  5. * Author: Lin Xu <lin.xu@amlogic.com>
  6. *
  7. * Copyright (C) 2010 Amlogic Inc.
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. */
  13. #ifndef _TVAFE_REG_H
  14. #define _TVAFE_REG_H
  15. // *****************************************************************************
  16. // ******** ACD REGISTERS ********
  17. // *****************************************************************************
  18. #define ACD_BASE_ADD 0x1900
  19. #define ACD_REG_00 ((ACD_BASE_ADD+0x00)<<2)
  20. #define MD_LUT_STEP06_BIT 28
  21. #define MD_LUT_STEP06_WID 4
  22. #define MD_LUT_STEP05_BIT 24
  23. #define MD_LUT_STEP05_WID 4
  24. #define MD_LUT_STEP04_BIT 20
  25. #define MD_LUT_STEP04_WID 4
  26. #define MD_LUT_STEP03_BIT 16
  27. #define MD_LUT_STEP03_WID 4
  28. #define MD_LUT_STEP02_BIT 12
  29. #define MD_LUT_STEP02_WID 4
  30. #define MD_LUT_STEP01_BIT 8
  31. #define MD_LUT_STEP01_WID 4
  32. #define MD_LUT_STEP00_BIT 0
  33. #define MD_LUT_STEP00_WID 8
  34. #define ACD_REG_01 ((ACD_BASE_ADD+0x01)<<2)
  35. #define MD_LUT_STEP14_BIT 28
  36. #define MD_LUT_STEP14_WID 4
  37. #define MD_LUT_STEP13_BIT 24
  38. #define MD_LUT_STEP13_WID 4
  39. #define MD_LUT_STEP12_BIT 20
  40. #define MD_LUT_STEP12_WID 4
  41. #define MD_LUT_STEP11_BIT 16
  42. #define MD_LUT_STEP11_WID 4
  43. #define MD_LUT_STEP10_BIT 12
  44. #define MD_LUT_STEP10_WID 4
  45. #define MD_LUT_STEP09_BIT 8
  46. #define MD_LUT_STEP09_WID 4
  47. #define MD_LUT_STEP08_BIT 4
  48. #define MD_LUT_STEP08_WID 4
  49. #define MD_LUT_STEP07_BIT 0
  50. #define MD_LUT_STEP07_WID 4
  51. #define ACD_REG_02 ((ACD_BASE_ADD+0x02)<<2)
  52. #define MD_LF_ADJ_EN_BIT 31
  53. #define MD_LF_ADJ_EN_WID 1
  54. #define MD_LF_ADJ_BIT 24
  55. #define MD_LF_ADJ_WID 4
  56. #define MD_LF_OLD_SEL_BIT 15
  57. #define MD_LF_OLD_SEL_WID 1
  58. #define MD_HF_FINAL_SEL_BIT 14
  59. #define MD_HF_FINAL_SEL_WID 1
  60. #define MD_LF_FINAL_MODE_BIT 12
  61. #define MD_LF_FINAL_MODE_WID 2
  62. #define MD_MODE3_BIT 11
  63. #define MD_MODE3_WID 1
  64. #define MD_MODE2_BIT 10
  65. #define MD_MODE2_WID 1
  66. #define MD_MODE1_BIT 9
  67. #define MD_MODE1_WID 1
  68. #define MD_MODE0_BIT 8
  69. #define MD_MODE0_WID 1
  70. #define MD_LUT_STEP15_BIT 0
  71. #define MD_LUT_STEP15_WID 4
  72. #define ACD_REG_03 ((ACD_BASE_ADD+0x03)<<2)
  73. #define MD_DETAIL_SEL_BIT 31
  74. #define MD_DETAIL_SEL_WID 1
  75. #define MD_DETAIL_STEP3_BIT 24
  76. #define MD_DETAIL_STEP3_WID 4
  77. #define MD_DETAIL_STEP2_BIT 20
  78. #define MD_DETAIL_STEP2_WID 4
  79. #define MD_DETAIL_STEP1_BIT 16
  80. #define MD_DETAIL_STEP1_WID 4
  81. #define MD_HF_MIDDLE_BIT 15
  82. #define MD_HF_MIDDLE_WID 1
  83. #define MD_HF56_MAX_BIT 14
  84. #define MD_HF56_MAX_WID 1
  85. #define MD_HF56_MAX2_BIT 13
  86. #define MD_HF56_MAX2_WID 1
  87. #define MD_LF56_MAX_BIT 12
  88. #define MD_LF56_MAX_WID 1
  89. #define AML_YCSEP_MODE_BIT 11
  90. #define AML_YCSEP_MODE_WID 1
  91. #define MD_HF_AVG_SEL_BIT 8
  92. #define MD_HF_AVG_SEL_WID 2
  93. #define MD_REGION_HF_TH_BIT 0
  94. #define MD_REGION_HF_TH_WID 7
  95. #define ACD_REG_04 ((ACD_BASE_ADD+0x04)<<2)
  96. #define HWIDTH_CENABLE_BIT 24
  97. #define HWIDTH_CENABLE_WID 8
  98. #define HSTART_CENABLE_BIT 16
  99. #define HSTART_CENABLE_WID 8
  100. #define MD_REGION_LF_TH_BIT 8
  101. #define MD_REGION_LF_TH_WID 7
  102. #define MD_DETAIL_TH_BIT 0
  103. #define MD_DETAIL_TH_WID 8
  104. #define ACD_REG_05 ((ACD_BASE_ADD+0x05)<<2)
  105. #define APL_TH1_BIT 24
  106. #define APL_TH1_WID 8
  107. #define GM_NOISE_TH_BIT 16
  108. #define GM_NOISE_TH_WID 7
  109. #define VWIDTH_CENABLE_BIT 8
  110. #define VWIDTH_CENABLE_WID 8
  111. #define VSTART_CENABLE_BIT 0
  112. #define VSTART_CENABLE_WID 8
  113. #define ACD_REG_06 ((ACD_BASE_ADD+0x06)<<2)
  114. #define GM_TH3_BIT 24
  115. #define GM_TH3_WID 8
  116. #define GM_TH2_BIT 16
  117. #define GM_TH2_WID 8
  118. #define GM_TH1_BIT 8
  119. #define GM_TH1_WID 8
  120. #define APL_TH2_BIT 0
  121. #define APL_TH2_WID 8
  122. #define ACD_REG_07 ((ACD_BASE_ADD+0x07)<<2)
  123. #define GM_GAIN4_BIT 24
  124. #define GM_GAIN4_WID 8
  125. #define GM_GAIN3_BIT 16
  126. #define GM_GAIN3_WID 8
  127. #define GM_GAIN2_BIT 8
  128. #define GM_GAIN2_WID 8
  129. #define GM_GAIN1_BIT 0
  130. #define GM_GAIN1_WID 8
  131. #define ACD_REG_08 ((ACD_BASE_ADD+0x08)<<2)
  132. #define MD_BPF_COEF3_BIT 24
  133. #define MD_BPF_COEF3_WID 8
  134. #define MD_BPF_COEF2_BIT 16
  135. #define MD_BPF_COEF2_WID 8
  136. #define MD_BPF_COEF1_BIT 8
  137. #define MD_BPF_COEF1_WID 8
  138. #define MD_BPF_COEF0_BIT 0
  139. #define MD_BPF_COEF0_WID 8
  140. #define ACD_REG_09 ((ACD_BASE_ADD+0x09)<<2)
  141. #define GM2LUT_EN_BIT 15
  142. #define GM2LUT_EN_WID 1
  143. #define MD_BPF_EN_BIT 8
  144. #define MD_BPF_EN_WID 1
  145. #define MD_BPF_COEF4_BIT 0
  146. #define MD_BPF_COEF4_WID 8
  147. #define ACD_REG_0A ((ACD_BASE_ADD+0x0A)<<2)
  148. #define GM2LUT_TH2_BIT 16
  149. #define GM2LUT_TH2_WID 16
  150. #define GM2LUT_TH1_BIT 0
  151. #define GM2LUT_TH1_WID 16
  152. #define ACD_REG_0B ((ACD_BASE_ADD+0x0B)<<2)
  153. #define YCSEP_DEMO_BIT 24
  154. #define YCSEP_DEMO_WID 8
  155. #define GM2LUT_STEP2_BIT 16
  156. #define GM2LUT_STEP2_WID 8
  157. #define GM2LUT_STEP1_BIT 8
  158. #define GM2LUT_STEP1_WID 8
  159. #define GM2LUT_STEP0_BIT 0
  160. #define GM2LUT_STEP0_WID 8
  161. #define ACD_REG_0C ((ACD_BASE_ADD+0x0C)<<2)
  162. #define WR_ADDR5_VS_REG_BIT 0
  163. #define WR_ADDR5_VS_REG_WID 23
  164. #define ACD_REG_0D ((ACD_BASE_ADD+0x0D)<<2)
  165. #define GM_APL_BIT 0
  166. #define GM_APL_WID 11
  167. #define ACD_REG_0E ((ACD_BASE_ADD+0x0E)<<2)
  168. #define GLOBAL_MOTION_HF_BIT 16
  169. #define GLOBAL_MOTION_HF_WID 16
  170. #define GLOBAL_MOTION_HF_MIN_BIT 0
  171. #define GLOBAL_MOTION_HF_MIN_WID 16
  172. #define ACD_REG_0F ((ACD_BASE_ADD+0x0F)<<2)
  173. #define GLOBAL_MOTION_IIR_BIT 16
  174. #define GLOBAL_MOTION_IIR_WID 16
  175. #define GLOBAL_MOTION_LF_BIT 0
  176. #define GLOBAL_MOTION_LF_WID 16
  177. #define ACD_REG_10 ((ACD_BASE_ADD+0x10)<<2)
  178. #define YCSEP_TEST43_BIT 24
  179. #define YCSEP_TEST43_WID 8
  180. #define YCSEP_TEST42_BIT 16
  181. #define YCSEP_TEST42_WID 8
  182. #define YCSEP_TEST41_BIT 8
  183. #define YCSEP_TEST41_WID 8
  184. #define YCSEP_TEST40_BIT 0
  185. #define YCSEP_TEST40_WID 8
  186. #define ACD_REG_11 ((ACD_BASE_ADD+0x11)<<2)
  187. #define YCSEP_TEST47_BIT 24
  188. #define YCSEP_TEST47_WID 8
  189. #define YCSEP_TEST46_BIT 16
  190. #define YCSEP_TEST46_WID 8
  191. #define YCSEP_TEST45_BIT 8
  192. #define YCSEP_TEST45_WID 8
  193. #define YCSEP_TEST44_BIT 0
  194. #define YCSEP_TEST44_WID 8
  195. #define ACD_REG_12 ((ACD_BASE_ADD+0x12)<<2)
  196. #define YCSEP_TEST4B_BIT 24
  197. #define YCSEP_TEST4B_WID 8
  198. #define YCSEP_TEST4A_BIT 16
  199. #define YCSEP_TEST4A_WID 8
  200. #define YCSEP_TEST49_BIT 8
  201. #define YCSEP_TEST49_WID 8
  202. #define YCSEP_TEST48_BIT 0
  203. #define YCSEP_TEST48_WID 8
  204. #define ACD_REG_13 ((ACD_BASE_ADD+0x13)<<2)
  205. #define YCSEP_TEST4F_BIT 24
  206. #define YCSEP_TEST4F_WID 8
  207. #define YCSEP_TEST4E_BIT 16
  208. #define YCSEP_TEST4E_WID 8
  209. #define YCSEP_TEST4D_BIT 8
  210. #define YCSEP_TEST4D_WID 8
  211. #define YCSEP_TEST4C_BIT 0
  212. #define YCSEP_TEST4C_WID 8
  213. #define ACD_REG_14 ((ACD_BASE_ADD+0x14)<<2)
  214. #define YCSEP_TEST53_BIT 24
  215. #define YCSEP_TEST53_WID 8
  216. #define YCSEP_TEST52_BIT 16
  217. #define YCSEP_TEST52_WID 8
  218. #define YCSEP_TEST51_BIT 8
  219. #define YCSEP_TEST51_WID 8
  220. #define YCSEP_TEST50_BIT 0
  221. #define YCSEP_TEST50_WID 8
  222. #define ACD_REG_15 ((ACD_BASE_ADD+0x15)<<2)
  223. #define YCSEP_TEST57_BIT 24
  224. #define YCSEP_TEST57_WID 8
  225. #define YCSEP_TEST56_BIT 16
  226. #define YCSEP_TEST56_WID 8
  227. #define YCSEP_TEST55_BIT 8
  228. #define YCSEP_TEST55_WID 8
  229. #define YCSEP_TEST54_BIT 0
  230. #define YCSEP_TEST54_WID 8
  231. #define ACD_REG_16 ((ACD_BASE_ADD+0x16)<<2)
  232. #define YCSEP_TEST5B_BIT 24
  233. #define YCSEP_TEST5B_WID 8
  234. #define YCSEP_TEST5A_BIT 16
  235. #define YCSEP_TEST5A_WID 8
  236. #define YCSEP_TEST59_BIT 8
  237. #define YCSEP_TEST59_WID 8
  238. #define YCSEP_TEST58_BIT 0
  239. #define YCSEP_TEST58_WID 8
  240. #define ACD_REG_17 ((ACD_BASE_ADD+0x17)<<2)
  241. #define YCSEP_TEST5F_BIT 24
  242. #define YCSEP_TEST5F_WID 8
  243. #define YCSEP_TEST5E_BIT 16
  244. #define YCSEP_TEST5E_WID 8
  245. #define YCSEP_TEST5D_BIT 8
  246. #define YCSEP_TEST5D_WID 8
  247. #define YCSEP_TEST5C_BIT 0
  248. #define YCSEP_TEST5C_WID 8
  249. #define ACD_REG_18 ((ACD_BASE_ADD+0x18)<<2)
  250. #define YCSEP_TEST63_BIT 24
  251. #define YCSEP_TEST63_WID 8
  252. #define YCSEP_TEST62_BIT 16
  253. #define YCSEP_TEST62_WID 8
  254. #define YCSEP_TEST61_BIT 8
  255. #define YCSEP_TEST61_WID 8
  256. #define YCSEP_TEST60_BIT 0
  257. #define YCSEP_TEST60_WID 8
  258. #define ACD_REG_19 ((ACD_BASE_ADD+0x19)<<2)
  259. #define YCSEP_TEST67_BIT 24
  260. #define YCSEP_TEST67_WID 8
  261. #define YCSEP_TEST66_BIT 16
  262. #define YCSEP_TEST66_WID 8
  263. #define YCSEP_TEST65_BIT 8
  264. #define YCSEP_TEST65_WID 8
  265. #define YCSEP_TEST64_BIT 0
  266. #define YCSEP_TEST64_WID 8
  267. #define ACD_REG_1A ((ACD_BASE_ADD+0x1A)<<2)
  268. #define YCSEP_TEST6B_BIT 24
  269. #define YCSEP_TEST6B_WID 8
  270. #define YCSEP_TEST6A_BIT 16
  271. #define YCSEP_TEST6A_WID 8
  272. #define YCSEP_TEST69_BIT 8
  273. #define YCSEP_TEST69_WID 8
  274. #define YCSEP_TEST68_BIT 0
  275. #define YCSEP_TEST68_WID 8
  276. #define ACD_REG_1B ((ACD_BASE_ADD+0x1B)<<2)
  277. #define YCSEP_TEST6F_BIT 24
  278. #define YCSEP_TEST6F_WID 8
  279. #define YCSEP_TEST6E_BIT 16
  280. #define YCSEP_TEST6E_WID 8
  281. #define YCSEP_TEST6D_BIT 8
  282. #define YCSEP_TEST6D_WID 8
  283. #define YCSEP_TEST6C_BIT 0
  284. #define YCSEP_TEST6C_WID 8
  285. #define ACD_REG_1C ((ACD_BASE_ADD+0x1C)<<2)
  286. #define YCSEP_TEST73_BIT 24
  287. #define YCSEP_TEST73_WID 8
  288. #define YCSEP_TEST72_BIT 16
  289. #define YCSEP_TEST72_WID 8
  290. #define YCSEP_TEST71_BIT 8
  291. #define YCSEP_TEST71_WID 8
  292. #define YCSEP_TEST70_BIT 0
  293. #define YCSEP_TEST70_WID 8
  294. #define ACD_REG_1D ((ACD_BASE_ADD+0x1D)<<2)
  295. #define YCSEP_TEST75_BIT 8
  296. #define YCSEP_TEST75_WID 8
  297. #define YCSEP_TEST74_BIT 0
  298. #define YCSEP_TEST74_WID 8
  299. #define ACD_REG_1F ((ACD_BASE_ADD+0x1F)<<2)
  300. #define GLOBAL_DETAIL_BIT 16
  301. #define GLOBAL_DETAIL_WID 16
  302. #define GLOBAL_MOTION_PIX_BIT 0
  303. #define GLOBAL_MOTION_PIX_WID 16
  304. #define ACD_REG_20 ((ACD_BASE_ADD+0x20)<<2)
  305. #define VBIDE_TEST76_BIT 0
  306. #define VBIDE_TEST76_WID 8
  307. #define ACD_REG_21 ((ACD_BASE_ADD+0x21)<<2)
  308. #define AML_VBI_SIZE_BIT 16
  309. #define AML_VBI_SIZE_WID 16
  310. #define AML_VBI_START_ADDR_BIT 0
  311. #define AML_VBI_START_ADDR_WID 16
  312. #define ACD_REG_22 ((ACD_BASE_ADD+0x22)<<2)
  313. #define AML_VBI_RST_BIT 31
  314. #define AML_VBI_RST_WID 1
  315. #define AML_ADDR_VS_EN_BIT 27
  316. #define AML_ADDR_VS_EN_WID 1
  317. #define AML_FLUSH_IN_EN_BIT 26
  318. #define AML_FLUSH_IN_EN_WID 1
  319. #define AML_DISAGENT_BIT 24
  320. #define AML_DISAGENT_WID 2
  321. #define AML_VBIDATA_SEL_BIT 23
  322. #define AML_VBIDATA_SEL_WID 1
  323. #define AML_VBI_TH_BIT 16
  324. #define AML_VBI_TH_WID 7
  325. #define ACD_REG_23 ((ACD_BASE_ADD+0x23)<<2)
  326. #define YCSEP_IFCOMP3_BIT 24
  327. #define YCSEP_IFCOMP3_WID 8
  328. #define YCSEP_IFCOMP2_BIT 16
  329. #define YCSEP_IFCOMP2_WID 8
  330. #define YCSEP_IFCOMP1_BIT 8
  331. #define YCSEP_IFCOMP1_WID 8
  332. #define YCSEP_IFCOMP0_BIT 0
  333. #define YCSEP_IFCOMP0_WID 8
  334. #define ACD_REG_24 ((ACD_BASE_ADD+0x24)<<2)
  335. #define YCSEP_IFCOMP_SCALE_BIT 9
  336. #define YCSEP_IFCOMP_SCALE_WID 2
  337. #define YCSEP_IFCOMP_EN_BIT 8
  338. #define YCSEP_IFCOMP_EN_WID 1
  339. #define YCSEP_IFCOMP4_BIT 0
  340. #define YCSEP_IFCOMP4_WID 8
  341. #define ACD_REG_25 ((ACD_BASE_ADD+0x25)<<2)
  342. #define FRONT_LPF3_VIDEO_BIT 24
  343. #define FRONT_LPF3_VIDEO_WID 8
  344. #define FRONT_LPF2_VIDEO_BIT 16
  345. #define FRONT_LPF2_VIDEO_WID 8
  346. #define FRONT_LPF1_VIDEO_BIT 8
  347. #define FRONT_LPF1_VIDEO_WID 8
  348. #define FRONT_LPF0_VIDEO_BIT 0
  349. #define FRONT_LPF0_VIDEO_WID 8
  350. #define ACD_REG_26 ((ACD_BASE_ADD+0x26)<<2)
  351. #define FRONT_LPF_SCALE_VIDEO_BIT 9
  352. #define FRONT_LPF_SCALE_VIDEO_WID 1
  353. #define FRONT_LPF_EN_VIDEO_BIT 8
  354. #define FRONT_LPF_EN_VIDEO_WID 1
  355. #define FRONT_LPF4_VIDEO_BIT 0
  356. #define FRONT_LPF4_VIDEO_WID 8
  357. #define ACD_REG_27 ((ACD_BASE_ADD+0x27)<<2)
  358. #define FRONT_LPF3_VBI_BIT 24
  359. #define FRONT_LPF3_VBI_WID 8
  360. #define FRONT_LPF2_VBI_BIT 16
  361. #define FRONT_LPF2_VBI_WID 8
  362. #define FRONT_LPF1_VBI_BIT 8
  363. #define FRONT_LPF1_VBI_WID 8
  364. #define FRONT_LPF0_VBI_BIT 0
  365. #define FRONT_LPF0_VBI_WID 8
  366. #define ACD_REG_28 ((ACD_BASE_ADD+0x28)<<2)
  367. #define ACD_CHROMA_MODE_BIT 14
  368. #define ACD_CHROMA_MODE_WID 2
  369. #define ACD_DEBYPASS_BIT 13
  370. #define ACD_DEBYPASS_WID 1
  371. #define GM_APL_GAIN_MANUEL_BIT 11
  372. #define GM_APL_GAIN_MANUEL_WID 1
  373. #define FRONT_LPF_SCALE_VBI_BIT 9
  374. #define FRONT_LPF_SCALE_VBI_WID 1
  375. #define FRONT_LPF_EN_VBI_BIT 8
  376. #define FRONT_LPF_EN_VBI_WID 1
  377. #define FRONT_LPF4_VBI_BIT 0
  378. #define FRONT_LPF4_VBI_WID 8
  379. #define ACD_REG_29 ((ACD_BASE_ADD+0x29)<<2)
  380. #define REG_4F_BUF_END_CNT_BIT 28
  381. #define REG_4F_BUF_END_CNT_WID 3
  382. #define REG_4F_RD_OFFSET_BIT 24
  383. #define REG_4F_RD_OFFSET_WID 4
  384. #define REG_4FRAME_MODE_BIT 23
  385. #define REG_4FRAME_MODE_WID 1
  386. #define REG_4F_MOTION_ADDR_OFFSET_BIT 0
  387. #define REG_4F_MOTION_ADDR_OFFSET_WID 23
  388. #define ACD_REG_2A ((ACD_BASE_ADD+0x2A)<<2)
  389. #define REG_4F_DISAGENT_BIT 20
  390. #define REG_4F_DISAGENT_WID 2
  391. #define REG_4F_BUF_INI_CNT_BIT 17
  392. #define REG_4F_BUF_INI_CNT_WID 3
  393. #define REG_4F_MOTION_LENGTH_BIT 0
  394. #define REG_4F_MOTION_LENGTH_WID 17
  395. #define ACD_REG_2B ((ACD_BASE_ADD+0x2B)<<2)
  396. #define CPUMP_UP_OFFSET_BIT 24
  397. #define CPUMP_UP_OFFSET_WID 8
  398. #define CPUMP_DN_OFFSET_BIT 16
  399. #define CPUMP_DN_OFFSET_WID 8
  400. #define CPUMP_UPDN_AML_EN_BIT 15
  401. #define CPUMP_UPDN_AML_EN_WID 1
  402. #define CPUMP_UPDN_RATIO_BIT 8
  403. #define CPUMP_UPDN_RATIO_WID 7
  404. #define BP_GATE_VENABLE_BIT 0
  405. #define BP_GATE_VENABLE_WID 1
  406. #define ACD_REG_2C ((ACD_BASE_ADD+0x2C)<<2)
  407. #define BP_GATE_VSTART_BIT 24
  408. #define BP_GATE_VSTART_WID 8
  409. #define BP_GATE_VEND_BIT 16
  410. #define BP_GATE_VEND_WID 8
  411. #define BP_GATE_HSTART_BIT 8
  412. #define BP_GATE_HSTART_WID 8
  413. #define BP_GATE_HEND_BIT 0
  414. #define BP_GATE_HEND_WID 8
  415. #define ACD_REG_2D ((ACD_BASE_ADD+0x2D)<<2)
  416. #define ACD_HSTART_BIT 16
  417. #define ACD_HSTART_WID 16
  418. #define ACD_HEND_BIT 0
  419. #define ACD_HEND_WID 16
  420. #define ACD_REG_2E ((ACD_BASE_ADD+0x2E)<<2)
  421. #define ACD_VSTART_BIT 16
  422. #define ACD_VSTART_WID 16
  423. #define ACD_VEND_BIT 0
  424. #define ACD_VEND_WID 16
  425. #define ACD_REG_2F ((ACD_BASE_ADD+0x2F)<<2)
  426. #define VBI_ADDR_OFFSET_BIT 0
  427. #define VBI_ADDR_OFFSET_WID 32
  428. #define ACD_REG_30 ((ACD_BASE_ADD+0x30)<<2)
  429. #define MOTION_ADDR_OFFSET_BIT 0
  430. #define MOTION_ADDR_OFFSET_WID 32
  431. #define ACD_REG_32 ((ACD_BASE_ADD+0x32)<<2)
  432. #define MEM_WARNING_CLR_BIT 2
  433. #define MEM_WARNING_CLR_WID 1
  434. #define REG_AFIFO_SIZE_BIT 0
  435. #define REG_AFIFO_SIZE_WID 2
  436. // ****************************************************************************
  437. // ******** ADC REGISTERS ********
  438. // ****************************************************************************
  439. #define ADC_BASE_ADD 0x1A00
  440. #define ADC_REG_00 ((ADC_BASE_ADD+0x00)<<2)
  441. #define CHIPREV_BIT 0
  442. #define CHIPREV_WID 8
  443. #define ADC_REG_01 ((ADC_BASE_ADD+0x01)<<2)
  444. #define PLLDIVRATIO_MSB_BIT 0
  445. #define PLLDIVRATIO_MSB_WID 8
  446. #define ADC_REG_02 ((ADC_BASE_ADD+0x02)<<2)
  447. #define PLLDIVRATIO_LSB_BIT 4
  448. #define PLLDIVRATIO_LSB_WID 4
  449. #define ADC_REG_03 ((ADC_BASE_ADD+0x03)<<2)
  450. #define CLAMPPLACEM_BIT 0
  451. #define CLAMPPLACEM_WID 8
  452. #define ADC_REG_04 ((ADC_BASE_ADD+0x04)<<2)
  453. #define CLAMPDURATION_BIT 0
  454. #define CLAMPDURATION_WID 8
  455. #define ADC_REG_05 ((ADC_BASE_ADD+0x05)<<2)
  456. #define PGAGAIN_BIT 0
  457. #define PGAGAIN_WID 8
  458. #define ADC_REG_06 ((ADC_BASE_ADD+0x06)<<2)
  459. #define PGAMODE_BIT 5
  460. #define PGAMODE_WID 1
  461. #define ENPGA_BIT 4
  462. #define ENPGA_WID 1
  463. #define ADC_REG_07 ((ADC_BASE_ADD+0x07)<<2)
  464. #define ADCGAINA_BIT 0
  465. #define ADCGAINA_WID 8
  466. #define ADC_REG_08 ((ADC_BASE_ADD+0x08)<<2)
  467. #define ADCGAINB_BIT 0
  468. #define ADCGAINB_WID 8
  469. #define ADC_REG_09 ((ADC_BASE_ADD+0x09)<<2)
  470. #define ADCGAINC_BIT 0
  471. #define ADCGAINC_WID 8
  472. //#define ADC_REG_0A ((ADC_BASE_ADD+0x0A)<<2)
  473. #define ADC_REG_0B ((ADC_BASE_ADD+0x0B)<<2)
  474. #define ENSTCA_BIT 7
  475. #define ENSTCA_WID 1
  476. #define CTRCLREFA_0B_BIT 0
  477. #define CTRCLREFA_0B_WID 5
  478. #define ADC_REG_0C ((ADC_BASE_ADD+0x0C)<<2)
  479. #define ENSTCB_BIT 7
  480. #define ENSTCB_WID 1
  481. #define CTRCLREFB_0C_BIT 0
  482. #define CTRCLREFB_0C_WID 5
  483. #define ADC_REG_0D ((ADC_BASE_ADD+0x0D)<<2)
  484. #define ENSTCC_BIT 7
  485. #define ENSTCC_WID 1
  486. #define CTRCLREFC_0D_BIT 0
  487. #define CTRCLREFC_0D_WID 5
  488. //#define ADC_REG_0E ((ADC_BASE_ADD+0x0E)<<2)
  489. #define ADC_REG_0F ((ADC_BASE_ADD+0x0F)<<2)
  490. #define ENMRCA_BIT 7
  491. #define ENMRCA_WID 1
  492. #define ENBRCA_BIT 6
  493. #define ENBRCA_WID 1
  494. #define ENMBCA_BIT 4
  495. #define ENMBCA_WID 1
  496. #define CTRCLREFA_0F_BIT 2
  497. #define CTRCLREFA_0F_WID 2
  498. #define ADC_REG_10 ((ADC_BASE_ADD+0x10)<<2)
  499. #define ENMRCB_BIT 7
  500. #define ENMRCB_WID 1
  501. #define ENBRCB_BIT 6
  502. #define ENBRCB_WID 1
  503. #define ENMBCB_BIT 4
  504. #define ENMBCB_WID 1
  505. #define CTRCLREFB_10_BIT 2
  506. #define CTRCLREFB_10_WID 2
  507. #define ADC_REG_11 ((ADC_BASE_ADD+0x11)<<2)
  508. #define ENMRCC_BIT 7
  509. #define ENMRCC_WID 1
  510. #define ENBRCC_BIT 6
  511. #define ENBRCC_WID 1
  512. #define ENMBCC_BIT 4
  513. #define ENMBCC_WID 1
  514. #define CTRCLREFC_11_BIT 2
  515. #define CTRCLREFC_11_WID 2
  516. //#define ADC_REG_12 ((ADC_BASE_ADD+0x12)<<2)
  517. #define ADC_REG_13 ((ADC_BASE_ADD+0x13)<<2)
  518. #define ENADCA_BIT 5
  519. #define ENADCA_WID 1
  520. #define ENADCASTDBY_BIT 4
  521. #define ENADCASTDBY_WID 1
  522. #define ADC_REG_14 ((ADC_BASE_ADD+0x14)<<2)
  523. #define ENADCB_BIT 5
  524. #define ENADCB_WID 1
  525. #define ENADCBSTDBY_BIT 4
  526. #define ENADCBSTDBY_WID 1
  527. #define ADC_REG_15 ((ADC_BASE_ADD+0x15)<<2)
  528. #define ENADCC_BIT 5
  529. #define ENADCC_WID 1
  530. #define ENADCCSTDBY_BIT 4
  531. #define ENADCCSTDBY_WID 1
  532. //#define ADC_REG_16 ((ADC_BASE_ADD+0x16)<<2)
  533. #define ADC_REG_17 ((ADC_BASE_ADD+0x17)<<2)
  534. #define INMUXA_BIT 4
  535. #define INMUXA_WID 3
  536. #define INMUXB_BIT 0
  537. #define INMUXB_WID 3
  538. #define ADC_REG_18 ((ADC_BASE_ADD+0x18)<<2)
  539. #define INMUXC_BIT 4
  540. #define INMUXC_WID 3
  541. #define ADC_REG_19 ((ADC_BASE_ADD+0x19)<<2)
  542. #define ENLPFA_BIT 7
  543. #define ENLPFA_WID 1
  544. #define ANABWCTRLA_BIT 4
  545. #define ANABWCTRLA_WID 3
  546. #define LPFBWCTRA_BIT 0
  547. #define LPFBWCTRA_WID 4
  548. #define ADC_REG_1A ((ADC_BASE_ADD+0x1A)<<2)
  549. #define ENLPFB_BIT 7
  550. #define ENLPFB_WID 1
  551. #define ANABWCTRLB_BIT 4
  552. #define ANABWCTRLB_WID 3
  553. #define LPFBWCTRB_BIT 0
  554. #define LPFBWCTRB_WID 4
  555. #define ADC_REG_1B ((ADC_BASE_ADD+0x1B)<<2)
  556. #define ENLPFC_BIT 7
  557. #define ENLPFC_WID 1
  558. #define ANABWCTRLC_BIT 4
  559. #define ANABWCTRLC_WID 3
  560. #define LPFBWCTRC_BIT 0
  561. #define LPFBWCTRC_WID 4
  562. //#define ADC_REG_1C ((ADC_BASE_ADD+0x1C)<<2)
  563. //#define ADC_REG_1D ((ADC_BASE_ADD+0x1D)<<2)
  564. #define ADC_REG_1E ((ADC_BASE_ADD+0x1E)<<2)
  565. #define ENIB_BIT 5
  566. #define ENIB_WID 1
  567. #define ADC_REG_1F ((ADC_BASE_ADD+0x1F)<<2)
  568. #define ENVBG_BIT 3
  569. #define ENVBG_WID 1
  570. #define ADC_REG_20 ((ADC_BASE_ADD+0x20)<<2)
  571. #define ENSTCBUF_BIT 6
  572. #define ENSTCBUF_WID 1
  573. #define ENCVBSBUF_BIT 5
  574. #define ENCVBSBUF_WID 1
  575. #define CTRGAINCVBSBUF_BIT 4
  576. #define CTRGAINCVBSBUF_WID 1
  577. #define INMUXBUF_BIT 0
  578. #define INMUXBUF_WID 2
  579. #define ADC_REG_21 ((ADC_BASE_ADD+0x21)<<2)
  580. #define SLEEPMODE_BIT 3
  581. #define SLEEPMODE_WID 1
  582. #define POWERDOWNZ_BIT 2
  583. #define POWERDOWNZ_WID 1
  584. #define RSTDIGZ_BIT 1
  585. #define RSTDIGZ_WID 1
  586. //#define ADC_REG_22 ((ADC_BASE_ADD+0x22)<<2)
  587. //#define ADC_REG_23 ((ADC_BASE_ADD+0x23)<<2)
  588. #define ADC_REG_24 ((ADC_BASE_ADD+0x24)<<2)
  589. #define INMUXSOG_BIT 0
  590. #define INMUXSOG_WID 3
  591. //#define ADC_REG_25 ((ADC_BASE_ADD+0x25)<<2)
  592. #define ADC_REG_26 ((ADC_BASE_ADD+0x26)<<2)
  593. #define SOGSLCRTHRES_BIT 3
  594. #define SOGSLCRTHRES_WID 5
  595. #define SOGLPF_BIT 0
  596. #define SOGLPF_WID 3
  597. #define ADC_REG_27 ((ADC_BASE_ADD+0x27)<<2)
  598. #define SOGSLCRTHRESAUX_BIT 3
  599. #define SOGSLCRTHRESAUX_WID 5
  600. #define SOGLPFAUX_BIT 0
  601. #define SOGLPFAUX_WID 3
  602. #define ADC_REG_28 ((ADC_BASE_ADD+0x28)<<2)
  603. #define SOGBIASAUX_BIT 6
  604. #define SOGBIASAUX_WID 2
  605. #define SOGCLAMPAUX_BIT 4
  606. #define SOGCLAMPAUX_WID 2
  607. #define SOGBIAS_BIT 2
  608. #define SOGBIAS_WID 2
  609. #define SOGCLAMP_BIT 0
  610. #define SOGCLAMP_WID 2
  611. //#define ADC_REG_29 ((ADC_BASE_ADD+0x29)<<2)
  612. #define ADC_REG_2A ((ADC_BASE_ADD+0x2A)<<2)
  613. #define SOGOFFSETAUX_BIT 4
  614. #define SOGOFFSETAUX_WID 3
  615. #define SOGOFFSET_BIT 0
  616. #define SOGOFFSET_WID 3
  617. #define ADC_REG_2B ((ADC_BASE_ADD+0x2B)<<2)
  618. #define SOGDETAUX_BIT 0
  619. #define SOGDETAUX_WID 8
  620. //#define ADC_REG_2C ((ADC_BASE_ADD+0x2C)<<2)
  621. //#define ADC_REG_2D ((ADC_BASE_ADD+0x2D)<<2)
  622. #define ADC_REG_2E ((ADC_BASE_ADD+0x2E)<<2)
  623. #define HSYNCPOLOVRD1_BIT 7
  624. #define HSYNCPOLOVRD1_WID 1
  625. #define HSYNCPOLSEL_BIT 6
  626. #define HSYNCPOLSEL_WID 1
  627. #define HSYNCOUTPOL_BIT 5
  628. #define HSYNCOUTPOL_WID 1
  629. #define HSYNCACTVOVRD_BIT 4
  630. #define HSYNCACTVOVRD_WID 1
  631. #define HSYNCACTVSEL_BIT 3
  632. #define HSYNCACTVSEL_WID 1
  633. #define VSYNCOUTPOL_BIT 2
  634. #define VSYNCOUTPOL_WID 1
  635. #define VSYNCACTVOVRD_BIT 1
  636. #define VSYNCACTVOVRD_WID 1
  637. #define VSYNCACTVSEL_BIT 0
  638. #define VSYNCACTVSEL_WID 1
  639. #define ADC_REG_2F ((ADC_BASE_ADD+0x2F)<<2)
  640. #define CLAMPEXT_BIT 7
  641. #define CLAMPEXT_WID 1
  642. #define CLAMPPOL_BIT 6
  643. #define CLAMPPOL_WID 1
  644. #define COASTSEL_BIT 5
  645. #define COASTSEL_WID 1
  646. #define COASTPOLOVRD_BIT 4
  647. #define COASTPOLOVRD_WID 1
  648. #define COASTPOLSEL_BIT 3
  649. #define COASTPOLSEL_WID 1
  650. #define ADC_REG_30 ((ADC_BASE_ADD+0x30)<<2)
  651. #define HSYNCOUTWIDTH_BIT 0
  652. #define HSYNCOUTWIDTH_WID 8
  653. #define ADC_REG_31 ((ADC_BASE_ADD+0x31)<<2)
  654. #define SYNCSEPTHRES_BIT 0
  655. #define SYNCSEPTHRES_WID 8
  656. #define ADC_REG_32 ((ADC_BASE_ADD+0x32)<<2)
  657. #define PRECOAST_BIT 0
  658. #define PRECOAST_WID 8
  659. #define ADC_REG_33 ((ADC_BASE_ADD+0x33)<<2)
  660. #define POSTCOAST_BIT 0
  661. #define POSTCOAST_WID 8
  662. #define ADC_REG_34 ((ADC_BASE_ADD+0x34)<<2)
  663. #define HSYNCDET_BIT 7
  664. #define HSYNCDET_WID 1
  665. #define HSYNCACTV_BIT 6
  666. #define HSYNCACTV_WID 1
  667. #define HSYNCPOL_BIT 5
  668. #define HSYNCPOL_WID 1
  669. #define VSYNCDET_BIT 4
  670. #define VSYNCDET_WID 1
  671. #define VSYNCACTV_BIT 3
  672. #define VSYNCACTV_WID 1
  673. #define VSYNCPOL_BIT 2
  674. #define VSYNCPOL_WID 1
  675. #define SOGDET_BIT 1
  676. #define SOGDET_WID 1
  677. #define COASTPOL_BIT 0
  678. #define COASTPOL_WID 1
  679. #define ADC_REG_35 ((ADC_BASE_ADD+0x35)<<2)
  680. #define PLLLOCKED_BIT 0
  681. #define PLLLOCKED_WID 1
  682. //#define ADC_REG_36 ((ADC_BASE_ADD+0x36)<<2)
  683. //#define ADC_REG_37 ((ADC_BASE_ADD+0x37)<<2)
  684. #define ADC_REG_38 ((ADC_BASE_ADD+0x38)<<2)
  685. #define ENPLLCOASTWIN_BIT 5
  686. #define ENPLLCOASTWIN_WID 1
  687. #define ADC_REG_39 ((ADC_BASE_ADD+0x39)<<2)
  688. #define ENCOASTFWIDTHSEL_BIT 6
  689. #define ENCOASTFWIDTHSEL_WID 1
  690. #define INSYNCMUXCTRL_BIT 2
  691. #define INSYNCMUXCTRL_WID 1
  692. #define SYNCMUXCTRLBYPASS_BIT 1
  693. #define SYNCMUXCTRLBYPASS_WID 1
  694. #define SYNCMUXCTRL_BIT 0
  695. #define SYNCMUXCTRL_WID 1
  696. #define ADC_REG_3A ((ADC_BASE_ADD+0x3A)<<2)
  697. #define ADCRDYA_BIT 7
  698. #define ADCRDYA_WID 1
  699. #define ADCRDYB_BIT 6
  700. #define ADCRDYB_WID 1
  701. #define ADCRDYC_BIT 5
  702. #define ADCRDYC_WID 1
  703. #define ADC_REG_3B ((ADC_BASE_ADD+0x3B)<<2)
  704. #define DISCLPDRGCST_BIT 4
  705. #define DISCLPDRGCST_WID 1
  706. #define HFSMRETRY_BIT 2
  707. #define HFSMRETRY_WID 2
  708. #define ADC_REG_3C ((ADC_BASE_ADD+0x3C)<<2)
  709. #define HSYNCFWIDTHSEL_BIT 4
  710. #define HSYNCFWIDTHSEL_WID 4
  711. #define COASTFWIDTHSEL_BIT 0
  712. #define COASTFWIDTHSEL_WID 4
  713. #define ADC_REG_3D ((ADC_BASE_ADD+0x3D)<<2)
  714. #define FILTPLLHSYNC_BIT 7
  715. #define FILTPLLHSYNC_WID 1
  716. #define HSYNCLOCKWINDOW_BIT 5
  717. #define HSYNCLOCKWINDOW_WID 1
  718. #define ADC_REG_3E ((ADC_BASE_ADD+0x3E)<<2)
  719. #define PREHSYNC_BIT 0
  720. #define PREHSYNC_WID 8
  721. #define ADC_REG_3F ((ADC_BASE_ADD+0x3F)<<2)
  722. #define POSTHSYNC_BIT 0
  723. #define POSTHSYNC_WID 8
  724. //#define ADC_REG_40 ((ADC_BASE_ADD+0x40)<<2)
  725. #define ADC_REG_41 ((ADC_BASE_ADD+0x41)<<2)
  726. #define GLITCHSEL_BIT 0
  727. #define GLITCHSEL_WID 3
  728. //#define ADC_REG_42 ((ADC_BASE_ADD+0x42)<<2)
  729. #define ADC_REG_43 ((ADC_BASE_ADD+0x43)<<2)
  730. #define GLITCHBYPASS_BIT 4
  731. #define GLITCHBYPASS_WID 3
  732. //#define ADC_REG_44 ((ADC_BASE_ADD+0x44)<<2)
  733. //#define ADC_REG_45 ((ADC_BASE_ADD+0x45)<<2)
  734. #define ADC_REG_46 ((ADC_BASE_ADD+0x46)<<2)
  735. #define VSYNCLOCKWINDOW_BIT 2
  736. #define VSYNCLOCKWINDOW_WID 1
  737. #define ADC_REG_47 ((ADC_BASE_ADD+0x47)<<2)
  738. #define HSOUTDLYCTR_BIT 4
  739. #define HSOUTDLYCTR_WID 3
  740. //#define ADC_REG_48 ((ADC_BASE_ADD+0x48)<<2)
  741. //#define ADC_REG_49 ((ADC_BASE_ADD+0x49)<<2)
  742. //#define ADC_REG_4A ((ADC_BASE_ADD+0x4A)<<2)
  743. //#define ADC_REG_4B ((ADC_BASE_ADD+0x4B)<<2)
  744. //#define ADC_REG_4C ((ADC_BASE_ADD+0x4C)<<2)
  745. //#define ADC_REG_4D ((ADC_BASE_ADD+0x4D)<<2)
  746. //#define ADC_REG_4E ((ADC_BASE_ADD+0x4E)<<2)
  747. //#define ADC_REG_4F ((ADC_BASE_ADD+0x4F)<<2)
  748. //#define ADC_REG_50 ((ADC_BASE_ADD+0x50)<<2)
  749. //#define ADC_REG_51 ((ADC_BASE_ADD+0x51)<<2)
  750. //#define ADC_REG_52 ((ADC_BASE_ADD+0x52)<<2)
  751. //#define ADC_REG_53 ((ADC_BASE_ADD+0x53)<<2)
  752. //#define ADC_REG_54 ((ADC_BASE_ADD+0x54)<<2)
  753. //#define ADC_REG_55 ((ADC_BASE_ADD+0x55)<<2)
  754. #define ADC_REG_56 ((ADC_BASE_ADD+0x56)<<2)
  755. #define CLKPHASEADJ_BIT 0
  756. #define CLKPHASEADJ_WID 5
  757. //#define ADC_REG_57 ((ADC_BASE_ADD+0x57)<<2)
  758. #define ADC_REG_58 ((ADC_BASE_ADD+0x58)<<2)
  759. #define EXTCLKSEL_BIT 3
  760. #define EXTCLKSEL_WID 1
  761. #define ADC_REG_59 ((ADC_BASE_ADD+0x59)<<2)
  762. #define PLLALFA_BIT 0
  763. #define PLLALFA_WID 5
  764. #define ADC_REG_5A ((ADC_BASE_ADD+0x5A)<<2)
  765. #define PLLSEL_BIT 5
  766. #define PLLSEL_WID 1
  767. #define PLLBETA_BIT 0
  768. #define PLLBETA_WID 5
  769. #define ADC_REG_5B ((ADC_BASE_ADD+0x5B)<<2)
  770. #define PLLARMENA_BIT 7
  771. #define PLLARMENA_WID 1
  772. #define PLLARMCNT_BIT 5
  773. #define PLLARMCNT_WID 2
  774. #define PLLENCTR_BIT 0
  775. #define PLLENCTR_WID 5
  776. #define ADC_REG_5C ((ADC_BASE_ADD+0x5C)<<2)
  777. #define PLLFLOCKBW_BIT 4
  778. #define PLLFLOCKBW_WID 4
  779. #define ENAPLL_BIT 3
  780. #define ENAPLL_WID 1
  781. #define PLLFLOCKEN_BIT 2
  782. #define PLLFLOCKEN_WID 1
  783. #define PLLFLOCKCNT_BIT 0
  784. #define PLLFLOCKCNT_WID 2
  785. #define ADC_REG_5D ((ADC_BASE_ADD+0x5D)<<2)
  786. #define PLLGAIN_BIT 4
  787. #define PLLGAIN_WID 4
  788. #define PLLLOCKCNTTH_BIT 0
  789. #define PLLLOCKCNTTH_WID 4
  790. #define ADC_REG_5E ((ADC_BASE_ADD+0x5E)<<2)
  791. #define PLLLOCKTH_BIT 0
  792. #define PLLLOCKTH_WID 7
  793. #define ADC_REG_5F ((ADC_BASE_ADD+0x5F)<<2)
  794. #define PLLSDDIV_BIT 0
  795. #define PLLSDDIV_WID 7
  796. #define ADC_REG_60 ((ADC_BASE_ADD+0x60)<<2)
  797. #define PLLSDRANGE_BIT 4
  798. #define PLLSDRANGE_WID 4
  799. #define PLLUNLOCKCNTTH_BIT 0
  800. #define PLLUNLOCKCNTTH_WID 4
  801. #define ADC_REG_61 ((ADC_BASE_ADD+0x61)<<2)
  802. #define PLLRANGEEXT_BIT 4
  803. #define PLLRANGEEXT_WID 4
  804. #define PLLRNGNO_BIT 0
  805. #define PLLRNGNO_WID 4
  806. #define ADC_REG_62 ((ADC_BASE_ADD+0x62)<<2)
  807. #define PLLUNLOCKTH_BIT 0
  808. #define PLLUNLOCKTH_WID 7
  809. #define ADC_REG_63 ((ADC_BASE_ADD+0x63)<<2)
  810. #define PLLRANGEOVR_BIT 7
  811. #define PLLRANGEOVR_WID 1
  812. #define PLLLPFOUTOVR_BIT 6
  813. #define PLLLPFOUTOVR_WID 1
  814. #define PLLVCOOUTDIVCTR_BIT 4
  815. #define PLLVCOOUTDIVCTR_WID 2
  816. #define PLLT2DSENS_BIT 2
  817. #define PLLT2DSENS_WID 2
  818. #define PLLIOFFSET_BIT 0
  819. #define PLLIOFFSET_WID 2
  820. #define ADC_REG_64 ((ADC_BASE_ADD+0x64)<<2)
  821. #define PLLLPFOUTEXT_MSB_BIT 0
  822. #define PLLLPFOUTEXT_MSB_WID 8
  823. #define ADC_REG_65 ((ADC_BASE_ADD+0x65)<<2)
  824. #define PLLLPFOUTEXT_LSB_BIT 0
  825. #define PLLLPFOUTEXT_LSB_WID 4
  826. #define ADC_REG_66 ((ADC_BASE_ADD+0x66)<<2)
  827. #define ADC_REG_PLLSDENA_BIT 4
  828. #define ADC_REG_PLLSDENA_WID 1
  829. //#define ADC_REG_67 ((ADC_BASE_ADD+0x67)<<2)
  830. #define ADC_REG_68 ((ADC_BASE_ADD+0x68)<<2)
  831. #define ENDPLL_BIT 5
  832. #define ENDPLL_WID 1
  833. #define PLLCMASKENZ_BIT 4
  834. #define PLLCMASKENZ_WID 1
  835. #define PLLCMASKCTR_BIT 3
  836. #define PLLCMASKCTR_WID 1
  837. #define ENPLLCOAST_BIT 2
  838. #define ENPLLCOAST_WID 1
  839. #define VCORANGESEL_BIT 0
  840. #define VCORANGESEL_WID 2
  841. #define ADC_REG_69 ((ADC_BASE_ADD+0x69)<<2)
  842. #define CHARGEPUMPCURR_BIT 4
  843. #define CHARGEPUMPCURR_WID 3
  844. #define BIASCP_BIT 2
  845. #define BIASCP_WID 2
  846. //#define ADC_REG_6A (ADC_BASE_ADD+0x6A)<<2)
  847. //#define ADC_REG_6B (ADC_BASE_ADD+0x6B)<<2)
  848. //#define ADC_REG_6C (ADC_BASE_ADD+0x6C)<<2)
  849. //#define ADC_REG_6D (ADC_BASE_ADD+0x6D)<<2)
  850. // **************************************************** ************************
  851. // ******** TOP REGISTERS ********
  852. // **************************************************** ************************
  853. #define TOP_BASE_ADD 0x1B00
  854. // ******** DVSS -- YPBPR & RGB *********************** ************************
  855. #define TVFE_DVSS_MUXCTRL ((TOP_BASE_ADD+0x00)<<2)
  856. #define DVSS_CLAMP_INV_BIT 31
  857. #define DVSS_CLAMP_INV_WID 1
  858. #define DVSS_COAST_INV_BIT 30
  859. #define DVSS_COAST_INV_WID 1
  860. #define CLAMP_V_EN_BIT 29
  861. #define CLAMP_V_EN_WID 1
  862. #define DVSS_XSYNC_GEN_EN_BIT 28
  863. #define DVSS_XSYNC_GEN_EN_WID 1
  864. #define VS_MDET_SEL_BIT 27
  865. #define VS_MDET_SEL_WID 1
  866. #define DVSS_COAST_EN_BIT 25
  867. #define DVSS_COAST_EN_WID 2
  868. #define DVSS_COAST_EDGE_TEST_BIT 24
  869. #define DVSS_COAST_EDGE_TEST_WID 1
  870. #define DVSS_VS_REFINE_TEST_BIT 23
  871. #define DVSS_VS_REFINE_TEST_WID 1
  872. #define DVSS_VS_OUT_SEL_BIT 21
  873. #define DVSS_VS_OUT_SEL_WID 2
  874. #define DVSS_HS_COAST_SEL_BIT 19
  875. #define DVSS_HS_COAST_SEL_WID 2
  876. #define DVSS_HS_OUT_SEL_BIT 17
  877. #define DVSS_HS_OUT_SEL_WID 2
  878. #define DVSS_TO_GEN_VS_SEL_BIT 16
  879. #define DVSS_TO_GEN_VS_SEL_WID 1
  880. #define DVSS_TO_GEN_HS_SEL_BIT 15
  881. #define DVSS_TO_GEN_HS_SEL_WID 1
  882. #define DVSS_TO_NOSIG_SEL_BIT 14
  883. #define DVSS_TO_NOSIG_SEL_WID 1
  884. #define DVSS_TO_GATE_VS_SEL_BIT 12
  885. #define DVSS_TO_GATE_VS_SEL_WID 2
  886. #define DVSS_TO_GATE_HS_SEL_BIT 10
  887. #define DVSS_TO_GATE_HS_SEL_WID 2
  888. #define DVSS_FROM_LLPLL_INV_BIT 9
  889. #define DVSS_FROM_LLPLL_INV_WID 1
  890. #define DVSS_TO_LLPLL_INV_BIT 8
  891. #define DVSS_TO_LLPLL_INV_WID 1
  892. #define DVSS_TO_LLLPLL_SEL_BIT 6
  893. #define DVSS_TO_LLLPLL_SEL_WID 2
  894. #define DVSS_RM_GLITCH_BIT 4
  895. #define DVSS_RM_GLITCH_WID 2
  896. #define DVSS_HS_IN_INV_BIT 3
  897. #define DVSS_HS_IN_INV_WID 1
  898. #define DVSS_VS_IN_INV_BIT 2
  899. #define DVSS_VS_IN_INV_WID 1
  900. #define DVSS_XSYNCH_IN_SEL_BIT 0
  901. #define DVSS_XSYNCH_IN_SEL_WID 2
  902. #define TVFE_DVSS_MUXVS_REF ((TOP_BASE_ADD+0x01)<<2)
  903. #define DVSS_REFINE_TH_BIT 0
  904. #define DVSS_REFINE_TH_WID 16
  905. #define TVFE_DVSS_MUXCOAST_V ((TOP_BASE_ADD+0x02)<<2)
  906. #define MUXCOAST_VER_ED_BIT 16
  907. #define MUXCOAST_VER_ED_WID 16
  908. #define MUXCOAST_VER_ST_BIT 0
  909. #define MUXCOAST_VER_ST_WID 16
  910. #define TVFE_DVSS_SEP_HVWIDTH ((TOP_BASE_ADD+0x03)<<2)
  911. #define VS_WIDTH_BIT 16
  912. #define VS_WIDTH_WID 16
  913. #define HS_WIDTH_BIT 0
  914. #define HS_WIDTH_WID 16
  915. #define TVFE_DVSS_SEP_HPARA ((TOP_BASE_ADD+0x04)<<2)
  916. #define HS_MSK_BIT 16
  917. #define HS_MSK_WID 16
  918. #define HS_GEN_PRD_BIT 16
  919. #define HS_GEN_PRD_WID 0
  920. #define TVFE_DVSS_SEP_VINTEG ((TOP_BASE_ADD+0x05)<<2)
  921. #define VS_INTEGRAL_TH2_BIT 16
  922. #define VS_INTEGRAL_TH2_WID 16
  923. #define VS_INTEGRAL_TH1_BIT 0
  924. #define VS_INTEGRAL_TH1_WID 16
  925. #define TVFE_DVSS_SEP_H_THR ((TOP_BASE_ADD+0x06)<<2)
  926. #define DVSS_HS_WTH2_BIT 16
  927. #define DVSS_HS_WTH2_WID 16
  928. #define DVSS_HS_WTH1_BIT 0
  929. #define DVSS_HS_WTH1_WID 16
  930. #define TVFE_DVSS_SEP_CTRL ((TOP_BASE_ADD+0x07)<<2)
  931. #define DVSS_VS_TEST_BIT 29
  932. #define DVSS_VS_TEST_WID 3
  933. #define DVSS_HD_BIT 28
  934. #define DVSS_HD_WID 1
  935. #define DVSS_SEP_RESERVED_BIT 0
  936. #define DVSS_SEP_RESERVED_WID 16
  937. #define TVFE_DVSS_GEN_WIDTH ((TOP_BASE_ADD+0x08)<<2)
  938. #define DVSS_GEN_VS_WIDTH_BIT 16
  939. #define DVSS_GEN_VS_WIDTH_WID 16
  940. #define DVSS_GEN_HS_WIDTH_BIT 0
  941. #define DVSS_GEN_HS_WIDTH_WID 16
  942. #define TVFE_DVSS_GEN_PRD ((TOP_BASE_ADD+0x09)<<2)
  943. #define VS_GEN_PRD_BIT 16
  944. #define VS_GEN_PRD_WID 16
  945. #define HSYNC_GEN_PRD_BIT 0
  946. #define HSYNC_GEN_PRD_WID 16
  947. #define TVFE_DVSS_GEN_COAST ((TOP_BASE_ADD+0x0A)<<2)
  948. #define HSGEN_COAST_ST_BIT 16
  949. #define HSGEN_COAST_ST_WID 16
  950. #define HSGEN_COAST_ED_BIT 0
  951. #define HSGEN_COAST_ED_WID 16
  952. #define TVFE_DVSS_NOSIG_PARA ((TOP_BASE_ADD+0x0B)<<2)
  953. #define DVSS_HS_WIDTH_NOSIG_BIT 0
  954. #define DVSS_HS_WIDTH_NOSIG_WID 10
  955. #define TVFE_DVSS_NOSIG_PLS_TH ((TOP_BASE_ADD+0x0C)<<2)
  956. #define DVSS_READ_EN_BIT 31
  957. #define DVSS_READ_EN_WID 1
  958. #define INTEGRAL_STEP_NOSIG_BIT 28
  959. #define INTEGRAL_STEP_NOSIG_WID 2
  960. #define DVSS_PLS_CNT_TH2_BIT 16
  961. #define DVSS_PLS_CNT_TH2_WID 12
  962. #define DVSS_PLS_CNT_TH1_BIT 0
  963. #define DVSS_PLS_CNT_TH1_WID 12
  964. #define TVFE_DVSS_GATE_H ((TOP_BASE_ADD+0x0D)<<2)
  965. #define DVSS_BACKP_H_ED_BIT 16
  966. #define DVSS_BACKP_H_ED_WID 16
  967. #define DVSS_BACKP_H_ST_BIT 0
  968. #define DVSS_BACKP_H_ST_WID 16
  969. #define TVFE_DVSS_GATE_V ((TOP_BASE_ADD+0x0E)<<2)
  970. #define DVSS_CLAMP_V_ED_BIT 16
  971. #define DVSS_CLAMP_V_ED_WID 16
  972. #define DVSS_CLAMP_V_ST_BIT 0
  973. #define DVSS_CLAMP_V_ST_WID 16
  974. #define TVFE_DVSS_INDICATOR1 ((TOP_BASE_ADD+0x0F)<<2)
  975. #define MVDET_BIT 14
  976. #define MVDET_WID 1
  977. #define HI_BIT 13
  978. #define HI_WID 1
  979. #define NOSIG_BIT 12
  980. #define NOSIG_WID 1
  981. #define PLS_NUM_BIT 0
  982. #define PLS_NUM_WID 12
  983. #define TVFE_DVSS_INDICATOR2 ((TOP_BASE_ADD+0x10)<<2)
  984. #define DVSS_HITMASK_CNT_BIT 16
  985. #define DVSS_HITMASK_CNT_WID 16
  986. #define DVSS_CLK_CNT_BIT 0
  987. #define DVSS_CLK_CNT_WID 16
  988. // ******** MV DET -- YPBPR *************************** **********************
  989. #define TVFE_DVSS_MVDET_CTRL1 ((TOP_BASE_ADD+0x15)<<2)
  990. #define MV_HS_RISING_END_BIT 16
  991. #define MV_HS_RISING_END_WID 16
  992. #define MV_HS_RISING_START_BIT 0
  993. #define MV_HS_RISING_START_WID 16
  994. #define TVFE_DVSS_MVDET_CTRL2 ((TOP_BASE_ADD+0x16)<<2)
  995. #define MV_VEND_BIT 16
  996. #define MV_VEND_WID 16
  997. #define MV_VSTART_BIT 0
  998. #define MV_VSTART_WID 16
  999. #define TVFE_DVSS_MVDET_CTRL3 ((TOP_BASE_ADD+0x17)<<2)
  1000. #define MV_AVG_VEND_BIT 16
  1001. #define MV_AVG_VEND_WID 16
  1002. #define MV_AVG_VSTART_BIT 0
  1003. #define MV_AVG_VSTART_WID 16
  1004. #define TVFE_DVSS_MVDET_CTRL4 ((TOP_BASE_ADD+0x18)<<2)
  1005. #define COAST_VER_ST_BIT 16
  1006. #define COAST_VER_ST_WID 16
  1007. #define COAST_VER_ED_BIT 0
  1008. #define COAST_VER_ED_WID 16
  1009. #define TVFE_DVSS_MVDET_CTRL5 ((TOP_BASE_ADD+0x19)<<2)
  1010. #define HS_GATE_MSK_BIT 16
  1011. #define HS_GATE_MSK_WID 16
  1012. #define HS_GATE_WIDTH_BIT 0
  1013. #define HS_GATE_WIDTH_WID 16
  1014. #define TVFE_DVSS_MVDET_CTRL6 ((TOP_BASE_ADD+0x1A)<<2)
  1015. #define DVSS_HS_GATE_GEN_PRD_BIT 16
  1016. #define DVSS_HS_GATE_GEN_PRD_WID 16
  1017. #define DVSS_HS_RISING_END_BIT 0
  1018. #define DVSS_HS_RISING_END_WID 16
  1019. #define TVFE_DVSS_MVDET_CTRL7 ((TOP_BASE_ADD+0x1B)<<2)
  1020. #define VBI_SEL_BIT 17
  1021. #define VBI_SEL_WID 1
  1022. #define RST_BIT 16
  1023. #define RST_WID 1
  1024. #define VCENTER_BIT 0
  1025. #define VCENTER_WID 16
  1026. // ******** AUTO MODE AND AUTO POLARITY -- YPBP R & RGB ***********************
  1027. #define TVFE_SYNCTOP_SPOL_MUXCTRL ((TOP_BASE_ADD+0x20)<<2)
  1028. #define SPOL_D_COMP_SYNCIN_BIT 26
  1029. #define SPOL_D_COMP_SYNCIN_WID 1
  1030. #define SMUX_SRC_SEL_BIT 23
  1031. #define SMUX_SRC_SEL_WID 3
  1032. #define SPOL_AUTOMODE_LN_POS_BIT 12
  1033. #define SPOL_AUTOMODE_LN_POS_WID 11
  1034. #define SPOL_AUTOMODE_LN_TH_BIT 4
  1035. #define SPOL_AUTOMODE_LN_TH_WID 8
  1036. #define SPOL_AUTOMODE_EN_BIT 3
  1037. #define SPOL_AUTOMODE_EN_WID 1
  1038. #define SPOL_MANNUAL_INV_VS_BIT 2
  1039. #define SPOL_MANNUAL_INV_VS_WID 1
  1040. #define SPOL_MANNUAL_INV_HS_BIT 1
  1041. #define SPOL_MANNUAL_INV_HS_WID 1
  1042. #define SPOL_AUTO_POL_BIT 0
  1043. #define SPOL_AUTO_POL_WID 1
  1044. #define TVFE_SYNCTOP_INDICATOR1_HCNT ((TOP_BASE_ADD+0x21)<<2)
  1045. #define SPOL_HCNT_NEG_BIT 16
  1046. #define SPOL_HCNT_NEG_WID 16
  1047. #define SPOL_HCNT_POS_BIT 0
  1048. #define SPOL_HCNT_POS_WID 16
  1049. #define TVFE_SYNCTOP_INDICATOR2_VCNT ((TOP_BASE_ADD+0x22)<<2)
  1050. #define SPOL_VCNT_NEG_BIT 16
  1051. #define SPOL_VCNT_NEG_WID 16
  1052. #define SPOL_VCNT_POS_BIT 0
  1053. #define SPOL_VCNT_POS_WID 16
  1054. #define TVFE_SYNCTOP_INDICATOR3 ((TOP_BASE_ADD+0x23)<<2)
  1055. #define SFG_PROGRESSIVE_BIT 2
  1056. #define SFG_PROGRESSIVE_WID 1
  1057. #define SPOL_V_POL_BIT 1
  1058. #define SPOL_V_POL_WID 1
  1059. #define SPOL_H_POL_BIT 0
  1060. #define SPOL_H_POL_WID 1
  1061. // ******** FIELD GEN -- YPBPR & RGB ********** ******* ************************
  1062. #define TVFE_SYNCTOP_SFG_MUXCTRL1 ((TOP_BASE_ADD+0x24)<<2)
  1063. #define SFG_VS_WIDTH_BIT 28
  1064. #define SFG_VS_WIDTH_WID 8
  1065. #define SFG_VFILTER_EN_BIT 27
  1066. #define SFG_VFILTER_EN_WID 1
  1067. #define SFG_FLD_MANUAL_INV_BIT 26
  1068. #define SFG_FLD_MANUAL_INV_WID 1
  1069. #define SFG_FLD_AUTO_INV_BIT 25
  1070. #define SFG_FLD_AUTO_INV_WID 1
  1071. #define SFG_DET_EN_BIT 24
  1072. #define SFG_DET_EN_WID 1
  1073. #define SFG_DET_HEND_BIT 12
  1074. #define SFG_DET_HEND_WID 12
  1075. #define SFG_DET_HSTART_BIT 0
  1076. #define SFG_DET_HSTART_WID 12
  1077. #define TVFE_SYNCTOP_SFG_MUXCTRL2 ((TOP_BASE_ADD+0x25)<<2)
  1078. #define SFG_MANUAL_INV_VS_BIT 26
  1079. #define SFG_MANUAL_INV_VS_WID 1
  1080. #define SFG_MANUAL_INV_HS_BIT 25
  1081. #define SFG_MANUAL_INV_HS_WID 1
  1082. #define SFG_AUTO_POL_BIT 24
  1083. #define SFG_AUTO_POL_WID 1
  1084. #define SMUX_SP_VS_SRC_SEL_BIT 20
  1085. #define SMUX_SP_VS_SRC_SEL_WID 8
  1086. #define SMUX_SP_HS_SRC_SEL_BIT 16
  1087. #define SMUX_SP_HS_SRC_SEL_WID 4
  1088. #define SMUX_SM_VS_SRC_SEL_BIT 12
  1089. #define SMUX_SM_VS_SRC_SEL_WID 4
  1090. #define SMUX_SM_HS_SRC_SEL_BIT 8
  1091. #define SMUX_SM_HS_SRC_SEL_WID 4
  1092. #define SFG_VSIN_INV_BIT 7
  1093. #define SFG_VSIN_INV_WID 1
  1094. #define SFG_VSIN_SEL_BIT 4
  1095. #define SFG_VSIN_SEL_WID 3
  1096. #define SFG_HSIN_INV_BIT 3
  1097. #define SFG_HSIN_INV_WID 1
  1098. #define SFG_HSIN_SEL_BIT 0
  1099. #define SFG_HSIN_SEL_WID 3
  1100. // ******** AUTO MODE -- YPBPR & RGB ********** ******* ************************
  1101. #define TVFE_SYNCTOP_INDICATOR4 ((TOP_BASE_ADD+0x26)<<2)
  1102. #define SAM_VCNT_BIT 16
  1103. #define SAM_VCNT_WID 16
  1104. #define SAM_HCNT_BIT 0
  1105. #define SAM_HCNT_WID 16
  1106. #define TVFE_SYNCTOP_SAM_MUXCTRL ((TOP_BASE_ADD+0x27)<<2)
  1107. #define CSYNC_SEL_BIT 20
  1108. #define CSYNC_SEL_WID 2
  1109. #define SAM_AUTOMODE_EN_BIT 19
  1110. #define SAM_AUTOMODE_EN_WID 1
  1111. #define SAM_AUTOMODE_LN_POS_BIT 8
  1112. #define SAM_AUTOMODE_LN_POS_WID 11
  1113. #define SAM_AUTOMODE_SIG_WIDTH_BIT 0
  1114. #define SAM_AUTOMODE_SIG_WIDTH_WID 8
  1115. // ******** WSS -- YPBPR ********************** ******* ************************
  1116. #define TVFE_MISC_WSS1_MUXCTRL1 ((TOP_BASE_ADD+0x2A)<<2)
  1117. #define WSS1_DATA_START_BIT 11
  1118. #define WSS1_DATA_START_WID 11
  1119. #define WSS1_LN_POS_BIT 0
  1120. #define WSS1_LN_POS_WID 11
  1121. #define TVFE_MISC_WSS1_MUXCTRL2 ((TOP_BASE_ADD+0x2B)<<2)
  1122. #define WSS1_TH_BIT 19
  1123. #define WSS1_TH_WID 8
  1124. #define WSS1_STEP_BIT 11
  1125. #define WSS1_STEP_WID 8
  1126. #define WSS1_DATA_END_BIT 0
  1127. #define WSS1_DATA_END_WID 11
  1128. #define TVFE_MISC_WSS2_MUXCTRL1 ((TOP_BASE_ADD+0x2C)<<2)
  1129. #define WSS2_DATA_START_BIT 11
  1130. #define WSS2_DATA_START_WID 11
  1131. #define WSS2_LN_POS_BIT 0
  1132. #define WSS2_LN_POS_WID 11
  1133. #define TVFE_MISC_WSS2_MUXCTRL2 ((TOP_BASE_ADD+0x2D)<<2)
  1134. #define WSS2_TH_BIT 19
  1135. #define WSS2_TH_WID 8
  1136. #define WSS2_STEP_BIT 11
  1137. #define WSS2_STEP_WID 8
  1138. #define WSS2_DATA_END_BIT 0
  1139. #define WSS2_DATA_END_WID 11
  1140. #define TVFE_MISC_WSS1_INDICATOR1 ((TOP_BASE_ADD+0x2E)<<2)
  1141. #define WSS1_DATA_31_0_BIT 0
  1142. #define WSS1_DATA_31_0_WID 32
  1143. #define TVFE_MISC_WSS1_INDICATOR2 ((TOP_BASE_ADD+0x2F)<<2)
  1144. #define WSS1_DATA_63_32_BIT 0
  1145. #define WSS1_DATA_63_32_WID 32
  1146. #define TVFE_MISC_WSS1_INDICATOR3 ((TOP_BASE_ADD+0x30)<<2)
  1147. #define WSS1_DATA_95_64_BIT 0
  1148. #define WSS1_DATA_95_64_WID 32
  1149. #define TVFE_MISC_WSS1_INDICATOR4 ((TOP_BASE_ADD+0x31)<<2)
  1150. #define WSS1_DATA_127_96_BIT 0
  1151. #define WSS1_DATA_127_96_WID 32
  1152. #define TVFE_MISC_WSS1_INDICATOR5 ((TOP_BASE_ADD+0x32)<<2)
  1153. #define WSS1_DATA_143_128_BIT 0
  1154. #define WSS1_DATA_143_128_WID 16
  1155. #define TVFE_MISC_WSS2_INDICATOR1 ((TOP_BASE_ADD+0x33)<<2)
  1156. #define WSS2_DATA_31_0_BIT 0
  1157. #define WSS2_DATA_31_0_WID 32
  1158. #define TVFE_MISC_WSS2_INDICATOR2 ((TOP_BASE_ADD+0x34)<<2)
  1159. #define WSS2_DATA_63_32_BIT 0
  1160. #define WSS2_DATA_63_32_WID 32
  1161. #define TVFE_MISC_WSS2_INDICATOR3 ((TOP_BASE_ADD+0x35)<<2)
  1162. #define WSS2_DATA_95_64_BIT 0
  1163. #define WSS2_DATA_95_64_WID 32
  1164. #define TVFE_MISC_WSS2_INDICATOR4 ((TOP_BASE_ADD+0x36)<<2)
  1165. #define WSS2_DATA_127_96_BIT 0
  1166. #define WSS2_DATA_127_96_WID 32
  1167. #define TVFE_MISC_WSS2_INDICATOR5 ((TOP_BASE_ADD+0x37)<<2)
  1168. #define WSS2_DATA_143_128_BIT 0
  1169. #define WSS2_DATA_143_128_WID 16
  1170. // ******** AUTO PHASE AND BORDER DETECTION -- RGB *** ************************
  1171. #define TVFE_AP_MUXCTRL1 ((TOP_BASE_ADD+0x39)<<2)
  1172. #define AP_DIFFMAX_2ND_BIT 29
  1173. #define AP_DIFFMAX_2ND_WID 1
  1174. #define BD_DET_METHOD_BIT 28
  1175. #define BD_DET_METHOD_WID 1
  1176. #define BD_DET_EN_BIT 27
  1177. #define BD_DET_EN_WID 1
  1178. #define AP_SPECIFIC_POINT_OUT_BIT 26
  1179. #define AP_SPECIFIC_POINT_OUT_WID 1
  1180. #define AP_DIFF_SEL_BIT 25
  1181. #define AP_DIFF_SEL_WID 1
  1182. #define AUTOPHASE_EN_BIT 24
  1183. #define AUTOPHASE_EN_WID 1
  1184. #define AP_HEND_BIT 12
  1185. #define AP_HEND_WID 12
  1186. #define AP_HSTART_BIT 0
  1187. #define AP_HSTART_WID 12
  1188. #define TVFE_AP_MUXCTRL2 ((TOP_BASE_ADD+0x3A)<<2)
  1189. #define AP_VEND_BIT 12
  1190. #define AP_VEND_WID 12
  1191. #define AP_VSTART_BIT 0
  1192. #define AP_VSTART_WID 12
  1193. #define TVFE_AP_MUXCTRL3 ((TOP_BASE_ADD+0x3B)<<2)
  1194. #define BD_R_TH_BIT 22
  1195. #define BD_R_TH_WID 10
  1196. #define AP_SPECIFIC_MAX_HPOS_BIT 10
  1197. #define AP_SPECIFIC_MAX_HPOS_WID 12
  1198. #define AP_CORING_TH_BIT 0
  1199. #define AP_CORING_TH_WID 10
  1200. #define TVFE_AP_MUXCTRL4 ((TOP_BASE_ADD+0x3C)<<2)
  1201. #define AP_SPECIFIC_MIN_HPOS_BIT 12
  1202. #define AP_SPECIFIC_MIN_HPOS_WID 12
  1203. #define AP_SPECIFIC_MAX_VPOS_BIT 0
  1204. #define AP_SPECIFIC_MAX_VPOS_WID 12
  1205. #define TVFE_AP_MUXCTRL5 ((TOP_BASE_ADD+0x3D)<<2)
  1206. #define BD_B_TH_BIT 22
  1207. #define BD_B_TH_WID 10
  1208. #define BD_G_TH_BIT 12
  1209. #define BD_G_TH_WID 10
  1210. #define AP_SPECIFIC_MIN_VPOS_BIT 0
  1211. #define AP_SPECIFIC_MIN_VPOS_WID 12
  1212. #define TVFE_AP_INDICATOR1 ((TOP_BASE_ADD+0x3E)<<2)
  1213. #define AP_R_SUM_W_BIT 0
  1214. #define AP_R_SUM_W_WID 32
  1215. #define TVFE_AP_INDICATOR2 ((TOP_BASE_ADD+0x3F)<<2)
  1216. #define AP_G_SUM_W_BIT 0
  1217. #define AP_G_SUM_W_WID 32
  1218. #define TVFE_AP_INDICATOR3 ((TOP_BASE_ADD+0x40)<<2)
  1219. #define AP_B_SUM_W_BIT 0
  1220. #define AP_B_SUM_W_WID 32
  1221. #define TVFE_AP_INDICATOR4 ((TOP_BASE_ADD+0x41)<<2)
  1222. #define AP_R_MIN_BIT 12
  1223. #define AP_R_MIN_WID 11
  1224. #define AP_R_MAX_BIT 0
  1225. #define AP_R_MAX_WID 11
  1226. #define TVFE_AP_INDICATOR5 ((TOP_BASE_ADD+0x42)<<2)
  1227. #define AP_G_MIN_BIT 12
  1228. #define AP_G_MIN_WID 11
  1229. #define AP_G_MAX_BIT 0
  1230. #define AP_G_MAX_WID 11
  1231. #define TVFE_AP_INDICATOR6 ((TOP_BASE_ADD+0x43)<<2)
  1232. #define AP_B_MIN_BIT 12
  1233. #define AP_B_MIN_WID 11
  1234. #define AP_B_MAX_BIT 0
  1235. #define AP_B_MAX_WID 11
  1236. #define TVFE_AP_INDICATOR7 ((TOP_BASE_ADD+0x44)<<2)
  1237. #define AP_R_MAX_HCNT_BIT 12
  1238. #define AP_R_MAX_HCNT_WID 12
  1239. #define AP_R_MAX_VCNT_BIT 0
  1240. #define AP_R_MAX_VCNT_WID 12
  1241. #define TVFE_AP_INDICATOR8 ((TOP_BASE_ADD+0x45)<<2)
  1242. #define AP_G_MAX_HCNT_BIT 12
  1243. #define AP_G_MAX_HCNT_WID 12
  1244. #define AP_G_MAX_VCNT_BIT 0
  1245. #define AP_G_MAX_VCNT_WID 12
  1246. #define TVFE_AP_INDICATOR9 ((TOP_BASE_ADD+0x46)<<2)
  1247. #define AP_B_MAX_HCNT_BIT 12
  1248. #define AP_B_MAX_HCNT_WID 12
  1249. #define AP_B_MAX_VCNT_BIT 0
  1250. #define AP_B_MAX_VCNT_WID 12
  1251. #define TVFE_AP_INDICATOR10 ((TOP_BASE_ADD+0x47)<<2)
  1252. #define AP_R_MIN_HCNT_BIT 12
  1253. #define AP_R_MIN_HCNT_WID 12
  1254. #define AP_R_MIN_VCNT_BIT 0
  1255. #define AP_R_MIN_VCNT_WID 12
  1256. #define TVFE_AP_INDICATOR11 ((TOP_BASE_ADD+0x48)<<2)
  1257. #define AP_G_MIN_HCNT_BIT 12
  1258. #define AP_G_MIN_HCNT_WID 12
  1259. #define AP_G_MIN_VCNT_BIT 0
  1260. #define AP_G_MIN_VCNT_WID 12
  1261. #define TVFE_AP_INDICATOR12 ((TOP_BASE_ADD+0x49)<<2)
  1262. #define AP_B_MIN_HCNT_BIT 12
  1263. #define AP_B_MIN_HCNT_WID 12
  1264. #define AP_B_MIN_VCNT_BIT 0
  1265. #define AP_B_MIN_VCNT_WID 12
  1266. #define TVFE_AP_INDICATOR13 ((TOP_BASE_ADD+0x4A)<<2)
  1267. #define BD_R_BOT_VCNT_BIT 12
  1268. #define BD_R_BOT_VCNT_WID 12
  1269. #define BD_R_TOP_VCNT_BIT 0
  1270. #define BD_R_TOP_VCNT_WID 12
  1271. #define TVFE_AP_INDICATOR14 ((TOP_BASE_ADD+0x4B)<<2)
  1272. #define BD_R_RIGHT_HCNT_BIT 12
  1273. #define BD_R_RIGHT_HCNT_WID 12
  1274. #define BD_R_LEFT_HCNT_BIT 0
  1275. #define BD_R_LEFT_HCNT_WID 12
  1276. #define TVFE_AP_INDICATOR15 ((TOP_BASE_ADD+0x4C)<<2)
  1277. #define BD_G_BOT_VCNT_BIT 12
  1278. #define BD_G_BOT_VCNT_WID 12
  1279. #define BD_G_TOP_VCNT_BIT 0
  1280. #define BD_G_TOP_VCNT_WID 12
  1281. #define TVFE_AP_INDICATOR16 ((TOP_BASE_ADD+0x4D)<<2)
  1282. #define BD_G_RIGHT_HCNT_BIT 12
  1283. #define BD_G_RIGHT_HCNT_WID 12
  1284. #define BD_G_LEFT_HCNT_BIT 0
  1285. #define BD_G_LEFT_HCNT_WID 12
  1286. #define TVFE_AP_INDICATOR17 ((TOP_BASE_ADD+0x4E)<<2)
  1287. #define BD_B_BOT_VCNT_BIT 12
  1288. #define BD_B_BOT_VCNT_WID 12
  1289. #define BD_B_TOP_VCNT_BIT 0
  1290. #define BD_B_TOP_VCNT_WID 12
  1291. #define TVFE_AP_INDICATOR18 ((TOP_BASE_ADD+0x4F)<<2)
  1292. #define BD_B_RIGHT_HCNT_BIT 12
  1293. #define BD_B_RIGHT_HCNT_WID 12
  1294. #define BD_B_LEFT_HCNT_BIT 0
  1295. #define BD_B_LEFT_HCNT_WID 12
  1296. #define TVFE_AP_INDICATOR19 ((TOP_BASE_ADD+0x50)<<2)
  1297. #define GTTH_NUM_BIT 0
  1298. #define GTTH_NUM_WID 12
  1299. #define TVFE_BD_MUXCTRL1 ((TOP_BASE_ADD+0x53)<<2)
  1300. #define BD_WIN_EN_BIT 24
  1301. #define BD_WIN_EN_WID 1
  1302. #define BD_HEND_BIT 12
  1303. #define BD_HEND_WID 12
  1304. #define BD_HSTART_BIT 0
  1305. #define BD_HSTART_WID 12
  1306. #define TVFE_BD_MUXCTRL2 ((TOP_BASE_ADD+0x54)<<2)
  1307. #define BD_VEND_BIT 12
  1308. #define BD_VEND_WID 12
  1309. #define BD_VSTART_BIT 0
  1310. #define BD_VSTART_WID 12
  1311. #define TVFE_BD_MUXCTRL3 ((TOP_BASE_ADD+0x55)<<2)
  1312. #define BD_VALID_LN_EN_BIT 12
  1313. #define BD_VALID_LN_EN_WID 1
  1314. #define BD_VLD_LN_TH_BIT 0
  1315. #define BD_VLD_LN_TH_WID 12
  1316. #define TVFE_BD_MUXCTRL4 ((TOP_BASE_ADD+0x56)<<2)
  1317. #define BD_LIMITED_FLD_RECORD_BIT 5
  1318. #define BD_LIMITED_FLD_RECORD_WID 1
  1319. #define BD_FLD_CD_NUM_BIT 0
  1320. #define BD_FLD_CD_NUM_WID 5
  1321. // ******** CLAMPING -- YPBPR & RGB *********** ******* ************************
  1322. #define TVFE_CLP_MUXCTRL1 ((TOP_BASE_ADD+0x59)<<2)
  1323. #define CLAMPING_LOW_EN_BIT 30
  1324. #define CLAMPING_LOW_EN_WID 1
  1325. #define CLAMPING_HIGH_EN_BIT 29
  1326. #define CLAMPING_HIGH_EN_WID 1
  1327. #define CLAMPING_DLY_BIT 18
  1328. #define CLAMPING_DLY_WID 11
  1329. #define CLAMPING_SCALE_BIT 14
  1330. #define CLAMPING_SCALE_WID 4
  1331. #define CLAMPING_UPDN_RATIO_BIT 8
  1332. #define CLAMPING_UPDN_RATIO_WID 6
  1333. #define CLAMPING_IIR_COEFF_BIT 0
  1334. #define CLAMPING_IIR_COEFF_WID 4
  1335. #define TVFE_CLP_MUXCTRL2 ((TOP_BASE_ADD+0x5A)<<2)
  1336. #define CLAMPING_PRIORITY_BIT 20
  1337. #define CLAMPING_PRIORITY_WID 2
  1338. #define CLAMPING_LOW_LENGTH_BIT 10
  1339. #define CLAMPING_LOW_LENGTH_WID 10
  1340. #define CLAMPING_HIGH_LENGTH_BIT 0
  1341. #define CLAMPING_HIGH_LENGTH_WID 10
  1342. #define TVFE_CLP_MUXCTRL3 ((TOP_BASE_ADD+0x5B)<<2)
  1343. #define CLAMPING_TARGET_CRR_BIT 20
  1344. #define CLAMPING_TARGET_CRR_WID 10
  1345. #define CLAMPING_TARGET_CBB_BIT 10
  1346. #define CLAMPING_TARGET_CBB_WID 10
  1347. #define CLAMPING_TARGET_YG_BIT 0
  1348. #define CLAMPING_TARGET_YG_WID 10
  1349. #define TVFE_CLP_MUXCTRL4 ((TOP_BASE_ADD+0x5C)<<2)
  1350. #define CLAMPING_UP_OFFSET_BIT 8
  1351. #define CLAMPING_UP_OFFSET_WID 8
  1352. #define CLAMPING_DN_OFFSET_BIT 0
  1353. #define CLAMPING_DN_OFFSET_WID 8
  1354. #define TVFE_CLP_INDICATOR1 ((TOP_BASE_ADD+0x5D)<<2)
  1355. #define IIR_RESULT_CRR_BIT 20
  1356. #define IIR_RESULT_CRR_WID 10
  1357. #define IIR_RESULT_CBB_BIT 10
  1358. #define IIR_RESULT_CBB_WID 10
  1359. #define IIR_RESULT_YG_BIT 0
  1360. #define IIR_RESULT_YG_WID 10
  1361. // ******** DVSS BPG_BACKP_GATE (BACK PORCH GAT E) -- YPBPR & RGB **************
  1362. #define TVFE_BPG_BACKP_H ((TOP_BASE_ADD+0x61)<<2)
  1363. #define BACKP_H_ED_BIT 16
  1364. #define BACKP_H_ED_WID 16
  1365. #define BACKP_H_ST_BIT 0
  1366. #define BACKP_H_ST_WID 16
  1367. #define TVFE_BPG_BACKP_V ((TOP_BASE_ADD+0x62)<<2)
  1368. #define BACKP_V_ED_BIT 16
  1369. #define BACKP_V_ED_WID 16
  1370. #define BACKP_V_EN_BIT 15
  1371. #define BACKP_V_EN_WID 1
  1372. #define BACKP_V_ST_BIT 0
  1373. #define BACKP_V_ST_WID 15
  1374. // ******** DE GENERATION -- YPBPR & RGB ****** *********************************
  1375. #define TVFE_DEG_H ((TOP_BASE_ADD+0x63)<<2)
  1376. #define DATAPROC_DLY_BIT 28
  1377. #define DATAPROC_DLY_WID 4
  1378. #define SYNCPROC_DLY_BIT 24
  1379. #define SYNCPROC_DLY_WID 4
  1380. #define DEG_HEND_BIT 12
  1381. #define DEG_HEND_WID 12
  1382. #define DEG_HSTART_BIT 0
  1383. #define DEG_HSTART_WID 12
  1384. #define TVFE_DEG_VODD ((TOP_BASE_ADD+0x64)<<2)
  1385. #define DEG_VEND_ODD_BIT 12
  1386. #define DEG_VEND_ODD_WID 12
  1387. #define DEG_VSTART_ODD_BIT 0
  1388. #define DEG_VSTART_ODD_WID 12
  1389. #define TVFE_DEG_VEVEN ((TOP_BASE_ADD+0x65)<<2)
  1390. #define DEG_VEND_EVEN_BIT 12
  1391. #define DEG_VEND_EVEN_WID 12
  1392. #define DEG_VSTART_EVEN_BIT 0
  1393. #define DEG_VSTART_EVEN_WID 12
  1394. // ******** OFFSET_GAIN_OFFSET -- ALL ******************************************
  1395. #define TVFE_OGO_OFFSET1 ((TOP_BASE_ADD+0x69)<<2)
  1396. #define OGO_EN_BIT 31
  1397. #define OGO_EN_WID 1
  1398. #define OGO_UB_OFFSET1_BIT 12
  1399. #define OGO_UB_OFFSET1_WID 11
  1400. #define OGO_YG_OFFSET1_BIT 0
  1401. #define OGO_YG_OFFSET1_WID 11
  1402. #define TVFE_OGO_GAIN1 ((TOP_BASE_ADD+0x6A)<<2)
  1403. #define OGO_UB_GAIN_BIT 12
  1404. #define OGO_UB_GAIN_WID 12
  1405. #define OGO_YG_GAIN_BIT 0
  1406. #define OGO_YG_GAIN_WID 12
  1407. #define TVFE_OGO_GAIN2 ((TOP_BASE_ADD+0x6B)<<2)
  1408. #define OGO_VR_GAIN_BIT 0
  1409. #define OGO_VR_GAIN_WID 12
  1410. #define TVFE_OGO_OFFSET2 ((TOP_BASE_ADD+0x6C)<<2)
  1411. #define OGO_UB_OFFSET2_BIT 12
  1412. #define OGO_UB_OFFSET2_WID 11
  1413. #define OGO_YG_OFFSET2_BIT 0
  1414. #define OGO_YG_OFFSET2_WID 11
  1415. #define TVFE_OGO_OFFSET3 ((TOP_BASE_ADD+0x6D)<<2)
  1416. #define OGO_VR_OFFSET2_BIT 12
  1417. #define OGO_VR_OFFSET2_WID 11
  1418. #define OGO_VR_OFFSET1_BIT 0
  1419. #define OGO_VR_OFFSET1_WID 11
  1420. // ******** CI7740KN RELATED -- ALL ********************************************
  1421. #define TVFE_VAFE_CTRL ((TOP_BASE_ADD+0x70)<<2)
  1422. #define VAFE_CLK_PHASE_BIT 16
  1423. #define VAFE_CLK_PHASE_WID 5
  1424. #define VAFE_ENGAINCAL_BIT 15
  1425. #define VAFE_ENGAINCAL_WID 1
  1426. #define VAFE_ENOFFSETCAL_BIT 14
  1427. #define VAFE_ENOFFSETCAL_WID 1
  1428. #define VAFE_SELGAINCALLVL_BIT 12
  1429. #define VAFE_SELGAINCALLVL_WID 2
  1430. #define VAFE_HS_VS_MUX_BIT 0
  1431. #define VAFE_HS_VS_MUX_WID 1
  1432. #define TVFE_VAFE_STATUS ((TOP_BASE_ADD+0x71)<<2)
  1433. #define VAFE_STATUS_PLLLOCK 4
  1434. #define VAFE_STATUS_PLLLOCK_WID 1
  1435. #define VAFE_HSOUT2VALID_BIT 3
  1436. #define VAFE_HSOUT2VALID_WID 1
  1437. #define VAFE_ADCRDYC_BIT 2
  1438. #define VAFE_ADCRDYC_WID 1
  1439. #define VAFE_ADCRDYB_BIT 1
  1440. #define VAFE_ADCRDYB_WID 1
  1441. #define VAFE_ADCRDYA_BIT 0
  1442. #define VAFE_ADCRDYA_WID 1
  1443. #define TVFE_TOP_CTRL ((TOP_BASE_ADD+0x72)<<2)
  1444. /*
  1445. 000: abc
  1446. 001: acb
  1447. 010: bac
  1448. 011: bca
  1449. 100: cab
  1450. 101: cba
  1451. */
  1452. #define SWT_GY_BCB_RCR_IN_BIT 28
  1453. #define SWT_GY_BCB_RCR_IN_WID 3
  1454. #define ADC_AUTO_CAL_MASK_BIT 27
  1455. #define ADC_AUTO_CAL_MASK_WID 1
  1456. #define VGA_DDC_SEL_BIT_WID 22
  1457. #define VGA_DDC_SEL_WID 1
  1458. #define ABLC_ENABLE_BIT 21
  1459. #define ABLC_ENABLE_WID 1
  1460. #define DEBUG_MUX_BIT 16
  1461. #define DEBUG_MUX_WID 5
  1462. #define COMP_CLK_ENABLE_BIT 15
  1463. #define COMP_CLK_ENABLE_WID 1
  1464. #define DCLK_ENABLE_BIT 14
  1465. #define DCLK_ENABLE_WID 1
  1466. #define ADC_CLK_INV_BIT 13
  1467. #define ADC_CLK_INV_WID 1
  1468. #define DATACK_INV_SEL_BIT 12
  1469. #define DATACK_INV_SEL_WID 1
  1470. #define VAFE_MCLK_EN_BIT 11
  1471. #define VAFE_MCLK_EN_WID 1
  1472. #define EDID_CLK_EN_BIT 10
  1473. #define EDID_CLK_EN_WID 1
  1474. #define TVFE_ADC_CLK_DIV_BIT 8
  1475. #define TVFE_ADC_CLK_DIV_WID 2
  1476. #define ADC_EXT_COAST_EN_BIT 6
  1477. #define ADC_EXT_COAST_EN_WID 1
  1478. #define TVFE_BACKP_GATE_MUX_BIT 4
  1479. #define TVFE_BACKP_GATE_MUX_WID 2
  1480. #define SCAN_REG_BIT 0
  1481. #define SCAN_REG_WID 1
  1482. #define TVFE_CLAMP_INTF ((TOP_BASE_ADD+0x73)<<2)
  1483. #define CLAMP_EN_BIT 15
  1484. #define CLAMP_EN_WID 1
  1485. #define CLAMP_C_CURRENT_SEL_BIT 8
  1486. #define CLAMP_C_CURRENT_SEL_WID 3
  1487. #define CLAMP_SIGNAL_DLY_BIT 7
  1488. #define CLAMP_SIGNAL_DLY_WID 1
  1489. #define CLAMP_B_CURRENT_SEL_BIT 4
  1490. #define CLAMP_B_CURRENT_SEL_WID 3
  1491. #define CLAMP_UP_DN_SRC_BIT 3
  1492. #define CLAMP_UP_DN_SRC_WID 1
  1493. #define CLAMP_A_CURRENT_SEL_BIT 0
  1494. #define CLAMP_A_CURRENT_SEL_WID 3
  1495. #define TVFE_RST_CTRL ((TOP_BASE_ADD+0x74)<<2)
  1496. #define DCLK_RST_BIT 10
  1497. #define DCLK_RST_WID 1
  1498. #define SAMPLE_OUT_RST_BIT 9
  1499. #define SAMPLE_OUT_RST_WID 1
  1500. #define ACD_REG_INF_RST_BIT 8
  1501. #define ACD_REG_INF_RST_WID 1
  1502. #define CVD_REG_INF_RST_BIT 7
  1503. #define CVD_REG_INF_RST_WID 1
  1504. #define VAFE_REG_INF_RST_BIT 6
  1505. #define VAFE_REG_INF_RST_WID 1
  1506. #define EDID_RST_BIT 5
  1507. #define EDID_RST_WID 1
  1508. #define VAFE_RST_BIT 4
  1509. #define VAFE_RST_WID 1
  1510. #define ADC_CLK_RST_BIT 3
  1511. #define ADC_CLK_RST_WID 1
  1512. #define MCLK_RST_BIT 2
  1513. #define MCLK_RST_WID 1
  1514. #define AUTO_MODE_CLK_RST_BIT 1
  1515. #define AUTO_MODE_CLK_RST_WID 1
  1516. #define ALL_CLK_RST_BIT 0
  1517. #define ALL_CLK_RST_WID 1
  1518. #define TVFE_EXT_VIDEO_AFE_CTRL_MUX1 ((TOP_BASE_ADD+0x75)<<2)
  1519. // ******** ANTI-ALIAS FILTER -- YPBPR & CVBS **********************************
  1520. #define TVFE_AAFILTER_CTRL1 ((TOP_BASE_ADD+0x77)<<2)
  1521. #define AAFILTER_BYPASS_BIT 18
  1522. #define AAFILTER_BYPASS_WID 2
  1523. #define AAFILTER_SCALE_BIT 16
  1524. #define AAFILTER_SCALE_WID 1
  1525. #define AAFILTER_ALPHA0_BIT 8
  1526. #define AAFILTER_ALPHA0_WID 8
  1527. #define AAFILTER_ALPHA1_BIT 0
  1528. #define AAFILTER_ALPHA1_WID 8
  1529. #define TVFE_AAFILTER_CTRL2 ((TOP_BASE_ADD+0x78)<<2)
  1530. #define AAFILTER_ALPHA2_BIT 24
  1531. #define AAFILTER_ALPHA2_WID 8
  1532. #define AAFILTER_ALPHA3_BIT 16
  1533. #define AAFILTER_ALPHA3_WID 8
  1534. #define AAFILTER_ALPHA4_BIT 8
  1535. #define AAFILTER_ALPHA4_WID 8
  1536. #define AAFILTER_ALPHA5_BIT 0
  1537. #define AAFILTER_ALPHA5_WID 8
  1538. // ******** EDID -- RGB ********************************************************
  1539. #define TVFE_EDID_CONFIG ((TOP_BASE_ADD+0x7A)<<2)
  1540. #define EDID_INT_MODE_BIT 26
  1541. #define EDID_INT_MODE_WID 2
  1542. #define EDID_SEGMENT_MISS_MSK_BIT 25
  1543. #define EDID_SEGMENT_MISS_MSK_WID 1
  1544. #define EDID_I2C_MODE_BIT 24
  1545. #define EDID_I2C_MODE_WID 1
  1546. #define EDID_I2C_8BIT_MODE_BIT 23
  1547. #define EDID_I2C_8BIT_MODE_WID 1
  1548. #define EDID_SEGMENT_INDEX_BIT 16
  1549. #define EDID_SEGMENT_INDEX_WID 7
  1550. #define EDID_I2C_EDDC_MODE_BIT 15
  1551. #define EDID_I2C_EDDC_MODE_WID 1
  1552. #define EDID_I2C_SEGMENT_ID_BIT 8
  1553. #define EDID_I2C_SEGMENT_ID_WID 7
  1554. #define EDID_I2C_DEV_ID_BIT 0
  1555. #define EDID_I2C_DEV_ID_WID 7
  1556. #define TVFE_EDID_RAM_ADDR ((TOP_BASE_ADD+0x7B)<<2)
  1557. #define EDID_RAM_ACCESS_MODE_BIT 8
  1558. #define EDID_RAM_ACCESS_MODE_WID 1
  1559. #define EDID_RAM_ADDR_BIT 0
  1560. #define EDID_RAM_ADDR_WID 8
  1561. #define TVFE_EDID_RAM_WDATA ((TOP_BASE_ADD+0x7C)<<2)
  1562. #define EDID_RAM_WDATA_BIT 0
  1563. #define EDID_RAM_WDATA_WID 8
  1564. #define TVFE_EDID_RAM_RDATA ((TOP_BASE_ADD+0x7D)<<2)
  1565. #define EDID_I2C_ST_BIT 25
  1566. #define EDID_I2C_ST_WID 3
  1567. #define EDID_RAM_SEGMENT_ST_BIT 24
  1568. #define EDID_RAM_SEGMENT_ST_WID 1
  1569. #define EDID_ACCESSED_RAM_ADDR_BIT 8
  1570. #define EDID_ACCESSED_RAM_ADDR_WID 16
  1571. #define EDID_RAM_RDATA_BIT 0
  1572. #define EDID_RAM_RDATA_WID 8
  1573. // ******** APB BUS -- ALL *****************************************************
  1574. #define TVFE_APB_ERR_CTRL_MUX1 ((TOP_BASE_ADD+0x80)<<2)
  1575. #define ERR_CTRL_ACD_BIT 16
  1576. #define ERR_CTRL_ACD_WID 16
  1577. #define ERR_CTRL_CVD_BIT 0
  1578. #define ERR_CTRL_CVD_WID 16
  1579. #define TVFE_APB_ERR_CTRL_MUX2 ((TOP_BASE_ADD+0x81)<<2)
  1580. #define ERR_CTRL_CVD_BIT 0
  1581. #define ERR_CTRL_CVD_WID 16
  1582. #define TVFE_APB_INDICATOR1 ((TOP_BASE_ADD+0x82)<<2)
  1583. #define ERR_CNT_ACD_BIT 12
  1584. #define ERR_CNT_ACD_WID 12
  1585. #define ERR_CNT_CVD_BIT 0
  1586. #define ERR_CNT_CVD_WID 12
  1587. #define TVFE_APB_INDICATOR2 ((TOP_BASE_ADD+0x83)<<2)
  1588. #define ERR_CNT_AFEIP_BIT 0
  1589. #define ERR_CNT_AFEIP_WID 12
  1590. // ******** ADC READBACK -- ALL ************************************************
  1591. #define TVFE_ADC_READBACK_CTRL ((TOP_BASE_ADD+0x86)<<2)
  1592. #define ADC_READBACK_MODE_BIT 31
  1593. #define ADC_READBACK_MODE_WID 1
  1594. #define ADC_READBACK_HSSEL_BIT 29
  1595. #define ADC_READBACK_HSSEL_WID 2
  1596. #define ADC_READBACK_HCNT_BIT 16
  1597. #define ADC_READBACK_HCNT_WID 13
  1598. #define ADC_READBACK_VSSEL_BIT 13
  1599. #define ADC_READBACK_VSSEL_WID 2
  1600. #define ADC_READBACK_VCNT_BIT 0
  1601. #define ADC_READBACK_VCNT_WID 13
  1602. #define TVFE_ADC_READBACK_INDICATOR ((TOP_BASE_ADD+0x87)<<2)
  1603. #define ADC_READBACK_DA_BIT 20
  1604. #define ADC_READBACK_DA_WID 10
  1605. #define ADC_READBACK_DB_BIT 10
  1606. #define ADC_READBACK_DB_WID 10
  1607. #define ADC_READBACK_DC_BIT 0
  1608. #define ADC_READBACK_DC_WID 10
  1609. #define TVFE_INT_CLR ((TOP_BASE_ADD+0x8A)<<2)
  1610. #define INT_CLR_BIT 0
  1611. #define INT_CLR_WID 17
  1612. #define TVFE_INT_MSKN ((TOP_BASE_ADD+0x8B)<<2)
  1613. #define INT_MSKN_BIT 0
  1614. #define INT_MSKN_WID 17
  1615. #define TVFE_INT_INDICATOR1 ((TOP_BASE_ADD+0x8C)<<2)
  1616. #define WARNING_3D_BIT 17
  1617. #define WARNING_3D_WID 1
  1618. #define VAFE_INT_INDICATOR1_PLLLOCK_BIT 16
  1619. #define VAFE_INT_INDICATOR1_PLLLOCK_WID 1
  1620. #define VAFE_LOST_PLLLOCK_BIT 15
  1621. #define VAFE_LOST_PLLLOCK_WID 1
  1622. #define CVD2_VS_BIT 14
  1623. #define CVD2_VS_WID 1
  1624. #define TVFE_VS_BIT 13
  1625. #define TVFE_VS_WID 1
  1626. #define TVFE_EDID_INT_BIT 12
  1627. #define TVFE_EDID_INT_WID 1
  1628. #define CVD2_LOST_EXT_LOCKED_BIT 11
  1629. #define CVD2_LOST_EXT_LOCKED_WID 1
  1630. #define CVD2_EXT_LOCKED_BIT 10
  1631. #define CVD2_EXT_LOCKED_WID 1
  1632. #define CVD2_LOST_FINE_LOCK_BIT 9
  1633. #define CVD2_LOST_FINE_LOCK_WID 1
  1634. #define CVD2_FINE_LOCK_BIT 8
  1635. #define CVD2_FINE_LOCK_WID 1
  1636. #define CVD2_LOST_CHROMA_LOCK_BIT 7
  1637. #define CVD2_LOST_CHROMA_LOCK_WID 1
  1638. #define CVD2_CHROMA_LOCK_BIT 6
  1639. #define CVD2_CHROMA_LOCK_WID 1
  1640. #define CVD2_LOST_VLOCK_BIT 5
  1641. #define CVD2_LOST_VLOCK_WID 1
  1642. #define CVD2_VLOCK_BIT 4
  1643. #define CVD2_VLOCK_WID 1
  1644. #define CVD2_MV_DETECTED_BIT 3
  1645. #define CVD2_MV_DETECTED_WID 3
  1646. #define CVD2_NO_SIGNAL_BIT 2
  1647. #define CVD2_NO_SIGNAL_WID 1
  1648. #define INDICATOR_DVSS_MVDET_BIT 1
  1649. #define INDICATOR_DVSS_MVDET_WID 1
  1650. #define INDICATOR_DVSS_NOSIG_BIT 0
  1651. #define INDICATOR_DVSS_NOSIG_WID 1
  1652. #define TVFE_INT_SET ((TOP_BASE_ADD+0x8D)<<2)
  1653. #define INT_SET_BIT 0
  1654. #define INT_SET_WID 17
  1655. #define TVFE_CHIP_VERSION ((TOP_BASE_ADD+0x90)<<2)
  1656. // **************************************************** *************************
  1657. // ******** CVD2 REGISTERS ********
  1658. // **************************************************** *************************
  1659. #define CVD_BASE_ADD 0x1800
  1660. #define CVD2_CONTROL0 ((CVD_BASE_ADD+0x00)<<2)
  1661. #define HV_DLY_BIT 7
  1662. #define HV_DLY_WID 1
  1663. #define HPIXEL_BIT 5
  1664. #define HPIXEL_WID 2
  1665. #define VLINE_625_BIT 4
  1666. #define VLINE_625_WID 1
  1667. #define COLOUR_MODE_BIT 1
  1668. #define COLOUR_MODE_WID 3
  1669. #define YC_SRC_BIT 0
  1670. #define YC_SRC_WID 1
  1671. #define CVD2_CONTROL1 ((CVD_BASE_ADD+0x01)<<2)
  1672. #define CV_INV_BIT 7
  1673. #define CV_INV_WID 1
  1674. #define CV_SRC_BIT 6
  1675. #define CV_SRC_WID 1
  1676. #define LUMA_NOTCH_BW_BIT 4
  1677. #define LUMA_NOTCH_BW_WID 2
  1678. #define CHROMA_BW_LO_BIT 2
  1679. #define CHROMA_BW_LO_WID 2
  1680. #define CHROMA_BURST5OR10_BIT 1
  1681. #define CHROMA_BURST5OR10_WID 1
  1682. #define PED_BIT 0
  1683. #define PED_WID 1
  1684. #define CVD2_CONTROL2 ((CVD_BASE_ADD+0x02)<<2)
  1685. #define HAGC_FLD_MODE_BIT 7
  1686. #define HAGC_FLD_MODE_WID 1
  1687. #define MV_HAGC_MODE_BIT 6
  1688. #define MV_HAGC_MODE_WID 1
  1689. #define DC_CLAMP_MODE_BIT 4
  1690. #define DC_CLAMP_MODE_WID 2
  1691. #define DAGC_EN_BIT 3
  1692. #define DAGC_EN_WID 1
  1693. #define AGC_HALF_EN_BIT 2
  1694. #define AGC_HALF_EN_WID 1
  1695. #define CAGC_EN_BIT 1
  1696. #define CAGC_EN_WID 1
  1697. #define HAGC_EN_BIT 0
  1698. #define HAGC_EN_WID 1
  1699. #define CVD2_YC_SEPARATION_CONTROL ((CVD_BASE_ADD+0x03)<<2)
  1700. #define NTSC443_3DMODE_BIT 7
  1701. #define NTSC443_3DMODE_WID 1
  1702. #define ADAPTIVE_3DMODE_BIT 4
  1703. #define ADAPTIVE_3DMODE_WID 3
  1704. #define COLOUR_TRAP_BIT 3
  1705. #define COLOUR_TRAP_WID 1
  1706. #define ADAPTIVE_MODE_BIT 0
  1707. #define ADAPTIVE_MODE_WID 3
  1708. #define CVD2_LUMA_AGC_VALUE ((CVD_BASE_ADD+0x04)<<2)
  1709. #define HAGC_BIT 0
  1710. #define HAGC_WID 8
  1711. #define CVD2_NOISE_THRESHOLD ((CVD_BASE_ADD+0x05)<<2)
  1712. #define NOISE_TH_BIT 0
  1713. #define NOISE_TH_WID 8
  1714. #define CVD2_REG_06 ((CVD_BASE_ADD+0x06)<<2)
  1715. #define ADC_UPDN_SWAP_BIT 7
  1716. #define ADC_UPDN_SWAP_WID 1
  1717. #define ADC_IN_SWAP_BIT 6
  1718. #define ADC_IN_SWAP_WID 1
  1719. #define FORCE_VCR_EN_BIT 4
  1720. #define FORCE_VCR_EN_WID 1
  1721. #define FORCE_VCR_REW_BIT 3
  1722. #define FORCE_VCR_REW_WID 1
  1723. #define FORCE_VCR_FF_BIT 2
  1724. #define FORCE_VCR_FF_WID 1
  1725. #define FORCE_VCR_TRICK_BIT 1
  1726. #define FORCE_VCR_TRICK_WID 1
  1727. #define FORCE_VCR_BIT 0
  1728. #define FORCE_VCR_WID 1
  1729. #define CVD2_OUTPUT_CONTROL ((CVD_BASE_ADD+0x07)<<2)
  1730. #define CCIR656_EN_BIT 7
  1731. #define CCIR656_EN_WID 1
  1732. #define CBCR_SWAP_BIT 6
  1733. #define CBCR_SWAP_WID 1
  1734. #define BLUE_MODE_BIT 4
  1735. #define BLUE_MODE_WID 2
  1736. #define YC_DLY_BIT 0
  1737. #define YC_DLY_WID 4
  1738. #define CVD2_LUMA_CONTRAST_ADJUSTMENT ((CVD_BASE_ADD+0x08)<<2)
  1739. #define CONTRAST_BIT 0
  1740. #define CONTRAST_WID 8
  1741. #define CVD2_LUMA_BRIGHTNESS_ADJUSTMENT ((CVD_BASE_ADD+0x09)<<2)
  1742. #define BRIGHTNESS_BIT 0
  1743. #define BRIGHTNESS_WID 8
  1744. #define CVD2_CHROMA_SATURATION_ADJUSTMENT ((CVD_BASE_ADD+0x0A)<<2)
  1745. #define SATURATION_BIT 0
  1746. #define SATURATION_WID 8
  1747. #define CVD2_CHROMA_HUE_PHASE_ADJUSTMENT ((CVD_BASE_ADD+0x0B)<<2)
  1748. #define HUE_BIT 0
  1749. #define HUE_WID 8
  1750. #define CVD2_CHROMA_AGC ((CVD_BASE_ADD+0x0C)<<2)
  1751. #define CAGC_BIT 0
  1752. #define CAGC_WID 8
  1753. #define CVD2_CHROMA_KILL ((CVD_BASE_ADD+0x0D)<<2)
  1754. #define USER_CKILL_MODE_BIT 6
  1755. #define USER_CKILL_MODE_WID 2
  1756. #define VBI_CKILL_BIT 5
  1757. #define VBI_CKILL_WID 1
  1758. #define HLOCK_CKILL_BIT 4
  1759. #define HLOCK_CKILL_WID 1
  1760. #define PAL60_MODE_BIT 0
  1761. #define PAL60_MODE_WID 1
  1762. #define CVD2_NON_STANDARD_SIGNAL_THRESHOLD ((CVD_BASE_ADD+0x0E)<<2)
  1763. #define VNON_STD_TH_BIT 6
  1764. #define VNON_STD_TH_WID 2
  1765. #define HNON_STD_TH_BIT 0
  1766. #define HNON_STD_TH_WID 6
  1767. #define CVD2_CONTROL0F ((CVD_BASE_ADD+0x0F)<<2)
  1768. #define NSTD_HYSIS_BIT 6
  1769. #define NSTD_HYSIS_WID 2
  1770. #define DISABLE_CLAMP_ON_VS_BIT 5
  1771. #define DISABLE_CLAMP_ON_VS_WID 1
  1772. #define BYPASS_BIT 4
  1773. #define BYPASS_WID 1
  1774. #define NOBURST_CKILL_BIT 0
  1775. #define NOBURST_CKILL_WID 1
  1776. #define CVD2_AGC_PEAK_NOMINAL ((CVD_BASE_ADD+0x10)<<2)
  1777. #define AGC_PEAK_NOMINAL_BIT 0
  1778. #define AGC_PEAK_NOMINAL_WID 7
  1779. #define CVD2_AGC_PEAK_AND_GATE_CONTROLS ((CVD_BASE_ADD+0x11)<<2)
  1780. #define AGC_PEAK_EN_BIT 3
  1781. #define AGC_PEAK_EN_WID 1
  1782. #define AGC_PEAK_CNTL_BIT 0
  1783. #define AGC_PEAK_CNTL_WID 3
  1784. #define CVD2_BLUE_SCREEN_Y ((CVD_BASE_ADD+0x12)<<2)
  1785. #define BLUE_SCREEN_Y_BIT 0
  1786. #define BLUE_SCREEN_Y_WID 8
  1787. #define CVD2_BLUE_SCREEN_CB ((CVD_BASE_ADD+0x13)<<2)
  1788. #define BLUE_SCREEN_CB_BIT 0
  1789. #define BLUE_SCREEN_CB_WID 8
  1790. #define CVD2_BLUE_SCREEN_CR ((CVD_BASE_ADD+0x14)<<2)
  1791. #define BLUE_SCREEN_CR_BIT 0
  1792. #define BLUE_SCREEN_CR_WID 8
  1793. #define CVD2_HDETECT_CLAMP_LEVEL ((CVD_BASE_ADD+0x15)<<2)
  1794. #define HDETECT_CLAMP_LVL_BIT 0
  1795. #define HDETECT_CLAMP_LVL_WID 8
  1796. #define CVD2_LOCK_COUNT ((CVD_BASE_ADD+0x16)<<2)
  1797. #define HLOCK_CNT_NOISY_MAX_BIT 4
  1798. #define HLOCK_CNT_NOISY_MAX_WID 4
  1799. #define HLOCK_CNT_CLEAN_MAX_BIT 0
  1800. #define HLOCK_CNT_CLEAN_MAX_WID 4
  1801. #define CVD2_H_LOOP_MAXSTATE ((CVD_BASE_ADD+0x17)<<2)
  1802. #define HLOCK_VS_MODE_BIT 6
  1803. #define HLOCK_VS_MODE_WID 2
  1804. #define HSTATE_FIXED_BIT 5
  1805. #define HSTATE_FIXED_WID 1
  1806. #define DISABLE_HFINE_BIT 4
  1807. #define DISABLE_HFINE_WID 1
  1808. #define HSTATE_UNLOCKED_BIT 3
  1809. #define HSTATE_UNLOCKED_WID 1
  1810. #define HSTATE_MAX_BIT 0
  1811. #define HSTATE_MAX_WID 3
  1812. #define CVD2_CHROMA_DTO_INCREMENT_31_24 ((CVD_BASE_ADD+0x18)<<2)
  1813. #define CDTO_INC_31_24_BIT 0
  1814. #define CDTO_INC_31_24_WID 8
  1815. #define CVD2_CHROMA_DTO_INCREMENT_23_16 ((CVD_BASE_ADD+0x19)<<2)
  1816. #define CDTO_INC_23_16_BIT 0
  1817. #define CDTO_INC_23_16_WID 8
  1818. #define CVD2_CHROMA_DTO_INCREMENT_15_8 ((CVD_BASE_ADD+0x1A)<<2)
  1819. #define CDTO_INC_15_8_BIT 0
  1820. #define CDTO_INC_15_8_WID 8
  1821. #define CVD2_CHROMA_DTO_INCREMENT_7_0 ((CVD_BASE_ADD+0x1B)<<2)
  1822. #define CDTO_INC_7_0_BIT 0
  1823. #define CDTO_INC_7_0_WID 8
  1824. #define CVD2_HSYNC_DTO_INCREMENT_31_24 ((CVD_BASE_ADD+0x1C)<<2)
  1825. #define HDTO_INC_31_24_BIT 0
  1826. #define HDTO_INC_31_24_WID 8
  1827. #define CVD2_HSYNC_DTO_INCREMENT_23_16 ((CVD_BASE_ADD+0x1D)<<2)
  1828. #define HDTO_INC_23_16_BIT 0
  1829. #define HDTO_INC_23_16_WID 8
  1830. #define CVD2_HSYNC_DTO_INCREMENT_15_8 ((CVD_BASE_ADD+0x1E)<<2)
  1831. #define HDTO_INC_15_8_BIT 0
  1832. #define HDTO_INC_15_8_WID 8
  1833. #define CVD2_HSYNC_DTO_INCREMENT_7_0 ((CVD_BASE_ADD+0x1F)<<2)
  1834. #define HDTO_INC_7_0_BIT 0
  1835. #define HDTO_INC_7_0_WID 8
  1836. #define CVD2_HSYNC_RISING_EDGE ((CVD_BASE_ADD+0x20)<<2)
  1837. #define HS_RISING_BIT 0
  1838. #define HS_RISING_WID 8
  1839. #define CVD2_HSYNC_PHASE_OFFSET ((CVD_BASE_ADD+0x21)<<2)
  1840. #define HS_PHASE_OFFSET_BIT 0
  1841. #define HS_PHASE_OFFSET_WID 8
  1842. #define CVD2_HSYNC_DETECT_WINDOW_START ((CVD_BASE_ADD+0x22)<<2)
  1843. #define HS_GATE_START_BIT 0
  1844. #define HS_GATE_START_WID 8
  1845. #define CVD2_HSYNC_DETECT_WINDOW_END ((CVD_BASE_ADD+0x23)<<2)
  1846. #define HS_GATE_END_BIT 0
  1847. #define HS_GATE_END_WID 8
  1848. #define CVD2_CLAMPAGC_CONTROL ((CVD_BASE_ADD+0x24)<<2)
  1849. #define HS_SIMILAR_BIT 7
  1850. #define HS_SIMILAR_WID 1
  1851. #define HS_LOW_BIT 6
  1852. #define HS_LOW_WID 1
  1853. #define HDETECT_NOISE_EN_BIT 5
  1854. #define HDETECT_NOISE_EN_WID 1
  1855. #define HFINE_LT_COARSE_BIT 4
  1856. #define HFINE_LT_COARSE_WID 1
  1857. #define HLPF_CLAMP_SEL_BIT 3
  1858. #define HLPF_CLAMP_SEL_WID 1
  1859. #define HLFP_CLAMP_NOISY_EN_BIT 2
  1860. #define HLFP_CLAMP_NOISY_EN_WID 1
  1861. #define HLPF_CLAMP_VBI_EN_BIT 1
  1862. #define HLPF_CLAMP_VBI_EN_WID 1
  1863. #define HLPF_CLAMP_EN_BIT 0
  1864. #define HLPF_CLAMP_EN_WID 1
  1865. #define CVD2_HSYNC_WIDTH_STATUS ((CVD_BASE_ADD+0x25)<<2)
  1866. #define STATUS_HS_WIDTH_BIT 0
  1867. #define STATUS_HS_WIDTH_WID 8
  1868. #define CVD2_HSYNC_RISING_EDGE_START ((CVD_BASE_ADD+0x26)<<2)
  1869. #define HS_RISING_AUTO_BIT 6
  1870. #define HS_RISING_AUTO_WID 2
  1871. #define HS_RISING_START_BIT 0
  1872. #define HS_RISING_START_WID 6
  1873. #define CVD2_HSYNC_RISING_EDGE_END ((CVD_BASE_ADD+0x27)<<2)
  1874. #define HS_RISING_END_BIT 0
  1875. #define HS_RISING_END_WID 8
  1876. #define CVD2_STATUS_BURST_MAGNITUDE_LSB ((CVD_BASE_ADD+0x28)<<2)
  1877. #define STATUS_BURST_MAG_LSB_BIT 0
  1878. #define STATUS_BURST_MAG_LSB_WID 8
  1879. #define CVD2_STATUS_BURST_MAGNITUDE_MSB ((CVD_BASE_ADD+0x29)<<2)
  1880. #define STATUS_BURST_MAG_MSB_BIT 0
  1881. #define STATUS_BURST_MAG_MSB_WID 8
  1882. #define CVD2_HSYNC_FILTER_GATE_START ((CVD_BASE_ADD+0x2A)<<2)
  1883. #define HBLANK_START_BIT 0
  1884. #define HBLANK_START_WID 8
  1885. #define CVD2_HSYNC_FILTER_GATE_END ((CVD_BASE_ADD+0x2B)<<2)
  1886. #define HBLANK_END_BIT 0
  1887. #define HBLANK_END_WID 8
  1888. #define CVD2_CHROMA_BURST_GATE_START ((CVD_BASE_ADD+0x2C)<<2)
  1889. #define BURST_GATE_START_BIT 0
  1890. #define BURST_GATE_START_WID 8
  1891. #define CVD2_CHROMA_BURST_GATE_END ((CVD_BASE_ADD+0x2D)<<2)
  1892. #define BURST_GATE_END_BIT 0
  1893. #define BURST_GATE_END_WID 8
  1894. #define CVD2_ACTIVE_VIDEO_HSTART ((CVD_BASE_ADD+0x2E)<<2)
  1895. #define HACTIVE_START_BIT 0
  1896. #define HACTIVE_START_WID 8
  1897. #define CVD2_ACTIVE_VIDEO_HWIDTH ((CVD_BASE_ADD+0x2F)<<2)
  1898. #define HACTIVE_WIDTH_BIT 0
  1899. #define HACTIVE_WIDTH_WID 8
  1900. #define CVD2_ACTIVE_VIDEO_VSTART ((CVD_BASE_ADD+0x30)<<2)
  1901. #define VACTIVE_START_BIT 0
  1902. #define VACTIVE_START_WID 8
  1903. #define CVD2_ACTIVE_VIDEO_VHEIGHT ((CVD_BASE_ADD+0x31)<<2)
  1904. #define VACTIVE_HEIGHT_BIT 0
  1905. #define VACTIVE_HEIGHT_WID 8
  1906. #define CVD2_VSYNC_H_LOCKOUT_START ((CVD_BASE_ADD+0x32)<<2)
  1907. #define VS_H_MIN_BIT 0
  1908. #define VS_H_MIN_WID 7
  1909. #define CVD2_VSYNC_H_LOCKOUT_END ((CVD_BASE_ADD+0x33)<<2)
  1910. #define VS_H_MAX_BIT 0
  1911. #define VS_H_MAX_WID 7
  1912. #define CVD2_VSYNC_AGC_LOCKOUT_START ((CVD_BASE_ADD+0x34)<<2)
  1913. #define VS_AGC_MIN_BIT 0
  1914. #define VS_AGC_MIN_WID 7
  1915. #define CVD2_VSYNC_AGC_LOCKOUT_END ((CVD_BASE_ADD+0x35)<<2)
  1916. #define VS_AGC_MAX_BIT 0
  1917. #define VS_AGC_MAX_WID 6
  1918. #define CVD2_VSYNC_VBI_LOCKOUT_START ((CVD_BASE_ADD+0x36)<<2)
  1919. #define VS_VBI_MIN_BIT 0
  1920. #define VS_VBI_MIN_WID 7
  1921. #define CVD2_VSYNC_VBI_LOCKOUT_END ((CVD_BASE_ADD+0x37)<<2)
  1922. #define VLOCK_WIDE_RANGE_BIT 7
  1923. #define VLOCK_WIDE_RANGE_WID 1
  1924. #define VS_VBI_MAX_BIT 0
  1925. #define VS_VBI_MAX_WID 7
  1926. #define CVD2_VSYNC_CNTL ((CVD_BASE_ADD+0x38)<<2)
  1927. #define PROSCAN_1FIELD_MODE_BIT 6
  1928. #define PROSCAN_1FIELD_MODE_WID 2
  1929. #define VS_CNTL_NOISY_BIT 5
  1930. #define VS_CNTL_NOISY_WID 1
  1931. #define VS_CNTL_FF_REW_BIT 4
  1932. #define VS_CNTL_FF_REW_WID 1
  1933. #define VS_CNTL_TRICK_BIT 3
  1934. #define VS_CNTL_TRICK_WID 1
  1935. #define VS_CNTL_VCR_BIT 2
  1936. #define VS_CNTL_VCR_WID 1
  1937. #define VS_CNTL_BIT 0
  1938. #define VS_CNTL_WID 2
  1939. #define CVD2_VSYNC_TIME_CONSTANT ((CVD_BASE_ADD+0x39)<<2)
  1940. #define FLD_POL_BIT 7
  1941. #define FLD_POL_WID 1
  1942. #define FLIP_FLD_BIT 6
  1943. #define FLIP_FLD_WID 1
  1944. #define VEVEN_DELAYED_BIT 5
  1945. #define VEVEN_DELAYED_WID 1
  1946. #define VODD_DELAYED_BIT 4
  1947. #define VODD_DELAYED_WID 1
  1948. #define FLD_DET_MODE_BIT 2
  1949. #define FLD_DET_MODE_WID 2
  1950. #define VLOOP_TC_BIT 0
  1951. #define VLOOP_TC_WID 2
  1952. #define CVD2_STATUS_REGISTER1 ((CVD_BASE_ADD+0x3A)<<2)
  1953. #define MV_COLOURSTRIPES_BIT 5
  1954. #define MV_COLOURSTRIPES_WID 3
  1955. #define MV_VBI_DETECTED_BIT 4
  1956. #define MV_VBI_DETECTED_WID 1
  1957. #define CHROMALOCK_BIT 3
  1958. #define CHROMALOCK_WID 1
  1959. #define VLOCK_BIT 2
  1960. #define VLOCK_WID 1
  1961. #define HLOCK_BIT 1
  1962. #define HLOCK_WID 1
  1963. #define NO_SIGNAL_BIT 0
  1964. #define NO_SIGNAL_WID 1
  1965. #define CVD2_STATUS_REGISTER2 ((CVD_BASE_ADD+0x3B)<<2)
  1966. #define STATUS_COMB3D_OFF_BIT 4
  1967. #define STATUS_COMB3D_OFF_WID 1
  1968. #define BKNWT_DETECTED_BIT 3
  1969. #define BKNWT_DETECTED_WID 1
  1970. #define VNON_STD_BIT 2
  1971. #define VNON_STD_WID 1
  1972. #define HNON_STD_BIT 1
  1973. #define HNON_STD_WID 1
  1974. #define PROSCAN_DETECTED_BIT 0
  1975. #define PROSCAN_DETECTED_WID 1
  1976. #define CVD2_STATUS_REGISTER3 ((CVD_BASE_ADD+0x3C)<<2)
  1977. #define VCR_REW_BIT 7
  1978. #define VCR_REW_WID 1
  1979. #define VCR_FF_BIT 6
  1980. #define VCR_FF_WID 1
  1981. #define VCR_TRICK_BIT 5
  1982. #define VCR_TRICK_WID 1
  1983. #define VCR_BIT 4
  1984. #define VCR_WID 1
  1985. #define NOISY_BIT 3
  1986. #define NOISY_WID 1
  1987. #define LINES625_DETECTED_BIT 2
  1988. #define LINES625_DETECTED_WID 1
  1989. #define SECAM_DETECTED_BIT 1
  1990. #define SECAM_DETECTED_WID 1
  1991. #define PAL_DETECTED_BIT 0
  1992. #define PAL_DETECTED_WID 1
  1993. #define CVD2_DEBUG_ANALOG ((CVD_BASE_ADD+0x3D)<<2)
  1994. #define MUXANALOGB_BIT 4
  1995. #define MUXANALOGB_WID 4
  1996. #define MUXANALOGA_BIT 0
  1997. #define MUXANALOGA_WID 4
  1998. #define CVD2_DEBUG_DIGITAL ((CVD_BASE_ADD+0x3E)<<2)
  1999. #define DBG_SYNCS_BIT 4
  2000. #define DBG_SYNCS_WID 1
  2001. #define MUXDIGITAL_BIT 0
  2002. #define MUXDIGITAL_WID 3
  2003. #define CVD2_RESET_REGISTER ((CVD_BASE_ADD+0x3F)<<2)
  2004. #define SOFT_RST_BIT 0
  2005. #define SOFT_RST_WID 1
  2006. #define CVD2_HSYNC_DTO_INC_STATUS_29_24 ((CVD_BASE_ADD+0x70)<<2)
  2007. #define STATUS_HDTO_INC_29_24_BIT 0
  2008. #define STATUS_HDTO_INC_29_24_WID 6
  2009. #define CVD2_HSYNC_DTO_INC_STATUS_23_16 ((CVD_BASE_ADD+0x71)<<2)
  2010. #define STATUS_HDTO_INC_23_16_BIT 0
  2011. #define STATUS_HDTO_INC_23_16_WID 8
  2012. #define CVD2_HSYNC_DTO_INC_STATUS_15_8 ((CVD_BASE_ADD+0x72)<<2)
  2013. #define STATUS_HDTO_INC_15_8_BIT 0
  2014. #define STATUS_HDTO_INC_15_8_WID 8
  2015. #define CVD2_HSYNC_DTO_INC_STATUS_7_0 ((CVD_BASE_ADD+0x73)<<2)
  2016. #define STATUS_HDTO_INC_7_0_BIT 0
  2017. #define STATUS_HDTO_INC_7_0_WID 8
  2018. #define CVD2_CHROMA_DTO_INC_STATUS_29_24 ((CVD_BASE_ADD+0x74)<<2)
  2019. #define STATUS_CDTO_INC_29_24_BIT 0
  2020. #define STATUS_CDTO_INC_29_24_WID 6
  2021. #define CVD2_CHROMA_DTO_INC_STATUS_23_16 ((CVD_BASE_ADD+0x75)<<2)
  2022. #define STATUS_CDTO_INC_23_16_BIT 0
  2023. #define STATUS_CDTO_INC_23_16_WID 8
  2024. #define CVD2_CHROMA_DTO_INC_STATUS_15_8 ((CVD_BASE_ADD+0x76)<<2)
  2025. #define STATUS_CDTO_INC_15_8_BIT 0
  2026. #define STATUS_CDTO_INC_15_8_WID 8
  2027. #define CVD2_CHROMA_DTO_INC_STATUS_7_0 ((CVD_BASE_ADD+0x77)<<2)
  2028. #define STATUS_CDTO_INC_7_0_BIT 0
  2029. #define STATUS_CDTO_INC_7_0_WID 8
  2030. #define CVD2_AGC_GAIN_STATUS_11_8 ((CVD_BASE_ADD+0x78)<<2)
  2031. #define AGC_GAIN_11_8_BIT 0
  2032. #define AGC_GAIN_11_8_WID 4
  2033. #define CVD2_AGC_GAIN_STATUS_7_0 ((CVD_BASE_ADD+0x79)<<2)
  2034. #define AGC_GAIN_7_0_BIT 0
  2035. #define AGC_GAIN_7_0_WID 8
  2036. #define CVD2_CHROMA_MAGNITUDE_STATUS ((CVD_BASE_ADD+0x7A)<<2)
  2037. #define STATUS_CMAG_BIT 0
  2038. #define STATUS_CMAG_WID 8
  2039. #define CVD2_CHROMA_GAIN_STATUS_13_8 ((CVD_BASE_ADD+0x7B)<<2)
  2040. #define STATUS_CGAIN_13_8_BIT 0
  2041. #define STATUS_CGAIN_13_8_WID 6
  2042. #define CVD2_CHROMA_GAIN_STATUS_7_0 ((CVD_BASE_ADD+0x7C)<<2)
  2043. #define STATUS_CGAIN_7_0_BIT 0
  2044. #define STATUS_CGAIN_7_0_WID 8
  2045. #define CVD2_CORDIC_FREQUENCY_STATUS ((CVD_BASE_ADD+0x7D)<<2)
  2046. #define STATUS_CORDIQ_FRERQ_BIT 0
  2047. #define STATUS_CORDIQ_FRERQ_WID 8
  2048. #define CVD2_SYNC_HEIGHT_STATUS ((CVD_BASE_ADD+0x7E)<<2)
  2049. #define STATUS_SYNC_HEIGHT_BIT 0
  2050. #define STATUS_SYNC_HEIGHT_WID 8
  2051. #define CVD2_SYNC_NOISE_STATUS ((CVD_BASE_ADD+0x7F)<<2)
  2052. #define STATUS_NOISE_BIT 0
  2053. #define STATUS_NOISE_WID 8
  2054. #define CVD2_COMB_FILTER_THRESHOLD1 ((CVD_BASE_ADD+0x80)<<2)
  2055. #define SECAM_YBW_BIT 6
  2056. #define SECAM_YBW_WID 2
  2057. #define PEAK_RANGE_BIT 4
  2058. #define PEAK_RANGE_WID 2
  2059. #define PEAK_GAIN_BIT 1
  2060. #define PEAK_GAIN_WID 3
  2061. #define PEAK_EN_BIT 0
  2062. #define PEAK_EN_WID 1
  2063. #define CVD2_COMB_FILTER_CONFIG ((CVD_BASE_ADD+0x82)<<2)
  2064. #define AUTO_SECAM_LVL_BIT 7
  2065. #define AUTO_SECAM_LVL_WID 1
  2066. #define SV_BF_BIT 6
  2067. #define SV_BF_WID 1
  2068. #define PALSW_LVL_BIT 0
  2069. #define PALSW_LVL_WID 2
  2070. #define CVD2_COMB_LOCK_CONFIG ((CVD_BASE_ADD+0x83)<<2)
  2071. #define LOSE_CHROMALOCK_CNT_BIT 4
  2072. #define LOSE_CHROMALOCK_CNT_WID 4
  2073. #define LOSE_CHROMALOCK_LVL_BIT 1
  2074. #define LOSE_CHROMALOCK_LVL_WID 3
  2075. #define LOSE_CHROMALOCK_CKILL_BIT 0
  2076. #define LOSE_CHROMALOCK_CKILL_WID 1
  2077. #define CVD2_COMB_LOCK_MODE ((CVD_BASE_ADD+0x84)<<2)
  2078. #define LOSE_CHROMALOCK_MODE_BIT 0
  2079. #define LOSE_CHROMALOCK_MODE_WID 2
  2080. #define CVD2_NONSTANDARD_SIGNAL_STATUS_10_8 ((CVD_BASE_ADD+0x85)<<2)
  2081. #define STATUS_NSTD_10_8_BIT 0
  2082. #define STATUS_NSTD_10_8_WID 3
  2083. #define CVD2_NONSTANDARD_SIGNAL_STATUS_7_0 ((CVD_BASE_ADD+0x86)<<2)
  2084. #define STATUS_NSTD_7_0_BIT 0
  2085. #define STATUS_NSTD_7_0_WID 8
  2086. #define CVD2_REG_87 ((CVD_BASE_ADD+0x87)<<2)
  2087. #define CDETECT_VFILTER_SEL_BIT 6
  2088. #define CDETECT_VFILTER_SEL_WID 2
  2089. #define CDETECT_HLOCK_SEL_BIT 4
  2090. #define CDETECT_HLOCK_SEL_WID 2
  2091. #define FORCE_BW_BIT 3
  2092. #define FORCE_BW_WID 1
  2093. #define HSTATE_EN_SEL_BIT 2
  2094. #define HSTATE_EN_SEL_WID 1
  2095. #define HDSW_SEL_BIT 0
  2096. #define HDSW_SEL_WID 2
  2097. #define CVD2_COLORSTRIPE_DETECTION_CONTROL ((CVD_BASE_ADD+0x88)<<2)
  2098. #define CSTRIPE_DET_CONT_2_BIT 2
  2099. #define CSTRIPE_DET_CONT_2_WID 1
  2100. #define CSTRIPE_DET_CONT_1_BIT 1
  2101. #define CSTRIPE_DET_CONT_1_WID 1
  2102. #define CSTRIPE_DET_CONT_0_BIT 0
  2103. #define CSTRIPE_DET_CONT_0_WID 1
  2104. #define CVD2_CHROMA_LOOPFILTER_STATE ((CVD_BASE_ADD+0x8A)<<2)
  2105. #define CSTATE_BIT 1
  2106. #define CSTATE_WID 3
  2107. #define FIXED_CSTATE_BIT 0
  2108. #define FIXED_CSTATE_WID 1
  2109. #define CVD2_CHROMA_HRESAMPLER_CONTROL ((CVD_BASE_ADD+0x8B)<<2)
  2110. #define HFINE_VCR_TRICK_EN_BIT 5
  2111. #define HFINE_VCR_TRICK_EN_WID 1
  2112. #define HFINE_VCR_EN_BIT 4
  2113. #define HFINE_VCR_EN_WID 1
  2114. #define HRESAMPLER_2UP_BIT 0
  2115. #define HRESAMPLER_2UP_WID 1
  2116. #define CVD2_CHARGE_PUMP_DELAY_CONTROL ((CVD_BASE_ADD+0x8D)<<2)
  2117. #define CPUMP_DLY_EN_BIT 7
  2118. #define CPUMP_DLY_EN_WID 1
  2119. #define CPUMP_ADJ_POL_BIT 6
  2120. #define CPUMP_ADJ_POL_WID 1
  2121. #define CPUMP_ADJ_DLY_BIT 0
  2122. #define CPUMP_ADJ_DLY_WID 6
  2123. #define CVD2_CHARGE_PUMP_ADJUSTMENT ((CVD_BASE_ADD+0x8E)<<2)
  2124. #define CPUMP_ADJ_BIT 0
  2125. #define CPUMP_ADJ_WID 8
  2126. #define CVD2_CHARGE_PUMP_DELAY ((CVD_BASE_ADD+0x8F)<<2)
  2127. #define CPUMP_DLY_BIT 0
  2128. #define CPUMP_DLY_WID 8
  2129. #define CVD2_MACROVISION_SELECTION ((CVD_BASE_ADD+0x90)<<2)
  2130. #define MV_COLOURSTRIPES_SEL_BIT 1
  2131. #define MV_COLOURSTRIPES_SEL_WID 1
  2132. #define MV_VBI_SEL_BIT 0
  2133. #define MV_VBI_SEL_WID 1
  2134. #define CVD2_CPUMP_KILL ((CVD_BASE_ADD+0x91)<<2)
  2135. #define CPUMP_KILL_CR_BIT 2
  2136. #define CPUMP_KILL_CR_WID 1
  2137. #define CPUMP_KILL_CB_BIT 1
  2138. #define CPUMP_KILL_CB_WID 1
  2139. #define CPUMP_KILL_Y_BIT 0
  2140. #define CPUMP_KILL_Y_WID 1
  2141. #define CVD2_CVBS_Y_DELAY ((CVD_BASE_ADD+0x92)<<2)
  2142. #define CVBS_Y_DLY_BIT 0
  2143. #define CVBS_Y_DLY_WID 5
  2144. #define CVD2_REG_93 ((CVD_BASE_ADD+0x93)<<2)
  2145. #define AML_TIMER_EN_BIT 31
  2146. #define AML_TIMER_EN_WID 1
  2147. #define AML_SOFT_RST_BIT 30
  2148. #define AML_SOFT_RST_WID 1
  2149. #define AML_TIMER_BIT 24
  2150. #define AML_TIMER_WID 6
  2151. #define AML_ADDR_OFFSET_BIT 0
  2152. #define AML_ADDR_OFFSET_WID 23
  2153. #define CVD2_REG_94 ((CVD_BASE_ADD+0x94)<<2)
  2154. #define MEM_BIST_SEL_BIT 31
  2155. #define MEM_BIST_SEL_WID 1
  2156. #define EXT_RST_L_BIT 30
  2157. #define EXT_RST_L_WID 1
  2158. #define BIST_INC_BIT 24
  2159. #define BIST_INC_WID 6
  2160. #define BIST_SOFT_RST_BIT 23
  2161. #define BIST_SOFT_RST_WID 1
  2162. #define PATCH4WAITINI_BIT 16
  2163. #define PATCH4WAITINI_WID 1
  2164. #define AMLOGIC_HOLD_BIT 8
  2165. #define AMLOGIC_HOLD_WID 7
  2166. #define AML_TH_BIT 0
  2167. #define AML_TH_WID 5
  2168. #define CVD2_REG_95 ((CVD_BASE_ADD+0x95)<<2)
  2169. #define MCLKCHECK_ERR_BIT 24
  2170. #define MCLKCHECK_ERR_WID 7
  2171. #define ERR_WARNING_BIT 18
  2172. #define ERR_WARNING_WID 5
  2173. #define SUBID_FULLWR_BIT 16
  2174. #define SUBID_FULLWR_WID 1
  2175. #define SUBID_EMPTYRD_BIT 15
  2176. #define SUBID_EMPTYRD_WID 1
  2177. #define FB_RD_WARNING_BIT 9
  2178. #define FB_RD_WARNING_WID 6
  2179. #define WARNING_3D_AML_REG_NEW_BIT 0
  2180. #define WARNING_3D_AML_REG_NEW_WID 9
  2181. #define CVD2_REG_96 ((CVD_BASE_ADD+0x96)<<2)
  2182. #define AML_3D_ADDR_OFFSET_BIT 0
  2183. #define AML_3D_ADDR_OFFSET_WID 32
  2184. #define CVD2_CHARGE_PUMP_AUTO_CONTROL ((CVD_BASE_ADD+0xA0)<<2)
  2185. #define CPUMP_NOISY_FILTER_EN_BIT 7
  2186. #define CPUMP_NOISY_FILTER_EN_WID 1
  2187. #define CPUMP_AUTO_STIP_NOBP_BIT 6
  2188. #define CPUMP_AUTO_STIP_NOBP_WID 1
  2189. #define CPUMP_AUTO_STIP_UNLOCKED_BIT 5
  2190. #define CPUMP_AUTO_STIP_UNLOCKED_WID 1
  2191. #define CPUMP_AUTO_STIP_NO_SIGNAL_BIT 4
  2192. #define CPUMP_AUTO_STIP_NO_SIGNAL_WID 1
  2193. #define CPUMP_AUTO_STIP_NOISY_BIT 3
  2194. #define CPUMP_AUTO_STIP_NOISY_WID 1
  2195. #define CPUMP_AUTO_STIP_VACTIVE_BIT 2
  2196. #define CPUMP_AUTO_STIP_VACTIVE_WID 1
  2197. #define CPUMP_AUTO_STIP_MODE_BIT 0
  2198. #define CPUMP_AUTO_STIP_MODE_WID 2
  2199. #define CVD2_CHARGE_PUMP_FILTER_CONTROL ((CVD_BASE_ADD+0xA1)<<2)
  2200. #define CPUMP_VS_BLANK_FILTER_BIT 7
  2201. #define CPUMP_VS_BLANK_FILTER_WID 1
  2202. #define CPUMP_VS_SYNCMID_FILTER_BIT 6
  2203. #define CPUMP_VS_SYNCMID_FILTER_WID 1
  2204. #define CPUMP_VS_MODE_BIT 4
  2205. #define CPUMP_VS_MODE_WID 2
  2206. #define CPUMP_ACCUM_MODE_BIT 3
  2207. #define CPUMP_ACCUM_MODE_WID 1
  2208. #define CPUMP_FIXED_SYNCMID_BIT 2
  2209. #define CPUMP_FIXED_SYNCMID_WID 1
  2210. #define CPUMP_LVL_FILTER_GAIN_BIT 0
  2211. #define CPUMP_LVL_FILTER_GAIN_WID 2
  2212. #define CVD2_CHARGE_PUMP_UP_MAX ((CVD_BASE_ADD+0xA2)<<2)
  2213. #define CPUMP_UP_MAX_BIT 0
  2214. #define CPUMP_UP_MAX_WID 7
  2215. #define CVD2_CHARGE_PUMP_DN_MAX ((CVD_BASE_ADD+0xA3)<<2)
  2216. #define CPUMP_DN_MAX_BIT 0
  2217. #define CPUMP_DN_MAX_WID 7
  2218. #define CVD2_CHARGE_PUMP_UP_DIFF_MAX ((CVD_BASE_ADD+0xA4)<<2)
  2219. #define CPUMP_DIFF_SIGNAL_ONLY_BIT 7
  2220. #define CPUMP_DIFF_SIGNAL_ONLY_WID 1
  2221. #define CPUMP_UP_DIFF_MAX_BIT 0
  2222. #define CPUMP_UP_DIFF_MAX_WID 7
  2223. #define CVD2_CHARGE_PUMP_DN_DIFF_MAX ((CVD_BASE_ADD+0xA5)<<2)
  2224. #define CPUMP_DIFF_NOISY_ONLY_BIT 7
  2225. #define CPUMP_DIFF_NOISY_ONLY_WID 1
  2226. #define CPUMP_DN_DIFF_MAX_BIT 0
  2227. #define CPUMP_DN_DIFF_MAX_WID 7
  2228. #define CVD2_CHARGE_PUMP_Y_OVERRIDE ((CVD_BASE_ADD+0xA6)<<2)
  2229. #define CPUMP_Y_OVERRIDE_BIT 0
  2230. #define CPUMP_Y_OVERRIDE_WID 8
  2231. #define CVD2_CHARGE_PUMP_PB_OVERRIDE ((CVD_BASE_ADD+0xA7)<<2)
  2232. #define CPUMP_PB_OVERRIDE_BIT 0
  2233. #define CPUMP_PB_OVERRIDE_WID 8
  2234. #define CVD2_CHARGE_PUMP_PR_OVERRIDE ((CVD_BASE_ADD+0xA8)<<2)
  2235. #define CPUMP_PR_OVERRIDE_BIT 0
  2236. #define CPUMP_PR_OVERRIDE_WID 8
  2237. #define CVD2_DR_FREQ_11_8 ((CVD_BASE_ADD+0xA9)<<2)
  2238. #define DR_FREQ_11_8_BIT 0
  2239. #define DR_FREQ_11_8_WID 4
  2240. #define CVD2_DR_FREQ_7_0 ((CVD_BASE_ADD+0xAA)<<2)
  2241. #define DR_FREQ_7_0_BIT 0
  2242. #define DR_FREQ_7_0_WID 8
  2243. #define CVD2_DB_FREQ_11_8 ((CVD_BASE_ADD+0xAB)<<2)
  2244. #define DB_FREQ_11_8_BIT 0
  2245. #define DB_FREQ_11_8_WID 4
  2246. #define CVD2_DB_FREQ_7_0 ((CVD_BASE_ADD+0xAC)<<2)
  2247. #define DB_FREQ_7_0_BIT 0
  2248. #define DB_FREQ_7_0_WID 8
  2249. #define CVD2_2DCOMB_VCHROMA_TH ((CVD_BASE_ADD+0xAE)<<2)
  2250. #define VACTIVITY_EN_BIT 7
  2251. #define VACTIVITY_EN_WID 1
  2252. #define VACTIVE_ON2FRAME_BIT 6
  2253. #define VACTIVE_ON2FRAME_WID 1
  2254. #define VACTIVITY_TH_BIT 0
  2255. #define VACTIVITY_TH_WID 6
  2256. #define CVD2_2DCOMB_NOISE_TH ((CVD_BASE_ADD+0xAF)<<2)
  2257. #define COMB_NOISE_TH_EN_BIT 7
  2258. #define COMB_NOISE_TH_EN_WID 1
  2259. #define COMB_NOISE_TH_BIT 0
  2260. #define COMB_NOISE_TH_WID 7
  2261. #define CVD2_REG_B0 ((CVD_BASE_ADD+0xB0)<<2)
  2262. #define HORIZ_DIFF_CGAIN_BIT 6
  2263. #define HORIZ_DIFF_CGAIN_WID 2
  2264. #define HORIZ_DIFF_YGAIN_BIT 4
  2265. #define HORIZ_DIFF_YGAIN_WID 2
  2266. #define CHROMA_VDIFF_GAIN_BIT 2
  2267. #define CHROMA_VDIFF_GAIN_WID 2
  2268. #define LOWFREQ_VDIFF_GAIN_BIT 0
  2269. #define LOWFREQ_VDIFF_GAIN_WID 2
  2270. #define CVD2_3DCOMB_FILTER ((CVD_BASE_ADD+0xB1)<<2)
  2271. #define VADAP_BURST_NOISE_TH_GAIN_BIT 6
  2272. #define VADAP_BURST_NOISE_TH_GAIN_WID 2
  2273. #define BURST_NOISE_TH_GAIN_BIT 4
  2274. #define BURST_NOISE_TH_GAIN_WID 2
  2275. #define C_NOISE_TH_GAIN_BIT 2
  2276. #define C_NOISE_TH_GAIN_WID 2
  2277. #define Y_NOISE_TH_GAIN_BIT 0
  2278. #define Y_NOISE_TH_GAIN_WID 2
  2279. #define CVD2_REG_B2 ((CVD_BASE_ADD+0xB2)<<2)
  2280. #define LBADRGEN_RST_BIT 7
  2281. #define LBADRGEN_RST_WID 1
  2282. #define COMB2D_ONLY_BIT 6
  2283. #define COMB2D_ONLY_WID 1
  2284. #define ADAPTIVE_CHROMA_MODE_BIT 3
  2285. #define ADAPTIVE_CHROMA_MODE_WID 2
  2286. #define DOT_SUPPRESS_MODE_BIT 1
  2287. #define DOT_SUPPRESS_MODE_WID 1
  2288. #define MOTION_MODE_BIT 0
  2289. #define MOTION_MODE_WID 2
  2290. #define CVD2_2DCOMB_ADAPTIVE_GAIN_CONTROL ((CVD_BASE_ADD+0xB3)<<2)
  2291. #define PAL3DCOMB_VACTIVE_OFFSET_BIT 7
  2292. #define PAL3DCOMB_VACTIVE_OFFSET_WID 1
  2293. #define FB_SYNC_BIT 5
  2294. #define FB_SYNC_WID 2
  2295. #define FB_HOLD_BIT 4
  2296. #define FB_HOLD_WID 1
  2297. #define FB_CTL_BIT 3
  2298. #define FB_CTL_WID 1
  2299. #define FLD_LATENCY_BIT 0
  2300. #define FLD_LATENCY_WID 3
  2301. #define CVD2_MOTION_DETECTOR_NOISE_TH ((CVD_BASE_ADD+0xB4)<<2)
  2302. #define MD_NOISE_TH_EN_BIT 7
  2303. #define MD_NOISE_TH_EN_WID 1
  2304. #define MD_NOISE_TH_BIT 0
  2305. #define MD_NOISE_TH_WID 7
  2306. #define CVD2_CHROMA_EDGE_ENHANCEMENT ((CVD_BASE_ADD+0xB5)<<2)
  2307. #define SCHROMA_PEAK_EN_BIT 7
  2308. #define SCHROMA_PEAK_EN_WID 1
  2309. #define SCHROMA_CORING_EN_BIT 6
  2310. #define SCHROMA_CORING_EN_WID 1
  2311. #define SCHROMA_PEAK_BIT 4
  2312. #define SCHROMA_PEAK_WID 2
  2313. #define PCHROMA_PEAK_EN_BIT 3
  2314. #define PCHROMA_PEAK_EN_WID 1
  2315. #define PCHROMA_CORING_EN_BIT 2
  2316. #define PCHROMA_CORING_EN_WID 1
  2317. #define PCHROMA_PEAK_BIT 0
  2318. #define PCHROMA_PEAK_WID 2
  2319. #define CVD2_REG_B6 ((CVD_BASE_ADD+0xB6)<<2)
  2320. #define LDPAUSE_TH_BIT 4
  2321. #define LDPAUSE_TH_WID 4
  2322. #define VF_NSTD_EN_BIT 1
  2323. #define VF_NSTD_EN_WID 1
  2324. #define VCR_AUTO_SWT_EN_BIT 0
  2325. #define VCR_AUTO_SWT_EN_WID 1
  2326. #define CVD2_2D_COMB_NOTCH_GAIN ((CVD_BASE_ADD+0xB7)<<2)
  2327. #define NOTCH_GAIN_BIT 4
  2328. #define NOTCH_GAIN_WID 3
  2329. #define COMB_GAIN_BIT 0
  2330. #define COMB_GAIN_WID 3
  2331. #define CVD2_TEMPORAL_COMB_FILTER_GAIN ((CVD_BASE_ADD+0xB8)<<2)
  2332. #define COMB_CORING_BIT 4
  2333. #define COMB_CORING_WID 4
  2334. #define TCOMB_GAIN_BIT 0
  2335. #define TCOMB_GAIN_WID 3
  2336. #define CVD2_ACTIVE_VSTART_FRAME_BUFFER ((CVD_BASE_ADD+0xBA)<<2)
  2337. #define VACTIVE_FB_START_BIT 0
  2338. #define VACTIVE_FB_START_WID 8
  2339. #define CVD2_ACTIVE_VHEIGHT_FRAME_BUFFER ((CVD_BASE_ADD+0xBB)<<2)
  2340. #define VACTIVE_FB_HEIGHT_BIT 0
  2341. #define VACTIVE_FB_HEIGHT_WID 8
  2342. #define CVD2_HSYNC_PULSE_CONFIG ((CVD_BASE_ADD+0xBC)<<2)
  2343. #define HS_PULSE_WIDTH_BIT 0
  2344. #define HS_PULSE_WIDTH_WID 4
  2345. #define CVD2_CAGC_TIME_CONSTANT_CONTROL ((CVD_BASE_ADD+0xBD)<<2)
  2346. #define CAGC_TC_P_BIT 6
  2347. #define CAGC_TC_P_WID 2
  2348. #define CAGC_TC_IBIG_BIT 3
  2349. #define CAGC_TC_IBIG_WID 3
  2350. #define CAGC_TC_ISMALL_BIT 0
  2351. #define CAGC_TC_ISMALL_WID 3
  2352. #define CVD2_CAGC_CORING_FUNCTION_CONTROL ((CVD_BASE_ADD+0xBE)<<2)
  2353. #define CAGC_CORING_TH_BIT 5
  2354. #define CAGC_CORING_TH_WID 4
  2355. #define CAGC_UNITY_GAIN_BIT 4
  2356. #define CAGC_UNITY_GAIN_WID 1
  2357. #define CAGC_CORING_BIT 0
  2358. #define CAGC_CORING_WID 3
  2359. #define CVD2_NEW_DCRESTORE_CNTL ((CVD_BASE_ADD+0xC0)<<2)
  2360. #define DCRESTORE_NO_BAD_BP_BIT 7
  2361. #define DCRESTORE_NO_BAD_BP_WID 1
  2362. #define DCRESTORE_KILL_EN_BIT 6
  2363. #define DCRESTORE_KILL_EN_WID 1
  2364. #define DCRESTORE_BP_DLY_BIT 4
  2365. #define DCRESTORE_BP_DLY_WID 2
  2366. #define SYNCMID_NOBP_EN_BIT 3
  2367. #define SYNCMID_NOBP_EN_WID 1
  2368. #define SYNCMID_FILTER_EN_BIT 2
  2369. #define SYNCMID_FILTER_EN_WID 1
  2370. #define DCRESTORE_GAIN_BIT 0
  2371. #define DCRESTORE_GAIN_WID 2
  2372. #define CVD2_DCRESTORE_ACCUM_WIDTH ((CVD_BASE_ADD+0xC1)<<2)
  2373. #define DCRESTORE_LPF_EN_BIT 7
  2374. #define DCRESTORE_LPF_EN_WID 1
  2375. #define DCRESTORE_KILL_EN_NOISY_BIT 6
  2376. #define DCRESTORE_KILL_EN_NOISY_WID 1
  2377. #define DCRESTORE_ACCUM_WIDTH_BIT 0
  2378. #define DCRESTORE_ACCUM_WIDTH_WID 6
  2379. #define CVD2_MANUAL_GAIN_CONTROL ((CVD_BASE_ADD+0xC2)<<2)
  2380. #define HMGC_BIT 0
  2381. #define HMGC_WID 8
  2382. #define CVD2_BACKPORCH_KILL_THRESHOLD ((CVD_BASE_ADD+0xC3)<<2)
  2383. #define BP_KILL_TH_BIT 0
  2384. #define BP_KILL_TH_WID 8
  2385. #define CVD2_DCRESTORE_HSYNC_MIDPOINT ((CVD_BASE_ADD+0xC4)<<2)
  2386. #define DCRESTORE_HS_HMID_BIT 0
  2387. #define DCRESTORE_HS_HMID_WID 8
  2388. #define CVD2_SYNC_HEIGHT ((CVD_BASE_ADD+0xC5)<<2)
  2389. #define AUTO_MIN_SYNC_HEIGHT_BIT 7
  2390. #define AUTO_MIN_SYNC_HEIGHT_WID 1
  2391. #define MIN_SYNC_HEIGHT_BIT 0
  2392. #define MIN_SYNC_HEIGHT_WID 7
  2393. #define CVD2_VSYNC_SIGNAL_THRESHOLD ((CVD_BASE_ADD+0xC6)<<2)
  2394. #define VS_SIGNAL_TH_BIT 2
  2395. #define VS_SIGNAL_TH_WID 6
  2396. #define VS_SIGNAL_AUTO_TH_BIT 0
  2397. #define VS_SIGNAL_AUTO_TH_WID 2
  2398. #define CVD2_VSYNC_NO_SIGNAL_THRESHOLD ((CVD_BASE_ADD+0xC7)<<2)
  2399. #define VS_NO_SIGNAL_TH_BIT 0
  2400. #define VS_NO_SIGNAL_TH_WID 8
  2401. #define CVD2_VSYNC_CNTL2 ((CVD_BASE_ADD+0xC8)<<2)
  2402. #define VACTIVE_HALF_LINES_BIT 6
  2403. #define VACTIVE_HALF_LINES_WID 1
  2404. #define VDETECT_NOISE_EN_BIT 5
  2405. #define VDETECT_NOISE_EN_WID 1
  2406. #define VCRTRICK_PROSCAN_BIT 4
  2407. #define VCRTRICK_PROSCAN_WID 1
  2408. #define VEVEN_EARLY_DELAYED_BIT 3
  2409. #define VEVEN_EARLY_DELAYED_WID 1
  2410. #define VODD_EARLY_DELAYED_BIT 2
  2411. #define VODD_EARLY_DELAYED_WID 1
  2412. #define VFIELD_HOFFSET_FIXED_BIT 1
  2413. #define VFIELD_HOFFSET_FIXED_WID 1
  2414. #define VFIELD_HOFFSET_MSB_BIT 0
  2415. #define VFIELD_HOFFSET_MSB_WID 1
  2416. #define CVD2_VSYNC_POLARITY_CONTROL ((CVD_BASE_ADD+0xC9)<<2)
  2417. #define VFIELD_HOFFSET_LSB_BIT 0
  2418. #define VFIELD_HOFFSET_LSB_WID 8
  2419. #define CVD2_VBI_HDETECT_CNTL ((CVD_BASE_ADD+0xCA)<<2)
  2420. #define NO_HSYNCS_MODE_BIT 6
  2421. #define NO_HSYNCS_MODE_WID 2
  2422. #define MANY_HSYNCS_MODE_BIT 5
  2423. #define MANY_HSYNCS_MODE_WID 1
  2424. #define DUAL_HEDGE_DIS_BIT 4
  2425. #define DUAL_HEDGE_DIS_WID 1
  2426. #define DUAL_HEDGE_AUTO_WIDTH_BIT 3
  2427. #define DUAL_HEDGE_AUTO_WIDTH_WID 1
  2428. #define DUAL_FINE_HEDGE_VBI_BIT 2
  2429. #define DUAL_FINE_HEDGE_VBI_WID 1
  2430. #define DUAL_COARSE_HEDGE_VBI_BIT 0
  2431. #define DUAL_COARSE_HEDGE_VBI_WID 2
  2432. #define CVD2_MV_PSEUDO_SYNC_RISING_START ((CVD_BASE_ADD+0xCB)<<2)
  2433. #define VCR_STATE2_LONG_BIT 7
  2434. #define VCR_STATE2_LONG_WID 1
  2435. #define SLOW_HDSW_BIT 6
  2436. #define SLOW_HDSW_WID 1
  2437. #define HS_RISING_START_BIT 0
  2438. #define HS_RISING_START_WID 6
  2439. #define CVD2_MV_PSEUDO_SYNC_RISING_END ((CVD_BASE_ADD+0xCC)<<2)
  2440. #define NO_HSYNCS_WEAK_BIT 7
  2441. #define NO_HSYNCS_WEAK_WID 1
  2442. #define DISABLE_HDSW_WEAK_BIT 6
  2443. #define DISABLE_HDSW_WEAK_WID 1
  2444. #define CVD2_MV_HS_RISING_END_BIT 0
  2445. #define CVD2_MV_HS_RISING_END_WID 6
  2446. #define CVD2_REG_CD ((CVD_BASE_ADD+0xCD)<<2)
  2447. #define VACTIVE_HDSW_MODE_BIT 6
  2448. #define VACTIVE_HDSW_MODE_WID 2
  2449. #define DISABLE_HDSW_MODE_BIT 4
  2450. #define DISABLE_HDSW_MODE_WID 2
  2451. #define HS_FALLING_FILTER_BIT 3
  2452. #define HS_FALLING_FILTER_WID 1
  2453. #define NO_HSYNCS_NOISY_BIT 2
  2454. #define NO_HSYNCS_NOISY_WID 1
  2455. #define HLOOP_RANGE_BIT 0
  2456. #define HLOOP_RANGE_WID 2
  2457. #define CVD2_BIG_HLUMA_TH ((CVD_BASE_ADD+0xCE)<<2)
  2458. #define MD_C_NOISE_TH_EN_BIT 7
  2459. #define MD_C_NOISE_TH_EN_WID 1
  2460. #define MD_C_NOISE_TH_BIT 0
  2461. #define MD_C_NOISE_TH_WID 7
  2462. #define CVD2_MOTION_DETECTOR_CONTROL ((CVD_BASE_ADD+0xD0)<<2)
  2463. #define MD_CF_ACTIVITY_EN_BIT 6
  2464. #define MD_CF_ACTIVITY_EN_WID 2
  2465. #define MD_HF_MAX_BIT 5
  2466. #define MD_HF_MAX_WID 1
  2467. #define MD_HF_SAD_BIT 3
  2468. #define MD_HF_SAD_WID 2
  2469. #define MD_LF_SAD_BIT 2
  2470. #define MD_LF_SAD_WID 1
  2471. #define MD_LF_SHIFT_BIT 0
  2472. #define MD_LF_SHIFT_WID 2
  2473. #define CVD2_MD_CF_LACTIVITY_LOW ((CVD_BASE_ADD+0xD1)<<2)
  2474. #define MD_CF_LACTIVITY_LOW_BIT 0
  2475. #define MD_CF_LACTIVITY_LOW_WID 8
  2476. #define CVD2_MD_CF_CACTIVITY_LOW ((CVD_BASE_ADD+0xD2)<<2)
  2477. #define MD_CF_CACTIVITY_LOW_BIT 0
  2478. #define MD_CF_CACTIVITY_LOW_WID 8
  2479. #define CVD2_MD_CF_LACTIVITY_HIGH ((CVD_BASE_ADD+0xD3)<<2)
  2480. #define MD_CF_LACTIVITY_HIGH_BIT 0
  2481. #define MD_CF_LACTIVITY_HIGH_WID 8
  2482. #define CVD2_MD_CF_CACTIVITY_HIGH ((CVD_BASE_ADD+0xD4)<<2)
  2483. #define MD_CF_CACTIVITY_HIGH_BIT 0
  2484. #define MD_CF_CACTIVITY_HIGH_WID 8
  2485. #define CVD2_MD_K_THRESHOLD ((CVD_BASE_ADD+0xD5)<<2)
  2486. #define MD_K_TH_BIT 0
  2487. #define MD_K_TH_WID 8
  2488. #define CVD2_CHROMA_LEVEL ((CVD_BASE_ADD+0xD6)<<2)
  2489. #define CHROMA_LVL_BIT 0
  2490. #define CHROMA_LVL_WID 8
  2491. #define CVD2_SPATIAL_LUMA_LEVEL ((CVD_BASE_ADD+0xD7)<<2)
  2492. #define SPATIAL_LUMA_LVL_BIT 0
  2493. #define SPATIAL_LUMA_LVL_WID 8
  2494. #define CVD2_SPATIAL_CHROMA_LEVEL ((CVD_BASE_ADD+0xD8)<<2)
  2495. #define HF_LUMA_CHROMA_OFFSET_BIT 0
  2496. #define HF_LUMA_CHROMA_OFFSET_WID 8
  2497. #define CVD2_TCOMB_CHROMA_LEVEL ((CVD_BASE_ADD+0xD9)<<2)
  2498. #define TCOMB_CHROMA_LVL_BIT 0
  2499. #define TCOMB_CHROMA_LVL_WID 8
  2500. #define CVD2_FMDLF_TH ((CVD_BASE_ADD+0xDA)<<2)
  2501. #define LF_LUMA_OFFSET_BIT 0
  2502. #define LF_LUMA_OFFSET_WID 8
  2503. #define CVD2_CHROMA_ACTIVITY_LEVEL ((CVD_BASE_ADD+0xDB)<<2)
  2504. #define CHROMA_ACTIVITY_LVL_BIT 0
  2505. #define CHROMA_ACTIVITY_LVL_WID 8
  2506. #define CVD2_SECAM_FREQ_OFFSET_RANGE ((CVD_BASE_ADD+0xDC)<<2)
  2507. #define FREQ_OFFSET_RANGE_BIT 0
  2508. #define FREQ_OFFSET_RANGE_WID 8
  2509. #define CVD2_SECAM_FLAG_THRESHOLD ((CVD_BASE_ADD+0xDE)<<2)
  2510. #define AVG_FREQ_RANGE_BIT 6
  2511. #define AVG_FREQ_RANGE_WID 2
  2512. #define ISSECAM_TH_BIT 0
  2513. #define ISSECAM_TH_WID 6
  2514. #define CVD2_3DCOMB_MOTION_STATUS_31_24 ((CVD_BASE_ADD+0xE0)<<2)
  2515. #define STATUS_COMB3D_MOTION_31_24_BIT 0
  2516. #define STATUS_COMB3D_MOTION_31_24_WID 8
  2517. #define CVD2_3DCOMB_MOTION_STATUS_23_16 ((CVD_BASE_ADD+0xE1)<<2)
  2518. #define STATUS_COMB3D_MOTION_23_16_BIT 0
  2519. #define STATUS_COMB3D_MOTION_23_16_WID 8
  2520. #define CVD2_3DCOMB_MOTION_STATUS_15_8 ((CVD_BASE_ADD+0xE2)<<2)
  2521. #define STATUS_COMB3D_MOTION_15_8_BIT 0
  2522. #define STATUS_COMB3D_MOTION_15_8_WID 8
  2523. #define CVD2_3DCOMB_MOTION_STATUS_7_0 ((CVD_BASE_ADD+0xE3)<<2)
  2524. #define STATUS_COMB3D_MOTION_7_0_BIT 0
  2525. #define STATUS_COMB3D_MOTION_7_0_WID 8
  2526. #define CVD2_HACTIVE_MD_START ((CVD_BASE_ADD+0xE4)<<2)
  2527. #define HACTIVE_MD_START_BIT 0
  2528. #define HACTIVE_MD_START_WID 8
  2529. #define CVD2_HACTIVE_MD_WIDTH ((CVD_BASE_ADD+0xE5)<<2)
  2530. #define HACTIVE_MD_WIDTH_BIT 0
  2531. #define HACTIVE_MD_WIDTH_WID 8
  2532. #define CVD2_REG_E6 ((CVD_BASE_ADD+0xE6)<<2)
  2533. #define STATUS_VLINES_BIT 0
  2534. #define STATUS_VLINES_WID 8
  2535. #define CVD2_MOTION_CONFIG ((CVD_BASE_ADD+0xE7)<<2)
  2536. #define MOTION_CONFIG_BIT 0
  2537. #define MOTION_CONFIG_WID 8
  2538. #define CVD2_CHROMA_BW_MOTION ((CVD_BASE_ADD+0xE8)<<2)
  2539. #define CHROMA_BW_MOTION_TH_BIT 0
  2540. #define CHROMA_BW_MOTION_TH_WID 8
  2541. #define CVD2_FLAT_LUMA_SHIFT ((CVD_BASE_ADD+0xE9)<<2)
  2542. #define FLAT_CHROMA_SHIFT_BIT 6
  2543. #define FLAT_CHROMA_SHIFT_WID 2
  2544. #define FLAT_LUMA_MODE_BIT 4
  2545. #define FLAT_LUMA_MODE_WID 2
  2546. #define STATUS_MOTION_MODE_BIT 2
  2547. #define STATUS_MOTION_MODE_WID 2
  2548. #define CHROMA_BW_MOTION_BIT 0
  2549. #define CHROMA_BW_MOTION_WID 2
  2550. #define CVD2_FRAME_MOTION_TH ((CVD_BASE_ADD+0xEA)<<2)
  2551. #define FRAME_MOTION_TH_BIT 0
  2552. #define FRAME_MOTION_TH_WID 8
  2553. #define CVD2_FLAT_LUMA_OFFSET ((CVD_BASE_ADD+0xEB)<<2)
  2554. #define FLAT_LUMA_OFFSET_BIT 0
  2555. #define FLAT_LUMA_OFFSET_WID 8
  2556. #define CVD2_FLAT_CHROMA_OFFSET ((CVD_BASE_ADD+0xEC)<<2)
  2557. #define FLAT_CHROMA_OFFSET_BIT 0
  2558. #define FLAT_CHROMA_OFFSET_WID 8
  2559. #define CVD2_CF_FLAT_MOTION_SHIFT ((CVD_BASE_ADD+0xED)<<2)
  2560. #define CF_FLAT_MOTION_SHIFT_BIT 2
  2561. #define CF_FLAT_MOTION_SHIFT_WID 2
  2562. #define MOTION_C_MODE_BIT 0
  2563. #define MOTION_C_MODE_WID 2
  2564. #define CVD2_MOTION_DEBUG ((CVD_BASE_ADD+0xEE)<<2)
  2565. #define MOTION_DEBUG_BIT 0
  2566. #define MOTION_DEBUG_WID 8
  2567. #define CVD2_PHASE_OFFSE_RANGE ((CVD_BASE_ADD+0xF0)<<2)
  2568. #define PHASE_OFFSET_RANGE_BIT 0
  2569. #define PHASE_OFFSET_RANGE_WID 8
  2570. #define CVD2_PAL_DETECTION_THRESHOLD ((CVD_BASE_ADD+0xF1)<<2)
  2571. #define PAL_DET_TH_BIT 0
  2572. #define PAL_DET_TH_WID 8
  2573. #define CVD2_CORDIC_FREQUENCY_GATE_START ((CVD_BASE_ADD+0xF2)<<2)
  2574. #define CORDIC_GATE_START_BIT 0
  2575. #define CORDIC_GATE_START_WID 8
  2576. #define CVD2_CORDIC_FREQUENCY_GATE_END ((CVD_BASE_ADD+0xF3)<<2)
  2577. #define CORDIC_GATE_END_BIT 0
  2578. #define CORDIC_GATE_END_WID 8
  2579. #define CVD2_ADC_CPUMP_SWAP ((CVD_BASE_ADD+0xF4)<<2)
  2580. #define PAL3TAP_ONLY_C_BIT 7
  2581. #define PAL3TAP_ONLY_C_WID 1
  2582. #define PAL3TAP_ONLY_Y_BIT 6
  2583. #define PAL3TAP_ONLY_Y_WID 1
  2584. #define ADC_CPUMP_SWAP_BIT 0
  2585. #define ADC_CPUMP_SWAP_WID 6
  2586. #define CVD2_COMB3D_CONFIG ((CVD_BASE_ADD+0xF9)<<2)
  2587. #define VBI_FIXGATE_EN_BIT 0
  2588. #define VBI_FIXGATE_EN_WID 1
  2589. #define CVD2_REG_FA ((CVD_BASE_ADD+0xFA)<<2)
  2590. #define VLINES_SEL_BIT 6
  2591. #define VLINES_SEL_WID 1
  2592. #define UV_FILTER_BYPASS_BIT 5
  2593. #define UV_FILTER_BYPASS_WID 1
  2594. #define ADC_CHROMA_FOR_TB_BIT 4
  2595. #define ADC_CHROMA_FOR_TB_WID 1
  2596. #define ADC_SV_CHROMA_SEL_BIT 3
  2597. #define ADC_SV_CHROMA_SEL_WID 1
  2598. #define ADC_CV_CHROMA_SEL_BIT 0
  2599. #define ADC_CV_CHROMA_SEL_WID 2
  2600. #define CVD2_CAGC_GATE_START ((CVD_BASE_ADD+0xFB)<<2)
  2601. #define CAGC_GATE_START_BIT 0
  2602. #define CAGC_GATE_START_WID 8
  2603. #define CVD2_CAGC_GATE_END ((CVD_BASE_ADD+0xFC)<<2)
  2604. #define CAGC_GATE_END_BIT 0
  2605. #define CAGC_GATE_END_WID 8
  2606. #define CVD2_CKILL_LEVEL_15_8 ((CVD_BASE_ADD+0xFD)<<2)
  2607. #define CKILL_15_8_BIT 0
  2608. #define CKILL_15_8_WID 8
  2609. #define CVD2_CKILL_LEVEL_7_0 ((CVD_BASE_ADD+0xFE)<<2)
  2610. #define CKILL_7_0_BIT 0
  2611. #define CKILL_7_0_WID 8
  2612. #endif // _TVAFE_REG_H