timpani-codec.c 96 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662
  1. /* Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. */
  13. #include <linux/module.h>
  14. #include <linux/delay.h>
  15. #include <linux/err.h>
  16. #include <linux/platform_device.h>
  17. #include <linux/mfd/msm-adie-codec.h>
  18. #include <linux/mfd/marimba.h>
  19. #include <linux/mfd/timpani-audio.h>
  20. #include <linux/debugfs.h>
  21. #include <linux/uaccess.h>
  22. #include <linux/string.h>
  23. /* Timpani codec driver is activated through Marimba core driver */
  24. #define MAX_MDELAY_US 20000
  25. #define TIMPANI_PATH_MASK(x) (1 << (x))
  26. #define TIMPANI_CODEC_AUXPGA_GAIN_RANGE (0x0F)
  27. #define TIMPANI_RX1_ST_MASK (TIMPANI_CDC_RX1_CTL_SIDETONE_EN1_L_M |\
  28. TIMPANI_CDC_RX1_CTL_SIDETONE_EN1_R_M)
  29. #define TIMPANI_RX1_ST_ENABLE ((1 << TIMPANI_CDC_RX1_CTL_SIDETONE_EN1_L_S) |\
  30. (1 << TIMPANI_CDC_RX1_CTL_SIDETONE_EN1_R_S))
  31. #define TIMPANI_CDC_ST_MIXING_TX1_MASK (TIMPANI_CDC_ST_MIXING_TX1_L_M |\
  32. TIMPANI_CDC_ST_MIXING_TX1_R_M)
  33. #define TIMPANI_CDC_ST_MIXING_TX1_ENABLE ((1 << TIMPANI_CDC_ST_MIXING_TX1_L_S)\
  34. | (1 << TIMPANI_CDC_ST_MIXING_TX1_R_S))
  35. #define TIMPANI_CDC_ST_MIXING_TX2_MASK (TIMPANI_CDC_ST_MIXING_TX2_L_M |\
  36. TIMPANI_CDC_ST_MIXING_TX2_R_M)
  37. #define TIMPANI_CDC_ST_MIXING_TX2_ENABLE ((1 << TIMPANI_CDC_ST_MIXING_TX2_L_S)\
  38. | (1 << TIMPANI_CDC_ST_MIXING_TX2_R_S))
  39. enum refcnt {
  40. DEC = 0,
  41. INC = 1,
  42. IGNORE = 2,
  43. };
  44. #define TIMPANI_ARRAY_SIZE (TIMPANI_A_CDC_COMP_HALT + 1)
  45. #define MAX_SHADOW_RIGISTERS TIMPANI_A_CDC_COMP_HALT
  46. static u8 timpani_shadow[TIMPANI_ARRAY_SIZE];
  47. struct adie_codec_path {
  48. struct adie_codec_dev_profile *profile;
  49. struct adie_codec_register_image img;
  50. u32 hwsetting_idx;
  51. u32 stage_idx;
  52. u32 curr_stage;
  53. u32 reg_owner;
  54. };
  55. enum /* regaccess blk id */
  56. {
  57. RA_BLOCK_RX1 = 0,
  58. RA_BLOCK_RX2,
  59. RA_BLOCK_TX1,
  60. RA_BLOCK_TX2,
  61. RA_BLOCK_LB,
  62. RA_BLOCK_SHARED_RX_LB,
  63. RA_BLOCK_SHARED_TX,
  64. RA_BLOCK_TXFE1,
  65. RA_BLOCK_TXFE2,
  66. RA_BLOCK_PA_COMMON,
  67. RA_BLOCK_PA_EAR,
  68. RA_BLOCK_PA_HPH,
  69. RA_BLOCK_PA_LINE,
  70. RA_BLOCK_PA_AUX,
  71. RA_BLOCK_ADC,
  72. RA_BLOCK_DMIC,
  73. RA_BLOCK_TX_I2S,
  74. RA_BLOCK_DRV,
  75. RA_BLOCK_TEST,
  76. RA_BLOCK_RESERVED,
  77. RA_BLOCK_NUM,
  78. };
  79. enum /* regaccess onwer ID */
  80. {
  81. RA_OWNER_NONE = 0,
  82. RA_OWNER_PATH_RX1,
  83. RA_OWNER_PATH_RX2,
  84. RA_OWNER_PATH_TX1,
  85. RA_OWNER_PATH_TX2,
  86. RA_OWNER_PATH_LB,
  87. RA_OWNER_DRV,
  88. RA_OWNER_NUM,
  89. };
  90. struct reg_acc_blk_cfg {
  91. u8 valid_owners[RA_OWNER_NUM];
  92. };
  93. struct reg_ref_cnt {
  94. u8 mask;
  95. u8 path_mask;
  96. };
  97. #define TIMPANI_MAX_FIELDS 5
  98. struct timpani_regaccess {
  99. u8 reg_addr;
  100. u8 blk_mask[RA_BLOCK_NUM];
  101. u8 reg_mask;
  102. u8 reg_default;
  103. struct reg_ref_cnt fld_ref_cnt[TIMPANI_MAX_FIELDS];
  104. };
  105. struct timpani_regaccess timpani_regset[] = {
  106. {
  107. TIMPANI_A_MREF,
  108. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  109. 0x0, 0x0, 0x0, 0x0, 0x0, 0xFC, 0x0, 0x3},
  110. TIMPANI_MREF_M,
  111. TIMPANI_MREF_POR,
  112. {
  113. { .mask = 0xFC, .path_mask = 0},
  114. { .mask = 0x03, .path_mask = 0},
  115. { .mask = 0x00, .path_mask = 0},
  116. { .mask = 0x00, .path_mask = 0},
  117. { .mask = 0x00, .path_mask = 0},
  118. }
  119. },
  120. {
  121. TIMPANI_A_CDAC_IDAC_REF_CUR,
  122. {0xFC, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  123. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  124. TIMPANI_CDAC_IDAC_REF_CUR_M,
  125. TIMPANI_CDAC_IDAC_REF_CUR_POR,
  126. {
  127. { .mask = 0xFC, .path_mask = 0},
  128. { .mask = 0x03, .path_mask = 0},
  129. { .mask = 0x00, .path_mask = 0},
  130. { .mask = 0x00, .path_mask = 0},
  131. { .mask = 0x00, .path_mask = 0},
  132. }
  133. },
  134. {
  135. TIMPANI_A_TXADC12_REF_CURR,
  136. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  137. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF},
  138. TIMPANI_TXADC12_REF_CURR_M,
  139. TIMPANI_TXADC12_REF_CURR_POR,
  140. {
  141. { .mask = 0xFF, .path_mask = 0},
  142. { .mask = 0x00, .path_mask = 0},
  143. { .mask = 0x00, .path_mask = 0},
  144. { .mask = 0x00, .path_mask = 0},
  145. { .mask = 0x00, .path_mask = 0},
  146. }
  147. },
  148. {
  149. TIMPANI_A_TXADC3_EN,
  150. { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFE, 0x0, 0x0, 0x0,
  151. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1},
  152. TIMPANI_TXADC3_EN_M,
  153. TIMPANI_TXADC3_EN_POR,
  154. {
  155. { .mask = 0xFE, .path_mask = 0},
  156. { .mask = 0x01, .path_mask = 0},
  157. { .mask = 0x00, .path_mask = 0},
  158. { .mask = 0x00, .path_mask = 0},
  159. { .mask = 0x00, .path_mask = 0},
  160. }
  161. },
  162. {
  163. TIMPANI_A_TXADC4_EN,
  164. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFE, 0x0, 0x0, 0x0,
  165. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1},
  166. TIMPANI_TXADC4_EN_M,
  167. TIMPANI_TXADC4_EN_POR,
  168. {
  169. { .mask = 0xFE, .path_mask = 0},
  170. { .mask = 0x01, .path_mask = 0},
  171. { .mask = 0x00, .path_mask = 0},
  172. { .mask = 0x00, .path_mask = 0},
  173. { .mask = 0x00, .path_mask = 0},
  174. }
  175. },
  176. {
  177. TIMPANI_A_CODEC_TXADC_STATUS_REGISTER_1,
  178. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC0, 0x30, 0x0, 0x0, 0x0,
  179. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF},
  180. TIMPANI_CODEC_TXADC_STATUS_REGISTER_1_M,
  181. TIMPANI_CODEC_TXADC_STATUS_REGISTER_1_POR,
  182. {
  183. { .mask = 0xC0, .path_mask = 0},
  184. { .mask = 0x30, .path_mask = 0},
  185. { .mask = 0x0F, .path_mask = 0},
  186. { .mask = 0x00, .path_mask = 0},
  187. { .mask = 0x00, .path_mask = 0},
  188. }
  189. },
  190. {
  191. TIMPANI_A_TXFE1,
  192. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0,
  193. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  194. TIMPANI_TXFE1_M,
  195. TIMPANI_TXFE1_POR,
  196. {
  197. { .mask = 0xFF, .path_mask = 0},
  198. { .mask = 0x00, .path_mask = 0},
  199. { .mask = 0x00, .path_mask = 0},
  200. { .mask = 0x00, .path_mask = 0},
  201. { .mask = 0x00, .path_mask = 0},
  202. }
  203. },
  204. {
  205. TIMPANI_A_TXFE2,
  206. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0,
  207. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  208. TIMPANI_TXFE2_M,
  209. TIMPANI_TXFE2_POR,
  210. {
  211. { .mask = 0xFF, .path_mask = 0},
  212. { .mask = 0x00, .path_mask = 0},
  213. { .mask = 0x00, .path_mask = 0},
  214. { .mask = 0x00, .path_mask = 0},
  215. { .mask = 0x00, .path_mask = 0},
  216. }
  217. },
  218. {
  219. TIMPANI_A_TXFE12_ATEST,
  220. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0,
  221. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  222. TIMPANI_TXFE12_ATEST_M,
  223. TIMPANI_TXFE12_ATEST_POR,
  224. {
  225. { .mask = 0xFF, .path_mask = 0},
  226. { .mask = 0x00, .path_mask = 0},
  227. { .mask = 0x00, .path_mask = 0},
  228. { .mask = 0x00, .path_mask = 0},
  229. { .mask = 0x00, .path_mask = 0},
  230. }
  231. },
  232. {
  233. TIMPANI_A_TXFE_CLT,
  234. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF8, 0x0, 0x0, 0x0, 0x0,
  235. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7},
  236. TIMPANI_TXFE_CLT_M,
  237. TIMPANI_TXFE_CLT_POR,
  238. {
  239. { .mask = 0xF8, .path_mask = 0},
  240. { .mask = 0x07, .path_mask = 0},
  241. { .mask = 0x00, .path_mask = 0},
  242. { .mask = 0x00, .path_mask = 0},
  243. { .mask = 0x00, .path_mask = 0},
  244. }
  245. },
  246. {
  247. TIMPANI_A_TXADC1_EN,
  248. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFE, 0x0, 0x0, 0x0, 0x0,
  249. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1},
  250. TIMPANI_TXADC1_EN_M,
  251. TIMPANI_TXADC1_EN_POR,
  252. {
  253. { .mask = 0xFE, .path_mask = 0},
  254. { .mask = 0x01, .path_mask = 0},
  255. { .mask = 0x00, .path_mask = 0},
  256. { .mask = 0x00, .path_mask = 0},
  257. { .mask = 0x00, .path_mask = 0},
  258. }
  259. },
  260. {
  261. TIMPANI_A_TXADC2_EN,
  262. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFE, 0x0, 0x0, 0x0, 0x0,
  263. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1},
  264. TIMPANI_TXADC2_EN_M,
  265. TIMPANI_TXADC2_EN_POR,
  266. {
  267. { .mask = 0xFE, .path_mask = 0},
  268. { .mask = 0x01, .path_mask = 0},
  269. { .mask = 0x00, .path_mask = 0},
  270. { .mask = 0x00, .path_mask = 0},
  271. { .mask = 0x00, .path_mask = 0},
  272. }
  273. },
  274. {
  275. TIMPANI_A_TXADC_CTL,
  276. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  277. 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0},
  278. TIMPANI_TXADC_CTL_M,
  279. TIMPANI_TXADC_CTL_POR,
  280. {
  281. { .mask = 0xFF, .path_mask = 0},
  282. { .mask = 0x00, .path_mask = 0},
  283. { .mask = 0x00, .path_mask = 0},
  284. { .mask = 0x00, .path_mask = 0},
  285. { .mask = 0x00, .path_mask = 0},
  286. }
  287. },
  288. {
  289. TIMPANI_A_TXADC_CTL2,
  290. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  291. 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0},
  292. TIMPANI_TXADC_CTL2_M,
  293. TIMPANI_TXADC_CTL2_POR,
  294. {
  295. { .mask = 0xFF, .path_mask = 0},
  296. { .mask = 0x00, .path_mask = 0},
  297. { .mask = 0x00, .path_mask = 0},
  298. { .mask = 0x00, .path_mask = 0},
  299. { .mask = 0x00, .path_mask = 0},
  300. }
  301. },
  302. {
  303. TIMPANI_A_TXADC_CTL3,
  304. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  305. 0x0, 0x0, 0xFE, 0x0, 0x0, 0x0, 0x0, 0x1},
  306. TIMPANI_TXADC_CTL3_M,
  307. TIMPANI_TXADC_CTL3_POR,
  308. {
  309. { .mask = 0xFE, .path_mask = 0},
  310. { .mask = 0x01, .path_mask = 0},
  311. { .mask = 0x00, .path_mask = 0},
  312. { .mask = 0x00, .path_mask = 0},
  313. { .mask = 0x00, .path_mask = 0},
  314. }
  315. },
  316. {
  317. TIMPANI_A_TXADC_CHOP_CTL,
  318. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  319. 0x0, 0x0, 0xFC, 0x0, 0x0, 0x0, 0x0, 0x3},
  320. TIMPANI_TXADC_CHOP_CTL_M,
  321. TIMPANI_TXADC_CHOP_CTL_POR,
  322. {
  323. { .mask = 0xFC, .path_mask = 0},
  324. { .mask = 0x03, .path_mask = 0},
  325. { .mask = 0x00, .path_mask = 0},
  326. { .mask = 0x00, .path_mask = 0},
  327. { .mask = 0x00, .path_mask = 0},
  328. }
  329. },
  330. {
  331. TIMPANI_A_TXFE3,
  332. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xE2, 0x0, 0x0, 0x0,
  333. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1D},
  334. TIMPANI_TXFE3_M,
  335. TIMPANI_TXFE3_POR,
  336. {
  337. { .mask = 0xE2, .path_mask = 0},
  338. { .mask = 0x1D, .path_mask = 0},
  339. { .mask = 0x00, .path_mask = 0},
  340. { .mask = 0x00, .path_mask = 0},
  341. { .mask = 0x00, .path_mask = 0},
  342. }
  343. },
  344. {
  345. TIMPANI_A_TXFE4,
  346. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xE2, 0x0, 0x0, 0x0,
  347. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1D},
  348. TIMPANI_TXFE4_M,
  349. TIMPANI_TXFE4_POR,
  350. {
  351. { .mask = 0xE2, .path_mask = 0},
  352. { .mask = 0x1D, .path_mask = 0},
  353. { .mask = 0x00, .path_mask = 0},
  354. { .mask = 0x00, .path_mask = 0},
  355. { .mask = 0x00, .path_mask = 0},
  356. }
  357. },
  358. {
  359. TIMPANI_A_TXFE3_ATEST,
  360. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0,
  361. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  362. TIMPANI_TXFE3_ATEST_M,
  363. TIMPANI_TXFE3_ATEST_POR,
  364. {
  365. { .mask = 0xFF, .path_mask = 0},
  366. { .mask = 0x00, .path_mask = 0},
  367. { .mask = 0x00, .path_mask = 0},
  368. { .mask = 0x00, .path_mask = 0},
  369. { .mask = 0x00, .path_mask = 0},
  370. }
  371. },
  372. {
  373. TIMPANI_A_TXFE_DIFF_SE,
  374. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0xC, 0x0, 0x0, 0x0,
  375. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF0},
  376. TIMPANI_TXFE_DIFF_SE_M,
  377. TIMPANI_TXFE_DIFF_SE_POR,
  378. {
  379. { .mask = 0x03, .path_mask = 0},
  380. { .mask = 0x0C, .path_mask = 0},
  381. { .mask = 0xF0, .path_mask = 0},
  382. { .mask = 0x00, .path_mask = 0},
  383. { .mask = 0x00, .path_mask = 0},
  384. }
  385. },
  386. {
  387. TIMPANI_A_CDAC_RX_CLK_CTL,
  388. {0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  389. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  390. TIMPANI_CDAC_RX_CLK_CTL_M,
  391. TIMPANI_CDAC_RX_CLK_CTL_POR,
  392. {
  393. { .mask = 0xFF, .path_mask = 0},
  394. { .mask = 0x00, .path_mask = 0},
  395. { .mask = 0x00, .path_mask = 0},
  396. { .mask = 0x00, .path_mask = 0},
  397. { .mask = 0x00, .path_mask = 0},
  398. }
  399. },
  400. {
  401. TIMPANI_A_CDAC_BUFF_CTL,
  402. {0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  403. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  404. TIMPANI_CDAC_BUFF_CTL_M,
  405. TIMPANI_CDAC_BUFF_CTL_POR,
  406. {
  407. { .mask = 0xFF, .path_mask = 0},
  408. { .mask = 0x00, .path_mask = 0},
  409. { .mask = 0x00, .path_mask = 0},
  410. { .mask = 0x00, .path_mask = 0},
  411. { .mask = 0x00, .path_mask = 0},
  412. }
  413. },
  414. {
  415. TIMPANI_A_CDAC_REF_CTL1,
  416. {0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  417. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  418. TIMPANI_CDAC_REF_CTL1_M,
  419. TIMPANI_CDAC_REF_CTL1_POR,
  420. {
  421. { .mask = 0xFF, .path_mask = 0},
  422. { .mask = 0x00, .path_mask = 0},
  423. { .mask = 0x00, .path_mask = 0},
  424. { .mask = 0x00, .path_mask = 0},
  425. { .mask = 0x00, .path_mask = 0},
  426. }
  427. },
  428. {
  429. TIMPANI_A_IDAC_DWA_FIR_CTL,
  430. {0xF8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  431. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7},
  432. TIMPANI_IDAC_DWA_FIR_CTL_M,
  433. TIMPANI_IDAC_DWA_FIR_CTL_POR,
  434. {
  435. { .mask = 0xF8, .path_mask = 0},
  436. { .mask = 0x07, .path_mask = 0},
  437. { .mask = 0x00, .path_mask = 0},
  438. { .mask = 0x00, .path_mask = 0},
  439. { .mask = 0x00, .path_mask = 0},
  440. }
  441. },
  442. {
  443. TIMPANI_A_CDAC_REF_CTL2,
  444. {0x6F, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  445. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x90},
  446. TIMPANI_CDAC_REF_CTL2_M,
  447. TIMPANI_CDAC_REF_CTL2_POR,
  448. {
  449. { .mask = 0x6F, .path_mask = 0},
  450. { .mask = 0x90, .path_mask = 0},
  451. { .mask = 0x00, .path_mask = 0},
  452. { .mask = 0x00, .path_mask = 0},
  453. { .mask = 0x00, .path_mask = 0},
  454. }
  455. },
  456. {
  457. TIMPANI_A_CDAC_CTL1,
  458. {0x7F, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  459. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80},
  460. TIMPANI_CDAC_CTL1_M,
  461. TIMPANI_CDAC_CTL1_POR,
  462. {
  463. { .mask = 0x7F, .path_mask = 0},
  464. { .mask = 0x80, .path_mask = 0},
  465. { .mask = 0x00, .path_mask = 0},
  466. { .mask = 0x00, .path_mask = 0},
  467. { .mask = 0x00, .path_mask = 0},
  468. }
  469. },
  470. {
  471. TIMPANI_A_CDAC_CTL2,
  472. {0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  473. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  474. TIMPANI_CDAC_CTL2_M,
  475. TIMPANI_CDAC_CTL2_POR,
  476. {
  477. { .mask = 0xFF, .path_mask = 0},
  478. { .mask = 0x00, .path_mask = 0},
  479. { .mask = 0x00, .path_mask = 0},
  480. { .mask = 0x00, .path_mask = 0},
  481. { .mask = 0x00, .path_mask = 0},
  482. }
  483. },
  484. {
  485. TIMPANI_A_IDAC_L_CTL,
  486. {0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  487. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  488. TIMPANI_IDAC_L_CTL_M,
  489. TIMPANI_IDAC_L_CTL_POR,
  490. {
  491. { .mask = 0xFF, .path_mask = 0},
  492. { .mask = 0x00, .path_mask = 0},
  493. { .mask = 0x00, .path_mask = 0},
  494. { .mask = 0x00, .path_mask = 0},
  495. { .mask = 0x00, .path_mask = 0},
  496. }
  497. },
  498. {
  499. TIMPANI_A_IDAC_R_CTL,
  500. {0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  501. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  502. TIMPANI_IDAC_R_CTL_M,
  503. TIMPANI_IDAC_R_CTL_POR,
  504. {
  505. { .mask = 0xFF, .path_mask = 0},
  506. { .mask = 0x00, .path_mask = 0},
  507. { .mask = 0x00, .path_mask = 0},
  508. { .mask = 0x00, .path_mask = 0},
  509. { .mask = 0x00, .path_mask = 0},
  510. }
  511. },
  512. {
  513. TIMPANI_A_PA_MASTER_BIAS,
  514. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1F,
  515. 0xE0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  516. TIMPANI_PA_MASTER_BIAS_M,
  517. TIMPANI_PA_MASTER_BIAS_POR,
  518. {
  519. { .mask = 0x1F, .path_mask = 0},
  520. { .mask = 0xE0, .path_mask = 0},
  521. { .mask = 0x00, .path_mask = 0},
  522. { .mask = 0x00, .path_mask = 0},
  523. { .mask = 0x00, .path_mask = 0},
  524. }
  525. },
  526. {
  527. TIMPANI_A_PA_CLASSD_BIAS,
  528. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF,
  529. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  530. TIMPANI_PA_CLASSD_BIAS_M,
  531. TIMPANI_PA_CLASSD_BIAS_POR,
  532. {
  533. { .mask = 0xFF, .path_mask = 0},
  534. { .mask = 0x00, .path_mask = 0},
  535. { .mask = 0x00, .path_mask = 0},
  536. { .mask = 0x00, .path_mask = 0},
  537. { .mask = 0x00, .path_mask = 0},
  538. }
  539. },
  540. {
  541. TIMPANI_A_AUXPGA_CUR,
  542. {0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  543. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  544. TIMPANI_AUXPGA_CUR_M,
  545. TIMPANI_AUXPGA_CUR_POR,
  546. {
  547. { .mask = 0xFF, .path_mask = 0},
  548. { .mask = 0x00, .path_mask = 0},
  549. { .mask = 0x00, .path_mask = 0},
  550. { .mask = 0x00, .path_mask = 0},
  551. { .mask = 0x00, .path_mask = 0},
  552. }
  553. },
  554. {
  555. TIMPANI_A_AUXPGA_CM,
  556. {0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  557. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  558. TIMPANI_AUXPGA_CM_M,
  559. TIMPANI_AUXPGA_CM_POR,
  560. {
  561. { .mask = 0xFF, .path_mask = 0},
  562. { .mask = 0x00, .path_mask = 0},
  563. { .mask = 0x00, .path_mask = 0},
  564. { .mask = 0x00, .path_mask = 0},
  565. { .mask = 0x00, .path_mask = 0},
  566. }
  567. },
  568. {
  569. TIMPANI_A_PA_HPH_EARPA_MSTB_EN,
  570. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x2, 0xFC,
  571. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  572. TIMPANI_PA_HPH_EARPA_MSTB_EN_M,
  573. TIMPANI_PA_HPH_EARPA_MSTB_EN_POR,
  574. {
  575. { .mask = 0x01, .path_mask = 0},
  576. { .mask = 0x02, .path_mask = 0},
  577. { .mask = 0xFC, .path_mask = 0},
  578. { .mask = 0x00, .path_mask = 0},
  579. { .mask = 0x00, .path_mask = 0},
  580. }
  581. },
  582. {
  583. TIMPANI_A_PA_LINE_AUXO_EN,
  584. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  585. 0xF8, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  586. TIMPANI_PA_LINE_AUXO_EN_M,
  587. TIMPANI_PA_LINE_AUXO_EN_POR,
  588. {
  589. { .mask = 0xF8, .path_mask = 0},
  590. { .mask = 0x07, .path_mask = 0},
  591. { .mask = 0x00, .path_mask = 0},
  592. { .mask = 0x00, .path_mask = 0},
  593. { .mask = 0x00, .path_mask = 0},
  594. }
  595. },
  596. {
  597. TIMPANI_A_PA_CLASSD_AUXPGA_EN,
  598. {0x0, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF,
  599. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC0},
  600. TIMPANI_PA_CLASSD_AUXPGA_EN_M,
  601. TIMPANI_PA_CLASSD_AUXPGA_EN_POR,
  602. {
  603. { .mask = 0x30, .path_mask = 0},
  604. { .mask = 0x0F, .path_mask = 0},
  605. { .mask = 0xC0, .path_mask = 0},
  606. { .mask = 0x00, .path_mask = 0},
  607. { .mask = 0x00, .path_mask = 0},
  608. }
  609. },
  610. {
  611. TIMPANI_A_PA_LINE_L_GAIN,
  612. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  613. 0x0, 0x0, 0x0, 0x0, 0x0, 0xFC, 0x0, 0x3},
  614. TIMPANI_PA_LINE_L_GAIN_M,
  615. TIMPANI_PA_LINE_L_GAIN_POR,
  616. {
  617. { .mask = 0xFC, .path_mask = 0},
  618. { .mask = 0x03, .path_mask = 0},
  619. { .mask = 0x00, .path_mask = 0},
  620. { .mask = 0x00, .path_mask = 0},
  621. { .mask = 0x00, .path_mask = 0},
  622. }
  623. },
  624. {
  625. TIMPANI_A_PA_LINE_R_GAIN,
  626. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  627. 0x0, 0x0, 0x0, 0x0, 0x0, 0xFC, 0x0, 0x3},
  628. TIMPANI_PA_LINE_R_GAIN_M,
  629. TIMPANI_PA_LINE_R_GAIN_POR,
  630. {
  631. { .mask = 0xFC, .path_mask = 0},
  632. { .mask = 0x03, .path_mask = 0},
  633. { .mask = 0x00, .path_mask = 0},
  634. { .mask = 0x00, .path_mask = 0},
  635. { .mask = 0x00, .path_mask = 0},
  636. }
  637. },
  638. {
  639. TIMPANI_A_PA_HPH_L_GAIN,
  640. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  641. 0x0, 0x0, 0x0, 0x0, 0x0, 0xFE, 0x0, 0x1},
  642. TIMPANI_PA_HPH_L_GAIN_M,
  643. TIMPANI_PA_HPH_L_GAIN_POR,
  644. {
  645. { .mask = 0xFE, .path_mask = 0},
  646. { .mask = 0x01, .path_mask = 0},
  647. { .mask = 0x00, .path_mask = 0},
  648. { .mask = 0x00, .path_mask = 0},
  649. { .mask = 0x00, .path_mask = 0},
  650. }
  651. },
  652. {
  653. TIMPANI_A_PA_HPH_R_GAIN,
  654. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  655. 0x0, 0x0, 0x0, 0x0, 0x0, 0xFE, 0x0, 0x1},
  656. TIMPANI_PA_HPH_R_GAIN_M,
  657. TIMPANI_PA_HPH_R_GAIN_POR,
  658. {
  659. { .mask = 0xFE, .path_mask = 0},
  660. { .mask = 0x01, .path_mask = 0},
  661. { .mask = 0x00, .path_mask = 0},
  662. { .mask = 0x00, .path_mask = 0},
  663. { .mask = 0x00, .path_mask = 0},
  664. }
  665. },
  666. {
  667. TIMPANI_A_AUXPGA_LR_GAIN,
  668. {0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  669. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  670. TIMPANI_AUXPGA_LR_GAIN_M,
  671. TIMPANI_AUXPGA_LR_GAIN_POR,
  672. {
  673. { .mask = 0xFF, .path_mask = 0},
  674. { .mask = 0x00, .path_mask = 0},
  675. { .mask = 0x00, .path_mask = 0},
  676. { .mask = 0x00, .path_mask = 0},
  677. { .mask = 0x00, .path_mask = 0},
  678. }
  679. },
  680. {
  681. TIMPANI_A_PA_AUXO_EARPA_CONN,
  682. {0x21, 0x42, 0x0, 0x0, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  683. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18},
  684. TIMPANI_PA_AUXO_EARPA_CONN_M,
  685. TIMPANI_PA_AUXO_EARPA_CONN_POR,
  686. {
  687. { .mask = 0x21, .path_mask = 0},
  688. { .mask = 0x42, .path_mask = 0},
  689. { .mask = 0x84, .path_mask = 0},
  690. { .mask = 0x18, .path_mask = 0},
  691. { .mask = 0x00, .path_mask = 0},
  692. }
  693. },
  694. {
  695. TIMPANI_A_PA_LINE_ST_CONN,
  696. {0x24, 0x48, 0x0, 0x0, 0x93, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  697. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  698. TIMPANI_PA_LINE_ST_CONN_M,
  699. TIMPANI_PA_LINE_ST_CONN_POR,
  700. {
  701. { .mask = 0x24, .path_mask = 0},
  702. { .mask = 0x48, .path_mask = 0},
  703. { .mask = 0x93, .path_mask = 0},
  704. { .mask = 0x00, .path_mask = 0},
  705. { .mask = 0x00, .path_mask = 0},
  706. }
  707. },
  708. {
  709. TIMPANI_A_PA_LINE_MONO_CONN,
  710. {0x24, 0x48, 0x0, 0x0, 0x93, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  711. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  712. TIMPANI_PA_LINE_MONO_CONN_M,
  713. TIMPANI_PA_LINE_MONO_CONN_POR,
  714. {
  715. { .mask = 0x24, .path_mask = 0},
  716. { .mask = 0x48, .path_mask = 0},
  717. { .mask = 0x93, .path_mask = 0},
  718. { .mask = 0x00, .path_mask = 0},
  719. { .mask = 0x00, .path_mask = 0},
  720. }
  721. },
  722. {
  723. TIMPANI_A_PA_HPH_ST_CONN,
  724. {0x24, 0x48, 0x0, 0x0, 0x90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3,
  725. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  726. TIMPANI_PA_HPH_ST_CONN_M,
  727. TIMPANI_PA_HPH_ST_CONN_POR,
  728. {
  729. { .mask = 0x24, .path_mask = 0},
  730. { .mask = 0x48, .path_mask = 0},
  731. { .mask = 0x90, .path_mask = 0},
  732. { .mask = 0x03, .path_mask = 0},
  733. { .mask = 0x00, .path_mask = 0},
  734. }
  735. },
  736. {
  737. TIMPANI_A_PA_HPH_MONO_CONN,
  738. {0x24, 0x48, 0x0, 0x0, 0x90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  739. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3},
  740. TIMPANI_PA_HPH_MONO_CONN_M,
  741. TIMPANI_PA_HPH_MONO_CONN_POR,
  742. {
  743. { .mask = 0x24, .path_mask = 0},
  744. { .mask = 0x48, .path_mask = 0},
  745. { .mask = 0x90, .path_mask = 0},
  746. { .mask = 0x03, .path_mask = 0},
  747. { .mask = 0x00, .path_mask = 0},
  748. }
  749. },
  750. {
  751. TIMPANI_A_PA_CLASSD_CONN,
  752. {0x80, 0x40, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10,
  753. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF},
  754. TIMPANI_PA_CLASSD_CONN_M,
  755. TIMPANI_PA_CLASSD_CONN_POR,
  756. {
  757. { .mask = 0x80, .path_mask = 0},
  758. { .mask = 0x40, .path_mask = 0},
  759. { .mask = 0x20, .path_mask = 0},
  760. { .mask = 0x10, .path_mask = 0},
  761. { .mask = 0x0F, .path_mask = 0},
  762. }
  763. },
  764. {
  765. TIMPANI_A_PA_CNP_CTL,
  766. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xCF,
  767. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x30},
  768. TIMPANI_PA_CNP_CTL_M,
  769. TIMPANI_PA_CNP_CTL_POR,
  770. {
  771. { .mask = 0xCF, .path_mask = 0},
  772. { .mask = 0x30, .path_mask = 0},
  773. { .mask = 0x00, .path_mask = 0},
  774. { .mask = 0x00, .path_mask = 0},
  775. { .mask = 0x00, .path_mask = 0},
  776. }
  777. },
  778. {
  779. TIMPANI_A_PA_CLASSD_L_CTL,
  780. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3F,
  781. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC0},
  782. TIMPANI_PA_CLASSD_L_CTL_M,
  783. TIMPANI_PA_CLASSD_L_CTL_POR,
  784. {
  785. { .mask = 0x3F, .path_mask = 0},
  786. { .mask = 0xC0, .path_mask = 0},
  787. { .mask = 0x00, .path_mask = 0},
  788. { .mask = 0x00, .path_mask = 0},
  789. { .mask = 0x00, .path_mask = 0},
  790. }
  791. },
  792. {
  793. TIMPANI_A_PA_CLASSD_R_CTL,
  794. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3F,
  795. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC0},
  796. TIMPANI_PA_CLASSD_R_CTL_M,
  797. TIMPANI_PA_CLASSD_R_CTL_POR,
  798. {
  799. { .mask = 0x3F, .path_mask = 0},
  800. { .mask = 0xC0, .path_mask = 0},
  801. { .mask = 0x00, .path_mask = 0},
  802. { .mask = 0x00, .path_mask = 0},
  803. { .mask = 0x00, .path_mask = 0},
  804. }
  805. },
  806. {
  807. TIMPANI_A_PA_CLASSD_INT2_CTL,
  808. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF,
  809. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  810. TIMPANI_PA_CLASSD_INT2_CTL_M,
  811. TIMPANI_PA_CLASSD_INT2_CTL_POR,
  812. {
  813. { .mask = 0xFF, .path_mask = 0},
  814. { .mask = 0x00, .path_mask = 0},
  815. { .mask = 0x00, .path_mask = 0},
  816. { .mask = 0x00, .path_mask = 0},
  817. { .mask = 0x00, .path_mask = 0},
  818. }
  819. },
  820. {
  821. TIMPANI_A_PA_HPH_L_OCP_CLK_CTL,
  822. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF,
  823. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  824. TIMPANI_PA_HPH_L_OCP_CLK_CTL_M,
  825. TIMPANI_PA_HPH_L_OCP_CLK_CTL_POR,
  826. {
  827. { .mask = 0xFF, .path_mask = 0},
  828. { .mask = 0x00, .path_mask = 0},
  829. { .mask = 0x00, .path_mask = 0},
  830. { .mask = 0x00, .path_mask = 0},
  831. { .mask = 0x00, .path_mask = 0},
  832. }
  833. },
  834. {
  835. TIMPANI_A_PA_CLASSD_L_SW_CTL,
  836. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF7,
  837. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8},
  838. TIMPANI_PA_CLASSD_L_SW_CTL_M,
  839. TIMPANI_PA_CLASSD_L_SW_CTL_POR,
  840. {
  841. { .mask = 0xF7, .path_mask = 0},
  842. { .mask = 0x08, .path_mask = 0},
  843. { .mask = 0x00, .path_mask = 0},
  844. { .mask = 0x00, .path_mask = 0},
  845. { .mask = 0x00, .path_mask = 0},
  846. }
  847. },
  848. {
  849. TIMPANI_A_PA_CLASSD_L_OCP1,
  850. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF,
  851. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  852. TIMPANI_PA_CLASSD_L_OCP1_M,
  853. TIMPANI_PA_CLASSD_L_OCP1_POR,
  854. {
  855. { .mask = 0xFF, .path_mask = 0},
  856. { .mask = 0x00, .path_mask = 0},
  857. { .mask = 0x00, .path_mask = 0},
  858. { .mask = 0x00, .path_mask = 0},
  859. { .mask = 0x00, .path_mask = 0},
  860. }
  861. },
  862. {
  863. TIMPANI_A_PA_CLASSD_L_OCP2,
  864. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF,
  865. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  866. TIMPANI_PA_CLASSD_L_OCP2_M,
  867. TIMPANI_PA_CLASSD_L_OCP2_POR,
  868. {
  869. { .mask = 0xFF, .path_mask = 0},
  870. { .mask = 0x00, .path_mask = 0},
  871. { .mask = 0x00, .path_mask = 0},
  872. { .mask = 0x00, .path_mask = 0},
  873. { .mask = 0x00, .path_mask = 0},
  874. }
  875. },
  876. {
  877. TIMPANI_A_PA_HPH_R_OCP_CLK_CTL,
  878. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF,
  879. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  880. TIMPANI_PA_HPH_R_OCP_CLK_CTL_M,
  881. TIMPANI_PA_HPH_R_OCP_CLK_CTL_POR,
  882. {
  883. { .mask = 0xFF, .path_mask = 0},
  884. { .mask = 0x00, .path_mask = 0},
  885. { .mask = 0x00, .path_mask = 0},
  886. { .mask = 0x00, .path_mask = 0},
  887. { .mask = 0x00, .path_mask = 0},
  888. }
  889. },
  890. {
  891. TIMPANI_A_PA_CLASSD_R_SW_CTL,
  892. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF7,
  893. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8},
  894. TIMPANI_PA_CLASSD_R_SW_CTL_M,
  895. TIMPANI_PA_CLASSD_R_SW_CTL_POR,
  896. {
  897. { .mask = 0xF7, .path_mask = 0},
  898. { .mask = 0x08, .path_mask = 0},
  899. { .mask = 0x00, .path_mask = 0},
  900. { .mask = 0x00, .path_mask = 0},
  901. { .mask = 0x00, .path_mask = 0},
  902. }
  903. },
  904. {
  905. TIMPANI_A_PA_CLASSD_R_OCP1,
  906. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF,
  907. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  908. TIMPANI_PA_CLASSD_R_OCP1_M,
  909. TIMPANI_PA_CLASSD_R_OCP1_POR,
  910. {
  911. { .mask = 0xFF, .path_mask = 0},
  912. { .mask = 0x00, .path_mask = 0},
  913. { .mask = 0x00, .path_mask = 0},
  914. { .mask = 0x00, .path_mask = 0},
  915. { .mask = 0x00, .path_mask = 0},
  916. }
  917. },
  918. {
  919. TIMPANI_A_PA_CLASSD_R_OCP2,
  920. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF,
  921. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  922. TIMPANI_PA_CLASSD_R_OCP2_M,
  923. TIMPANI_PA_CLASSD_R_OCP2_POR,
  924. {
  925. { .mask = 0xFF, .path_mask = 0},
  926. { .mask = 0x00, .path_mask = 0},
  927. { .mask = 0x00, .path_mask = 0},
  928. { .mask = 0x00, .path_mask = 0},
  929. { .mask = 0x00, .path_mask = 0},
  930. }
  931. },
  932. {
  933. TIMPANI_A_PA_HPH_CTL1,
  934. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  935. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF},
  936. TIMPANI_PA_HPH_CTL1_M,
  937. TIMPANI_PA_HPH_CTL1_POR,
  938. {
  939. { .mask = 0xFF, .path_mask = 0},
  940. { .mask = 0x00, .path_mask = 0},
  941. { .mask = 0x00, .path_mask = 0},
  942. { .mask = 0x00, .path_mask = 0},
  943. { .mask = 0x00, .path_mask = 0},
  944. }
  945. },
  946. {
  947. TIMPANI_A_PA_HPH_CTL2,
  948. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFE,
  949. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1},
  950. TIMPANI_PA_HPH_CTL2_M,
  951. TIMPANI_PA_HPH_CTL2_POR,
  952. {
  953. { .mask = 0xFE, .path_mask = 0},
  954. { .mask = 0x01, .path_mask = 0},
  955. { .mask = 0x00, .path_mask = 0},
  956. { .mask = 0x00, .path_mask = 0},
  957. { .mask = 0x00, .path_mask = 0},
  958. }
  959. },
  960. {
  961. TIMPANI_A_PA_LINE_AUXO_CTL,
  962. {0x0, 0x0, 0x0, 0x0, 0x0, 0xC3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  963. 0x3C, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  964. TIMPANI_PA_LINE_AUXO_CTL_M,
  965. TIMPANI_PA_LINE_AUXO_CTL_POR,
  966. {
  967. { .mask = 0xC3, .path_mask = 0},
  968. { .mask = 0x3C, .path_mask = 0},
  969. { .mask = 0x00, .path_mask = 0},
  970. { .mask = 0x00, .path_mask = 0},
  971. { .mask = 0x00, .path_mask = 0},
  972. }
  973. },
  974. {
  975. TIMPANI_A_PA_AUXO_EARPA_CTL,
  976. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0x0,
  977. 0x0, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC0},
  978. TIMPANI_PA_AUXO_EARPA_CTL_M,
  979. TIMPANI_PA_AUXO_EARPA_CTL_POR,
  980. {
  981. { .mask = 0x07, .path_mask = 0},
  982. { .mask = 0x38, .path_mask = 0},
  983. { .mask = 0xC0, .path_mask = 0},
  984. { .mask = 0x00, .path_mask = 0},
  985. { .mask = 0x00, .path_mask = 0},
  986. }
  987. },
  988. {
  989. TIMPANI_A_PA_EARO_CTL,
  990. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0,
  991. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  992. TIMPANI_PA_EARO_CTL_M,
  993. TIMPANI_PA_EARO_CTL_POR,
  994. {
  995. { .mask = 0xFF, .path_mask = 0},
  996. { .mask = 0x00, .path_mask = 0},
  997. { .mask = 0x00, .path_mask = 0},
  998. { .mask = 0x00, .path_mask = 0},
  999. { .mask = 0x00, .path_mask = 0},
  1000. }
  1001. },
  1002. {
  1003. TIMPANI_A_PA_MASTER_BIAS_CUR,
  1004. {0x0, 0x0, 0x0, 0x0, 0x60, 0x0, 0x0, 0x0, 0x0, 0x80, 0x0, 0x18,
  1005. 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1},
  1006. TIMPANI_PA_MASTER_BIAS_CUR_M,
  1007. TIMPANI_PA_MASTER_BIAS_CUR_POR,
  1008. {
  1009. { .mask = 0x60, .path_mask = 0},
  1010. { .mask = 0x80, .path_mask = 0},
  1011. { .mask = 0x18, .path_mask = 0},
  1012. { .mask = 0x06, .path_mask = 0},
  1013. { .mask = 0x01, .path_mask = 0},
  1014. }
  1015. },
  1016. {
  1017. TIMPANI_A_PA_CLASSD_SC_STATUS,
  1018. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xCC,
  1019. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x33},
  1020. TIMPANI_PA_CLASSD_SC_STATUS_M,
  1021. TIMPANI_PA_CLASSD_SC_STATUS_POR,
  1022. {
  1023. { .mask = 0xCC, .path_mask = 0},
  1024. { .mask = 0x33, .path_mask = 0},
  1025. { .mask = 0x00, .path_mask = 0},
  1026. { .mask = 0x00, .path_mask = 0},
  1027. { .mask = 0x00, .path_mask = 0},
  1028. }
  1029. },
  1030. {
  1031. TIMPANI_A_PA_HPH_SC_STATUS,
  1032. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x88,
  1033. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x77},
  1034. TIMPANI_PA_HPH_SC_STATUS_M,
  1035. TIMPANI_PA_HPH_SC_STATUS_POR,
  1036. {
  1037. { .mask = 0x88, .path_mask = 0},
  1038. { .mask = 0x77, .path_mask = 0},
  1039. { .mask = 0x00, .path_mask = 0},
  1040. { .mask = 0x00, .path_mask = 0},
  1041. { .mask = 0x00, .path_mask = 0},
  1042. }
  1043. },
  1044. {
  1045. TIMPANI_A_ATEST_EN,
  1046. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1047. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x7F},
  1048. TIMPANI_ATEST_EN_M,
  1049. TIMPANI_ATEST_EN_POR,
  1050. {
  1051. { .mask = 0x80, .path_mask = 0},
  1052. { .mask = 0x7F, .path_mask = 0},
  1053. { .mask = 0x00, .path_mask = 0},
  1054. { .mask = 0x00, .path_mask = 0},
  1055. { .mask = 0x00, .path_mask = 0},
  1056. }
  1057. },
  1058. {
  1059. TIMPANI_A_ATEST_TSHKADC,
  1060. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1061. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0xF0},
  1062. TIMPANI_ATEST_TSHKADC_M,
  1063. TIMPANI_ATEST_TSHKADC_POR,
  1064. {
  1065. { .mask = 0x0F, .path_mask = 0},
  1066. { .mask = 0xF0, .path_mask = 0},
  1067. { .mask = 0x00, .path_mask = 0},
  1068. { .mask = 0x00, .path_mask = 0},
  1069. { .mask = 0x00, .path_mask = 0},
  1070. }
  1071. },
  1072. {
  1073. TIMPANI_A_ATEST_TXADC13,
  1074. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1075. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7F, 0x80},
  1076. TIMPANI_ATEST_TXADC13_M,
  1077. TIMPANI_ATEST_TXADC13_POR,
  1078. {
  1079. { .mask = 0x7F, .path_mask = 0},
  1080. { .mask = 0x80, .path_mask = 0},
  1081. { .mask = 0x00, .path_mask = 0},
  1082. { .mask = 0x00, .path_mask = 0},
  1083. { .mask = 0x00, .path_mask = 0},
  1084. }
  1085. },
  1086. {
  1087. TIMPANI_A_ATEST_TXADC24,
  1088. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1089. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7F, 0x80},
  1090. TIMPANI_ATEST_TXADC24_M,
  1091. TIMPANI_ATEST_TXADC24_POR,
  1092. {
  1093. { .mask = 0x7F, .path_mask = 0},
  1094. { .mask = 0x80, .path_mask = 0},
  1095. { .mask = 0x00, .path_mask = 0},
  1096. { .mask = 0x00, .path_mask = 0},
  1097. { .mask = 0x00, .path_mask = 0},
  1098. }
  1099. },
  1100. {
  1101. TIMPANI_A_ATEST_AUXPGA,
  1102. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1103. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF8, 0x7},
  1104. TIMPANI_ATEST_AUXPGA_M,
  1105. TIMPANI_ATEST_AUXPGA_POR,
  1106. {
  1107. { .mask = 0xF8, .path_mask = 0},
  1108. { .mask = 0x07, .path_mask = 0},
  1109. { .mask = 0x00, .path_mask = 0},
  1110. { .mask = 0x00, .path_mask = 0},
  1111. { .mask = 0x00, .path_mask = 0},
  1112. }
  1113. },
  1114. {
  1115. TIMPANI_A_ATEST_CDAC,
  1116. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1117. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0},
  1118. TIMPANI_ATEST_CDAC_M,
  1119. TIMPANI_ATEST_CDAC_POR,
  1120. {
  1121. { .mask = 0xFF, .path_mask = 0},
  1122. { .mask = 0x00, .path_mask = 0},
  1123. { .mask = 0x00, .path_mask = 0},
  1124. { .mask = 0x00, .path_mask = 0},
  1125. { .mask = 0x00, .path_mask = 0},
  1126. }
  1127. },
  1128. {
  1129. TIMPANI_A_ATEST_IDAC,
  1130. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1131. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0},
  1132. TIMPANI_ATEST_IDAC_M,
  1133. TIMPANI_ATEST_IDAC_POR,
  1134. {
  1135. { .mask = 0xFF, .path_mask = 0},
  1136. { .mask = 0x00, .path_mask = 0},
  1137. { .mask = 0x00, .path_mask = 0},
  1138. { .mask = 0x00, .path_mask = 0},
  1139. { .mask = 0x00, .path_mask = 0},
  1140. }
  1141. },
  1142. {
  1143. TIMPANI_A_ATEST_PA1,
  1144. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1145. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0},
  1146. TIMPANI_ATEST_PA1_M,
  1147. TIMPANI_ATEST_PA1_POR,
  1148. {
  1149. { .mask = 0xFF, .path_mask = 0},
  1150. { .mask = 0x00, .path_mask = 0},
  1151. { .mask = 0x00, .path_mask = 0},
  1152. { .mask = 0x00, .path_mask = 0},
  1153. { .mask = 0x00, .path_mask = 0},
  1154. }
  1155. },
  1156. {
  1157. TIMPANI_A_ATEST_CLASSD,
  1158. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1159. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0},
  1160. TIMPANI_ATEST_CLASSD_M,
  1161. TIMPANI_ATEST_CLASSD_POR,
  1162. {
  1163. { .mask = 0xFF, .path_mask = 0},
  1164. { .mask = 0x00, .path_mask = 0},
  1165. { .mask = 0x00, .path_mask = 0},
  1166. { .mask = 0x00, .path_mask = 0},
  1167. { .mask = 0x00, .path_mask = 0},
  1168. }
  1169. },
  1170. {
  1171. TIMPANI_A_ATEST_LINEO_AUXO,
  1172. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1173. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0},
  1174. TIMPANI_ATEST_LINEO_AUXO_M,
  1175. TIMPANI_ATEST_LINEO_AUXO_POR,
  1176. {
  1177. { .mask = 0xFF, .path_mask = 0},
  1178. { .mask = 0x00, .path_mask = 0},
  1179. { .mask = 0x00, .path_mask = 0},
  1180. { .mask = 0x00, .path_mask = 0},
  1181. { .mask = 0x00, .path_mask = 0},
  1182. }
  1183. },
  1184. {
  1185. TIMPANI_A_CDC_RESET_CTL,
  1186. {0x2, 0x8, 0x5, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1187. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC0},
  1188. TIMPANI_CDC_RESET_CTL_M,
  1189. TIMPANI_CDC_RESET_CTL_POR,
  1190. {
  1191. { .mask = 0x02, .path_mask = 0},
  1192. { .mask = 0x08, .path_mask = 0},
  1193. { .mask = 0x05, .path_mask = 0},
  1194. { .mask = 0x30, .path_mask = 0},
  1195. { .mask = 0xC0, .path_mask = 0},
  1196. }
  1197. },
  1198. {
  1199. TIMPANI_A_CDC_RX1_CTL,
  1200. {0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1201. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1202. TIMPANI_CDC_RX1_CTL_M,
  1203. TIMPANI_CDC_RX1_CTL_POR,
  1204. {
  1205. { .mask = 0xFF, .path_mask = 0},
  1206. { .mask = 0x00, .path_mask = 0},
  1207. { .mask = 0x00, .path_mask = 0},
  1208. { .mask = 0x00, .path_mask = 0},
  1209. { .mask = 0x00, .path_mask = 0},
  1210. }
  1211. },
  1212. {
  1213. TIMPANI_A_CDC_TX_I2S_CTL,
  1214. {0x0, 0x0, 0x10, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1215. 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0x0, 0xC0},
  1216. TIMPANI_CDC_TX_I2S_CTL_M,
  1217. TIMPANI_CDC_TX_I2S_CTL_POR,
  1218. {
  1219. { .mask = 0x10, .path_mask = 0},
  1220. { .mask = 0x20, .path_mask = 0},
  1221. { .mask = 0x0F, .path_mask = 0},
  1222. { .mask = 0xC0, .path_mask = 0},
  1223. { .mask = 0x00, .path_mask = 0},
  1224. }
  1225. },
  1226. {
  1227. TIMPANI_A_CDC_CH_CTL,
  1228. {0x3, 0x30, 0xC, 0xC0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1229. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1230. TIMPANI_CDC_CH_CTL_M,
  1231. TIMPANI_CDC_CH_CTL_POR,
  1232. {
  1233. { .mask = 0x03, .path_mask = 0},
  1234. { .mask = 0x30, .path_mask = 0},
  1235. { .mask = 0x0C, .path_mask = 0},
  1236. { .mask = 0xC0, .path_mask = 0},
  1237. { .mask = 0x00, .path_mask = 0},
  1238. }
  1239. },
  1240. {
  1241. TIMPANI_A_CDC_RX1LG,
  1242. {0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1243. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1244. TIMPANI_CDC_RX1LG_M,
  1245. TIMPANI_CDC_RX1LG_POR,
  1246. {
  1247. { .mask = 0xFF, .path_mask = 0},
  1248. { .mask = 0x00, .path_mask = 0},
  1249. { .mask = 0x00, .path_mask = 0},
  1250. { .mask = 0x00, .path_mask = 0},
  1251. { .mask = 0x00, .path_mask = 0},
  1252. }
  1253. },
  1254. {
  1255. TIMPANI_A_CDC_RX1RG,
  1256. {0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1257. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1258. TIMPANI_CDC_RX1RG_M,
  1259. TIMPANI_CDC_RX1RG_POR,
  1260. {
  1261. { .mask = 0xFF, .path_mask = 0},
  1262. { .mask = 0x00, .path_mask = 0},
  1263. { .mask = 0x00, .path_mask = 0},
  1264. { .mask = 0x00, .path_mask = 0},
  1265. { .mask = 0x00, .path_mask = 0},
  1266. }
  1267. },
  1268. {
  1269. TIMPANI_A_CDC_TX1LG,
  1270. {0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1271. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1272. TIMPANI_CDC_TX1LG_M,
  1273. TIMPANI_CDC_TX1LG_POR,
  1274. {
  1275. { .mask = 0xFF, .path_mask = 0},
  1276. { .mask = 0x00, .path_mask = 0},
  1277. { .mask = 0x00, .path_mask = 0},
  1278. { .mask = 0x00, .path_mask = 0},
  1279. { .mask = 0x00, .path_mask = 0},
  1280. }
  1281. },
  1282. {
  1283. TIMPANI_A_CDC_TX1RG,
  1284. {0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1285. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1286. TIMPANI_CDC_TX1RG_M,
  1287. TIMPANI_CDC_TX1RG_POR,
  1288. {
  1289. { .mask = 0xFF, .path_mask = 0},
  1290. { .mask = 0x00, .path_mask = 0},
  1291. { .mask = 0x00, .path_mask = 0},
  1292. { .mask = 0x00, .path_mask = 0},
  1293. { .mask = 0x00, .path_mask = 0},
  1294. }
  1295. },
  1296. {
  1297. TIMPANI_A_CDC_RX_PGA_TIMER,
  1298. {0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1299. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1300. TIMPANI_CDC_RX_PGA_TIMER_M,
  1301. TIMPANI_CDC_RX_PGA_TIMER_POR,
  1302. {
  1303. { .mask = 0xFF, .path_mask = 0},
  1304. { .mask = 0x00, .path_mask = 0},
  1305. { .mask = 0x00, .path_mask = 0},
  1306. { .mask = 0x00, .path_mask = 0},
  1307. { .mask = 0x00, .path_mask = 0},
  1308. }
  1309. },
  1310. {
  1311. TIMPANI_A_CDC_TX_PGA_TIMER,
  1312. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0,
  1313. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1314. TIMPANI_CDC_TX_PGA_TIMER_M,
  1315. TIMPANI_CDC_TX_PGA_TIMER_POR,
  1316. {
  1317. { .mask = 0xFF, .path_mask = 0},
  1318. { .mask = 0x00, .path_mask = 0},
  1319. { .mask = 0x00, .path_mask = 0},
  1320. { .mask = 0x00, .path_mask = 0},
  1321. { .mask = 0x00, .path_mask = 0},
  1322. }
  1323. },
  1324. {
  1325. TIMPANI_A_CDC_GCTL1,
  1326. {0xF, 0x0, 0xF0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1327. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1328. TIMPANI_CDC_GCTL1_M,
  1329. TIMPANI_CDC_GCTL1_POR,
  1330. {
  1331. { .mask = 0x0F, .path_mask = 0},
  1332. { .mask = 0xF0, .path_mask = 0},
  1333. { .mask = 0x00, .path_mask = 0},
  1334. { .mask = 0x00, .path_mask = 0},
  1335. { .mask = 0x00, .path_mask = 0},
  1336. }
  1337. },
  1338. {
  1339. TIMPANI_A_CDC_TX1L_STG,
  1340. {0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1341. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1342. TIMPANI_CDC_TX1L_STG_M,
  1343. TIMPANI_CDC_TX1L_STG_POR,
  1344. {
  1345. { .mask = 0xFF, .path_mask = 0},
  1346. { .mask = 0x00, .path_mask = 0},
  1347. { .mask = 0x00, .path_mask = 0},
  1348. { .mask = 0x00, .path_mask = 0},
  1349. { .mask = 0x00, .path_mask = 0},
  1350. }
  1351. },
  1352. {
  1353. TIMPANI_A_CDC_ST_CTL,
  1354. {0x0, 0xF, 0x0, 0xF0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1355. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1356. TIMPANI_CDC_ST_CTL_M,
  1357. TIMPANI_CDC_ST_CTL_POR,
  1358. {
  1359. { .mask = 0x0F, .path_mask = 0},
  1360. { .mask = 0xF0, .path_mask = 0},
  1361. { .mask = 0x00, .path_mask = 0},
  1362. { .mask = 0x00, .path_mask = 0},
  1363. { .mask = 0x00, .path_mask = 0},
  1364. }
  1365. },
  1366. {
  1367. TIMPANI_A_CDC_RX1L_DCOFFSET,
  1368. {0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1369. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1370. TIMPANI_CDC_RX1L_DCOFFSET_M,
  1371. TIMPANI_CDC_RX1L_DCOFFSET_POR,
  1372. {
  1373. { .mask = 0xFF, .path_mask = 0},
  1374. { .mask = 0x00, .path_mask = 0},
  1375. { .mask = 0x00, .path_mask = 0},
  1376. { .mask = 0x00, .path_mask = 0},
  1377. { .mask = 0x00, .path_mask = 0},
  1378. }
  1379. },
  1380. {
  1381. TIMPANI_A_CDC_RX1R_DCOFFSET,
  1382. {0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1383. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1384. TIMPANI_CDC_RX1R_DCOFFSET_M,
  1385. TIMPANI_CDC_RX1R_DCOFFSET_POR,
  1386. {
  1387. { .mask = 0xFF, .path_mask = 0},
  1388. { .mask = 0x00, .path_mask = 0},
  1389. { .mask = 0x00, .path_mask = 0},
  1390. { .mask = 0x00, .path_mask = 0},
  1391. { .mask = 0x00, .path_mask = 0},
  1392. }
  1393. },
  1394. {
  1395. TIMPANI_A_CDC_BYPASS_CTL1,
  1396. {0xF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1397. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF0},
  1398. TIMPANI_CDC_BYPASS_CTL1_M,
  1399. TIMPANI_CDC_BYPASS_CTL1_POR,
  1400. {
  1401. { .mask = 0x0F, .path_mask = 0},
  1402. { .mask = 0xF0, .path_mask = 0},
  1403. { .mask = 0x00, .path_mask = 0},
  1404. { .mask = 0x00, .path_mask = 0},
  1405. { .mask = 0x00, .path_mask = 0},
  1406. }
  1407. },
  1408. {
  1409. TIMPANI_A_CDC_PDM_CONFIG,
  1410. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1411. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0xF0},
  1412. TIMPANI_CDC_PDM_CONFIG_M,
  1413. TIMPANI_CDC_PDM_CONFIG_POR,
  1414. {
  1415. { .mask = 0x0F, .path_mask = 0},
  1416. { .mask = 0xF0, .path_mask = 0},
  1417. { .mask = 0x00, .path_mask = 0},
  1418. { .mask = 0x00, .path_mask = 0},
  1419. { .mask = 0x00, .path_mask = 0},
  1420. }
  1421. },
  1422. {
  1423. TIMPANI_A_CDC_TESTMODE1,
  1424. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1425. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3F, 0xC0},
  1426. TIMPANI_CDC_TESTMODE1_M,
  1427. TIMPANI_CDC_TESTMODE1_POR,
  1428. {
  1429. { .mask = 0x3F, .path_mask = 0},
  1430. { .mask = 0xC0, .path_mask = 0},
  1431. { .mask = 0x00, .path_mask = 0},
  1432. { .mask = 0x00, .path_mask = 0},
  1433. { .mask = 0x00, .path_mask = 0},
  1434. }
  1435. },
  1436. {
  1437. TIMPANI_A_CDC_DMIC_CLK_CTL,
  1438. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1439. 0x0, 0x0, 0x0, 0x3F, 0x0, 0x0, 0x0, 0xC0},
  1440. TIMPANI_CDC_DMIC_CLK_CTL_M,
  1441. TIMPANI_CDC_DMIC_CLK_CTL_POR,
  1442. {
  1443. { .mask = 0x3F, .path_mask = 0},
  1444. { .mask = 0xC0, .path_mask = 0},
  1445. { .mask = 0x00, .path_mask = 0},
  1446. { .mask = 0x00, .path_mask = 0},
  1447. { .mask = 0x00, .path_mask = 0},
  1448. }
  1449. },
  1450. {
  1451. TIMPANI_A_CDC_ADC12_CLK_CTL,
  1452. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0,
  1453. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1454. TIMPANI_CDC_ADC12_CLK_CTL_M,
  1455. TIMPANI_CDC_ADC12_CLK_CTL_POR,
  1456. {
  1457. { .mask = 0xFF, .path_mask = 0},
  1458. { .mask = 0x00, .path_mask = 0},
  1459. { .mask = 0x00, .path_mask = 0},
  1460. { .mask = 0x00, .path_mask = 0},
  1461. { .mask = 0x00, .path_mask = 0},
  1462. }
  1463. },
  1464. {
  1465. TIMPANI_A_CDC_TX1_CTL,
  1466. {0x0, 0x0, 0x3F, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1467. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC0},
  1468. TIMPANI_CDC_TX1_CTL_M,
  1469. TIMPANI_CDC_TX1_CTL_POR,
  1470. {
  1471. { .mask = 0x3F, .path_mask = 0},
  1472. { .mask = 0xC0, .path_mask = 0},
  1473. { .mask = 0x00, .path_mask = 0},
  1474. { .mask = 0x00, .path_mask = 0},
  1475. { .mask = 0x00, .path_mask = 0},
  1476. }
  1477. },
  1478. {
  1479. TIMPANI_A_CDC_ADC34_CLK_CTL,
  1480. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0,
  1481. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1482. TIMPANI_CDC_ADC34_CLK_CTL_M,
  1483. TIMPANI_CDC_ADC34_CLK_CTL_POR,
  1484. {
  1485. { .mask = 0xFF, .path_mask = 0},
  1486. { .mask = 0x00, .path_mask = 0},
  1487. { .mask = 0x00, .path_mask = 0},
  1488. { .mask = 0x00, .path_mask = 0},
  1489. { .mask = 0x00, .path_mask = 0},
  1490. }
  1491. },
  1492. {
  1493. TIMPANI_A_CDC_TX2_CTL,
  1494. {0x0, 0x0, 0x0, 0x3F, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1495. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC0},
  1496. TIMPANI_CDC_TX2_CTL_M,
  1497. TIMPANI_CDC_TX2_CTL_POR,
  1498. {
  1499. { .mask = 0x3F, .path_mask = 0},
  1500. { .mask = 0xC0, .path_mask = 0},
  1501. { .mask = 0x00, .path_mask = 0},
  1502. { .mask = 0x00, .path_mask = 0},
  1503. { .mask = 0x00, .path_mask = 0},
  1504. }
  1505. },
  1506. {
  1507. TIMPANI_A_CDC_RX1_CLK_CTL,
  1508. {0x1F, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1509. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xE0},
  1510. TIMPANI_CDC_RX1_CLK_CTL_M,
  1511. TIMPANI_CDC_RX1_CLK_CTL_POR,
  1512. {
  1513. { .mask = 0x1F, .path_mask = 0},
  1514. { .mask = 0xE0, .path_mask = 0},
  1515. { .mask = 0x00, .path_mask = 0},
  1516. { .mask = 0x00, .path_mask = 0},
  1517. { .mask = 0x00, .path_mask = 0},
  1518. }
  1519. },
  1520. {
  1521. TIMPANI_A_CDC_RX2_CLK_CTL,
  1522. {0x1F, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1523. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xE0},
  1524. TIMPANI_CDC_RX2_CLK_CTL_M,
  1525. TIMPANI_CDC_RX2_CLK_CTL_POR,
  1526. {
  1527. { .mask = 0x1F, .path_mask = 0},
  1528. { .mask = 0xE0, .path_mask = 0},
  1529. { .mask = 0x00, .path_mask = 0},
  1530. { .mask = 0x00, .path_mask = 0},
  1531. { .mask = 0x00, .path_mask = 0},
  1532. }
  1533. },
  1534. {
  1535. TIMPANI_A_CDC_DEC_ADC_SEL,
  1536. {0x0, 0x0, 0xF, 0xF0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1537. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1538. TIMPANI_CDC_DEC_ADC_SEL_M,
  1539. TIMPANI_CDC_DEC_ADC_SEL_POR,
  1540. {
  1541. { .mask = 0x0F, .path_mask = 0},
  1542. { .mask = 0xF0, .path_mask = 0},
  1543. { .mask = 0x00, .path_mask = 0},
  1544. { .mask = 0x00, .path_mask = 0},
  1545. { .mask = 0x00, .path_mask = 0},
  1546. }
  1547. },
  1548. {
  1549. TIMPANI_A_CDC_ANC_INPUT_MUX,
  1550. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1551. 0x0, 0x0, 0x0, 0x0, 0x0, 0x3F, 0x0, 0xC0},
  1552. TIMPANI_CDC_ANC_INPUT_MUX_M,
  1553. TIMPANI_CDC_ANC_INPUT_MUX_POR,
  1554. {
  1555. { .mask = 0x3F, .path_mask = 0},
  1556. { .mask = 0xC0, .path_mask = 0},
  1557. { .mask = 0x00, .path_mask = 0},
  1558. { .mask = 0x00, .path_mask = 0},
  1559. { .mask = 0x00, .path_mask = 0},
  1560. }
  1561. },
  1562. {
  1563. TIMPANI_A_CDC_ANC_RX_CLK_NS_SEL,
  1564. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1565. 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0xFE},
  1566. TIMPANI_CDC_ANC_RX_CLK_NS_SEL_M,
  1567. TIMPANI_CDC_ANC_RX_CLK_NS_SEL_POR,
  1568. {
  1569. { .mask = 0x01, .path_mask = 0},
  1570. { .mask = 0xFE, .path_mask = 0},
  1571. { .mask = 0x00, .path_mask = 0},
  1572. { .mask = 0x00, .path_mask = 0},
  1573. { .mask = 0x00, .path_mask = 0},
  1574. }
  1575. },
  1576. {
  1577. TIMPANI_A_CDC_ANC_FB_TUNE_SEL,
  1578. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1579. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF},
  1580. TIMPANI_CDC_ANC_FB_TUNE_SEL_M,
  1581. TIMPANI_CDC_ANC_FB_TUNE_SEL_POR,
  1582. {
  1583. { .mask = 0xFF, .path_mask = 0},
  1584. { .mask = 0x00, .path_mask = 0},
  1585. { .mask = 0x00, .path_mask = 0},
  1586. { .mask = 0x00, .path_mask = 0},
  1587. { .mask = 0x00, .path_mask = 0},
  1588. }
  1589. },
  1590. {
  1591. TIMPANI_A_CLK_DIV_SYNC_CTL,
  1592. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1593. 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0xFC},
  1594. TIMPANI_CLK_DIV_SYNC_CTL_M,
  1595. TIMPANI_CLK_DIV_SYNC_CTL_POR,
  1596. {
  1597. { .mask = 0x03, .path_mask = 0},
  1598. { .mask = 0xFC, .path_mask = 0},
  1599. { .mask = 0x00, .path_mask = 0},
  1600. { .mask = 0x00, .path_mask = 0},
  1601. { .mask = 0x00, .path_mask = 0},
  1602. }
  1603. },
  1604. {
  1605. TIMPANI_A_CDC_ADC_CLK_EN,
  1606. {0x0, 0x0, 0x3, 0xC, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1607. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF0},
  1608. TIMPANI_CDC_ADC_CLK_EN_M,
  1609. TIMPANI_CDC_ADC_CLK_EN_POR,
  1610. {
  1611. { .mask = 0x03, .path_mask = 0},
  1612. { .mask = 0x0C, .path_mask = 0},
  1613. { .mask = 0xF0, .path_mask = 0},
  1614. { .mask = 0x00, .path_mask = 0},
  1615. { .mask = 0x00, .path_mask = 0},
  1616. }
  1617. },
  1618. {
  1619. TIMPANI_A_CDC_ST_MIXING,
  1620. {0x0, 0x0, 0x3, 0xC, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1621. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF0},
  1622. TIMPANI_CDC_ST_MIXING_M,
  1623. TIMPANI_CDC_ST_MIXING_POR,
  1624. {
  1625. { .mask = 0x03, .path_mask = 0},
  1626. { .mask = 0x0C, .path_mask = 0},
  1627. { .mask = 0xF0, .path_mask = 0},
  1628. { .mask = 0x00, .path_mask = 0},
  1629. { .mask = 0x00, .path_mask = 0},
  1630. }
  1631. },
  1632. {
  1633. TIMPANI_A_CDC_RX2_CTL,
  1634. {0x0, 0x7F, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1635. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80},
  1636. TIMPANI_CDC_RX2_CTL_M,
  1637. TIMPANI_CDC_RX2_CTL_POR,
  1638. {
  1639. { .mask = 0x7F, .path_mask = 0},
  1640. { .mask = 0x80, .path_mask = 0},
  1641. { .mask = 0x00, .path_mask = 0},
  1642. { .mask = 0x00, .path_mask = 0},
  1643. { .mask = 0x00, .path_mask = 0},
  1644. }
  1645. },
  1646. {
  1647. TIMPANI_A_CDC_ARB_CLK_EN,
  1648. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1649. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF},
  1650. TIMPANI_CDC_ARB_CLK_EN_M,
  1651. TIMPANI_CDC_ARB_CLK_EN_POR,
  1652. {
  1653. { .mask = 0xFF, .path_mask = 0},
  1654. { .mask = 0x00, .path_mask = 0},
  1655. { .mask = 0x00, .path_mask = 0},
  1656. { .mask = 0x00, .path_mask = 0},
  1657. { .mask = 0x00, .path_mask = 0},
  1658. }
  1659. },
  1660. {
  1661. TIMPANI_A_CDC_I2S_CTL2,
  1662. {0x2, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1663. 0x0, 0x0, 0x0, 0x0, 0x39, 0x0, 0x0, 0xC0},
  1664. TIMPANI_CDC_I2S_CTL2_M,
  1665. TIMPANI_CDC_I2S_CTL2_POR,
  1666. {
  1667. { .mask = 0x02, .path_mask = 0},
  1668. { .mask = 0x04, .path_mask = 0},
  1669. { .mask = 0x39, .path_mask = 0},
  1670. { .mask = 0xC0, .path_mask = 0},
  1671. { .mask = 0x00, .path_mask = 0},
  1672. }
  1673. },
  1674. {
  1675. TIMPANI_A_CDC_RX2LG,
  1676. {0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1677. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1678. TIMPANI_CDC_RX2LG_M,
  1679. TIMPANI_CDC_RX2LG_POR,
  1680. {
  1681. { .mask = 0xFF, .path_mask = 0},
  1682. { .mask = 0x00, .path_mask = 0},
  1683. { .mask = 0x00, .path_mask = 0},
  1684. { .mask = 0x00, .path_mask = 0},
  1685. { .mask = 0x00, .path_mask = 0},
  1686. }
  1687. },
  1688. {
  1689. TIMPANI_A_CDC_RX2RG,
  1690. {0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1691. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1692. TIMPANI_CDC_RX2RG_M,
  1693. TIMPANI_CDC_RX2RG_POR,
  1694. {
  1695. { .mask = 0xFF, .path_mask = 0},
  1696. { .mask = 0x00, .path_mask = 0},
  1697. { .mask = 0x00, .path_mask = 0},
  1698. { .mask = 0x00, .path_mask = 0},
  1699. { .mask = 0x00, .path_mask = 0},
  1700. }
  1701. },
  1702. {
  1703. TIMPANI_A_CDC_TX2LG,
  1704. {0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1705. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1706. TIMPANI_CDC_TX2LG_M,
  1707. TIMPANI_CDC_TX2LG_POR,
  1708. {
  1709. { .mask = 0xFF, .path_mask = 0},
  1710. { .mask = 0x00, .path_mask = 0},
  1711. { .mask = 0x00, .path_mask = 0},
  1712. { .mask = 0x00, .path_mask = 0},
  1713. { .mask = 0x00, .path_mask = 0},
  1714. }
  1715. },
  1716. {
  1717. TIMPANI_A_CDC_TX2RG,
  1718. {0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1719. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1720. TIMPANI_CDC_TX2RG_M,
  1721. TIMPANI_CDC_TX2RG_POR,
  1722. {
  1723. { .mask = 0xFF, .path_mask = 0},
  1724. { .mask = 0x00, .path_mask = 0},
  1725. { .mask = 0x00, .path_mask = 0},
  1726. { .mask = 0x00, .path_mask = 0},
  1727. { .mask = 0x00, .path_mask = 0},
  1728. }
  1729. },
  1730. {
  1731. TIMPANI_A_CDC_DMIC_MUX,
  1732. {0x0, 0x0, 0xF, 0xF0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1733. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1734. TIMPANI_CDC_DMIC_MUX_M,
  1735. TIMPANI_CDC_DMIC_MUX_POR,
  1736. {
  1737. { .mask = 0x0F, .path_mask = 0},
  1738. { .mask = 0xF0, .path_mask = 0},
  1739. { .mask = 0x00, .path_mask = 0},
  1740. { .mask = 0x00, .path_mask = 0},
  1741. { .mask = 0x00, .path_mask = 0},
  1742. }
  1743. },
  1744. {
  1745. TIMPANI_A_CDC_ARB_CLK_CTL,
  1746. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1747. 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0xFC},
  1748. TIMPANI_CDC_ARB_CLK_CTL_M,
  1749. TIMPANI_CDC_ARB_CLK_CTL_POR,
  1750. {
  1751. { .mask = 0x03, .path_mask = 0},
  1752. { .mask = 0xFC, .path_mask = 0},
  1753. { .mask = 0x00, .path_mask = 0},
  1754. { .mask = 0x00, .path_mask = 0},
  1755. { .mask = 0x00, .path_mask = 0},
  1756. }
  1757. },
  1758. {
  1759. TIMPANI_A_CDC_GCTL2,
  1760. {0x0, 0xF, 0x0, 0xF0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1761. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1762. TIMPANI_CDC_GCTL2_M,
  1763. TIMPANI_CDC_GCTL2_POR,
  1764. {
  1765. { .mask = 0x0F, .path_mask = 0},
  1766. { .mask = 0xF0, .path_mask = 0},
  1767. { .mask = 0x00, .path_mask = 0},
  1768. { .mask = 0x00, .path_mask = 0},
  1769. { .mask = 0x00, .path_mask = 0},
  1770. }
  1771. },
  1772. {
  1773. TIMPANI_A_CDC_BYPASS_CTL2,
  1774. {0x0, 0x0, 0x3F, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1775. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC0},
  1776. TIMPANI_CDC_BYPASS_CTL2_M,
  1777. TIMPANI_CDC_BYPASS_CTL2_POR,
  1778. {
  1779. { .mask = 0x3F, .path_mask = 0},
  1780. { .mask = 0xC0, .path_mask = 0},
  1781. { .mask = 0x00, .path_mask = 0},
  1782. { .mask = 0x00, .path_mask = 0},
  1783. { .mask = 0x00, .path_mask = 0},
  1784. }
  1785. },
  1786. {
  1787. TIMPANI_A_CDC_BYPASS_CTL3,
  1788. {0x0, 0x0, 0x0, 0x3F, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1789. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC0},
  1790. TIMPANI_CDC_BYPASS_CTL3_M,
  1791. TIMPANI_CDC_BYPASS_CTL3_POR,
  1792. {
  1793. { .mask = 0x3F, .path_mask = 0},
  1794. { .mask = 0xC0, .path_mask = 0},
  1795. { .mask = 0x00, .path_mask = 0},
  1796. { .mask = 0x00, .path_mask = 0},
  1797. { .mask = 0x00, .path_mask = 0},
  1798. }
  1799. },
  1800. {
  1801. TIMPANI_A_CDC_BYPASS_CTL4,
  1802. {0x0, 0xF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1803. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF0},
  1804. TIMPANI_CDC_BYPASS_CTL4_M,
  1805. TIMPANI_CDC_BYPASS_CTL4_POR,
  1806. {
  1807. { .mask = 0x0F, .path_mask = 0},
  1808. { .mask = 0xF0, .path_mask = 0},
  1809. { .mask = 0x00, .path_mask = 0},
  1810. { .mask = 0x00, .path_mask = 0},
  1811. { .mask = 0x00, .path_mask = 0},
  1812. }
  1813. },
  1814. {
  1815. TIMPANI_A_CDC_RX2L_DCOFFSET,
  1816. {0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1817. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1818. TIMPANI_CDC_RX2L_DCOFFSET_M,
  1819. TIMPANI_CDC_RX2L_DCOFFSET_POR,
  1820. {
  1821. { .mask = 0xFF, .path_mask = 0},
  1822. { .mask = 0x00, .path_mask = 0},
  1823. { .mask = 0x00, .path_mask = 0},
  1824. { .mask = 0x00, .path_mask = 0},
  1825. { .mask = 0x00, .path_mask = 0},
  1826. }
  1827. },
  1828. {
  1829. TIMPANI_A_CDC_RX2R_DCOFFSET,
  1830. {0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1831. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1832. TIMPANI_CDC_RX2R_DCOFFSET_M,
  1833. TIMPANI_CDC_RX2R_DCOFFSET_POR,
  1834. {
  1835. { .mask = 0xFF, .path_mask = 0},
  1836. { .mask = 0x00, .path_mask = 0},
  1837. { .mask = 0x00, .path_mask = 0},
  1838. { .mask = 0x00, .path_mask = 0},
  1839. { .mask = 0x00, .path_mask = 0},
  1840. }
  1841. },
  1842. {
  1843. TIMPANI_A_CDC_RX_MIX_CTL,
  1844. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1845. 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0xFC},
  1846. TIMPANI_CDC_RX_MIX_CTL_M,
  1847. TIMPANI_CDC_RX_MIX_CTL_POR,
  1848. {
  1849. { .mask = 0x03, .path_mask = 0},
  1850. { .mask = 0xFC, .path_mask = 0},
  1851. { .mask = 0x00, .path_mask = 0},
  1852. { .mask = 0x00, .path_mask = 0},
  1853. { .mask = 0x00, .path_mask = 0},
  1854. }
  1855. },
  1856. {
  1857. TIMPANI_A_CDC_SPARE_CTL,
  1858. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1859. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xFE},
  1860. TIMPANI_CDC_SPARE_CTL_M,
  1861. TIMPANI_CDC_SPARE_CTL_POR,
  1862. {
  1863. { .mask = 0x01, .path_mask = 0},
  1864. { .mask = 0xFE, .path_mask = 0},
  1865. { .mask = 0x00, .path_mask = 0},
  1866. { .mask = 0x00, .path_mask = 0},
  1867. { .mask = 0x00, .path_mask = 0},
  1868. }
  1869. },
  1870. {
  1871. TIMPANI_A_CDC_TESTMODE2,
  1872. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1873. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1F, 0xE0},
  1874. TIMPANI_CDC_TESTMODE2_M,
  1875. TIMPANI_CDC_TESTMODE2_POR,
  1876. {
  1877. { .mask = 0x1F, .path_mask = 0},
  1878. { .mask = 0xE0, .path_mask = 0},
  1879. { .mask = 0x00, .path_mask = 0},
  1880. { .mask = 0x00, .path_mask = 0},
  1881. { .mask = 0x00, .path_mask = 0},
  1882. }
  1883. },
  1884. {
  1885. TIMPANI_A_CDC_PDM_OE,
  1886. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1887. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0},
  1888. TIMPANI_CDC_PDM_OE_M,
  1889. TIMPANI_CDC_PDM_OE_POR,
  1890. {
  1891. { .mask = 0xFF, .path_mask = 0},
  1892. { .mask = 0x00, .path_mask = 0},
  1893. { .mask = 0x00, .path_mask = 0},
  1894. { .mask = 0x00, .path_mask = 0},
  1895. { .mask = 0x00, .path_mask = 0},
  1896. }
  1897. },
  1898. {
  1899. TIMPANI_A_CDC_TX1R_STG,
  1900. {0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1901. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1902. TIMPANI_CDC_TX1R_STG_M,
  1903. TIMPANI_CDC_TX1R_STG_POR,
  1904. {
  1905. { .mask = 0xFF, .path_mask = 0},
  1906. { .mask = 0x00, .path_mask = 0},
  1907. { .mask = 0x00, .path_mask = 0},
  1908. { .mask = 0x00, .path_mask = 0},
  1909. { .mask = 0x00, .path_mask = 0},
  1910. }
  1911. },
  1912. {
  1913. TIMPANI_A_CDC_TX2L_STG,
  1914. {0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1915. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1916. TIMPANI_CDC_TX2L_STG_M,
  1917. TIMPANI_CDC_TX2L_STG_POR,
  1918. {
  1919. { .mask = 0xFF, .path_mask = 0},
  1920. { .mask = 0x00, .path_mask = 0},
  1921. { .mask = 0x00, .path_mask = 0},
  1922. { .mask = 0x00, .path_mask = 0},
  1923. { .mask = 0x00, .path_mask = 0},
  1924. }
  1925. },
  1926. {
  1927. TIMPANI_A_CDC_TX2R_STG,
  1928. {0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1929. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
  1930. TIMPANI_CDC_TX2R_STG_M,
  1931. TIMPANI_CDC_TX2R_STG_POR,
  1932. {
  1933. { .mask = 0xFF, .path_mask = 0},
  1934. { .mask = 0x00, .path_mask = 0},
  1935. { .mask = 0x00, .path_mask = 0},
  1936. { .mask = 0x00, .path_mask = 0},
  1937. { .mask = 0x00, .path_mask = 0},
  1938. }
  1939. },
  1940. {
  1941. TIMPANI_A_CDC_ARB_BYPASS_CTL,
  1942. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1943. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF},
  1944. TIMPANI_CDC_ARB_BYPASS_CTL_M,
  1945. TIMPANI_CDC_ARB_BYPASS_CTL_POR,
  1946. {
  1947. { .mask = 0xFF, .path_mask = 0},
  1948. { .mask = 0x00, .path_mask = 0},
  1949. { .mask = 0x00, .path_mask = 0},
  1950. { .mask = 0x00, .path_mask = 0},
  1951. { .mask = 0x00, .path_mask = 0},
  1952. }
  1953. },
  1954. {
  1955. TIMPANI_A_CDC_ANC1_CTL1,
  1956. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1957. 0x0, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x0, 0xE0},
  1958. TIMPANI_CDC_ANC1_CTL1_M,
  1959. TIMPANI_CDC_ANC1_CTL1_POR,
  1960. {
  1961. { .mask = 0x1F, .path_mask = 0},
  1962. { .mask = 0xE0, .path_mask = 0},
  1963. { .mask = 0x00, .path_mask = 0},
  1964. { .mask = 0x00, .path_mask = 0},
  1965. { .mask = 0x00, .path_mask = 0},
  1966. }
  1967. },
  1968. {
  1969. TIMPANI_A_CDC_ANC1_CTL2,
  1970. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1971. 0x0, 0x0, 0x0, 0x0, 0x0, 0x3F, 0x0, 0xC0},
  1972. TIMPANI_CDC_ANC1_CTL2_M,
  1973. TIMPANI_CDC_ANC1_CTL2_POR,
  1974. {
  1975. { .mask = 0x3F, .path_mask = 0},
  1976. { .mask = 0xC0, .path_mask = 0},
  1977. { .mask = 0x00, .path_mask = 0},
  1978. { .mask = 0x00, .path_mask = 0},
  1979. { .mask = 0x00, .path_mask = 0},
  1980. }
  1981. },
  1982. {
  1983. TIMPANI_A_CDC_ANC1_FF_FB_SHIFT,
  1984. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1985. 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
  1986. TIMPANI_CDC_ANC1_FF_FB_SHIFT_M,
  1987. TIMPANI_CDC_ANC1_FF_FB_SHIFT_POR,
  1988. {
  1989. { .mask = 0xFF, .path_mask = 0},
  1990. { .mask = 0x00, .path_mask = 0},
  1991. { .mask = 0x00, .path_mask = 0},
  1992. { .mask = 0x00, .path_mask = 0},
  1993. { .mask = 0x00, .path_mask = 0},
  1994. }
  1995. },
  1996. {
  1997. TIMPANI_A_CDC_ANC1_RX_NS,
  1998. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  1999. 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0x0, 0xF8},
  2000. TIMPANI_CDC_ANC1_RX_NS_M,
  2001. TIMPANI_CDC_ANC1_RX_NS_POR,
  2002. {
  2003. { .mask = 0x07, .path_mask = 0},
  2004. { .mask = 0xF8, .path_mask = 0},
  2005. { .mask = 0x00, .path_mask = 0},
  2006. { .mask = 0x00, .path_mask = 0},
  2007. { .mask = 0x00, .path_mask = 0},
  2008. }
  2009. },
  2010. {
  2011. TIMPANI_A_CDC_ANC1_SPARE,
  2012. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2013. 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
  2014. TIMPANI_CDC_ANC1_SPARE_M,
  2015. TIMPANI_CDC_ANC1_SPARE_POR,
  2016. {
  2017. { .mask = 0xFF, .path_mask = 0},
  2018. { .mask = 0x00, .path_mask = 0},
  2019. { .mask = 0x00, .path_mask = 0},
  2020. { .mask = 0x00, .path_mask = 0},
  2021. { .mask = 0x00, .path_mask = 0},
  2022. }
  2023. },
  2024. {
  2025. TIMPANI_A_CDC_ANC1_IIR_COEFF_PTR,
  2026. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2027. 0x0, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x0, 0xE0},
  2028. TIMPANI_CDC_ANC1_IIR_COEFF_PTR_M,
  2029. TIMPANI_CDC_ANC1_IIR_COEFF_PTR_POR,
  2030. {
  2031. { .mask = 0x1F, .path_mask = 0},
  2032. { .mask = 0xE0, .path_mask = 0},
  2033. { .mask = 0x00, .path_mask = 0},
  2034. { .mask = 0x00, .path_mask = 0},
  2035. { .mask = 0x00, .path_mask = 0},
  2036. }
  2037. },
  2038. {
  2039. TIMPANI_A_CDC_ANC1_IIR_COEFF_MSB,
  2040. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2041. 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0xFE},
  2042. TIMPANI_CDC_ANC1_IIR_COEFF_MSB_M,
  2043. TIMPANI_CDC_ANC1_IIR_COEFF_MSB_POR,
  2044. {
  2045. { .mask = 0x01, .path_mask = 0},
  2046. { .mask = 0xFE, .path_mask = 0},
  2047. { .mask = 0x00, .path_mask = 0},
  2048. { .mask = 0x00, .path_mask = 0},
  2049. { .mask = 0x00, .path_mask = 0},
  2050. }
  2051. },
  2052. {
  2053. TIMPANI_A_CDC_ANC1_IIR_COEFF_LSB,
  2054. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2055. 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
  2056. TIMPANI_CDC_ANC1_IIR_COEFF_LSB_M,
  2057. TIMPANI_CDC_ANC1_IIR_COEFF_LSB_POR,
  2058. {
  2059. { .mask = 0xFF, .path_mask = 0},
  2060. { .mask = 0x00, .path_mask = 0},
  2061. { .mask = 0x00, .path_mask = 0},
  2062. { .mask = 0x00, .path_mask = 0},
  2063. { .mask = 0x00, .path_mask = 0},
  2064. }
  2065. },
  2066. {
  2067. TIMPANI_A_CDC_ANC1_IIR_COEFF_CTL,
  2068. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2069. 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0xFC},
  2070. TIMPANI_CDC_ANC1_IIR_COEFF_CTL_M,
  2071. TIMPANI_CDC_ANC1_IIR_COEFF_CTL_POR,
  2072. {
  2073. { .mask = 0x03, .path_mask = 0},
  2074. { .mask = 0xFC, .path_mask = 0},
  2075. { .mask = 0x00, .path_mask = 0},
  2076. { .mask = 0x00, .path_mask = 0},
  2077. { .mask = 0x00, .path_mask = 0},
  2078. }
  2079. },
  2080. {
  2081. TIMPANI_A_CDC_ANC1_LPF_COEFF_PTR,
  2082. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2083. 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0xF0},
  2084. TIMPANI_CDC_ANC1_LPF_COEFF_PTR_M,
  2085. TIMPANI_CDC_ANC1_LPF_COEFF_PTR_POR,
  2086. {
  2087. { .mask = 0x0F, .path_mask = 0},
  2088. { .mask = 0xF0, .path_mask = 0},
  2089. { .mask = 0x00, .path_mask = 0},
  2090. { .mask = 0x00, .path_mask = 0},
  2091. { .mask = 0x00, .path_mask = 0},
  2092. }
  2093. },
  2094. {
  2095. TIMPANI_A_CDC_ANC1_LPF_COEFF_MSB,
  2096. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2097. 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0xF0},
  2098. TIMPANI_CDC_ANC1_LPF_COEFF_MSB_M,
  2099. TIMPANI_CDC_ANC1_LPF_COEFF_MSB_POR,
  2100. {
  2101. { .mask = 0x0F, .path_mask = 0},
  2102. { .mask = 0xF0, .path_mask = 0},
  2103. { .mask = 0x00, .path_mask = 0},
  2104. { .mask = 0x00, .path_mask = 0},
  2105. { .mask = 0x00, .path_mask = 0},
  2106. }
  2107. },
  2108. {
  2109. TIMPANI_A_CDC_ANC1_LPF_COEFF_LSB,
  2110. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2111. 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
  2112. TIMPANI_CDC_ANC1_LPF_COEFF_LSB_M,
  2113. TIMPANI_CDC_ANC1_LPF_COEFF_LSB_POR,
  2114. {
  2115. { .mask = 0xFF, .path_mask = 0},
  2116. { .mask = 0x00, .path_mask = 0},
  2117. { .mask = 0x00, .path_mask = 0},
  2118. { .mask = 0x00, .path_mask = 0},
  2119. { .mask = 0x00, .path_mask = 0},
  2120. }
  2121. },
  2122. {
  2123. TIMPANI_A_CDC_ANC1_SCALE_PTR,
  2124. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2125. 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
  2126. TIMPANI_CDC_ANC1_SCALE_PTR_M,
  2127. TIMPANI_CDC_ANC1_SCALE_PTR_POR,
  2128. {
  2129. { .mask = 0xFF, .path_mask = 0},
  2130. { .mask = 0x00, .path_mask = 0},
  2131. { .mask = 0x00, .path_mask = 0},
  2132. { .mask = 0x00, .path_mask = 0},
  2133. { .mask = 0x00, .path_mask = 0},
  2134. }
  2135. },
  2136. {
  2137. TIMPANI_A_CDC_ANC1_SCALE,
  2138. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2139. 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
  2140. TIMPANI_CDC_ANC1_SCALE_M,
  2141. TIMPANI_CDC_ANC1_SCALE_POR,
  2142. {
  2143. { .mask = 0xFF, .path_mask = 0},
  2144. { .mask = 0x00, .path_mask = 0},
  2145. { .mask = 0x00, .path_mask = 0},
  2146. { .mask = 0x00, .path_mask = 0},
  2147. { .mask = 0x00, .path_mask = 0},
  2148. }
  2149. },
  2150. {
  2151. TIMPANI_A_CDC_ANC1_DEBUG,
  2152. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2153. 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0xF0},
  2154. TIMPANI_CDC_ANC1_DEBUG_M,
  2155. TIMPANI_CDC_ANC1_DEBUG_POR,
  2156. {
  2157. { .mask = 0x0F, .path_mask = 0},
  2158. { .mask = 0xF0, .path_mask = 0},
  2159. { .mask = 0x00, .path_mask = 0},
  2160. { .mask = 0x00, .path_mask = 0},
  2161. { .mask = 0x00, .path_mask = 0},
  2162. }
  2163. },
  2164. {
  2165. TIMPANI_A_CDC_ANC2_CTL1,
  2166. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2167. 0x0, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x0, 0xE0},
  2168. TIMPANI_CDC_ANC2_CTL1_M,
  2169. TIMPANI_CDC_ANC2_CTL1_POR,
  2170. {
  2171. { .mask = 0x1F, .path_mask = 0},
  2172. { .mask = 0xE0, .path_mask = 0},
  2173. { .mask = 0x00, .path_mask = 0},
  2174. { .mask = 0x00, .path_mask = 0},
  2175. { .mask = 0x00, .path_mask = 0},
  2176. }
  2177. },
  2178. {
  2179. TIMPANI_A_CDC_ANC2_CTL2,
  2180. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2181. 0x0, 0x0, 0x0, 0x0, 0x0, 0x3F, 0x0, 0xC0},
  2182. TIMPANI_CDC_ANC2_CTL2_M,
  2183. TIMPANI_CDC_ANC2_CTL2_POR,
  2184. {
  2185. { .mask = 0x3F, .path_mask = 0},
  2186. { .mask = 0xC0, .path_mask = 0},
  2187. { .mask = 0x00, .path_mask = 0},
  2188. { .mask = 0x00, .path_mask = 0},
  2189. { .mask = 0x00, .path_mask = 0},
  2190. }
  2191. },
  2192. {
  2193. TIMPANI_A_CDC_ANC2_FF_FB_SHIFT,
  2194. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2195. 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
  2196. TIMPANI_CDC_ANC2_FF_FB_SHIFT_M,
  2197. TIMPANI_CDC_ANC2_FF_FB_SHIFT_POR,
  2198. {
  2199. { .mask = 0xFF, .path_mask = 0},
  2200. { .mask = 0x00, .path_mask = 0},
  2201. { .mask = 0x00, .path_mask = 0},
  2202. { .mask = 0x00, .path_mask = 0},
  2203. { .mask = 0x00, .path_mask = 0},
  2204. }
  2205. },
  2206. {
  2207. TIMPANI_A_CDC_ANC2_RX_NS,
  2208. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2209. 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0x0, 0xF8},
  2210. TIMPANI_CDC_ANC2_RX_NS_M,
  2211. TIMPANI_CDC_ANC2_RX_NS_POR,
  2212. {
  2213. { .mask = 0x07, .path_mask = 0},
  2214. { .mask = 0xF8, .path_mask = 0},
  2215. { .mask = 0x00, .path_mask = 0},
  2216. { .mask = 0x00, .path_mask = 0},
  2217. { .mask = 0x00, .path_mask = 0},
  2218. }
  2219. },
  2220. {
  2221. TIMPANI_A_CDC_ANC2_SPARE,
  2222. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2223. 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
  2224. TIMPANI_CDC_ANC2_SPARE_M,
  2225. TIMPANI_CDC_ANC2_SPARE_POR,
  2226. {
  2227. { .mask = 0xFF, .path_mask = 0},
  2228. { .mask = 0x00, .path_mask = 0},
  2229. { .mask = 0x00, .path_mask = 0},
  2230. { .mask = 0x00, .path_mask = 0},
  2231. { .mask = 0x00, .path_mask = 0},
  2232. }
  2233. },
  2234. {
  2235. TIMPANI_A_CDC_ANC2_IIR_COEFF_PTR,
  2236. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2237. 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0xF0},
  2238. TIMPANI_CDC_ANC2_IIR_COEFF_PTR_M,
  2239. TIMPANI_CDC_ANC2_IIR_COEFF_PTR_POR,
  2240. {
  2241. { .mask = 0x0F, .path_mask = 0},
  2242. { .mask = 0xF0, .path_mask = 0},
  2243. { .mask = 0x00, .path_mask = 0},
  2244. { .mask = 0x00, .path_mask = 0},
  2245. { .mask = 0x00, .path_mask = 0},
  2246. }
  2247. },
  2248. {
  2249. TIMPANI_A_CDC_ANC2_IIR_COEFF_MSB,
  2250. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2251. 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0xFE},
  2252. TIMPANI_CDC_ANC2_IIR_COEFF_MSB_M,
  2253. TIMPANI_CDC_ANC2_IIR_COEFF_MSB_POR,
  2254. {
  2255. { .mask = 0x01, .path_mask = 0},
  2256. { .mask = 0xFE, .path_mask = 0},
  2257. { .mask = 0x00, .path_mask = 0},
  2258. { .mask = 0x00, .path_mask = 0},
  2259. { .mask = 0x00, .path_mask = 0},
  2260. }
  2261. },
  2262. {
  2263. TIMPANI_A_CDC_ANC2_IIR_COEFF_LSB,
  2264. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2265. 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
  2266. TIMPANI_CDC_ANC2_IIR_COEFF_LSB_M,
  2267. TIMPANI_CDC_ANC2_IIR_COEFF_LSB_POR,
  2268. {
  2269. { .mask = 0xFF, .path_mask = 0},
  2270. { .mask = 0x00, .path_mask = 0},
  2271. { .mask = 0x00, .path_mask = 0},
  2272. { .mask = 0x00, .path_mask = 0},
  2273. { .mask = 0x00, .path_mask = 0},
  2274. }
  2275. },
  2276. {
  2277. TIMPANI_A_CDC_ANC2_IIR_COEFF_CTL,
  2278. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2279. 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0xFC},
  2280. TIMPANI_CDC_ANC2_IIR_COEFF_CTL_M,
  2281. TIMPANI_CDC_ANC2_IIR_COEFF_CTL_POR,
  2282. {
  2283. { .mask = 0x03, .path_mask = 0},
  2284. { .mask = 0xFC, .path_mask = 0},
  2285. { .mask = 0x00, .path_mask = 0},
  2286. { .mask = 0x00, .path_mask = 0},
  2287. { .mask = 0x00, .path_mask = 0},
  2288. }
  2289. },
  2290. {
  2291. TIMPANI_A_CDC_ANC2_LPF_COEFF_PTR,
  2292. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2293. 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0xF0},
  2294. TIMPANI_CDC_ANC2_LPF_COEFF_PTR_M,
  2295. TIMPANI_CDC_ANC2_LPF_COEFF_PTR_POR,
  2296. {
  2297. { .mask = 0x0F, .path_mask = 0},
  2298. { .mask = 0xF0, .path_mask = 0},
  2299. { .mask = 0x00, .path_mask = 0},
  2300. { .mask = 0x00, .path_mask = 0},
  2301. { .mask = 0x00, .path_mask = 0},
  2302. }
  2303. },
  2304. {
  2305. TIMPANI_A_CDC_ANC2_LPF_COEFF_MSB,
  2306. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2307. 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0xF0},
  2308. TIMPANI_CDC_ANC2_LPF_COEFF_MSB_M,
  2309. TIMPANI_CDC_ANC2_LPF_COEFF_MSB_POR,
  2310. {
  2311. { .mask = 0x0F, .path_mask = 0},
  2312. { .mask = 0xF0, .path_mask = 0},
  2313. { .mask = 0x00, .path_mask = 0},
  2314. { .mask = 0x00, .path_mask = 0},
  2315. { .mask = 0x00, .path_mask = 0},
  2316. }
  2317. },
  2318. {
  2319. TIMPANI_A_CDC_ANC2_LPF_COEFF_LSB,
  2320. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2321. 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
  2322. TIMPANI_CDC_ANC2_LPF_COEFF_LSB_M,
  2323. TIMPANI_CDC_ANC2_LPF_COEFF_LSB_POR,
  2324. {
  2325. { .mask = 0xFF, .path_mask = 0},
  2326. { .mask = 0x00, .path_mask = 0},
  2327. { .mask = 0x00, .path_mask = 0},
  2328. { .mask = 0x00, .path_mask = 0},
  2329. { .mask = 0x00, .path_mask = 0},
  2330. }
  2331. },
  2332. {
  2333. TIMPANI_A_CDC_ANC2_SCALE_PTR,
  2334. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2335. 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
  2336. TIMPANI_CDC_ANC2_SCALE_PTR_M,
  2337. TIMPANI_CDC_ANC2_SCALE_PTR_POR,
  2338. {
  2339. { .mask = 0xFF, .path_mask = 0},
  2340. { .mask = 0x00, .path_mask = 0},
  2341. { .mask = 0x00, .path_mask = 0},
  2342. { .mask = 0x00, .path_mask = 0},
  2343. { .mask = 0x00, .path_mask = 0},
  2344. }
  2345. },
  2346. {
  2347. TIMPANI_A_CDC_ANC2_SCALE,
  2348. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2349. 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
  2350. TIMPANI_CDC_ANC2_SCALE_M,
  2351. TIMPANI_CDC_ANC2_SCALE_POR,
  2352. {
  2353. { .mask = 0xFF, .path_mask = 0},
  2354. { .mask = 0x00, .path_mask = 0},
  2355. { .mask = 0x00, .path_mask = 0},
  2356. { .mask = 0x00, .path_mask = 0},
  2357. { .mask = 0x00, .path_mask = 0},
  2358. }
  2359. },
  2360. {
  2361. TIMPANI_A_CDC_ANC2_DEBUG,
  2362. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2363. 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0xF0},
  2364. TIMPANI_CDC_ANC2_DEBUG_M,
  2365. TIMPANI_CDC_ANC2_DEBUG_POR,
  2366. {
  2367. { .mask = 0x0F, .path_mask = 0},
  2368. { .mask = 0xF0, .path_mask = 0},
  2369. { .mask = 0x00, .path_mask = 0},
  2370. { .mask = 0x00, .path_mask = 0},
  2371. { .mask = 0x00, .path_mask = 0},
  2372. }
  2373. },
  2374. {
  2375. TIMPANI_A_CDC_LINE_L_AVOL,
  2376. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2377. 0xFC, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3},
  2378. TIMPANI_CDC_LINE_L_AVOL_M,
  2379. TIMPANI_CDC_LINE_L_AVOL_POR,
  2380. {
  2381. { .mask = 0xFC, .path_mask = 0},
  2382. { .mask = 0x03, .path_mask = 0},
  2383. { .mask = 0x00, .path_mask = 0},
  2384. { .mask = 0x00, .path_mask = 0},
  2385. { .mask = 0x00, .path_mask = 0},
  2386. }
  2387. },
  2388. {
  2389. TIMPANI_A_CDC_LINE_R_AVOL,
  2390. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2391. 0xFC, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3},
  2392. TIMPANI_CDC_LINE_R_AVOL_M,
  2393. TIMPANI_CDC_LINE_R_AVOL_POR,
  2394. {
  2395. { .mask = 0xFC, .path_mask = 0},
  2396. { .mask = 0x03, .path_mask = 0},
  2397. { .mask = 0x00, .path_mask = 0},
  2398. { .mask = 0x00, .path_mask = 0},
  2399. { .mask = 0x00, .path_mask = 0},
  2400. }
  2401. },
  2402. {
  2403. TIMPANI_A_CDC_HPH_L_AVOL,
  2404. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFE,
  2405. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1},
  2406. TIMPANI_CDC_HPH_L_AVOL_M,
  2407. TIMPANI_CDC_HPH_L_AVOL_POR,
  2408. {
  2409. { .mask = 0xFE, .path_mask = 0},
  2410. { .mask = 0x01, .path_mask = 0},
  2411. { .mask = 0x00, .path_mask = 0},
  2412. { .mask = 0x00, .path_mask = 0},
  2413. { .mask = 0x00, .path_mask = 0},
  2414. }
  2415. },
  2416. {
  2417. TIMPANI_A_CDC_HPH_R_AVOL,
  2418. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFE,
  2419. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1},
  2420. TIMPANI_CDC_HPH_R_AVOL_M,
  2421. TIMPANI_CDC_HPH_R_AVOL_POR,
  2422. {
  2423. { .mask = 0xFE, .path_mask = 0},
  2424. { .mask = 0x01, .path_mask = 0},
  2425. { .mask = 0x00, .path_mask = 0},
  2426. { .mask = 0x00, .path_mask = 0},
  2427. { .mask = 0x00, .path_mask = 0},
  2428. }
  2429. },
  2430. {
  2431. TIMPANI_A_CDC_COMP_CTL1,
  2432. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2433. 0x0, 0x0, 0x0, 0x0, 0x0, 0x3F, 0x0, 0xC0},
  2434. TIMPANI_CDC_COMP_CTL1_M,
  2435. TIMPANI_CDC_COMP_CTL1_POR,
  2436. {
  2437. { .mask = 0x3F, .path_mask = 0},
  2438. { .mask = 0xC0, .path_mask = 0},
  2439. { .mask = 0x00, .path_mask = 0},
  2440. { .mask = 0x00, .path_mask = 0},
  2441. { .mask = 0x00, .path_mask = 0},
  2442. }
  2443. },
  2444. {
  2445. TIMPANI_A_CDC_COMP_CTL2,
  2446. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2447. 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0xF0},
  2448. TIMPANI_CDC_COMP_CTL2_M,
  2449. TIMPANI_CDC_COMP_CTL2_POR,
  2450. {
  2451. { .mask = 0x0F, .path_mask = 0},
  2452. { .mask = 0xF0, .path_mask = 0},
  2453. { .mask = 0x00, .path_mask = 0},
  2454. { .mask = 0x00, .path_mask = 0},
  2455. { .mask = 0x00, .path_mask = 0},
  2456. }
  2457. },
  2458. {
  2459. TIMPANI_A_CDC_COMP_PEAK_METER,
  2460. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2461. 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0xF0},
  2462. TIMPANI_CDC_COMP_PEAK_METER_M,
  2463. TIMPANI_CDC_COMP_PEAK_METER_POR,
  2464. {
  2465. { .mask = 0x0F, .path_mask = 0},
  2466. { .mask = 0xF0, .path_mask = 0},
  2467. { .mask = 0x00, .path_mask = 0},
  2468. { .mask = 0x00, .path_mask = 0},
  2469. { .mask = 0x00, .path_mask = 0},
  2470. }
  2471. },
  2472. {
  2473. TIMPANI_A_CDC_COMP_LEVEL_METER_CTL1,
  2474. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2475. 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0xF0},
  2476. TIMPANI_CDC_COMP_LEVEL_METER_CTL1_M,
  2477. TIMPANI_CDC_COMP_LEVEL_METER_CTL1_POR,
  2478. {
  2479. { .mask = 0x0F, .path_mask = 0},
  2480. { .mask = 0xF0, .path_mask = 0},
  2481. { .mask = 0x00, .path_mask = 0},
  2482. { .mask = 0x00, .path_mask = 0},
  2483. { .mask = 0x00, .path_mask = 0},
  2484. }
  2485. },
  2486. {
  2487. TIMPANI_A_CDC_COMP_LEVEL_METER_CTL2,
  2488. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2489. 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
  2490. TIMPANI_CDC_COMP_LEVEL_METER_CTL2_M,
  2491. TIMPANI_CDC_COMP_LEVEL_METER_CTL2_POR,
  2492. {
  2493. { .mask = 0xFF, .path_mask = 0},
  2494. { .mask = 0x00, .path_mask = 0},
  2495. { .mask = 0x00, .path_mask = 0},
  2496. { .mask = 0x00, .path_mask = 0},
  2497. { .mask = 0x00, .path_mask = 0},
  2498. }
  2499. },
  2500. {
  2501. TIMPANI_A_CDC_COMP_ZONE_SELECT,
  2502. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2503. 0x0, 0x0, 0x0, 0x0, 0x0, 0x7F, 0x0, 0x80},
  2504. TIMPANI_CDC_COMP_ZONE_SELECT_M,
  2505. TIMPANI_CDC_COMP_ZONE_SELECT_POR,
  2506. {
  2507. { .mask = 0x7F, .path_mask = 0},
  2508. { .mask = 0x80, .path_mask = 0},
  2509. { .mask = 0x00, .path_mask = 0},
  2510. { .mask = 0x00, .path_mask = 0},
  2511. { .mask = 0x00, .path_mask = 0},
  2512. }
  2513. },
  2514. {
  2515. TIMPANI_A_CDC_COMP_ZC_MSB,
  2516. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2517. 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
  2518. TIMPANI_CDC_COMP_ZC_MSB_M,
  2519. TIMPANI_CDC_COMP_ZC_MSB_POR,
  2520. {
  2521. { .mask = 0xFF, .path_mask = 0},
  2522. { .mask = 0x00, .path_mask = 0},
  2523. { .mask = 0x00, .path_mask = 0},
  2524. { .mask = 0x00, .path_mask = 0},
  2525. { .mask = 0x00, .path_mask = 0},
  2526. }
  2527. },
  2528. {
  2529. TIMPANI_A_CDC_COMP_ZC_LSB,
  2530. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2531. 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
  2532. TIMPANI_CDC_COMP_ZC_LSB_M,
  2533. TIMPANI_CDC_COMP_ZC_LSB_POR,
  2534. {
  2535. { .mask = 0xFF, .path_mask = 0},
  2536. { .mask = 0x00, .path_mask = 0},
  2537. { .mask = 0x00, .path_mask = 0},
  2538. { .mask = 0x00, .path_mask = 0},
  2539. { .mask = 0x00, .path_mask = 0},
  2540. }
  2541. },
  2542. {
  2543. TIMPANI_A_CDC_COMP_SHUT_DOWN,
  2544. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2545. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF},
  2546. TIMPANI_CDC_COMP_SHUT_DOWN_M,
  2547. TIMPANI_CDC_COMP_SHUT_DOWN_POR,
  2548. {
  2549. { .mask = 0xFF, .path_mask = 0},
  2550. { .mask = 0x00, .path_mask = 0},
  2551. { .mask = 0x00, .path_mask = 0},
  2552. { .mask = 0x00, .path_mask = 0},
  2553. { .mask = 0x00, .path_mask = 0},
  2554. }
  2555. },
  2556. {
  2557. TIMPANI_A_CDC_COMP_SHUT_DOWN_STATUS,
  2558. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2559. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF},
  2560. TIMPANI_CDC_COMP_SHUT_DOWN_STATUS_M,
  2561. TIMPANI_CDC_COMP_SHUT_DOWN_STATUS_POR,
  2562. {
  2563. { .mask = 0xFF, .path_mask = 0},
  2564. { .mask = 0x00, .path_mask = 0},
  2565. { .mask = 0x00, .path_mask = 0},
  2566. { .mask = 0x00, .path_mask = 0},
  2567. { .mask = 0x00, .path_mask = 0},
  2568. }
  2569. },
  2570. {
  2571. TIMPANI_A_CDC_COMP_HALT,
  2572. {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  2573. 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF},
  2574. TIMPANI_CDC_COMP_HALT_M,
  2575. TIMPANI_CDC_COMP_HALT_POR,
  2576. {
  2577. { .mask = 0xFF, .path_mask = 0},
  2578. { .mask = 0x00, .path_mask = 0},
  2579. { .mask = 0x00, .path_mask = 0},
  2580. { .mask = 0x00, .path_mask = 0},
  2581. { .mask = 0x00, .path_mask = 0},
  2582. }
  2583. }
  2584. };
  2585. struct reg_acc_blk_cfg timpani_blkcfg[RA_BLOCK_NUM] = {
  2586. {
  2587. .valid_owners = {RA_OWNER_NONE, RA_OWNER_PATH_RX1,
  2588. 0, 0, 0, 0, RA_OWNER_DRV}
  2589. },
  2590. /* RA_BLOCK_RX1 */
  2591. {
  2592. .valid_owners = {RA_OWNER_NONE, 0, RA_OWNER_PATH_RX2,
  2593. 0, 0, 0, RA_OWNER_DRV}
  2594. },
  2595. /* RA_BLOCK_RX2 */
  2596. {
  2597. .valid_owners = {RA_OWNER_NONE, 0, 0, RA_OWNER_PATH_TX1,
  2598. 0, 0, RA_OWNER_DRV}
  2599. },
  2600. /* RA_BLOCK_TX1 */
  2601. {
  2602. .valid_owners = {RA_OWNER_NONE, 0, 0, 0, RA_OWNER_PATH_TX2,
  2603. 0, RA_OWNER_DRV}
  2604. },
  2605. /* RA_BLOCK_TX2 */
  2606. {
  2607. .valid_owners = {RA_OWNER_NONE, 0, 0, 0, 0,
  2608. RA_OWNER_PATH_LB, RA_OWNER_DRV}
  2609. },
  2610. /* RA_BLOCK_LB */
  2611. {
  2612. .valid_owners = {RA_OWNER_NONE, RA_OWNER_PATH_RX1,
  2613. RA_OWNER_PATH_RX2, 0, 0, RA_OWNER_PATH_LB, RA_OWNER_DRV}
  2614. },
  2615. /* RA_BLOCK_SHARED_RX_LB */
  2616. {
  2617. .valid_owners = {RA_OWNER_NONE, 0, 0, RA_OWNER_PATH_TX1,
  2618. RA_OWNER_PATH_TX2, 0, RA_OWNER_DRV}
  2619. },
  2620. /* RA_BLOCK_SHARED_TX */
  2621. {
  2622. .valid_owners = {RA_OWNER_NONE, 0, 0, RA_OWNER_PATH_TX1,
  2623. RA_OWNER_PATH_TX2, 0, RA_OWNER_DRV}
  2624. },
  2625. /* RA_BLOCK_TXFE1 */
  2626. {
  2627. .valid_owners = {RA_OWNER_NONE, 0, 0, RA_OWNER_PATH_TX1,
  2628. RA_OWNER_PATH_TX2, 0, RA_OWNER_DRV}
  2629. },
  2630. /* RA_BLOCK_TXFE2 */
  2631. {
  2632. .valid_owners = {RA_OWNER_NONE, RA_OWNER_PATH_RX1,
  2633. RA_OWNER_PATH_RX2, 0, 0, RA_OWNER_PATH_LB, RA_OWNER_DRV}
  2634. },
  2635. /* RA_BLOCK_PA_COMMON */
  2636. {
  2637. .valid_owners = {RA_OWNER_NONE, RA_OWNER_PATH_RX1,
  2638. RA_OWNER_PATH_RX2, 0, 0, RA_OWNER_PATH_LB, RA_OWNER_DRV}
  2639. },
  2640. /* RA_BLOCK_PA_EAR */
  2641. {
  2642. .valid_owners = {RA_OWNER_NONE, RA_OWNER_PATH_RX1,
  2643. RA_OWNER_PATH_RX2, 0, 0, RA_OWNER_PATH_LB, RA_OWNER_DRV}
  2644. },
  2645. /* RA_BLOCK_PA_HPH */
  2646. {
  2647. .valid_owners = {RA_OWNER_NONE, RA_OWNER_PATH_RX1,
  2648. RA_OWNER_PATH_RX2, 0, 0, RA_OWNER_PATH_LB, RA_OWNER_DRV}
  2649. },
  2650. /* RA_BLOCK_PA_LINE */
  2651. {
  2652. .valid_owners = {RA_OWNER_NONE, RA_OWNER_PATH_RX1,
  2653. RA_OWNER_PATH_RX2, 0, 0, RA_OWNER_PATH_LB, RA_OWNER_DRV}
  2654. },
  2655. /* RA_BLOCK_PA_AUX */
  2656. {
  2657. .valid_owners = {RA_OWNER_NONE, 0, 0, RA_OWNER_PATH_TX1,
  2658. RA_OWNER_PATH_TX2, 0, RA_OWNER_DRV}
  2659. },
  2660. /* RA_BLOCK_ADC */
  2661. {
  2662. .valid_owners = {RA_OWNER_NONE, 0, 0, RA_OWNER_PATH_TX1,
  2663. RA_OWNER_PATH_TX2, 0, RA_OWNER_DRV}
  2664. },
  2665. /* RA_BLOCK_DMIC */
  2666. {
  2667. .valid_owners = {RA_OWNER_NONE, 0, 0, RA_OWNER_PATH_TX1,
  2668. RA_OWNER_PATH_TX2, 0, RA_OWNER_DRV}
  2669. },
  2670. /* RA_BLOCK_TX_I2S */
  2671. {
  2672. .valid_owners = {RA_OWNER_NONE, 0, 0, 0, 0, 0, RA_OWNER_DRV}
  2673. },
  2674. /*RA_BLOCK_DRV */
  2675. {
  2676. .valid_owners = {RA_OWNER_NONE, 0, 0, 0, 0, 0, RA_OWNER_DRV}
  2677. },
  2678. /* RA_BLOCK_TEST */
  2679. {
  2680. .valid_owners = {RA_OWNER_NONE, 0, 0, 0, 0, 0, RA_OWNER_DRV}
  2681. },
  2682. /* RA_BLOCK_RESERVED */
  2683. };
  2684. struct adie_codec_state {
  2685. struct adie_codec_path path[ADIE_CODEC_MAX];
  2686. u32 ref_cnt;
  2687. struct marimba *pdrv_ptr;
  2688. struct marimba_codec_platform_data *codec_pdata;
  2689. struct mutex lock;
  2690. };
  2691. static struct adie_codec_state adie_codec;
  2692. /* A cacheable register is one that if the register's current value is being
  2693. * written to it again, then it is permissable to skip that register write
  2694. * because it does not actually change the value of the hardware register.
  2695. *
  2696. * Some registers are uncacheable, meaning that even they are being written
  2697. * again with their current value, the write has another purpose and must go
  2698. * through.
  2699. *
  2700. * Knowing the codec's uncacheable registers allows the driver to avoid
  2701. * unnecessary codec register writes while making sure important register writes
  2702. * are not skipped.
  2703. */
  2704. static bool timpani_register_is_cacheable(u8 reg)
  2705. {
  2706. switch (reg) {
  2707. case TIMPANI_A_PA_LINE_L_GAIN:
  2708. case TIMPANI_A_PA_LINE_R_GAIN:
  2709. case TIMPANI_A_PA_HPH_L_GAIN:
  2710. case TIMPANI_A_PA_HPH_R_GAIN:
  2711. case TIMPANI_A_CDC_GCTL1:
  2712. case TIMPANI_A_CDC_ST_CTL:
  2713. case TIMPANI_A_CDC_GCTL2:
  2714. case TIMPANI_A_CDC_ARB_BYPASS_CTL:
  2715. case TIMPANI_A_CDC_CH_CTL:
  2716. case TIMPANI_A_CDC_ANC1_IIR_COEFF_PTR:
  2717. case TIMPANI_A_CDC_ANC1_IIR_COEFF_MSB:
  2718. case TIMPANI_A_CDC_ANC1_IIR_COEFF_LSB:
  2719. case TIMPANI_A_CDC_ANC1_LPF_COEFF_PTR:
  2720. case TIMPANI_A_CDC_ANC1_LPF_COEFF_MSB:
  2721. case TIMPANI_A_CDC_ANC1_LPF_COEFF_LSB:
  2722. case TIMPANI_A_CDC_ANC1_SCALE_PTR:
  2723. case TIMPANI_A_CDC_ANC1_SCALE:
  2724. case TIMPANI_A_CDC_ANC2_IIR_COEFF_PTR:
  2725. case TIMPANI_A_CDC_ANC2_IIR_COEFF_MSB:
  2726. case TIMPANI_A_CDC_ANC2_IIR_COEFF_LSB:
  2727. case TIMPANI_A_CDC_ANC2_LPF_COEFF_PTR:
  2728. case TIMPANI_A_CDC_ANC2_LPF_COEFF_MSB:
  2729. case TIMPANI_A_CDC_ANC2_LPF_COEFF_LSB:
  2730. case TIMPANI_A_CDC_ANC2_SCALE_PTR:
  2731. case TIMPANI_A_CDC_ANC2_SCALE:
  2732. case TIMPANI_A_CDC_ANC1_CTL1:
  2733. case TIMPANI_A_CDC_ANC1_CTL2:
  2734. case TIMPANI_A_CDC_ANC1_FF_FB_SHIFT:
  2735. case TIMPANI_A_CDC_ANC2_CTL1:
  2736. case TIMPANI_A_CDC_ANC2_CTL2:
  2737. case TIMPANI_A_CDC_ANC2_FF_FB_SHIFT:
  2738. case TIMPANI_A_AUXPGA_LR_GAIN:
  2739. case TIMPANI_A_CDC_ANC_INPUT_MUX:
  2740. return false;
  2741. default:
  2742. return true;
  2743. }
  2744. }
  2745. static int adie_codec_write(u8 reg, u8 mask, u8 val)
  2746. {
  2747. int rc = 0;
  2748. u8 new_val;
  2749. if (reg > MAX_SHADOW_RIGISTERS) {
  2750. pr_debug("register number is out of bound for shadow"
  2751. " registers reg = %d\n", reg);
  2752. new_val = (val & mask);
  2753. rc = marimba_write_bit_mask(adie_codec.pdrv_ptr, reg, &new_val,
  2754. 1, 0xFF);
  2755. if (IS_ERR_VALUE(rc)) {
  2756. pr_err("%s: fail to write reg %x\n", __func__, reg);
  2757. rc = -EIO;
  2758. goto error;
  2759. }
  2760. return rc;
  2761. }
  2762. new_val = (val & mask) | (timpani_shadow[reg] & ~mask);
  2763. if (!(timpani_register_is_cacheable(reg) &&
  2764. (new_val == timpani_shadow[reg]))) {
  2765. rc = marimba_write_bit_mask(adie_codec.pdrv_ptr, reg, &new_val,
  2766. 1, 0xFF);
  2767. if (IS_ERR_VALUE(rc)) {
  2768. pr_err("%s: fail to write reg %x\n", __func__, reg);
  2769. rc = -EIO;
  2770. goto error;
  2771. }
  2772. timpani_shadow[reg] = new_val;
  2773. pr_debug("%s: write reg %x val %x new value %x\n", __func__,
  2774. reg, val, new_val);
  2775. }
  2776. error:
  2777. return rc;
  2778. }
  2779. static int reg_in_use(u8 reg_ref, u8 path_type)
  2780. {
  2781. if ((reg_ref & ~path_type) == 0)
  2782. return 0;
  2783. else
  2784. return 1;
  2785. }
  2786. static int adie_codec_refcnt_write(u8 reg, u8 mask, u8 val, enum refcnt cnt,
  2787. u8 path_type)
  2788. {
  2789. u8 i;
  2790. int j;
  2791. u8 fld_mask;
  2792. u8 path_mask;
  2793. u8 reg_mask = 0;
  2794. int rc = 0;
  2795. for (i = 0; i < ARRAY_SIZE(timpani_regset); i++) {
  2796. if (timpani_regset[i].reg_addr == reg) {
  2797. for (j = 0; j < TIMPANI_MAX_FIELDS; j++) {
  2798. fld_mask = timpani_regset[i].fld_ref_cnt[j].mask
  2799. & mask;
  2800. path_mask = timpani_regset[i].fld_ref_cnt[j]
  2801. .path_mask;
  2802. if (fld_mask) {
  2803. if (!reg_in_use(path_mask, path_type))
  2804. reg_mask |= fld_mask;
  2805. if (cnt == INC)
  2806. timpani_regset[i].fld_ref_cnt[j]
  2807. .path_mask |= path_type;
  2808. else if (cnt == DEC)
  2809. timpani_regset[i].fld_ref_cnt[j]
  2810. .path_mask &=
  2811. ~path_type;
  2812. }
  2813. }
  2814. if (reg_mask)
  2815. rc = adie_codec_write(reg, reg_mask, val);
  2816. reg_mask = 0;
  2817. break;
  2818. }
  2819. }
  2820. return rc;
  2821. }
  2822. static int adie_codec_read(u8 reg, u8 *val)
  2823. {
  2824. return marimba_read(adie_codec.pdrv_ptr, reg, val, 1);
  2825. }
  2826. static int timpani_adie_codec_setpath(struct adie_codec_path *path_ptr,
  2827. u32 freq_plan, u32 osr)
  2828. {
  2829. int rc = 0;
  2830. u32 i, freq_idx = 0, freq = 0;
  2831. if (path_ptr == NULL)
  2832. return -EINVAL;
  2833. if (path_ptr->curr_stage != ADIE_CODEC_DIGITAL_OFF) {
  2834. rc = -EBUSY;
  2835. goto error;
  2836. }
  2837. for (i = 0; i < path_ptr->profile->setting_sz; i++) {
  2838. if (path_ptr->profile->settings[i].osr == osr) {
  2839. if (path_ptr->profile->settings[i].freq_plan >=
  2840. freq_plan) {
  2841. if (freq == 0) {
  2842. freq = path_ptr->profile->settings[i].
  2843. freq_plan;
  2844. freq_idx = i;
  2845. } else if (path_ptr->profile->settings[i].
  2846. freq_plan < freq) {
  2847. freq = path_ptr->profile->settings[i].
  2848. freq_plan;
  2849. freq_idx = i;
  2850. }
  2851. }
  2852. }
  2853. }
  2854. if (freq_idx >= path_ptr->profile->setting_sz)
  2855. rc = -ENODEV;
  2856. else {
  2857. path_ptr->hwsetting_idx = freq_idx;
  2858. path_ptr->stage_idx = 0;
  2859. }
  2860. error:
  2861. return rc;
  2862. }
  2863. static u32 timpani_adie_codec_freq_supported(
  2864. struct adie_codec_dev_profile *profile,
  2865. u32 requested_freq)
  2866. {
  2867. u32 i, rc = -EINVAL;
  2868. for (i = 0; i < profile->setting_sz; i++) {
  2869. if (profile->settings[i].freq_plan >= requested_freq) {
  2870. rc = 0;
  2871. break;
  2872. }
  2873. }
  2874. return rc;
  2875. }
  2876. int timpani_adie_codec_enable_sidetone(struct adie_codec_path *rx_path_ptr,
  2877. u32 enable)
  2878. {
  2879. int rc = 0;
  2880. pr_debug("%s()\n", __func__);
  2881. mutex_lock(&adie_codec.lock);
  2882. if (!rx_path_ptr || &adie_codec.path[ADIE_CODEC_RX] != rx_path_ptr) {
  2883. pr_err("%s: invalid path pointer\n", __func__);
  2884. rc = -EINVAL;
  2885. goto error;
  2886. } else if (rx_path_ptr->curr_stage !=
  2887. ADIE_CODEC_DIGITAL_ANALOG_READY) {
  2888. pr_err("%s: bad state\n", __func__);
  2889. rc = -EPERM;
  2890. goto error;
  2891. }
  2892. if (enable) {
  2893. rc = adie_codec_write(TIMPANI_A_CDC_RX1_CTL,
  2894. TIMPANI_RX1_ST_MASK, TIMPANI_RX1_ST_ENABLE);
  2895. if (rx_path_ptr->reg_owner == RA_OWNER_PATH_RX1)
  2896. adie_codec_write(TIMPANI_A_CDC_ST_MIXING,
  2897. TIMPANI_CDC_ST_MIXING_TX1_MASK,
  2898. TIMPANI_CDC_ST_MIXING_TX1_ENABLE);
  2899. else if (rx_path_ptr->reg_owner == RA_OWNER_PATH_RX2)
  2900. adie_codec_write(TIMPANI_A_CDC_ST_MIXING,
  2901. TIMPANI_CDC_ST_MIXING_TX2_MASK,
  2902. TIMPANI_CDC_ST_MIXING_TX2_ENABLE);
  2903. } else {
  2904. rc = adie_codec_write(TIMPANI_A_CDC_RX1_CTL,
  2905. TIMPANI_RX1_ST_MASK, 0);
  2906. if (rx_path_ptr->reg_owner == RA_OWNER_PATH_RX1)
  2907. adie_codec_write(TIMPANI_A_CDC_ST_MIXING,
  2908. TIMPANI_CDC_ST_MIXING_TX1_MASK, 0);
  2909. else if (rx_path_ptr->reg_owner == RA_OWNER_PATH_RX2)
  2910. adie_codec_write(TIMPANI_A_CDC_ST_MIXING,
  2911. TIMPANI_CDC_ST_MIXING_TX2_MASK, 0);
  2912. }
  2913. error:
  2914. mutex_unlock(&adie_codec.lock);
  2915. return rc;
  2916. }
  2917. static int timpani_adie_codec_enable_anc(struct adie_codec_path *rx_path_ptr,
  2918. u32 enable, struct adie_codec_anc_data *calibration_writes)
  2919. {
  2920. int index = 0;
  2921. int rc = 0;
  2922. u8 reg, mask, val;
  2923. pr_debug("%s: enable = %d\n", __func__, enable);
  2924. mutex_lock(&adie_codec.lock);
  2925. if (!rx_path_ptr || &adie_codec.path[ADIE_CODEC_RX] != rx_path_ptr) {
  2926. pr_err("%s: invalid path pointer\n", __func__);
  2927. rc = -EINVAL;
  2928. goto error;
  2929. } else if (rx_path_ptr->curr_stage !=
  2930. ADIE_CODEC_DIGITAL_ANALOG_READY) {
  2931. pr_err("%s: bad state\n", __func__);
  2932. rc = -EPERM;
  2933. goto error;
  2934. }
  2935. if (enable) {
  2936. if (!calibration_writes || !calibration_writes->writes) {
  2937. pr_err("%s: No ANC calibration data\n", __func__);
  2938. rc = -EPERM;
  2939. goto error;
  2940. }
  2941. while (index < calibration_writes->size) {
  2942. ADIE_CODEC_UNPACK_ENTRY(calibration_writes->
  2943. writes[index], reg, mask, val);
  2944. adie_codec_write(reg, mask, val);
  2945. index++;
  2946. }
  2947. } else {
  2948. adie_codec_write(TIMPANI_A_CDC_ANC1_CTL1,
  2949. TIMPANI_CDC_ANC1_CTL1_ANC1_EN_M,
  2950. TIMPANI_CDC_ANC1_CTL1_ANC1_EN_ANC_DIS <<
  2951. TIMPANI_CDC_ANC1_CTL1_ANC1_EN_S);
  2952. adie_codec_write(TIMPANI_A_CDC_ANC2_CTL1,
  2953. TIMPANI_CDC_ANC2_CTL1_ANC2_EN_M,
  2954. TIMPANI_CDC_ANC2_CTL1_ANC2_EN_ANC_DIS <<
  2955. TIMPANI_CDC_ANC2_CTL1_ANC2_EN_S);
  2956. }
  2957. error:
  2958. mutex_unlock(&adie_codec.lock);
  2959. return rc;
  2960. }
  2961. static void adie_codec_restore_regdefault(u8 path_mask, u32 blk)
  2962. {
  2963. u32 ireg;
  2964. u32 regset_sz =
  2965. (sizeof(timpani_regset)/sizeof(struct timpani_regaccess));
  2966. for (ireg = 0; ireg < regset_sz; ireg++) {
  2967. if (timpani_regset[ireg].blk_mask[blk]) {
  2968. /* only process register belong to the block */
  2969. u8 reg = timpani_regset[ireg].reg_addr;
  2970. u8 mask = timpani_regset[ireg].blk_mask[blk];
  2971. u8 val = timpani_regset[ireg].reg_default;
  2972. adie_codec_refcnt_write(reg, mask, val, IGNORE,
  2973. path_mask);
  2974. }
  2975. }
  2976. }
  2977. static void adie_codec_reach_stage_action(struct adie_codec_path *path_ptr,
  2978. u32 stage)
  2979. {
  2980. u32 iblk, iowner; /* iterators */
  2981. u8 path_mask;
  2982. if (path_ptr == NULL)
  2983. return;
  2984. path_mask = TIMPANI_PATH_MASK(path_ptr->reg_owner);
  2985. if (stage != ADIE_CODEC_DIGITAL_OFF)
  2986. return;
  2987. for (iblk = 0 ; iblk <= RA_BLOCK_RESERVED ; iblk++) {
  2988. for (iowner = 0; iowner < RA_OWNER_NUM; iowner++) {
  2989. if (timpani_blkcfg[iblk].valid_owners[iowner] ==
  2990. path_ptr->reg_owner) {
  2991. adie_codec_restore_regdefault(path_mask, iblk);
  2992. break; /* This path owns this block */
  2993. }
  2994. }
  2995. }
  2996. }
  2997. static int timpani_adie_codec_proceed_stage(struct adie_codec_path *path_ptr,
  2998. u32 state)
  2999. {
  3000. int rc = 0, loop_exit = 0;
  3001. struct adie_codec_action_unit *curr_action;
  3002. struct adie_codec_hwsetting_entry *setting;
  3003. u8 reg, mask, val;
  3004. u8 path_mask;
  3005. if (path_ptr == NULL)
  3006. return -EINVAL;
  3007. path_mask = TIMPANI_PATH_MASK(path_ptr->reg_owner);
  3008. mutex_lock(&adie_codec.lock);
  3009. setting = &path_ptr->profile->settings[path_ptr->hwsetting_idx];
  3010. while (!loop_exit) {
  3011. curr_action = &setting->actions[path_ptr->stage_idx];
  3012. switch (curr_action->type) {
  3013. case ADIE_CODEC_ACTION_ENTRY:
  3014. ADIE_CODEC_UNPACK_ENTRY(curr_action->action,
  3015. reg, mask, val);
  3016. if (state == ADIE_CODEC_DIGITAL_OFF)
  3017. adie_codec_refcnt_write(reg, mask, val, DEC,
  3018. path_mask);
  3019. else
  3020. adie_codec_refcnt_write(reg, mask, val, INC,
  3021. path_mask);
  3022. break;
  3023. case ADIE_CODEC_ACTION_DELAY_WAIT:
  3024. if (curr_action->action > MAX_MDELAY_US)
  3025. msleep(curr_action->action/1000);
  3026. else
  3027. usleep_range(curr_action->action,
  3028. curr_action->action);
  3029. break;
  3030. case ADIE_CODEC_ACTION_STAGE_REACHED:
  3031. adie_codec_reach_stage_action(path_ptr,
  3032. curr_action->action);
  3033. if (curr_action->action == state) {
  3034. path_ptr->curr_stage = state;
  3035. loop_exit = 1;
  3036. }
  3037. break;
  3038. default:
  3039. BUG();
  3040. }
  3041. path_ptr->stage_idx++;
  3042. if (path_ptr->stage_idx == setting->action_sz)
  3043. path_ptr->stage_idx = 0;
  3044. }
  3045. mutex_unlock(&adie_codec.lock);
  3046. return rc;
  3047. }
  3048. static void timpani_codec_bring_up(void)
  3049. {
  3050. /* Codec power up sequence */
  3051. adie_codec_write(0xFF, 0xFF, 0x08);
  3052. adie_codec_write(0xFF, 0xFF, 0x0A);
  3053. adie_codec_write(0xFF, 0xFF, 0x0E);
  3054. adie_codec_write(0xFF, 0xFF, 0x07);
  3055. adie_codec_write(0xFF, 0xFF, 0x17);
  3056. adie_codec_write(TIMPANI_A_MREF, 0xFF, 0xF2);
  3057. msleep(15);
  3058. adie_codec_write(TIMPANI_A_MREF, 0xFF, 0x22);
  3059. /* Bypass TX HPFs to prevent pops */
  3060. adie_codec_write(TIMPANI_A_CDC_BYPASS_CTL2, TIMPANI_CDC_BYPASS_CTL2_M,
  3061. TIMPANI_CDC_BYPASS_CTL2_POR);
  3062. adie_codec_write(TIMPANI_A_CDC_BYPASS_CTL3, TIMPANI_CDC_BYPASS_CTL3_M,
  3063. TIMPANI_CDC_BYPASS_CTL3_POR);
  3064. }
  3065. static void timpani_codec_bring_down(void)
  3066. {
  3067. adie_codec_write(TIMPANI_A_MREF, 0xFF, TIMPANI_MREF_POR);
  3068. adie_codec_write(0xFF, 0xFF, 0x07);
  3069. adie_codec_write(0xFF, 0xFF, 0x06);
  3070. adie_codec_write(0xFF, 0xFF, 0x0E);
  3071. adie_codec_write(0xFF, 0xFF, 0x08);
  3072. }
  3073. static int timpani_adie_codec_open(struct adie_codec_dev_profile *profile,
  3074. struct adie_codec_path **path_pptr)
  3075. {
  3076. int rc = 0;
  3077. mutex_lock(&adie_codec.lock);
  3078. if (!profile || !path_pptr) {
  3079. rc = -EINVAL;
  3080. goto error;
  3081. }
  3082. if (adie_codec.path[profile->path_type].profile) {
  3083. rc = -EBUSY;
  3084. goto error;
  3085. }
  3086. if (!adie_codec.ref_cnt) {
  3087. if (adie_codec.codec_pdata &&
  3088. adie_codec.codec_pdata->marimba_codec_power) {
  3089. rc = adie_codec.codec_pdata->marimba_codec_power(1);
  3090. if (rc) {
  3091. pr_err("%s: could not power up timpani "
  3092. "codec\n", __func__);
  3093. goto error;
  3094. }
  3095. timpani_codec_bring_up();
  3096. } else {
  3097. pr_err("%s: couldn't detect timpani codec\n", __func__);
  3098. rc = -ENODEV;
  3099. goto error;
  3100. }
  3101. }
  3102. adie_codec.path[profile->path_type].profile = profile;
  3103. *path_pptr = (void *) &adie_codec.path[profile->path_type];
  3104. adie_codec.ref_cnt++;
  3105. adie_codec.path[profile->path_type].hwsetting_idx = 0;
  3106. adie_codec.path[profile->path_type].curr_stage = ADIE_CODEC_DIGITAL_OFF;
  3107. adie_codec.path[profile->path_type].stage_idx = 0;
  3108. error:
  3109. mutex_unlock(&adie_codec.lock);
  3110. return rc;
  3111. }
  3112. static int timpani_adie_codec_close(struct adie_codec_path *path_ptr)
  3113. {
  3114. int rc = 0;
  3115. mutex_lock(&adie_codec.lock);
  3116. if (!path_ptr) {
  3117. rc = -EINVAL;
  3118. goto error;
  3119. }
  3120. if (path_ptr->curr_stage != ADIE_CODEC_DIGITAL_OFF)
  3121. adie_codec_proceed_stage(path_ptr, ADIE_CODEC_DIGITAL_OFF);
  3122. BUG_ON(!adie_codec.ref_cnt);
  3123. path_ptr->profile = NULL;
  3124. adie_codec.ref_cnt--;
  3125. if (!adie_codec.ref_cnt) {
  3126. /* Timpani CDC power down sequence */
  3127. timpani_codec_bring_down();
  3128. if (adie_codec.codec_pdata &&
  3129. adie_codec.codec_pdata->marimba_codec_power) {
  3130. rc = adie_codec.codec_pdata->marimba_codec_power(0);
  3131. if (rc) {
  3132. pr_err("%s: could not power down timpani "
  3133. "codec\n", __func__);
  3134. goto error;
  3135. }
  3136. }
  3137. }
  3138. error:
  3139. mutex_unlock(&adie_codec.lock);
  3140. return rc;
  3141. }
  3142. static int timpani_adie_codec_set_master_mode(struct adie_codec_path *path_ptr,
  3143. u8 master)
  3144. {
  3145. u8 val = master ? 1 : 0;
  3146. if (!path_ptr)
  3147. return -EINVAL;
  3148. if (path_ptr->reg_owner == RA_OWNER_PATH_RX1)
  3149. adie_codec_write(TIMPANI_A_CDC_RX1_CTL, 0x01, val);
  3150. else if (path_ptr->reg_owner == RA_OWNER_PATH_TX1)
  3151. adie_codec_write(TIMPANI_A_CDC_TX_I2S_CTL, 0x01, val);
  3152. else
  3153. return -EINVAL;
  3154. return 0;
  3155. }
  3156. int timpani_adie_codec_set_device_analog_volume(
  3157. struct adie_codec_path *path_ptr,
  3158. u32 num_channels, u32 volume)
  3159. {
  3160. u8 val;
  3161. u8 curr_val;
  3162. u8 i;
  3163. adie_codec_read(TIMPANI_A_AUXPGA_LR_GAIN, &curr_val);
  3164. /* Volume is expressed as a percentage. */
  3165. /* The upper nibble is the left channel, lower right channel. */
  3166. val = (u8)((volume * TIMPANI_CODEC_AUXPGA_GAIN_RANGE) / 100);
  3167. val |= val << 4;
  3168. if ((curr_val & 0x0F) < (val & 0x0F)) {
  3169. for (i = curr_val; i < val; i += 0x11)
  3170. adie_codec_write(TIMPANI_A_AUXPGA_LR_GAIN, 0xFF, i);
  3171. } else if ((curr_val & 0x0F) > (val & 0x0F)) {
  3172. for (i = curr_val; i > val; i -= 0x11)
  3173. adie_codec_write(TIMPANI_A_AUXPGA_LR_GAIN, 0xFF, i);
  3174. }
  3175. return 0;
  3176. }
  3177. enum adie_vol_type {
  3178. ADIE_CODEC_RX_DIG_VOL,
  3179. ADIE_CODEC_TX_DIG_VOL,
  3180. ADIE_CODEC_VOL_TYPE_MAX
  3181. };
  3182. #define CDC_RX1LG 0x84
  3183. #define CDC_RX1RG 0x85
  3184. #define CDC_TX1LG 0x86
  3185. #define CDC_TX1RG 0x87
  3186. #define DIG_VOL_MASK 0xFF
  3187. #define CDC_GCTL1 0x8A
  3188. #define RX1_PGA_UPDATE_L 0x04
  3189. #define RX1_PGA_UPDATE_R 0x08
  3190. #define TX1_PGA_UPDATE_L 0x40
  3191. #define TX1_PGA_UPDATE_R 0x80
  3192. #define CDC_GCTL1_RX_MASK 0x0F
  3193. #define CDC_GCTL1_TX_MASK 0xF0
  3194. enum {
  3195. TIMPANI_MIN_DIG_VOL = -84, /* in DB*/
  3196. TIMPANI_MAX_DIG_VOL = 16, /* in DB*/
  3197. TIMPANI_DIG_VOL_STEP = 3 /* in DB*/
  3198. };
  3199. static int timpani_adie_codec_set_dig_vol(enum adie_vol_type vol_type,
  3200. u32 num_chan, u32 vol_per)
  3201. {
  3202. u8 reg_left, reg_right;
  3203. u8 gain_reg_val, gain_reg_mask;
  3204. s8 new_reg_val, cur_reg_val;
  3205. s8 step_size;
  3206. adie_codec_read(CDC_GCTL1, &gain_reg_val);
  3207. if (vol_type == ADIE_CODEC_RX_DIG_VOL) {
  3208. pr_debug("%s : RX DIG VOL. num_chan = %u\n", __func__,
  3209. num_chan);
  3210. reg_left = CDC_RX1LG;
  3211. reg_right = CDC_RX1RG;
  3212. if (num_chan == 1)
  3213. gain_reg_val |= RX1_PGA_UPDATE_L;
  3214. else
  3215. gain_reg_val |= (RX1_PGA_UPDATE_L | RX1_PGA_UPDATE_R);
  3216. gain_reg_mask = CDC_GCTL1_RX_MASK;
  3217. } else {
  3218. pr_debug("%s : TX DIG VOL. num_chan = %u\n", __func__,
  3219. num_chan);
  3220. reg_left = CDC_TX1LG;
  3221. reg_right = CDC_TX1RG;
  3222. if (num_chan == 1)
  3223. gain_reg_val |= TX1_PGA_UPDATE_L;
  3224. else
  3225. gain_reg_val |= (TX1_PGA_UPDATE_L | TX1_PGA_UPDATE_R);
  3226. gain_reg_mask = CDC_GCTL1_TX_MASK;
  3227. }
  3228. adie_codec_read(reg_left, &cur_reg_val);
  3229. pr_debug("%s: vol_per = %d cur_reg_val = %d 0x%x\n", __func__, vol_per,
  3230. cur_reg_val, cur_reg_val);
  3231. new_reg_val = TIMPANI_MIN_DIG_VOL +
  3232. (((TIMPANI_MAX_DIG_VOL - TIMPANI_MIN_DIG_VOL) * vol_per) / 100);
  3233. pr_debug("new_reg_val = %d 0x%x\n", new_reg_val, new_reg_val);
  3234. if (new_reg_val > cur_reg_val) {
  3235. step_size = TIMPANI_DIG_VOL_STEP;
  3236. } else if (new_reg_val < cur_reg_val) {
  3237. step_size = -TIMPANI_DIG_VOL_STEP;
  3238. } else {
  3239. pr_debug("new_reg_val and cur_reg_val are same 0x%x\n",
  3240. new_reg_val);
  3241. return 0;
  3242. }
  3243. while (cur_reg_val != new_reg_val) {
  3244. if (((new_reg_val > cur_reg_val) &&
  3245. ((new_reg_val - cur_reg_val) < TIMPANI_DIG_VOL_STEP)) ||
  3246. ((cur_reg_val > new_reg_val) &&
  3247. ((cur_reg_val - new_reg_val)
  3248. < TIMPANI_DIG_VOL_STEP))) {
  3249. cur_reg_val = new_reg_val;
  3250. pr_debug("diff less than step. write new_reg_val = %d"
  3251. " 0x%x\n", new_reg_val, new_reg_val);
  3252. } else {
  3253. cur_reg_val = cur_reg_val + step_size;
  3254. pr_debug("cur_reg_val = %d 0x%x\n",
  3255. cur_reg_val, cur_reg_val);
  3256. }
  3257. adie_codec_write(reg_left, DIG_VOL_MASK, cur_reg_val);
  3258. if (num_chan == 2)
  3259. adie_codec_write(reg_right, DIG_VOL_MASK, cur_reg_val);
  3260. adie_codec_write(CDC_GCTL1, gain_reg_mask, gain_reg_val);
  3261. }
  3262. return 0;
  3263. }
  3264. static int timpani_adie_codec_set_device_digital_volume(
  3265. struct adie_codec_path *path_ptr,
  3266. u32 num_channels, u32 vol_percentage /* in percentage */)
  3267. {
  3268. enum adie_vol_type vol_type;
  3269. if (!path_ptr || (path_ptr->curr_stage !=
  3270. ADIE_CODEC_DIGITAL_ANALOG_READY)) {
  3271. pr_info("%s: timpani codec not ready for volume control\n",
  3272. __func__);
  3273. return -EPERM;
  3274. }
  3275. if (num_channels > 2) {
  3276. pr_err("%s: timpani odec only supports max two channels\n",
  3277. __func__);
  3278. return -EINVAL;
  3279. }
  3280. if (path_ptr->profile->path_type == ADIE_CODEC_RX) {
  3281. vol_type = ADIE_CODEC_RX_DIG_VOL;
  3282. } else if (path_ptr->profile->path_type == ADIE_CODEC_TX) {
  3283. vol_type = ADIE_CODEC_TX_DIG_VOL;
  3284. } else {
  3285. pr_err("%s: invalid device data neither RX nor TX\n",
  3286. __func__);
  3287. return -EINVAL;
  3288. }
  3289. timpani_adie_codec_set_dig_vol(vol_type, num_channels, vol_percentage);
  3290. return 0;
  3291. }
  3292. static const struct adie_codec_operations timpani_adie_ops = {
  3293. .codec_id = TIMPANI_ID,
  3294. .codec_open = timpani_adie_codec_open,
  3295. .codec_close = timpani_adie_codec_close,
  3296. .codec_setpath = timpani_adie_codec_setpath,
  3297. .codec_proceed_stage = timpani_adie_codec_proceed_stage,
  3298. .codec_freq_supported = timpani_adie_codec_freq_supported,
  3299. .codec_enable_sidetone = timpani_adie_codec_enable_sidetone,
  3300. .codec_set_master_mode = timpani_adie_codec_set_master_mode,
  3301. .codec_enable_anc = timpani_adie_codec_enable_anc,
  3302. .codec_set_device_analog_volume =
  3303. timpani_adie_codec_set_device_analog_volume,
  3304. .codec_set_device_digital_volume =
  3305. timpani_adie_codec_set_device_digital_volume,
  3306. };
  3307. static void timpani_codec_populate_shadow_registers(void)
  3308. {
  3309. int i;
  3310. for (i = 0; i < ARRAY_SIZE(timpani_regset); i++) {
  3311. if (timpani_regset[i].reg_addr < TIMPANI_ARRAY_SIZE) {
  3312. timpani_shadow[timpani_regset[i].reg_addr] =
  3313. timpani_regset[i].reg_default;
  3314. }
  3315. }
  3316. }
  3317. #ifdef CONFIG_DEBUG_FS
  3318. static struct dentry *debugfs_timpani_dent;
  3319. static struct dentry *debugfs_peek;
  3320. static struct dentry *debugfs_poke;
  3321. static struct dentry *debugfs_power;
  3322. static struct dentry *debugfs_dump;
  3323. static unsigned char read_data;
  3324. static int codec_debug_open(struct inode *inode, struct file *file)
  3325. {
  3326. file->private_data = inode->i_private;
  3327. return 0;
  3328. }
  3329. static int get_parameters(char *buf, long int *param1, int num_of_par)
  3330. {
  3331. char *token;
  3332. int base, cnt;
  3333. token = strsep(&buf, " ");
  3334. for (cnt = 0; cnt < num_of_par; cnt++) {
  3335. if (token != NULL) {
  3336. if ((token[1] == 'x') || (token[1] == 'X'))
  3337. base = 16;
  3338. else
  3339. base = 10;
  3340. if (strict_strtoul(token, base, &param1[cnt]) != 0)
  3341. return -EINVAL;
  3342. token = strsep(&buf, " ");
  3343. }
  3344. else
  3345. return -EINVAL;
  3346. }
  3347. return 0;
  3348. }
  3349. static ssize_t codec_debug_read(struct file *file, char __user *ubuf,
  3350. size_t count, loff_t *ppos)
  3351. {
  3352. char lbuf[8];
  3353. snprintf(lbuf, sizeof(lbuf), "0x%x\n", read_data);
  3354. return simple_read_from_buffer(ubuf, count, ppos, lbuf, strlen(lbuf));
  3355. }
  3356. static ssize_t codec_debug_write(struct file *filp,
  3357. const char __user *ubuf, size_t cnt, loff_t *ppos)
  3358. {
  3359. char *access_str = filp->private_data;
  3360. char lbuf[32];
  3361. int rc;
  3362. int i;
  3363. int read_result;
  3364. u8 reg_val;
  3365. long int param[5];
  3366. if (cnt > sizeof(lbuf) - 1)
  3367. return -EINVAL;
  3368. rc = copy_from_user(lbuf, ubuf, cnt);
  3369. if (rc)
  3370. return -EFAULT;
  3371. lbuf[cnt] = '\0';
  3372. if (!strcmp(access_str, "power")) {
  3373. if (get_parameters(lbuf, param, 1) == 0) {
  3374. switch (param[0]) {
  3375. case 1:
  3376. adie_codec.codec_pdata->marimba_codec_power(1);
  3377. timpani_codec_bring_up();
  3378. break;
  3379. case 0:
  3380. timpani_codec_bring_down();
  3381. adie_codec.codec_pdata->marimba_codec_power(0);
  3382. break;
  3383. default:
  3384. rc = -EINVAL;
  3385. break;
  3386. }
  3387. } else
  3388. rc = -EINVAL;
  3389. } else if (!strcmp(access_str, "poke")) {
  3390. /* write */
  3391. rc = get_parameters(lbuf, param, 2);
  3392. if ((param[0] <= 0xFF) && (param[1] <= 0xFF) &&
  3393. (rc == 0))
  3394. adie_codec_write(param[0], 0xFF, param[1]);
  3395. else
  3396. rc = -EINVAL;
  3397. } else if (!strcmp(access_str, "peek")) {
  3398. /* read */
  3399. rc = get_parameters(lbuf, param, 1);
  3400. if ((param[0] <= 0xFF) && (rc == 0))
  3401. adie_codec_read(param[0], &read_data);
  3402. else
  3403. rc = -EINVAL;
  3404. } else if (!strcmp(access_str, "dump")) {
  3405. pr_info("************** timpani regs *************\n");
  3406. for (i = 0; i < 0xFF; i++) {
  3407. read_result = adie_codec_read(i, &reg_val);
  3408. if (read_result < 0) {
  3409. pr_info("failed to read codec register\n");
  3410. break;
  3411. } else
  3412. pr_info("reg 0x%02X val 0x%02X\n", i, reg_val);
  3413. }
  3414. pr_info("*****************************************\n");
  3415. }
  3416. if (rc == 0)
  3417. rc = cnt;
  3418. else
  3419. pr_err("%s: rc = %d\n", __func__, rc);
  3420. return rc;
  3421. }
  3422. static const struct file_operations codec_debug_ops = {
  3423. .open = codec_debug_open,
  3424. .write = codec_debug_write,
  3425. .read = codec_debug_read
  3426. };
  3427. #endif
  3428. static int timpani_codec_probe(struct platform_device *pdev)
  3429. {
  3430. int rc;
  3431. adie_codec.pdrv_ptr = platform_get_drvdata(pdev);
  3432. adie_codec.codec_pdata = pdev->dev.platform_data;
  3433. if (adie_codec.codec_pdata->snddev_profile_init)
  3434. adie_codec.codec_pdata->snddev_profile_init();
  3435. timpani_codec_populate_shadow_registers();
  3436. /* Register the timpani ADIE operations */
  3437. rc = adie_codec_register_codec_operations(&timpani_adie_ops);
  3438. #ifdef CONFIG_DEBUG_FS
  3439. debugfs_timpani_dent = debugfs_create_dir("msm_adie_codec", 0);
  3440. if (!IS_ERR(debugfs_timpani_dent)) {
  3441. debugfs_peek = debugfs_create_file("peek",
  3442. S_IFREG | S_IRUGO, debugfs_timpani_dent,
  3443. (void *) "peek", &codec_debug_ops);
  3444. debugfs_poke = debugfs_create_file("poke",
  3445. S_IFREG | S_IRUGO, debugfs_timpani_dent,
  3446. (void *) "poke", &codec_debug_ops);
  3447. debugfs_power = debugfs_create_file("power",
  3448. S_IFREG | S_IRUGO, debugfs_timpani_dent,
  3449. (void *) "power", &codec_debug_ops);
  3450. debugfs_dump = debugfs_create_file("dump",
  3451. S_IFREG | S_IRUGO, debugfs_timpani_dent,
  3452. (void *) "dump", &codec_debug_ops);
  3453. }
  3454. #endif
  3455. return rc;
  3456. }
  3457. static struct platform_driver timpani_codec_driver = {
  3458. .probe = timpani_codec_probe,
  3459. .driver = {
  3460. .name = "timpani_codec",
  3461. .owner = THIS_MODULE,
  3462. },
  3463. };
  3464. static int __init timpani_codec_init(void)
  3465. {
  3466. s32 rc;
  3467. rc = platform_driver_register(&timpani_codec_driver);
  3468. if (IS_ERR_VALUE(rc))
  3469. goto error;
  3470. adie_codec.path[ADIE_CODEC_TX].reg_owner = RA_OWNER_PATH_TX1;
  3471. adie_codec.path[ADIE_CODEC_RX].reg_owner = RA_OWNER_PATH_RX1;
  3472. adie_codec.path[ADIE_CODEC_LB].reg_owner = RA_OWNER_PATH_LB;
  3473. mutex_init(&adie_codec.lock);
  3474. error:
  3475. return rc;
  3476. }
  3477. static void __exit timpani_codec_exit(void)
  3478. {
  3479. #ifdef CONFIG_DEBUG_FS
  3480. debugfs_remove(debugfs_peek);
  3481. debugfs_remove(debugfs_poke);
  3482. debugfs_remove(debugfs_power);
  3483. debugfs_remove(debugfs_dump);
  3484. debugfs_remove(debugfs_timpani_dent);
  3485. #endif
  3486. platform_driver_unregister(&timpani_codec_driver);
  3487. }
  3488. module_init(timpani_codec_init);
  3489. module_exit(timpani_codec_exit);
  3490. MODULE_DESCRIPTION("Timpani codec driver");
  3491. MODULE_VERSION("1.0");
  3492. MODULE_LICENSE("GPL v2");