atomfirmware.h 171 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632
  1. /****************************************************************************\
  2. *
  3. * File Name atomfirmware.h
  4. * Project This is an interface header file between atombios and OS GPU drivers for SoC15 products
  5. *
  6. * Description header file of general definitions for OS and pre-OS video drivers
  7. *
  8. * Copyright 2014 Advanced Micro Devices, Inc.
  9. *
  10. * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
  11. * and associated documentation files (the "Software"), to deal in the Software without restriction,
  12. * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
  13. * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
  14. * subject to the following conditions:
  15. *
  16. * The above copyright notice and this permission notice shall be included in all copies or substantial
  17. * portions of the Software.
  18. *
  19. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  22. * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
  23. * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  24. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  25. * OTHER DEALINGS IN THE SOFTWARE.
  26. *
  27. \****************************************************************************/
  28. /*IMPORTANT NOTES
  29. * If a change in VBIOS/Driver/Tool's interface is only needed for SoC15 and forward products, then the change is only needed in this atomfirmware.h header file.
  30. * If a change in VBIOS/Driver/Tool's interface is only needed for pre-SoC15 products, then the change is only needed in atombios.h header file.
  31. * If a change is needed for both pre and post SoC15 products, then the change has to be made separately and might be differently in both atomfirmware.h and atombios.h.
  32. */
  33. #ifndef _ATOMFIRMWARE_H_
  34. #define _ATOMFIRMWARE_H_
  35. enum atom_bios_header_version_def{
  36. ATOM_MAJOR_VERSION =0x0003,
  37. ATOM_MINOR_VERSION =0x0003,
  38. };
  39. #ifdef _H2INC
  40. #ifndef uint32_t
  41. typedef unsigned long uint32_t;
  42. #endif
  43. #ifndef uint16_t
  44. typedef unsigned short uint16_t;
  45. #endif
  46. #ifndef uint8_t
  47. typedef unsigned char uint8_t;
  48. #endif
  49. #endif
  50. enum atom_crtc_def{
  51. ATOM_CRTC1 =0,
  52. ATOM_CRTC2 =1,
  53. ATOM_CRTC3 =2,
  54. ATOM_CRTC4 =3,
  55. ATOM_CRTC5 =4,
  56. ATOM_CRTC6 =5,
  57. ATOM_CRTC_INVALID =0xff,
  58. };
  59. enum atom_ppll_def{
  60. ATOM_PPLL0 =2,
  61. ATOM_GCK_DFS =8,
  62. ATOM_FCH_CLK =9,
  63. ATOM_DP_DTO =11,
  64. ATOM_COMBOPHY_PLL0 =20,
  65. ATOM_COMBOPHY_PLL1 =21,
  66. ATOM_COMBOPHY_PLL2 =22,
  67. ATOM_COMBOPHY_PLL3 =23,
  68. ATOM_COMBOPHY_PLL4 =24,
  69. ATOM_COMBOPHY_PLL5 =25,
  70. ATOM_PPLL_INVALID =0xff,
  71. };
  72. // define ASIC internal encoder id ( bit vector ), used for CRTC_SourceSel
  73. enum atom_dig_def{
  74. ASIC_INT_DIG1_ENCODER_ID =0x03,
  75. ASIC_INT_DIG2_ENCODER_ID =0x09,
  76. ASIC_INT_DIG3_ENCODER_ID =0x0a,
  77. ASIC_INT_DIG4_ENCODER_ID =0x0b,
  78. ASIC_INT_DIG5_ENCODER_ID =0x0c,
  79. ASIC_INT_DIG6_ENCODER_ID =0x0d,
  80. ASIC_INT_DIG7_ENCODER_ID =0x0e,
  81. };
  82. //ucEncoderMode
  83. enum atom_encode_mode_def
  84. {
  85. ATOM_ENCODER_MODE_DP =0,
  86. ATOM_ENCODER_MODE_DP_SST =0,
  87. ATOM_ENCODER_MODE_LVDS =1,
  88. ATOM_ENCODER_MODE_DVI =2,
  89. ATOM_ENCODER_MODE_HDMI =3,
  90. ATOM_ENCODER_MODE_DP_AUDIO =5,
  91. ATOM_ENCODER_MODE_DP_MST =5,
  92. ATOM_ENCODER_MODE_CRT =15,
  93. ATOM_ENCODER_MODE_DVO =16,
  94. };
  95. enum atom_encoder_refclk_src_def{
  96. ENCODER_REFCLK_SRC_P1PLL =0,
  97. ENCODER_REFCLK_SRC_P2PLL =1,
  98. ENCODER_REFCLK_SRC_P3PLL =2,
  99. ENCODER_REFCLK_SRC_EXTCLK =3,
  100. ENCODER_REFCLK_SRC_INVALID =0xff,
  101. };
  102. enum atom_scaler_def{
  103. ATOM_SCALER_DISABLE =0, /*scaler bypass mode, auto-center & no replication*/
  104. ATOM_SCALER_CENTER =1, //For Fudo, it's bypass and auto-center & auto replication
  105. ATOM_SCALER_EXPANSION =2, /*scaler expansion by 2 tap alpha blending mode*/
  106. };
  107. enum atom_operation_def{
  108. ATOM_DISABLE = 0,
  109. ATOM_ENABLE = 1,
  110. ATOM_INIT = 7,
  111. ATOM_GET_STATUS = 8,
  112. };
  113. enum atom_embedded_display_op_def{
  114. ATOM_LCD_BL_OFF = 2,
  115. ATOM_LCD_BL_OM = 3,
  116. ATOM_LCD_BL_BRIGHTNESS_CONTROL = 4,
  117. ATOM_LCD_SELFTEST_START = 5,
  118. ATOM_LCD_SELFTEST_STOP = 6,
  119. };
  120. enum atom_spread_spectrum_mode{
  121. ATOM_SS_CENTER_OR_DOWN_MODE_MASK = 0x01,
  122. ATOM_SS_DOWN_SPREAD_MODE = 0x00,
  123. ATOM_SS_CENTRE_SPREAD_MODE = 0x01,
  124. ATOM_INT_OR_EXT_SS_MASK = 0x02,
  125. ATOM_INTERNAL_SS_MASK = 0x00,
  126. ATOM_EXTERNAL_SS_MASK = 0x02,
  127. };
  128. /* define panel bit per color */
  129. enum atom_panel_bit_per_color{
  130. PANEL_BPC_UNDEFINE =0x00,
  131. PANEL_6BIT_PER_COLOR =0x01,
  132. PANEL_8BIT_PER_COLOR =0x02,
  133. PANEL_10BIT_PER_COLOR =0x03,
  134. PANEL_12BIT_PER_COLOR =0x04,
  135. PANEL_16BIT_PER_COLOR =0x05,
  136. };
  137. //ucVoltageType
  138. enum atom_voltage_type
  139. {
  140. VOLTAGE_TYPE_VDDC = 1,
  141. VOLTAGE_TYPE_MVDDC = 2,
  142. VOLTAGE_TYPE_MVDDQ = 3,
  143. VOLTAGE_TYPE_VDDCI = 4,
  144. VOLTAGE_TYPE_VDDGFX = 5,
  145. VOLTAGE_TYPE_PCC = 6,
  146. VOLTAGE_TYPE_MVPP = 7,
  147. VOLTAGE_TYPE_LEDDPM = 8,
  148. VOLTAGE_TYPE_PCC_MVDD = 9,
  149. VOLTAGE_TYPE_PCIE_VDDC = 10,
  150. VOLTAGE_TYPE_PCIE_VDDR = 11,
  151. VOLTAGE_TYPE_GENERIC_I2C_1 = 0x11,
  152. VOLTAGE_TYPE_GENERIC_I2C_2 = 0x12,
  153. VOLTAGE_TYPE_GENERIC_I2C_3 = 0x13,
  154. VOLTAGE_TYPE_GENERIC_I2C_4 = 0x14,
  155. VOLTAGE_TYPE_GENERIC_I2C_5 = 0x15,
  156. VOLTAGE_TYPE_GENERIC_I2C_6 = 0x16,
  157. VOLTAGE_TYPE_GENERIC_I2C_7 = 0x17,
  158. VOLTAGE_TYPE_GENERIC_I2C_8 = 0x18,
  159. VOLTAGE_TYPE_GENERIC_I2C_9 = 0x19,
  160. VOLTAGE_TYPE_GENERIC_I2C_10 = 0x1A,
  161. };
  162. enum atom_dgpu_vram_type {
  163. ATOM_DGPU_VRAM_TYPE_GDDR5 = 0x50,
  164. ATOM_DGPU_VRAM_TYPE_HBM2 = 0x60,
  165. ATOM_DGPU_VRAM_TYPE_HBM2E = 0x61,
  166. ATOM_DGPU_VRAM_TYPE_GDDR6 = 0x70,
  167. ATOM_DGPU_VRAM_TYPE_HBM3 = 0x80,
  168. };
  169. enum atom_dp_vs_preemph_def{
  170. DP_VS_LEVEL0_PREEMPH_LEVEL0 = 0x00,
  171. DP_VS_LEVEL1_PREEMPH_LEVEL0 = 0x01,
  172. DP_VS_LEVEL2_PREEMPH_LEVEL0 = 0x02,
  173. DP_VS_LEVEL3_PREEMPH_LEVEL0 = 0x03,
  174. DP_VS_LEVEL0_PREEMPH_LEVEL1 = 0x08,
  175. DP_VS_LEVEL1_PREEMPH_LEVEL1 = 0x09,
  176. DP_VS_LEVEL2_PREEMPH_LEVEL1 = 0x0a,
  177. DP_VS_LEVEL0_PREEMPH_LEVEL2 = 0x10,
  178. DP_VS_LEVEL1_PREEMPH_LEVEL2 = 0x11,
  179. DP_VS_LEVEL0_PREEMPH_LEVEL3 = 0x18,
  180. };
  181. #define BIOS_ATOM_PREFIX "ATOMBIOS"
  182. #define BIOS_VERSION_PREFIX "ATOMBIOSBK-AMD"
  183. #define BIOS_STRING_LENGTH 43
  184. /*
  185. enum atom_string_def{
  186. asic_bus_type_pcie_string = "PCI_EXPRESS",
  187. atom_fire_gl_string = "FGL",
  188. atom_bios_string = "ATOM"
  189. };
  190. */
  191. #pragma pack(1) /* BIOS data must use byte aligment*/
  192. enum atombios_image_offset{
  193. OFFSET_TO_ATOM_ROM_HEADER_POINTER = 0x00000048,
  194. OFFSET_TO_ATOM_ROM_IMAGE_SIZE = 0x00000002,
  195. OFFSET_TO_ATOMBIOS_ASIC_BUS_MEM_TYPE = 0x94,
  196. MAXSIZE_OF_ATOMBIOS_ASIC_BUS_MEM_TYPE = 20, /*including the terminator 0x0!*/
  197. OFFSET_TO_GET_ATOMBIOS_NUMBER_OF_STRINGS = 0x2f,
  198. OFFSET_TO_GET_ATOMBIOS_STRING_START = 0x6e,
  199. OFFSET_TO_VBIOS_PART_NUMBER = 0x80,
  200. OFFSET_TO_VBIOS_DATE = 0x50,
  201. };
  202. /****************************************************************************
  203. * Common header for all tables (Data table, Command function).
  204. * Every table pointed in _ATOM_MASTER_DATA_TABLE has this common header.
  205. * And the pointer actually points to this header.
  206. ****************************************************************************/
  207. struct atom_common_table_header
  208. {
  209. uint16_t structuresize;
  210. uint8_t format_revision; //mainly used for a hw function, when the parser is not backward compatible
  211. uint8_t content_revision; //change it when a data table has a structure change, or a hw function has a input/output parameter change
  212. };
  213. /****************************************************************************
  214. * Structure stores the ROM header.
  215. ****************************************************************************/
  216. struct atom_rom_header_v2_2
  217. {
  218. struct atom_common_table_header table_header;
  219. uint8_t atom_bios_string[4]; //enum atom_string_def atom_bios_string; //Signature to distinguish between Atombios and non-atombios,
  220. uint16_t bios_segment_address;
  221. uint16_t protectedmodeoffset;
  222. uint16_t configfilenameoffset;
  223. uint16_t crc_block_offset;
  224. uint16_t vbios_bootupmessageoffset;
  225. uint16_t int10_offset;
  226. uint16_t pcibusdevinitcode;
  227. uint16_t iobaseaddress;
  228. uint16_t subsystem_vendor_id;
  229. uint16_t subsystem_id;
  230. uint16_t pci_info_offset;
  231. uint16_t masterhwfunction_offset; //Offest for SW to get all command function offsets, Don't change the position
  232. uint16_t masterdatatable_offset; //Offest for SW to get all data table offsets, Don't change the position
  233. uint16_t reserved;
  234. uint32_t pspdirtableoffset;
  235. };
  236. /*==============================hw function portion======================================================================*/
  237. /****************************************************************************
  238. * Structures used in Command.mtb, each function name is not given here since those function could change from time to time
  239. * The real functionality of each function is associated with the parameter structure version when defined
  240. * For all internal cmd function definitions, please reference to atomstruct.h
  241. ****************************************************************************/
  242. struct atom_master_list_of_command_functions_v2_1{
  243. uint16_t asic_init; //Function
  244. uint16_t cmd_function1; //used as an internal one
  245. uint16_t cmd_function2; //used as an internal one
  246. uint16_t cmd_function3; //used as an internal one
  247. uint16_t digxencodercontrol; //Function
  248. uint16_t cmd_function5; //used as an internal one
  249. uint16_t cmd_function6; //used as an internal one
  250. uint16_t cmd_function7; //used as an internal one
  251. uint16_t cmd_function8; //used as an internal one
  252. uint16_t cmd_function9; //used as an internal one
  253. uint16_t setengineclock; //Function
  254. uint16_t setmemoryclock; //Function
  255. uint16_t setpixelclock; //Function
  256. uint16_t enabledisppowergating; //Function
  257. uint16_t cmd_function14; //used as an internal one
  258. uint16_t cmd_function15; //used as an internal one
  259. uint16_t cmd_function16; //used as an internal one
  260. uint16_t cmd_function17; //used as an internal one
  261. uint16_t cmd_function18; //used as an internal one
  262. uint16_t cmd_function19; //used as an internal one
  263. uint16_t cmd_function20; //used as an internal one
  264. uint16_t cmd_function21; //used as an internal one
  265. uint16_t cmd_function22; //used as an internal one
  266. uint16_t cmd_function23; //used as an internal one
  267. uint16_t cmd_function24; //used as an internal one
  268. uint16_t cmd_function25; //used as an internal one
  269. uint16_t cmd_function26; //used as an internal one
  270. uint16_t cmd_function27; //used as an internal one
  271. uint16_t cmd_function28; //used as an internal one
  272. uint16_t cmd_function29; //used as an internal one
  273. uint16_t cmd_function30; //used as an internal one
  274. uint16_t cmd_function31; //used as an internal one
  275. uint16_t cmd_function32; //used as an internal one
  276. uint16_t cmd_function33; //used as an internal one
  277. uint16_t blankcrtc; //Function
  278. uint16_t enablecrtc; //Function
  279. uint16_t cmd_function36; //used as an internal one
  280. uint16_t cmd_function37; //used as an internal one
  281. uint16_t cmd_function38; //used as an internal one
  282. uint16_t cmd_function39; //used as an internal one
  283. uint16_t cmd_function40; //used as an internal one
  284. uint16_t getsmuclockinfo; //Function
  285. uint16_t selectcrtc_source; //Function
  286. uint16_t cmd_function43; //used as an internal one
  287. uint16_t cmd_function44; //used as an internal one
  288. uint16_t cmd_function45; //used as an internal one
  289. uint16_t setdceclock; //Function
  290. uint16_t getmemoryclock; //Function
  291. uint16_t getengineclock; //Function
  292. uint16_t setcrtc_usingdtdtiming; //Function
  293. uint16_t externalencodercontrol; //Function
  294. uint16_t cmd_function51; //used as an internal one
  295. uint16_t cmd_function52; //used as an internal one
  296. uint16_t cmd_function53; //used as an internal one
  297. uint16_t processi2cchanneltransaction;//Function
  298. uint16_t cmd_function55; //used as an internal one
  299. uint16_t cmd_function56; //used as an internal one
  300. uint16_t cmd_function57; //used as an internal one
  301. uint16_t cmd_function58; //used as an internal one
  302. uint16_t cmd_function59; //used as an internal one
  303. uint16_t computegpuclockparam; //Function
  304. uint16_t cmd_function61; //used as an internal one
  305. uint16_t cmd_function62; //used as an internal one
  306. uint16_t dynamicmemorysettings; //Function function
  307. uint16_t memorytraining; //Function function
  308. uint16_t cmd_function65; //used as an internal one
  309. uint16_t cmd_function66; //used as an internal one
  310. uint16_t setvoltage; //Function
  311. uint16_t cmd_function68; //used as an internal one
  312. uint16_t readefusevalue; //Function
  313. uint16_t cmd_function70; //used as an internal one
  314. uint16_t cmd_function71; //used as an internal one
  315. uint16_t cmd_function72; //used as an internal one
  316. uint16_t cmd_function73; //used as an internal one
  317. uint16_t cmd_function74; //used as an internal one
  318. uint16_t cmd_function75; //used as an internal one
  319. uint16_t dig1transmittercontrol; //Function
  320. uint16_t cmd_function77; //used as an internal one
  321. uint16_t processauxchanneltransaction;//Function
  322. uint16_t cmd_function79; //used as an internal one
  323. uint16_t getvoltageinfo; //Function
  324. };
  325. struct atom_master_command_function_v2_1
  326. {
  327. struct atom_common_table_header table_header;
  328. struct atom_master_list_of_command_functions_v2_1 listofcmdfunctions;
  329. };
  330. /****************************************************************************
  331. * Structures used in every command function
  332. ****************************************************************************/
  333. struct atom_function_attribute
  334. {
  335. uint16_t ws_in_bytes:8; //[7:0]=Size of workspace in Bytes (in multiple of a dword),
  336. uint16_t ps_in_bytes:7; //[14:8]=Size of parameter space in Bytes (multiple of a dword),
  337. uint16_t updated_by_util:1; //[15]=flag to indicate the function is updated by util
  338. };
  339. /****************************************************************************
  340. * Common header for all hw functions.
  341. * Every function pointed by _master_list_of_hw_function has this common header.
  342. * And the pointer actually points to this header.
  343. ****************************************************************************/
  344. struct atom_rom_hw_function_header
  345. {
  346. struct atom_common_table_header func_header;
  347. struct atom_function_attribute func_attrib;
  348. };
  349. /*==============================sw data table portion======================================================================*/
  350. /****************************************************************************
  351. * Structures used in data.mtb, each data table name is not given here since those data table could change from time to time
  352. * The real name of each table is given when its data structure version is defined
  353. ****************************************************************************/
  354. struct atom_master_list_of_data_tables_v2_1{
  355. uint16_t utilitypipeline; /* Offest for the utility to get parser info,Don't change this position!*/
  356. uint16_t multimedia_info;
  357. uint16_t smc_dpm_info;
  358. uint16_t sw_datatable3;
  359. uint16_t firmwareinfo; /* Shared by various SW components */
  360. uint16_t sw_datatable5;
  361. uint16_t lcd_info; /* Shared by various SW components */
  362. uint16_t sw_datatable7;
  363. uint16_t smu_info;
  364. uint16_t sw_datatable9;
  365. uint16_t sw_datatable10;
  366. uint16_t vram_usagebyfirmware; /* Shared by various SW components */
  367. uint16_t gpio_pin_lut; /* Shared by various SW components */
  368. uint16_t sw_datatable13;
  369. uint16_t gfx_info;
  370. uint16_t powerplayinfo; /* Shared by various SW components */
  371. uint16_t sw_datatable16;
  372. uint16_t sw_datatable17;
  373. uint16_t sw_datatable18;
  374. uint16_t sw_datatable19;
  375. uint16_t sw_datatable20;
  376. uint16_t sw_datatable21;
  377. uint16_t displayobjectinfo; /* Shared by various SW components */
  378. uint16_t indirectioaccess; /* used as an internal one */
  379. uint16_t umc_info; /* Shared by various SW components */
  380. uint16_t sw_datatable25;
  381. uint16_t sw_datatable26;
  382. uint16_t dce_info; /* Shared by various SW components */
  383. uint16_t vram_info; /* Shared by various SW components */
  384. uint16_t sw_datatable29;
  385. uint16_t integratedsysteminfo; /* Shared by various SW components */
  386. uint16_t asic_profiling_info; /* Shared by various SW components */
  387. uint16_t voltageobject_info; /* shared by various SW components */
  388. uint16_t sw_datatable33;
  389. uint16_t sw_datatable34;
  390. };
  391. struct atom_master_data_table_v2_1
  392. {
  393. struct atom_common_table_header table_header;
  394. struct atom_master_list_of_data_tables_v2_1 listOfdatatables;
  395. };
  396. struct atom_dtd_format
  397. {
  398. uint16_t pixclk;
  399. uint16_t h_active;
  400. uint16_t h_blanking_time;
  401. uint16_t v_active;
  402. uint16_t v_blanking_time;
  403. uint16_t h_sync_offset;
  404. uint16_t h_sync_width;
  405. uint16_t v_sync_offset;
  406. uint16_t v_syncwidth;
  407. uint16_t reserved;
  408. uint16_t reserved0;
  409. uint8_t h_border;
  410. uint8_t v_border;
  411. uint16_t miscinfo;
  412. uint8_t atom_mode_id;
  413. uint8_t refreshrate;
  414. };
  415. /* atom_dtd_format.modemiscinfo defintion */
  416. enum atom_dtd_format_modemiscinfo{
  417. ATOM_HSYNC_POLARITY = 0x0002,
  418. ATOM_VSYNC_POLARITY = 0x0004,
  419. ATOM_H_REPLICATIONBY2 = 0x0010,
  420. ATOM_V_REPLICATIONBY2 = 0x0020,
  421. ATOM_INTERLACE = 0x0080,
  422. ATOM_COMPOSITESYNC = 0x0040,
  423. };
  424. /* utilitypipeline
  425. * when format_revision==1 && content_revision==1, then this an info table for atomworks to use during debug session, no structure is associated with it.
  426. * the location of it can't change
  427. */
  428. /*
  429. ***************************************************************************
  430. Data Table firmwareinfo structure
  431. ***************************************************************************
  432. */
  433. struct atom_firmware_info_v3_1
  434. {
  435. struct atom_common_table_header table_header;
  436. uint32_t firmware_revision;
  437. uint32_t bootup_sclk_in10khz;
  438. uint32_t bootup_mclk_in10khz;
  439. uint32_t firmware_capability; // enum atombios_firmware_capability
  440. uint32_t main_call_parser_entry; /* direct address of main parser call in VBIOS binary. */
  441. uint32_t bios_scratch_reg_startaddr; // 1st bios scratch register dword address
  442. uint16_t bootup_vddc_mv;
  443. uint16_t bootup_vddci_mv;
  444. uint16_t bootup_mvddc_mv;
  445. uint16_t bootup_vddgfx_mv;
  446. uint8_t mem_module_id;
  447. uint8_t coolingsolution_id; /*0: Air cooling; 1: Liquid cooling ... */
  448. uint8_t reserved1[2];
  449. uint32_t mc_baseaddr_high;
  450. uint32_t mc_baseaddr_low;
  451. uint32_t reserved2[6];
  452. };
  453. /* Total 32bit cap indication */
  454. enum atombios_firmware_capability
  455. {
  456. ATOM_FIRMWARE_CAP_FIRMWARE_POSTED = 0x00000001,
  457. ATOM_FIRMWARE_CAP_GPU_VIRTUALIZATION = 0x00000002,
  458. ATOM_FIRMWARE_CAP_WMI_SUPPORT = 0x00000040,
  459. ATOM_FIRMWARE_CAP_HWEMU_ENABLE = 0x00000080,
  460. ATOM_FIRMWARE_CAP_HWEMU_UMC_CFG = 0x00000100,
  461. ATOM_FIRMWARE_CAP_SRAM_ECC = 0x00000200,
  462. ATOM_FIRMWARE_CAP_ENABLE_2STAGE_BIST_TRAINING = 0x00000400,
  463. ATOM_FIRMWARE_CAP_ENABLE_2ND_USB20PORT = 0x0008000,
  464. ATOM_FIRMWARE_CAP_DYNAMIC_BOOT_CFG_ENABLE = 0x0020000,
  465. };
  466. enum atom_cooling_solution_id{
  467. AIR_COOLING = 0x00,
  468. LIQUID_COOLING = 0x01
  469. };
  470. struct atom_firmware_info_v3_2 {
  471. struct atom_common_table_header table_header;
  472. uint32_t firmware_revision;
  473. uint32_t bootup_sclk_in10khz;
  474. uint32_t bootup_mclk_in10khz;
  475. uint32_t firmware_capability; // enum atombios_firmware_capability
  476. uint32_t main_call_parser_entry; /* direct address of main parser call in VBIOS binary. */
  477. uint32_t bios_scratch_reg_startaddr; // 1st bios scratch register dword address
  478. uint16_t bootup_vddc_mv;
  479. uint16_t bootup_vddci_mv;
  480. uint16_t bootup_mvddc_mv;
  481. uint16_t bootup_vddgfx_mv;
  482. uint8_t mem_module_id;
  483. uint8_t coolingsolution_id; /*0: Air cooling; 1: Liquid cooling ... */
  484. uint8_t reserved1[2];
  485. uint32_t mc_baseaddr_high;
  486. uint32_t mc_baseaddr_low;
  487. uint8_t board_i2c_feature_id; // enum of atom_board_i2c_feature_id_def
  488. uint8_t board_i2c_feature_gpio_id; // i2c id find in gpio_lut data table gpio_id
  489. uint8_t board_i2c_feature_slave_addr;
  490. uint8_t reserved3;
  491. uint16_t bootup_mvddq_mv;
  492. uint16_t bootup_mvpp_mv;
  493. uint32_t zfbstartaddrin16mb;
  494. uint32_t reserved2[3];
  495. };
  496. struct atom_firmware_info_v3_3
  497. {
  498. struct atom_common_table_header table_header;
  499. uint32_t firmware_revision;
  500. uint32_t bootup_sclk_in10khz;
  501. uint32_t bootup_mclk_in10khz;
  502. uint32_t firmware_capability; // enum atombios_firmware_capability
  503. uint32_t main_call_parser_entry; /* direct address of main parser call in VBIOS binary. */
  504. uint32_t bios_scratch_reg_startaddr; // 1st bios scratch register dword address
  505. uint16_t bootup_vddc_mv;
  506. uint16_t bootup_vddci_mv;
  507. uint16_t bootup_mvddc_mv;
  508. uint16_t bootup_vddgfx_mv;
  509. uint8_t mem_module_id;
  510. uint8_t coolingsolution_id; /*0: Air cooling; 1: Liquid cooling ... */
  511. uint8_t reserved1[2];
  512. uint32_t mc_baseaddr_high;
  513. uint32_t mc_baseaddr_low;
  514. uint8_t board_i2c_feature_id; // enum of atom_board_i2c_feature_id_def
  515. uint8_t board_i2c_feature_gpio_id; // i2c id find in gpio_lut data table gpio_id
  516. uint8_t board_i2c_feature_slave_addr;
  517. uint8_t reserved3;
  518. uint16_t bootup_mvddq_mv;
  519. uint16_t bootup_mvpp_mv;
  520. uint32_t zfbstartaddrin16mb;
  521. uint32_t pplib_pptable_id; // if pplib_pptable_id!=0, pplib get powerplay table inside driver instead of from VBIOS
  522. uint32_t reserved2[2];
  523. };
  524. struct atom_firmware_info_v3_4 {
  525. struct atom_common_table_header table_header;
  526. uint32_t firmware_revision;
  527. uint32_t bootup_sclk_in10khz;
  528. uint32_t bootup_mclk_in10khz;
  529. uint32_t firmware_capability; // enum atombios_firmware_capability
  530. uint32_t main_call_parser_entry; /* direct address of main parser call in VBIOS binary. */
  531. uint32_t bios_scratch_reg_startaddr; // 1st bios scratch register dword address
  532. uint16_t bootup_vddc_mv;
  533. uint16_t bootup_vddci_mv;
  534. uint16_t bootup_mvddc_mv;
  535. uint16_t bootup_vddgfx_mv;
  536. uint8_t mem_module_id;
  537. uint8_t coolingsolution_id; /*0: Air cooling; 1: Liquid cooling ... */
  538. uint8_t reserved1[2];
  539. uint32_t mc_baseaddr_high;
  540. uint32_t mc_baseaddr_low;
  541. uint8_t board_i2c_feature_id; // enum of atom_board_i2c_feature_id_def
  542. uint8_t board_i2c_feature_gpio_id; // i2c id find in gpio_lut data table gpio_id
  543. uint8_t board_i2c_feature_slave_addr;
  544. uint8_t ras_rom_i2c_slave_addr;
  545. uint16_t bootup_mvddq_mv;
  546. uint16_t bootup_mvpp_mv;
  547. uint32_t zfbstartaddrin16mb;
  548. uint32_t pplib_pptable_id; // if pplib_pptable_id!=0, pplib get powerplay table inside driver instead of from VBIOS
  549. uint32_t mvdd_ratio; // mvdd_raio = (real mvdd in power rail)*1000/(mvdd_output_from_svi2)
  550. uint16_t hw_bootup_vddgfx_mv; // hw default vddgfx voltage level decide by board strap
  551. uint16_t hw_bootup_vddc_mv; // hw default vddc voltage level decide by board strap
  552. uint16_t hw_bootup_mvddc_mv; // hw default mvddc voltage level decide by board strap
  553. uint16_t hw_bootup_vddci_mv; // hw default vddci voltage level decide by board strap
  554. uint32_t maco_pwrlimit_mw; // bomaco mode power limit in unit of m-watt
  555. uint32_t usb_pwrlimit_mw; // power limit when USB is enable in unit of m-watt
  556. uint32_t fw_reserved_size_in_kb; // VBIOS reserved extra fw size in unit of kb.
  557. uint32_t pspbl_init_done_reg_addr;
  558. uint32_t pspbl_init_done_value;
  559. uint32_t pspbl_init_done_check_timeout; // time out in unit of us when polling pspbl init done
  560. uint32_t reserved[2];
  561. };
  562. struct atom_firmware_info_v3_5 {
  563. struct atom_common_table_header table_header;
  564. uint32_t firmware_revision;
  565. uint32_t bootup_clk_reserved[2];
  566. uint32_t firmware_capability; // enum atombios_firmware_capability
  567. uint32_t fw_protect_region_size_in_kb; /* FW allocate a write protect region at top of FB. */
  568. uint32_t bios_scratch_reg_startaddr; // 1st bios scratch register dword address
  569. uint32_t bootup_voltage_reserved[2];
  570. uint8_t mem_module_id;
  571. uint8_t coolingsolution_id; /*0: Air cooling; 1: Liquid cooling ... */
  572. uint8_t hw_blt_mode; //0:HW_BLT_DMA_PIO_MODE; 1:HW_BLT_LITE_SDMA_MODE; 2:HW_BLT_PCI_IO_MODE
  573. uint8_t reserved1;
  574. uint32_t mc_baseaddr_high;
  575. uint32_t mc_baseaddr_low;
  576. uint8_t board_i2c_feature_id; // enum of atom_board_i2c_feature_id_def
  577. uint8_t board_i2c_feature_gpio_id; // i2c id find in gpio_lut data table gpio_id
  578. uint8_t board_i2c_feature_slave_addr;
  579. uint8_t ras_rom_i2c_slave_addr;
  580. uint32_t bootup_voltage_reserved1;
  581. uint32_t zfb_reserved;
  582. // if pplib_pptable_id!=0, pplib get powerplay table inside driver instead of from VBIOS
  583. uint32_t pplib_pptable_id;
  584. uint32_t hw_voltage_reserved[3];
  585. uint32_t maco_pwrlimit_mw; // bomaco mode power limit in unit of m-watt
  586. uint32_t usb_pwrlimit_mw; // power limit when USB is enable in unit of m-watt
  587. uint32_t fw_reserved_size_in_kb; // VBIOS reserved extra fw size in unit of kb.
  588. uint32_t pspbl_init_reserved[3];
  589. uint32_t spi_rom_size; // GPU spi rom size
  590. uint16_t support_dev_in_objinfo;
  591. uint16_t disp_phy_tunning_size;
  592. uint32_t reserved[16];
  593. };
  594. /*
  595. ***************************************************************************
  596. Data Table lcd_info structure
  597. ***************************************************************************
  598. */
  599. struct lcd_info_v2_1
  600. {
  601. struct atom_common_table_header table_header;
  602. struct atom_dtd_format lcd_timing;
  603. uint16_t backlight_pwm;
  604. uint16_t special_handle_cap;
  605. uint16_t panel_misc;
  606. uint16_t lvds_max_slink_pclk;
  607. uint16_t lvds_ss_percentage;
  608. uint16_t lvds_ss_rate_10hz;
  609. uint8_t pwr_on_digon_to_de; /*all pwr sequence numbers below are in uint of 4ms*/
  610. uint8_t pwr_on_de_to_vary_bl;
  611. uint8_t pwr_down_vary_bloff_to_de;
  612. uint8_t pwr_down_de_to_digoff;
  613. uint8_t pwr_off_delay;
  614. uint8_t pwr_on_vary_bl_to_blon;
  615. uint8_t pwr_down_bloff_to_vary_bloff;
  616. uint8_t panel_bpc;
  617. uint8_t dpcd_edp_config_cap;
  618. uint8_t dpcd_max_link_rate;
  619. uint8_t dpcd_max_lane_count;
  620. uint8_t dpcd_max_downspread;
  621. uint8_t min_allowed_bl_level;
  622. uint8_t max_allowed_bl_level;
  623. uint8_t bootup_bl_level;
  624. uint8_t dplvdsrxid;
  625. uint32_t reserved1[8];
  626. };
  627. /* lcd_info_v2_1.panel_misc defintion */
  628. enum atom_lcd_info_panel_misc{
  629. ATOM_PANEL_MISC_FPDI =0x0002,
  630. };
  631. //uceDPToLVDSRxId
  632. enum atom_lcd_info_dptolvds_rx_id
  633. {
  634. eDP_TO_LVDS_RX_DISABLE = 0x00, // no eDP->LVDS translator chip
  635. eDP_TO_LVDS_COMMON_ID = 0x01, // common eDP->LVDS translator chip without AMD SW init
  636. eDP_TO_LVDS_REALTEK_ID = 0x02, // Realtek tansaltor which require AMD SW init
  637. };
  638. /*
  639. ***************************************************************************
  640. Data Table gpio_pin_lut structure
  641. ***************************************************************************
  642. */
  643. struct atom_gpio_pin_assignment
  644. {
  645. uint32_t data_a_reg_index;
  646. uint8_t gpio_bitshift;
  647. uint8_t gpio_mask_bitshift;
  648. uint8_t gpio_id;
  649. uint8_t reserved;
  650. };
  651. /* atom_gpio_pin_assignment.gpio_id definition */
  652. enum atom_gpio_pin_assignment_gpio_id {
  653. I2C_HW_LANE_MUX =0x0f, /* only valid when bit7=1 */
  654. I2C_HW_ENGINE_ID_MASK =0x70, /* only valid when bit7=1 */
  655. I2C_HW_CAP =0x80, /*only when the I2C_HW_CAP is set, the pin ID is assigned to an I2C pin pair, otherwise, it's an generic GPIO pin */
  656. /* gpio_id pre-define id for multiple usage */
  657. /* GPIO use to control PCIE_VDDC in certain SLT board */
  658. PCIE_VDDC_CONTROL_GPIO_PINID = 56,
  659. /* if PP_AC_DC_SWITCH_GPIO_PINID in Gpio_Pin_LutTable, AC/DC swithing feature is enable */
  660. PP_AC_DC_SWITCH_GPIO_PINID = 60,
  661. /* VDDC_REGULATOR_VRHOT_GPIO_PINID in Gpio_Pin_LutTable, VRHot feature is enable */
  662. VDDC_VRHOT_GPIO_PINID = 61,
  663. /*if VDDC_PCC_GPIO_PINID in GPIO_LUTable, Peak Current Control feature is enabled */
  664. VDDC_PCC_GPIO_PINID = 62,
  665. /* Only used on certain SLT/PA board to allow utility to cut Efuse. */
  666. EFUSE_CUT_ENABLE_GPIO_PINID = 63,
  667. /* ucGPIO=DRAM_SELF_REFRESH_GPIO_PIND uses for memory self refresh (ucGPIO=0, DRAM self-refresh; ucGPIO= */
  668. DRAM_SELF_REFRESH_GPIO_PINID = 64,
  669. /* Thermal interrupt output->system thermal chip GPIO pin */
  670. THERMAL_INT_OUTPUT_GPIO_PINID =65,
  671. };
  672. struct atom_gpio_pin_lut_v2_1
  673. {
  674. struct atom_common_table_header table_header;
  675. /*the real number of this included in the structure is calcualted by using the (whole structure size - the header size)/size of atom_gpio_pin_lut */
  676. struct atom_gpio_pin_assignment gpio_pin[];
  677. };
  678. /*
  679. * VBIOS/PRE-OS always reserve a FB region at the top of frame buffer. driver should not write
  680. * access that region. driver can allocate their own reservation region as long as it does not
  681. * overlap firwmare's reservation region.
  682. * if (pre-NV1X) atom data table firmwareInfoTable version < 3.3:
  683. * in this case, atom data table vram_usagebyfirmwareTable version always <= 2.1
  684. * if VBIOS/UEFI GOP is posted:
  685. * VBIOS/UEFIGOP update used_by_firmware_in_kb = total reserved size by VBIOS
  686. * update start_address_in_kb = total_mem_size_in_kb - used_by_firmware_in_kb;
  687. * ( total_mem_size_in_kb = reg(CONFIG_MEMSIZE)<<10)
  688. * driver can allocate driver reservation region under firmware reservation,
  689. * used_by_driver_in_kb = driver reservation size
  690. * driver reservation start address = (start_address_in_kb - used_by_driver_in_kb)
  691. * Comment1[hchan]: There is only one reservation at the beginning of the FB reserved by
  692. * host driver. Host driver would overwrite the table with the following
  693. * used_by_firmware_in_kb = total reserved size for pf-vf info exchange and
  694. * set SRIOV_MSG_SHARE_RESERVATION mask start_address_in_kb = 0
  695. * else there is no VBIOS reservation region:
  696. * driver must allocate driver reservation region at top of FB.
  697. * driver set used_by_driver_in_kb = driver reservation size
  698. * driver reservation start address = (total_mem_size_in_kb - used_by_driver_in_kb)
  699. * same as Comment1
  700. * else (NV1X and after):
  701. * if VBIOS/UEFI GOP is posted:
  702. * VBIOS/UEFIGOP update:
  703. * used_by_firmware_in_kb = atom_firmware_Info_v3_3.fw_reserved_size_in_kb;
  704. * start_address_in_kb = total_mem_size_in_kb - used_by_firmware_in_kb;
  705. * (total_mem_size_in_kb = reg(CONFIG_MEMSIZE)<<10)
  706. * if vram_usagebyfirmwareTable version <= 2.1:
  707. * driver can allocate driver reservation region under firmware reservation,
  708. * driver set used_by_driver_in_kb = driver reservation size
  709. * driver reservation start address = start_address_in_kb - used_by_driver_in_kb
  710. * same as Comment1
  711. * else driver can:
  712. * allocate it reservation any place as long as it does overlap pre-OS FW reservation area
  713. * set used_by_driver_region0_in_kb = driver reservation size
  714. * set driver_region0_start_address_in_kb = driver reservation region start address
  715. * Comment2[hchan]: Host driver can set used_by_firmware_in_kb and start_address_in_kb to
  716. * zero as the reservation for VF as it doesn’t exist. And Host driver should also
  717. * update atom_firmware_Info table to remove the same VBIOS reservation as well.
  718. */
  719. struct vram_usagebyfirmware_v2_1
  720. {
  721. struct atom_common_table_header table_header;
  722. uint32_t start_address_in_kb;
  723. uint16_t used_by_firmware_in_kb;
  724. uint16_t used_by_driver_in_kb;
  725. };
  726. struct vram_usagebyfirmware_v2_2 {
  727. struct atom_common_table_header table_header;
  728. uint32_t fw_region_start_address_in_kb;
  729. uint16_t used_by_firmware_in_kb;
  730. uint16_t reserved;
  731. uint32_t driver_region0_start_address_in_kb;
  732. uint32_t used_by_driver_region0_in_kb;
  733. uint32_t reserved32[7];
  734. };
  735. /*
  736. ***************************************************************************
  737. Data Table displayobjectinfo structure
  738. ***************************************************************************
  739. */
  740. enum atom_object_record_type_id {
  741. ATOM_I2C_RECORD_TYPE = 1,
  742. ATOM_HPD_INT_RECORD_TYPE = 2,
  743. ATOM_CONNECTOR_CAP_RECORD_TYPE = 3,
  744. ATOM_CONNECTOR_SPEED_UPTO = 4,
  745. ATOM_OBJECT_GPIO_CNTL_RECORD_TYPE = 9,
  746. ATOM_CONNECTOR_HPDPIN_LUT_RECORD_TYPE = 16,
  747. ATOM_CONNECTOR_AUXDDC_LUT_RECORD_TYPE = 17,
  748. ATOM_ENCODER_CAP_RECORD_TYPE = 20,
  749. ATOM_BRACKET_LAYOUT_RECORD_TYPE = 21,
  750. ATOM_CONNECTOR_FORCED_TMDS_CAP_RECORD_TYPE = 22,
  751. ATOM_DISP_CONNECTOR_CAPS_RECORD_TYPE = 23,
  752. ATOM_BRACKET_LAYOUT_V2_RECORD_TYPE = 25,
  753. ATOM_RECORD_END_TYPE = 0xFF,
  754. };
  755. struct atom_common_record_header
  756. {
  757. uint8_t record_type; //An emun to indicate the record type
  758. uint8_t record_size; //The size of the whole record in byte
  759. };
  760. struct atom_i2c_record
  761. {
  762. struct atom_common_record_header record_header; //record_type = ATOM_I2C_RECORD_TYPE
  763. uint8_t i2c_id;
  764. uint8_t i2c_slave_addr; //The slave address, it's 0 when the record is attached to connector for DDC
  765. };
  766. struct atom_hpd_int_record
  767. {
  768. struct atom_common_record_header record_header; //record_type = ATOM_HPD_INT_RECORD_TYPE
  769. uint8_t pin_id; //Corresponding block in GPIO_PIN_INFO table gives the pin info
  770. uint8_t plugin_pin_state;
  771. };
  772. struct atom_connector_caps_record {
  773. struct atom_common_record_header
  774. record_header; //record_type = ATOM_CONN_CAP_RECORD_TYPE
  775. uint16_t connector_caps; //01b if internal display is checked; 10b if internal BL is checked; 0 of Not
  776. };
  777. struct atom_connector_speed_record {
  778. struct atom_common_record_header
  779. record_header; //record_type = ATOM_CONN_SPEED_UPTO
  780. uint32_t connector_max_speed; // connector Max speed attribute, it sets 8100 in Mhz when DP connector @8.1Ghz.
  781. uint16_t reserved;
  782. };
  783. // Bit maps for ATOM_ENCODER_CAP_RECORD.usEncoderCap
  784. enum atom_encoder_caps_def
  785. {
  786. ATOM_ENCODER_CAP_RECORD_HBR2 =0x01, // DP1.2 HBR2 is supported by HW encoder, it is retired in NI. the real meaning from SI is MST_EN
  787. ATOM_ENCODER_CAP_RECORD_MST_EN =0x01, // from SI, this bit means DP MST is enable or not.
  788. ATOM_ENCODER_CAP_RECORD_HBR2_EN =0x02, // DP1.2 HBR2 setting is qualified and HBR2 can be enabled
  789. ATOM_ENCODER_CAP_RECORD_HDMI6Gbps_EN =0x04, // HDMI2.0 6Gbps enable or not.
  790. ATOM_ENCODER_CAP_RECORD_HBR3_EN =0x08, // DP1.3 HBR3 is supported by board.
  791. ATOM_ENCODER_CAP_RECORD_DP2 =0x10, // DP2 is supported by ASIC/board.
  792. ATOM_ENCODER_CAP_RECORD_UHBR10_EN =0x20, // DP2.0 UHBR10 settings is supported by board
  793. ATOM_ENCODER_CAP_RECORD_UHBR13_5_EN =0x40, // DP2.0 UHBR13.5 settings is supported by board
  794. ATOM_ENCODER_CAP_RECORD_UHBR20_EN =0x80, // DP2.0 UHBR20 settings is supported by board
  795. ATOM_ENCODER_CAP_RECORD_USB_C_TYPE =0x100, // the DP connector is a USB-C type.
  796. };
  797. struct atom_encoder_caps_record
  798. {
  799. struct atom_common_record_header record_header; //record_type = ATOM_ENCODER_CAP_RECORD_TYPE
  800. uint32_t encodercaps;
  801. };
  802. enum atom_connector_caps_def
  803. {
  804. ATOM_CONNECTOR_CAP_INTERNAL_DISPLAY = 0x01, //a cap bit to indicate that this non-embedded display connector is an internal display
  805. ATOM_CONNECTOR_CAP_INTERNAL_DISPLAY_BL = 0x02, //a cap bit to indicate that this internal display requires BL control from GPU, refers to lcd_info for BL PWM freq
  806. };
  807. struct atom_disp_connector_caps_record
  808. {
  809. struct atom_common_record_header record_header;
  810. uint32_t connectcaps;
  811. };
  812. //The following generic object gpio pin control record type will replace JTAG_RECORD/FPGA_CONTROL_RECORD/DVI_EXT_INPUT_RECORD above gradually
  813. struct atom_gpio_pin_control_pair
  814. {
  815. uint8_t gpio_id; // GPIO_ID, find the corresponding ID in GPIO_LUT table
  816. uint8_t gpio_pinstate; // Pin state showing how to set-up the pin
  817. };
  818. struct atom_object_gpio_cntl_record
  819. {
  820. struct atom_common_record_header record_header;
  821. uint8_t flag; // Future expnadibility
  822. uint8_t number_of_pins; // Number of GPIO pins used to control the object
  823. struct atom_gpio_pin_control_pair gpio[1]; // the real gpio pin pair determined by number of pins ucNumberOfPins
  824. };
  825. //Definitions for GPIO pin state
  826. enum atom_gpio_pin_control_pinstate_def
  827. {
  828. GPIO_PIN_TYPE_INPUT = 0x00,
  829. GPIO_PIN_TYPE_OUTPUT = 0x10,
  830. GPIO_PIN_TYPE_HW_CONTROL = 0x20,
  831. //For GPIO_PIN_TYPE_OUTPUT the following is defined
  832. GPIO_PIN_OUTPUT_STATE_MASK = 0x01,
  833. GPIO_PIN_OUTPUT_STATE_SHIFT = 0,
  834. GPIO_PIN_STATE_ACTIVE_LOW = 0x0,
  835. GPIO_PIN_STATE_ACTIVE_HIGH = 0x1,
  836. };
  837. // Indexes to GPIO array in GLSync record
  838. // GLSync record is for Frame Lock/Gen Lock feature.
  839. enum atom_glsync_record_gpio_index_def
  840. {
  841. ATOM_GPIO_INDEX_GLSYNC_REFCLK = 0,
  842. ATOM_GPIO_INDEX_GLSYNC_HSYNC = 1,
  843. ATOM_GPIO_INDEX_GLSYNC_VSYNC = 2,
  844. ATOM_GPIO_INDEX_GLSYNC_SWAP_REQ = 3,
  845. ATOM_GPIO_INDEX_GLSYNC_SWAP_GNT = 4,
  846. ATOM_GPIO_INDEX_GLSYNC_INTERRUPT = 5,
  847. ATOM_GPIO_INDEX_GLSYNC_V_RESET = 6,
  848. ATOM_GPIO_INDEX_GLSYNC_SWAP_CNTL = 7,
  849. ATOM_GPIO_INDEX_GLSYNC_SWAP_SEL = 8,
  850. ATOM_GPIO_INDEX_GLSYNC_MAX = 9,
  851. };
  852. struct atom_connector_hpdpin_lut_record //record for ATOM_CONNECTOR_HPDPIN_LUT_RECORD_TYPE
  853. {
  854. struct atom_common_record_header record_header;
  855. uint8_t hpd_pin_map[8];
  856. };
  857. struct atom_connector_auxddc_lut_record //record for ATOM_CONNECTOR_AUXDDC_LUT_RECORD_TYPE
  858. {
  859. struct atom_common_record_header record_header;
  860. uint8_t aux_ddc_map[8];
  861. };
  862. struct atom_connector_forced_tmds_cap_record
  863. {
  864. struct atom_common_record_header record_header;
  865. // override TMDS capability on this connector when it operate in TMDS mode. usMaxTmdsClkRate = max TMDS Clock in Mhz/2.5
  866. uint8_t maxtmdsclkrate_in2_5mhz;
  867. uint8_t reserved;
  868. };
  869. struct atom_connector_layout_info
  870. {
  871. uint16_t connectorobjid;
  872. uint8_t connector_type;
  873. uint8_t position;
  874. };
  875. // define ATOM_CONNECTOR_LAYOUT_INFO.ucConnectorType to describe the display connector size
  876. enum atom_connector_layout_info_connector_type_def
  877. {
  878. CONNECTOR_TYPE_DVI_D = 1,
  879. CONNECTOR_TYPE_HDMI = 4,
  880. CONNECTOR_TYPE_DISPLAY_PORT = 5,
  881. CONNECTOR_TYPE_MINI_DISPLAY_PORT = 6,
  882. };
  883. struct atom_bracket_layout_record
  884. {
  885. struct atom_common_record_header record_header;
  886. uint8_t bracketlen;
  887. uint8_t bracketwidth;
  888. uint8_t conn_num;
  889. uint8_t reserved;
  890. struct atom_connector_layout_info conn_info[1];
  891. };
  892. struct atom_bracket_layout_record_v2 {
  893. struct atom_common_record_header
  894. record_header; //record_type = ATOM_BRACKET_LAYOUT_RECORD_TYPE
  895. uint8_t bracketlen; //Bracket Length in mm
  896. uint8_t bracketwidth; //Bracket Width in mm
  897. uint8_t conn_num; //Connector numbering
  898. uint8_t mini_type; //Mini Type (0 = Normal; 1 = Mini)
  899. uint8_t reserved1;
  900. uint8_t reserved2;
  901. };
  902. enum atom_connector_layout_info_mini_type_def {
  903. MINI_TYPE_NORMAL = 0,
  904. MINI_TYPE_MINI = 1,
  905. };
  906. enum atom_display_device_tag_def{
  907. ATOM_DISPLAY_LCD1_SUPPORT = 0x0002, //an embedded display is either an LVDS or eDP signal type of display
  908. ATOM_DISPLAY_LCD2_SUPPORT = 0x0020, //second edp device tag 0x0020 for backward compability
  909. ATOM_DISPLAY_DFP1_SUPPORT = 0x0008,
  910. ATOM_DISPLAY_DFP2_SUPPORT = 0x0080,
  911. ATOM_DISPLAY_DFP3_SUPPORT = 0x0200,
  912. ATOM_DISPLAY_DFP4_SUPPORT = 0x0400,
  913. ATOM_DISPLAY_DFP5_SUPPORT = 0x0800,
  914. ATOM_DISPLAY_DFP6_SUPPORT = 0x0040,
  915. ATOM_DISPLAY_DFPx_SUPPORT = 0x0ec8,
  916. };
  917. struct atom_display_object_path_v2
  918. {
  919. uint16_t display_objid; //Connector Object ID or Misc Object ID
  920. uint16_t disp_recordoffset;
  921. uint16_t encoderobjid; //first encoder closer to the connector, could be either an external or intenal encoder
  922. uint16_t extencoderobjid; //2nd encoder after the first encoder, from the connector point of view;
  923. uint16_t encoder_recordoffset;
  924. uint16_t extencoder_recordoffset;
  925. uint16_t device_tag; //a supported device vector, each display path starts with this.the paths are enumerated in the way of priority, a path appears first
  926. uint8_t priority_id;
  927. uint8_t reserved;
  928. };
  929. struct atom_display_object_path_v3 {
  930. uint16_t display_objid; //Connector Object ID or Misc Object ID
  931. uint16_t disp_recordoffset;
  932. uint16_t encoderobjid; //first encoder closer to the connector, could be either an external or intenal encoder
  933. uint16_t reserved1; //only on USBC case, otherwise always = 0
  934. uint16_t reserved2; //reserved and always = 0
  935. uint16_t reserved3; //reserved and always = 0
  936. //a supported device vector, each display path starts with this.the paths are enumerated in the way of priority,
  937. //a path appears first
  938. uint16_t device_tag;
  939. uint16_t reserved4; //reserved and always = 0
  940. };
  941. struct display_object_info_table_v1_4
  942. {
  943. struct atom_common_table_header table_header;
  944. uint16_t supporteddevices;
  945. uint8_t number_of_path;
  946. uint8_t reserved;
  947. struct atom_display_object_path_v2 display_path[]; //the real number of this included in the structure is calculated by using the (whole structure size - the header size- number_of_path)/size of atom_display_object_path
  948. };
  949. struct display_object_info_table_v1_5 {
  950. struct atom_common_table_header table_header;
  951. uint16_t supporteddevices;
  952. uint8_t number_of_path;
  953. uint8_t reserved;
  954. // the real number of this included in the structure is calculated by using the
  955. // (whole structure size - the header size- number_of_path)/size of atom_display_object_path
  956. struct atom_display_object_path_v3 display_path[];
  957. };
  958. /*
  959. ***************************************************************************
  960. Data Table dce_info structure
  961. ***************************************************************************
  962. */
  963. struct atom_display_controller_info_v4_1
  964. {
  965. struct atom_common_table_header table_header;
  966. uint32_t display_caps;
  967. uint32_t bootup_dispclk_10khz;
  968. uint16_t dce_refclk_10khz;
  969. uint16_t i2c_engine_refclk_10khz;
  970. uint16_t dvi_ss_percentage; // in unit of 0.001%
  971. uint16_t dvi_ss_rate_10hz;
  972. uint16_t hdmi_ss_percentage; // in unit of 0.001%
  973. uint16_t hdmi_ss_rate_10hz;
  974. uint16_t dp_ss_percentage; // in unit of 0.001%
  975. uint16_t dp_ss_rate_10hz;
  976. uint8_t dvi_ss_mode; // enum of atom_spread_spectrum_mode
  977. uint8_t hdmi_ss_mode; // enum of atom_spread_spectrum_mode
  978. uint8_t dp_ss_mode; // enum of atom_spread_spectrum_mode
  979. uint8_t ss_reserved;
  980. uint8_t hardcode_mode_num; // a hardcode mode number defined in StandardVESA_TimingTable when a CRT or DFP EDID is not available
  981. uint8_t reserved1[3];
  982. uint16_t dpphy_refclk_10khz;
  983. uint16_t reserved2;
  984. uint8_t dceip_min_ver;
  985. uint8_t dceip_max_ver;
  986. uint8_t max_disp_pipe_num;
  987. uint8_t max_vbios_active_disp_pipe_num;
  988. uint8_t max_ppll_num;
  989. uint8_t max_disp_phy_num;
  990. uint8_t max_aux_pairs;
  991. uint8_t remotedisplayconfig;
  992. uint8_t reserved3[8];
  993. };
  994. struct atom_display_controller_info_v4_2
  995. {
  996. struct atom_common_table_header table_header;
  997. uint32_t display_caps;
  998. uint32_t bootup_dispclk_10khz;
  999. uint16_t dce_refclk_10khz;
  1000. uint16_t i2c_engine_refclk_10khz;
  1001. uint16_t dvi_ss_percentage; // in unit of 0.001%
  1002. uint16_t dvi_ss_rate_10hz;
  1003. uint16_t hdmi_ss_percentage; // in unit of 0.001%
  1004. uint16_t hdmi_ss_rate_10hz;
  1005. uint16_t dp_ss_percentage; // in unit of 0.001%
  1006. uint16_t dp_ss_rate_10hz;
  1007. uint8_t dvi_ss_mode; // enum of atom_spread_spectrum_mode
  1008. uint8_t hdmi_ss_mode; // enum of atom_spread_spectrum_mode
  1009. uint8_t dp_ss_mode; // enum of atom_spread_spectrum_mode
  1010. uint8_t ss_reserved;
  1011. uint8_t dfp_hardcode_mode_num; // DFP hardcode mode number defined in StandardVESA_TimingTable when EDID is not available
  1012. uint8_t dfp_hardcode_refreshrate;// DFP hardcode mode refreshrate defined in StandardVESA_TimingTable when EDID is not available
  1013. uint8_t vga_hardcode_mode_num; // VGA hardcode mode number defined in StandardVESA_TimingTable when EDID is not avablable
  1014. uint8_t vga_hardcode_refreshrate;// VGA hardcode mode number defined in StandardVESA_TimingTable when EDID is not avablable
  1015. uint16_t dpphy_refclk_10khz;
  1016. uint16_t reserved2;
  1017. uint8_t dcnip_min_ver;
  1018. uint8_t dcnip_max_ver;
  1019. uint8_t max_disp_pipe_num;
  1020. uint8_t max_vbios_active_disp_pipe_num;
  1021. uint8_t max_ppll_num;
  1022. uint8_t max_disp_phy_num;
  1023. uint8_t max_aux_pairs;
  1024. uint8_t remotedisplayconfig;
  1025. uint8_t reserved3[8];
  1026. };
  1027. struct atom_display_controller_info_v4_3
  1028. {
  1029. struct atom_common_table_header table_header;
  1030. uint32_t display_caps;
  1031. uint32_t bootup_dispclk_10khz;
  1032. uint16_t dce_refclk_10khz;
  1033. uint16_t i2c_engine_refclk_10khz;
  1034. uint16_t dvi_ss_percentage; // in unit of 0.001%
  1035. uint16_t dvi_ss_rate_10hz;
  1036. uint16_t hdmi_ss_percentage; // in unit of 0.001%
  1037. uint16_t hdmi_ss_rate_10hz;
  1038. uint16_t dp_ss_percentage; // in unit of 0.001%
  1039. uint16_t dp_ss_rate_10hz;
  1040. uint8_t dvi_ss_mode; // enum of atom_spread_spectrum_mode
  1041. uint8_t hdmi_ss_mode; // enum of atom_spread_spectrum_mode
  1042. uint8_t dp_ss_mode; // enum of atom_spread_spectrum_mode
  1043. uint8_t ss_reserved;
  1044. uint8_t dfp_hardcode_mode_num; // DFP hardcode mode number defined in StandardVESA_TimingTable when EDID is not available
  1045. uint8_t dfp_hardcode_refreshrate;// DFP hardcode mode refreshrate defined in StandardVESA_TimingTable when EDID is not available
  1046. uint8_t vga_hardcode_mode_num; // VGA hardcode mode number defined in StandardVESA_TimingTable when EDID is not avablable
  1047. uint8_t vga_hardcode_refreshrate;// VGA hardcode mode number defined in StandardVESA_TimingTable when EDID is not avablable
  1048. uint16_t dpphy_refclk_10khz;
  1049. uint16_t reserved2;
  1050. uint8_t dcnip_min_ver;
  1051. uint8_t dcnip_max_ver;
  1052. uint8_t max_disp_pipe_num;
  1053. uint8_t max_vbios_active_disp_pipe_num;
  1054. uint8_t max_ppll_num;
  1055. uint8_t max_disp_phy_num;
  1056. uint8_t max_aux_pairs;
  1057. uint8_t remotedisplayconfig;
  1058. uint8_t reserved3[8];
  1059. };
  1060. struct atom_display_controller_info_v4_4 {
  1061. struct atom_common_table_header table_header;
  1062. uint32_t display_caps;
  1063. uint32_t bootup_dispclk_10khz;
  1064. uint16_t dce_refclk_10khz;
  1065. uint16_t i2c_engine_refclk_10khz;
  1066. uint16_t dvi_ss_percentage; // in unit of 0.001%
  1067. uint16_t dvi_ss_rate_10hz;
  1068. uint16_t hdmi_ss_percentage; // in unit of 0.001%
  1069. uint16_t hdmi_ss_rate_10hz;
  1070. uint16_t dp_ss_percentage; // in unit of 0.001%
  1071. uint16_t dp_ss_rate_10hz;
  1072. uint8_t dvi_ss_mode; // enum of atom_spread_spectrum_mode
  1073. uint8_t hdmi_ss_mode; // enum of atom_spread_spectrum_mode
  1074. uint8_t dp_ss_mode; // enum of atom_spread_spectrum_mode
  1075. uint8_t ss_reserved;
  1076. uint8_t dfp_hardcode_mode_num; // DFP hardcode mode number defined in StandardVESA_TimingTable when EDID is not available
  1077. uint8_t dfp_hardcode_refreshrate;// DFP hardcode mode refreshrate defined in StandardVESA_TimingTable when EDID is not available
  1078. uint8_t vga_hardcode_mode_num; // VGA hardcode mode number defined in StandardVESA_TimingTable when EDID is not avablable
  1079. uint8_t vga_hardcode_refreshrate;// VGA hardcode mode number defined in StandardVESA_TimingTable when EDID is not avablable
  1080. uint16_t dpphy_refclk_10khz;
  1081. uint16_t hw_chip_id;
  1082. uint8_t dcnip_min_ver;
  1083. uint8_t dcnip_max_ver;
  1084. uint8_t max_disp_pipe_num;
  1085. uint8_t max_vbios_active_disp_pipum;
  1086. uint8_t max_ppll_num;
  1087. uint8_t max_disp_phy_num;
  1088. uint8_t max_aux_pairs;
  1089. uint8_t remotedisplayconfig;
  1090. uint32_t dispclk_pll_vco_freq;
  1091. uint32_t dp_ref_clk_freq;
  1092. uint32_t max_mclk_chg_lat; // Worst case blackout duration for a memory clock frequency (p-state) change, units of 100s of ns (0.1 us)
  1093. uint32_t max_sr_exit_lat; // Worst case memory self refresh exit time, units of 100ns of ns (0.1us)
  1094. uint32_t max_sr_enter_exit_lat; // Worst case memory self refresh entry followed by immediate exit time, units of 100ns of ns (0.1us)
  1095. uint16_t dc_golden_table_offset; // point of struct of atom_dc_golden_table_vxx
  1096. uint16_t dc_golden_table_ver;
  1097. uint32_t reserved3[3];
  1098. };
  1099. struct atom_dc_golden_table_v1
  1100. {
  1101. uint32_t aux_dphy_rx_control0_val;
  1102. uint32_t aux_dphy_tx_control_val;
  1103. uint32_t aux_dphy_rx_control1_val;
  1104. uint32_t dc_gpio_aux_ctrl_0_val;
  1105. uint32_t dc_gpio_aux_ctrl_1_val;
  1106. uint32_t dc_gpio_aux_ctrl_2_val;
  1107. uint32_t dc_gpio_aux_ctrl_3_val;
  1108. uint32_t dc_gpio_aux_ctrl_4_val;
  1109. uint32_t dc_gpio_aux_ctrl_5_val;
  1110. uint32_t reserved[23];
  1111. };
  1112. enum dce_info_caps_def {
  1113. // only for VBIOS
  1114. DCE_INFO_CAPS_FORCE_DISPDEV_CONNECTED = 0x02,
  1115. // only for VBIOS
  1116. DCE_INFO_CAPS_DISABLE_DFP_DP_HBR2 = 0x04,
  1117. // only for VBIOS
  1118. DCE_INFO_CAPS_ENABLE_INTERLAC_TIMING = 0x08,
  1119. // only for VBIOS
  1120. DCE_INFO_CAPS_LTTPR_SUPPORT_ENABLE = 0x20,
  1121. DCE_INFO_CAPS_VBIOS_LTTPR_TRANSPARENT_ENABLE = 0x40,
  1122. };
  1123. struct atom_display_controller_info_v4_5
  1124. {
  1125. struct atom_common_table_header table_header;
  1126. uint32_t display_caps;
  1127. uint32_t bootup_dispclk_10khz;
  1128. uint16_t dce_refclk_10khz;
  1129. uint16_t i2c_engine_refclk_10khz;
  1130. uint16_t dvi_ss_percentage; // in unit of 0.001%
  1131. uint16_t dvi_ss_rate_10hz;
  1132. uint16_t hdmi_ss_percentage; // in unit of 0.001%
  1133. uint16_t hdmi_ss_rate_10hz;
  1134. uint16_t dp_ss_percentage; // in unit of 0.001%
  1135. uint16_t dp_ss_rate_10hz;
  1136. uint8_t dvi_ss_mode; // enum of atom_spread_spectrum_mode
  1137. uint8_t hdmi_ss_mode; // enum of atom_spread_spectrum_mode
  1138. uint8_t dp_ss_mode; // enum of atom_spread_spectrum_mode
  1139. uint8_t ss_reserved;
  1140. // DFP hardcode mode number defined in StandardVESA_TimingTable when EDID is not available
  1141. uint8_t dfp_hardcode_mode_num;
  1142. // DFP hardcode mode refreshrate defined in StandardVESA_TimingTable when EDID is not available
  1143. uint8_t dfp_hardcode_refreshrate;
  1144. // VGA hardcode mode number defined in StandardVESA_TimingTable when EDID is not avablable
  1145. uint8_t vga_hardcode_mode_num;
  1146. // VGA hardcode mode number defined in StandardVESA_TimingTable when EDID is not avablable
  1147. uint8_t vga_hardcode_refreshrate;
  1148. uint16_t dpphy_refclk_10khz;
  1149. uint16_t hw_chip_id;
  1150. uint8_t dcnip_min_ver;
  1151. uint8_t dcnip_max_ver;
  1152. uint8_t max_disp_pipe_num;
  1153. uint8_t max_vbios_active_disp_pipe_num;
  1154. uint8_t max_ppll_num;
  1155. uint8_t max_disp_phy_num;
  1156. uint8_t max_aux_pairs;
  1157. uint8_t remotedisplayconfig;
  1158. uint32_t dispclk_pll_vco_freq;
  1159. uint32_t dp_ref_clk_freq;
  1160. // Worst case blackout duration for a memory clock frequency (p-state) change, units of 100s of ns (0.1 us)
  1161. uint32_t max_mclk_chg_lat;
  1162. // Worst case memory self refresh exit time, units of 100ns of ns (0.1us)
  1163. uint32_t max_sr_exit_lat;
  1164. // Worst case memory self refresh entry followed by immediate exit time, units of 100ns of ns (0.1us)
  1165. uint32_t max_sr_enter_exit_lat;
  1166. uint16_t dc_golden_table_offset; // point of struct of atom_dc_golden_table_vxx
  1167. uint16_t dc_golden_table_ver;
  1168. uint32_t aux_dphy_rx_control0_val;
  1169. uint32_t aux_dphy_tx_control_val;
  1170. uint32_t aux_dphy_rx_control1_val;
  1171. uint32_t dc_gpio_aux_ctrl_0_val;
  1172. uint32_t dc_gpio_aux_ctrl_1_val;
  1173. uint32_t dc_gpio_aux_ctrl_2_val;
  1174. uint32_t dc_gpio_aux_ctrl_3_val;
  1175. uint32_t dc_gpio_aux_ctrl_4_val;
  1176. uint32_t dc_gpio_aux_ctrl_5_val;
  1177. uint32_t reserved[26];
  1178. };
  1179. /*
  1180. ***************************************************************************
  1181. Data Table ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO structure
  1182. ***************************************************************************
  1183. */
  1184. struct atom_ext_display_path
  1185. {
  1186. uint16_t device_tag; //A bit vector to show what devices are supported
  1187. uint16_t device_acpi_enum; //16bit device ACPI id.
  1188. uint16_t connectorobjid; //A physical connector for displays to plug in, using object connector definitions
  1189. uint8_t auxddclut_index; //An index into external AUX/DDC channel LUT
  1190. uint8_t hpdlut_index; //An index into external HPD pin LUT
  1191. uint16_t ext_encoder_objid; //external encoder object id
  1192. uint8_t channelmapping; // if ucChannelMapping=0, using default one to one mapping
  1193. uint8_t chpninvert; // bit vector for up to 8 lanes, =0: P and N is not invert, =1 P and N is inverted
  1194. uint16_t caps;
  1195. uint16_t reserved;
  1196. };
  1197. //usCaps
  1198. enum ext_display_path_cap_def {
  1199. EXT_DISPLAY_PATH_CAPS__HBR2_DISABLE = 0x0001,
  1200. EXT_DISPLAY_PATH_CAPS__DP_FIXED_VS_EN = 0x0002,
  1201. EXT_DISPLAY_PATH_CAPS__EXT_CHIP_MASK = 0x007C,
  1202. EXT_DISPLAY_PATH_CAPS__HDMI20_PI3EQX1204 = (0x01 << 2), //PI redriver chip
  1203. EXT_DISPLAY_PATH_CAPS__HDMI20_TISN65DP159RSBT = (0x02 << 2), //TI retimer chip
  1204. EXT_DISPLAY_PATH_CAPS__HDMI20_PARADE_PS175 = (0x03 << 2) //Parade DP->HDMI recoverter chip
  1205. };
  1206. struct atom_external_display_connection_info
  1207. {
  1208. struct atom_common_table_header table_header;
  1209. uint8_t guid[16]; // a GUID is a 16 byte long string
  1210. struct atom_ext_display_path path[7]; // total of fixed 7 entries.
  1211. uint8_t checksum; // a simple Checksum of the sum of whole structure equal to 0x0.
  1212. uint8_t stereopinid; // use for eDP panel
  1213. uint8_t remotedisplayconfig;
  1214. uint8_t edptolvdsrxid;
  1215. uint8_t fixdpvoltageswing; // usCaps[1]=1, this indicate DP_LANE_SET value
  1216. uint8_t reserved[3]; // for potential expansion
  1217. };
  1218. /*
  1219. ***************************************************************************
  1220. Data Table integratedsysteminfo structure
  1221. ***************************************************************************
  1222. */
  1223. struct atom_camera_dphy_timing_param
  1224. {
  1225. uint8_t profile_id; // SENSOR_PROFILES
  1226. uint32_t param;
  1227. };
  1228. struct atom_camera_dphy_elec_param
  1229. {
  1230. uint16_t param[3];
  1231. };
  1232. struct atom_camera_module_info
  1233. {
  1234. uint8_t module_id; // 0: Rear, 1: Front right of user, 2: Front left of user
  1235. uint8_t module_name[8];
  1236. struct atom_camera_dphy_timing_param timingparam[6]; // Exact number is under estimation and confirmation from sensor vendor
  1237. };
  1238. struct atom_camera_flashlight_info
  1239. {
  1240. uint8_t flashlight_id; // 0: Rear, 1: Front
  1241. uint8_t name[8];
  1242. };
  1243. struct atom_camera_data
  1244. {
  1245. uint32_t versionCode;
  1246. struct atom_camera_module_info cameraInfo[3]; // Assuming 3 camera sensors max
  1247. struct atom_camera_flashlight_info flashInfo; // Assuming 1 flashlight max
  1248. struct atom_camera_dphy_elec_param dphy_param;
  1249. uint32_t crc_val; // CRC
  1250. };
  1251. struct atom_14nm_dpphy_dvihdmi_tuningset
  1252. {
  1253. uint32_t max_symclk_in10khz;
  1254. uint8_t encoder_mode; //atom_encode_mode_def, =2: DVI, =3: HDMI mode
  1255. uint8_t phy_sel; //bit vector of phy, bit0= phya, bit1=phyb, ....bit5 = phyf
  1256. uint16_t margindeemph; //COMMON_MAR_DEEMPH_NOM[7:0]tx_margin_nom [15:8]deemph_gen1_nom
  1257. uint8_t deemph_6db_4; //COMMON_SELDEEMPH60[31:24]deemph_6db_4
  1258. uint8_t boostadj; //CMD_BUS_GLOBAL_FOR_TX_LANE0 [19:16]tx_boost_adj [20]tx_boost_en [23:22]tx_binary_ron_code_offset
  1259. uint8_t tx_driver_fifty_ohms; //COMMON_ZCALCODE_CTRL[21].tx_driver_fifty_ohms
  1260. uint8_t deemph_sel; //MARGIN_DEEMPH_LANE0.DEEMPH_SEL
  1261. };
  1262. struct atom_14nm_dpphy_dp_setting{
  1263. uint8_t dp_vs_pemph_level; //enum of atom_dp_vs_preemph_def
  1264. uint16_t margindeemph; //COMMON_MAR_DEEMPH_NOM[7:0]tx_margin_nom [15:8]deemph_gen1_nom
  1265. uint8_t deemph_6db_4; //COMMON_SELDEEMPH60[31:24]deemph_6db_4
  1266. uint8_t boostadj; //CMD_BUS_GLOBAL_FOR_TX_LANE0 [19:16]tx_boost_adj [20]tx_boost_en [23:22]tx_binary_ron_code_offset
  1267. };
  1268. struct atom_14nm_dpphy_dp_tuningset{
  1269. uint8_t phy_sel; // bit vector of phy, bit0= phya, bit1=phyb, ....bit5 = phyf
  1270. uint8_t version;
  1271. uint16_t table_size; // size of atom_14nm_dpphy_dp_tuningset
  1272. uint16_t reserved;
  1273. struct atom_14nm_dpphy_dp_setting dptuning[10];
  1274. };
  1275. struct atom_14nm_dig_transmitter_info_header_v4_0{
  1276. struct atom_common_table_header table_header;
  1277. uint16_t pcie_phy_tmds_hdmi_macro_settings_offset; // offset of PCIEPhyTMDSHDMIMacroSettingsTbl
  1278. uint16_t uniphy_vs_emph_lookup_table_offset; // offset of UniphyVSEmphLookUpTbl
  1279. uint16_t uniphy_xbar_settings_table_offset; // offset of UniphyXbarSettingsTbl
  1280. };
  1281. struct atom_14nm_combphy_tmds_vs_set
  1282. {
  1283. uint8_t sym_clk;
  1284. uint8_t dig_mode;
  1285. uint8_t phy_sel;
  1286. uint16_t common_mar_deemph_nom__margin_deemph_val;
  1287. uint8_t common_seldeemph60__deemph_6db_4_val;
  1288. uint8_t cmd_bus_global_for_tx_lane0__boostadj_val ;
  1289. uint8_t common_zcalcode_ctrl__tx_driver_fifty_ohms_val;
  1290. uint8_t margin_deemph_lane0__deemph_sel_val;
  1291. };
  1292. struct atom_DCN_dpphy_dvihdmi_tuningset
  1293. {
  1294. uint32_t max_symclk_in10khz;
  1295. uint8_t encoder_mode; //atom_encode_mode_def, =2: DVI, =3: HDMI mode
  1296. uint8_t phy_sel; //bit vector of phy, bit0= phya, bit1=phyb, ....bit5 = phyf
  1297. uint8_t tx_eq_main; // map to RDPCSTX_PHY_FUSE0/1/2/3[5:0](EQ_MAIN)
  1298. uint8_t tx_eq_pre; // map to RDPCSTX_PHY_FUSE0/1/2/3[11:6](EQ_PRE)
  1299. uint8_t tx_eq_post; // map to RDPCSTX_PHY_FUSE0/1/2/3[17:12](EQ_POST)
  1300. uint8_t reserved1;
  1301. uint8_t tx_vboost_lvl; // tx_vboost_lvl, map to RDPCSTX_PHY_CNTL0.RDPCS_PHY_TX_VBOOST_LVL
  1302. uint8_t reserved2;
  1303. };
  1304. struct atom_DCN_dpphy_dp_setting{
  1305. uint8_t dp_vs_pemph_level; //enum of atom_dp_vs_preemph_def
  1306. uint8_t tx_eq_main; // map to RDPCSTX_PHY_FUSE0/1/2/3[5:0](EQ_MAIN)
  1307. uint8_t tx_eq_pre; // map to RDPCSTX_PHY_FUSE0/1/2/3[11:6](EQ_PRE)
  1308. uint8_t tx_eq_post; // map to RDPCSTX_PHY_FUSE0/1/2/3[17:12](EQ_POST)
  1309. uint8_t tx_vboost_lvl; // tx_vboost_lvl, map to RDPCSTX_PHY_CNTL0.RDPCS_PHY_TX_VBOOST_LVL
  1310. };
  1311. struct atom_DCN_dpphy_dp_tuningset{
  1312. uint8_t phy_sel; // bit vector of phy, bit0= phya, bit1=phyb, ....bit5 = phyf
  1313. uint8_t version;
  1314. uint16_t table_size; // size of atom_14nm_dpphy_dp_setting
  1315. uint16_t reserved;
  1316. struct atom_DCN_dpphy_dp_setting dptunings[10];
  1317. };
  1318. struct atom_i2c_reg_info {
  1319. uint8_t ucI2cRegIndex;
  1320. uint8_t ucI2cRegVal;
  1321. };
  1322. struct atom_hdmi_retimer_redriver_set {
  1323. uint8_t HdmiSlvAddr;
  1324. uint8_t HdmiRegNum;
  1325. uint8_t Hdmi6GRegNum;
  1326. struct atom_i2c_reg_info HdmiRegSetting[9]; //For non 6G Hz use
  1327. struct atom_i2c_reg_info Hdmi6GhzRegSetting[3]; //For 6G Hz use.
  1328. };
  1329. struct atom_integrated_system_info_v1_11
  1330. {
  1331. struct atom_common_table_header table_header;
  1332. uint32_t vbios_misc; //enum of atom_system_vbiosmisc_def
  1333. uint32_t gpucapinfo; //enum of atom_system_gpucapinf_def
  1334. uint32_t system_config;
  1335. uint32_t cpucapinfo;
  1336. uint16_t gpuclk_ss_percentage; //unit of 0.001%, 1000 mean 1%
  1337. uint16_t gpuclk_ss_type;
  1338. uint16_t lvds_ss_percentage; //unit of 0.001%, 1000 mean 1%
  1339. uint16_t lvds_ss_rate_10hz;
  1340. uint16_t hdmi_ss_percentage; //unit of 0.001%, 1000 mean 1%
  1341. uint16_t hdmi_ss_rate_10hz;
  1342. uint16_t dvi_ss_percentage; //unit of 0.001%, 1000 mean 1%
  1343. uint16_t dvi_ss_rate_10hz;
  1344. uint16_t dpphy_override; // bit vector, enum of atom_sysinfo_dpphy_override_def
  1345. uint16_t lvds_misc; // enum of atom_sys_info_lvds_misc_def
  1346. uint16_t backlight_pwm_hz; // pwm frequency in hz
  1347. uint8_t memorytype; // enum of atom_dmi_t17_mem_type_def, APU memory type indication.
  1348. uint8_t umachannelnumber; // number of memory channels
  1349. uint8_t pwr_on_digon_to_de; /* all pwr sequence numbers below are in uint of 4ms */
  1350. uint8_t pwr_on_de_to_vary_bl;
  1351. uint8_t pwr_down_vary_bloff_to_de;
  1352. uint8_t pwr_down_de_to_digoff;
  1353. uint8_t pwr_off_delay;
  1354. uint8_t pwr_on_vary_bl_to_blon;
  1355. uint8_t pwr_down_bloff_to_vary_bloff;
  1356. uint8_t min_allowed_bl_level;
  1357. uint8_t htc_hyst_limit;
  1358. uint8_t htc_tmp_limit;
  1359. uint8_t reserved1;
  1360. uint8_t reserved2;
  1361. struct atom_external_display_connection_info extdispconninfo;
  1362. struct atom_14nm_dpphy_dvihdmi_tuningset dvi_tuningset;
  1363. struct atom_14nm_dpphy_dvihdmi_tuningset hdmi_tuningset;
  1364. struct atom_14nm_dpphy_dvihdmi_tuningset hdmi6g_tuningset;
  1365. struct atom_14nm_dpphy_dp_tuningset dp_tuningset; // rbr 1.62G dp tuning set
  1366. struct atom_14nm_dpphy_dp_tuningset dp_hbr3_tuningset; // HBR3 dp tuning set
  1367. struct atom_camera_data camera_info;
  1368. struct atom_hdmi_retimer_redriver_set dp0_retimer_set; //for DP0
  1369. struct atom_hdmi_retimer_redriver_set dp1_retimer_set; //for DP1
  1370. struct atom_hdmi_retimer_redriver_set dp2_retimer_set; //for DP2
  1371. struct atom_hdmi_retimer_redriver_set dp3_retimer_set; //for DP3
  1372. struct atom_14nm_dpphy_dp_tuningset dp_hbr_tuningset; //hbr 2.7G dp tuning set
  1373. struct atom_14nm_dpphy_dp_tuningset dp_hbr2_tuningset; //hbr2 5.4G dp turnig set
  1374. struct atom_14nm_dpphy_dp_tuningset edp_tuningset; //edp tuning set
  1375. uint32_t reserved[66];
  1376. };
  1377. struct atom_integrated_system_info_v1_12
  1378. {
  1379. struct atom_common_table_header table_header;
  1380. uint32_t vbios_misc; //enum of atom_system_vbiosmisc_def
  1381. uint32_t gpucapinfo; //enum of atom_system_gpucapinf_def
  1382. uint32_t system_config;
  1383. uint32_t cpucapinfo;
  1384. uint16_t gpuclk_ss_percentage; //unit of 0.001%, 1000 mean 1%
  1385. uint16_t gpuclk_ss_type;
  1386. uint16_t lvds_ss_percentage; //unit of 0.001%, 1000 mean 1%
  1387. uint16_t lvds_ss_rate_10hz;
  1388. uint16_t hdmi_ss_percentage; //unit of 0.001%, 1000 mean 1%
  1389. uint16_t hdmi_ss_rate_10hz;
  1390. uint16_t dvi_ss_percentage; //unit of 0.001%, 1000 mean 1%
  1391. uint16_t dvi_ss_rate_10hz;
  1392. uint16_t dpphy_override; // bit vector, enum of atom_sysinfo_dpphy_override_def
  1393. uint16_t lvds_misc; // enum of atom_sys_info_lvds_misc_def
  1394. uint16_t backlight_pwm_hz; // pwm frequency in hz
  1395. uint8_t memorytype; // enum of atom_dmi_t17_mem_type_def, APU memory type indication.
  1396. uint8_t umachannelnumber; // number of memory channels
  1397. uint8_t pwr_on_digon_to_de; // all pwr sequence numbers below are in uint of 4ms //
  1398. uint8_t pwr_on_de_to_vary_bl;
  1399. uint8_t pwr_down_vary_bloff_to_de;
  1400. uint8_t pwr_down_de_to_digoff;
  1401. uint8_t pwr_off_delay;
  1402. uint8_t pwr_on_vary_bl_to_blon;
  1403. uint8_t pwr_down_bloff_to_vary_bloff;
  1404. uint8_t min_allowed_bl_level;
  1405. uint8_t htc_hyst_limit;
  1406. uint8_t htc_tmp_limit;
  1407. uint8_t reserved1;
  1408. uint8_t reserved2;
  1409. struct atom_external_display_connection_info extdispconninfo;
  1410. struct atom_DCN_dpphy_dvihdmi_tuningset TMDS_tuningset;
  1411. struct atom_DCN_dpphy_dvihdmi_tuningset hdmiCLK5_tuningset;
  1412. struct atom_DCN_dpphy_dvihdmi_tuningset hdmiCLK8_tuningset;
  1413. struct atom_DCN_dpphy_dp_tuningset rbr_tuningset; // rbr 1.62G dp tuning set
  1414. struct atom_DCN_dpphy_dp_tuningset hbr3_tuningset; // HBR3 dp tuning set
  1415. struct atom_camera_data camera_info;
  1416. struct atom_hdmi_retimer_redriver_set dp0_retimer_set; //for DP0
  1417. struct atom_hdmi_retimer_redriver_set dp1_retimer_set; //for DP1
  1418. struct atom_hdmi_retimer_redriver_set dp2_retimer_set; //for DP2
  1419. struct atom_hdmi_retimer_redriver_set dp3_retimer_set; //for DP3
  1420. struct atom_DCN_dpphy_dp_tuningset hbr_tuningset; //hbr 2.7G dp tuning set
  1421. struct atom_DCN_dpphy_dp_tuningset hbr2_tuningset; //hbr2 5.4G dp turnig set
  1422. struct atom_DCN_dpphy_dp_tuningset edp_tunings; //edp tuning set
  1423. struct atom_DCN_dpphy_dvihdmi_tuningset hdmiCLK6_tuningset;
  1424. uint32_t reserved[63];
  1425. };
  1426. struct edp_info_table
  1427. {
  1428. uint16_t edp_backlight_pwm_hz;
  1429. uint16_t edp_ss_percentage;
  1430. uint16_t edp_ss_rate_10hz;
  1431. uint16_t reserved1;
  1432. uint32_t reserved2;
  1433. uint8_t edp_pwr_on_off_delay;
  1434. uint8_t edp_pwr_on_vary_bl_to_blon;
  1435. uint8_t edp_pwr_down_bloff_to_vary_bloff;
  1436. uint8_t edp_panel_bpc;
  1437. uint8_t edp_bootup_bl_level;
  1438. uint8_t reserved3[3];
  1439. uint32_t reserved4[3];
  1440. };
  1441. struct atom_integrated_system_info_v2_1
  1442. {
  1443. struct atom_common_table_header table_header;
  1444. uint32_t vbios_misc; //enum of atom_system_vbiosmisc_def
  1445. uint32_t gpucapinfo; //enum of atom_system_gpucapinf_def
  1446. uint32_t system_config;
  1447. uint32_t cpucapinfo;
  1448. uint16_t gpuclk_ss_percentage; //unit of 0.001%, 1000 mean 1%
  1449. uint16_t gpuclk_ss_type;
  1450. uint16_t dpphy_override; // bit vector, enum of atom_sysinfo_dpphy_override_def
  1451. uint8_t memorytype; // enum of atom_dmi_t17_mem_type_def, APU memory type indication.
  1452. uint8_t umachannelnumber; // number of memory channels
  1453. uint8_t htc_hyst_limit;
  1454. uint8_t htc_tmp_limit;
  1455. uint8_t reserved1;
  1456. uint8_t reserved2;
  1457. struct edp_info_table edp1_info;
  1458. struct edp_info_table edp2_info;
  1459. uint32_t reserved3[8];
  1460. struct atom_external_display_connection_info extdispconninfo;
  1461. struct atom_DCN_dpphy_dvihdmi_tuningset TMDS_tuningset;
  1462. struct atom_DCN_dpphy_dvihdmi_tuningset hdmiCLK5_tuningset; //add clk6
  1463. struct atom_DCN_dpphy_dvihdmi_tuningset hdmiCLK6_tuningset;
  1464. struct atom_DCN_dpphy_dvihdmi_tuningset hdmiCLK8_tuningset;
  1465. uint32_t reserved4[6];//reserve 2*sizeof(atom_DCN_dpphy_dvihdmi_tuningset)
  1466. struct atom_DCN_dpphy_dp_tuningset rbr_tuningset; // rbr 1.62G dp tuning set
  1467. struct atom_DCN_dpphy_dp_tuningset hbr_tuningset; //hbr 2.7G dp tuning set
  1468. struct atom_DCN_dpphy_dp_tuningset hbr2_tuningset; //hbr2 5.4G dp turnig set
  1469. struct atom_DCN_dpphy_dp_tuningset hbr3_tuningset; // HBR3 dp tuning set
  1470. struct atom_DCN_dpphy_dp_tuningset edp_tunings; //edp tuning set
  1471. uint32_t reserved5[28];//reserve 2*sizeof(atom_DCN_dpphy_dp_tuningset)
  1472. struct atom_hdmi_retimer_redriver_set dp0_retimer_set; //for DP0
  1473. struct atom_hdmi_retimer_redriver_set dp1_retimer_set; //for DP1
  1474. struct atom_hdmi_retimer_redriver_set dp2_retimer_set; //for DP2
  1475. struct atom_hdmi_retimer_redriver_set dp3_retimer_set; //for DP3
  1476. uint32_t reserved6[30];// reserve size of(atom_camera_data) for camera_info
  1477. uint32_t reserved7[32];
  1478. };
  1479. struct atom_n6_display_phy_tuning_set {
  1480. uint8_t display_signal_type;
  1481. uint8_t phy_sel;
  1482. uint8_t preset_level;
  1483. uint8_t reserved1;
  1484. uint32_t reserved2;
  1485. uint32_t speed_upto;
  1486. uint8_t tx_vboost_level;
  1487. uint8_t tx_vreg_v2i;
  1488. uint8_t tx_vregdrv_byp;
  1489. uint8_t tx_term_cntl;
  1490. uint8_t tx_peak_level;
  1491. uint8_t tx_slew_en;
  1492. uint8_t tx_eq_pre;
  1493. uint8_t tx_eq_main;
  1494. uint8_t tx_eq_post;
  1495. uint8_t tx_en_inv_pre;
  1496. uint8_t tx_en_inv_post;
  1497. uint8_t reserved3;
  1498. uint32_t reserved4;
  1499. uint32_t reserved5;
  1500. uint32_t reserved6;
  1501. };
  1502. struct atom_display_phy_tuning_info {
  1503. struct atom_common_table_header table_header;
  1504. struct atom_n6_display_phy_tuning_set disp_phy_tuning[1];
  1505. };
  1506. struct atom_integrated_system_info_v2_2
  1507. {
  1508. struct atom_common_table_header table_header;
  1509. uint32_t vbios_misc; //enum of atom_system_vbiosmisc_def
  1510. uint32_t gpucapinfo; //enum of atom_system_gpucapinf_def
  1511. uint32_t system_config;
  1512. uint32_t cpucapinfo;
  1513. uint16_t gpuclk_ss_percentage; //unit of 0.001%, 1000 mean 1%
  1514. uint16_t gpuclk_ss_type;
  1515. uint16_t dpphy_override; // bit vector, enum of atom_sysinfo_dpphy_override_def
  1516. uint8_t memorytype; // enum of atom_dmi_t17_mem_type_def, APU memory type indication.
  1517. uint8_t umachannelnumber; // number of memory channels
  1518. uint8_t htc_hyst_limit;
  1519. uint8_t htc_tmp_limit;
  1520. uint8_t reserved1;
  1521. uint8_t reserved2;
  1522. struct edp_info_table edp1_info;
  1523. struct edp_info_table edp2_info;
  1524. uint32_t reserved3[8];
  1525. struct atom_external_display_connection_info extdispconninfo;
  1526. uint32_t reserved4[189];
  1527. };
  1528. struct uma_carveout_option {
  1529. char optionName[29]; //max length of string is 28chars + '\0'. Current design is for "minimum", "Medium", "High". This makes entire struct size 64bits
  1530. uint8_t memoryCarvedGb; //memory carved out with setting
  1531. uint8_t memoryRemainingGb; //memory remaining on system
  1532. union {
  1533. struct _flags {
  1534. uint8_t Auto : 1;
  1535. uint8_t Custom : 1;
  1536. uint8_t Reserved : 6;
  1537. } flags;
  1538. uint8_t all8;
  1539. } uma_carveout_option_flags;
  1540. };
  1541. struct atom_integrated_system_info_v2_3 {
  1542. struct atom_common_table_header table_header;
  1543. uint32_t vbios_misc; // enum of atom_system_vbiosmisc_def
  1544. uint32_t gpucapinfo; // enum of atom_system_gpucapinf_def
  1545. uint32_t system_config;
  1546. uint32_t cpucapinfo;
  1547. uint16_t gpuclk_ss_percentage; // unit of 0.001%, 1000 mean 1%
  1548. uint16_t gpuclk_ss_type;
  1549. uint16_t dpphy_override; // bit vector, enum of atom_sysinfo_dpphy_override_def
  1550. uint8_t memorytype; // enum of atom_dmi_t17_mem_type_def, APU memory type indication.
  1551. uint8_t umachannelnumber; // number of memory channels
  1552. uint8_t htc_hyst_limit;
  1553. uint8_t htc_tmp_limit;
  1554. uint8_t reserved1; // dp_ss_control
  1555. uint8_t gpu_package_id;
  1556. struct edp_info_table edp1_info;
  1557. struct edp_info_table edp2_info;
  1558. uint32_t reserved2[8];
  1559. struct atom_external_display_connection_info extdispconninfo;
  1560. uint8_t UMACarveoutVersion;
  1561. uint8_t UMACarveoutIndexMax;
  1562. uint8_t UMACarveoutTypeDefault;
  1563. uint8_t UMACarveoutIndexDefault;
  1564. uint8_t UMACarveoutType; //Auto or Custom
  1565. uint8_t UMACarveoutIndex;
  1566. struct uma_carveout_option UMASizeControlOption[20];
  1567. uint8_t reserved3[110];
  1568. };
  1569. // system_config
  1570. enum atom_system_vbiosmisc_def{
  1571. INTEGRATED_SYSTEM_INFO__GET_EDID_CALLBACK_FUNC_SUPPORT = 0x01,
  1572. };
  1573. // gpucapinfo
  1574. enum atom_system_gpucapinf_def{
  1575. SYS_INFO_GPUCAPS__ENABEL_DFS_BYPASS = 0x10,
  1576. };
  1577. //dpphy_override
  1578. enum atom_sysinfo_dpphy_override_def{
  1579. ATOM_ENABLE_DVI_TUNINGSET = 0x01,
  1580. ATOM_ENABLE_HDMI_TUNINGSET = 0x02,
  1581. ATOM_ENABLE_HDMI6G_TUNINGSET = 0x04,
  1582. ATOM_ENABLE_DP_TUNINGSET = 0x08,
  1583. ATOM_ENABLE_DP_HBR3_TUNINGSET = 0x10,
  1584. };
  1585. //lvds_misc
  1586. enum atom_sys_info_lvds_misc_def
  1587. {
  1588. SYS_INFO_LVDS_MISC_888_FPDI_MODE =0x01,
  1589. SYS_INFO_LVDS_MISC_888_BPC_MODE =0x04,
  1590. SYS_INFO_LVDS_MISC_OVERRIDE_EN =0x08,
  1591. };
  1592. //memorytype DMI Type 17 offset 12h - Memory Type
  1593. enum atom_dmi_t17_mem_type_def{
  1594. OtherMemType = 0x01, ///< Assign 01 to Other
  1595. UnknownMemType, ///< Assign 02 to Unknown
  1596. DramMemType, ///< Assign 03 to DRAM
  1597. EdramMemType, ///< Assign 04 to EDRAM
  1598. VramMemType, ///< Assign 05 to VRAM
  1599. SramMemType, ///< Assign 06 to SRAM
  1600. RamMemType, ///< Assign 07 to RAM
  1601. RomMemType, ///< Assign 08 to ROM
  1602. FlashMemType, ///< Assign 09 to Flash
  1603. EepromMemType, ///< Assign 10 to EEPROM
  1604. FepromMemType, ///< Assign 11 to FEPROM
  1605. EpromMemType, ///< Assign 12 to EPROM
  1606. CdramMemType, ///< Assign 13 to CDRAM
  1607. ThreeDramMemType, ///< Assign 14 to 3DRAM
  1608. SdramMemType, ///< Assign 15 to SDRAM
  1609. SgramMemType, ///< Assign 16 to SGRAM
  1610. RdramMemType, ///< Assign 17 to RDRAM
  1611. DdrMemType, ///< Assign 18 to DDR
  1612. Ddr2MemType, ///< Assign 19 to DDR2
  1613. Ddr2FbdimmMemType, ///< Assign 20 to DDR2 FB-DIMM
  1614. Ddr3MemType = 0x18, ///< Assign 24 to DDR3
  1615. Fbd2MemType, ///< Assign 25 to FBD2
  1616. Ddr4MemType, ///< Assign 26 to DDR4
  1617. LpDdrMemType, ///< Assign 27 to LPDDR
  1618. LpDdr2MemType, ///< Assign 28 to LPDDR2
  1619. LpDdr3MemType, ///< Assign 29 to LPDDR3
  1620. LpDdr4MemType, ///< Assign 30 to LPDDR4
  1621. GDdr6MemType, ///< Assign 31 to GDDR6
  1622. HbmMemType, ///< Assign 32 to HBM
  1623. Hbm2MemType, ///< Assign 33 to HBM2
  1624. Ddr5MemType, ///< Assign 34 to DDR5
  1625. LpDdr5MemType, ///< Assign 35 to LPDDR5
  1626. };
  1627. // this Table is used starting from NL/AM, used by SBIOS and pass the IntegratedSystemInfoTable/PowerPlayInfoTable/SystemCameraInfoTable
  1628. struct atom_fusion_system_info_v4
  1629. {
  1630. struct atom_integrated_system_info_v1_11 sysinfo; // refer to ATOM_INTEGRATED_SYSTEM_INFO_V1_8 definition
  1631. uint32_t powerplayinfo[256]; // Reserve 1024 bytes space for PowerPlayInfoTable
  1632. };
  1633. /*
  1634. ***************************************************************************
  1635. Data Table gfx_info structure
  1636. ***************************************************************************
  1637. */
  1638. struct atom_gfx_info_v2_2
  1639. {
  1640. struct atom_common_table_header table_header;
  1641. uint8_t gfxip_min_ver;
  1642. uint8_t gfxip_max_ver;
  1643. uint8_t max_shader_engines;
  1644. uint8_t max_tile_pipes;
  1645. uint8_t max_cu_per_sh;
  1646. uint8_t max_sh_per_se;
  1647. uint8_t max_backends_per_se;
  1648. uint8_t max_texture_channel_caches;
  1649. uint32_t regaddr_cp_dma_src_addr;
  1650. uint32_t regaddr_cp_dma_src_addr_hi;
  1651. uint32_t regaddr_cp_dma_dst_addr;
  1652. uint32_t regaddr_cp_dma_dst_addr_hi;
  1653. uint32_t regaddr_cp_dma_command;
  1654. uint32_t regaddr_cp_status;
  1655. uint32_t regaddr_rlc_gpu_clock_32;
  1656. uint32_t rlc_gpu_timer_refclk;
  1657. };
  1658. struct atom_gfx_info_v2_3 {
  1659. struct atom_common_table_header table_header;
  1660. uint8_t gfxip_min_ver;
  1661. uint8_t gfxip_max_ver;
  1662. uint8_t max_shader_engines;
  1663. uint8_t max_tile_pipes;
  1664. uint8_t max_cu_per_sh;
  1665. uint8_t max_sh_per_se;
  1666. uint8_t max_backends_per_se;
  1667. uint8_t max_texture_channel_caches;
  1668. uint32_t regaddr_cp_dma_src_addr;
  1669. uint32_t regaddr_cp_dma_src_addr_hi;
  1670. uint32_t regaddr_cp_dma_dst_addr;
  1671. uint32_t regaddr_cp_dma_dst_addr_hi;
  1672. uint32_t regaddr_cp_dma_command;
  1673. uint32_t regaddr_cp_status;
  1674. uint32_t regaddr_rlc_gpu_clock_32;
  1675. uint32_t rlc_gpu_timer_refclk;
  1676. uint8_t active_cu_per_sh;
  1677. uint8_t active_rb_per_se;
  1678. uint16_t gcgoldenoffset;
  1679. uint32_t rm21_sram_vmin_value;
  1680. };
  1681. struct atom_gfx_info_v2_4
  1682. {
  1683. struct atom_common_table_header table_header;
  1684. uint8_t gfxip_min_ver;
  1685. uint8_t gfxip_max_ver;
  1686. uint8_t max_shader_engines;
  1687. uint8_t reserved;
  1688. uint8_t max_cu_per_sh;
  1689. uint8_t max_sh_per_se;
  1690. uint8_t max_backends_per_se;
  1691. uint8_t max_texture_channel_caches;
  1692. uint32_t regaddr_cp_dma_src_addr;
  1693. uint32_t regaddr_cp_dma_src_addr_hi;
  1694. uint32_t regaddr_cp_dma_dst_addr;
  1695. uint32_t regaddr_cp_dma_dst_addr_hi;
  1696. uint32_t regaddr_cp_dma_command;
  1697. uint32_t regaddr_cp_status;
  1698. uint32_t regaddr_rlc_gpu_clock_32;
  1699. uint32_t rlc_gpu_timer_refclk;
  1700. uint8_t active_cu_per_sh;
  1701. uint8_t active_rb_per_se;
  1702. uint16_t gcgoldenoffset;
  1703. uint16_t gc_num_gprs;
  1704. uint16_t gc_gsprim_buff_depth;
  1705. uint16_t gc_parameter_cache_depth;
  1706. uint16_t gc_wave_size;
  1707. uint16_t gc_max_waves_per_simd;
  1708. uint16_t gc_lds_size;
  1709. uint8_t gc_num_max_gs_thds;
  1710. uint8_t gc_gs_table_depth;
  1711. uint8_t gc_double_offchip_lds_buffer;
  1712. uint8_t gc_max_scratch_slots_per_cu;
  1713. uint32_t sram_rm_fuses_val;
  1714. uint32_t sram_custom_rm_fuses_val;
  1715. };
  1716. struct atom_gfx_info_v2_7 {
  1717. struct atom_common_table_header table_header;
  1718. uint8_t gfxip_min_ver;
  1719. uint8_t gfxip_max_ver;
  1720. uint8_t max_shader_engines;
  1721. uint8_t reserved;
  1722. uint8_t max_cu_per_sh;
  1723. uint8_t max_sh_per_se;
  1724. uint8_t max_backends_per_se;
  1725. uint8_t max_texture_channel_caches;
  1726. uint32_t regaddr_cp_dma_src_addr;
  1727. uint32_t regaddr_cp_dma_src_addr_hi;
  1728. uint32_t regaddr_cp_dma_dst_addr;
  1729. uint32_t regaddr_cp_dma_dst_addr_hi;
  1730. uint32_t regaddr_cp_dma_command;
  1731. uint32_t regaddr_cp_status;
  1732. uint32_t regaddr_rlc_gpu_clock_32;
  1733. uint32_t rlc_gpu_timer_refclk;
  1734. uint8_t active_cu_per_sh;
  1735. uint8_t active_rb_per_se;
  1736. uint16_t gcgoldenoffset;
  1737. uint16_t gc_num_gprs;
  1738. uint16_t gc_gsprim_buff_depth;
  1739. uint16_t gc_parameter_cache_depth;
  1740. uint16_t gc_wave_size;
  1741. uint16_t gc_max_waves_per_simd;
  1742. uint16_t gc_lds_size;
  1743. uint8_t gc_num_max_gs_thds;
  1744. uint8_t gc_gs_table_depth;
  1745. uint8_t gc_double_offchip_lds_buffer;
  1746. uint8_t gc_max_scratch_slots_per_cu;
  1747. uint32_t sram_rm_fuses_val;
  1748. uint32_t sram_custom_rm_fuses_val;
  1749. uint8_t cut_cu;
  1750. uint8_t active_cu_total;
  1751. uint8_t cu_reserved[2];
  1752. uint32_t gc_config;
  1753. uint8_t inactive_cu_per_se[8];
  1754. uint32_t reserved2[6];
  1755. };
  1756. struct atom_gfx_info_v3_0 {
  1757. struct atom_common_table_header table_header;
  1758. uint8_t gfxip_min_ver;
  1759. uint8_t gfxip_max_ver;
  1760. uint8_t max_shader_engines;
  1761. uint8_t max_tile_pipes;
  1762. uint8_t max_cu_per_sh;
  1763. uint8_t max_sh_per_se;
  1764. uint8_t max_backends_per_se;
  1765. uint8_t max_texture_channel_caches;
  1766. uint32_t regaddr_lsdma_queue0_rb_rptr;
  1767. uint32_t regaddr_lsdma_queue0_rb_rptr_hi;
  1768. uint32_t regaddr_lsdma_queue0_rb_wptr;
  1769. uint32_t regaddr_lsdma_queue0_rb_wptr_hi;
  1770. uint32_t regaddr_lsdma_command;
  1771. uint32_t regaddr_lsdma_status;
  1772. uint32_t regaddr_golden_tsc_count_lower;
  1773. uint32_t golden_tsc_count_lower_refclk;
  1774. uint8_t active_wgp_per_se;
  1775. uint8_t active_rb_per_se;
  1776. uint8_t active_se;
  1777. uint8_t reserved1;
  1778. uint32_t sram_rm_fuses_val;
  1779. uint32_t sram_custom_rm_fuses_val;
  1780. uint32_t inactive_sa_mask;
  1781. uint32_t gc_config;
  1782. uint8_t inactive_wgp[16];
  1783. uint8_t inactive_rb[16];
  1784. uint32_t gdfll_as_wait_ctrl_val;
  1785. uint32_t gdfll_as_step_ctrl_val;
  1786. uint32_t reserved[8];
  1787. };
  1788. /*
  1789. ***************************************************************************
  1790. Data Table smu_info structure
  1791. ***************************************************************************
  1792. */
  1793. struct atom_smu_info_v3_1
  1794. {
  1795. struct atom_common_table_header table_header;
  1796. uint8_t smuip_min_ver;
  1797. uint8_t smuip_max_ver;
  1798. uint8_t smu_rsd1;
  1799. uint8_t gpuclk_ss_mode; // enum of atom_spread_spectrum_mode
  1800. uint16_t sclk_ss_percentage;
  1801. uint16_t sclk_ss_rate_10hz;
  1802. uint16_t gpuclk_ss_percentage; // in unit of 0.001%
  1803. uint16_t gpuclk_ss_rate_10hz;
  1804. uint32_t core_refclk_10khz;
  1805. uint8_t ac_dc_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for AC/DC switching, =0xff means invalid
  1806. uint8_t ac_dc_polarity; // GPIO polarity for AC/DC switching
  1807. uint8_t vr0hot_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for VR0 HOT event, =0xff means invalid
  1808. uint8_t vr0hot_polarity; // GPIO polarity for VR0 HOT event
  1809. uint8_t vr1hot_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for VR1 HOT event , =0xff means invalid
  1810. uint8_t vr1hot_polarity; // GPIO polarity for VR1 HOT event
  1811. uint8_t fw_ctf_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for CTF, =0xff means invalid
  1812. uint8_t fw_ctf_polarity; // GPIO polarity for CTF
  1813. };
  1814. struct atom_smu_info_v3_2 {
  1815. struct atom_common_table_header table_header;
  1816. uint8_t smuip_min_ver;
  1817. uint8_t smuip_max_ver;
  1818. uint8_t smu_rsd1;
  1819. uint8_t gpuclk_ss_mode;
  1820. uint16_t sclk_ss_percentage;
  1821. uint16_t sclk_ss_rate_10hz;
  1822. uint16_t gpuclk_ss_percentage; // in unit of 0.001%
  1823. uint16_t gpuclk_ss_rate_10hz;
  1824. uint32_t core_refclk_10khz;
  1825. uint8_t ac_dc_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for AC/DC switching, =0xff means invalid
  1826. uint8_t ac_dc_polarity; // GPIO polarity for AC/DC switching
  1827. uint8_t vr0hot_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for VR0 HOT event, =0xff means invalid
  1828. uint8_t vr0hot_polarity; // GPIO polarity for VR0 HOT event
  1829. uint8_t vr1hot_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for VR1 HOT event , =0xff means invalid
  1830. uint8_t vr1hot_polarity; // GPIO polarity for VR1 HOT event
  1831. uint8_t fw_ctf_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for CTF, =0xff means invalid
  1832. uint8_t fw_ctf_polarity; // GPIO polarity for CTF
  1833. uint8_t pcc_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for PCC, =0xff means invalid
  1834. uint8_t pcc_gpio_polarity; // GPIO polarity for CTF
  1835. uint16_t smugoldenoffset;
  1836. uint32_t gpupll_vco_freq_10khz;
  1837. uint32_t bootup_smnclk_10khz;
  1838. uint32_t bootup_socclk_10khz;
  1839. uint32_t bootup_mp0clk_10khz;
  1840. uint32_t bootup_mp1clk_10khz;
  1841. uint32_t bootup_lclk_10khz;
  1842. uint32_t bootup_dcefclk_10khz;
  1843. uint32_t ctf_threshold_override_value;
  1844. uint32_t reserved[5];
  1845. };
  1846. struct atom_smu_info_v3_3 {
  1847. struct atom_common_table_header table_header;
  1848. uint8_t smuip_min_ver;
  1849. uint8_t smuip_max_ver;
  1850. uint8_t waflclk_ss_mode;
  1851. uint8_t gpuclk_ss_mode;
  1852. uint16_t sclk_ss_percentage;
  1853. uint16_t sclk_ss_rate_10hz;
  1854. uint16_t gpuclk_ss_percentage; // in unit of 0.001%
  1855. uint16_t gpuclk_ss_rate_10hz;
  1856. uint32_t core_refclk_10khz;
  1857. uint8_t ac_dc_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for AC/DC switching, =0xff means invalid
  1858. uint8_t ac_dc_polarity; // GPIO polarity for AC/DC switching
  1859. uint8_t vr0hot_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for VR0 HOT event, =0xff means invalid
  1860. uint8_t vr0hot_polarity; // GPIO polarity for VR0 HOT event
  1861. uint8_t vr1hot_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for VR1 HOT event , =0xff means invalid
  1862. uint8_t vr1hot_polarity; // GPIO polarity for VR1 HOT event
  1863. uint8_t fw_ctf_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for CTF, =0xff means invalid
  1864. uint8_t fw_ctf_polarity; // GPIO polarity for CTF
  1865. uint8_t pcc_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for PCC, =0xff means invalid
  1866. uint8_t pcc_gpio_polarity; // GPIO polarity for CTF
  1867. uint16_t smugoldenoffset;
  1868. uint32_t gpupll_vco_freq_10khz;
  1869. uint32_t bootup_smnclk_10khz;
  1870. uint32_t bootup_socclk_10khz;
  1871. uint32_t bootup_mp0clk_10khz;
  1872. uint32_t bootup_mp1clk_10khz;
  1873. uint32_t bootup_lclk_10khz;
  1874. uint32_t bootup_dcefclk_10khz;
  1875. uint32_t ctf_threshold_override_value;
  1876. uint32_t syspll3_0_vco_freq_10khz;
  1877. uint32_t syspll3_1_vco_freq_10khz;
  1878. uint32_t bootup_fclk_10khz;
  1879. uint32_t bootup_waflclk_10khz;
  1880. uint32_t smu_info_caps;
  1881. uint16_t waflclk_ss_percentage; // in unit of 0.001%
  1882. uint16_t smuinitoffset;
  1883. uint32_t reserved;
  1884. };
  1885. struct atom_smu_info_v3_5
  1886. {
  1887. struct atom_common_table_header table_header;
  1888. uint8_t smuip_min_ver;
  1889. uint8_t smuip_max_ver;
  1890. uint8_t waflclk_ss_mode;
  1891. uint8_t gpuclk_ss_mode;
  1892. uint16_t sclk_ss_percentage;
  1893. uint16_t sclk_ss_rate_10hz;
  1894. uint16_t gpuclk_ss_percentage; // in unit of 0.001%
  1895. uint16_t gpuclk_ss_rate_10hz;
  1896. uint32_t core_refclk_10khz;
  1897. uint32_t syspll0_1_vco_freq_10khz;
  1898. uint32_t syspll0_2_vco_freq_10khz;
  1899. uint8_t pcc_gpio_bit; // GPIO bit shift in SMU_GPIOPAD_A configured for PCC, =0xff means invalid
  1900. uint8_t pcc_gpio_polarity; // GPIO polarity for CTF
  1901. uint16_t smugoldenoffset;
  1902. uint32_t syspll0_0_vco_freq_10khz;
  1903. uint32_t bootup_smnclk_10khz;
  1904. uint32_t bootup_socclk_10khz;
  1905. uint32_t bootup_mp0clk_10khz;
  1906. uint32_t bootup_mp1clk_10khz;
  1907. uint32_t bootup_lclk_10khz;
  1908. uint32_t bootup_dcefclk_10khz;
  1909. uint32_t ctf_threshold_override_value;
  1910. uint32_t syspll3_0_vco_freq_10khz;
  1911. uint32_t syspll3_1_vco_freq_10khz;
  1912. uint32_t bootup_fclk_10khz;
  1913. uint32_t bootup_waflclk_10khz;
  1914. uint32_t smu_info_caps;
  1915. uint16_t waflclk_ss_percentage; // in unit of 0.001%
  1916. uint16_t smuinitoffset;
  1917. uint32_t bootup_dprefclk_10khz;
  1918. uint32_t bootup_usbclk_10khz;
  1919. uint32_t smb_slave_address;
  1920. uint32_t cg_fdo_ctrl0_val;
  1921. uint32_t cg_fdo_ctrl1_val;
  1922. uint32_t cg_fdo_ctrl2_val;
  1923. uint32_t gdfll_as_wait_ctrl_val;
  1924. uint32_t gdfll_as_step_ctrl_val;
  1925. uint32_t bootup_dtbclk_10khz;
  1926. uint32_t fclk_syspll_refclk_10khz;
  1927. uint32_t smusvi_svc0_val;
  1928. uint32_t smusvi_svc1_val;
  1929. uint32_t smusvi_svd0_val;
  1930. uint32_t smusvi_svd1_val;
  1931. uint32_t smusvi_svt0_val;
  1932. uint32_t smusvi_svt1_val;
  1933. uint32_t cg_tach_ctrl_val;
  1934. uint32_t cg_pump_ctrl1_val;
  1935. uint32_t cg_pump_tach_ctrl_val;
  1936. uint32_t thm_ctf_delay_val;
  1937. uint32_t thm_thermal_int_ctrl_val;
  1938. uint32_t thm_tmon_config_val;
  1939. uint32_t reserved[16];
  1940. };
  1941. struct atom_smu_info_v3_6
  1942. {
  1943. struct atom_common_table_header table_header;
  1944. uint8_t smuip_min_ver;
  1945. uint8_t smuip_max_ver;
  1946. uint8_t waflclk_ss_mode;
  1947. uint8_t gpuclk_ss_mode;
  1948. uint16_t sclk_ss_percentage;
  1949. uint16_t sclk_ss_rate_10hz;
  1950. uint16_t gpuclk_ss_percentage;
  1951. uint16_t gpuclk_ss_rate_10hz;
  1952. uint32_t core_refclk_10khz;
  1953. uint32_t syspll0_1_vco_freq_10khz;
  1954. uint32_t syspll0_2_vco_freq_10khz;
  1955. uint8_t pcc_gpio_bit;
  1956. uint8_t pcc_gpio_polarity;
  1957. uint16_t smugoldenoffset;
  1958. uint32_t syspll0_0_vco_freq_10khz;
  1959. uint32_t bootup_smnclk_10khz;
  1960. uint32_t bootup_socclk_10khz;
  1961. uint32_t bootup_mp0clk_10khz;
  1962. uint32_t bootup_mp1clk_10khz;
  1963. uint32_t bootup_lclk_10khz;
  1964. uint32_t bootup_dxioclk_10khz;
  1965. uint32_t ctf_threshold_override_value;
  1966. uint32_t syspll3_0_vco_freq_10khz;
  1967. uint32_t syspll3_1_vco_freq_10khz;
  1968. uint32_t bootup_fclk_10khz;
  1969. uint32_t bootup_waflclk_10khz;
  1970. uint32_t smu_info_caps;
  1971. uint16_t waflclk_ss_percentage;
  1972. uint16_t smuinitoffset;
  1973. uint32_t bootup_gfxavsclk_10khz;
  1974. uint32_t bootup_mpioclk_10khz;
  1975. uint32_t smb_slave_address;
  1976. uint32_t cg_fdo_ctrl0_val;
  1977. uint32_t cg_fdo_ctrl1_val;
  1978. uint32_t cg_fdo_ctrl2_val;
  1979. uint32_t gdfll_as_wait_ctrl_val;
  1980. uint32_t gdfll_as_step_ctrl_val;
  1981. uint32_t reserved_clk;
  1982. uint32_t fclk_syspll_refclk_10khz;
  1983. uint32_t smusvi_svc0_val;
  1984. uint32_t smusvi_svc1_val;
  1985. uint32_t smusvi_svd0_val;
  1986. uint32_t smusvi_svd1_val;
  1987. uint32_t smusvi_svt0_val;
  1988. uint32_t smusvi_svt1_val;
  1989. uint32_t cg_tach_ctrl_val;
  1990. uint32_t cg_pump_ctrl1_val;
  1991. uint32_t cg_pump_tach_ctrl_val;
  1992. uint32_t thm_ctf_delay_val;
  1993. uint32_t thm_thermal_int_ctrl_val;
  1994. uint32_t thm_tmon_config_val;
  1995. uint32_t bootup_vclk_10khz;
  1996. uint32_t bootup_dclk_10khz;
  1997. uint32_t smu_gpiopad_pu_en_val;
  1998. uint32_t smu_gpiopad_pd_en_val;
  1999. uint32_t reserved[12];
  2000. };
  2001. struct atom_smu_info_v4_0 {
  2002. struct atom_common_table_header table_header;
  2003. uint32_t bootup_gfxclk_bypass_10khz;
  2004. uint32_t bootup_usrclk_10khz;
  2005. uint32_t bootup_csrclk_10khz;
  2006. uint32_t core_refclk_10khz;
  2007. uint32_t syspll1_vco_freq_10khz;
  2008. uint32_t syspll2_vco_freq_10khz;
  2009. uint8_t pcc_gpio_bit;
  2010. uint8_t pcc_gpio_polarity;
  2011. uint16_t bootup_vddusr_mv;
  2012. uint32_t syspll0_vco_freq_10khz;
  2013. uint32_t bootup_smnclk_10khz;
  2014. uint32_t bootup_socclk_10khz;
  2015. uint32_t bootup_mp0clk_10khz;
  2016. uint32_t bootup_mp1clk_10khz;
  2017. uint32_t bootup_lclk_10khz;
  2018. uint32_t bootup_dcefclk_10khz;
  2019. uint32_t ctf_threshold_override_value;
  2020. uint32_t syspll3_vco_freq_10khz;
  2021. uint32_t mm_syspll_vco_freq_10khz;
  2022. uint32_t bootup_fclk_10khz;
  2023. uint32_t bootup_waflclk_10khz;
  2024. uint32_t smu_info_caps;
  2025. uint16_t waflclk_ss_percentage;
  2026. uint16_t smuinitoffset;
  2027. uint32_t bootup_dprefclk_10khz;
  2028. uint32_t bootup_usbclk_10khz;
  2029. uint32_t smb_slave_address;
  2030. uint32_t cg_fdo_ctrl0_val;
  2031. uint32_t cg_fdo_ctrl1_val;
  2032. uint32_t cg_fdo_ctrl2_val;
  2033. uint32_t gdfll_as_wait_ctrl_val;
  2034. uint32_t gdfll_as_step_ctrl_val;
  2035. uint32_t bootup_dtbclk_10khz;
  2036. uint32_t fclk_syspll_refclk_10khz;
  2037. uint32_t smusvi_svc0_val;
  2038. uint32_t smusvi_svc1_val;
  2039. uint32_t smusvi_svd0_val;
  2040. uint32_t smusvi_svd1_val;
  2041. uint32_t smusvi_svt0_val;
  2042. uint32_t smusvi_svt1_val;
  2043. uint32_t cg_tach_ctrl_val;
  2044. uint32_t cg_pump_ctrl1_val;
  2045. uint32_t cg_pump_tach_ctrl_val;
  2046. uint32_t thm_ctf_delay_val;
  2047. uint32_t thm_thermal_int_ctrl_val;
  2048. uint32_t thm_tmon_config_val;
  2049. uint32_t smbus_timing_cntrl0_val;
  2050. uint32_t smbus_timing_cntrl1_val;
  2051. uint32_t smbus_timing_cntrl2_val;
  2052. uint32_t pwr_disp_timer_global_control_val;
  2053. uint32_t bootup_mpioclk_10khz;
  2054. uint32_t bootup_dclk0_10khz;
  2055. uint32_t bootup_vclk0_10khz;
  2056. uint32_t bootup_dclk1_10khz;
  2057. uint32_t bootup_vclk1_10khz;
  2058. uint32_t bootup_baco400clk_10khz;
  2059. uint32_t bootup_baco1200clk_bypass_10khz;
  2060. uint32_t bootup_baco700clk_bypass_10khz;
  2061. uint32_t reserved[16];
  2062. };
  2063. /*
  2064. ***************************************************************************
  2065. Data Table smc_dpm_info structure
  2066. ***************************************************************************
  2067. */
  2068. struct atom_smc_dpm_info_v4_1
  2069. {
  2070. struct atom_common_table_header table_header;
  2071. uint8_t liquid1_i2c_address;
  2072. uint8_t liquid2_i2c_address;
  2073. uint8_t vr_i2c_address;
  2074. uint8_t plx_i2c_address;
  2075. uint8_t liquid_i2c_linescl;
  2076. uint8_t liquid_i2c_linesda;
  2077. uint8_t vr_i2c_linescl;
  2078. uint8_t vr_i2c_linesda;
  2079. uint8_t plx_i2c_linescl;
  2080. uint8_t plx_i2c_linesda;
  2081. uint8_t vrsensorpresent;
  2082. uint8_t liquidsensorpresent;
  2083. uint16_t maxvoltagestepgfx;
  2084. uint16_t maxvoltagestepsoc;
  2085. uint8_t vddgfxvrmapping;
  2086. uint8_t vddsocvrmapping;
  2087. uint8_t vddmem0vrmapping;
  2088. uint8_t vddmem1vrmapping;
  2089. uint8_t gfxulvphasesheddingmask;
  2090. uint8_t soculvphasesheddingmask;
  2091. uint8_t padding8_v[2];
  2092. uint16_t gfxmaxcurrent;
  2093. uint8_t gfxoffset;
  2094. uint8_t padding_telemetrygfx;
  2095. uint16_t socmaxcurrent;
  2096. uint8_t socoffset;
  2097. uint8_t padding_telemetrysoc;
  2098. uint16_t mem0maxcurrent;
  2099. uint8_t mem0offset;
  2100. uint8_t padding_telemetrymem0;
  2101. uint16_t mem1maxcurrent;
  2102. uint8_t mem1offset;
  2103. uint8_t padding_telemetrymem1;
  2104. uint8_t acdcgpio;
  2105. uint8_t acdcpolarity;
  2106. uint8_t vr0hotgpio;
  2107. uint8_t vr0hotpolarity;
  2108. uint8_t vr1hotgpio;
  2109. uint8_t vr1hotpolarity;
  2110. uint8_t padding1;
  2111. uint8_t padding2;
  2112. uint8_t ledpin0;
  2113. uint8_t ledpin1;
  2114. uint8_t ledpin2;
  2115. uint8_t padding8_4;
  2116. uint8_t pllgfxclkspreadenabled;
  2117. uint8_t pllgfxclkspreadpercent;
  2118. uint16_t pllgfxclkspreadfreq;
  2119. uint8_t uclkspreadenabled;
  2120. uint8_t uclkspreadpercent;
  2121. uint16_t uclkspreadfreq;
  2122. uint8_t socclkspreadenabled;
  2123. uint8_t socclkspreadpercent;
  2124. uint16_t socclkspreadfreq;
  2125. uint8_t acggfxclkspreadenabled;
  2126. uint8_t acggfxclkspreadpercent;
  2127. uint16_t acggfxclkspreadfreq;
  2128. uint8_t Vr2_I2C_address;
  2129. uint8_t padding_vr2[3];
  2130. uint32_t boardreserved[9];
  2131. };
  2132. /*
  2133. ***************************************************************************
  2134. Data Table smc_dpm_info structure
  2135. ***************************************************************************
  2136. */
  2137. struct atom_smc_dpm_info_v4_3
  2138. {
  2139. struct atom_common_table_header table_header;
  2140. uint8_t liquid1_i2c_address;
  2141. uint8_t liquid2_i2c_address;
  2142. uint8_t vr_i2c_address;
  2143. uint8_t plx_i2c_address;
  2144. uint8_t liquid_i2c_linescl;
  2145. uint8_t liquid_i2c_linesda;
  2146. uint8_t vr_i2c_linescl;
  2147. uint8_t vr_i2c_linesda;
  2148. uint8_t plx_i2c_linescl;
  2149. uint8_t plx_i2c_linesda;
  2150. uint8_t vrsensorpresent;
  2151. uint8_t liquidsensorpresent;
  2152. uint16_t maxvoltagestepgfx;
  2153. uint16_t maxvoltagestepsoc;
  2154. uint8_t vddgfxvrmapping;
  2155. uint8_t vddsocvrmapping;
  2156. uint8_t vddmem0vrmapping;
  2157. uint8_t vddmem1vrmapping;
  2158. uint8_t gfxulvphasesheddingmask;
  2159. uint8_t soculvphasesheddingmask;
  2160. uint8_t externalsensorpresent;
  2161. uint8_t padding8_v;
  2162. uint16_t gfxmaxcurrent;
  2163. uint8_t gfxoffset;
  2164. uint8_t padding_telemetrygfx;
  2165. uint16_t socmaxcurrent;
  2166. uint8_t socoffset;
  2167. uint8_t padding_telemetrysoc;
  2168. uint16_t mem0maxcurrent;
  2169. uint8_t mem0offset;
  2170. uint8_t padding_telemetrymem0;
  2171. uint16_t mem1maxcurrent;
  2172. uint8_t mem1offset;
  2173. uint8_t padding_telemetrymem1;
  2174. uint8_t acdcgpio;
  2175. uint8_t acdcpolarity;
  2176. uint8_t vr0hotgpio;
  2177. uint8_t vr0hotpolarity;
  2178. uint8_t vr1hotgpio;
  2179. uint8_t vr1hotpolarity;
  2180. uint8_t padding1;
  2181. uint8_t padding2;
  2182. uint8_t ledpin0;
  2183. uint8_t ledpin1;
  2184. uint8_t ledpin2;
  2185. uint8_t padding8_4;
  2186. uint8_t pllgfxclkspreadenabled;
  2187. uint8_t pllgfxclkspreadpercent;
  2188. uint16_t pllgfxclkspreadfreq;
  2189. uint8_t uclkspreadenabled;
  2190. uint8_t uclkspreadpercent;
  2191. uint16_t uclkspreadfreq;
  2192. uint8_t fclkspreadenabled;
  2193. uint8_t fclkspreadpercent;
  2194. uint16_t fclkspreadfreq;
  2195. uint8_t fllgfxclkspreadenabled;
  2196. uint8_t fllgfxclkspreadpercent;
  2197. uint16_t fllgfxclkspreadfreq;
  2198. uint32_t boardreserved[10];
  2199. };
  2200. struct smudpm_i2ccontrollerconfig_t {
  2201. uint32_t enabled;
  2202. uint32_t slaveaddress;
  2203. uint32_t controllerport;
  2204. uint32_t controllername;
  2205. uint32_t thermalthrottler;
  2206. uint32_t i2cprotocol;
  2207. uint32_t i2cspeed;
  2208. };
  2209. struct atom_smc_dpm_info_v4_4
  2210. {
  2211. struct atom_common_table_header table_header;
  2212. uint32_t i2c_padding[3];
  2213. uint16_t maxvoltagestepgfx;
  2214. uint16_t maxvoltagestepsoc;
  2215. uint8_t vddgfxvrmapping;
  2216. uint8_t vddsocvrmapping;
  2217. uint8_t vddmem0vrmapping;
  2218. uint8_t vddmem1vrmapping;
  2219. uint8_t gfxulvphasesheddingmask;
  2220. uint8_t soculvphasesheddingmask;
  2221. uint8_t externalsensorpresent;
  2222. uint8_t padding8_v;
  2223. uint16_t gfxmaxcurrent;
  2224. uint8_t gfxoffset;
  2225. uint8_t padding_telemetrygfx;
  2226. uint16_t socmaxcurrent;
  2227. uint8_t socoffset;
  2228. uint8_t padding_telemetrysoc;
  2229. uint16_t mem0maxcurrent;
  2230. uint8_t mem0offset;
  2231. uint8_t padding_telemetrymem0;
  2232. uint16_t mem1maxcurrent;
  2233. uint8_t mem1offset;
  2234. uint8_t padding_telemetrymem1;
  2235. uint8_t acdcgpio;
  2236. uint8_t acdcpolarity;
  2237. uint8_t vr0hotgpio;
  2238. uint8_t vr0hotpolarity;
  2239. uint8_t vr1hotgpio;
  2240. uint8_t vr1hotpolarity;
  2241. uint8_t padding1;
  2242. uint8_t padding2;
  2243. uint8_t ledpin0;
  2244. uint8_t ledpin1;
  2245. uint8_t ledpin2;
  2246. uint8_t padding8_4;
  2247. uint8_t pllgfxclkspreadenabled;
  2248. uint8_t pllgfxclkspreadpercent;
  2249. uint16_t pllgfxclkspreadfreq;
  2250. uint8_t uclkspreadenabled;
  2251. uint8_t uclkspreadpercent;
  2252. uint16_t uclkspreadfreq;
  2253. uint8_t fclkspreadenabled;
  2254. uint8_t fclkspreadpercent;
  2255. uint16_t fclkspreadfreq;
  2256. uint8_t fllgfxclkspreadenabled;
  2257. uint8_t fllgfxclkspreadpercent;
  2258. uint16_t fllgfxclkspreadfreq;
  2259. struct smudpm_i2ccontrollerconfig_t i2ccontrollers[7];
  2260. uint32_t boardreserved[10];
  2261. };
  2262. enum smudpm_v4_5_i2ccontrollername_e{
  2263. SMC_V4_5_I2C_CONTROLLER_NAME_VR_GFX = 0,
  2264. SMC_V4_5_I2C_CONTROLLER_NAME_VR_SOC,
  2265. SMC_V4_5_I2C_CONTROLLER_NAME_VR_VDDCI,
  2266. SMC_V4_5_I2C_CONTROLLER_NAME_VR_MVDD,
  2267. SMC_V4_5_I2C_CONTROLLER_NAME_LIQUID0,
  2268. SMC_V4_5_I2C_CONTROLLER_NAME_LIQUID1,
  2269. SMC_V4_5_I2C_CONTROLLER_NAME_PLX,
  2270. SMC_V4_5_I2C_CONTROLLER_NAME_SPARE,
  2271. SMC_V4_5_I2C_CONTROLLER_NAME_COUNT,
  2272. };
  2273. enum smudpm_v4_5_i2ccontrollerthrottler_e{
  2274. SMC_V4_5_I2C_CONTROLLER_THROTTLER_TYPE_NONE = 0,
  2275. SMC_V4_5_I2C_CONTROLLER_THROTTLER_VR_GFX,
  2276. SMC_V4_5_I2C_CONTROLLER_THROTTLER_VR_SOC,
  2277. SMC_V4_5_I2C_CONTROLLER_THROTTLER_VR_VDDCI,
  2278. SMC_V4_5_I2C_CONTROLLER_THROTTLER_VR_MVDD,
  2279. SMC_V4_5_I2C_CONTROLLER_THROTTLER_LIQUID0,
  2280. SMC_V4_5_I2C_CONTROLLER_THROTTLER_LIQUID1,
  2281. SMC_V4_5_I2C_CONTROLLER_THROTTLER_PLX,
  2282. SMC_V4_5_I2C_CONTROLLER_THROTTLER_COUNT,
  2283. };
  2284. enum smudpm_v4_5_i2ccontrollerprotocol_e{
  2285. SMC_V4_5_I2C_CONTROLLER_PROTOCOL_VR_0,
  2286. SMC_V4_5_I2C_CONTROLLER_PROTOCOL_VR_1,
  2287. SMC_V4_5_I2C_CONTROLLER_PROTOCOL_TMP_0,
  2288. SMC_V4_5_I2C_CONTROLLER_PROTOCOL_TMP_1,
  2289. SMC_V4_5_I2C_CONTROLLER_PROTOCOL_SPARE_0,
  2290. SMC_V4_5_I2C_CONTROLLER_PROTOCOL_SPARE_1,
  2291. SMC_V4_5_I2C_CONTROLLER_PROTOCOL_COUNT,
  2292. };
  2293. struct smudpm_i2c_controller_config_v2
  2294. {
  2295. uint8_t Enabled;
  2296. uint8_t Speed;
  2297. uint8_t Padding[2];
  2298. uint32_t SlaveAddress;
  2299. uint8_t ControllerPort;
  2300. uint8_t ControllerName;
  2301. uint8_t ThermalThrotter;
  2302. uint8_t I2cProtocol;
  2303. };
  2304. struct atom_smc_dpm_info_v4_5
  2305. {
  2306. struct atom_common_table_header table_header;
  2307. // SECTION: BOARD PARAMETERS
  2308. // I2C Control
  2309. struct smudpm_i2c_controller_config_v2 I2cControllers[8];
  2310. // SVI2 Board Parameters
  2311. uint16_t MaxVoltageStepGfx; // In mV(Q2) Max voltage step that SMU will request. Multiple steps are taken if voltage change exceeds this value.
  2312. uint16_t MaxVoltageStepSoc; // In mV(Q2) Max voltage step that SMU will request. Multiple steps are taken if voltage change exceeds this value.
  2313. uint8_t VddGfxVrMapping; // Use VR_MAPPING* bitfields
  2314. uint8_t VddSocVrMapping; // Use VR_MAPPING* bitfields
  2315. uint8_t VddMem0VrMapping; // Use VR_MAPPING* bitfields
  2316. uint8_t VddMem1VrMapping; // Use VR_MAPPING* bitfields
  2317. uint8_t GfxUlvPhaseSheddingMask; // set this to 1 to set PSI0/1 to 1 in ULV mode
  2318. uint8_t SocUlvPhaseSheddingMask; // set this to 1 to set PSI0/1 to 1 in ULV mode
  2319. uint8_t ExternalSensorPresent; // External RDI connected to TMON (aka TEMP IN)
  2320. uint8_t Padding8_V;
  2321. // Telemetry Settings
  2322. uint16_t GfxMaxCurrent; // in Amps
  2323. uint8_t GfxOffset; // in Amps
  2324. uint8_t Padding_TelemetryGfx;
  2325. uint16_t SocMaxCurrent; // in Amps
  2326. uint8_t SocOffset; // in Amps
  2327. uint8_t Padding_TelemetrySoc;
  2328. uint16_t Mem0MaxCurrent; // in Amps
  2329. uint8_t Mem0Offset; // in Amps
  2330. uint8_t Padding_TelemetryMem0;
  2331. uint16_t Mem1MaxCurrent; // in Amps
  2332. uint8_t Mem1Offset; // in Amps
  2333. uint8_t Padding_TelemetryMem1;
  2334. // GPIO Settings
  2335. uint8_t AcDcGpio; // GPIO pin configured for AC/DC switching
  2336. uint8_t AcDcPolarity; // GPIO polarity for AC/DC switching
  2337. uint8_t VR0HotGpio; // GPIO pin configured for VR0 HOT event
  2338. uint8_t VR0HotPolarity; // GPIO polarity for VR0 HOT event
  2339. uint8_t VR1HotGpio; // GPIO pin configured for VR1 HOT event
  2340. uint8_t VR1HotPolarity; // GPIO polarity for VR1 HOT event
  2341. uint8_t GthrGpio; // GPIO pin configured for GTHR Event
  2342. uint8_t GthrPolarity; // replace GPIO polarity for GTHR
  2343. // LED Display Settings
  2344. uint8_t LedPin0; // GPIO number for LedPin[0]
  2345. uint8_t LedPin1; // GPIO number for LedPin[1]
  2346. uint8_t LedPin2; // GPIO number for LedPin[2]
  2347. uint8_t padding8_4;
  2348. // GFXCLK PLL Spread Spectrum
  2349. uint8_t PllGfxclkSpreadEnabled; // on or off
  2350. uint8_t PllGfxclkSpreadPercent; // Q4.4
  2351. uint16_t PllGfxclkSpreadFreq; // kHz
  2352. // GFXCLK DFLL Spread Spectrum
  2353. uint8_t DfllGfxclkSpreadEnabled; // on or off
  2354. uint8_t DfllGfxclkSpreadPercent; // Q4.4
  2355. uint16_t DfllGfxclkSpreadFreq; // kHz
  2356. // UCLK Spread Spectrum
  2357. uint8_t UclkSpreadEnabled; // on or off
  2358. uint8_t UclkSpreadPercent; // Q4.4
  2359. uint16_t UclkSpreadFreq; // kHz
  2360. // SOCCLK Spread Spectrum
  2361. uint8_t SoclkSpreadEnabled; // on or off
  2362. uint8_t SocclkSpreadPercent; // Q4.4
  2363. uint16_t SocclkSpreadFreq; // kHz
  2364. // Total board power
  2365. uint16_t TotalBoardPower; //Only needed for TCP Estimated case, where TCP = TGP+Total Board Power
  2366. uint16_t BoardPadding;
  2367. // Mvdd Svi2 Div Ratio Setting
  2368. uint32_t MvddRatio; // This is used for MVDD Vid workaround. It has 16 fractional bits (Q16.16)
  2369. uint32_t BoardReserved[9];
  2370. };
  2371. struct atom_smc_dpm_info_v4_6
  2372. {
  2373. struct atom_common_table_header table_header;
  2374. // section: board parameters
  2375. uint32_t i2c_padding[3]; // old i2c control are moved to new area
  2376. uint16_t maxvoltagestepgfx; // in mv(q2) max voltage step that smu will request. multiple steps are taken if voltage change exceeds this value.
  2377. uint16_t maxvoltagestepsoc; // in mv(q2) max voltage step that smu will request. multiple steps are taken if voltage change exceeds this value.
  2378. uint8_t vddgfxvrmapping; // use vr_mapping* bitfields
  2379. uint8_t vddsocvrmapping; // use vr_mapping* bitfields
  2380. uint8_t vddmemvrmapping; // use vr_mapping* bitfields
  2381. uint8_t boardvrmapping; // use vr_mapping* bitfields
  2382. uint8_t gfxulvphasesheddingmask; // set this to 1 to set psi0/1 to 1 in ulv mode
  2383. uint8_t externalsensorpresent; // external rdi connected to tmon (aka temp in)
  2384. uint8_t padding8_v[2];
  2385. // telemetry settings
  2386. uint16_t gfxmaxcurrent; // in amps
  2387. uint8_t gfxoffset; // in amps
  2388. uint8_t padding_telemetrygfx;
  2389. uint16_t socmaxcurrent; // in amps
  2390. uint8_t socoffset; // in amps
  2391. uint8_t padding_telemetrysoc;
  2392. uint16_t memmaxcurrent; // in amps
  2393. uint8_t memoffset; // in amps
  2394. uint8_t padding_telemetrymem;
  2395. uint16_t boardmaxcurrent; // in amps
  2396. uint8_t boardoffset; // in amps
  2397. uint8_t padding_telemetryboardinput;
  2398. // gpio settings
  2399. uint8_t vr0hotgpio; // gpio pin configured for vr0 hot event
  2400. uint8_t vr0hotpolarity; // gpio polarity for vr0 hot event
  2401. uint8_t vr1hotgpio; // gpio pin configured for vr1 hot event
  2402. uint8_t vr1hotpolarity; // gpio polarity for vr1 hot event
  2403. // gfxclk pll spread spectrum
  2404. uint8_t pllgfxclkspreadenabled; // on or off
  2405. uint8_t pllgfxclkspreadpercent; // q4.4
  2406. uint16_t pllgfxclkspreadfreq; // khz
  2407. // uclk spread spectrum
  2408. uint8_t uclkspreadenabled; // on or off
  2409. uint8_t uclkspreadpercent; // q4.4
  2410. uint16_t uclkspreadfreq; // khz
  2411. // fclk spread spectrum
  2412. uint8_t fclkspreadenabled; // on or off
  2413. uint8_t fclkspreadpercent; // q4.4
  2414. uint16_t fclkspreadfreq; // khz
  2415. // gfxclk fll spread spectrum
  2416. uint8_t fllgfxclkspreadenabled; // on or off
  2417. uint8_t fllgfxclkspreadpercent; // q4.4
  2418. uint16_t fllgfxclkspreadfreq; // khz
  2419. // i2c controller structure
  2420. struct smudpm_i2c_controller_config_v2 i2ccontrollers[8];
  2421. // memory section
  2422. uint32_t memorychannelenabled; // for dram use only, max 32 channels enabled bit mask.
  2423. uint8_t drambitwidth; // for dram use only. see dram bit width type defines
  2424. uint8_t paddingmem[3];
  2425. // total board power
  2426. uint16_t totalboardpower; //only needed for tcp estimated case, where tcp = tgp+total board power
  2427. uint16_t boardpadding;
  2428. // section: xgmi training
  2429. uint8_t xgmilinkspeed[4];
  2430. uint8_t xgmilinkwidth[4];
  2431. uint16_t xgmifclkfreq[4];
  2432. uint16_t xgmisocvoltage[4];
  2433. // reserved
  2434. uint32_t boardreserved[10];
  2435. };
  2436. struct atom_smc_dpm_info_v4_7
  2437. {
  2438. struct atom_common_table_header table_header;
  2439. // SECTION: BOARD PARAMETERS
  2440. // I2C Control
  2441. struct smudpm_i2c_controller_config_v2 I2cControllers[8];
  2442. // SVI2 Board Parameters
  2443. uint16_t MaxVoltageStepGfx; // In mV(Q2) Max voltage step that SMU will request. Multiple steps are taken if voltage change exceeds this value.
  2444. uint16_t MaxVoltageStepSoc; // In mV(Q2) Max voltage step that SMU will request. Multiple steps are taken if voltage change exceeds this value.
  2445. uint8_t VddGfxVrMapping; // Use VR_MAPPING* bitfields
  2446. uint8_t VddSocVrMapping; // Use VR_MAPPING* bitfields
  2447. uint8_t VddMem0VrMapping; // Use VR_MAPPING* bitfields
  2448. uint8_t VddMem1VrMapping; // Use VR_MAPPING* bitfields
  2449. uint8_t GfxUlvPhaseSheddingMask; // set this to 1 to set PSI0/1 to 1 in ULV mode
  2450. uint8_t SocUlvPhaseSheddingMask; // set this to 1 to set PSI0/1 to 1 in ULV mode
  2451. uint8_t ExternalSensorPresent; // External RDI connected to TMON (aka TEMP IN)
  2452. uint8_t Padding8_V;
  2453. // Telemetry Settings
  2454. uint16_t GfxMaxCurrent; // in Amps
  2455. uint8_t GfxOffset; // in Amps
  2456. uint8_t Padding_TelemetryGfx;
  2457. uint16_t SocMaxCurrent; // in Amps
  2458. uint8_t SocOffset; // in Amps
  2459. uint8_t Padding_TelemetrySoc;
  2460. uint16_t Mem0MaxCurrent; // in Amps
  2461. uint8_t Mem0Offset; // in Amps
  2462. uint8_t Padding_TelemetryMem0;
  2463. uint16_t Mem1MaxCurrent; // in Amps
  2464. uint8_t Mem1Offset; // in Amps
  2465. uint8_t Padding_TelemetryMem1;
  2466. // GPIO Settings
  2467. uint8_t AcDcGpio; // GPIO pin configured for AC/DC switching
  2468. uint8_t AcDcPolarity; // GPIO polarity for AC/DC switching
  2469. uint8_t VR0HotGpio; // GPIO pin configured for VR0 HOT event
  2470. uint8_t VR0HotPolarity; // GPIO polarity for VR0 HOT event
  2471. uint8_t VR1HotGpio; // GPIO pin configured for VR1 HOT event
  2472. uint8_t VR1HotPolarity; // GPIO polarity for VR1 HOT event
  2473. uint8_t GthrGpio; // GPIO pin configured for GTHR Event
  2474. uint8_t GthrPolarity; // replace GPIO polarity for GTHR
  2475. // LED Display Settings
  2476. uint8_t LedPin0; // GPIO number for LedPin[0]
  2477. uint8_t LedPin1; // GPIO number for LedPin[1]
  2478. uint8_t LedPin2; // GPIO number for LedPin[2]
  2479. uint8_t padding8_4;
  2480. // GFXCLK PLL Spread Spectrum
  2481. uint8_t PllGfxclkSpreadEnabled; // on or off
  2482. uint8_t PllGfxclkSpreadPercent; // Q4.4
  2483. uint16_t PllGfxclkSpreadFreq; // kHz
  2484. // GFXCLK DFLL Spread Spectrum
  2485. uint8_t DfllGfxclkSpreadEnabled; // on or off
  2486. uint8_t DfllGfxclkSpreadPercent; // Q4.4
  2487. uint16_t DfllGfxclkSpreadFreq; // kHz
  2488. // UCLK Spread Spectrum
  2489. uint8_t UclkSpreadEnabled; // on or off
  2490. uint8_t UclkSpreadPercent; // Q4.4
  2491. uint16_t UclkSpreadFreq; // kHz
  2492. // SOCCLK Spread Spectrum
  2493. uint8_t SoclkSpreadEnabled; // on or off
  2494. uint8_t SocclkSpreadPercent; // Q4.4
  2495. uint16_t SocclkSpreadFreq; // kHz
  2496. // Total board power
  2497. uint16_t TotalBoardPower; //Only needed for TCP Estimated case, where TCP = TGP+Total Board Power
  2498. uint16_t BoardPadding;
  2499. // Mvdd Svi2 Div Ratio Setting
  2500. uint32_t MvddRatio; // This is used for MVDD Vid workaround. It has 16 fractional bits (Q16.16)
  2501. // GPIO pins for I2C communications with 2nd controller for Input Telemetry Sequence
  2502. uint8_t GpioI2cScl; // Serial Clock
  2503. uint8_t GpioI2cSda; // Serial Data
  2504. uint16_t GpioPadding;
  2505. // Additional LED Display Settings
  2506. uint8_t LedPin3; // GPIO number for LedPin[3] - PCIE GEN Speed
  2507. uint8_t LedPin4; // GPIO number for LedPin[4] - PMFW Error Status
  2508. uint16_t LedEnableMask;
  2509. // Power Limit Scalars
  2510. uint8_t PowerLimitScalar[4]; //[PPT_THROTTLER_COUNT]
  2511. uint8_t MvddUlvPhaseSheddingMask;
  2512. uint8_t VddciUlvPhaseSheddingMask;
  2513. uint8_t Padding8_Psi1;
  2514. uint8_t Padding8_Psi2;
  2515. uint32_t BoardReserved[5];
  2516. };
  2517. struct smudpm_i2c_controller_config_v3
  2518. {
  2519. uint8_t Enabled;
  2520. uint8_t Speed;
  2521. uint8_t SlaveAddress;
  2522. uint8_t ControllerPort;
  2523. uint8_t ControllerName;
  2524. uint8_t ThermalThrotter;
  2525. uint8_t I2cProtocol;
  2526. uint8_t PaddingConfig;
  2527. };
  2528. struct atom_smc_dpm_info_v4_9
  2529. {
  2530. struct atom_common_table_header table_header;
  2531. //SECTION: Gaming Clocks
  2532. //uint32_t GamingClk[6];
  2533. // SECTION: I2C Control
  2534. struct smudpm_i2c_controller_config_v3 I2cControllers[16];
  2535. uint8_t GpioScl; // GPIO Number for SCL Line, used only for CKSVII2C1
  2536. uint8_t GpioSda; // GPIO Number for SDA Line, used only for CKSVII2C1
  2537. uint8_t FchUsbPdSlaveAddr; //For requesting USB PD controller S-states via FCH I2C when entering PME turn off
  2538. uint8_t I2cSpare;
  2539. // SECTION: SVI2 Board Parameters
  2540. uint8_t VddGfxVrMapping; // Use VR_MAPPING* bitfields
  2541. uint8_t VddSocVrMapping; // Use VR_MAPPING* bitfields
  2542. uint8_t VddMem0VrMapping; // Use VR_MAPPING* bitfields
  2543. uint8_t VddMem1VrMapping; // Use VR_MAPPING* bitfields
  2544. uint8_t GfxUlvPhaseSheddingMask; // set this to 1 to set PSI0/1 to 1 in ULV mode
  2545. uint8_t SocUlvPhaseSheddingMask; // set this to 1 to set PSI0/1 to 1 in ULV mode
  2546. uint8_t VddciUlvPhaseSheddingMask; // set this to 1 to set PSI0/1 to 1 in ULV mode
  2547. uint8_t MvddUlvPhaseSheddingMask; // set this to 1 to set PSI0/1 to 1 in ULV mode
  2548. // SECTION: Telemetry Settings
  2549. uint16_t GfxMaxCurrent; // in Amps
  2550. uint8_t GfxOffset; // in Amps
  2551. uint8_t Padding_TelemetryGfx;
  2552. uint16_t SocMaxCurrent; // in Amps
  2553. uint8_t SocOffset; // in Amps
  2554. uint8_t Padding_TelemetrySoc;
  2555. uint16_t Mem0MaxCurrent; // in Amps
  2556. uint8_t Mem0Offset; // in Amps
  2557. uint8_t Padding_TelemetryMem0;
  2558. uint16_t Mem1MaxCurrent; // in Amps
  2559. uint8_t Mem1Offset; // in Amps
  2560. uint8_t Padding_TelemetryMem1;
  2561. uint32_t MvddRatio; // This is used for MVDD Svi2 Div Ratio workaround. It has 16 fractional bits (Q16.16)
  2562. // SECTION: GPIO Settings
  2563. uint8_t AcDcGpio; // GPIO pin configured for AC/DC switching
  2564. uint8_t AcDcPolarity; // GPIO polarity for AC/DC switching
  2565. uint8_t VR0HotGpio; // GPIO pin configured for VR0 HOT event
  2566. uint8_t VR0HotPolarity; // GPIO polarity for VR0 HOT event
  2567. uint8_t VR1HotGpio; // GPIO pin configured for VR1 HOT event
  2568. uint8_t VR1HotPolarity; // GPIO polarity for VR1 HOT event
  2569. uint8_t GthrGpio; // GPIO pin configured for GTHR Event
  2570. uint8_t GthrPolarity; // replace GPIO polarity for GTHR
  2571. // LED Display Settings
  2572. uint8_t LedPin0; // GPIO number for LedPin[0]
  2573. uint8_t LedPin1; // GPIO number for LedPin[1]
  2574. uint8_t LedPin2; // GPIO number for LedPin[2]
  2575. uint8_t LedEnableMask;
  2576. uint8_t LedPcie; // GPIO number for PCIE results
  2577. uint8_t LedError; // GPIO number for Error Cases
  2578. uint8_t LedSpare1[2];
  2579. // SECTION: Clock Spread Spectrum
  2580. // GFXCLK PLL Spread Spectrum
  2581. uint8_t PllGfxclkSpreadEnabled; // on or off
  2582. uint8_t PllGfxclkSpreadPercent; // Q4.4
  2583. uint16_t PllGfxclkSpreadFreq; // kHz
  2584. // GFXCLK DFLL Spread Spectrum
  2585. uint8_t DfllGfxclkSpreadEnabled; // on or off
  2586. uint8_t DfllGfxclkSpreadPercent; // Q4.4
  2587. uint16_t DfllGfxclkSpreadFreq; // kHz
  2588. // UCLK Spread Spectrum
  2589. uint8_t UclkSpreadEnabled; // on or off
  2590. uint8_t UclkSpreadPercent; // Q4.4
  2591. uint16_t UclkSpreadFreq; // kHz
  2592. // FCLK Spread Spectrum
  2593. uint8_t FclkSpreadEnabled; // on or off
  2594. uint8_t FclkSpreadPercent; // Q4.4
  2595. uint16_t FclkSpreadFreq; // kHz
  2596. // Section: Memory Config
  2597. uint32_t MemoryChannelEnabled; // For DRAM use only, Max 32 channels enabled bit mask.
  2598. uint8_t DramBitWidth; // For DRAM use only. See Dram Bit width type defines
  2599. uint8_t PaddingMem1[3];
  2600. // Section: Total Board Power
  2601. uint16_t TotalBoardPower; //Only needed for TCP Estimated case, where TCP = TGP+Total Board Power
  2602. uint16_t BoardPowerPadding;
  2603. // SECTION: XGMI Training
  2604. uint8_t XgmiLinkSpeed [4];
  2605. uint8_t XgmiLinkWidth [4];
  2606. uint16_t XgmiFclkFreq [4];
  2607. uint16_t XgmiSocVoltage [4];
  2608. // SECTION: Board Reserved
  2609. uint32_t BoardReserved[16];
  2610. };
  2611. struct atom_smc_dpm_info_v4_10
  2612. {
  2613. struct atom_common_table_header table_header;
  2614. // SECTION: BOARD PARAMETERS
  2615. // Telemetry Settings
  2616. uint16_t GfxMaxCurrent; // in Amps
  2617. uint8_t GfxOffset; // in Amps
  2618. uint8_t Padding_TelemetryGfx;
  2619. uint16_t SocMaxCurrent; // in Amps
  2620. uint8_t SocOffset; // in Amps
  2621. uint8_t Padding_TelemetrySoc;
  2622. uint16_t MemMaxCurrent; // in Amps
  2623. uint8_t MemOffset; // in Amps
  2624. uint8_t Padding_TelemetryMem;
  2625. uint16_t BoardMaxCurrent; // in Amps
  2626. uint8_t BoardOffset; // in Amps
  2627. uint8_t Padding_TelemetryBoardInput;
  2628. // Platform input telemetry voltage coefficient
  2629. uint32_t BoardVoltageCoeffA; // decode by /1000
  2630. uint32_t BoardVoltageCoeffB; // decode by /1000
  2631. // GPIO Settings
  2632. uint8_t VR0HotGpio; // GPIO pin configured for VR0 HOT event
  2633. uint8_t VR0HotPolarity; // GPIO polarity for VR0 HOT event
  2634. uint8_t VR1HotGpio; // GPIO pin configured for VR1 HOT event
  2635. uint8_t VR1HotPolarity; // GPIO polarity for VR1 HOT event
  2636. // UCLK Spread Spectrum
  2637. uint8_t UclkSpreadEnabled; // on or off
  2638. uint8_t UclkSpreadPercent; // Q4.4
  2639. uint16_t UclkSpreadFreq; // kHz
  2640. // FCLK Spread Spectrum
  2641. uint8_t FclkSpreadEnabled; // on or off
  2642. uint8_t FclkSpreadPercent; // Q4.4
  2643. uint16_t FclkSpreadFreq; // kHz
  2644. // I2C Controller Structure
  2645. struct smudpm_i2c_controller_config_v3 I2cControllers[8];
  2646. // GPIO pins for I2C communications with 2nd controller for Input Telemetry Sequence
  2647. uint8_t GpioI2cScl; // Serial Clock
  2648. uint8_t GpioI2cSda; // Serial Data
  2649. uint16_t spare5;
  2650. uint32_t reserved[16];
  2651. };
  2652. /*
  2653. ***************************************************************************
  2654. Data Table asic_profiling_info structure
  2655. ***************************************************************************
  2656. */
  2657. struct atom_asic_profiling_info_v4_1
  2658. {
  2659. struct atom_common_table_header table_header;
  2660. uint32_t maxvddc;
  2661. uint32_t minvddc;
  2662. uint32_t avfs_meannsigma_acontant0;
  2663. uint32_t avfs_meannsigma_acontant1;
  2664. uint32_t avfs_meannsigma_acontant2;
  2665. uint16_t avfs_meannsigma_dc_tol_sigma;
  2666. uint16_t avfs_meannsigma_platform_mean;
  2667. uint16_t avfs_meannsigma_platform_sigma;
  2668. uint32_t gb_vdroop_table_cksoff_a0;
  2669. uint32_t gb_vdroop_table_cksoff_a1;
  2670. uint32_t gb_vdroop_table_cksoff_a2;
  2671. uint32_t gb_vdroop_table_ckson_a0;
  2672. uint32_t gb_vdroop_table_ckson_a1;
  2673. uint32_t gb_vdroop_table_ckson_a2;
  2674. uint32_t avfsgb_fuse_table_cksoff_m1;
  2675. uint32_t avfsgb_fuse_table_cksoff_m2;
  2676. uint32_t avfsgb_fuse_table_cksoff_b;
  2677. uint32_t avfsgb_fuse_table_ckson_m1;
  2678. uint32_t avfsgb_fuse_table_ckson_m2;
  2679. uint32_t avfsgb_fuse_table_ckson_b;
  2680. uint16_t max_voltage_0_25mv;
  2681. uint8_t enable_gb_vdroop_table_cksoff;
  2682. uint8_t enable_gb_vdroop_table_ckson;
  2683. uint8_t enable_gb_fuse_table_cksoff;
  2684. uint8_t enable_gb_fuse_table_ckson;
  2685. uint16_t psm_age_comfactor;
  2686. uint8_t enable_apply_avfs_cksoff_voltage;
  2687. uint8_t reserved;
  2688. uint32_t dispclk2gfxclk_a;
  2689. uint32_t dispclk2gfxclk_b;
  2690. uint32_t dispclk2gfxclk_c;
  2691. uint32_t pixclk2gfxclk_a;
  2692. uint32_t pixclk2gfxclk_b;
  2693. uint32_t pixclk2gfxclk_c;
  2694. uint32_t dcefclk2gfxclk_a;
  2695. uint32_t dcefclk2gfxclk_b;
  2696. uint32_t dcefclk2gfxclk_c;
  2697. uint32_t phyclk2gfxclk_a;
  2698. uint32_t phyclk2gfxclk_b;
  2699. uint32_t phyclk2gfxclk_c;
  2700. };
  2701. struct atom_asic_profiling_info_v4_2 {
  2702. struct atom_common_table_header table_header;
  2703. uint32_t maxvddc;
  2704. uint32_t minvddc;
  2705. uint32_t avfs_meannsigma_acontant0;
  2706. uint32_t avfs_meannsigma_acontant1;
  2707. uint32_t avfs_meannsigma_acontant2;
  2708. uint16_t avfs_meannsigma_dc_tol_sigma;
  2709. uint16_t avfs_meannsigma_platform_mean;
  2710. uint16_t avfs_meannsigma_platform_sigma;
  2711. uint32_t gb_vdroop_table_cksoff_a0;
  2712. uint32_t gb_vdroop_table_cksoff_a1;
  2713. uint32_t gb_vdroop_table_cksoff_a2;
  2714. uint32_t gb_vdroop_table_ckson_a0;
  2715. uint32_t gb_vdroop_table_ckson_a1;
  2716. uint32_t gb_vdroop_table_ckson_a2;
  2717. uint32_t avfsgb_fuse_table_cksoff_m1;
  2718. uint32_t avfsgb_fuse_table_cksoff_m2;
  2719. uint32_t avfsgb_fuse_table_cksoff_b;
  2720. uint32_t avfsgb_fuse_table_ckson_m1;
  2721. uint32_t avfsgb_fuse_table_ckson_m2;
  2722. uint32_t avfsgb_fuse_table_ckson_b;
  2723. uint16_t max_voltage_0_25mv;
  2724. uint8_t enable_gb_vdroop_table_cksoff;
  2725. uint8_t enable_gb_vdroop_table_ckson;
  2726. uint8_t enable_gb_fuse_table_cksoff;
  2727. uint8_t enable_gb_fuse_table_ckson;
  2728. uint16_t psm_age_comfactor;
  2729. uint8_t enable_apply_avfs_cksoff_voltage;
  2730. uint8_t reserved;
  2731. uint32_t dispclk2gfxclk_a;
  2732. uint32_t dispclk2gfxclk_b;
  2733. uint32_t dispclk2gfxclk_c;
  2734. uint32_t pixclk2gfxclk_a;
  2735. uint32_t pixclk2gfxclk_b;
  2736. uint32_t pixclk2gfxclk_c;
  2737. uint32_t dcefclk2gfxclk_a;
  2738. uint32_t dcefclk2gfxclk_b;
  2739. uint32_t dcefclk2gfxclk_c;
  2740. uint32_t phyclk2gfxclk_a;
  2741. uint32_t phyclk2gfxclk_b;
  2742. uint32_t phyclk2gfxclk_c;
  2743. uint32_t acg_gb_vdroop_table_a0;
  2744. uint32_t acg_gb_vdroop_table_a1;
  2745. uint32_t acg_gb_vdroop_table_a2;
  2746. uint32_t acg_avfsgb_fuse_table_m1;
  2747. uint32_t acg_avfsgb_fuse_table_m2;
  2748. uint32_t acg_avfsgb_fuse_table_b;
  2749. uint8_t enable_acg_gb_vdroop_table;
  2750. uint8_t enable_acg_gb_fuse_table;
  2751. uint32_t acg_dispclk2gfxclk_a;
  2752. uint32_t acg_dispclk2gfxclk_b;
  2753. uint32_t acg_dispclk2gfxclk_c;
  2754. uint32_t acg_pixclk2gfxclk_a;
  2755. uint32_t acg_pixclk2gfxclk_b;
  2756. uint32_t acg_pixclk2gfxclk_c;
  2757. uint32_t acg_dcefclk2gfxclk_a;
  2758. uint32_t acg_dcefclk2gfxclk_b;
  2759. uint32_t acg_dcefclk2gfxclk_c;
  2760. uint32_t acg_phyclk2gfxclk_a;
  2761. uint32_t acg_phyclk2gfxclk_b;
  2762. uint32_t acg_phyclk2gfxclk_c;
  2763. };
  2764. /*
  2765. ***************************************************************************
  2766. Data Table multimedia_info structure
  2767. ***************************************************************************
  2768. */
  2769. struct atom_multimedia_info_v2_1
  2770. {
  2771. struct atom_common_table_header table_header;
  2772. uint8_t uvdip_min_ver;
  2773. uint8_t uvdip_max_ver;
  2774. uint8_t vceip_min_ver;
  2775. uint8_t vceip_max_ver;
  2776. uint16_t uvd_enc_max_input_width_pixels;
  2777. uint16_t uvd_enc_max_input_height_pixels;
  2778. uint16_t vce_enc_max_input_width_pixels;
  2779. uint16_t vce_enc_max_input_height_pixels;
  2780. uint32_t uvd_enc_max_bandwidth; // 16x16 pixels/sec, codec independent
  2781. uint32_t vce_enc_max_bandwidth; // 16x16 pixels/sec, codec independent
  2782. };
  2783. /*
  2784. ***************************************************************************
  2785. Data Table umc_info structure
  2786. ***************************************************************************
  2787. */
  2788. struct atom_umc_info_v3_1
  2789. {
  2790. struct atom_common_table_header table_header;
  2791. uint32_t ucode_version;
  2792. uint32_t ucode_rom_startaddr;
  2793. uint32_t ucode_length;
  2794. uint16_t umc_reg_init_offset;
  2795. uint16_t customer_ucode_name_offset;
  2796. uint16_t mclk_ss_percentage;
  2797. uint16_t mclk_ss_rate_10hz;
  2798. uint8_t umcip_min_ver;
  2799. uint8_t umcip_max_ver;
  2800. uint8_t vram_type; //enum of atom_dgpu_vram_type
  2801. uint8_t umc_config;
  2802. uint32_t mem_refclk_10khz;
  2803. };
  2804. // umc_info.umc_config
  2805. enum atom_umc_config_def {
  2806. UMC_CONFIG__ENABLE_1KB_INTERLEAVE_MODE = 0x00000001,
  2807. UMC_CONFIG__DEFAULT_MEM_ECC_ENABLE = 0x00000002,
  2808. UMC_CONFIG__ENABLE_HBM_LANE_REPAIR = 0x00000004,
  2809. UMC_CONFIG__ENABLE_BANK_HARVESTING = 0x00000008,
  2810. UMC_CONFIG__ENABLE_PHY_REINIT = 0x00000010,
  2811. UMC_CONFIG__DISABLE_UCODE_CHKSTATUS = 0x00000020,
  2812. };
  2813. struct atom_umc_info_v3_2
  2814. {
  2815. struct atom_common_table_header table_header;
  2816. uint32_t ucode_version;
  2817. uint32_t ucode_rom_startaddr;
  2818. uint32_t ucode_length;
  2819. uint16_t umc_reg_init_offset;
  2820. uint16_t customer_ucode_name_offset;
  2821. uint16_t mclk_ss_percentage;
  2822. uint16_t mclk_ss_rate_10hz;
  2823. uint8_t umcip_min_ver;
  2824. uint8_t umcip_max_ver;
  2825. uint8_t vram_type; //enum of atom_dgpu_vram_type
  2826. uint8_t umc_config;
  2827. uint32_t mem_refclk_10khz;
  2828. uint32_t pstate_uclk_10khz[4];
  2829. uint16_t umcgoldenoffset;
  2830. uint16_t densitygoldenoffset;
  2831. };
  2832. struct atom_umc_info_v3_3
  2833. {
  2834. struct atom_common_table_header table_header;
  2835. uint32_t ucode_reserved;
  2836. uint32_t ucode_rom_startaddr;
  2837. uint32_t ucode_length;
  2838. uint16_t umc_reg_init_offset;
  2839. uint16_t customer_ucode_name_offset;
  2840. uint16_t mclk_ss_percentage;
  2841. uint16_t mclk_ss_rate_10hz;
  2842. uint8_t umcip_min_ver;
  2843. uint8_t umcip_max_ver;
  2844. uint8_t vram_type; //enum of atom_dgpu_vram_type
  2845. uint8_t umc_config;
  2846. uint32_t mem_refclk_10khz;
  2847. uint32_t pstate_uclk_10khz[4];
  2848. uint16_t umcgoldenoffset;
  2849. uint16_t densitygoldenoffset;
  2850. uint32_t umc_config1;
  2851. uint32_t bist_data_startaddr;
  2852. uint32_t reserved[2];
  2853. };
  2854. enum atom_umc_config1_def {
  2855. UMC_CONFIG1__ENABLE_PSTATE_PHASE_STORE_TRAIN = 0x00000001,
  2856. UMC_CONFIG1__ENABLE_AUTO_FRAMING = 0x00000002,
  2857. UMC_CONFIG1__ENABLE_RESTORE_BIST_DATA = 0x00000004,
  2858. UMC_CONFIG1__DISABLE_STROBE_MODE = 0x00000008,
  2859. UMC_CONFIG1__DEBUG_DATA_PARITY_EN = 0x00000010,
  2860. UMC_CONFIG1__ENABLE_ECC_CAPABLE = 0x00010000,
  2861. };
  2862. struct atom_umc_info_v4_0 {
  2863. struct atom_common_table_header table_header;
  2864. uint32_t ucode_reserved[5];
  2865. uint8_t umcip_min_ver;
  2866. uint8_t umcip_max_ver;
  2867. uint8_t vram_type;
  2868. uint8_t umc_config;
  2869. uint32_t mem_refclk_10khz;
  2870. uint32_t clk_reserved[4];
  2871. uint32_t golden_reserved;
  2872. uint32_t umc_config1;
  2873. uint32_t reserved[2];
  2874. uint8_t channel_num;
  2875. uint8_t channel_width;
  2876. uint8_t channel_reserve[2];
  2877. uint8_t umc_info_reserved[16];
  2878. };
  2879. /*
  2880. ***************************************************************************
  2881. Data Table vram_info structure
  2882. ***************************************************************************
  2883. */
  2884. struct atom_vram_module_v9 {
  2885. // Design Specific Values
  2886. uint32_t memory_size; // Total memory size in unit of MB for CONFIG_MEMSIZE zeros
  2887. uint32_t channel_enable; // bit vector, each bit indicate specific channel enable or not
  2888. uint32_t max_mem_clk; // max memory clock of this memory in unit of 10kHz, =0 means it is not defined
  2889. uint16_t reserved[3];
  2890. uint16_t mem_voltage; // mem_voltage
  2891. uint16_t vram_module_size; // Size of atom_vram_module_v9
  2892. uint8_t ext_memory_id; // Current memory module ID
  2893. uint8_t memory_type; // enum of atom_dgpu_vram_type
  2894. uint8_t channel_num; // Number of mem. channels supported in this module
  2895. uint8_t channel_width; // CHANNEL_16BIT/CHANNEL_32BIT/CHANNEL_64BIT
  2896. uint8_t density; // _8Mx32, _16Mx32, _16Mx16, _32Mx16
  2897. uint8_t tunningset_id; // MC phy registers set per.
  2898. uint8_t vender_rev_id; // [7:4] Revision, [3:0] Vendor code
  2899. uint8_t refreshrate; // [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms)
  2900. uint8_t hbm_ven_rev_id; // hbm_ven_rev_id
  2901. uint8_t vram_rsd2; // reserved
  2902. char dram_pnstring[20]; // part number end with '0'.
  2903. };
  2904. struct atom_vram_info_header_v2_3 {
  2905. struct atom_common_table_header table_header;
  2906. uint16_t mem_adjust_tbloffset; // offset of atom_umc_init_reg_block structure for memory vendor specific UMC adjust setting
  2907. uint16_t mem_clk_patch_tbloffset; // offset of atom_umc_init_reg_block structure for memory clock specific UMC setting
  2908. uint16_t mc_adjust_pertile_tbloffset; // offset of atom_umc_init_reg_block structure for Per Byte Offset Preset Settings
  2909. uint16_t mc_phyinit_tbloffset; // offset of atom_umc_init_reg_block structure for MC phy init set
  2910. uint16_t dram_data_remap_tbloffset; // reserved for now
  2911. uint16_t tmrs_seq_offset; // offset of HBM tmrs
  2912. uint16_t post_ucode_init_offset; // offset of atom_umc_init_reg_block structure for MC phy init after MC uCode complete umc init
  2913. uint16_t vram_rsd2;
  2914. uint8_t vram_module_num; // indicate number of VRAM module
  2915. uint8_t umcip_min_ver;
  2916. uint8_t umcip_max_ver;
  2917. uint8_t mc_phy_tile_num; // indicate the MCD tile number which use in DramDataRemapTbl and usMcAdjustPerTileTblOffset
  2918. struct atom_vram_module_v9 vram_module[16]; // just for allocation, real number of blocks is in ucNumOfVRAMModule;
  2919. };
  2920. /*
  2921. ***************************************************************************
  2922. Data Table vram_info v3.0 structure
  2923. ***************************************************************************
  2924. */
  2925. struct atom_vram_module_v3_0 {
  2926. uint8_t density;
  2927. uint8_t tunningset_id;
  2928. uint8_t ext_memory_id;
  2929. uint8_t dram_vendor_id;
  2930. uint16_t dram_info_offset;
  2931. uint16_t mem_tuning_offset;
  2932. uint16_t tmrs_seq_offset;
  2933. uint16_t reserved1;
  2934. uint32_t dram_size_per_ch;
  2935. uint32_t reserved[3];
  2936. char dram_pnstring[40];
  2937. };
  2938. struct atom_vram_info_header_v3_0 {
  2939. struct atom_common_table_header table_header;
  2940. uint16_t mem_tuning_table_offset;
  2941. uint16_t dram_info_table_offset;
  2942. uint16_t tmrs_table_offset;
  2943. uint16_t mc_init_table_offset;
  2944. uint16_t dram_data_remap_table_offset;
  2945. uint16_t umc_emuinittable_offset;
  2946. uint16_t reserved_sub_table_offset[2];
  2947. uint8_t vram_module_num;
  2948. uint8_t umcip_min_ver;
  2949. uint8_t umcip_max_ver;
  2950. uint8_t mc_phy_tile_num;
  2951. uint8_t memory_type;
  2952. uint8_t channel_num;
  2953. uint8_t channel_width;
  2954. uint8_t reserved1;
  2955. uint32_t channel_enable;
  2956. uint32_t channel1_enable;
  2957. uint32_t feature_enable;
  2958. uint32_t feature1_enable;
  2959. uint32_t hardcode_mem_size;
  2960. uint32_t reserved4[4];
  2961. struct atom_vram_module_v3_0 vram_module[8];
  2962. };
  2963. struct atom_umc_register_addr_info{
  2964. uint32_t umc_register_addr:24;
  2965. uint32_t umc_reg_type_ind:1;
  2966. uint32_t umc_reg_rsvd:7;
  2967. };
  2968. //atom_umc_register_addr_info.
  2969. enum atom_umc_register_addr_info_flag{
  2970. b3ATOM_UMC_REG_ADD_INFO_INDIRECT_ACCESS =0x01,
  2971. };
  2972. union atom_umc_register_addr_info_access
  2973. {
  2974. struct atom_umc_register_addr_info umc_reg_addr;
  2975. uint32_t u32umc_reg_addr;
  2976. };
  2977. struct atom_umc_reg_setting_id_config{
  2978. uint32_t memclockrange:24;
  2979. uint32_t mem_blk_id:8;
  2980. };
  2981. union atom_umc_reg_setting_id_config_access
  2982. {
  2983. struct atom_umc_reg_setting_id_config umc_id_access;
  2984. uint32_t u32umc_id_access;
  2985. };
  2986. struct atom_umc_reg_setting_data_block{
  2987. union atom_umc_reg_setting_id_config_access block_id;
  2988. uint32_t u32umc_reg_data[1];
  2989. };
  2990. struct atom_umc_init_reg_block{
  2991. uint16_t umc_reg_num;
  2992. uint16_t reserved;
  2993. union atom_umc_register_addr_info_access umc_reg_list[1]; //for allocation purpose, the real number come from umc_reg_num;
  2994. struct atom_umc_reg_setting_data_block umc_reg_setting_list[1];
  2995. };
  2996. struct atom_vram_module_v10 {
  2997. // Design Specific Values
  2998. uint32_t memory_size; // Total memory size in unit of MB for CONFIG_MEMSIZE zeros
  2999. uint32_t channel_enable; // bit vector, each bit indicate specific channel enable or not
  3000. uint32_t max_mem_clk; // max memory clock of this memory in unit of 10kHz, =0 means it is not defined
  3001. uint16_t reserved[3];
  3002. uint16_t mem_voltage; // mem_voltage
  3003. uint16_t vram_module_size; // Size of atom_vram_module_v9
  3004. uint8_t ext_memory_id; // Current memory module ID
  3005. uint8_t memory_type; // enum of atom_dgpu_vram_type
  3006. uint8_t channel_num; // Number of mem. channels supported in this module
  3007. uint8_t channel_width; // CHANNEL_16BIT/CHANNEL_32BIT/CHANNEL_64BIT
  3008. uint8_t density; // _8Mx32, _16Mx32, _16Mx16, _32Mx16
  3009. uint8_t tunningset_id; // MC phy registers set per
  3010. uint8_t vender_rev_id; // [7:4] Revision, [3:0] Vendor code
  3011. uint8_t refreshrate; // [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms)
  3012. uint8_t vram_flags; // bit0= bankgroup enable
  3013. uint8_t vram_rsd2; // reserved
  3014. uint16_t gddr6_mr10; // gddr6 mode register10 value
  3015. uint16_t gddr6_mr1; // gddr6 mode register1 value
  3016. uint16_t gddr6_mr2; // gddr6 mode register2 value
  3017. uint16_t gddr6_mr7; // gddr6 mode register7 value
  3018. char dram_pnstring[20]; // part number end with '0'
  3019. };
  3020. struct atom_vram_info_header_v2_4 {
  3021. struct atom_common_table_header table_header;
  3022. uint16_t mem_adjust_tbloffset; // offset of atom_umc_init_reg_block structure for memory vendor specific UMC adjust setting
  3023. uint16_t mem_clk_patch_tbloffset; // offset of atom_umc_init_reg_block structure for memory clock specific UMC setting
  3024. uint16_t mc_adjust_pertile_tbloffset; // offset of atom_umc_init_reg_block structure for Per Byte Offset Preset Settings
  3025. uint16_t mc_phyinit_tbloffset; // offset of atom_umc_init_reg_block structure for MC phy init set
  3026. uint16_t dram_data_remap_tbloffset; // reserved for now
  3027. uint16_t reserved; // offset of reserved
  3028. uint16_t post_ucode_init_offset; // offset of atom_umc_init_reg_block structure for MC phy init after MC uCode complete umc init
  3029. uint16_t vram_rsd2;
  3030. uint8_t vram_module_num; // indicate number of VRAM module
  3031. uint8_t umcip_min_ver;
  3032. uint8_t umcip_max_ver;
  3033. uint8_t mc_phy_tile_num; // indicate the MCD tile number which use in DramDataRemapTbl and usMcAdjustPerTileTblOffset
  3034. struct atom_vram_module_v10 vram_module[16]; // just for allocation, real number of blocks is in ucNumOfVRAMModule;
  3035. };
  3036. struct atom_vram_module_v11 {
  3037. // Design Specific Values
  3038. uint32_t memory_size; // Total memory size in unit of MB for CONFIG_MEMSIZE zeros
  3039. uint32_t channel_enable; // bit vector, each bit indicate specific channel enable or not
  3040. uint16_t mem_voltage; // mem_voltage
  3041. uint16_t vram_module_size; // Size of atom_vram_module_v9
  3042. uint8_t ext_memory_id; // Current memory module ID
  3043. uint8_t memory_type; // enum of atom_dgpu_vram_type
  3044. uint8_t channel_num; // Number of mem. channels supported in this module
  3045. uint8_t channel_width; // CHANNEL_16BIT/CHANNEL_32BIT/CHANNEL_64BIT
  3046. uint8_t density; // _8Mx32, _16Mx32, _16Mx16, _32Mx16
  3047. uint8_t tunningset_id; // MC phy registers set per.
  3048. uint16_t reserved[4]; // reserved
  3049. uint8_t vender_rev_id; // [7:4] Revision, [3:0] Vendor code
  3050. uint8_t refreshrate; // [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms)
  3051. uint8_t vram_flags; // bit0= bankgroup enable
  3052. uint8_t vram_rsd2; // reserved
  3053. uint16_t gddr6_mr10; // gddr6 mode register10 value
  3054. uint16_t gddr6_mr0; // gddr6 mode register0 value
  3055. uint16_t gddr6_mr1; // gddr6 mode register1 value
  3056. uint16_t gddr6_mr2; // gddr6 mode register2 value
  3057. uint16_t gddr6_mr4; // gddr6 mode register4 value
  3058. uint16_t gddr6_mr7; // gddr6 mode register7 value
  3059. uint16_t gddr6_mr8; // gddr6 mode register8 value
  3060. char dram_pnstring[40]; // part number end with '0'.
  3061. };
  3062. struct atom_gddr6_ac_timing_v2_5 {
  3063. uint32_t u32umc_id_access;
  3064. uint8_t RL;
  3065. uint8_t WL;
  3066. uint8_t tRAS;
  3067. uint8_t tRC;
  3068. uint16_t tREFI;
  3069. uint8_t tRFC;
  3070. uint8_t tRFCpb;
  3071. uint8_t tRREFD;
  3072. uint8_t tRCDRD;
  3073. uint8_t tRCDWR;
  3074. uint8_t tRP;
  3075. uint8_t tRRDS;
  3076. uint8_t tRRDL;
  3077. uint8_t tWR;
  3078. uint8_t tWTRS;
  3079. uint8_t tWTRL;
  3080. uint8_t tFAW;
  3081. uint8_t tCCDS;
  3082. uint8_t tCCDL;
  3083. uint8_t tCRCRL;
  3084. uint8_t tCRCWL;
  3085. uint8_t tCKE;
  3086. uint8_t tCKSRE;
  3087. uint8_t tCKSRX;
  3088. uint8_t tRTPS;
  3089. uint8_t tRTPL;
  3090. uint8_t tMRD;
  3091. uint8_t tMOD;
  3092. uint8_t tXS;
  3093. uint8_t tXHP;
  3094. uint8_t tXSMRS;
  3095. uint32_t tXSH;
  3096. uint8_t tPD;
  3097. uint8_t tXP;
  3098. uint8_t tCPDED;
  3099. uint8_t tACTPDE;
  3100. uint8_t tPREPDE;
  3101. uint8_t tREFPDE;
  3102. uint8_t tMRSPDEN;
  3103. uint8_t tRDSRE;
  3104. uint8_t tWRSRE;
  3105. uint8_t tPPD;
  3106. uint8_t tCCDMW;
  3107. uint8_t tWTRTR;
  3108. uint8_t tLTLTR;
  3109. uint8_t tREFTR;
  3110. uint8_t VNDR;
  3111. uint8_t reserved[9];
  3112. };
  3113. struct atom_gddr6_bit_byte_remap {
  3114. uint32_t dphy_byteremap; //mmUMC_DPHY_ByteRemap
  3115. uint32_t dphy_bitremap0; //mmUMC_DPHY_BitRemap0
  3116. uint32_t dphy_bitremap1; //mmUMC_DPHY_BitRemap1
  3117. uint32_t dphy_bitremap2; //mmUMC_DPHY_BitRemap2
  3118. uint32_t aphy_bitremap0; //mmUMC_APHY_BitRemap0
  3119. uint32_t aphy_bitremap1; //mmUMC_APHY_BitRemap1
  3120. uint32_t phy_dram; //mmUMC_PHY_DRAM
  3121. };
  3122. struct atom_gddr6_dram_data_remap {
  3123. uint32_t table_size;
  3124. uint8_t phyintf_ck_inverted[8]; //UMC_PHY_PHYINTF_CNTL.INV_CK
  3125. struct atom_gddr6_bit_byte_remap bit_byte_remap[16];
  3126. };
  3127. struct atom_vram_info_header_v2_5 {
  3128. struct atom_common_table_header table_header;
  3129. uint16_t mem_adjust_tbloffset; // offset of atom_umc_init_reg_block structure for memory vendor specific UMC adjust settings
  3130. uint16_t gddr6_ac_timing_offset; // offset of atom_gddr6_ac_timing_v2_5 structure for memory clock specific UMC settings
  3131. uint16_t mc_adjust_pertile_tbloffset; // offset of atom_umc_init_reg_block structure for Per Byte Offset Preset Settings
  3132. uint16_t mc_phyinit_tbloffset; // offset of atom_umc_init_reg_block structure for MC phy init set
  3133. uint16_t dram_data_remap_tbloffset; // offset of atom_gddr6_dram_data_remap array to indicate DRAM data lane to GPU mapping
  3134. uint16_t reserved; // offset of reserved
  3135. uint16_t post_ucode_init_offset; // offset of atom_umc_init_reg_block structure for MC phy init after MC uCode complete umc init
  3136. uint16_t strobe_mode_patch_tbloffset; // offset of atom_umc_init_reg_block structure for Strobe Mode memory clock specific UMC settings
  3137. uint8_t vram_module_num; // indicate number of VRAM module
  3138. uint8_t umcip_min_ver;
  3139. uint8_t umcip_max_ver;
  3140. uint8_t mc_phy_tile_num; // indicate the MCD tile number which use in DramDataRemapTbl and usMcAdjustPerTileTblOffset
  3141. struct atom_vram_module_v11 vram_module[16]; // just for allocation, real number of blocks is in ucNumOfVRAMModule;
  3142. };
  3143. struct atom_vram_info_header_v2_6 {
  3144. struct atom_common_table_header table_header;
  3145. uint16_t mem_adjust_tbloffset;
  3146. uint16_t mem_clk_patch_tbloffset;
  3147. uint16_t mc_adjust_pertile_tbloffset;
  3148. uint16_t mc_phyinit_tbloffset;
  3149. uint16_t dram_data_remap_tbloffset;
  3150. uint16_t tmrs_seq_offset;
  3151. uint16_t post_ucode_init_offset;
  3152. uint16_t vram_rsd2;
  3153. uint8_t vram_module_num;
  3154. uint8_t umcip_min_ver;
  3155. uint8_t umcip_max_ver;
  3156. uint8_t mc_phy_tile_num;
  3157. struct atom_vram_module_v9 vram_module[16];
  3158. };
  3159. /*
  3160. ***************************************************************************
  3161. Data Table voltageobject_info structure
  3162. ***************************************************************************
  3163. */
  3164. struct atom_i2c_data_entry
  3165. {
  3166. uint16_t i2c_reg_index; // i2c register address, can be up to 16bit
  3167. uint16_t i2c_reg_data; // i2c register data, can be up to 16bit
  3168. };
  3169. struct atom_voltage_object_header_v4{
  3170. uint8_t voltage_type; //enum atom_voltage_type
  3171. uint8_t voltage_mode; //enum atom_voltage_object_mode
  3172. uint16_t object_size; //Size of Object
  3173. };
  3174. // atom_voltage_object_header_v4.voltage_mode
  3175. enum atom_voltage_object_mode
  3176. {
  3177. VOLTAGE_OBJ_GPIO_LUT = 0, //VOLTAGE and GPIO Lookup table ->atom_gpio_voltage_object_v4
  3178. VOLTAGE_OBJ_VR_I2C_INIT_SEQ = 3, //VOLTAGE REGULATOR INIT sequece through I2C -> atom_i2c_voltage_object_v4
  3179. VOLTAGE_OBJ_PHASE_LUT = 4, //Set Vregulator Phase lookup table ->atom_gpio_voltage_object_v4
  3180. VOLTAGE_OBJ_SVID2 = 7, //Indicate voltage control by SVID2 ->atom_svid2_voltage_object_v4
  3181. VOLTAGE_OBJ_EVV = 8,
  3182. VOLTAGE_OBJ_MERGED_POWER = 9,
  3183. };
  3184. struct atom_i2c_voltage_object_v4
  3185. {
  3186. struct atom_voltage_object_header_v4 header; // voltage mode = VOLTAGE_OBJ_VR_I2C_INIT_SEQ
  3187. uint8_t regulator_id; //Indicate Voltage Regulator Id
  3188. uint8_t i2c_id;
  3189. uint8_t i2c_slave_addr;
  3190. uint8_t i2c_control_offset;
  3191. uint8_t i2c_flag; // Bit0: 0 - One byte data; 1 - Two byte data
  3192. uint8_t i2c_speed; // =0, use default i2c speed, otherwise use it in unit of kHz.
  3193. uint8_t reserved[2];
  3194. struct atom_i2c_data_entry i2cdatalut[1]; // end with 0xff
  3195. };
  3196. // ATOM_I2C_VOLTAGE_OBJECT_V3.ucVoltageControlFlag
  3197. enum atom_i2c_voltage_control_flag
  3198. {
  3199. VOLTAGE_DATA_ONE_BYTE = 0,
  3200. VOLTAGE_DATA_TWO_BYTE = 1,
  3201. };
  3202. struct atom_voltage_gpio_map_lut
  3203. {
  3204. uint32_t voltage_gpio_reg_val; // The Voltage ID which is used to program GPIO register
  3205. uint16_t voltage_level_mv; // The corresponding Voltage Value, in mV
  3206. };
  3207. struct atom_gpio_voltage_object_v4
  3208. {
  3209. struct atom_voltage_object_header_v4 header; // voltage mode = VOLTAGE_OBJ_GPIO_LUT or VOLTAGE_OBJ_PHASE_LUT
  3210. uint8_t gpio_control_id; // default is 0 which indicate control through CG VID mode
  3211. uint8_t gpio_entry_num; // indiate the entry numbers of Votlage/Gpio value Look up table
  3212. uint8_t phase_delay_us; // phase delay in unit of micro second
  3213. uint8_t reserved;
  3214. uint32_t gpio_mask_val; // GPIO Mask value
  3215. struct atom_voltage_gpio_map_lut voltage_gpio_lut[] __counted_by(gpio_entry_num);
  3216. };
  3217. struct atom_svid2_voltage_object_v4
  3218. {
  3219. struct atom_voltage_object_header_v4 header; // voltage mode = VOLTAGE_OBJ_SVID2
  3220. uint8_t loadline_psi1; // bit4:0= loadline setting ( Core Loadline trim and offset trim ), bit5=0:PSI1_L disable =1: PSI1_L enable
  3221. uint8_t psi0_l_vid_thresd; // VR PSI0_L VID threshold
  3222. uint8_t psi0_enable; //
  3223. uint8_t maxvstep;
  3224. uint8_t telemetry_offset;
  3225. uint8_t telemetry_gain;
  3226. uint16_t reserved1;
  3227. };
  3228. struct atom_merged_voltage_object_v4
  3229. {
  3230. struct atom_voltage_object_header_v4 header; // voltage mode = VOLTAGE_OBJ_MERGED_POWER
  3231. uint8_t merged_powerrail_type; //enum atom_voltage_type
  3232. uint8_t reserved[3];
  3233. };
  3234. union atom_voltage_object_v4{
  3235. struct atom_gpio_voltage_object_v4 gpio_voltage_obj;
  3236. struct atom_i2c_voltage_object_v4 i2c_voltage_obj;
  3237. struct atom_svid2_voltage_object_v4 svid2_voltage_obj;
  3238. struct atom_merged_voltage_object_v4 merged_voltage_obj;
  3239. };
  3240. struct atom_voltage_objects_info_v4_1
  3241. {
  3242. struct atom_common_table_header table_header;
  3243. union atom_voltage_object_v4 voltage_object[1]; //Info for Voltage control
  3244. };
  3245. /*
  3246. ***************************************************************************
  3247. All Command Function structure definition
  3248. ***************************************************************************
  3249. */
  3250. /*
  3251. ***************************************************************************
  3252. Structures used by asic_init
  3253. ***************************************************************************
  3254. */
  3255. struct asic_init_engine_parameters
  3256. {
  3257. uint32_t sclkfreqin10khz:24;
  3258. uint32_t engineflag:8; /* enum atom_asic_init_engine_flag */
  3259. };
  3260. struct asic_init_mem_parameters
  3261. {
  3262. uint32_t mclkfreqin10khz:24;
  3263. uint32_t memflag:8; /* enum atom_asic_init_mem_flag */
  3264. };
  3265. struct asic_init_parameters_v2_1
  3266. {
  3267. struct asic_init_engine_parameters engineparam;
  3268. struct asic_init_mem_parameters memparam;
  3269. };
  3270. struct asic_init_ps_allocation_v2_1
  3271. {
  3272. struct asic_init_parameters_v2_1 param;
  3273. uint32_t reserved[16];
  3274. };
  3275. enum atom_asic_init_engine_flag
  3276. {
  3277. b3NORMAL_ENGINE_INIT = 0,
  3278. b3SRIOV_SKIP_ASIC_INIT = 0x02,
  3279. b3SRIOV_LOAD_UCODE = 0x40,
  3280. };
  3281. enum atom_asic_init_mem_flag
  3282. {
  3283. b3NORMAL_MEM_INIT = 0,
  3284. b3DRAM_SELF_REFRESH_EXIT =0x20,
  3285. };
  3286. /*
  3287. ***************************************************************************
  3288. Structures used by setengineclock
  3289. ***************************************************************************
  3290. */
  3291. struct set_engine_clock_parameters_v2_1
  3292. {
  3293. uint32_t sclkfreqin10khz:24;
  3294. uint32_t sclkflag:8; /* enum atom_set_engine_mem_clock_flag, */
  3295. uint32_t reserved[10];
  3296. };
  3297. struct set_engine_clock_ps_allocation_v2_1
  3298. {
  3299. struct set_engine_clock_parameters_v2_1 clockinfo;
  3300. uint32_t reserved[10];
  3301. };
  3302. enum atom_set_engine_mem_clock_flag
  3303. {
  3304. b3NORMAL_CHANGE_CLOCK = 0,
  3305. b3FIRST_TIME_CHANGE_CLOCK = 0x08,
  3306. b3STORE_DPM_TRAINGING = 0x40, //Applicable to memory clock change,when set, it store specific DPM mode training result
  3307. };
  3308. /*
  3309. ***************************************************************************
  3310. Structures used by getengineclock
  3311. ***************************************************************************
  3312. */
  3313. struct get_engine_clock_parameter
  3314. {
  3315. uint32_t sclk_10khz; // current engine speed in 10KHz unit
  3316. uint32_t reserved;
  3317. };
  3318. /*
  3319. ***************************************************************************
  3320. Structures used by setmemoryclock
  3321. ***************************************************************************
  3322. */
  3323. struct set_memory_clock_parameters_v2_1
  3324. {
  3325. uint32_t mclkfreqin10khz:24;
  3326. uint32_t mclkflag:8; /* enum atom_set_engine_mem_clock_flag, */
  3327. uint32_t reserved[10];
  3328. };
  3329. struct set_memory_clock_ps_allocation_v2_1
  3330. {
  3331. struct set_memory_clock_parameters_v2_1 clockinfo;
  3332. uint32_t reserved[10];
  3333. };
  3334. /*
  3335. ***************************************************************************
  3336. Structures used by getmemoryclock
  3337. ***************************************************************************
  3338. */
  3339. struct get_memory_clock_parameter
  3340. {
  3341. uint32_t mclk_10khz; // current engine speed in 10KHz unit
  3342. uint32_t reserved;
  3343. };
  3344. /*
  3345. ***************************************************************************
  3346. Structures used by setvoltage
  3347. ***************************************************************************
  3348. */
  3349. struct set_voltage_parameters_v1_4
  3350. {
  3351. uint8_t voltagetype; /* enum atom_voltage_type */
  3352. uint8_t command; /* Indicate action: Set voltage level, enum atom_set_voltage_command */
  3353. uint16_t vlevel_mv; /* real voltage level in unit of mv or Voltage Phase (0, 1, 2, .. ) */
  3354. };
  3355. //set_voltage_parameters_v2_1.voltagemode
  3356. enum atom_set_voltage_command{
  3357. ATOM_SET_VOLTAGE = 0,
  3358. ATOM_INIT_VOLTAGE_REGULATOR = 3,
  3359. ATOM_SET_VOLTAGE_PHASE = 4,
  3360. ATOM_GET_LEAKAGE_ID = 8,
  3361. };
  3362. struct set_voltage_ps_allocation_v1_4
  3363. {
  3364. struct set_voltage_parameters_v1_4 setvoltageparam;
  3365. uint32_t reserved[10];
  3366. };
  3367. /*
  3368. ***************************************************************************
  3369. Structures used by computegpuclockparam
  3370. ***************************************************************************
  3371. */
  3372. //ATOM_COMPUTE_CLOCK_FREQ.ulComputeClockFlag
  3373. enum atom_gpu_clock_type
  3374. {
  3375. COMPUTE_GPUCLK_INPUT_FLAG_DEFAULT_GPUCLK =0x00,
  3376. COMPUTE_GPUCLK_INPUT_FLAG_GFXCLK =0x01,
  3377. COMPUTE_GPUCLK_INPUT_FLAG_UCLK =0x02,
  3378. };
  3379. struct compute_gpu_clock_input_parameter_v1_8
  3380. {
  3381. uint32_t gpuclock_10khz:24; //Input= target clock, output = actual clock
  3382. uint32_t gpu_clock_type:8; //Input indicate clock type: enum atom_gpu_clock_type
  3383. uint32_t reserved[5];
  3384. };
  3385. struct compute_gpu_clock_output_parameter_v1_8
  3386. {
  3387. uint32_t gpuclock_10khz:24; //Input= target clock, output = actual clock
  3388. uint32_t dfs_did:8; //return parameter: DFS divider which is used to program to register directly
  3389. uint32_t pll_fb_mult; //Feedback Multiplier, bit 8:0 int, bit 15:12 post_div, bit 31:16 frac
  3390. uint32_t pll_ss_fbsmult; // Spread FB Mult: bit 8:0 int, bit 31:16 frac
  3391. uint16_t pll_ss_slew_frac;
  3392. uint8_t pll_ss_enable;
  3393. uint8_t reserved;
  3394. uint32_t reserved1[2];
  3395. };
  3396. /*
  3397. ***************************************************************************
  3398. Structures used by ReadEfuseValue
  3399. ***************************************************************************
  3400. */
  3401. struct read_efuse_input_parameters_v3_1
  3402. {
  3403. uint16_t efuse_start_index;
  3404. uint8_t reserved;
  3405. uint8_t bitslen;
  3406. };
  3407. // ReadEfuseValue input/output parameter
  3408. union read_efuse_value_parameters_v3_1
  3409. {
  3410. struct read_efuse_input_parameters_v3_1 efuse_info;
  3411. uint32_t efusevalue;
  3412. };
  3413. /*
  3414. ***************************************************************************
  3415. Structures used by getsmuclockinfo
  3416. ***************************************************************************
  3417. */
  3418. struct atom_get_smu_clock_info_parameters_v3_1
  3419. {
  3420. uint8_t syspll_id; // 0= syspll0, 1=syspll1, 2=syspll2
  3421. uint8_t clk_id; // atom_smu9_syspll0_clock_id (only valid when command == GET_SMU_CLOCK_INFO_V3_1_GET_CLOCK_FREQ )
  3422. uint8_t command; // enum of atom_get_smu_clock_info_command
  3423. uint8_t dfsdid; // =0: get DFS DID from register, >0, give DFS divider, (only valid when command == GET_SMU_CLOCK_INFO_V3_1_GET_CLOCK_FREQ )
  3424. };
  3425. enum atom_get_smu_clock_info_command
  3426. {
  3427. GET_SMU_CLOCK_INFO_V3_1_GET_CLOCK_FREQ = 0,
  3428. GET_SMU_CLOCK_INFO_V3_1_GET_PLLVCO_FREQ = 1,
  3429. GET_SMU_CLOCK_INFO_V3_1_GET_PLLREFCLK_FREQ = 2,
  3430. };
  3431. enum atom_smu9_syspll0_clock_id
  3432. {
  3433. SMU9_SYSPLL0_SMNCLK_ID = 0, // SMNCLK
  3434. SMU9_SYSPLL0_SOCCLK_ID = 1, // SOCCLK (FCLK)
  3435. SMU9_SYSPLL0_MP0CLK_ID = 2, // MP0CLK
  3436. SMU9_SYSPLL0_MP1CLK_ID = 3, // MP1CLK
  3437. SMU9_SYSPLL0_LCLK_ID = 4, // LCLK
  3438. SMU9_SYSPLL0_DCLK_ID = 5, // DCLK
  3439. SMU9_SYSPLL0_VCLK_ID = 6, // VCLK
  3440. SMU9_SYSPLL0_ECLK_ID = 7, // ECLK
  3441. SMU9_SYSPLL0_DCEFCLK_ID = 8, // DCEFCLK
  3442. SMU9_SYSPLL0_DPREFCLK_ID = 10, // DPREFCLK
  3443. SMU9_SYSPLL0_DISPCLK_ID = 11, // DISPCLK
  3444. };
  3445. enum atom_smu11_syspll_id {
  3446. SMU11_SYSPLL0_ID = 0,
  3447. SMU11_SYSPLL1_0_ID = 1,
  3448. SMU11_SYSPLL1_1_ID = 2,
  3449. SMU11_SYSPLL1_2_ID = 3,
  3450. SMU11_SYSPLL2_ID = 4,
  3451. SMU11_SYSPLL3_0_ID = 5,
  3452. SMU11_SYSPLL3_1_ID = 6,
  3453. };
  3454. enum atom_smu11_syspll0_clock_id {
  3455. SMU11_SYSPLL0_ECLK_ID = 0, // ECLK
  3456. SMU11_SYSPLL0_SOCCLK_ID = 1, // SOCCLK
  3457. SMU11_SYSPLL0_MP0CLK_ID = 2, // MP0CLK
  3458. SMU11_SYSPLL0_DCLK_ID = 3, // DCLK
  3459. SMU11_SYSPLL0_VCLK_ID = 4, // VCLK
  3460. SMU11_SYSPLL0_DCEFCLK_ID = 5, // DCEFCLK
  3461. };
  3462. enum atom_smu11_syspll1_0_clock_id {
  3463. SMU11_SYSPLL1_0_UCLKA_ID = 0, // UCLK_a
  3464. };
  3465. enum atom_smu11_syspll1_1_clock_id {
  3466. SMU11_SYSPLL1_0_UCLKB_ID = 0, // UCLK_b
  3467. };
  3468. enum atom_smu11_syspll1_2_clock_id {
  3469. SMU11_SYSPLL1_0_FCLK_ID = 0, // FCLK
  3470. };
  3471. enum atom_smu11_syspll2_clock_id {
  3472. SMU11_SYSPLL2_GFXCLK_ID = 0, // GFXCLK
  3473. };
  3474. enum atom_smu11_syspll3_0_clock_id {
  3475. SMU11_SYSPLL3_0_WAFCLK_ID = 0, // WAFCLK
  3476. SMU11_SYSPLL3_0_DISPCLK_ID = 1, // DISPCLK
  3477. SMU11_SYSPLL3_0_DPREFCLK_ID = 2, // DPREFCLK
  3478. };
  3479. enum atom_smu11_syspll3_1_clock_id {
  3480. SMU11_SYSPLL3_1_MP1CLK_ID = 0, // MP1CLK
  3481. SMU11_SYSPLL3_1_SMNCLK_ID = 1, // SMNCLK
  3482. SMU11_SYSPLL3_1_LCLK_ID = 2, // LCLK
  3483. };
  3484. enum atom_smu12_syspll_id {
  3485. SMU12_SYSPLL0_ID = 0,
  3486. SMU12_SYSPLL1_ID = 1,
  3487. SMU12_SYSPLL2_ID = 2,
  3488. SMU12_SYSPLL3_0_ID = 3,
  3489. SMU12_SYSPLL3_1_ID = 4,
  3490. };
  3491. enum atom_smu12_syspll0_clock_id {
  3492. SMU12_SYSPLL0_SMNCLK_ID = 0, // SOCCLK
  3493. SMU12_SYSPLL0_SOCCLK_ID = 1, // SOCCLK
  3494. SMU12_SYSPLL0_MP0CLK_ID = 2, // MP0CLK
  3495. SMU12_SYSPLL0_MP1CLK_ID = 3, // MP1CLK
  3496. SMU12_SYSPLL0_MP2CLK_ID = 4, // MP2CLK
  3497. SMU12_SYSPLL0_VCLK_ID = 5, // VCLK
  3498. SMU12_SYSPLL0_LCLK_ID = 6, // LCLK
  3499. SMU12_SYSPLL0_DCLK_ID = 7, // DCLK
  3500. SMU12_SYSPLL0_ACLK_ID = 8, // ACLK
  3501. SMU12_SYSPLL0_ISPCLK_ID = 9, // ISPCLK
  3502. SMU12_SYSPLL0_SHUBCLK_ID = 10, // SHUBCLK
  3503. };
  3504. enum atom_smu12_syspll1_clock_id {
  3505. SMU12_SYSPLL1_DISPCLK_ID = 0, // DISPCLK
  3506. SMU12_SYSPLL1_DPPCLK_ID = 1, // DPPCLK
  3507. SMU12_SYSPLL1_DPREFCLK_ID = 2, // DPREFCLK
  3508. SMU12_SYSPLL1_DCFCLK_ID = 3, // DCFCLK
  3509. };
  3510. enum atom_smu12_syspll2_clock_id {
  3511. SMU12_SYSPLL2_Pre_GFXCLK_ID = 0, // Pre_GFXCLK
  3512. };
  3513. enum atom_smu12_syspll3_0_clock_id {
  3514. SMU12_SYSPLL3_0_FCLK_ID = 0, // FCLK
  3515. };
  3516. enum atom_smu12_syspll3_1_clock_id {
  3517. SMU12_SYSPLL3_1_UMCCLK_ID = 0, // UMCCLK
  3518. };
  3519. struct atom_get_smu_clock_info_output_parameters_v3_1
  3520. {
  3521. union {
  3522. uint32_t smu_clock_freq_hz;
  3523. uint32_t syspllvcofreq_10khz;
  3524. uint32_t sysspllrefclk_10khz;
  3525. }atom_smu_outputclkfreq;
  3526. };
  3527. /*
  3528. ***************************************************************************
  3529. Structures used by dynamicmemorysettings
  3530. ***************************************************************************
  3531. */
  3532. enum atom_dynamic_memory_setting_command
  3533. {
  3534. COMPUTE_MEMORY_PLL_PARAM = 1,
  3535. COMPUTE_ENGINE_PLL_PARAM = 2,
  3536. ADJUST_MC_SETTING_PARAM = 3,
  3537. };
  3538. /* when command = COMPUTE_MEMORY_PLL_PARAM or ADJUST_MC_SETTING_PARAM */
  3539. struct dynamic_mclk_settings_parameters_v2_1
  3540. {
  3541. uint32_t mclk_10khz:24; //Input= target mclk
  3542. uint32_t command:8; //command enum of atom_dynamic_memory_setting_command
  3543. uint32_t reserved;
  3544. };
  3545. /* when command = COMPUTE_ENGINE_PLL_PARAM */
  3546. struct dynamic_sclk_settings_parameters_v2_1
  3547. {
  3548. uint32_t sclk_10khz:24; //Input= target mclk
  3549. uint32_t command:8; //command enum of atom_dynamic_memory_setting_command
  3550. uint32_t mclk_10khz;
  3551. uint32_t reserved;
  3552. };
  3553. union dynamic_memory_settings_parameters_v2_1
  3554. {
  3555. struct dynamic_mclk_settings_parameters_v2_1 mclk_setting;
  3556. struct dynamic_sclk_settings_parameters_v2_1 sclk_setting;
  3557. };
  3558. /*
  3559. ***************************************************************************
  3560. Structures used by memorytraining
  3561. ***************************************************************************
  3562. */
  3563. enum atom_umc6_0_ucode_function_call_enum_id
  3564. {
  3565. UMC60_UCODE_FUNC_ID_REINIT = 0,
  3566. UMC60_UCODE_FUNC_ID_ENTER_SELFREFRESH = 1,
  3567. UMC60_UCODE_FUNC_ID_EXIT_SELFREFRESH = 2,
  3568. };
  3569. struct memory_training_parameters_v2_1
  3570. {
  3571. uint8_t ucode_func_id;
  3572. uint8_t ucode_reserved[3];
  3573. uint32_t reserved[5];
  3574. };
  3575. /*
  3576. ***************************************************************************
  3577. Structures used by setpixelclock
  3578. ***************************************************************************
  3579. */
  3580. struct set_pixel_clock_parameter_v1_7
  3581. {
  3582. uint32_t pixclk_100hz; // target the pixel clock to drive the CRTC timing in unit of 100Hz.
  3583. uint8_t pll_id; // ATOM_PHY_PLL0/ATOM_PHY_PLL1/ATOM_PPLL0
  3584. uint8_t encoderobjid; // ASIC encoder id defined in objectId.h,
  3585. // indicate which graphic encoder will be used.
  3586. uint8_t encoder_mode; // Encoder mode:
  3587. uint8_t miscinfo; // enum atom_set_pixel_clock_v1_7_misc_info
  3588. uint8_t crtc_id; // enum of atom_crtc_def
  3589. uint8_t deep_color_ratio; // HDMI panel bit depth: enum atom_set_pixel_clock_v1_7_deepcolor_ratio
  3590. uint8_t reserved1[2];
  3591. uint32_t reserved2;
  3592. };
  3593. //ucMiscInfo
  3594. enum atom_set_pixel_clock_v1_7_misc_info
  3595. {
  3596. PIXEL_CLOCK_V7_MISC_FORCE_PROG_PPLL = 0x01,
  3597. PIXEL_CLOCK_V7_MISC_PROG_PHYPLL = 0x02,
  3598. PIXEL_CLOCK_V7_MISC_YUV420_MODE = 0x04,
  3599. PIXEL_CLOCK_V7_MISC_DVI_DUALLINK_EN = 0x08,
  3600. PIXEL_CLOCK_V7_MISC_REF_DIV_SRC = 0x30,
  3601. PIXEL_CLOCK_V7_MISC_REF_DIV_SRC_XTALIN = 0x00,
  3602. PIXEL_CLOCK_V7_MISC_REF_DIV_SRC_PCIE = 0x10,
  3603. PIXEL_CLOCK_V7_MISC_REF_DIV_SRC_GENLK = 0x20,
  3604. PIXEL_CLOCK_V7_MISC_REF_DIV_SRC_REFPAD = 0x30,
  3605. PIXEL_CLOCK_V7_MISC_ATOMIC_UPDATE = 0x40,
  3606. PIXEL_CLOCK_V7_MISC_FORCE_SS_DIS = 0x80,
  3607. };
  3608. /* deep_color_ratio */
  3609. enum atom_set_pixel_clock_v1_7_deepcolor_ratio
  3610. {
  3611. PIXEL_CLOCK_V7_DEEPCOLOR_RATIO_DIS = 0x00, //00 - DCCG_DEEP_COLOR_DTO_DISABLE: Disable Deep Color DTO
  3612. PIXEL_CLOCK_V7_DEEPCOLOR_RATIO_5_4 = 0x01, //01 - DCCG_DEEP_COLOR_DTO_5_4_RATIO: Set Deep Color DTO to 5:4
  3613. PIXEL_CLOCK_V7_DEEPCOLOR_RATIO_3_2 = 0x02, //02 - DCCG_DEEP_COLOR_DTO_3_2_RATIO: Set Deep Color DTO to 3:2
  3614. PIXEL_CLOCK_V7_DEEPCOLOR_RATIO_2_1 = 0x03, //03 - DCCG_DEEP_COLOR_DTO_2_1_RATIO: Set Deep Color DTO to 2:1
  3615. };
  3616. /*
  3617. ***************************************************************************
  3618. Structures used by setdceclock
  3619. ***************************************************************************
  3620. */
  3621. // SetDCEClock input parameter for DCE11.2( ELM and BF ) and above
  3622. struct set_dce_clock_parameters_v2_1
  3623. {
  3624. uint32_t dceclk_10khz; // target DCE frequency in unit of 10KHZ, return real DISPCLK/DPREFCLK frequency.
  3625. uint8_t dceclktype; // =0: DISPCLK =1: DPREFCLK =2: PIXCLK
  3626. uint8_t dceclksrc; // ATOM_PLL0 or ATOM_GCK_DFS or ATOM_FCH_CLK or ATOM_COMBOPHY_PLLx
  3627. uint8_t dceclkflag; // Bit [1:0] = PPLL ref clock source ( when ucDCEClkSrc= ATOM_PPLL0 )
  3628. uint8_t crtc_id; // ucDisp Pipe Id, ATOM_CRTC0/1/2/..., use only when ucDCEClkType = PIXCLK
  3629. };
  3630. //ucDCEClkType
  3631. enum atom_set_dce_clock_clock_type
  3632. {
  3633. DCE_CLOCK_TYPE_DISPCLK = 0,
  3634. DCE_CLOCK_TYPE_DPREFCLK = 1,
  3635. DCE_CLOCK_TYPE_PIXELCLK = 2, // used by VBIOS internally, called by SetPixelClock
  3636. };
  3637. //ucDCEClkFlag when ucDCEClkType == DPREFCLK
  3638. enum atom_set_dce_clock_dprefclk_flag
  3639. {
  3640. DCE_CLOCK_FLAG_PLL_REFCLK_SRC_MASK = 0x03,
  3641. DCE_CLOCK_FLAG_PLL_REFCLK_SRC_GENERICA = 0x00,
  3642. DCE_CLOCK_FLAG_PLL_REFCLK_SRC_GENLK = 0x01,
  3643. DCE_CLOCK_FLAG_PLL_REFCLK_SRC_PCIE = 0x02,
  3644. DCE_CLOCK_FLAG_PLL_REFCLK_SRC_XTALIN = 0x03,
  3645. };
  3646. //ucDCEClkFlag when ucDCEClkType == PIXCLK
  3647. enum atom_set_dce_clock_pixclk_flag
  3648. {
  3649. DCE_CLOCK_FLAG_PCLK_DEEPCOLOR_RATIO_MASK = 0x03,
  3650. DCE_CLOCK_FLAG_PCLK_DEEPCOLOR_RATIO_DIS = 0x00, //00 - DCCG_DEEP_COLOR_DTO_DISABLE: Disable Deep Color DTO
  3651. DCE_CLOCK_FLAG_PCLK_DEEPCOLOR_RATIO_5_4 = 0x01, //01 - DCCG_DEEP_COLOR_DTO_5_4_RATIO: Set Deep Color DTO to 5:4
  3652. DCE_CLOCK_FLAG_PCLK_DEEPCOLOR_RATIO_3_2 = 0x02, //02 - DCCG_DEEP_COLOR_DTO_3_2_RATIO: Set Deep Color DTO to 3:2
  3653. DCE_CLOCK_FLAG_PCLK_DEEPCOLOR_RATIO_2_1 = 0x03, //03 - DCCG_DEEP_COLOR_DTO_2_1_RATIO: Set Deep Color DTO to 2:1
  3654. DCE_CLOCK_FLAG_PIXCLK_YUV420_MODE = 0x04,
  3655. };
  3656. struct set_dce_clock_ps_allocation_v2_1
  3657. {
  3658. struct set_dce_clock_parameters_v2_1 param;
  3659. uint32_t ulReserved[2];
  3660. };
  3661. /****************************************************************************/
  3662. // Structures used by BlankCRTC
  3663. /****************************************************************************/
  3664. struct blank_crtc_parameters
  3665. {
  3666. uint8_t crtc_id; // enum atom_crtc_def
  3667. uint8_t blanking; // enum atom_blank_crtc_command
  3668. uint16_t reserved;
  3669. uint32_t reserved1;
  3670. };
  3671. enum atom_blank_crtc_command
  3672. {
  3673. ATOM_BLANKING = 1,
  3674. ATOM_BLANKING_OFF = 0,
  3675. };
  3676. /****************************************************************************/
  3677. // Structures used by enablecrtc
  3678. /****************************************************************************/
  3679. struct enable_crtc_parameters
  3680. {
  3681. uint8_t crtc_id; // enum atom_crtc_def
  3682. uint8_t enable; // ATOM_ENABLE or ATOM_DISABLE
  3683. uint8_t padding[2];
  3684. };
  3685. /****************************************************************************/
  3686. // Structure used by EnableDispPowerGating
  3687. /****************************************************************************/
  3688. struct enable_disp_power_gating_parameters_v2_1
  3689. {
  3690. uint8_t disp_pipe_id; // ATOM_CRTC1, ATOM_CRTC2, ...
  3691. uint8_t enable; // ATOM_ENABLE or ATOM_DISABLE
  3692. uint8_t padding[2];
  3693. };
  3694. struct enable_disp_power_gating_ps_allocation
  3695. {
  3696. struct enable_disp_power_gating_parameters_v2_1 param;
  3697. uint32_t ulReserved[4];
  3698. };
  3699. /****************************************************************************/
  3700. // Structure used in setcrtc_usingdtdtiming
  3701. /****************************************************************************/
  3702. struct set_crtc_using_dtd_timing_parameters
  3703. {
  3704. uint16_t h_size;
  3705. uint16_t h_blanking_time;
  3706. uint16_t v_size;
  3707. uint16_t v_blanking_time;
  3708. uint16_t h_syncoffset;
  3709. uint16_t h_syncwidth;
  3710. uint16_t v_syncoffset;
  3711. uint16_t v_syncwidth;
  3712. uint16_t modemiscinfo;
  3713. uint8_t h_border;
  3714. uint8_t v_border;
  3715. uint8_t crtc_id; // enum atom_crtc_def
  3716. uint8_t encoder_mode; // atom_encode_mode_def
  3717. uint8_t padding[2];
  3718. };
  3719. /****************************************************************************/
  3720. // Structures used by processi2cchanneltransaction
  3721. /****************************************************************************/
  3722. struct process_i2c_channel_transaction_parameters
  3723. {
  3724. uint8_t i2cspeed_khz;
  3725. union {
  3726. uint8_t regindex;
  3727. uint8_t status; /* enum atom_process_i2c_flag */
  3728. } regind_status;
  3729. uint16_t i2c_data_out;
  3730. uint8_t flag; /* enum atom_process_i2c_status */
  3731. uint8_t trans_bytes;
  3732. uint8_t slave_addr;
  3733. uint8_t i2c_id;
  3734. };
  3735. //ucFlag
  3736. enum atom_process_i2c_flag
  3737. {
  3738. HW_I2C_WRITE = 1,
  3739. HW_I2C_READ = 0,
  3740. I2C_2BYTE_ADDR = 0x02,
  3741. HW_I2C_SMBUS_BYTE_WR = 0x04,
  3742. };
  3743. //status
  3744. enum atom_process_i2c_status
  3745. {
  3746. HW_ASSISTED_I2C_STATUS_FAILURE =2,
  3747. HW_ASSISTED_I2C_STATUS_SUCCESS =1,
  3748. };
  3749. /****************************************************************************/
  3750. // Structures used by processauxchanneltransaction
  3751. /****************************************************************************/
  3752. struct process_aux_channel_transaction_parameters_v1_2
  3753. {
  3754. uint16_t aux_request;
  3755. uint16_t dataout;
  3756. uint8_t channelid;
  3757. union {
  3758. uint8_t reply_status;
  3759. uint8_t aux_delay;
  3760. } aux_status_delay;
  3761. uint8_t dataout_len;
  3762. uint8_t hpd_id; //=0: HPD1, =1: HPD2, =2: HPD3, =3: HPD4, =4: HPD5, =5: HPD6
  3763. };
  3764. /****************************************************************************/
  3765. // Structures used by selectcrtc_source
  3766. /****************************************************************************/
  3767. struct select_crtc_source_parameters_v2_3
  3768. {
  3769. uint8_t crtc_id; // enum atom_crtc_def
  3770. uint8_t encoder_id; // enum atom_dig_def
  3771. uint8_t encode_mode; // enum atom_encode_mode_def
  3772. uint8_t dst_bpc; // enum atom_panel_bit_per_color
  3773. };
  3774. /****************************************************************************/
  3775. // Structures used by digxencodercontrol
  3776. /****************************************************************************/
  3777. // ucAction:
  3778. enum atom_dig_encoder_control_action
  3779. {
  3780. ATOM_ENCODER_CMD_DISABLE_DIG = 0,
  3781. ATOM_ENCODER_CMD_ENABLE_DIG = 1,
  3782. ATOM_ENCODER_CMD_DP_LINK_TRAINING_START = 0x08,
  3783. ATOM_ENCODER_CMD_DP_LINK_TRAINING_PATTERN1 = 0x09,
  3784. ATOM_ENCODER_CMD_DP_LINK_TRAINING_PATTERN2 = 0x0a,
  3785. ATOM_ENCODER_CMD_DP_LINK_TRAINING_PATTERN3 = 0x13,
  3786. ATOM_ENCODER_CMD_DP_LINK_TRAINING_COMPLETE = 0x0b,
  3787. ATOM_ENCODER_CMD_DP_VIDEO_OFF = 0x0c,
  3788. ATOM_ENCODER_CMD_DP_VIDEO_ON = 0x0d,
  3789. ATOM_ENCODER_CMD_SETUP_PANEL_MODE = 0x10,
  3790. ATOM_ENCODER_CMD_DP_LINK_TRAINING_PATTERN4 = 0x14,
  3791. ATOM_ENCODER_CMD_STREAM_SETUP = 0x0F,
  3792. ATOM_ENCODER_CMD_LINK_SETUP = 0x11,
  3793. ATOM_ENCODER_CMD_ENCODER_BLANK = 0x12,
  3794. };
  3795. //define ucPanelMode
  3796. enum atom_dig_encoder_control_panelmode
  3797. {
  3798. DP_PANEL_MODE_DISABLE = 0x00,
  3799. DP_PANEL_MODE_ENABLE_eDP_MODE = 0x01,
  3800. DP_PANEL_MODE_ENABLE_LVLINK_MODE = 0x11,
  3801. };
  3802. //ucDigId
  3803. enum atom_dig_encoder_control_v5_digid
  3804. {
  3805. ATOM_ENCODER_CONFIG_V5_DIG0_ENCODER = 0x00,
  3806. ATOM_ENCODER_CONFIG_V5_DIG1_ENCODER = 0x01,
  3807. ATOM_ENCODER_CONFIG_V5_DIG2_ENCODER = 0x02,
  3808. ATOM_ENCODER_CONFIG_V5_DIG3_ENCODER = 0x03,
  3809. ATOM_ENCODER_CONFIG_V5_DIG4_ENCODER = 0x04,
  3810. ATOM_ENCODER_CONFIG_V5_DIG5_ENCODER = 0x05,
  3811. ATOM_ENCODER_CONFIG_V5_DIG6_ENCODER = 0x06,
  3812. ATOM_ENCODER_CONFIG_V5_DIG7_ENCODER = 0x07,
  3813. };
  3814. struct dig_encoder_stream_setup_parameters_v1_5
  3815. {
  3816. uint8_t digid; // 0~6 map to DIG0~DIG6 enum atom_dig_encoder_control_v5_digid
  3817. uint8_t action; // = ATOM_ENOCODER_CMD_STREAM_SETUP
  3818. uint8_t digmode; // ATOM_ENCODER_MODE_DP/ATOM_ENCODER_MODE_DVI/ATOM_ENCODER_MODE_HDMI
  3819. uint8_t lanenum; // Lane number
  3820. uint32_t pclk_10khz; // Pixel Clock in 10Khz
  3821. uint8_t bitpercolor;
  3822. uint8_t dplinkrate_270mhz;//= DP link rate/270Mhz, =6: 1.62G = 10: 2.7G, =20: 5.4Ghz, =30: 8.1Ghz etc
  3823. uint8_t reserved[2];
  3824. };
  3825. struct dig_encoder_link_setup_parameters_v1_5
  3826. {
  3827. uint8_t digid; // 0~6 map to DIG0~DIG6 enum atom_dig_encoder_control_v5_digid
  3828. uint8_t action; // = ATOM_ENOCODER_CMD_LINK_SETUP
  3829. uint8_t digmode; // ATOM_ENCODER_MODE_DP/ATOM_ENCODER_MODE_DVI/ATOM_ENCODER_MODE_HDMI
  3830. uint8_t lanenum; // Lane number
  3831. uint8_t symclk_10khz; // Symbol Clock in 10Khz
  3832. uint8_t hpd_sel;
  3833. uint8_t digfe_sel; // DIG stream( front-end ) selection, bit0 means DIG0 FE is enable,
  3834. uint8_t reserved[2];
  3835. };
  3836. struct dp_panel_mode_set_parameters_v1_5
  3837. {
  3838. uint8_t digid; // 0~6 map to DIG0~DIG6 enum atom_dig_encoder_control_v5_digid
  3839. uint8_t action; // = ATOM_ENCODER_CMD_DPLINK_SETUP
  3840. uint8_t panelmode; // enum atom_dig_encoder_control_panelmode
  3841. uint8_t reserved1;
  3842. uint32_t reserved2[2];
  3843. };
  3844. struct dig_encoder_generic_cmd_parameters_v1_5
  3845. {
  3846. uint8_t digid; // 0~6 map to DIG0~DIG6 enum atom_dig_encoder_control_v5_digid
  3847. uint8_t action; // = rest of generic encoder command which does not carry any parameters
  3848. uint8_t reserved1[2];
  3849. uint32_t reserved2[2];
  3850. };
  3851. union dig_encoder_control_parameters_v1_5
  3852. {
  3853. struct dig_encoder_generic_cmd_parameters_v1_5 cmd_param;
  3854. struct dig_encoder_stream_setup_parameters_v1_5 stream_param;
  3855. struct dig_encoder_link_setup_parameters_v1_5 link_param;
  3856. struct dp_panel_mode_set_parameters_v1_5 dppanel_param;
  3857. };
  3858. /*
  3859. ***************************************************************************
  3860. Structures used by dig1transmittercontrol
  3861. ***************************************************************************
  3862. */
  3863. struct dig_transmitter_control_parameters_v1_6
  3864. {
  3865. uint8_t phyid; // 0=UNIPHYA, 1=UNIPHYB, 2=UNIPHYC, 3=UNIPHYD, 4= UNIPHYE 5=UNIPHYF
  3866. uint8_t action; // define as ATOM_TRANSMITER_ACTION_xxx
  3867. union {
  3868. uint8_t digmode; // enum atom_encode_mode_def
  3869. uint8_t dplaneset; // DP voltage swing and pre-emphasis value defined in DPCD DP_LANE_SET, "DP_LANE_SET__xDB_y_zV"
  3870. } mode_laneset;
  3871. uint8_t lanenum; // Lane number 1, 2, 4, 8
  3872. uint32_t symclk_10khz; // Symbol Clock in 10Khz
  3873. uint8_t hpdsel; // =1: HPD1, =2: HPD2, .... =6: HPD6, =0: HPD is not assigned
  3874. uint8_t digfe_sel; // DIG stream( front-end ) selection, bit0 means DIG0 FE is enable,
  3875. uint8_t connobj_id; // Connector Object Id defined in ObjectId.h
  3876. uint8_t reserved;
  3877. uint32_t reserved1;
  3878. };
  3879. struct dig_transmitter_control_ps_allocation_v1_6
  3880. {
  3881. struct dig_transmitter_control_parameters_v1_6 param;
  3882. uint32_t reserved[4];
  3883. };
  3884. //ucAction
  3885. enum atom_dig_transmitter_control_action
  3886. {
  3887. ATOM_TRANSMITTER_ACTION_DISABLE = 0,
  3888. ATOM_TRANSMITTER_ACTION_ENABLE = 1,
  3889. ATOM_TRANSMITTER_ACTION_LCD_BLOFF = 2,
  3890. ATOM_TRANSMITTER_ACTION_LCD_BLON = 3,
  3891. ATOM_TRANSMITTER_ACTION_BL_BRIGHTNESS_CONTROL = 4,
  3892. ATOM_TRANSMITTER_ACTION_LCD_SELFTEST_START = 5,
  3893. ATOM_TRANSMITTER_ACTION_LCD_SELFTEST_STOP = 6,
  3894. ATOM_TRANSMITTER_ACTION_INIT = 7,
  3895. ATOM_TRANSMITTER_ACTION_DISABLE_OUTPUT = 8,
  3896. ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT = 9,
  3897. ATOM_TRANSMITTER_ACTION_SETUP = 10,
  3898. ATOM_TRANSMITTER_ACTION_SETUP_VSEMPH = 11,
  3899. ATOM_TRANSMITTER_ACTION_POWER_ON = 12,
  3900. ATOM_TRANSMITTER_ACTION_POWER_OFF = 13,
  3901. };
  3902. // digfe_sel
  3903. enum atom_dig_transmitter_control_digfe_sel
  3904. {
  3905. ATOM_TRANMSITTER_V6__DIGA_SEL = 0x01,
  3906. ATOM_TRANMSITTER_V6__DIGB_SEL = 0x02,
  3907. ATOM_TRANMSITTER_V6__DIGC_SEL = 0x04,
  3908. ATOM_TRANMSITTER_V6__DIGD_SEL = 0x08,
  3909. ATOM_TRANMSITTER_V6__DIGE_SEL = 0x10,
  3910. ATOM_TRANMSITTER_V6__DIGF_SEL = 0x20,
  3911. ATOM_TRANMSITTER_V6__DIGG_SEL = 0x40,
  3912. };
  3913. //ucHPDSel
  3914. enum atom_dig_transmitter_control_hpd_sel
  3915. {
  3916. ATOM_TRANSMITTER_V6_NO_HPD_SEL = 0x00,
  3917. ATOM_TRANSMITTER_V6_HPD1_SEL = 0x01,
  3918. ATOM_TRANSMITTER_V6_HPD2_SEL = 0x02,
  3919. ATOM_TRANSMITTER_V6_HPD3_SEL = 0x03,
  3920. ATOM_TRANSMITTER_V6_HPD4_SEL = 0x04,
  3921. ATOM_TRANSMITTER_V6_HPD5_SEL = 0x05,
  3922. ATOM_TRANSMITTER_V6_HPD6_SEL = 0x06,
  3923. };
  3924. // ucDPLaneSet
  3925. enum atom_dig_transmitter_control_dplaneset
  3926. {
  3927. DP_LANE_SET__0DB_0_4V = 0x00,
  3928. DP_LANE_SET__0DB_0_6V = 0x01,
  3929. DP_LANE_SET__0DB_0_8V = 0x02,
  3930. DP_LANE_SET__0DB_1_2V = 0x03,
  3931. DP_LANE_SET__3_5DB_0_4V = 0x08,
  3932. DP_LANE_SET__3_5DB_0_6V = 0x09,
  3933. DP_LANE_SET__3_5DB_0_8V = 0x0a,
  3934. DP_LANE_SET__6DB_0_4V = 0x10,
  3935. DP_LANE_SET__6DB_0_6V = 0x11,
  3936. DP_LANE_SET__9_5DB_0_4V = 0x18,
  3937. };
  3938. /****************************************************************************/
  3939. // Structures used by ExternalEncoderControl V2.4
  3940. /****************************************************************************/
  3941. struct external_encoder_control_parameters_v2_4
  3942. {
  3943. uint16_t pixelclock_10khz; // pixel clock in 10Khz, valid when ucAction=SETUP/ENABLE_OUTPUT
  3944. uint8_t config; // indicate which encoder, and DP link rate when ucAction = SETUP/ENABLE_OUTPUT
  3945. uint8_t action; //
  3946. uint8_t encodermode; // encoder mode, only used when ucAction = SETUP/ENABLE_OUTPUT
  3947. uint8_t lanenum; // lane number, only used when ucAction = SETUP/ENABLE_OUTPUT
  3948. uint8_t bitpercolor; // output bit per color, only valid when ucAction = SETUP/ENABLE_OUTPUT and ucEncodeMode= DP
  3949. uint8_t hpd_id;
  3950. };
  3951. // ucAction
  3952. enum external_encoder_control_action_def
  3953. {
  3954. EXTERNAL_ENCODER_ACTION_V3_DISABLE_OUTPUT = 0x00,
  3955. EXTERNAL_ENCODER_ACTION_V3_ENABLE_OUTPUT = 0x01,
  3956. EXTERNAL_ENCODER_ACTION_V3_ENCODER_INIT = 0x07,
  3957. EXTERNAL_ENCODER_ACTION_V3_ENCODER_SETUP = 0x0f,
  3958. EXTERNAL_ENCODER_ACTION_V3_ENCODER_BLANKING_OFF = 0x10,
  3959. EXTERNAL_ENCODER_ACTION_V3_ENCODER_BLANKING = 0x11,
  3960. EXTERNAL_ENCODER_ACTION_V3_DACLOAD_DETECTION = 0x12,
  3961. EXTERNAL_ENCODER_ACTION_V3_DDC_SETUP = 0x14,
  3962. };
  3963. // ucConfig
  3964. enum external_encoder_control_v2_4_config_def
  3965. {
  3966. EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_MASK = 0x03,
  3967. EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_1_62GHZ = 0x00,
  3968. EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_2_70GHZ = 0x01,
  3969. EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_5_40GHZ = 0x02,
  3970. EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_3_24GHZ = 0x03,
  3971. EXTERNAL_ENCODER_CONFIG_V3_ENCODER_SEL_MAKS = 0x70,
  3972. EXTERNAL_ENCODER_CONFIG_V3_ENCODER1 = 0x00,
  3973. EXTERNAL_ENCODER_CONFIG_V3_ENCODER2 = 0x10,
  3974. EXTERNAL_ENCODER_CONFIG_V3_ENCODER3 = 0x20,
  3975. };
  3976. struct external_encoder_control_ps_allocation_v2_4
  3977. {
  3978. struct external_encoder_control_parameters_v2_4 sExtEncoder;
  3979. uint32_t reserved[2];
  3980. };
  3981. /*
  3982. ***************************************************************************
  3983. AMD ACPI Table
  3984. ***************************************************************************
  3985. */
  3986. struct amd_acpi_description_header{
  3987. uint32_t signature;
  3988. uint32_t tableLength; //Length
  3989. uint8_t revision;
  3990. uint8_t checksum;
  3991. uint8_t oemId[6];
  3992. uint8_t oemTableId[8]; //UINT64 OemTableId;
  3993. uint32_t oemRevision;
  3994. uint32_t creatorId;
  3995. uint32_t creatorRevision;
  3996. };
  3997. struct uefi_acpi_vfct{
  3998. struct amd_acpi_description_header sheader;
  3999. uint8_t tableUUID[16]; //0x24
  4000. uint32_t vbiosimageoffset; //0x34. Offset to the first GOP_VBIOS_CONTENT block from the beginning of the stucture.
  4001. uint32_t lib1Imageoffset; //0x38. Offset to the first GOP_LIB1_CONTENT block from the beginning of the stucture.
  4002. uint32_t reserved[4]; //0x3C
  4003. };
  4004. struct vfct_image_header{
  4005. uint32_t pcibus; //0x4C
  4006. uint32_t pcidevice; //0x50
  4007. uint32_t pcifunction; //0x54
  4008. uint16_t vendorid; //0x58
  4009. uint16_t deviceid; //0x5A
  4010. uint16_t ssvid; //0x5C
  4011. uint16_t ssid; //0x5E
  4012. uint32_t revision; //0x60
  4013. uint32_t imagelength; //0x64
  4014. };
  4015. struct gop_vbios_content {
  4016. struct vfct_image_header vbiosheader;
  4017. uint8_t vbioscontent[1];
  4018. };
  4019. struct gop_lib1_content {
  4020. struct vfct_image_header lib1header;
  4021. uint8_t lib1content[1];
  4022. };
  4023. /*
  4024. ***************************************************************************
  4025. Scratch Register definitions
  4026. Each number below indicates which scratch regiser request, Active and
  4027. Connect all share the same definitions as display_device_tag defines
  4028. ***************************************************************************
  4029. */
  4030. enum scratch_register_def{
  4031. ATOM_DEVICE_CONNECT_INFO_DEF = 0,
  4032. ATOM_BL_BRI_LEVEL_INFO_DEF = 2,
  4033. ATOM_ACTIVE_INFO_DEF = 3,
  4034. ATOM_LCD_INFO_DEF = 4,
  4035. ATOM_DEVICE_REQ_INFO_DEF = 5,
  4036. ATOM_ACC_CHANGE_INFO_DEF = 6,
  4037. ATOM_PRE_OS_MODE_INFO_DEF = 7,
  4038. ATOM_PRE_OS_ASSERTION_DEF = 8, //For GOP to record a 32bit assertion code, this is enabled by default in prodution GOP drivers.
  4039. ATOM_INTERNAL_TIMER_INFO_DEF = 10,
  4040. };
  4041. enum scratch_device_connect_info_bit_def{
  4042. ATOM_DISPLAY_LCD1_CONNECT =0x0002,
  4043. ATOM_DISPLAY_DFP1_CONNECT =0x0008,
  4044. ATOM_DISPLAY_DFP2_CONNECT =0x0080,
  4045. ATOM_DISPLAY_DFP3_CONNECT =0x0200,
  4046. ATOM_DISPLAY_DFP4_CONNECT =0x0400,
  4047. ATOM_DISPLAY_DFP5_CONNECT =0x0800,
  4048. ATOM_DISPLAY_DFP6_CONNECT =0x0040,
  4049. ATOM_DISPLAY_DFPx_CONNECT =0x0ec8,
  4050. ATOM_CONNECT_INFO_DEVICE_MASK =0x0fff,
  4051. };
  4052. enum scratch_bl_bri_level_info_bit_def{
  4053. ATOM_CURRENT_BL_LEVEL_SHIFT =0x8,
  4054. #ifndef _H2INC
  4055. ATOM_CURRENT_BL_LEVEL_MASK =0x0000ff00,
  4056. ATOM_DEVICE_DPMS_STATE =0x00010000,
  4057. #endif
  4058. };
  4059. enum scratch_active_info_bits_def{
  4060. ATOM_DISPLAY_LCD1_ACTIVE =0x0002,
  4061. ATOM_DISPLAY_DFP1_ACTIVE =0x0008,
  4062. ATOM_DISPLAY_DFP2_ACTIVE =0x0080,
  4063. ATOM_DISPLAY_DFP3_ACTIVE =0x0200,
  4064. ATOM_DISPLAY_DFP4_ACTIVE =0x0400,
  4065. ATOM_DISPLAY_DFP5_ACTIVE =0x0800,
  4066. ATOM_DISPLAY_DFP6_ACTIVE =0x0040,
  4067. ATOM_ACTIVE_INFO_DEVICE_MASK =0x0fff,
  4068. };
  4069. enum scratch_device_req_info_bits_def{
  4070. ATOM_DISPLAY_LCD1_REQ =0x0002,
  4071. ATOM_DISPLAY_DFP1_REQ =0x0008,
  4072. ATOM_DISPLAY_DFP2_REQ =0x0080,
  4073. ATOM_DISPLAY_DFP3_REQ =0x0200,
  4074. ATOM_DISPLAY_DFP4_REQ =0x0400,
  4075. ATOM_DISPLAY_DFP5_REQ =0x0800,
  4076. ATOM_DISPLAY_DFP6_REQ =0x0040,
  4077. ATOM_REQ_INFO_DEVICE_MASK =0x0fff,
  4078. };
  4079. enum scratch_acc_change_info_bitshift_def{
  4080. ATOM_ACC_CHANGE_ACC_MODE_SHIFT =4,
  4081. ATOM_ACC_CHANGE_LID_STATUS_SHIFT =6,
  4082. };
  4083. enum scratch_acc_change_info_bits_def{
  4084. ATOM_ACC_CHANGE_ACC_MODE =0x00000010,
  4085. ATOM_ACC_CHANGE_LID_STATUS =0x00000040,
  4086. };
  4087. enum scratch_pre_os_mode_info_bits_def{
  4088. ATOM_PRE_OS_MODE_MASK =0x00000003,
  4089. ATOM_PRE_OS_MODE_VGA =0x00000000,
  4090. ATOM_PRE_OS_MODE_VESA =0x00000001,
  4091. ATOM_PRE_OS_MODE_GOP =0x00000002,
  4092. ATOM_PRE_OS_MODE_PIXEL_DEPTH =0x0000000C,
  4093. ATOM_PRE_OS_MODE_PIXEL_FORMAT_MASK=0x000000F0,
  4094. ATOM_PRE_OS_MODE_8BIT_PAL_EN =0x00000100,
  4095. ATOM_ASIC_INIT_COMPLETE =0x00000200,
  4096. #ifndef _H2INC
  4097. ATOM_PRE_OS_MODE_NUMBER_MASK =0xFFFF0000,
  4098. #endif
  4099. };
  4100. /*
  4101. ***************************************************************************
  4102. ATOM firmware ID header file
  4103. !! Please keep it at end of the atomfirmware.h !!
  4104. ***************************************************************************
  4105. */
  4106. #include "atomfirmwareid.h"
  4107. #pragma pack()
  4108. #endif