panel-simple.c 148 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948
  1. /*
  2. * Copyright (C) 2013, NVIDIA Corporation. All rights reserved.
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sub license,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice (including the
  12. * next paragraph) shall be included in all copies or substantial portions
  13. * of the Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
  18. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  20. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  21. * DEALINGS IN THE SOFTWARE.
  22. */
  23. #include <linux/delay.h>
  24. #include <linux/gpio/consumer.h>
  25. #include <linux/i2c.h>
  26. #include <linux/media-bus-format.h>
  27. #include <linux/module.h>
  28. #include <linux/of_device.h>
  29. #include <linux/of_platform.h>
  30. #include <linux/platform_device.h>
  31. #include <linux/pm_runtime.h>
  32. #include <linux/regulator/consumer.h>
  33. #include <video/display_timing.h>
  34. #include <video/of_display_timing.h>
  35. #include <video/videomode.h>
  36. #include <drm/drm_crtc.h>
  37. #include <drm/drm_device.h>
  38. #include <drm/drm_edid.h>
  39. #include <drm/drm_mipi_dsi.h>
  40. #include <drm/drm_panel.h>
  41. #include <drm/drm_of.h>
  42. /**
  43. * struct panel_desc - Describes a simple panel.
  44. */
  45. struct panel_desc {
  46. /**
  47. * @modes: Pointer to array of fixed modes appropriate for this panel.
  48. *
  49. * If only one mode then this can just be the address of the mode.
  50. * NOTE: cannot be used with "timings" and also if this is specified
  51. * then you cannot override the mode in the device tree.
  52. */
  53. const struct drm_display_mode *modes;
  54. /** @num_modes: Number of elements in modes array. */
  55. unsigned int num_modes;
  56. /**
  57. * @timings: Pointer to array of display timings
  58. *
  59. * NOTE: cannot be used with "modes" and also these will be used to
  60. * validate a device tree override if one is present.
  61. */
  62. const struct display_timing *timings;
  63. /** @num_timings: Number of elements in timings array. */
  64. unsigned int num_timings;
  65. /** @bpc: Bits per color. */
  66. unsigned int bpc;
  67. /** @size: Structure containing the physical size of this panel. */
  68. struct {
  69. /**
  70. * @size.width: Width (in mm) of the active display area.
  71. */
  72. unsigned int width;
  73. /**
  74. * @size.height: Height (in mm) of the active display area.
  75. */
  76. unsigned int height;
  77. } size;
  78. /** @delay: Structure containing various delay values for this panel. */
  79. struct {
  80. /**
  81. * @delay.prepare: Time for the panel to become ready.
  82. *
  83. * The time (in milliseconds) that it takes for the panel to
  84. * become ready and start receiving video data
  85. */
  86. unsigned int prepare;
  87. /**
  88. * @delay.enable: Time for the panel to display a valid frame.
  89. *
  90. * The time (in milliseconds) that it takes for the panel to
  91. * display the first valid frame after starting to receive
  92. * video data.
  93. */
  94. unsigned int enable;
  95. /**
  96. * @delay.disable: Time for the panel to turn the display off.
  97. *
  98. * The time (in milliseconds) that it takes for the panel to
  99. * turn the display off (no content is visible).
  100. */
  101. unsigned int disable;
  102. /**
  103. * @delay.unprepare: Time to power down completely.
  104. *
  105. * The time (in milliseconds) that it takes for the panel
  106. * to power itself down completely.
  107. *
  108. * This time is used to prevent a future "prepare" from
  109. * starting until at least this many milliseconds has passed.
  110. * If at prepare time less time has passed since unprepare
  111. * finished, the driver waits for the remaining time.
  112. */
  113. unsigned int unprepare;
  114. } delay;
  115. /** @bus_format: See MEDIA_BUS_FMT_... defines. */
  116. u32 bus_format;
  117. /** @bus_flags: See DRM_BUS_FLAG_... defines. */
  118. u32 bus_flags;
  119. /** @connector_type: LVDS, eDP, DSI, DPI, etc. */
  120. int connector_type;
  121. };
  122. struct panel_desc_dsi {
  123. struct panel_desc desc;
  124. unsigned long flags;
  125. enum mipi_dsi_pixel_format format;
  126. unsigned int lanes;
  127. };
  128. struct panel_simple {
  129. struct drm_panel base;
  130. ktime_t unprepared_time;
  131. const struct panel_desc *desc;
  132. struct regulator *supply;
  133. struct i2c_adapter *ddc;
  134. struct gpio_desc *enable_gpio;
  135. const struct drm_edid *drm_edid;
  136. struct drm_display_mode override_mode;
  137. enum drm_panel_orientation orientation;
  138. };
  139. static inline struct panel_simple *to_panel_simple(struct drm_panel *panel)
  140. {
  141. return container_of(panel, struct panel_simple, base);
  142. }
  143. static unsigned int panel_simple_get_timings_modes(struct panel_simple *panel,
  144. struct drm_connector *connector)
  145. {
  146. struct drm_display_mode *mode;
  147. unsigned int i, num = 0;
  148. for (i = 0; i < panel->desc->num_timings; i++) {
  149. const struct display_timing *dt = &panel->desc->timings[i];
  150. struct videomode vm;
  151. videomode_from_timing(dt, &vm);
  152. mode = drm_mode_create(connector->dev);
  153. if (!mode) {
  154. dev_err(panel->base.dev, "failed to add mode %ux%u\n",
  155. dt->hactive.typ, dt->vactive.typ);
  156. continue;
  157. }
  158. drm_display_mode_from_videomode(&vm, mode);
  159. mode->type |= DRM_MODE_TYPE_DRIVER;
  160. if (panel->desc->num_timings == 1)
  161. mode->type |= DRM_MODE_TYPE_PREFERRED;
  162. drm_mode_probed_add(connector, mode);
  163. num++;
  164. }
  165. return num;
  166. }
  167. static unsigned int panel_simple_get_display_modes(struct panel_simple *panel,
  168. struct drm_connector *connector)
  169. {
  170. struct drm_display_mode *mode;
  171. unsigned int i, num = 0;
  172. for (i = 0; i < panel->desc->num_modes; i++) {
  173. const struct drm_display_mode *m = &panel->desc->modes[i];
  174. mode = drm_mode_duplicate(connector->dev, m);
  175. if (!mode) {
  176. dev_err(panel->base.dev, "failed to add mode %ux%u@%u\n",
  177. m->hdisplay, m->vdisplay,
  178. drm_mode_vrefresh(m));
  179. continue;
  180. }
  181. mode->type |= DRM_MODE_TYPE_DRIVER;
  182. if (panel->desc->num_modes == 1)
  183. mode->type |= DRM_MODE_TYPE_PREFERRED;
  184. drm_mode_set_name(mode);
  185. drm_mode_probed_add(connector, mode);
  186. num++;
  187. }
  188. return num;
  189. }
  190. static int panel_simple_get_non_edid_modes(struct panel_simple *panel,
  191. struct drm_connector *connector)
  192. {
  193. struct drm_display_mode *mode;
  194. bool has_override = panel->override_mode.type;
  195. unsigned int num = 0;
  196. if (!panel->desc)
  197. return 0;
  198. if (has_override) {
  199. mode = drm_mode_duplicate(connector->dev,
  200. &panel->override_mode);
  201. if (mode) {
  202. drm_mode_probed_add(connector, mode);
  203. num = 1;
  204. } else {
  205. dev_err(panel->base.dev, "failed to add override mode\n");
  206. }
  207. }
  208. /* Only add timings if override was not there or failed to validate */
  209. if (num == 0 && panel->desc->num_timings)
  210. num = panel_simple_get_timings_modes(panel, connector);
  211. /*
  212. * Only add fixed modes if timings/override added no mode.
  213. *
  214. * We should only ever have either the display timings specified
  215. * or a fixed mode. Anything else is rather bogus.
  216. */
  217. WARN_ON(panel->desc->num_timings && panel->desc->num_modes);
  218. if (num == 0)
  219. num = panel_simple_get_display_modes(panel, connector);
  220. connector->display_info.bpc = panel->desc->bpc;
  221. connector->display_info.width_mm = panel->desc->size.width;
  222. connector->display_info.height_mm = panel->desc->size.height;
  223. if (panel->desc->bus_format)
  224. drm_display_info_set_bus_formats(&connector->display_info,
  225. &panel->desc->bus_format, 1);
  226. connector->display_info.bus_flags = panel->desc->bus_flags;
  227. return num;
  228. }
  229. static void panel_simple_wait(ktime_t start_ktime, unsigned int min_ms)
  230. {
  231. ktime_t now_ktime, min_ktime;
  232. if (!min_ms)
  233. return;
  234. min_ktime = ktime_add(start_ktime, ms_to_ktime(min_ms));
  235. now_ktime = ktime_get_boottime();
  236. if (ktime_before(now_ktime, min_ktime))
  237. msleep(ktime_to_ms(ktime_sub(min_ktime, now_ktime)) + 1);
  238. }
  239. static int panel_simple_disable(struct drm_panel *panel)
  240. {
  241. struct panel_simple *p = to_panel_simple(panel);
  242. if (p->desc->delay.disable)
  243. msleep(p->desc->delay.disable);
  244. return 0;
  245. }
  246. static int panel_simple_suspend(struct device *dev)
  247. {
  248. struct panel_simple *p = dev_get_drvdata(dev);
  249. gpiod_set_value_cansleep(p->enable_gpio, 0);
  250. regulator_disable(p->supply);
  251. p->unprepared_time = ktime_get_boottime();
  252. drm_edid_free(p->drm_edid);
  253. p->drm_edid = NULL;
  254. return 0;
  255. }
  256. static int panel_simple_unprepare(struct drm_panel *panel)
  257. {
  258. int ret;
  259. pm_runtime_mark_last_busy(panel->dev);
  260. ret = pm_runtime_put_autosuspend(panel->dev);
  261. if (ret < 0)
  262. return ret;
  263. return 0;
  264. }
  265. static int panel_simple_resume(struct device *dev)
  266. {
  267. struct panel_simple *p = dev_get_drvdata(dev);
  268. int err;
  269. panel_simple_wait(p->unprepared_time, p->desc->delay.unprepare);
  270. err = regulator_enable(p->supply);
  271. if (err < 0) {
  272. dev_err(dev, "failed to enable supply: %d\n", err);
  273. return err;
  274. }
  275. gpiod_set_value_cansleep(p->enable_gpio, 1);
  276. if (p->desc->delay.prepare)
  277. msleep(p->desc->delay.prepare);
  278. return 0;
  279. }
  280. static int panel_simple_prepare(struct drm_panel *panel)
  281. {
  282. int ret;
  283. ret = pm_runtime_get_sync(panel->dev);
  284. if (ret < 0) {
  285. pm_runtime_put_autosuspend(panel->dev);
  286. return ret;
  287. }
  288. return 0;
  289. }
  290. static int panel_simple_enable(struct drm_panel *panel)
  291. {
  292. struct panel_simple *p = to_panel_simple(panel);
  293. if (p->desc->delay.enable)
  294. msleep(p->desc->delay.enable);
  295. return 0;
  296. }
  297. static int panel_simple_get_modes(struct drm_panel *panel,
  298. struct drm_connector *connector)
  299. {
  300. struct panel_simple *p = to_panel_simple(panel);
  301. int num = 0;
  302. /* probe EDID if a DDC bus is available */
  303. if (p->ddc) {
  304. pm_runtime_get_sync(panel->dev);
  305. if (!p->drm_edid)
  306. p->drm_edid = drm_edid_read_ddc(connector, p->ddc);
  307. drm_edid_connector_update(connector, p->drm_edid);
  308. num += drm_edid_connector_add_modes(connector);
  309. pm_runtime_mark_last_busy(panel->dev);
  310. pm_runtime_put_autosuspend(panel->dev);
  311. }
  312. /* add hard-coded panel modes */
  313. num += panel_simple_get_non_edid_modes(p, connector);
  314. /*
  315. * TODO: Remove once all drm drivers call
  316. * drm_connector_set_orientation_from_panel()
  317. */
  318. drm_connector_set_panel_orientation(connector, p->orientation);
  319. return num;
  320. }
  321. static int panel_simple_get_timings(struct drm_panel *panel,
  322. unsigned int num_timings,
  323. struct display_timing *timings)
  324. {
  325. struct panel_simple *p = to_panel_simple(panel);
  326. unsigned int i;
  327. if (p->desc->num_timings < num_timings)
  328. num_timings = p->desc->num_timings;
  329. if (timings)
  330. for (i = 0; i < num_timings; i++)
  331. timings[i] = p->desc->timings[i];
  332. return p->desc->num_timings;
  333. }
  334. static enum drm_panel_orientation panel_simple_get_orientation(struct drm_panel *panel)
  335. {
  336. struct panel_simple *p = to_panel_simple(panel);
  337. return p->orientation;
  338. }
  339. static const struct drm_panel_funcs panel_simple_funcs = {
  340. .disable = panel_simple_disable,
  341. .unprepare = panel_simple_unprepare,
  342. .prepare = panel_simple_prepare,
  343. .enable = panel_simple_enable,
  344. .get_modes = panel_simple_get_modes,
  345. .get_orientation = panel_simple_get_orientation,
  346. .get_timings = panel_simple_get_timings,
  347. };
  348. static struct panel_desc *panel_dpi_probe(struct device *dev)
  349. {
  350. struct display_timing *timing;
  351. const struct device_node *np;
  352. struct panel_desc *desc;
  353. unsigned int bus_flags;
  354. struct videomode vm;
  355. int ret;
  356. np = dev->of_node;
  357. desc = devm_kzalloc(dev, sizeof(*desc), GFP_KERNEL);
  358. if (!desc)
  359. return ERR_PTR(-ENOMEM);
  360. timing = devm_kzalloc(dev, sizeof(*timing), GFP_KERNEL);
  361. if (!timing)
  362. return ERR_PTR(-ENOMEM);
  363. ret = of_get_display_timing(np, "panel-timing", timing);
  364. if (ret < 0) {
  365. dev_err(dev, "%pOF: no panel-timing node found for \"panel-dpi\" binding\n",
  366. np);
  367. return ERR_PTR(ret);
  368. }
  369. desc->timings = timing;
  370. desc->num_timings = 1;
  371. of_property_read_u32(np, "width-mm", &desc->size.width);
  372. of_property_read_u32(np, "height-mm", &desc->size.height);
  373. /* Extract bus_flags from display_timing */
  374. bus_flags = 0;
  375. vm.flags = timing->flags;
  376. drm_bus_flags_from_videomode(&vm, &bus_flags);
  377. desc->bus_flags = bus_flags;
  378. /* We do not know the connector for the DT node, so guess it */
  379. desc->connector_type = DRM_MODE_CONNECTOR_DPI;
  380. return desc;
  381. }
  382. #define PANEL_SIMPLE_BOUNDS_CHECK(to_check, bounds, field) \
  383. (to_check->field.typ >= bounds->field.min && \
  384. to_check->field.typ <= bounds->field.max)
  385. static void panel_simple_parse_panel_timing_node(struct device *dev,
  386. struct panel_simple *panel,
  387. const struct display_timing *ot)
  388. {
  389. const struct panel_desc *desc = panel->desc;
  390. struct videomode vm;
  391. unsigned int i;
  392. if (WARN_ON(desc->num_modes)) {
  393. dev_err(dev, "Reject override mode: panel has a fixed mode\n");
  394. return;
  395. }
  396. if (WARN_ON(!desc->num_timings)) {
  397. dev_err(dev, "Reject override mode: no timings specified\n");
  398. return;
  399. }
  400. for (i = 0; i < panel->desc->num_timings; i++) {
  401. const struct display_timing *dt = &panel->desc->timings[i];
  402. if (!PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hactive) ||
  403. !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hfront_porch) ||
  404. !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hback_porch) ||
  405. !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hsync_len) ||
  406. !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vactive) ||
  407. !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vfront_porch) ||
  408. !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vback_porch) ||
  409. !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vsync_len))
  410. continue;
  411. if (ot->flags != dt->flags)
  412. continue;
  413. videomode_from_timing(ot, &vm);
  414. drm_display_mode_from_videomode(&vm, &panel->override_mode);
  415. panel->override_mode.type |= DRM_MODE_TYPE_DRIVER |
  416. DRM_MODE_TYPE_PREFERRED;
  417. break;
  418. }
  419. if (WARN_ON(!panel->override_mode.type))
  420. dev_err(dev, "Reject override mode: No display_timing found\n");
  421. }
  422. static int panel_simple_override_nondefault_lvds_datamapping(struct device *dev,
  423. struct panel_simple *panel)
  424. {
  425. int ret, bpc;
  426. ret = drm_of_lvds_get_data_mapping(dev->of_node);
  427. if (ret < 0) {
  428. if (ret == -EINVAL)
  429. dev_warn(dev, "Ignore invalid data-mapping property\n");
  430. /*
  431. * Ignore non-existing or malformatted property, fallback to
  432. * default data-mapping, and return 0.
  433. */
  434. return 0;
  435. }
  436. switch (ret) {
  437. default:
  438. WARN_ON(1);
  439. fallthrough;
  440. case MEDIA_BUS_FMT_RGB888_1X7X4_SPWG:
  441. fallthrough;
  442. case MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA:
  443. bpc = 8;
  444. break;
  445. case MEDIA_BUS_FMT_RGB666_1X7X3_SPWG:
  446. bpc = 6;
  447. }
  448. if (panel->desc->bpc != bpc || panel->desc->bus_format != ret) {
  449. struct panel_desc *override_desc;
  450. override_desc = devm_kmemdup(dev, panel->desc, sizeof(*panel->desc), GFP_KERNEL);
  451. if (!override_desc)
  452. return -ENOMEM;
  453. override_desc->bus_format = ret;
  454. override_desc->bpc = bpc;
  455. panel->desc = override_desc;
  456. }
  457. return 0;
  458. }
  459. static const struct panel_desc *panel_simple_get_desc(struct device *dev)
  460. {
  461. if (IS_ENABLED(CONFIG_DRM_MIPI_DSI) &&
  462. dev_is_mipi_dsi(dev)) {
  463. const struct panel_desc_dsi *dsi_desc;
  464. dsi_desc = of_device_get_match_data(dev);
  465. if (!dsi_desc)
  466. return ERR_PTR(-ENODEV);
  467. return &dsi_desc->desc;
  468. }
  469. if (dev_is_platform(dev)) {
  470. const struct panel_desc *desc;
  471. desc = of_device_get_match_data(dev);
  472. if (!desc) {
  473. /*
  474. * panel-dpi probes without a descriptor and
  475. * panel_dpi_probe() will initialize one for us
  476. * based on the device tree.
  477. */
  478. if (of_device_is_compatible(dev->of_node, "panel-dpi"))
  479. return panel_dpi_probe(dev);
  480. else
  481. return ERR_PTR(-ENODEV);
  482. }
  483. return desc;
  484. }
  485. return ERR_PTR(-ENODEV);
  486. }
  487. static struct panel_simple *panel_simple_probe(struct device *dev)
  488. {
  489. const struct panel_desc *desc;
  490. struct panel_simple *panel;
  491. struct display_timing dt;
  492. struct device_node *ddc;
  493. int connector_type;
  494. u32 bus_flags;
  495. int err;
  496. desc = panel_simple_get_desc(dev);
  497. if (IS_ERR(desc))
  498. return ERR_CAST(desc);
  499. connector_type = desc->connector_type;
  500. /* Catch common mistakes for panels. */
  501. switch (connector_type) {
  502. case 0:
  503. dev_warn(dev, "Specify missing connector_type\n");
  504. connector_type = DRM_MODE_CONNECTOR_DPI;
  505. break;
  506. case DRM_MODE_CONNECTOR_LVDS:
  507. WARN_ON(desc->bus_flags &
  508. ~(DRM_BUS_FLAG_DE_LOW |
  509. DRM_BUS_FLAG_DE_HIGH |
  510. DRM_BUS_FLAG_DATA_MSB_TO_LSB |
  511. DRM_BUS_FLAG_DATA_LSB_TO_MSB));
  512. WARN_ON(desc->bus_format != MEDIA_BUS_FMT_RGB666_1X7X3_SPWG &&
  513. desc->bus_format != MEDIA_BUS_FMT_RGB888_1X7X4_SPWG &&
  514. desc->bus_format != MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA);
  515. WARN_ON(desc->bus_format == MEDIA_BUS_FMT_RGB666_1X7X3_SPWG &&
  516. desc->bpc != 6);
  517. WARN_ON((desc->bus_format == MEDIA_BUS_FMT_RGB888_1X7X4_SPWG ||
  518. desc->bus_format == MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA) &&
  519. desc->bpc != 8);
  520. break;
  521. case DRM_MODE_CONNECTOR_eDP:
  522. dev_warn(dev, "eDP panels moved to panel-edp\n");
  523. return ERR_PTR(-EINVAL);
  524. case DRM_MODE_CONNECTOR_DSI:
  525. if (desc->bpc != 6 && desc->bpc != 8)
  526. dev_warn(dev, "Expected bpc in {6,8} but got: %u\n", desc->bpc);
  527. break;
  528. case DRM_MODE_CONNECTOR_DPI:
  529. bus_flags = DRM_BUS_FLAG_DE_LOW |
  530. DRM_BUS_FLAG_DE_HIGH |
  531. DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE |
  532. DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
  533. DRM_BUS_FLAG_DATA_MSB_TO_LSB |
  534. DRM_BUS_FLAG_DATA_LSB_TO_MSB |
  535. DRM_BUS_FLAG_SYNC_SAMPLE_POSEDGE |
  536. DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE;
  537. if (desc->bus_flags & ~bus_flags)
  538. dev_warn(dev, "Unexpected bus_flags(%d)\n", desc->bus_flags & ~bus_flags);
  539. if (!(desc->bus_flags & bus_flags))
  540. dev_warn(dev, "Specify missing bus_flags\n");
  541. if (desc->bus_format == 0)
  542. dev_warn(dev, "Specify missing bus_format\n");
  543. if (desc->bpc != 6 && desc->bpc != 8)
  544. dev_warn(dev, "Expected bpc in {6,8} but got: %u\n", desc->bpc);
  545. break;
  546. default:
  547. dev_warn(dev, "Specify a valid connector_type: %d\n", desc->connector_type);
  548. connector_type = DRM_MODE_CONNECTOR_DPI;
  549. break;
  550. }
  551. panel = devm_drm_panel_alloc(dev, struct panel_simple, base,
  552. &panel_simple_funcs, connector_type);
  553. if (IS_ERR(panel))
  554. return ERR_CAST(panel);
  555. panel->desc = desc;
  556. panel->supply = devm_regulator_get(dev, "power");
  557. if (IS_ERR(panel->supply))
  558. return ERR_CAST(panel->supply);
  559. panel->enable_gpio = devm_gpiod_get_optional(dev, "enable",
  560. GPIOD_OUT_LOW);
  561. if (IS_ERR(panel->enable_gpio))
  562. return dev_err_cast_probe(dev, panel->enable_gpio,
  563. "failed to request GPIO\n");
  564. err = of_drm_get_panel_orientation(dev->of_node, &panel->orientation);
  565. if (err) {
  566. dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, err);
  567. return ERR_PTR(err);
  568. }
  569. ddc = of_parse_phandle(dev->of_node, "ddc-i2c-bus", 0);
  570. if (ddc) {
  571. panel->ddc = of_find_i2c_adapter_by_node(ddc);
  572. of_node_put(ddc);
  573. if (!panel->ddc)
  574. return ERR_PTR(-EPROBE_DEFER);
  575. }
  576. if (!of_device_is_compatible(dev->of_node, "panel-dpi") &&
  577. !of_get_display_timing(dev->of_node, "panel-timing", &dt))
  578. panel_simple_parse_panel_timing_node(dev, panel, &dt);
  579. if (desc->connector_type == DRM_MODE_CONNECTOR_LVDS) {
  580. /* Optional data-mapping property for overriding bus format */
  581. err = panel_simple_override_nondefault_lvds_datamapping(dev, panel);
  582. if (err)
  583. goto free_ddc;
  584. }
  585. dev_set_drvdata(dev, panel);
  586. /*
  587. * We use runtime PM for prepare / unprepare since those power the panel
  588. * on and off and those can be very slow operations. This is important
  589. * to optimize powering the panel on briefly to read the EDID before
  590. * fully enabling the panel.
  591. */
  592. pm_runtime_enable(dev);
  593. pm_runtime_set_autosuspend_delay(dev, 1000);
  594. pm_runtime_use_autosuspend(dev);
  595. err = drm_panel_of_backlight(&panel->base);
  596. if (err) {
  597. dev_err_probe(dev, err, "Could not find backlight\n");
  598. goto disable_pm_runtime;
  599. }
  600. drm_panel_add(&panel->base);
  601. return panel;
  602. disable_pm_runtime:
  603. pm_runtime_dont_use_autosuspend(dev);
  604. pm_runtime_disable(dev);
  605. free_ddc:
  606. if (panel->ddc)
  607. put_device(&panel->ddc->dev);
  608. return ERR_PTR(err);
  609. }
  610. static void panel_simple_shutdown(struct device *dev)
  611. {
  612. struct panel_simple *panel = dev_get_drvdata(dev);
  613. /*
  614. * NOTE: the following two calls don't really belong here. It is the
  615. * responsibility of a correctly written DRM modeset driver to call
  616. * drm_atomic_helper_shutdown() at shutdown time and that should
  617. * cause the panel to be disabled / unprepared if needed. For now,
  618. * however, we'll keep these calls due to the sheer number of
  619. * different DRM modeset drivers used with panel-simple. Once we've
  620. * confirmed that all DRM modeset drivers using this panel properly
  621. * call drm_atomic_helper_shutdown() we can simply delete the two
  622. * calls below.
  623. *
  624. * TO BE EXPLICIT: THE CALLS BELOW SHOULDN'T BE COPIED TO ANY NEW
  625. * PANEL DRIVERS.
  626. *
  627. * FIXME: If we're still haven't figured out if all DRM modeset
  628. * drivers properly call drm_atomic_helper_shutdown() but we _have_
  629. * managed to make sure that DRM modeset drivers get their shutdown()
  630. * callback before the panel's shutdown() callback (perhaps using
  631. * device link), we could add a WARN_ON here to help move forward.
  632. */
  633. if (panel->base.enabled)
  634. drm_panel_disable(&panel->base);
  635. if (panel->base.prepared)
  636. drm_panel_unprepare(&panel->base);
  637. }
  638. static void panel_simple_remove(struct device *dev)
  639. {
  640. struct panel_simple *panel = dev_get_drvdata(dev);
  641. drm_panel_remove(&panel->base);
  642. panel_simple_shutdown(dev);
  643. pm_runtime_dont_use_autosuspend(dev);
  644. pm_runtime_disable(dev);
  645. if (panel->ddc)
  646. put_device(&panel->ddc->dev);
  647. }
  648. static const struct drm_display_mode ampire_am_1280800n3tzqw_t00h_mode = {
  649. .clock = 71100,
  650. .hdisplay = 1280,
  651. .hsync_start = 1280 + 40,
  652. .hsync_end = 1280 + 40 + 80,
  653. .htotal = 1280 + 40 + 80 + 40,
  654. .vdisplay = 800,
  655. .vsync_start = 800 + 3,
  656. .vsync_end = 800 + 3 + 10,
  657. .vtotal = 800 + 3 + 10 + 10,
  658. .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
  659. };
  660. static const struct panel_desc ampire_am_1280800n3tzqw_t00h = {
  661. .modes = &ampire_am_1280800n3tzqw_t00h_mode,
  662. .num_modes = 1,
  663. .bpc = 8,
  664. .size = {
  665. .width = 217,
  666. .height = 136,
  667. },
  668. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  669. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  670. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  671. };
  672. static const struct drm_display_mode ampire_am_480272h3tmqw_t01h_mode = {
  673. .clock = 9000,
  674. .hdisplay = 480,
  675. .hsync_start = 480 + 2,
  676. .hsync_end = 480 + 2 + 41,
  677. .htotal = 480 + 2 + 41 + 2,
  678. .vdisplay = 272,
  679. .vsync_start = 272 + 2,
  680. .vsync_end = 272 + 2 + 10,
  681. .vtotal = 272 + 2 + 10 + 2,
  682. .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
  683. };
  684. static const struct panel_desc ampire_am_480272h3tmqw_t01h = {
  685. .modes = &ampire_am_480272h3tmqw_t01h_mode,
  686. .num_modes = 1,
  687. .bpc = 8,
  688. .size = {
  689. .width = 99,
  690. .height = 58,
  691. },
  692. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  693. };
  694. static const struct drm_display_mode ampire_am800480r3tmqwa1h_mode = {
  695. .clock = 33333,
  696. .hdisplay = 800,
  697. .hsync_start = 800 + 0,
  698. .hsync_end = 800 + 0 + 255,
  699. .htotal = 800 + 0 + 255 + 0,
  700. .vdisplay = 480,
  701. .vsync_start = 480 + 2,
  702. .vsync_end = 480 + 2 + 45,
  703. .vtotal = 480 + 2 + 45 + 0,
  704. .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
  705. };
  706. static const struct display_timing ampire_am_800480l1tmqw_t00h_timing = {
  707. .pixelclock = { 29930000, 33260000, 36590000 },
  708. .hactive = { 800, 800, 800 },
  709. .hfront_porch = { 1, 40, 168 },
  710. .hback_porch = { 88, 88, 88 },
  711. .hsync_len = { 1, 128, 128 },
  712. .vactive = { 480, 480, 480 },
  713. .vfront_porch = { 1, 35, 37 },
  714. .vback_porch = { 8, 8, 8 },
  715. .vsync_len = { 1, 2, 2 },
  716. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
  717. DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE |
  718. DISPLAY_FLAGS_SYNC_POSEDGE,
  719. };
  720. static const struct panel_desc ampire_am_800480l1tmqw_t00h = {
  721. .timings = &ampire_am_800480l1tmqw_t00h_timing,
  722. .num_timings = 1,
  723. .bpc = 8,
  724. .size = {
  725. .width = 111,
  726. .height = 67,
  727. },
  728. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  729. .bus_flags = DRM_BUS_FLAG_DE_HIGH |
  730. DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
  731. DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE,
  732. .connector_type = DRM_MODE_CONNECTOR_DPI,
  733. };
  734. static const struct panel_desc ampire_am800480r3tmqwa1h = {
  735. .modes = &ampire_am800480r3tmqwa1h_mode,
  736. .num_modes = 1,
  737. .bpc = 6,
  738. .size = {
  739. .width = 152,
  740. .height = 91,
  741. },
  742. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  743. };
  744. static const struct display_timing ampire_am800600p5tmqw_tb8h_timing = {
  745. .pixelclock = { 34500000, 39600000, 50400000 },
  746. .hactive = { 800, 800, 800 },
  747. .hfront_porch = { 12, 112, 312 },
  748. .hback_porch = { 87, 87, 48 },
  749. .hsync_len = { 1, 1, 40 },
  750. .vactive = { 600, 600, 600 },
  751. .vfront_porch = { 1, 21, 61 },
  752. .vback_porch = { 38, 38, 19 },
  753. .vsync_len = { 1, 1, 20 },
  754. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
  755. DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE |
  756. DISPLAY_FLAGS_SYNC_POSEDGE,
  757. };
  758. static const struct panel_desc ampire_am800600p5tmqwtb8h = {
  759. .timings = &ampire_am800600p5tmqw_tb8h_timing,
  760. .num_timings = 1,
  761. .bpc = 6,
  762. .size = {
  763. .width = 162,
  764. .height = 122,
  765. },
  766. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  767. .bus_flags = DRM_BUS_FLAG_DE_HIGH |
  768. DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
  769. DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE,
  770. .connector_type = DRM_MODE_CONNECTOR_DPI,
  771. };
  772. static const struct display_timing santek_st0700i5y_rbslw_f_timing = {
  773. .pixelclock = { 26400000, 33300000, 46800000 },
  774. .hactive = { 800, 800, 800 },
  775. .hfront_porch = { 16, 210, 354 },
  776. .hback_porch = { 45, 36, 6 },
  777. .hsync_len = { 1, 10, 40 },
  778. .vactive = { 480, 480, 480 },
  779. .vfront_porch = { 7, 22, 147 },
  780. .vback_porch = { 22, 13, 3 },
  781. .vsync_len = { 1, 10, 20 },
  782. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
  783. DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE
  784. };
  785. static const struct panel_desc armadeus_st0700_adapt = {
  786. .timings = &santek_st0700i5y_rbslw_f_timing,
  787. .num_timings = 1,
  788. .bpc = 6,
  789. .size = {
  790. .width = 154,
  791. .height = 86,
  792. },
  793. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  794. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
  795. };
  796. static const struct drm_display_mode auo_b101aw03_mode = {
  797. .clock = 51450,
  798. .hdisplay = 1024,
  799. .hsync_start = 1024 + 156,
  800. .hsync_end = 1024 + 156 + 8,
  801. .htotal = 1024 + 156 + 8 + 156,
  802. .vdisplay = 600,
  803. .vsync_start = 600 + 16,
  804. .vsync_end = 600 + 16 + 6,
  805. .vtotal = 600 + 16 + 6 + 16,
  806. };
  807. static const struct panel_desc auo_b101aw03 = {
  808. .modes = &auo_b101aw03_mode,
  809. .num_modes = 1,
  810. .bpc = 6,
  811. .size = {
  812. .width = 223,
  813. .height = 125,
  814. },
  815. .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
  816. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  817. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  818. };
  819. static const struct drm_display_mode auo_b101xtn01_mode = {
  820. .clock = 72000,
  821. .hdisplay = 1366,
  822. .hsync_start = 1366 + 20,
  823. .hsync_end = 1366 + 20 + 70,
  824. .htotal = 1366 + 20 + 70,
  825. .vdisplay = 768,
  826. .vsync_start = 768 + 14,
  827. .vsync_end = 768 + 14 + 42,
  828. .vtotal = 768 + 14 + 42,
  829. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  830. };
  831. static const struct panel_desc auo_b101xtn01 = {
  832. .modes = &auo_b101xtn01_mode,
  833. .num_modes = 1,
  834. .bpc = 6,
  835. .size = {
  836. .width = 223,
  837. .height = 125,
  838. },
  839. };
  840. static const struct drm_display_mode auo_b116xw03_mode = {
  841. .clock = 70589,
  842. .hdisplay = 1366,
  843. .hsync_start = 1366 + 40,
  844. .hsync_end = 1366 + 40 + 40,
  845. .htotal = 1366 + 40 + 40 + 32,
  846. .vdisplay = 768,
  847. .vsync_start = 768 + 10,
  848. .vsync_end = 768 + 10 + 12,
  849. .vtotal = 768 + 10 + 12 + 6,
  850. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  851. };
  852. static const struct panel_desc auo_b116xw03 = {
  853. .modes = &auo_b116xw03_mode,
  854. .num_modes = 1,
  855. .bpc = 6,
  856. .size = {
  857. .width = 256,
  858. .height = 144,
  859. },
  860. .delay = {
  861. .prepare = 1,
  862. .enable = 200,
  863. .disable = 200,
  864. .unprepare = 500,
  865. },
  866. .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
  867. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  868. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  869. };
  870. static const struct display_timing auo_g070vvn01_timings = {
  871. .pixelclock = { 33300000, 34209000, 45000000 },
  872. .hactive = { 800, 800, 800 },
  873. .hfront_porch = { 20, 40, 200 },
  874. .hback_porch = { 87, 40, 1 },
  875. .hsync_len = { 1, 48, 87 },
  876. .vactive = { 480, 480, 480 },
  877. .vfront_porch = { 5, 13, 200 },
  878. .vback_porch = { 31, 31, 29 },
  879. .vsync_len = { 1, 1, 3 },
  880. };
  881. static const struct panel_desc auo_g070vvn01 = {
  882. .timings = &auo_g070vvn01_timings,
  883. .num_timings = 1,
  884. .bpc = 8,
  885. .size = {
  886. .width = 152,
  887. .height = 91,
  888. },
  889. .delay = {
  890. .prepare = 200,
  891. .enable = 50,
  892. .disable = 50,
  893. .unprepare = 1000,
  894. },
  895. };
  896. static const struct display_timing auo_g101evn010_timing = {
  897. .pixelclock = { 64000000, 68930000, 85000000 },
  898. .hactive = { 1280, 1280, 1280 },
  899. .hfront_porch = { 8, 64, 256 },
  900. .hback_porch = { 8, 64, 256 },
  901. .hsync_len = { 40, 168, 767 },
  902. .vactive = { 800, 800, 800 },
  903. .vfront_porch = { 4, 8, 100 },
  904. .vback_porch = { 4, 8, 100 },
  905. .vsync_len = { 8, 16, 223 },
  906. };
  907. static const struct panel_desc auo_g101evn010 = {
  908. .timings = &auo_g101evn010_timing,
  909. .num_timings = 1,
  910. .bpc = 6,
  911. .size = {
  912. .width = 216,
  913. .height = 135,
  914. },
  915. .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
  916. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  917. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  918. };
  919. static const struct drm_display_mode auo_g104sn02_mode = {
  920. .clock = 40000,
  921. .hdisplay = 800,
  922. .hsync_start = 800 + 40,
  923. .hsync_end = 800 + 40 + 216,
  924. .htotal = 800 + 40 + 216 + 128,
  925. .vdisplay = 600,
  926. .vsync_start = 600 + 10,
  927. .vsync_end = 600 + 10 + 35,
  928. .vtotal = 600 + 10 + 35 + 2,
  929. };
  930. static const struct panel_desc auo_g104sn02 = {
  931. .modes = &auo_g104sn02_mode,
  932. .num_modes = 1,
  933. .bpc = 8,
  934. .size = {
  935. .width = 211,
  936. .height = 158,
  937. },
  938. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  939. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  940. };
  941. static const struct drm_display_mode auo_g104stn01_mode = {
  942. .clock = 40000,
  943. .hdisplay = 800,
  944. .hsync_start = 800 + 40,
  945. .hsync_end = 800 + 40 + 88,
  946. .htotal = 800 + 40 + 88 + 128,
  947. .vdisplay = 600,
  948. .vsync_start = 600 + 1,
  949. .vsync_end = 600 + 1 + 23,
  950. .vtotal = 600 + 1 + 23 + 4,
  951. };
  952. static const struct panel_desc auo_g104stn01 = {
  953. .modes = &auo_g104stn01_mode,
  954. .num_modes = 1,
  955. .bpc = 8,
  956. .size = {
  957. .width = 211,
  958. .height = 158,
  959. },
  960. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  961. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  962. };
  963. static const struct display_timing auo_g121ean01_timing = {
  964. .pixelclock = { 60000000, 74400000, 90000000 },
  965. .hactive = { 1280, 1280, 1280 },
  966. .hfront_porch = { 20, 50, 100 },
  967. .hback_porch = { 20, 50, 100 },
  968. .hsync_len = { 30, 100, 200 },
  969. .vactive = { 800, 800, 800 },
  970. .vfront_porch = { 2, 10, 25 },
  971. .vback_porch = { 2, 10, 25 },
  972. .vsync_len = { 4, 18, 50 },
  973. };
  974. static const struct panel_desc auo_g121ean01 = {
  975. .timings = &auo_g121ean01_timing,
  976. .num_timings = 1,
  977. .bpc = 8,
  978. .size = {
  979. .width = 261,
  980. .height = 163,
  981. },
  982. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  983. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  984. };
  985. static const struct display_timing auo_g133han01_timings = {
  986. .pixelclock = { 134000000, 141200000, 149000000 },
  987. .hactive = { 1920, 1920, 1920 },
  988. .hfront_porch = { 39, 58, 77 },
  989. .hback_porch = { 59, 88, 117 },
  990. .hsync_len = { 28, 42, 56 },
  991. .vactive = { 1080, 1080, 1080 },
  992. .vfront_porch = { 3, 8, 11 },
  993. .vback_porch = { 5, 14, 19 },
  994. .vsync_len = { 4, 14, 19 },
  995. };
  996. static const struct panel_desc auo_g133han01 = {
  997. .timings = &auo_g133han01_timings,
  998. .num_timings = 1,
  999. .bpc = 8,
  1000. .size = {
  1001. .width = 293,
  1002. .height = 165,
  1003. },
  1004. .delay = {
  1005. .prepare = 200,
  1006. .enable = 50,
  1007. .disable = 50,
  1008. .unprepare = 1000,
  1009. },
  1010. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
  1011. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1012. };
  1013. static const struct display_timing auo_g156han04_timings = {
  1014. .pixelclock = { 137000000, 141000000, 146000000 },
  1015. .hactive = { 1920, 1920, 1920 },
  1016. .hfront_porch = { 60, 60, 60 },
  1017. .hback_porch = { 90, 92, 111 },
  1018. .hsync_len = { 32, 32, 32 },
  1019. .vactive = { 1080, 1080, 1080 },
  1020. .vfront_porch = { 12, 12, 12 },
  1021. .vback_porch = { 24, 36, 56 },
  1022. .vsync_len = { 8, 8, 8 },
  1023. };
  1024. static const struct panel_desc auo_g156han04 = {
  1025. .timings = &auo_g156han04_timings,
  1026. .num_timings = 1,
  1027. .bpc = 8,
  1028. .size = {
  1029. .width = 344,
  1030. .height = 194,
  1031. },
  1032. .delay = {
  1033. .prepare = 50, /* T2 */
  1034. .enable = 200, /* T3 */
  1035. .disable = 110, /* T10 */
  1036. .unprepare = 1000, /* T13 */
  1037. },
  1038. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  1039. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  1040. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1041. };
  1042. static const struct drm_display_mode auo_g156xtn01_mode = {
  1043. .clock = 76000,
  1044. .hdisplay = 1366,
  1045. .hsync_start = 1366 + 33,
  1046. .hsync_end = 1366 + 33 + 67,
  1047. .htotal = 1560,
  1048. .vdisplay = 768,
  1049. .vsync_start = 768 + 4,
  1050. .vsync_end = 768 + 4 + 4,
  1051. .vtotal = 806,
  1052. };
  1053. static const struct panel_desc auo_g156xtn01 = {
  1054. .modes = &auo_g156xtn01_mode,
  1055. .num_modes = 1,
  1056. .bpc = 8,
  1057. .size = {
  1058. .width = 344,
  1059. .height = 194,
  1060. },
  1061. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  1062. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1063. };
  1064. static const struct display_timing auo_g185han01_timings = {
  1065. .pixelclock = { 120000000, 144000000, 175000000 },
  1066. .hactive = { 1920, 1920, 1920 },
  1067. .hfront_porch = { 36, 120, 148 },
  1068. .hback_porch = { 24, 88, 108 },
  1069. .hsync_len = { 20, 48, 64 },
  1070. .vactive = { 1080, 1080, 1080 },
  1071. .vfront_porch = { 6, 10, 40 },
  1072. .vback_porch = { 2, 5, 20 },
  1073. .vsync_len = { 2, 5, 20 },
  1074. };
  1075. static const struct panel_desc auo_g185han01 = {
  1076. .timings = &auo_g185han01_timings,
  1077. .num_timings = 1,
  1078. .bpc = 8,
  1079. .size = {
  1080. .width = 409,
  1081. .height = 230,
  1082. },
  1083. .delay = {
  1084. .prepare = 50,
  1085. .enable = 200,
  1086. .disable = 110,
  1087. .unprepare = 1000,
  1088. },
  1089. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  1090. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1091. };
  1092. static const struct display_timing auo_g190ean01_timings = {
  1093. .pixelclock = { 90000000, 108000000, 135000000 },
  1094. .hactive = { 1280, 1280, 1280 },
  1095. .hfront_porch = { 126, 184, 1266 },
  1096. .hback_porch = { 84, 122, 844 },
  1097. .hsync_len = { 70, 102, 704 },
  1098. .vactive = { 1024, 1024, 1024 },
  1099. .vfront_porch = { 4, 26, 76 },
  1100. .vback_porch = { 2, 8, 25 },
  1101. .vsync_len = { 2, 8, 25 },
  1102. };
  1103. static const struct panel_desc auo_g190ean01 = {
  1104. .timings = &auo_g190ean01_timings,
  1105. .num_timings = 1,
  1106. .bpc = 8,
  1107. .size = {
  1108. .width = 376,
  1109. .height = 301,
  1110. },
  1111. .delay = {
  1112. .prepare = 50,
  1113. .enable = 200,
  1114. .disable = 110,
  1115. .unprepare = 1000,
  1116. },
  1117. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  1118. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1119. };
  1120. static const struct display_timing auo_p238han01_timings = {
  1121. .pixelclock = { 107400000, 142400000, 180000000 },
  1122. .hactive = { 1920, 1920, 1920 },
  1123. .hfront_porch = { 30, 70, 650 },
  1124. .hback_porch = { 30, 70, 650 },
  1125. .hsync_len = { 20, 40, 136 },
  1126. .vactive = { 1080, 1080, 1080 },
  1127. .vfront_porch = { 5, 19, 318 },
  1128. .vback_porch = { 5, 19, 318 },
  1129. .vsync_len = { 4, 12, 120 },
  1130. };
  1131. static const struct panel_desc auo_p238han01 = {
  1132. .timings = &auo_p238han01_timings,
  1133. .num_timings = 1,
  1134. .bpc = 8,
  1135. .size = {
  1136. .width = 527,
  1137. .height = 296,
  1138. },
  1139. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  1140. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1141. };
  1142. static const struct display_timing auo_p320hvn03_timings = {
  1143. .pixelclock = { 106000000, 148500000, 164000000 },
  1144. .hactive = { 1920, 1920, 1920 },
  1145. .hfront_porch = { 25, 50, 130 },
  1146. .hback_porch = { 25, 50, 130 },
  1147. .hsync_len = { 20, 40, 105 },
  1148. .vactive = { 1080, 1080, 1080 },
  1149. .vfront_porch = { 8, 17, 150 },
  1150. .vback_porch = { 8, 17, 150 },
  1151. .vsync_len = { 4, 11, 100 },
  1152. };
  1153. static const struct panel_desc auo_p320hvn03 = {
  1154. .timings = &auo_p320hvn03_timings,
  1155. .num_timings = 1,
  1156. .bpc = 8,
  1157. .size = {
  1158. .width = 698,
  1159. .height = 393,
  1160. },
  1161. .delay = {
  1162. .prepare = 1,
  1163. .enable = 450,
  1164. .unprepare = 500,
  1165. },
  1166. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  1167. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1168. };
  1169. static const struct drm_display_mode auo_t215hvn01_mode = {
  1170. .clock = 148800,
  1171. .hdisplay = 1920,
  1172. .hsync_start = 1920 + 88,
  1173. .hsync_end = 1920 + 88 + 44,
  1174. .htotal = 1920 + 88 + 44 + 148,
  1175. .vdisplay = 1080,
  1176. .vsync_start = 1080 + 4,
  1177. .vsync_end = 1080 + 4 + 5,
  1178. .vtotal = 1080 + 4 + 5 + 36,
  1179. };
  1180. static const struct panel_desc auo_t215hvn01 = {
  1181. .modes = &auo_t215hvn01_mode,
  1182. .num_modes = 1,
  1183. .bpc = 8,
  1184. .size = {
  1185. .width = 430,
  1186. .height = 270,
  1187. },
  1188. .delay = {
  1189. .disable = 5,
  1190. .unprepare = 1000,
  1191. },
  1192. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  1193. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1194. };
  1195. static const struct drm_display_mode avic_tm070ddh03_mode = {
  1196. .clock = 51200,
  1197. .hdisplay = 1024,
  1198. .hsync_start = 1024 + 160,
  1199. .hsync_end = 1024 + 160 + 4,
  1200. .htotal = 1024 + 160 + 4 + 156,
  1201. .vdisplay = 600,
  1202. .vsync_start = 600 + 17,
  1203. .vsync_end = 600 + 17 + 1,
  1204. .vtotal = 600 + 17 + 1 + 17,
  1205. };
  1206. static const struct panel_desc avic_tm070ddh03 = {
  1207. .modes = &avic_tm070ddh03_mode,
  1208. .num_modes = 1,
  1209. .bpc = 8,
  1210. .size = {
  1211. .width = 154,
  1212. .height = 90,
  1213. },
  1214. .delay = {
  1215. .prepare = 20,
  1216. .enable = 200,
  1217. .disable = 200,
  1218. },
  1219. };
  1220. static const struct drm_display_mode bananapi_s070wv20_ct16_mode = {
  1221. .clock = 30000,
  1222. .hdisplay = 800,
  1223. .hsync_start = 800 + 40,
  1224. .hsync_end = 800 + 40 + 48,
  1225. .htotal = 800 + 40 + 48 + 40,
  1226. .vdisplay = 480,
  1227. .vsync_start = 480 + 13,
  1228. .vsync_end = 480 + 13 + 3,
  1229. .vtotal = 480 + 13 + 3 + 29,
  1230. };
  1231. static const struct panel_desc bananapi_s070wv20_ct16 = {
  1232. .modes = &bananapi_s070wv20_ct16_mode,
  1233. .num_modes = 1,
  1234. .bpc = 6,
  1235. .size = {
  1236. .width = 154,
  1237. .height = 86,
  1238. },
  1239. };
  1240. static const struct display_timing boe_av101hdt_a10_timing = {
  1241. .pixelclock = { 74210000, 75330000, 76780000, },
  1242. .hactive = { 1280, 1280, 1280, },
  1243. .hfront_porch = { 10, 42, 33, },
  1244. .hback_porch = { 10, 18, 33, },
  1245. .hsync_len = { 30, 10, 30, },
  1246. .vactive = { 720, 720, 720, },
  1247. .vfront_porch = { 200, 183, 200, },
  1248. .vback_porch = { 8, 8, 8, },
  1249. .vsync_len = { 2, 19, 2, },
  1250. .flags = DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
  1251. };
  1252. static const struct panel_desc boe_av101hdt_a10 = {
  1253. .timings = &boe_av101hdt_a10_timing,
  1254. .num_timings = 1,
  1255. .bpc = 8,
  1256. .size = {
  1257. .width = 224,
  1258. .height = 126,
  1259. },
  1260. .delay = {
  1261. .enable = 50,
  1262. .disable = 50,
  1263. },
  1264. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  1265. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1266. };
  1267. static const struct display_timing boe_av123z7m_n17_timing = {
  1268. .pixelclock = { 86600000, 88000000, 90800000, },
  1269. .hactive = { 1920, 1920, 1920, },
  1270. .hfront_porch = { 10, 10, 10, },
  1271. .hback_porch = { 10, 10, 10, },
  1272. .hsync_len = { 9, 12, 25, },
  1273. .vactive = { 720, 720, 720, },
  1274. .vfront_porch = { 7, 10, 13, },
  1275. .vback_porch = { 7, 10, 13, },
  1276. .vsync_len = { 7, 11, 14, },
  1277. .flags = DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
  1278. };
  1279. static const struct panel_desc boe_av123z7m_n17 = {
  1280. .timings = &boe_av123z7m_n17_timing,
  1281. .bpc = 8,
  1282. .num_timings = 1,
  1283. .size = {
  1284. .width = 292,
  1285. .height = 110,
  1286. },
  1287. .delay = {
  1288. .prepare = 50,
  1289. .disable = 50,
  1290. },
  1291. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  1292. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1293. };
  1294. static const struct drm_display_mode boe_bp101wx1_100_mode = {
  1295. .clock = 78945,
  1296. .hdisplay = 1280,
  1297. .hsync_start = 1280 + 0,
  1298. .hsync_end = 1280 + 0 + 2,
  1299. .htotal = 1280 + 62 + 0 + 2,
  1300. .vdisplay = 800,
  1301. .vsync_start = 800 + 8,
  1302. .vsync_end = 800 + 8 + 2,
  1303. .vtotal = 800 + 6 + 8 + 2,
  1304. };
  1305. static const struct panel_desc boe_bp082wx1_100 = {
  1306. .modes = &boe_bp101wx1_100_mode,
  1307. .num_modes = 1,
  1308. .bpc = 8,
  1309. .size = {
  1310. .width = 177,
  1311. .height = 110,
  1312. },
  1313. .delay = {
  1314. .enable = 50,
  1315. .disable = 50,
  1316. },
  1317. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
  1318. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  1319. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1320. };
  1321. static const struct panel_desc boe_bp101wx1_100 = {
  1322. .modes = &boe_bp101wx1_100_mode,
  1323. .num_modes = 1,
  1324. .bpc = 8,
  1325. .size = {
  1326. .width = 217,
  1327. .height = 136,
  1328. },
  1329. .delay = {
  1330. .enable = 50,
  1331. .disable = 50,
  1332. },
  1333. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
  1334. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  1335. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1336. };
  1337. static const struct display_timing boe_ev121wxm_n10_1850_timing = {
  1338. .pixelclock = { 69922000, 71000000, 72293000 },
  1339. .hactive = { 1280, 1280, 1280 },
  1340. .hfront_porch = { 48, 48, 48 },
  1341. .hback_porch = { 80, 80, 80 },
  1342. .hsync_len = { 32, 32, 32 },
  1343. .vactive = { 800, 800, 800 },
  1344. .vfront_porch = { 3, 3, 3 },
  1345. .vback_porch = { 14, 14, 14 },
  1346. .vsync_len = { 6, 6, 6 },
  1347. };
  1348. static const struct panel_desc boe_ev121wxm_n10_1850 = {
  1349. .timings = &boe_ev121wxm_n10_1850_timing,
  1350. .num_timings = 1,
  1351. .bpc = 8,
  1352. .size = {
  1353. .width = 261,
  1354. .height = 163,
  1355. },
  1356. .delay = {
  1357. .prepare = 9,
  1358. .enable = 300,
  1359. .unprepare = 300,
  1360. .disable = 560,
  1361. },
  1362. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  1363. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  1364. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1365. };
  1366. static const struct drm_display_mode boe_hv070wsa_mode = {
  1367. .clock = 42105,
  1368. .hdisplay = 1024,
  1369. .hsync_start = 1024 + 30,
  1370. .hsync_end = 1024 + 30 + 30,
  1371. .htotal = 1024 + 30 + 30 + 30,
  1372. .vdisplay = 600,
  1373. .vsync_start = 600 + 10,
  1374. .vsync_end = 600 + 10 + 10,
  1375. .vtotal = 600 + 10 + 10 + 10,
  1376. };
  1377. static const struct panel_desc boe_hv070wsa = {
  1378. .modes = &boe_hv070wsa_mode,
  1379. .num_modes = 1,
  1380. .bpc = 8,
  1381. .size = {
  1382. .width = 154,
  1383. .height = 90,
  1384. },
  1385. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  1386. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  1387. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1388. };
  1389. static const struct display_timing cct_cmt430b19n00_timing = {
  1390. .pixelclock = { 8000000, 9000000, 12000000 },
  1391. .hactive = { 480, 480, 480 },
  1392. .hfront_porch = { 2, 8, 75 },
  1393. .hback_porch = { 3, 43, 43 },
  1394. .hsync_len = { 2, 4, 75 },
  1395. .vactive = { 272, 272, 272 },
  1396. .vfront_porch = { 2, 8, 37 },
  1397. .vback_porch = { 2, 12, 12 },
  1398. .vsync_len = { 2, 4, 37 },
  1399. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW
  1400. };
  1401. static const struct panel_desc cct_cmt430b19n00 = {
  1402. .timings = &cct_cmt430b19n00_timing,
  1403. .num_timings = 1,
  1404. .bpc = 8,
  1405. .size = {
  1406. .width = 95,
  1407. .height = 53,
  1408. },
  1409. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  1410. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
  1411. .connector_type = DRM_MODE_CONNECTOR_DPI,
  1412. };
  1413. static const struct drm_display_mode cdtech_s043wq26h_ct7_mode = {
  1414. .clock = 9000,
  1415. .hdisplay = 480,
  1416. .hsync_start = 480 + 5,
  1417. .hsync_end = 480 + 5 + 5,
  1418. .htotal = 480 + 5 + 5 + 40,
  1419. .vdisplay = 272,
  1420. .vsync_start = 272 + 8,
  1421. .vsync_end = 272 + 8 + 8,
  1422. .vtotal = 272 + 8 + 8 + 8,
  1423. .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
  1424. };
  1425. static const struct panel_desc cdtech_s043wq26h_ct7 = {
  1426. .modes = &cdtech_s043wq26h_ct7_mode,
  1427. .num_modes = 1,
  1428. .bpc = 8,
  1429. .size = {
  1430. .width = 95,
  1431. .height = 54,
  1432. },
  1433. .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
  1434. };
  1435. /* S070PWS19HP-FC21 2017/04/22 */
  1436. static const struct drm_display_mode cdtech_s070pws19hp_fc21_mode = {
  1437. .clock = 51200,
  1438. .hdisplay = 1024,
  1439. .hsync_start = 1024 + 160,
  1440. .hsync_end = 1024 + 160 + 20,
  1441. .htotal = 1024 + 160 + 20 + 140,
  1442. .vdisplay = 600,
  1443. .vsync_start = 600 + 12,
  1444. .vsync_end = 600 + 12 + 3,
  1445. .vtotal = 600 + 12 + 3 + 20,
  1446. .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
  1447. };
  1448. static const struct panel_desc cdtech_s070pws19hp_fc21 = {
  1449. .modes = &cdtech_s070pws19hp_fc21_mode,
  1450. .num_modes = 1,
  1451. .bpc = 6,
  1452. .size = {
  1453. .width = 154,
  1454. .height = 86,
  1455. },
  1456. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  1457. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
  1458. .connector_type = DRM_MODE_CONNECTOR_DPI,
  1459. };
  1460. /* S070SWV29HG-DC44 2017/09/21 */
  1461. static const struct drm_display_mode cdtech_s070swv29hg_dc44_mode = {
  1462. .clock = 33300,
  1463. .hdisplay = 800,
  1464. .hsync_start = 800 + 210,
  1465. .hsync_end = 800 + 210 + 2,
  1466. .htotal = 800 + 210 + 2 + 44,
  1467. .vdisplay = 480,
  1468. .vsync_start = 480 + 22,
  1469. .vsync_end = 480 + 22 + 2,
  1470. .vtotal = 480 + 22 + 2 + 21,
  1471. .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
  1472. };
  1473. static const struct panel_desc cdtech_s070swv29hg_dc44 = {
  1474. .modes = &cdtech_s070swv29hg_dc44_mode,
  1475. .num_modes = 1,
  1476. .bpc = 6,
  1477. .size = {
  1478. .width = 154,
  1479. .height = 86,
  1480. },
  1481. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  1482. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
  1483. .connector_type = DRM_MODE_CONNECTOR_DPI,
  1484. };
  1485. static const struct drm_display_mode cdtech_s070wv95_ct16_mode = {
  1486. .clock = 35000,
  1487. .hdisplay = 800,
  1488. .hsync_start = 800 + 40,
  1489. .hsync_end = 800 + 40 + 40,
  1490. .htotal = 800 + 40 + 40 + 48,
  1491. .vdisplay = 480,
  1492. .vsync_start = 480 + 29,
  1493. .vsync_end = 480 + 29 + 13,
  1494. .vtotal = 480 + 29 + 13 + 3,
  1495. .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
  1496. };
  1497. static const struct panel_desc cdtech_s070wv95_ct16 = {
  1498. .modes = &cdtech_s070wv95_ct16_mode,
  1499. .num_modes = 1,
  1500. .bpc = 8,
  1501. .size = {
  1502. .width = 154,
  1503. .height = 85,
  1504. },
  1505. };
  1506. static const struct display_timing chefree_ch101olhlwh_002_timing = {
  1507. .pixelclock = { 68900000, 71100000, 73400000 },
  1508. .hactive = { 1280, 1280, 1280 },
  1509. .hfront_porch = { 65, 80, 95 },
  1510. .hback_porch = { 64, 79, 94 },
  1511. .hsync_len = { 1, 1, 1 },
  1512. .vactive = { 800, 800, 800 },
  1513. .vfront_porch = { 7, 11, 14 },
  1514. .vback_porch = { 7, 11, 14 },
  1515. .vsync_len = { 1, 1, 1 },
  1516. .flags = DISPLAY_FLAGS_DE_HIGH,
  1517. };
  1518. static const struct panel_desc chefree_ch101olhlwh_002 = {
  1519. .timings = &chefree_ch101olhlwh_002_timing,
  1520. .num_timings = 1,
  1521. .bpc = 8,
  1522. .size = {
  1523. .width = 217,
  1524. .height = 135,
  1525. },
  1526. .delay = {
  1527. .enable = 200,
  1528. .disable = 200,
  1529. },
  1530. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  1531. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  1532. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1533. };
  1534. static const struct drm_display_mode chunghwa_claa070wp03xg_mode = {
  1535. .clock = 66770,
  1536. .hdisplay = 800,
  1537. .hsync_start = 800 + 49,
  1538. .hsync_end = 800 + 49 + 33,
  1539. .htotal = 800 + 49 + 33 + 17,
  1540. .vdisplay = 1280,
  1541. .vsync_start = 1280 + 1,
  1542. .vsync_end = 1280 + 1 + 7,
  1543. .vtotal = 1280 + 1 + 7 + 15,
  1544. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  1545. };
  1546. static const struct panel_desc chunghwa_claa070wp03xg = {
  1547. .modes = &chunghwa_claa070wp03xg_mode,
  1548. .num_modes = 1,
  1549. .bpc = 6,
  1550. .size = {
  1551. .width = 94,
  1552. .height = 150,
  1553. },
  1554. .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
  1555. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  1556. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1557. };
  1558. static const struct drm_display_mode chunghwa_claa101wa01a_mode = {
  1559. .clock = 72070,
  1560. .hdisplay = 1366,
  1561. .hsync_start = 1366 + 58,
  1562. .hsync_end = 1366 + 58 + 58,
  1563. .htotal = 1366 + 58 + 58 + 58,
  1564. .vdisplay = 768,
  1565. .vsync_start = 768 + 4,
  1566. .vsync_end = 768 + 4 + 4,
  1567. .vtotal = 768 + 4 + 4 + 4,
  1568. };
  1569. static const struct panel_desc chunghwa_claa101wa01a = {
  1570. .modes = &chunghwa_claa101wa01a_mode,
  1571. .num_modes = 1,
  1572. .bpc = 6,
  1573. .size = {
  1574. .width = 220,
  1575. .height = 120,
  1576. },
  1577. .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
  1578. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  1579. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1580. };
  1581. static const struct drm_display_mode chunghwa_claa101wb01_mode = {
  1582. .clock = 69300,
  1583. .hdisplay = 1366,
  1584. .hsync_start = 1366 + 48,
  1585. .hsync_end = 1366 + 48 + 32,
  1586. .htotal = 1366 + 48 + 32 + 20,
  1587. .vdisplay = 768,
  1588. .vsync_start = 768 + 16,
  1589. .vsync_end = 768 + 16 + 8,
  1590. .vtotal = 768 + 16 + 8 + 16,
  1591. };
  1592. static const struct panel_desc chunghwa_claa101wb01 = {
  1593. .modes = &chunghwa_claa101wb01_mode,
  1594. .num_modes = 1,
  1595. .bpc = 6,
  1596. .size = {
  1597. .width = 223,
  1598. .height = 125,
  1599. },
  1600. .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
  1601. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  1602. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1603. };
  1604. static const struct display_timing dataimage_fg040346dsswbg04_timing = {
  1605. .pixelclock = { 5000000, 9000000, 12000000 },
  1606. .hactive = { 480, 480, 480 },
  1607. .hfront_porch = { 12, 12, 12 },
  1608. .hback_porch = { 12, 12, 12 },
  1609. .hsync_len = { 21, 21, 21 },
  1610. .vactive = { 272, 272, 272 },
  1611. .vfront_porch = { 4, 4, 4 },
  1612. .vback_porch = { 4, 4, 4 },
  1613. .vsync_len = { 8, 8, 8 },
  1614. };
  1615. static const struct panel_desc dataimage_fg040346dsswbg04 = {
  1616. .timings = &dataimage_fg040346dsswbg04_timing,
  1617. .num_timings = 1,
  1618. .bpc = 8,
  1619. .size = {
  1620. .width = 95,
  1621. .height = 54,
  1622. },
  1623. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  1624. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
  1625. .connector_type = DRM_MODE_CONNECTOR_DPI,
  1626. };
  1627. static const struct display_timing dataimage_fg1001l0dsswmg01_timing = {
  1628. .pixelclock = { 68900000, 71110000, 73400000 },
  1629. .hactive = { 1280, 1280, 1280 },
  1630. .vactive = { 800, 800, 800 },
  1631. .hback_porch = { 100, 100, 100 },
  1632. .hfront_porch = { 100, 100, 100 },
  1633. .vback_porch = { 5, 5, 5 },
  1634. .vfront_porch = { 5, 5, 5 },
  1635. .hsync_len = { 24, 24, 24 },
  1636. .vsync_len = { 3, 3, 3 },
  1637. .flags = DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE |
  1638. DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
  1639. };
  1640. static const struct panel_desc dataimage_fg1001l0dsswmg01 = {
  1641. .timings = &dataimage_fg1001l0dsswmg01_timing,
  1642. .num_timings = 1,
  1643. .bpc = 8,
  1644. .size = {
  1645. .width = 217,
  1646. .height = 136,
  1647. },
  1648. };
  1649. static const struct drm_display_mode dataimage_scf0700c48ggu18_mode = {
  1650. .clock = 33260,
  1651. .hdisplay = 800,
  1652. .hsync_start = 800 + 40,
  1653. .hsync_end = 800 + 40 + 128,
  1654. .htotal = 800 + 40 + 128 + 88,
  1655. .vdisplay = 480,
  1656. .vsync_start = 480 + 10,
  1657. .vsync_end = 480 + 10 + 2,
  1658. .vtotal = 480 + 10 + 2 + 33,
  1659. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  1660. };
  1661. static const struct panel_desc dataimage_scf0700c48ggu18 = {
  1662. .modes = &dataimage_scf0700c48ggu18_mode,
  1663. .num_modes = 1,
  1664. .bpc = 8,
  1665. .size = {
  1666. .width = 152,
  1667. .height = 91,
  1668. },
  1669. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  1670. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
  1671. .connector_type = DRM_MODE_CONNECTOR_DPI,
  1672. };
  1673. static const struct display_timing dlc_dlc0700yzg_1_timing = {
  1674. .pixelclock = { 45000000, 51200000, 57000000 },
  1675. .hactive = { 1024, 1024, 1024 },
  1676. .hfront_porch = { 100, 106, 113 },
  1677. .hback_porch = { 100, 106, 113 },
  1678. .hsync_len = { 100, 108, 114 },
  1679. .vactive = { 600, 600, 600 },
  1680. .vfront_porch = { 8, 11, 15 },
  1681. .vback_porch = { 8, 11, 15 },
  1682. .vsync_len = { 9, 13, 15 },
  1683. .flags = DISPLAY_FLAGS_DE_HIGH,
  1684. };
  1685. static const struct panel_desc dlc_dlc0700yzg_1 = {
  1686. .timings = &dlc_dlc0700yzg_1_timing,
  1687. .num_timings = 1,
  1688. .bpc = 6,
  1689. .size = {
  1690. .width = 154,
  1691. .height = 86,
  1692. },
  1693. .delay = {
  1694. .prepare = 30,
  1695. .enable = 200,
  1696. .disable = 200,
  1697. },
  1698. .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
  1699. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1700. };
  1701. static const struct display_timing dlc_dlc1010gig_timing = {
  1702. .pixelclock = { 68900000, 71100000, 73400000 },
  1703. .hactive = { 1280, 1280, 1280 },
  1704. .hfront_porch = { 43, 53, 63 },
  1705. .hback_porch = { 43, 53, 63 },
  1706. .hsync_len = { 44, 54, 64 },
  1707. .vactive = { 800, 800, 800 },
  1708. .vfront_porch = { 5, 8, 11 },
  1709. .vback_porch = { 5, 8, 11 },
  1710. .vsync_len = { 5, 7, 11 },
  1711. .flags = DISPLAY_FLAGS_DE_HIGH,
  1712. };
  1713. static const struct panel_desc dlc_dlc1010gig = {
  1714. .timings = &dlc_dlc1010gig_timing,
  1715. .num_timings = 1,
  1716. .bpc = 8,
  1717. .size = {
  1718. .width = 216,
  1719. .height = 135,
  1720. },
  1721. .delay = {
  1722. .prepare = 60,
  1723. .enable = 150,
  1724. .disable = 100,
  1725. .unprepare = 60,
  1726. },
  1727. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  1728. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1729. };
  1730. static const struct drm_display_mode edt_et035012dm6_mode = {
  1731. .clock = 6500,
  1732. .hdisplay = 320,
  1733. .hsync_start = 320 + 20,
  1734. .hsync_end = 320 + 20 + 30,
  1735. .htotal = 320 + 20 + 68,
  1736. .vdisplay = 240,
  1737. .vsync_start = 240 + 4,
  1738. .vsync_end = 240 + 4 + 4,
  1739. .vtotal = 240 + 4 + 4 + 14,
  1740. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  1741. };
  1742. static const struct panel_desc edt_et035012dm6 = {
  1743. .modes = &edt_et035012dm6_mode,
  1744. .num_modes = 1,
  1745. .bpc = 8,
  1746. .size = {
  1747. .width = 70,
  1748. .height = 52,
  1749. },
  1750. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  1751. .bus_flags = DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE,
  1752. };
  1753. static const struct drm_display_mode edt_etm0350g0dh6_mode = {
  1754. .clock = 6520,
  1755. .hdisplay = 320,
  1756. .hsync_start = 320 + 20,
  1757. .hsync_end = 320 + 20 + 68,
  1758. .htotal = 320 + 20 + 68,
  1759. .vdisplay = 240,
  1760. .vsync_start = 240 + 4,
  1761. .vsync_end = 240 + 4 + 18,
  1762. .vtotal = 240 + 4 + 18,
  1763. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  1764. };
  1765. static const struct panel_desc edt_etm0350g0dh6 = {
  1766. .modes = &edt_etm0350g0dh6_mode,
  1767. .num_modes = 1,
  1768. .bpc = 6,
  1769. .size = {
  1770. .width = 70,
  1771. .height = 53,
  1772. },
  1773. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  1774. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
  1775. .connector_type = DRM_MODE_CONNECTOR_DPI,
  1776. };
  1777. static const struct drm_display_mode edt_etm043080dh6gp_mode = {
  1778. .clock = 10870,
  1779. .hdisplay = 480,
  1780. .hsync_start = 480 + 8,
  1781. .hsync_end = 480 + 8 + 4,
  1782. .htotal = 480 + 8 + 4 + 41,
  1783. /*
  1784. * IWG22M: Y resolution changed for "dc_linuxfb" module crashing while
  1785. * fb_align
  1786. */
  1787. .vdisplay = 288,
  1788. .vsync_start = 288 + 2,
  1789. .vsync_end = 288 + 2 + 4,
  1790. .vtotal = 288 + 2 + 4 + 10,
  1791. };
  1792. static const struct panel_desc edt_etm043080dh6gp = {
  1793. .modes = &edt_etm043080dh6gp_mode,
  1794. .num_modes = 1,
  1795. .bpc = 8,
  1796. .size = {
  1797. .width = 100,
  1798. .height = 65,
  1799. },
  1800. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  1801. .connector_type = DRM_MODE_CONNECTOR_DPI,
  1802. };
  1803. static const struct drm_display_mode edt_etm0430g0dh6_mode = {
  1804. .clock = 9000,
  1805. .hdisplay = 480,
  1806. .hsync_start = 480 + 2,
  1807. .hsync_end = 480 + 2 + 41,
  1808. .htotal = 480 + 2 + 41 + 2,
  1809. .vdisplay = 272,
  1810. .vsync_start = 272 + 2,
  1811. .vsync_end = 272 + 2 + 10,
  1812. .vtotal = 272 + 2 + 10 + 2,
  1813. .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
  1814. };
  1815. static const struct panel_desc edt_etm0430g0dh6 = {
  1816. .modes = &edt_etm0430g0dh6_mode,
  1817. .num_modes = 1,
  1818. .bpc = 6,
  1819. .size = {
  1820. .width = 95,
  1821. .height = 54,
  1822. },
  1823. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  1824. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE,
  1825. .connector_type = DRM_MODE_CONNECTOR_DPI,
  1826. };
  1827. static const struct drm_display_mode edt_et057090dhu_mode = {
  1828. .clock = 25175,
  1829. .hdisplay = 640,
  1830. .hsync_start = 640 + 16,
  1831. .hsync_end = 640 + 16 + 30,
  1832. .htotal = 640 + 16 + 30 + 114,
  1833. .vdisplay = 480,
  1834. .vsync_start = 480 + 10,
  1835. .vsync_end = 480 + 10 + 3,
  1836. .vtotal = 480 + 10 + 3 + 32,
  1837. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  1838. };
  1839. static const struct panel_desc edt_et057090dhu = {
  1840. .modes = &edt_et057090dhu_mode,
  1841. .num_modes = 1,
  1842. .bpc = 6,
  1843. .size = {
  1844. .width = 115,
  1845. .height = 86,
  1846. },
  1847. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  1848. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
  1849. .connector_type = DRM_MODE_CONNECTOR_DPI,
  1850. };
  1851. static const struct drm_display_mode edt_etm0700g0dh6_mode = {
  1852. .clock = 33260,
  1853. .hdisplay = 800,
  1854. .hsync_start = 800 + 40,
  1855. .hsync_end = 800 + 40 + 128,
  1856. .htotal = 800 + 40 + 128 + 88,
  1857. .vdisplay = 480,
  1858. .vsync_start = 480 + 10,
  1859. .vsync_end = 480 + 10 + 2,
  1860. .vtotal = 480 + 10 + 2 + 33,
  1861. .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
  1862. };
  1863. static const struct panel_desc edt_etm0700g0dh6 = {
  1864. .modes = &edt_etm0700g0dh6_mode,
  1865. .num_modes = 1,
  1866. .bpc = 6,
  1867. .size = {
  1868. .width = 152,
  1869. .height = 91,
  1870. },
  1871. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  1872. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
  1873. .connector_type = DRM_MODE_CONNECTOR_DPI,
  1874. };
  1875. static const struct panel_desc edt_etm0700g0bdh6 = {
  1876. .modes = &edt_etm0700g0dh6_mode,
  1877. .num_modes = 1,
  1878. .bpc = 6,
  1879. .size = {
  1880. .width = 152,
  1881. .height = 91,
  1882. },
  1883. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  1884. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
  1885. .connector_type = DRM_MODE_CONNECTOR_DPI,
  1886. };
  1887. static const struct display_timing edt_etml0700y5dha_timing = {
  1888. .pixelclock = { 40800000, 51200000, 67200000 },
  1889. .hactive = { 1024, 1024, 1024 },
  1890. .hfront_porch = { 30, 106, 125 },
  1891. .hback_porch = { 30, 106, 125 },
  1892. .hsync_len = { 30, 108, 126 },
  1893. .vactive = { 600, 600, 600 },
  1894. .vfront_porch = { 3, 12, 67},
  1895. .vback_porch = { 3, 12, 67 },
  1896. .vsync_len = { 4, 11, 66 },
  1897. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
  1898. DISPLAY_FLAGS_DE_HIGH,
  1899. };
  1900. static const struct panel_desc edt_etml0700y5dha = {
  1901. .timings = &edt_etml0700y5dha_timing,
  1902. .num_timings = 1,
  1903. .bpc = 8,
  1904. .size = {
  1905. .width = 155,
  1906. .height = 86,
  1907. },
  1908. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  1909. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1910. };
  1911. static const struct display_timing edt_etml1010g3dra_timing = {
  1912. .pixelclock = { 66300000, 72400000, 78900000 },
  1913. .hactive = { 1280, 1280, 1280 },
  1914. .hfront_porch = { 12, 72, 132 },
  1915. .hback_porch = { 86, 86, 86 },
  1916. .hsync_len = { 2, 2, 2 },
  1917. .vactive = { 800, 800, 800 },
  1918. .vfront_porch = { 1, 15, 49 },
  1919. .vback_porch = { 21, 21, 21 },
  1920. .vsync_len = { 2, 2, 2 },
  1921. .flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW |
  1922. DISPLAY_FLAGS_DE_HIGH,
  1923. };
  1924. static const struct panel_desc edt_etml1010g3dra = {
  1925. .timings = &edt_etml1010g3dra_timing,
  1926. .num_timings = 1,
  1927. .bpc = 8,
  1928. .size = {
  1929. .width = 216,
  1930. .height = 135,
  1931. },
  1932. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  1933. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  1934. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  1935. };
  1936. static const struct drm_display_mode edt_etmv570g2dhu_mode = {
  1937. .clock = 25175,
  1938. .hdisplay = 640,
  1939. .hsync_start = 640,
  1940. .hsync_end = 640 + 16,
  1941. .htotal = 640 + 16 + 30 + 114,
  1942. .vdisplay = 480,
  1943. .vsync_start = 480 + 10,
  1944. .vsync_end = 480 + 10 + 3,
  1945. .vtotal = 480 + 10 + 3 + 35,
  1946. .flags = DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_PHSYNC,
  1947. };
  1948. static const struct panel_desc edt_etmv570g2dhu = {
  1949. .modes = &edt_etmv570g2dhu_mode,
  1950. .num_modes = 1,
  1951. .bpc = 6,
  1952. .size = {
  1953. .width = 115,
  1954. .height = 86,
  1955. },
  1956. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  1957. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
  1958. .connector_type = DRM_MODE_CONNECTOR_DPI,
  1959. };
  1960. static const struct display_timing eink_vb3300_kca_timing = {
  1961. .pixelclock = { 40000000, 40000000, 40000000 },
  1962. .hactive = { 334, 334, 334 },
  1963. .hfront_porch = { 1, 1, 1 },
  1964. .hback_porch = { 1, 1, 1 },
  1965. .hsync_len = { 1, 1, 1 },
  1966. .vactive = { 1405, 1405, 1405 },
  1967. .vfront_porch = { 1, 1, 1 },
  1968. .vback_porch = { 1, 1, 1 },
  1969. .vsync_len = { 1, 1, 1 },
  1970. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
  1971. DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
  1972. };
  1973. static const struct panel_desc eink_vb3300_kca = {
  1974. .timings = &eink_vb3300_kca_timing,
  1975. .num_timings = 1,
  1976. .bpc = 6,
  1977. .size = {
  1978. .width = 157,
  1979. .height = 209,
  1980. },
  1981. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  1982. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
  1983. .connector_type = DRM_MODE_CONNECTOR_DPI,
  1984. };
  1985. static const struct display_timing evervision_vgg644804_timing = {
  1986. .pixelclock = { 25175000, 25175000, 25175000 },
  1987. .hactive = { 640, 640, 640 },
  1988. .hfront_porch = { 16, 16, 16 },
  1989. .hback_porch = { 82, 114, 170 },
  1990. .hsync_len = { 5, 30, 30 },
  1991. .vactive = { 480, 480, 480 },
  1992. .vfront_porch = { 10, 10, 10 },
  1993. .vback_porch = { 30, 32, 34 },
  1994. .vsync_len = { 1, 3, 5 },
  1995. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
  1996. DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE |
  1997. DISPLAY_FLAGS_SYNC_POSEDGE,
  1998. };
  1999. static const struct panel_desc evervision_vgg644804 = {
  2000. .timings = &evervision_vgg644804_timing,
  2001. .num_timings = 1,
  2002. .bpc = 6,
  2003. .size = {
  2004. .width = 115,
  2005. .height = 86,
  2006. },
  2007. .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
  2008. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  2009. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2010. };
  2011. static const struct display_timing evervision_vgg804821_timing = {
  2012. .pixelclock = { 27600000, 33300000, 50000000 },
  2013. .hactive = { 800, 800, 800 },
  2014. .hfront_porch = { 40, 66, 70 },
  2015. .hback_porch = { 40, 67, 70 },
  2016. .hsync_len = { 40, 67, 70 },
  2017. .vactive = { 480, 480, 480 },
  2018. .vfront_porch = { 6, 10, 10 },
  2019. .vback_porch = { 7, 11, 11 },
  2020. .vsync_len = { 7, 11, 11 },
  2021. .flags = DISPLAY_FLAGS_HSYNC_HIGH | DISPLAY_FLAGS_VSYNC_HIGH |
  2022. DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE |
  2023. DISPLAY_FLAGS_SYNC_NEGEDGE,
  2024. };
  2025. static const struct panel_desc evervision_vgg804821 = {
  2026. .timings = &evervision_vgg804821_timing,
  2027. .num_timings = 1,
  2028. .bpc = 8,
  2029. .size = {
  2030. .width = 108,
  2031. .height = 64,
  2032. },
  2033. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  2034. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE,
  2035. };
  2036. static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = {
  2037. .clock = 32260,
  2038. .hdisplay = 800,
  2039. .hsync_start = 800 + 168,
  2040. .hsync_end = 800 + 168 + 64,
  2041. .htotal = 800 + 168 + 64 + 88,
  2042. .vdisplay = 480,
  2043. .vsync_start = 480 + 37,
  2044. .vsync_end = 480 + 37 + 2,
  2045. .vtotal = 480 + 37 + 2 + 8,
  2046. };
  2047. static const struct panel_desc foxlink_fl500wvr00_a0t = {
  2048. .modes = &foxlink_fl500wvr00_a0t_mode,
  2049. .num_modes = 1,
  2050. .bpc = 8,
  2051. .size = {
  2052. .width = 108,
  2053. .height = 65,
  2054. },
  2055. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  2056. };
  2057. static const struct drm_display_mode frida_frd350h54004_modes[] = {
  2058. { /* 60 Hz */
  2059. .clock = 6000,
  2060. .hdisplay = 320,
  2061. .hsync_start = 320 + 44,
  2062. .hsync_end = 320 + 44 + 16,
  2063. .htotal = 320 + 44 + 16 + 20,
  2064. .vdisplay = 240,
  2065. .vsync_start = 240 + 2,
  2066. .vsync_end = 240 + 2 + 6,
  2067. .vtotal = 240 + 2 + 6 + 2,
  2068. .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
  2069. },
  2070. { /* 50 Hz */
  2071. .clock = 5400,
  2072. .hdisplay = 320,
  2073. .hsync_start = 320 + 56,
  2074. .hsync_end = 320 + 56 + 16,
  2075. .htotal = 320 + 56 + 16 + 40,
  2076. .vdisplay = 240,
  2077. .vsync_start = 240 + 2,
  2078. .vsync_end = 240 + 2 + 6,
  2079. .vtotal = 240 + 2 + 6 + 2,
  2080. .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
  2081. },
  2082. };
  2083. static const struct panel_desc frida_frd350h54004 = {
  2084. .modes = frida_frd350h54004_modes,
  2085. .num_modes = ARRAY_SIZE(frida_frd350h54004_modes),
  2086. .bpc = 8,
  2087. .size = {
  2088. .width = 77,
  2089. .height = 64,
  2090. },
  2091. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  2092. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
  2093. .connector_type = DRM_MODE_CONNECTOR_DPI,
  2094. };
  2095. static const struct drm_display_mode friendlyarm_hd702e_mode = {
  2096. .clock = 67185,
  2097. .hdisplay = 800,
  2098. .hsync_start = 800 + 20,
  2099. .hsync_end = 800 + 20 + 24,
  2100. .htotal = 800 + 20 + 24 + 20,
  2101. .vdisplay = 1280,
  2102. .vsync_start = 1280 + 4,
  2103. .vsync_end = 1280 + 4 + 8,
  2104. .vtotal = 1280 + 4 + 8 + 4,
  2105. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  2106. };
  2107. static const struct panel_desc friendlyarm_hd702e = {
  2108. .modes = &friendlyarm_hd702e_mode,
  2109. .num_modes = 1,
  2110. .size = {
  2111. .width = 94,
  2112. .height = 151,
  2113. },
  2114. };
  2115. static const struct drm_display_mode giantplus_gpg482739qs5_mode = {
  2116. .clock = 9000,
  2117. .hdisplay = 480,
  2118. .hsync_start = 480 + 5,
  2119. .hsync_end = 480 + 5 + 1,
  2120. .htotal = 480 + 5 + 1 + 40,
  2121. .vdisplay = 272,
  2122. .vsync_start = 272 + 8,
  2123. .vsync_end = 272 + 8 + 1,
  2124. .vtotal = 272 + 8 + 1 + 8,
  2125. };
  2126. static const struct panel_desc giantplus_gpg482739qs5 = {
  2127. .modes = &giantplus_gpg482739qs5_mode,
  2128. .num_modes = 1,
  2129. .bpc = 8,
  2130. .size = {
  2131. .width = 95,
  2132. .height = 54,
  2133. },
  2134. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  2135. };
  2136. static const struct display_timing giantplus_gpm940b0_timing = {
  2137. .pixelclock = { 13500000, 27000000, 27500000 },
  2138. .hactive = { 320, 320, 320 },
  2139. .hfront_porch = { 14, 686, 718 },
  2140. .hback_porch = { 50, 70, 255 },
  2141. .hsync_len = { 1, 1, 1 },
  2142. .vactive = { 240, 240, 240 },
  2143. .vfront_porch = { 1, 1, 179 },
  2144. .vback_porch = { 1, 21, 31 },
  2145. .vsync_len = { 1, 1, 6 },
  2146. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
  2147. };
  2148. static const struct panel_desc giantplus_gpm940b0 = {
  2149. .timings = &giantplus_gpm940b0_timing,
  2150. .num_timings = 1,
  2151. .bpc = 8,
  2152. .size = {
  2153. .width = 60,
  2154. .height = 45,
  2155. },
  2156. .bus_format = MEDIA_BUS_FMT_RGB888_3X8,
  2157. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE,
  2158. };
  2159. static const struct display_timing hannstar_hsd070pww1_timing = {
  2160. .pixelclock = { 64300000, 71100000, 82000000 },
  2161. .hactive = { 1280, 1280, 1280 },
  2162. .hfront_porch = { 1, 1, 10 },
  2163. .hback_porch = { 1, 1, 10 },
  2164. /*
  2165. * According to the data sheet, the minimum horizontal blanking interval
  2166. * is 54 clocks (1 + 52 + 1), but tests with a Nitrogen6X have shown the
  2167. * minimum working horizontal blanking interval to be 60 clocks.
  2168. */
  2169. .hsync_len = { 58, 158, 661 },
  2170. .vactive = { 800, 800, 800 },
  2171. .vfront_porch = { 1, 1, 10 },
  2172. .vback_porch = { 1, 1, 10 },
  2173. .vsync_len = { 1, 21, 203 },
  2174. .flags = DISPLAY_FLAGS_DE_HIGH,
  2175. };
  2176. static const struct panel_desc hannstar_hsd070pww1 = {
  2177. .timings = &hannstar_hsd070pww1_timing,
  2178. .num_timings = 1,
  2179. .bpc = 6,
  2180. .size = {
  2181. .width = 151,
  2182. .height = 94,
  2183. },
  2184. .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
  2185. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2186. };
  2187. static const struct display_timing hannstar_hsd100pxn1_timing = {
  2188. .pixelclock = { 55000000, 65000000, 75000000 },
  2189. .hactive = { 1024, 1024, 1024 },
  2190. .hfront_porch = { 40, 40, 40 },
  2191. .hback_porch = { 220, 220, 220 },
  2192. .hsync_len = { 20, 60, 100 },
  2193. .vactive = { 768, 768, 768 },
  2194. .vfront_porch = { 7, 7, 7 },
  2195. .vback_porch = { 21, 21, 21 },
  2196. .vsync_len = { 10, 10, 10 },
  2197. .flags = DISPLAY_FLAGS_DE_HIGH,
  2198. };
  2199. static const struct panel_desc hannstar_hsd100pxn1 = {
  2200. .timings = &hannstar_hsd100pxn1_timing,
  2201. .num_timings = 1,
  2202. .bpc = 6,
  2203. .size = {
  2204. .width = 203,
  2205. .height = 152,
  2206. },
  2207. .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
  2208. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2209. };
  2210. static const struct display_timing hannstar_hsd101pww2_timing = {
  2211. .pixelclock = { 64300000, 71100000, 82000000 },
  2212. .hactive = { 1280, 1280, 1280 },
  2213. .hfront_porch = { 1, 1, 10 },
  2214. .hback_porch = { 1, 1, 10 },
  2215. .hsync_len = { 58, 158, 661 },
  2216. .vactive = { 800, 800, 800 },
  2217. .vfront_porch = { 1, 1, 10 },
  2218. .vback_porch = { 1, 1, 10 },
  2219. .vsync_len = { 1, 21, 203 },
  2220. .flags = DISPLAY_FLAGS_DE_HIGH,
  2221. };
  2222. static const struct panel_desc hannstar_hsd101pww2 = {
  2223. .timings = &hannstar_hsd101pww2_timing,
  2224. .num_timings = 1,
  2225. .bpc = 8,
  2226. .size = {
  2227. .width = 217,
  2228. .height = 136,
  2229. },
  2230. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  2231. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2232. };
  2233. static const struct display_timing hannstar_hsd156juw2_timing = {
  2234. .pixelclock = { 66000000, 72800000, 80500000 },
  2235. .hactive = { 1920, 1920, 1920 },
  2236. .hfront_porch = { 20, 30, 30 },
  2237. .hback_porch = { 20, 30, 30 },
  2238. .hsync_len = { 50, 60, 90 },
  2239. .vactive = { 1080, 1080, 1080 },
  2240. .vfront_porch = { 1, 2, 4 },
  2241. .vback_porch = { 1, 2, 4 },
  2242. .vsync_len = { 3, 40, 80 },
  2243. .flags = DISPLAY_FLAGS_DE_HIGH,
  2244. };
  2245. static const struct panel_desc hannstar_hsd156juw2 = {
  2246. .timings = &hannstar_hsd156juw2_timing,
  2247. .num_timings = 1,
  2248. .bpc = 8,
  2249. .size = {
  2250. .width = 344,
  2251. .height = 194,
  2252. },
  2253. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  2254. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2255. };
  2256. static const struct drm_display_mode hitachi_tx23d38vm0caa_mode = {
  2257. .clock = 33333,
  2258. .hdisplay = 800,
  2259. .hsync_start = 800 + 85,
  2260. .hsync_end = 800 + 85 + 86,
  2261. .htotal = 800 + 85 + 86 + 85,
  2262. .vdisplay = 480,
  2263. .vsync_start = 480 + 16,
  2264. .vsync_end = 480 + 16 + 13,
  2265. .vtotal = 480 + 16 + 13 + 16,
  2266. };
  2267. static const struct panel_desc hitachi_tx23d38vm0caa = {
  2268. .modes = &hitachi_tx23d38vm0caa_mode,
  2269. .num_modes = 1,
  2270. .bpc = 6,
  2271. .size = {
  2272. .width = 195,
  2273. .height = 117,
  2274. },
  2275. .delay = {
  2276. .enable = 160,
  2277. .disable = 160,
  2278. },
  2279. };
  2280. static const struct drm_display_mode innolux_at043tn24_mode = {
  2281. .clock = 9000,
  2282. .hdisplay = 480,
  2283. .hsync_start = 480 + 2,
  2284. .hsync_end = 480 + 2 + 41,
  2285. .htotal = 480 + 2 + 41 + 2,
  2286. .vdisplay = 272,
  2287. .vsync_start = 272 + 2,
  2288. .vsync_end = 272 + 2 + 10,
  2289. .vtotal = 272 + 2 + 10 + 2,
  2290. .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
  2291. };
  2292. static const struct panel_desc innolux_at043tn24 = {
  2293. .modes = &innolux_at043tn24_mode,
  2294. .num_modes = 1,
  2295. .bpc = 8,
  2296. .size = {
  2297. .width = 95,
  2298. .height = 54,
  2299. },
  2300. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  2301. .connector_type = DRM_MODE_CONNECTOR_DPI,
  2302. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
  2303. };
  2304. static const struct drm_display_mode innolux_at070tn92_mode = {
  2305. .clock = 33333,
  2306. .hdisplay = 800,
  2307. .hsync_start = 800 + 210,
  2308. .hsync_end = 800 + 210 + 20,
  2309. .htotal = 800 + 210 + 20 + 46,
  2310. .vdisplay = 480,
  2311. .vsync_start = 480 + 22,
  2312. .vsync_end = 480 + 22 + 10,
  2313. .vtotal = 480 + 22 + 23 + 10,
  2314. };
  2315. static const struct panel_desc innolux_at070tn92 = {
  2316. .modes = &innolux_at070tn92_mode,
  2317. .num_modes = 1,
  2318. .size = {
  2319. .width = 154,
  2320. .height = 86,
  2321. },
  2322. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  2323. };
  2324. static const struct display_timing innolux_g070ace_l01_timing = {
  2325. .pixelclock = { 25200000, 35000000, 35700000 },
  2326. .hactive = { 800, 800, 800 },
  2327. .hfront_porch = { 30, 32, 87 },
  2328. .hback_porch = { 30, 32, 87 },
  2329. .hsync_len = { 1, 1, 1 },
  2330. .vactive = { 480, 480, 480 },
  2331. .vfront_porch = { 3, 3, 3 },
  2332. .vback_porch = { 13, 13, 13 },
  2333. .vsync_len = { 1, 1, 4 },
  2334. .flags = DISPLAY_FLAGS_DE_HIGH,
  2335. };
  2336. static const struct panel_desc innolux_g070ace_l01 = {
  2337. .timings = &innolux_g070ace_l01_timing,
  2338. .num_timings = 1,
  2339. .bpc = 8,
  2340. .size = {
  2341. .width = 152,
  2342. .height = 91,
  2343. },
  2344. .delay = {
  2345. .prepare = 10,
  2346. .enable = 50,
  2347. .disable = 50,
  2348. .unprepare = 500,
  2349. },
  2350. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  2351. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  2352. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2353. };
  2354. static const struct display_timing innolux_g070y2_l01_timing = {
  2355. .pixelclock = { 28000000, 29500000, 32000000 },
  2356. .hactive = { 800, 800, 800 },
  2357. .hfront_porch = { 61, 91, 141 },
  2358. .hback_porch = { 60, 90, 140 },
  2359. .hsync_len = { 12, 12, 12 },
  2360. .vactive = { 480, 480, 480 },
  2361. .vfront_porch = { 4, 9, 30 },
  2362. .vback_porch = { 4, 8, 28 },
  2363. .vsync_len = { 2, 2, 2 },
  2364. .flags = DISPLAY_FLAGS_DE_HIGH,
  2365. };
  2366. static const struct panel_desc innolux_g070y2_l01 = {
  2367. .timings = &innolux_g070y2_l01_timing,
  2368. .num_timings = 1,
  2369. .bpc = 8,
  2370. .size = {
  2371. .width = 152,
  2372. .height = 91,
  2373. },
  2374. .delay = {
  2375. .prepare = 10,
  2376. .enable = 100,
  2377. .disable = 100,
  2378. .unprepare = 800,
  2379. },
  2380. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  2381. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  2382. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2383. };
  2384. static const struct display_timing innolux_g070ace_lh3_timing = {
  2385. .pixelclock = { 25200000, 25400000, 35700000 },
  2386. .hactive = { 800, 800, 800 },
  2387. .hfront_porch = { 30, 32, 87 },
  2388. .hback_porch = { 29, 31, 86 },
  2389. .hsync_len = { 1, 1, 1 },
  2390. .vactive = { 480, 480, 480 },
  2391. .vfront_porch = { 4, 5, 65 },
  2392. .vback_porch = { 3, 4, 65 },
  2393. .vsync_len = { 1, 1, 1 },
  2394. .flags = DISPLAY_FLAGS_DE_HIGH,
  2395. };
  2396. static const struct panel_desc innolux_g070ace_lh3 = {
  2397. .timings = &innolux_g070ace_lh3_timing,
  2398. .num_timings = 1,
  2399. .bpc = 8,
  2400. .size = {
  2401. .width = 152,
  2402. .height = 91,
  2403. },
  2404. .delay = {
  2405. .prepare = 10,
  2406. .enable = 450,
  2407. .disable = 200,
  2408. .unprepare = 510,
  2409. },
  2410. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  2411. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  2412. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2413. };
  2414. static const struct drm_display_mode innolux_g070y2_t02_mode = {
  2415. .clock = 33333,
  2416. .hdisplay = 800,
  2417. .hsync_start = 800 + 210,
  2418. .hsync_end = 800 + 210 + 20,
  2419. .htotal = 800 + 210 + 20 + 46,
  2420. .vdisplay = 480,
  2421. .vsync_start = 480 + 22,
  2422. .vsync_end = 480 + 22 + 10,
  2423. .vtotal = 480 + 22 + 23 + 10,
  2424. };
  2425. static const struct panel_desc innolux_g070y2_t02 = {
  2426. .modes = &innolux_g070y2_t02_mode,
  2427. .num_modes = 1,
  2428. .bpc = 8,
  2429. .size = {
  2430. .width = 152,
  2431. .height = 92,
  2432. },
  2433. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  2434. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
  2435. .connector_type = DRM_MODE_CONNECTOR_DPI,
  2436. };
  2437. static const struct display_timing innolux_g101ice_l01_timing = {
  2438. .pixelclock = { 60400000, 71100000, 74700000 },
  2439. .hactive = { 1280, 1280, 1280 },
  2440. .hfront_porch = { 30, 60, 70 },
  2441. .hback_porch = { 30, 60, 70 },
  2442. .hsync_len = { 22, 40, 60 },
  2443. .vactive = { 800, 800, 800 },
  2444. .vfront_porch = { 3, 8, 14 },
  2445. .vback_porch = { 3, 8, 14 },
  2446. .vsync_len = { 4, 7, 12 },
  2447. .flags = DISPLAY_FLAGS_DE_HIGH,
  2448. };
  2449. static const struct panel_desc innolux_g101ice_l01 = {
  2450. .timings = &innolux_g101ice_l01_timing,
  2451. .num_timings = 1,
  2452. .bpc = 8,
  2453. .size = {
  2454. .width = 217,
  2455. .height = 135,
  2456. },
  2457. .delay = {
  2458. .enable = 200,
  2459. .disable = 200,
  2460. },
  2461. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  2462. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  2463. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2464. };
  2465. static const struct display_timing innolux_g121i1_l01_timing = {
  2466. .pixelclock = { 67450000, 71000000, 74550000 },
  2467. .hactive = { 1280, 1280, 1280 },
  2468. .hfront_porch = { 40, 80, 160 },
  2469. .hback_porch = { 39, 79, 159 },
  2470. .hsync_len = { 1, 1, 1 },
  2471. .vactive = { 800, 800, 800 },
  2472. .vfront_porch = { 5, 11, 100 },
  2473. .vback_porch = { 4, 11, 99 },
  2474. .vsync_len = { 1, 1, 1 },
  2475. };
  2476. static const struct panel_desc innolux_g121i1_l01 = {
  2477. .timings = &innolux_g121i1_l01_timing,
  2478. .num_timings = 1,
  2479. .bpc = 6,
  2480. .size = {
  2481. .width = 261,
  2482. .height = 163,
  2483. },
  2484. .delay = {
  2485. .enable = 200,
  2486. .disable = 20,
  2487. },
  2488. .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
  2489. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2490. };
  2491. static const struct display_timing innolux_g121x1_l03_timings = {
  2492. .pixelclock = { 57500000, 64900000, 74400000 },
  2493. .hactive = { 1024, 1024, 1024 },
  2494. .hfront_porch = { 90, 140, 190 },
  2495. .hback_porch = { 90, 140, 190 },
  2496. .hsync_len = { 36, 40, 60 },
  2497. .vactive = { 768, 768, 768 },
  2498. .vfront_porch = { 2, 15, 30 },
  2499. .vback_porch = { 2, 15, 30 },
  2500. .vsync_len = { 2, 8, 20 },
  2501. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
  2502. };
  2503. static const struct panel_desc innolux_g121x1_l03 = {
  2504. .timings = &innolux_g121x1_l03_timings,
  2505. .num_timings = 1,
  2506. .bpc = 6,
  2507. .size = {
  2508. .width = 246,
  2509. .height = 185,
  2510. },
  2511. .delay = {
  2512. .enable = 200,
  2513. .unprepare = 200,
  2514. .disable = 400,
  2515. },
  2516. .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
  2517. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  2518. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2519. };
  2520. static const struct panel_desc innolux_g121xce_l01 = {
  2521. .timings = &innolux_g121x1_l03_timings,
  2522. .num_timings = 1,
  2523. .bpc = 8,
  2524. .size = {
  2525. .width = 246,
  2526. .height = 185,
  2527. },
  2528. .delay = {
  2529. .enable = 200,
  2530. .unprepare = 200,
  2531. .disable = 400,
  2532. },
  2533. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  2534. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  2535. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2536. };
  2537. static const struct display_timing innolux_g150xge_l05_timing = {
  2538. .pixelclock = { 53350000, 65000000, 80000000 },
  2539. .hactive = { 1024, 1024, 1024 },
  2540. .hfront_porch = { 58, 160, 288 },
  2541. .hback_porch = { 58, 160, 288 },
  2542. .hsync_len = { 1, 1, 1 },
  2543. .vactive = { 768, 768, 768 },
  2544. .vfront_porch = { 6, 19, 216 },
  2545. .vback_porch = { 6, 19, 216 },
  2546. .vsync_len = { 1, 1, 1 },
  2547. .flags = DISPLAY_FLAGS_DE_HIGH,
  2548. };
  2549. static const struct panel_desc innolux_g150xge_l05 = {
  2550. .timings = &innolux_g150xge_l05_timing,
  2551. .num_timings = 1,
  2552. .bpc = 8,
  2553. .size = {
  2554. .width = 304,
  2555. .height = 228,
  2556. },
  2557. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  2558. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  2559. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2560. };
  2561. static const struct display_timing innolux_g156hce_l01_timings = {
  2562. .pixelclock = { 120000000, 141860000, 150000000 },
  2563. .hactive = { 1920, 1920, 1920 },
  2564. .hfront_porch = { 80, 90, 100 },
  2565. .hback_porch = { 80, 90, 100 },
  2566. .hsync_len = { 20, 30, 30 },
  2567. .vactive = { 1080, 1080, 1080 },
  2568. .vfront_porch = { 3, 10, 20 },
  2569. .vback_porch = { 3, 10, 20 },
  2570. .vsync_len = { 4, 10, 10 },
  2571. };
  2572. static const struct panel_desc innolux_g156hce_l01 = {
  2573. .timings = &innolux_g156hce_l01_timings,
  2574. .num_timings = 1,
  2575. .bpc = 8,
  2576. .size = {
  2577. .width = 344,
  2578. .height = 194,
  2579. },
  2580. .delay = {
  2581. .prepare = 1, /* T1+T2 */
  2582. .enable = 450, /* T5 */
  2583. .disable = 200, /* T6 */
  2584. .unprepare = 10, /* T3+T7 */
  2585. },
  2586. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  2587. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  2588. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2589. };
  2590. static const struct drm_display_mode innolux_n156bge_l21_mode = {
  2591. .clock = 69300,
  2592. .hdisplay = 1366,
  2593. .hsync_start = 1366 + 16,
  2594. .hsync_end = 1366 + 16 + 34,
  2595. .htotal = 1366 + 16 + 34 + 50,
  2596. .vdisplay = 768,
  2597. .vsync_start = 768 + 2,
  2598. .vsync_end = 768 + 2 + 6,
  2599. .vtotal = 768 + 2 + 6 + 12,
  2600. };
  2601. static const struct panel_desc innolux_n156bge_l21 = {
  2602. .modes = &innolux_n156bge_l21_mode,
  2603. .num_modes = 1,
  2604. .bpc = 6,
  2605. .size = {
  2606. .width = 344,
  2607. .height = 193,
  2608. },
  2609. .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
  2610. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  2611. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2612. };
  2613. static const struct drm_display_mode innolux_zj070na_01p_mode = {
  2614. .clock = 51501,
  2615. .hdisplay = 1024,
  2616. .hsync_start = 1024 + 128,
  2617. .hsync_end = 1024 + 128 + 64,
  2618. .htotal = 1024 + 128 + 64 + 128,
  2619. .vdisplay = 600,
  2620. .vsync_start = 600 + 16,
  2621. .vsync_end = 600 + 16 + 4,
  2622. .vtotal = 600 + 16 + 4 + 16,
  2623. };
  2624. static const struct panel_desc innolux_zj070na_01p = {
  2625. .modes = &innolux_zj070na_01p_mode,
  2626. .num_modes = 1,
  2627. .bpc = 6,
  2628. .size = {
  2629. .width = 154,
  2630. .height = 90,
  2631. },
  2632. };
  2633. static const struct display_timing jutouch_jt101tm023_timing = {
  2634. .pixelclock = { 66300000, 72400000, 78900000 },
  2635. .hactive = { 1280, 1280, 1280 },
  2636. .hfront_porch = { 12, 72, 132 },
  2637. .hback_porch = { 88, 88, 88 },
  2638. .hsync_len = { 10, 10, 48 },
  2639. .vactive = { 800, 800, 800 },
  2640. .vfront_porch = { 1, 15, 49 },
  2641. .vback_porch = { 23, 23, 23 },
  2642. .vsync_len = { 5, 6, 13 },
  2643. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
  2644. DISPLAY_FLAGS_DE_HIGH,
  2645. };
  2646. static const struct panel_desc jutouch_jt101tm023 = {
  2647. .timings = &jutouch_jt101tm023_timing,
  2648. .num_timings = 1,
  2649. .bpc = 8,
  2650. .size = {
  2651. .width = 217,
  2652. .height = 136,
  2653. },
  2654. .delay = {
  2655. .enable = 50,
  2656. .disable = 50,
  2657. },
  2658. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  2659. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  2660. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2661. };
  2662. static const struct display_timing koe_tx14d24vm1bpa_timing = {
  2663. .pixelclock = { 5580000, 5850000, 6200000 },
  2664. .hactive = { 320, 320, 320 },
  2665. .hfront_porch = { 30, 30, 30 },
  2666. .hback_porch = { 30, 30, 30 },
  2667. .hsync_len = { 1, 5, 17 },
  2668. .vactive = { 240, 240, 240 },
  2669. .vfront_porch = { 6, 6, 6 },
  2670. .vback_porch = { 5, 5, 5 },
  2671. .vsync_len = { 1, 2, 11 },
  2672. .flags = DISPLAY_FLAGS_DE_HIGH,
  2673. };
  2674. static const struct panel_desc koe_tx14d24vm1bpa = {
  2675. .timings = &koe_tx14d24vm1bpa_timing,
  2676. .num_timings = 1,
  2677. .bpc = 6,
  2678. .size = {
  2679. .width = 115,
  2680. .height = 86,
  2681. },
  2682. };
  2683. static const struct display_timing koe_tx26d202vm0bwa_timing = {
  2684. .pixelclock = { 151820000, 156720000, 159780000 },
  2685. .hactive = { 1920, 1920, 1920 },
  2686. .hfront_porch = { 105, 130, 142 },
  2687. .hback_porch = { 45, 70, 82 },
  2688. .hsync_len = { 30, 30, 30 },
  2689. .vactive = { 1200, 1200, 1200},
  2690. .vfront_porch = { 3, 5, 10 },
  2691. .vback_porch = { 2, 5, 10 },
  2692. .vsync_len = { 5, 5, 5 },
  2693. .flags = DISPLAY_FLAGS_DE_HIGH,
  2694. };
  2695. static const struct panel_desc koe_tx26d202vm0bwa = {
  2696. .timings = &koe_tx26d202vm0bwa_timing,
  2697. .num_timings = 1,
  2698. .bpc = 8,
  2699. .size = {
  2700. .width = 217,
  2701. .height = 136,
  2702. },
  2703. .delay = {
  2704. .prepare = 1000,
  2705. .enable = 1000,
  2706. .unprepare = 1000,
  2707. .disable = 1000,
  2708. },
  2709. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  2710. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  2711. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2712. };
  2713. static const struct display_timing koe_tx31d200vm0baa_timing = {
  2714. .pixelclock = { 39600000, 43200000, 48000000 },
  2715. .hactive = { 1280, 1280, 1280 },
  2716. .hfront_porch = { 16, 36, 56 },
  2717. .hback_porch = { 16, 36, 56 },
  2718. .hsync_len = { 8, 8, 8 },
  2719. .vactive = { 480, 480, 480 },
  2720. .vfront_porch = { 6, 21, 33 },
  2721. .vback_porch = { 6, 21, 33 },
  2722. .vsync_len = { 8, 8, 8 },
  2723. .flags = DISPLAY_FLAGS_DE_HIGH,
  2724. };
  2725. static const struct panel_desc koe_tx31d200vm0baa = {
  2726. .timings = &koe_tx31d200vm0baa_timing,
  2727. .num_timings = 1,
  2728. .bpc = 6,
  2729. .size = {
  2730. .width = 292,
  2731. .height = 109,
  2732. },
  2733. .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
  2734. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2735. };
  2736. static const struct display_timing kyo_tcg121xglp_timing = {
  2737. .pixelclock = { 52000000, 65000000, 71000000 },
  2738. .hactive = { 1024, 1024, 1024 },
  2739. .hfront_porch = { 2, 2, 2 },
  2740. .hback_porch = { 2, 2, 2 },
  2741. .hsync_len = { 86, 124, 244 },
  2742. .vactive = { 768, 768, 768 },
  2743. .vfront_porch = { 2, 2, 2 },
  2744. .vback_porch = { 2, 2, 2 },
  2745. .vsync_len = { 6, 34, 73 },
  2746. .flags = DISPLAY_FLAGS_DE_HIGH,
  2747. };
  2748. static const struct panel_desc kyo_tcg121xglp = {
  2749. .timings = &kyo_tcg121xglp_timing,
  2750. .num_timings = 1,
  2751. .bpc = 8,
  2752. .size = {
  2753. .width = 246,
  2754. .height = 184,
  2755. },
  2756. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  2757. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2758. };
  2759. static const struct drm_display_mode lemaker_bl035_rgb_002_mode = {
  2760. .clock = 7000,
  2761. .hdisplay = 320,
  2762. .hsync_start = 320 + 20,
  2763. .hsync_end = 320 + 20 + 30,
  2764. .htotal = 320 + 20 + 30 + 38,
  2765. .vdisplay = 240,
  2766. .vsync_start = 240 + 4,
  2767. .vsync_end = 240 + 4 + 3,
  2768. .vtotal = 240 + 4 + 3 + 15,
  2769. };
  2770. static const struct panel_desc lemaker_bl035_rgb_002 = {
  2771. .modes = &lemaker_bl035_rgb_002_mode,
  2772. .num_modes = 1,
  2773. .size = {
  2774. .width = 70,
  2775. .height = 52,
  2776. },
  2777. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  2778. .bus_flags = DRM_BUS_FLAG_DE_LOW,
  2779. };
  2780. static const struct display_timing lg_lb070wv8_timing = {
  2781. .pixelclock = { 31950000, 33260000, 34600000 },
  2782. .hactive = { 800, 800, 800 },
  2783. .hfront_porch = { 88, 88, 88 },
  2784. .hback_porch = { 88, 88, 88 },
  2785. .hsync_len = { 80, 80, 80 },
  2786. .vactive = { 480, 480, 480 },
  2787. .vfront_porch = { 10, 10, 10 },
  2788. .vback_porch = { 10, 10, 10 },
  2789. .vsync_len = { 25, 25, 25 },
  2790. };
  2791. static const struct panel_desc lg_lb070wv8 = {
  2792. .timings = &lg_lb070wv8_timing,
  2793. .num_timings = 1,
  2794. .bpc = 8,
  2795. .size = {
  2796. .width = 151,
  2797. .height = 91,
  2798. },
  2799. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  2800. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2801. };
  2802. static const struct drm_display_mode lincolntech_lcd185_101ct_mode = {
  2803. .clock = 155127,
  2804. .hdisplay = 1920,
  2805. .hsync_start = 1920 + 128,
  2806. .hsync_end = 1920 + 128 + 20,
  2807. .htotal = 1920 + 128 + 20 + 12,
  2808. .vdisplay = 1200,
  2809. .vsync_start = 1200 + 19,
  2810. .vsync_end = 1200 + 19 + 4,
  2811. .vtotal = 1200 + 19 + 4 + 20,
  2812. };
  2813. static const struct panel_desc lincolntech_lcd185_101ct = {
  2814. .modes = &lincolntech_lcd185_101ct_mode,
  2815. .bpc = 8,
  2816. .num_modes = 1,
  2817. .size = {
  2818. .width = 217,
  2819. .height = 136,
  2820. },
  2821. .delay = {
  2822. .prepare = 50,
  2823. .disable = 50,
  2824. },
  2825. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  2826. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  2827. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2828. };
  2829. static const struct display_timing logictechno_lt161010_2nh_timing = {
  2830. .pixelclock = { 26400000, 33300000, 46800000 },
  2831. .hactive = { 800, 800, 800 },
  2832. .hfront_porch = { 16, 210, 354 },
  2833. .hback_porch = { 46, 46, 46 },
  2834. .hsync_len = { 1, 20, 40 },
  2835. .vactive = { 480, 480, 480 },
  2836. .vfront_porch = { 7, 22, 147 },
  2837. .vback_porch = { 23, 23, 23 },
  2838. .vsync_len = { 1, 10, 20 },
  2839. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
  2840. DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE |
  2841. DISPLAY_FLAGS_SYNC_POSEDGE,
  2842. };
  2843. static const struct panel_desc logictechno_lt161010_2nh = {
  2844. .timings = &logictechno_lt161010_2nh_timing,
  2845. .num_timings = 1,
  2846. .bpc = 6,
  2847. .size = {
  2848. .width = 154,
  2849. .height = 86,
  2850. },
  2851. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  2852. .bus_flags = DRM_BUS_FLAG_DE_HIGH |
  2853. DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
  2854. DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE,
  2855. .connector_type = DRM_MODE_CONNECTOR_DPI,
  2856. };
  2857. static const struct display_timing logictechno_lt170410_2whc_timing = {
  2858. .pixelclock = { 68900000, 71100000, 73400000 },
  2859. .hactive = { 1280, 1280, 1280 },
  2860. .hfront_porch = { 23, 60, 71 },
  2861. .hback_porch = { 23, 60, 71 },
  2862. .hsync_len = { 15, 40, 47 },
  2863. .vactive = { 800, 800, 800 },
  2864. .vfront_porch = { 5, 7, 10 },
  2865. .vback_porch = { 5, 7, 10 },
  2866. .vsync_len = { 6, 9, 12 },
  2867. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
  2868. DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE |
  2869. DISPLAY_FLAGS_SYNC_POSEDGE,
  2870. };
  2871. static const struct panel_desc logictechno_lt170410_2whc = {
  2872. .timings = &logictechno_lt170410_2whc_timing,
  2873. .num_timings = 1,
  2874. .bpc = 8,
  2875. .size = {
  2876. .width = 217,
  2877. .height = 136,
  2878. },
  2879. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  2880. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  2881. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  2882. };
  2883. static const struct drm_display_mode logictechno_lttd800480070_l2rt_mode = {
  2884. .clock = 33000,
  2885. .hdisplay = 800,
  2886. .hsync_start = 800 + 112,
  2887. .hsync_end = 800 + 112 + 3,
  2888. .htotal = 800 + 112 + 3 + 85,
  2889. .vdisplay = 480,
  2890. .vsync_start = 480 + 38,
  2891. .vsync_end = 480 + 38 + 3,
  2892. .vtotal = 480 + 38 + 3 + 29,
  2893. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  2894. };
  2895. static const struct panel_desc logictechno_lttd800480070_l2rt = {
  2896. .modes = &logictechno_lttd800480070_l2rt_mode,
  2897. .num_modes = 1,
  2898. .bpc = 8,
  2899. .size = {
  2900. .width = 154,
  2901. .height = 86,
  2902. },
  2903. .delay = {
  2904. .prepare = 45,
  2905. .enable = 100,
  2906. .disable = 100,
  2907. .unprepare = 45
  2908. },
  2909. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  2910. .bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
  2911. .connector_type = DRM_MODE_CONNECTOR_DPI,
  2912. };
  2913. static const struct drm_display_mode logictechno_lttd800480070_l6wh_rt_mode = {
  2914. .clock = 33000,
  2915. .hdisplay = 800,
  2916. .hsync_start = 800 + 154,
  2917. .hsync_end = 800 + 154 + 3,
  2918. .htotal = 800 + 154 + 3 + 43,
  2919. .vdisplay = 480,
  2920. .vsync_start = 480 + 47,
  2921. .vsync_end = 480 + 47 + 3,
  2922. .vtotal = 480 + 47 + 3 + 20,
  2923. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  2924. };
  2925. static const struct panel_desc logictechno_lttd800480070_l6wh_rt = {
  2926. .modes = &logictechno_lttd800480070_l6wh_rt_mode,
  2927. .num_modes = 1,
  2928. .bpc = 8,
  2929. .size = {
  2930. .width = 154,
  2931. .height = 86,
  2932. },
  2933. .delay = {
  2934. .prepare = 45,
  2935. .enable = 100,
  2936. .disable = 100,
  2937. .unprepare = 45
  2938. },
  2939. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  2940. .bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
  2941. .connector_type = DRM_MODE_CONNECTOR_DPI,
  2942. };
  2943. static const struct drm_display_mode logicpd_type_28_mode = {
  2944. .clock = 9107,
  2945. .hdisplay = 480,
  2946. .hsync_start = 480 + 3,
  2947. .hsync_end = 480 + 3 + 42,
  2948. .htotal = 480 + 3 + 42 + 2,
  2949. .vdisplay = 272,
  2950. .vsync_start = 272 + 2,
  2951. .vsync_end = 272 + 2 + 11,
  2952. .vtotal = 272 + 2 + 11 + 3,
  2953. .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
  2954. };
  2955. static const struct panel_desc logicpd_type_28 = {
  2956. .modes = &logicpd_type_28_mode,
  2957. .num_modes = 1,
  2958. .bpc = 8,
  2959. .size = {
  2960. .width = 105,
  2961. .height = 67,
  2962. },
  2963. .delay = {
  2964. .prepare = 200,
  2965. .enable = 200,
  2966. .unprepare = 200,
  2967. .disable = 200,
  2968. },
  2969. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  2970. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE |
  2971. DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE,
  2972. .connector_type = DRM_MODE_CONNECTOR_DPI,
  2973. };
  2974. static const struct drm_display_mode microtips_mf_101hiebcaf0_c_mode = {
  2975. .clock = 150275,
  2976. .hdisplay = 1920,
  2977. .hsync_start = 1920 + 32,
  2978. .hsync_end = 1920 + 32 + 52,
  2979. .htotal = 1920 + 32 + 52 + 24,
  2980. .vdisplay = 1200,
  2981. .vsync_start = 1200 + 24,
  2982. .vsync_end = 1200 + 24 + 8,
  2983. .vtotal = 1200 + 24 + 8 + 3,
  2984. };
  2985. static const struct panel_desc microtips_mf_101hiebcaf0_c = {
  2986. .modes = &microtips_mf_101hiebcaf0_c_mode,
  2987. .bpc = 8,
  2988. .num_modes = 1,
  2989. .size = {
  2990. .width = 217,
  2991. .height = 136,
  2992. },
  2993. .delay = {
  2994. .prepare = 50,
  2995. .disable = 50,
  2996. },
  2997. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  2998. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  2999. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  3000. };
  3001. static const struct drm_display_mode microtips_mf_103hieb0ga0_mode = {
  3002. .clock = 93301,
  3003. .hdisplay = 1920,
  3004. .hsync_start = 1920 + 72,
  3005. .hsync_end = 1920 + 72 + 72,
  3006. .htotal = 1920 + 72 + 72 + 72,
  3007. .vdisplay = 720,
  3008. .vsync_start = 720 + 3,
  3009. .vsync_end = 720 + 3 + 3,
  3010. .vtotal = 720 + 3 + 3 + 2,
  3011. };
  3012. static const struct panel_desc microtips_mf_103hieb0ga0 = {
  3013. .modes = &microtips_mf_103hieb0ga0_mode,
  3014. .bpc = 8,
  3015. .num_modes = 1,
  3016. .size = {
  3017. .width = 244,
  3018. .height = 92,
  3019. },
  3020. .delay = {
  3021. .prepare = 50,
  3022. .disable = 50,
  3023. },
  3024. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  3025. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  3026. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  3027. };
  3028. static const struct drm_display_mode mitsubishi_aa070mc01_mode = {
  3029. .clock = 30400,
  3030. .hdisplay = 800,
  3031. .hsync_start = 800 + 0,
  3032. .hsync_end = 800 + 1,
  3033. .htotal = 800 + 0 + 1 + 160,
  3034. .vdisplay = 480,
  3035. .vsync_start = 480 + 0,
  3036. .vsync_end = 480 + 48 + 1,
  3037. .vtotal = 480 + 48 + 1 + 0,
  3038. .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
  3039. };
  3040. static const struct panel_desc mitsubishi_aa070mc01 = {
  3041. .modes = &mitsubishi_aa070mc01_mode,
  3042. .num_modes = 1,
  3043. .bpc = 8,
  3044. .size = {
  3045. .width = 152,
  3046. .height = 91,
  3047. },
  3048. .delay = {
  3049. .enable = 200,
  3050. .unprepare = 200,
  3051. .disable = 400,
  3052. },
  3053. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  3054. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  3055. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  3056. };
  3057. static const struct drm_display_mode mitsubishi_aa084xe01_mode = {
  3058. .clock = 56234,
  3059. .hdisplay = 1024,
  3060. .hsync_start = 1024 + 24,
  3061. .hsync_end = 1024 + 24 + 63,
  3062. .htotal = 1024 + 24 + 63 + 1,
  3063. .vdisplay = 768,
  3064. .vsync_start = 768 + 3,
  3065. .vsync_end = 768 + 3 + 6,
  3066. .vtotal = 768 + 3 + 6 + 1,
  3067. .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
  3068. };
  3069. static const struct panel_desc mitsubishi_aa084xe01 = {
  3070. .modes = &mitsubishi_aa084xe01_mode,
  3071. .num_modes = 1,
  3072. .bpc = 8,
  3073. .size = {
  3074. .width = 1024,
  3075. .height = 768,
  3076. },
  3077. .bus_format = MEDIA_BUS_FMT_RGB565_1X16,
  3078. .connector_type = DRM_MODE_CONNECTOR_DPI,
  3079. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
  3080. };
  3081. static const struct display_timing multi_inno_mi0700a2t_30_timing = {
  3082. .pixelclock = { 26400000, 33000000, 46800000 },
  3083. .hactive = { 800, 800, 800 },
  3084. .hfront_porch = { 16, 204, 354 },
  3085. .hback_porch = { 46, 46, 46 },
  3086. .hsync_len = { 1, 6, 40 },
  3087. .vactive = { 480, 480, 480 },
  3088. .vfront_porch = { 7, 22, 147 },
  3089. .vback_porch = { 23, 23, 23 },
  3090. .vsync_len = { 1, 3, 20 },
  3091. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
  3092. DISPLAY_FLAGS_DE_HIGH,
  3093. };
  3094. static const struct panel_desc multi_inno_mi0700a2t_30 = {
  3095. .timings = &multi_inno_mi0700a2t_30_timing,
  3096. .num_timings = 1,
  3097. .bpc = 6,
  3098. .size = {
  3099. .width = 153,
  3100. .height = 92,
  3101. },
  3102. .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
  3103. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  3104. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  3105. };
  3106. static const struct display_timing multi_inno_mi0700s4t_6_timing = {
  3107. .pixelclock = { 29000000, 33000000, 38000000 },
  3108. .hactive = { 800, 800, 800 },
  3109. .hfront_porch = { 180, 210, 240 },
  3110. .hback_porch = { 16, 16, 16 },
  3111. .hsync_len = { 30, 30, 30 },
  3112. .vactive = { 480, 480, 480 },
  3113. .vfront_porch = { 12, 22, 32 },
  3114. .vback_porch = { 10, 10, 10 },
  3115. .vsync_len = { 13, 13, 13 },
  3116. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
  3117. DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE |
  3118. DISPLAY_FLAGS_SYNC_POSEDGE,
  3119. };
  3120. static const struct panel_desc multi_inno_mi0700s4t_6 = {
  3121. .timings = &multi_inno_mi0700s4t_6_timing,
  3122. .num_timings = 1,
  3123. .bpc = 8,
  3124. .size = {
  3125. .width = 154,
  3126. .height = 86,
  3127. },
  3128. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  3129. .bus_flags = DRM_BUS_FLAG_DE_HIGH |
  3130. DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
  3131. DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE,
  3132. .connector_type = DRM_MODE_CONNECTOR_DPI,
  3133. };
  3134. static const struct display_timing multi_inno_mi0800ft_9_timing = {
  3135. .pixelclock = { 32000000, 40000000, 50000000 },
  3136. .hactive = { 800, 800, 800 },
  3137. .hfront_porch = { 16, 210, 354 },
  3138. .hback_porch = { 6, 26, 45 },
  3139. .hsync_len = { 1, 20, 40 },
  3140. .vactive = { 600, 600, 600 },
  3141. .vfront_porch = { 1, 12, 77 },
  3142. .vback_porch = { 3, 13, 22 },
  3143. .vsync_len = { 1, 10, 20 },
  3144. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
  3145. DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE |
  3146. DISPLAY_FLAGS_SYNC_POSEDGE,
  3147. };
  3148. static const struct panel_desc multi_inno_mi0800ft_9 = {
  3149. .timings = &multi_inno_mi0800ft_9_timing,
  3150. .num_timings = 1,
  3151. .bpc = 8,
  3152. .size = {
  3153. .width = 162,
  3154. .height = 122,
  3155. },
  3156. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  3157. .bus_flags = DRM_BUS_FLAG_DE_HIGH |
  3158. DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
  3159. DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE,
  3160. .connector_type = DRM_MODE_CONNECTOR_DPI,
  3161. };
  3162. static const struct display_timing multi_inno_mi1010ait_1cp_timing = {
  3163. .pixelclock = { 68900000, 70000000, 73400000 },
  3164. .hactive = { 1280, 1280, 1280 },
  3165. .hfront_porch = { 30, 60, 71 },
  3166. .hback_porch = { 30, 60, 71 },
  3167. .hsync_len = { 10, 10, 48 },
  3168. .vactive = { 800, 800, 800 },
  3169. .vfront_porch = { 5, 10, 10 },
  3170. .vback_porch = { 5, 10, 10 },
  3171. .vsync_len = { 5, 6, 13 },
  3172. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
  3173. DISPLAY_FLAGS_DE_HIGH,
  3174. };
  3175. static const struct panel_desc multi_inno_mi1010ait_1cp = {
  3176. .timings = &multi_inno_mi1010ait_1cp_timing,
  3177. .num_timings = 1,
  3178. .bpc = 8,
  3179. .size = {
  3180. .width = 217,
  3181. .height = 136,
  3182. },
  3183. .delay = {
  3184. .enable = 50,
  3185. .disable = 50,
  3186. },
  3187. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  3188. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  3189. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  3190. };
  3191. static const struct display_timing multi_inno_mi1010z1t_1cp11_timing = {
  3192. .pixelclock = { 40800000, 51200000, 67200000 },
  3193. .hactive = { 1024, 1024, 1024 },
  3194. .hfront_porch = { 30, 110, 130 },
  3195. .hback_porch = { 30, 110, 130 },
  3196. .hsync_len = { 30, 100, 116 },
  3197. .vactive = { 600, 600, 600 },
  3198. .vfront_porch = { 4, 13, 80 },
  3199. .vback_porch = { 4, 13, 80 },
  3200. .vsync_len = { 2, 9, 40 },
  3201. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
  3202. DISPLAY_FLAGS_DE_HIGH,
  3203. };
  3204. static const struct panel_desc multi_inno_mi1010z1t_1cp11 = {
  3205. .timings = &multi_inno_mi1010z1t_1cp11_timing,
  3206. .num_timings = 1,
  3207. .bpc = 6,
  3208. .size = {
  3209. .width = 260,
  3210. .height = 162,
  3211. },
  3212. .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
  3213. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  3214. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  3215. };
  3216. static const struct display_timing nec_nl12880bc20_05_timing = {
  3217. .pixelclock = { 67000000, 71000000, 75000000 },
  3218. .hactive = { 1280, 1280, 1280 },
  3219. .hfront_porch = { 2, 30, 30 },
  3220. .hback_porch = { 6, 100, 100 },
  3221. .hsync_len = { 2, 30, 30 },
  3222. .vactive = { 800, 800, 800 },
  3223. .vfront_porch = { 5, 5, 5 },
  3224. .vback_porch = { 11, 11, 11 },
  3225. .vsync_len = { 7, 7, 7 },
  3226. };
  3227. static const struct panel_desc nec_nl12880bc20_05 = {
  3228. .timings = &nec_nl12880bc20_05_timing,
  3229. .num_timings = 1,
  3230. .bpc = 8,
  3231. .size = {
  3232. .width = 261,
  3233. .height = 163,
  3234. },
  3235. .delay = {
  3236. .enable = 50,
  3237. .disable = 50,
  3238. },
  3239. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  3240. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  3241. };
  3242. static const struct drm_display_mode nec_nl4827hc19_05b_mode = {
  3243. .clock = 10870,
  3244. .hdisplay = 480,
  3245. .hsync_start = 480 + 2,
  3246. .hsync_end = 480 + 2 + 41,
  3247. .htotal = 480 + 2 + 41 + 2,
  3248. .vdisplay = 272,
  3249. .vsync_start = 272 + 2,
  3250. .vsync_end = 272 + 2 + 4,
  3251. .vtotal = 272 + 2 + 4 + 2,
  3252. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  3253. };
  3254. static const struct panel_desc nec_nl4827hc19_05b = {
  3255. .modes = &nec_nl4827hc19_05b_mode,
  3256. .num_modes = 1,
  3257. .bpc = 8,
  3258. .size = {
  3259. .width = 95,
  3260. .height = 54,
  3261. },
  3262. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  3263. .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
  3264. };
  3265. static const struct drm_display_mode netron_dy_e231732_mode = {
  3266. .clock = 66000,
  3267. .hdisplay = 1024,
  3268. .hsync_start = 1024 + 160,
  3269. .hsync_end = 1024 + 160 + 70,
  3270. .htotal = 1024 + 160 + 70 + 90,
  3271. .vdisplay = 600,
  3272. .vsync_start = 600 + 127,
  3273. .vsync_end = 600 + 127 + 20,
  3274. .vtotal = 600 + 127 + 20 + 3,
  3275. };
  3276. static const struct panel_desc netron_dy_e231732 = {
  3277. .modes = &netron_dy_e231732_mode,
  3278. .num_modes = 1,
  3279. .size = {
  3280. .width = 154,
  3281. .height = 87,
  3282. },
  3283. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  3284. };
  3285. static const struct drm_display_mode newhaven_nhd_43_480272ef_atxl_mode = {
  3286. .clock = 9000,
  3287. .hdisplay = 480,
  3288. .hsync_start = 480 + 2,
  3289. .hsync_end = 480 + 2 + 41,
  3290. .htotal = 480 + 2 + 41 + 2,
  3291. .vdisplay = 272,
  3292. .vsync_start = 272 + 2,
  3293. .vsync_end = 272 + 2 + 10,
  3294. .vtotal = 272 + 2 + 10 + 2,
  3295. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  3296. };
  3297. static const struct panel_desc newhaven_nhd_43_480272ef_atxl = {
  3298. .modes = &newhaven_nhd_43_480272ef_atxl_mode,
  3299. .num_modes = 1,
  3300. .bpc = 8,
  3301. .size = {
  3302. .width = 95,
  3303. .height = 54,
  3304. },
  3305. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  3306. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE |
  3307. DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
  3308. .connector_type = DRM_MODE_CONNECTOR_DPI,
  3309. };
  3310. static const struct drm_display_mode nlt_nl13676bc25_03f_mode = {
  3311. .clock = 75400,
  3312. .hdisplay = 1366,
  3313. .hsync_start = 1366 + 14,
  3314. .hsync_end = 1366 + 14 + 56,
  3315. .htotal = 1366 + 14 + 56 + 64,
  3316. .vdisplay = 768,
  3317. .vsync_start = 768 + 1,
  3318. .vsync_end = 768 + 1 + 3,
  3319. .vtotal = 768 + 1 + 3 + 22,
  3320. };
  3321. static const struct panel_desc nlt_nl13676bc25_03f = {
  3322. .modes = &nlt_nl13676bc25_03f_mode,
  3323. .num_modes = 1,
  3324. .bpc = 8,
  3325. .size = {
  3326. .width = 363,
  3327. .height = 215,
  3328. },
  3329. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  3330. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  3331. };
  3332. static const struct display_timing nlt_nl192108ac18_02d_timing = {
  3333. .pixelclock = { 130000000, 148350000, 163000000 },
  3334. .hactive = { 1920, 1920, 1920 },
  3335. .hfront_porch = { 80, 100, 100 },
  3336. .hback_porch = { 100, 120, 120 },
  3337. .hsync_len = { 50, 60, 60 },
  3338. .vactive = { 1080, 1080, 1080 },
  3339. .vfront_porch = { 12, 30, 30 },
  3340. .vback_porch = { 4, 10, 10 },
  3341. .vsync_len = { 4, 5, 5 },
  3342. };
  3343. static const struct panel_desc nlt_nl192108ac18_02d = {
  3344. .timings = &nlt_nl192108ac18_02d_timing,
  3345. .num_timings = 1,
  3346. .bpc = 8,
  3347. .size = {
  3348. .width = 344,
  3349. .height = 194,
  3350. },
  3351. .delay = {
  3352. .unprepare = 500,
  3353. },
  3354. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  3355. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  3356. };
  3357. static const struct drm_display_mode nvd_9128_mode = {
  3358. .clock = 29500,
  3359. .hdisplay = 800,
  3360. .hsync_start = 800 + 130,
  3361. .hsync_end = 800 + 130 + 98,
  3362. .htotal = 800 + 0 + 130 + 98,
  3363. .vdisplay = 480,
  3364. .vsync_start = 480 + 10,
  3365. .vsync_end = 480 + 10 + 50,
  3366. .vtotal = 480 + 0 + 10 + 50,
  3367. };
  3368. static const struct panel_desc nvd_9128 = {
  3369. .modes = &nvd_9128_mode,
  3370. .num_modes = 1,
  3371. .bpc = 8,
  3372. .size = {
  3373. .width = 156,
  3374. .height = 88,
  3375. },
  3376. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  3377. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  3378. };
  3379. static const struct display_timing okaya_rs800480t_7x0gp_timing = {
  3380. .pixelclock = { 30000000, 30000000, 40000000 },
  3381. .hactive = { 800, 800, 800 },
  3382. .hfront_porch = { 40, 40, 40 },
  3383. .hback_porch = { 40, 40, 40 },
  3384. .hsync_len = { 1, 48, 48 },
  3385. .vactive = { 480, 480, 480 },
  3386. .vfront_porch = { 13, 13, 13 },
  3387. .vback_porch = { 29, 29, 29 },
  3388. .vsync_len = { 3, 3, 3 },
  3389. .flags = DISPLAY_FLAGS_DE_HIGH,
  3390. };
  3391. static const struct panel_desc okaya_rs800480t_7x0gp = {
  3392. .timings = &okaya_rs800480t_7x0gp_timing,
  3393. .num_timings = 1,
  3394. .bpc = 6,
  3395. .size = {
  3396. .width = 154,
  3397. .height = 87,
  3398. },
  3399. .delay = {
  3400. .prepare = 41,
  3401. .enable = 50,
  3402. .unprepare = 41,
  3403. .disable = 50,
  3404. },
  3405. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  3406. };
  3407. static const struct drm_display_mode olimex_lcd_olinuxino_43ts_mode = {
  3408. .clock = 9000,
  3409. .hdisplay = 480,
  3410. .hsync_start = 480 + 5,
  3411. .hsync_end = 480 + 5 + 30,
  3412. .htotal = 480 + 5 + 30 + 10,
  3413. .vdisplay = 272,
  3414. .vsync_start = 272 + 8,
  3415. .vsync_end = 272 + 8 + 5,
  3416. .vtotal = 272 + 8 + 5 + 3,
  3417. };
  3418. static const struct panel_desc olimex_lcd_olinuxino_43ts = {
  3419. .modes = &olimex_lcd_olinuxino_43ts_mode,
  3420. .num_modes = 1,
  3421. .size = {
  3422. .width = 95,
  3423. .height = 54,
  3424. },
  3425. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  3426. };
  3427. static const struct drm_display_mode olimex_lcd_olinuxino_5cts_mode = {
  3428. .clock = 33300,
  3429. .hdisplay = 800,
  3430. .hsync_start = 800 + 210,
  3431. .hsync_end = 800 + 210 + 20,
  3432. .htotal = 800 + 210 + 20 + 26,
  3433. .vdisplay = 480,
  3434. .vsync_start = 480 + 22,
  3435. .vsync_end = 480 + 22 + 10,
  3436. .vtotal = 480 + 22 + 10 + 13,
  3437. };
  3438. static const struct panel_desc olimex_lcd_olinuxino_5cts = {
  3439. .modes = &olimex_lcd_olinuxino_5cts_mode,
  3440. .num_modes = 1,
  3441. .size = {
  3442. .width = 154,
  3443. .height = 86,
  3444. },
  3445. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  3446. };
  3447. static const struct display_timing ontat_kd50g21_40nt_a1_timing = {
  3448. .pixelclock = { 30000000, 30000000, 50000000 },
  3449. .hactive = { 800, 800, 800 },
  3450. .hfront_porch = { 1, 40, 255 },
  3451. .hback_porch = { 1, 40, 87 },
  3452. .hsync_len = { 1, 48, 87 },
  3453. .vactive = { 480, 480, 480 },
  3454. .vfront_porch = { 1, 13, 255 },
  3455. .vback_porch = { 1, 29, 29 },
  3456. .vsync_len = { 3, 3, 31 },
  3457. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
  3458. DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
  3459. };
  3460. static const struct panel_desc ontat_kd50g21_40nt_a1 = {
  3461. .timings = &ontat_kd50g21_40nt_a1_timing,
  3462. .num_timings = 1,
  3463. .bpc = 8,
  3464. .size = {
  3465. .width = 108,
  3466. .height = 65,
  3467. },
  3468. .delay = {
  3469. .prepare = 147, /* 5 VSDs */
  3470. .enable = 147, /* 5 VSDs */
  3471. .disable = 88, /* 3 VSDs */
  3472. .unprepare = 117, /* 4 VSDs */
  3473. },
  3474. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  3475. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
  3476. .connector_type = DRM_MODE_CONNECTOR_DPI,
  3477. };
  3478. /*
  3479. * 800x480 CVT. The panel appears to be quite accepting, at least as far as
  3480. * pixel clocks, but this is the timing that was being used in the Adafruit
  3481. * installation instructions.
  3482. */
  3483. static const struct drm_display_mode ontat_yx700wv03_mode = {
  3484. .clock = 29500,
  3485. .hdisplay = 800,
  3486. .hsync_start = 824,
  3487. .hsync_end = 896,
  3488. .htotal = 992,
  3489. .vdisplay = 480,
  3490. .vsync_start = 483,
  3491. .vsync_end = 493,
  3492. .vtotal = 500,
  3493. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  3494. };
  3495. /*
  3496. * Specification at:
  3497. * https://www.adafruit.com/images/product-files/2406/c3163.pdf
  3498. */
  3499. static const struct panel_desc ontat_yx700wv03 = {
  3500. .modes = &ontat_yx700wv03_mode,
  3501. .num_modes = 1,
  3502. .bpc = 8,
  3503. .size = {
  3504. .width = 154,
  3505. .height = 83,
  3506. },
  3507. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  3508. };
  3509. static const struct drm_display_mode ortustech_com37h3m_mode = {
  3510. .clock = 22230,
  3511. .hdisplay = 480,
  3512. .hsync_start = 480 + 40,
  3513. .hsync_end = 480 + 40 + 10,
  3514. .htotal = 480 + 40 + 10 + 40,
  3515. .vdisplay = 640,
  3516. .vsync_start = 640 + 4,
  3517. .vsync_end = 640 + 4 + 2,
  3518. .vtotal = 640 + 4 + 2 + 4,
  3519. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  3520. };
  3521. static const struct panel_desc ortustech_com37h3m = {
  3522. .modes = &ortustech_com37h3m_mode,
  3523. .num_modes = 1,
  3524. .bpc = 8,
  3525. .size = {
  3526. .width = 56, /* 56.16mm */
  3527. .height = 75, /* 74.88mm */
  3528. },
  3529. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  3530. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
  3531. DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
  3532. };
  3533. static const struct drm_display_mode ortustech_com43h4m85ulc_mode = {
  3534. .clock = 25000,
  3535. .hdisplay = 480,
  3536. .hsync_start = 480 + 10,
  3537. .hsync_end = 480 + 10 + 10,
  3538. .htotal = 480 + 10 + 10 + 15,
  3539. .vdisplay = 800,
  3540. .vsync_start = 800 + 3,
  3541. .vsync_end = 800 + 3 + 3,
  3542. .vtotal = 800 + 3 + 3 + 3,
  3543. };
  3544. static const struct panel_desc ortustech_com43h4m85ulc = {
  3545. .modes = &ortustech_com43h4m85ulc_mode,
  3546. .num_modes = 1,
  3547. .bpc = 6,
  3548. .size = {
  3549. .width = 56,
  3550. .height = 93,
  3551. },
  3552. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  3553. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
  3554. .connector_type = DRM_MODE_CONNECTOR_DPI,
  3555. };
  3556. static const struct drm_display_mode osddisplays_osd070t1718_19ts_mode = {
  3557. .clock = 33000,
  3558. .hdisplay = 800,
  3559. .hsync_start = 800 + 210,
  3560. .hsync_end = 800 + 210 + 30,
  3561. .htotal = 800 + 210 + 30 + 16,
  3562. .vdisplay = 480,
  3563. .vsync_start = 480 + 22,
  3564. .vsync_end = 480 + 22 + 13,
  3565. .vtotal = 480 + 22 + 13 + 10,
  3566. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  3567. };
  3568. static const struct panel_desc osddisplays_osd070t1718_19ts = {
  3569. .modes = &osddisplays_osd070t1718_19ts_mode,
  3570. .num_modes = 1,
  3571. .bpc = 8,
  3572. .size = {
  3573. .width = 152,
  3574. .height = 91,
  3575. },
  3576. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  3577. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE |
  3578. DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
  3579. .connector_type = DRM_MODE_CONNECTOR_DPI,
  3580. };
  3581. static const struct drm_display_mode pda_91_00156_a0_mode = {
  3582. .clock = 33300,
  3583. .hdisplay = 800,
  3584. .hsync_start = 800 + 1,
  3585. .hsync_end = 800 + 1 + 64,
  3586. .htotal = 800 + 1 + 64 + 64,
  3587. .vdisplay = 480,
  3588. .vsync_start = 480 + 1,
  3589. .vsync_end = 480 + 1 + 23,
  3590. .vtotal = 480 + 1 + 23 + 22,
  3591. };
  3592. static const struct panel_desc pda_91_00156_a0 = {
  3593. .modes = &pda_91_00156_a0_mode,
  3594. .num_modes = 1,
  3595. .size = {
  3596. .width = 152,
  3597. .height = 91,
  3598. },
  3599. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  3600. };
  3601. static const struct drm_display_mode powertip_ph128800t004_zza01_mode = {
  3602. .clock = 71150,
  3603. .hdisplay = 1280,
  3604. .hsync_start = 1280 + 48,
  3605. .hsync_end = 1280 + 48 + 32,
  3606. .htotal = 1280 + 48 + 32 + 80,
  3607. .vdisplay = 800,
  3608. .vsync_start = 800 + 9,
  3609. .vsync_end = 800 + 9 + 8,
  3610. .vtotal = 800 + 9 + 8 + 6,
  3611. .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
  3612. };
  3613. static const struct panel_desc powertip_ph128800t004_zza01 = {
  3614. .modes = &powertip_ph128800t004_zza01_mode,
  3615. .num_modes = 1,
  3616. .bpc = 8,
  3617. .size = {
  3618. .width = 216,
  3619. .height = 135,
  3620. },
  3621. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  3622. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  3623. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  3624. };
  3625. static const struct drm_display_mode powertip_ph128800t006_zhc01_mode = {
  3626. .clock = 66500,
  3627. .hdisplay = 1280,
  3628. .hsync_start = 1280 + 12,
  3629. .hsync_end = 1280 + 12 + 20,
  3630. .htotal = 1280 + 12 + 20 + 56,
  3631. .vdisplay = 800,
  3632. .vsync_start = 800 + 1,
  3633. .vsync_end = 800 + 1 + 3,
  3634. .vtotal = 800 + 1 + 3 + 20,
  3635. .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
  3636. };
  3637. static const struct panel_desc powertip_ph128800t006_zhc01 = {
  3638. .modes = &powertip_ph128800t006_zhc01_mode,
  3639. .num_modes = 1,
  3640. .bpc = 8,
  3641. .size = {
  3642. .width = 216,
  3643. .height = 135,
  3644. },
  3645. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  3646. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  3647. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  3648. };
  3649. static const struct drm_display_mode powertip_ph800480t013_idf02_mode = {
  3650. .clock = 24750,
  3651. .hdisplay = 800,
  3652. .hsync_start = 800 + 54,
  3653. .hsync_end = 800 + 54 + 2,
  3654. .htotal = 800 + 54 + 2 + 44,
  3655. .vdisplay = 480,
  3656. .vsync_start = 480 + 49,
  3657. .vsync_end = 480 + 49 + 2,
  3658. .vtotal = 480 + 49 + 2 + 22,
  3659. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  3660. };
  3661. static const struct panel_desc powertip_ph800480t013_idf02 = {
  3662. .modes = &powertip_ph800480t013_idf02_mode,
  3663. .num_modes = 1,
  3664. .bpc = 8,
  3665. .size = {
  3666. .width = 152,
  3667. .height = 91,
  3668. },
  3669. .bus_flags = DRM_BUS_FLAG_DE_HIGH |
  3670. DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
  3671. DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE,
  3672. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  3673. .connector_type = DRM_MODE_CONNECTOR_DPI,
  3674. };
  3675. static const struct drm_display_mode primeview_pm070wl4_mode = {
  3676. .clock = 32000,
  3677. .hdisplay = 800,
  3678. .hsync_start = 800 + 42,
  3679. .hsync_end = 800 + 42 + 128,
  3680. .htotal = 800 + 42 + 128 + 86,
  3681. .vdisplay = 480,
  3682. .vsync_start = 480 + 10,
  3683. .vsync_end = 480 + 10 + 2,
  3684. .vtotal = 480 + 10 + 2 + 33,
  3685. .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
  3686. };
  3687. static const struct panel_desc primeview_pm070wl4 = {
  3688. .modes = &primeview_pm070wl4_mode,
  3689. .num_modes = 1,
  3690. .bpc = 6,
  3691. .size = {
  3692. .width = 152,
  3693. .height = 91,
  3694. },
  3695. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE,
  3696. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  3697. .connector_type = DRM_MODE_CONNECTOR_DPI,
  3698. };
  3699. static const struct drm_display_mode qd43003c0_40_mode = {
  3700. .clock = 9000,
  3701. .hdisplay = 480,
  3702. .hsync_start = 480 + 8,
  3703. .hsync_end = 480 + 8 + 4,
  3704. .htotal = 480 + 8 + 4 + 39,
  3705. .vdisplay = 272,
  3706. .vsync_start = 272 + 4,
  3707. .vsync_end = 272 + 4 + 10,
  3708. .vtotal = 272 + 4 + 10 + 2,
  3709. };
  3710. static const struct panel_desc qd43003c0_40 = {
  3711. .modes = &qd43003c0_40_mode,
  3712. .num_modes = 1,
  3713. .bpc = 8,
  3714. .size = {
  3715. .width = 95,
  3716. .height = 53,
  3717. },
  3718. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  3719. };
  3720. static const struct drm_display_mode qishenglong_gopher2b_lcd_modes[] = {
  3721. { /* 60 Hz */
  3722. .clock = 10800,
  3723. .hdisplay = 480,
  3724. .hsync_start = 480 + 77,
  3725. .hsync_end = 480 + 77 + 41,
  3726. .htotal = 480 + 77 + 41 + 2,
  3727. .vdisplay = 272,
  3728. .vsync_start = 272 + 16,
  3729. .vsync_end = 272 + 16 + 10,
  3730. .vtotal = 272 + 16 + 10 + 2,
  3731. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  3732. },
  3733. { /* 50 Hz */
  3734. .clock = 10800,
  3735. .hdisplay = 480,
  3736. .hsync_start = 480 + 17,
  3737. .hsync_end = 480 + 17 + 41,
  3738. .htotal = 480 + 17 + 41 + 2,
  3739. .vdisplay = 272,
  3740. .vsync_start = 272 + 116,
  3741. .vsync_end = 272 + 116 + 10,
  3742. .vtotal = 272 + 116 + 10 + 2,
  3743. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  3744. },
  3745. };
  3746. static const struct panel_desc qishenglong_gopher2b_lcd = {
  3747. .modes = qishenglong_gopher2b_lcd_modes,
  3748. .num_modes = ARRAY_SIZE(qishenglong_gopher2b_lcd_modes),
  3749. .bpc = 8,
  3750. .size = {
  3751. .width = 95,
  3752. .height = 54,
  3753. },
  3754. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  3755. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
  3756. .connector_type = DRM_MODE_CONNECTOR_DPI,
  3757. };
  3758. static const struct display_timing raystar_rff500f_awh_dnn_timing = {
  3759. .pixelclock = { 23000000, 25000000, 27000000 },
  3760. .hactive = { 800, 800, 800 },
  3761. .hback_porch = { 4, 8, 48 },
  3762. .hfront_porch = { 4, 8, 48 },
  3763. .hsync_len = { 2, 4, 8 },
  3764. .vactive = { 480, 480, 480 },
  3765. .vback_porch = { 4, 8, 12 },
  3766. .vfront_porch = { 4, 8, 12 },
  3767. .vsync_len = { 2, 4, 8 },
  3768. };
  3769. static const struct panel_desc raystar_rff500f_awh_dnn = {
  3770. .timings = &raystar_rff500f_awh_dnn_timing,
  3771. .num_timings = 1,
  3772. .bpc = 8,
  3773. .size = {
  3774. .width = 108,
  3775. .height = 65,
  3776. },
  3777. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  3778. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  3779. };
  3780. static const struct display_timing rocktech_rk043fn48h_timing = {
  3781. .pixelclock = { 6000000, 9000000, 12000000 },
  3782. .hactive = { 480, 480, 480 },
  3783. .hback_porch = { 8, 43, 43 },
  3784. .hfront_porch = { 2, 8, 10 },
  3785. .hsync_len = { 1, 1, 1 },
  3786. .vactive = { 272, 272, 272 },
  3787. .vback_porch = { 2, 12, 26 },
  3788. .vfront_porch = { 1, 4, 4 },
  3789. .vsync_len = { 1, 10, 10 },
  3790. .flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW |
  3791. DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE |
  3792. DISPLAY_FLAGS_SYNC_POSEDGE,
  3793. };
  3794. static const struct panel_desc rocktech_rk043fn48h = {
  3795. .timings = &rocktech_rk043fn48h_timing,
  3796. .num_timings = 1,
  3797. .bpc = 8,
  3798. .size = {
  3799. .width = 95,
  3800. .height = 54,
  3801. },
  3802. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  3803. .connector_type = DRM_MODE_CONNECTOR_DPI,
  3804. };
  3805. static const struct display_timing rocktech_rk070er9427_timing = {
  3806. .pixelclock = { 26400000, 33300000, 46800000 },
  3807. .hactive = { 800, 800, 800 },
  3808. .hfront_porch = { 16, 210, 354 },
  3809. .hback_porch = { 46, 46, 46 },
  3810. .hsync_len = { 1, 1, 1 },
  3811. .vactive = { 480, 480, 480 },
  3812. .vfront_porch = { 7, 22, 147 },
  3813. .vback_porch = { 23, 23, 23 },
  3814. .vsync_len = { 1, 1, 1 },
  3815. .flags = DISPLAY_FLAGS_DE_HIGH,
  3816. };
  3817. static const struct panel_desc rocktech_rk070er9427 = {
  3818. .timings = &rocktech_rk070er9427_timing,
  3819. .num_timings = 1,
  3820. .bpc = 6,
  3821. .size = {
  3822. .width = 154,
  3823. .height = 86,
  3824. },
  3825. .delay = {
  3826. .prepare = 41,
  3827. .enable = 50,
  3828. .unprepare = 41,
  3829. .disable = 50,
  3830. },
  3831. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  3832. };
  3833. static const struct drm_display_mode rocktech_rk101ii01d_ct_mode = {
  3834. .clock = 71100,
  3835. .hdisplay = 1280,
  3836. .hsync_start = 1280 + 48,
  3837. .hsync_end = 1280 + 48 + 32,
  3838. .htotal = 1280 + 48 + 32 + 80,
  3839. .vdisplay = 800,
  3840. .vsync_start = 800 + 2,
  3841. .vsync_end = 800 + 2 + 5,
  3842. .vtotal = 800 + 2 + 5 + 16,
  3843. };
  3844. static const struct panel_desc rocktech_rk101ii01d_ct = {
  3845. .modes = &rocktech_rk101ii01d_ct_mode,
  3846. .bpc = 8,
  3847. .num_modes = 1,
  3848. .size = {
  3849. .width = 217,
  3850. .height = 136,
  3851. },
  3852. .delay = {
  3853. .prepare = 50,
  3854. .disable = 50,
  3855. },
  3856. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  3857. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  3858. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  3859. };
  3860. static const struct display_timing samsung_ltl101al01_timing = {
  3861. .pixelclock = { 66663000, 66663000, 66663000 },
  3862. .hactive = { 1280, 1280, 1280 },
  3863. .hfront_porch = { 18, 18, 18 },
  3864. .hback_porch = { 36, 36, 36 },
  3865. .hsync_len = { 16, 16, 16 },
  3866. .vactive = { 800, 800, 800 },
  3867. .vfront_porch = { 4, 4, 4 },
  3868. .vback_porch = { 16, 16, 16 },
  3869. .vsync_len = { 3, 3, 3 },
  3870. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
  3871. };
  3872. static const struct panel_desc samsung_ltl101al01 = {
  3873. .timings = &samsung_ltl101al01_timing,
  3874. .num_timings = 1,
  3875. .bpc = 8,
  3876. .size = {
  3877. .width = 217,
  3878. .height = 135,
  3879. },
  3880. .delay = {
  3881. .prepare = 40,
  3882. .enable = 300,
  3883. .disable = 200,
  3884. .unprepare = 600,
  3885. },
  3886. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  3887. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  3888. };
  3889. static const struct display_timing samsung_ltl106al01_timing = {
  3890. .pixelclock = { 71980000, 71980000, 71980000 },
  3891. .hactive = { 1366, 1366, 1366 },
  3892. .hfront_porch = { 56, 56, 56 },
  3893. .hback_porch = { 106, 106, 106 },
  3894. .hsync_len = { 14, 14, 14 },
  3895. .vactive = { 768, 768, 768 },
  3896. .vfront_porch = { 3, 3, 3 },
  3897. .vback_porch = { 6, 6, 6 },
  3898. .vsync_len = { 1, 1, 1 },
  3899. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
  3900. };
  3901. static const struct panel_desc samsung_ltl106al01 = {
  3902. .timings = &samsung_ltl106al01_timing,
  3903. .num_timings = 1,
  3904. .bpc = 8,
  3905. .size = {
  3906. .width = 235,
  3907. .height = 132,
  3908. },
  3909. .delay = {
  3910. .prepare = 5,
  3911. .enable = 10,
  3912. .disable = 10,
  3913. .unprepare = 5,
  3914. },
  3915. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  3916. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  3917. };
  3918. static const struct drm_display_mode samsung_ltn101nt05_mode = {
  3919. .clock = 54030,
  3920. .hdisplay = 1024,
  3921. .hsync_start = 1024 + 24,
  3922. .hsync_end = 1024 + 24 + 136,
  3923. .htotal = 1024 + 24 + 136 + 160,
  3924. .vdisplay = 600,
  3925. .vsync_start = 600 + 3,
  3926. .vsync_end = 600 + 3 + 6,
  3927. .vtotal = 600 + 3 + 6 + 61,
  3928. };
  3929. static const struct panel_desc samsung_ltn101nt05 = {
  3930. .modes = &samsung_ltn101nt05_mode,
  3931. .num_modes = 1,
  3932. .bpc = 6,
  3933. .size = {
  3934. .width = 223,
  3935. .height = 125,
  3936. },
  3937. .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
  3938. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  3939. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  3940. };
  3941. static const struct display_timing satoz_sat050at40h12r2_timing = {
  3942. .pixelclock = {33300000, 33300000, 50000000},
  3943. .hactive = {800, 800, 800},
  3944. .hfront_porch = {16, 210, 354},
  3945. .hback_porch = {46, 46, 46},
  3946. .hsync_len = {1, 1, 40},
  3947. .vactive = {480, 480, 480},
  3948. .vfront_porch = {7, 22, 147},
  3949. .vback_porch = {23, 23, 23},
  3950. .vsync_len = {1, 1, 20},
  3951. };
  3952. static const struct panel_desc satoz_sat050at40h12r2 = {
  3953. .timings = &satoz_sat050at40h12r2_timing,
  3954. .num_timings = 1,
  3955. .bpc = 8,
  3956. .size = {
  3957. .width = 108,
  3958. .height = 65,
  3959. },
  3960. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  3961. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  3962. };
  3963. static const struct drm_display_mode sharp_lq070y3dg3b_mode = {
  3964. .clock = 33260,
  3965. .hdisplay = 800,
  3966. .hsync_start = 800 + 64,
  3967. .hsync_end = 800 + 64 + 128,
  3968. .htotal = 800 + 64 + 128 + 64,
  3969. .vdisplay = 480,
  3970. .vsync_start = 480 + 8,
  3971. .vsync_end = 480 + 8 + 2,
  3972. .vtotal = 480 + 8 + 2 + 35,
  3973. .flags = DISPLAY_FLAGS_PIXDATA_POSEDGE,
  3974. };
  3975. static const struct panel_desc sharp_lq070y3dg3b = {
  3976. .modes = &sharp_lq070y3dg3b_mode,
  3977. .num_modes = 1,
  3978. .bpc = 8,
  3979. .size = {
  3980. .width = 152, /* 152.4mm */
  3981. .height = 91, /* 91.4mm */
  3982. },
  3983. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  3984. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
  3985. DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
  3986. };
  3987. static const struct drm_display_mode sharp_lq035q7db03_mode = {
  3988. .clock = 5500,
  3989. .hdisplay = 240,
  3990. .hsync_start = 240 + 16,
  3991. .hsync_end = 240 + 16 + 7,
  3992. .htotal = 240 + 16 + 7 + 5,
  3993. .vdisplay = 320,
  3994. .vsync_start = 320 + 9,
  3995. .vsync_end = 320 + 9 + 1,
  3996. .vtotal = 320 + 9 + 1 + 7,
  3997. };
  3998. static const struct panel_desc sharp_lq035q7db03 = {
  3999. .modes = &sharp_lq035q7db03_mode,
  4000. .num_modes = 1,
  4001. .bpc = 6,
  4002. .size = {
  4003. .width = 54,
  4004. .height = 72,
  4005. },
  4006. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  4007. };
  4008. static const struct display_timing sharp_lq101k1ly04_timing = {
  4009. .pixelclock = { 60000000, 65000000, 80000000 },
  4010. .hactive = { 1280, 1280, 1280 },
  4011. .hfront_porch = { 20, 20, 20 },
  4012. .hback_porch = { 20, 20, 20 },
  4013. .hsync_len = { 10, 10, 10 },
  4014. .vactive = { 800, 800, 800 },
  4015. .vfront_porch = { 4, 4, 4 },
  4016. .vback_porch = { 4, 4, 4 },
  4017. .vsync_len = { 4, 4, 4 },
  4018. .flags = DISPLAY_FLAGS_PIXDATA_POSEDGE,
  4019. };
  4020. static const struct panel_desc sharp_lq101k1ly04 = {
  4021. .timings = &sharp_lq101k1ly04_timing,
  4022. .num_timings = 1,
  4023. .bpc = 8,
  4024. .size = {
  4025. .width = 217,
  4026. .height = 136,
  4027. },
  4028. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
  4029. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  4030. };
  4031. static const struct drm_display_mode sharp_ls020b1dd01d_modes[] = {
  4032. { /* 50 Hz */
  4033. .clock = 3000,
  4034. .hdisplay = 240,
  4035. .hsync_start = 240 + 58,
  4036. .hsync_end = 240 + 58 + 1,
  4037. .htotal = 240 + 58 + 1 + 1,
  4038. .vdisplay = 160,
  4039. .vsync_start = 160 + 24,
  4040. .vsync_end = 160 + 24 + 10,
  4041. .vtotal = 160 + 24 + 10 + 6,
  4042. .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC,
  4043. },
  4044. { /* 60 Hz */
  4045. .clock = 3000,
  4046. .hdisplay = 240,
  4047. .hsync_start = 240 + 8,
  4048. .hsync_end = 240 + 8 + 1,
  4049. .htotal = 240 + 8 + 1 + 1,
  4050. .vdisplay = 160,
  4051. .vsync_start = 160 + 24,
  4052. .vsync_end = 160 + 24 + 10,
  4053. .vtotal = 160 + 24 + 10 + 6,
  4054. .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC,
  4055. },
  4056. };
  4057. static const struct panel_desc sharp_ls020b1dd01d = {
  4058. .modes = sharp_ls020b1dd01d_modes,
  4059. .num_modes = ARRAY_SIZE(sharp_ls020b1dd01d_modes),
  4060. .bpc = 6,
  4061. .size = {
  4062. .width = 42,
  4063. .height = 28,
  4064. },
  4065. .bus_format = MEDIA_BUS_FMT_RGB565_1X16,
  4066. .bus_flags = DRM_BUS_FLAG_DE_HIGH
  4067. | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE
  4068. | DRM_BUS_FLAG_SHARP_SIGNALS,
  4069. };
  4070. static const struct drm_display_mode shelly_sca07010_bfn_lnn_mode = {
  4071. .clock = 33300,
  4072. .hdisplay = 800,
  4073. .hsync_start = 800 + 1,
  4074. .hsync_end = 800 + 1 + 64,
  4075. .htotal = 800 + 1 + 64 + 64,
  4076. .vdisplay = 480,
  4077. .vsync_start = 480 + 1,
  4078. .vsync_end = 480 + 1 + 23,
  4079. .vtotal = 480 + 1 + 23 + 22,
  4080. };
  4081. static const struct panel_desc shelly_sca07010_bfn_lnn = {
  4082. .modes = &shelly_sca07010_bfn_lnn_mode,
  4083. .num_modes = 1,
  4084. .size = {
  4085. .width = 152,
  4086. .height = 91,
  4087. },
  4088. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  4089. };
  4090. static const struct drm_display_mode starry_kr070pe2t_mode = {
  4091. .clock = 33000,
  4092. .hdisplay = 800,
  4093. .hsync_start = 800 + 209,
  4094. .hsync_end = 800 + 209 + 1,
  4095. .htotal = 800 + 209 + 1 + 45,
  4096. .vdisplay = 480,
  4097. .vsync_start = 480 + 22,
  4098. .vsync_end = 480 + 22 + 1,
  4099. .vtotal = 480 + 22 + 1 + 22,
  4100. };
  4101. static const struct panel_desc starry_kr070pe2t = {
  4102. .modes = &starry_kr070pe2t_mode,
  4103. .num_modes = 1,
  4104. .bpc = 8,
  4105. .size = {
  4106. .width = 152,
  4107. .height = 86,
  4108. },
  4109. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  4110. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
  4111. .connector_type = DRM_MODE_CONNECTOR_DPI,
  4112. };
  4113. static const struct display_timing startek_kd070wvfpa_mode = {
  4114. .pixelclock = { 25200000, 27200000, 30500000 },
  4115. .hactive = { 800, 800, 800 },
  4116. .hfront_porch = { 19, 44, 115 },
  4117. .hback_porch = { 5, 16, 101 },
  4118. .hsync_len = { 1, 2, 100 },
  4119. .vactive = { 480, 480, 480 },
  4120. .vfront_porch = { 5, 43, 67 },
  4121. .vback_porch = { 5, 5, 67 },
  4122. .vsync_len = { 1, 2, 66 },
  4123. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
  4124. DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE |
  4125. DISPLAY_FLAGS_SYNC_POSEDGE,
  4126. };
  4127. static const struct panel_desc startek_kd070wvfpa = {
  4128. .timings = &startek_kd070wvfpa_mode,
  4129. .num_timings = 1,
  4130. .bpc = 8,
  4131. .size = {
  4132. .width = 152,
  4133. .height = 91,
  4134. },
  4135. .delay = {
  4136. .prepare = 20,
  4137. .enable = 200,
  4138. .disable = 200,
  4139. },
  4140. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  4141. .connector_type = DRM_MODE_CONNECTOR_DPI,
  4142. .bus_flags = DRM_BUS_FLAG_DE_HIGH |
  4143. DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
  4144. DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE,
  4145. };
  4146. static const struct display_timing tsd_tst043015cmhx_timing = {
  4147. .pixelclock = { 5000000, 9000000, 12000000 },
  4148. .hactive = { 480, 480, 480 },
  4149. .hfront_porch = { 4, 5, 65 },
  4150. .hback_porch = { 36, 40, 255 },
  4151. .hsync_len = { 1, 1, 1 },
  4152. .vactive = { 272, 272, 272 },
  4153. .vfront_porch = { 2, 8, 97 },
  4154. .vback_porch = { 3, 8, 31 },
  4155. .vsync_len = { 1, 1, 1 },
  4156. .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
  4157. DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
  4158. };
  4159. static const struct panel_desc tsd_tst043015cmhx = {
  4160. .timings = &tsd_tst043015cmhx_timing,
  4161. .num_timings = 1,
  4162. .bpc = 8,
  4163. .size = {
  4164. .width = 105,
  4165. .height = 67,
  4166. },
  4167. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  4168. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
  4169. };
  4170. static const struct drm_display_mode tfc_s9700rtwv43tr_01b_mode = {
  4171. .clock = 30000,
  4172. .hdisplay = 800,
  4173. .hsync_start = 800 + 39,
  4174. .hsync_end = 800 + 39 + 47,
  4175. .htotal = 800 + 39 + 47 + 39,
  4176. .vdisplay = 480,
  4177. .vsync_start = 480 + 13,
  4178. .vsync_end = 480 + 13 + 2,
  4179. .vtotal = 480 + 13 + 2 + 29,
  4180. };
  4181. static const struct panel_desc tfc_s9700rtwv43tr_01b = {
  4182. .modes = &tfc_s9700rtwv43tr_01b_mode,
  4183. .num_modes = 1,
  4184. .bpc = 8,
  4185. .size = {
  4186. .width = 155,
  4187. .height = 90,
  4188. },
  4189. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  4190. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
  4191. };
  4192. static const struct display_timing tianma_tm070jdhg30_timing = {
  4193. .pixelclock = { 62600000, 68200000, 78100000 },
  4194. .hactive = { 1280, 1280, 1280 },
  4195. .hfront_porch = { 15, 64, 159 },
  4196. .hback_porch = { 5, 5, 5 },
  4197. .hsync_len = { 1, 1, 256 },
  4198. .vactive = { 800, 800, 800 },
  4199. .vfront_porch = { 3, 40, 99 },
  4200. .vback_porch = { 2, 2, 2 },
  4201. .vsync_len = { 1, 1, 128 },
  4202. .flags = DISPLAY_FLAGS_DE_HIGH,
  4203. };
  4204. static const struct panel_desc tianma_tm070jdhg30 = {
  4205. .timings = &tianma_tm070jdhg30_timing,
  4206. .num_timings = 1,
  4207. .bpc = 8,
  4208. .size = {
  4209. .width = 151,
  4210. .height = 95,
  4211. },
  4212. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  4213. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  4214. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  4215. };
  4216. static const struct panel_desc tianma_tm070jvhg33 = {
  4217. .timings = &tianma_tm070jdhg30_timing,
  4218. .num_timings = 1,
  4219. .bpc = 8,
  4220. .size = {
  4221. .width = 150,
  4222. .height = 94,
  4223. },
  4224. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  4225. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  4226. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  4227. };
  4228. /*
  4229. * The TM070JDHG34-00 datasheet computes total blanking as back porch +
  4230. * front porch, not including sync pulse width. This is for both H and
  4231. * V. To make the total blanking and period correct, subtract the pulse
  4232. * width from the front porch.
  4233. *
  4234. * This works well for the Min and Typ values, but for Max values the sync
  4235. * pulse width is higher than back porch + front porch, so work around that
  4236. * by reducing the Max sync length value to 1 and then treating the Max
  4237. * porches as in the Min and Typ cases.
  4238. *
  4239. * Exact datasheet values are added as a comment where they differ from the
  4240. * ones implemented for the above reason.
  4241. *
  4242. * The P0700WXF1MBAA datasheet is even less detailed, only listing period
  4243. * and total blanking time, however the resulting values are the same as
  4244. * the TM070JDHG34-00.
  4245. */
  4246. static const struct display_timing tianma_tm070jdhg34_00_timing = {
  4247. .pixelclock = { 68400000, 71900000, 78100000 },
  4248. .hactive = { 1280, 1280, 1280 },
  4249. .hfront_porch = { 130, 138, 158 }, /* 131, 139, 159 */
  4250. .hback_porch = { 5, 5, 5 },
  4251. .hsync_len = { 1, 1, 1 }, /* 1, 1, 256 */
  4252. .vactive = { 800, 800, 800 },
  4253. .vfront_porch = { 2, 39, 98 }, /* 3, 40, 99 */
  4254. .vback_porch = { 2, 2, 2 },
  4255. .vsync_len = { 1, 1, 1 }, /* 1, 1, 128 */
  4256. .flags = DISPLAY_FLAGS_DE_HIGH,
  4257. };
  4258. static const struct panel_desc tianma_tm070jdhg34_00 = {
  4259. .timings = &tianma_tm070jdhg34_00_timing,
  4260. .num_timings = 1,
  4261. .bpc = 8,
  4262. .size = {
  4263. .width = 150, /* 149.76 */
  4264. .height = 94, /* 93.60 */
  4265. },
  4266. .delay = {
  4267. .prepare = 15, /* Tp1 */
  4268. .enable = 150, /* Tp2 */
  4269. .disable = 150, /* Tp4 */
  4270. .unprepare = 120, /* Tp3 */
  4271. },
  4272. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  4273. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  4274. };
  4275. static const struct panel_desc tianma_p0700wxf1mbaa = {
  4276. .timings = &tianma_tm070jdhg34_00_timing,
  4277. .num_timings = 1,
  4278. .bpc = 8,
  4279. .size = {
  4280. .width = 150, /* 149.76 */
  4281. .height = 94, /* 93.60 */
  4282. },
  4283. .delay = {
  4284. .prepare = 18, /* Tr + Tp1 */
  4285. .enable = 152, /* Tp2 + Tp5 */
  4286. .disable = 152, /* Tp6 + Tp4 */
  4287. .unprepare = 120, /* Tp3 */
  4288. },
  4289. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  4290. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  4291. };
  4292. static const struct display_timing tianma_tm070rvhg71_timing = {
  4293. .pixelclock = { 27700000, 29200000, 39600000 },
  4294. .hactive = { 800, 800, 800 },
  4295. .hfront_porch = { 12, 40, 212 },
  4296. .hback_porch = { 88, 88, 88 },
  4297. .hsync_len = { 1, 1, 40 },
  4298. .vactive = { 480, 480, 480 },
  4299. .vfront_porch = { 1, 13, 88 },
  4300. .vback_porch = { 32, 32, 32 },
  4301. .vsync_len = { 1, 1, 3 },
  4302. .flags = DISPLAY_FLAGS_DE_HIGH,
  4303. };
  4304. static const struct panel_desc tianma_tm070rvhg71 = {
  4305. .timings = &tianma_tm070rvhg71_timing,
  4306. .num_timings = 1,
  4307. .bpc = 8,
  4308. .size = {
  4309. .width = 154,
  4310. .height = 86,
  4311. },
  4312. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  4313. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  4314. };
  4315. static const struct drm_display_mode ti_nspire_cx_lcd_mode[] = {
  4316. {
  4317. .clock = 10000,
  4318. .hdisplay = 320,
  4319. .hsync_start = 320 + 50,
  4320. .hsync_end = 320 + 50 + 6,
  4321. .htotal = 320 + 50 + 6 + 38,
  4322. .vdisplay = 240,
  4323. .vsync_start = 240 + 3,
  4324. .vsync_end = 240 + 3 + 1,
  4325. .vtotal = 240 + 3 + 1 + 17,
  4326. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  4327. },
  4328. };
  4329. static const struct panel_desc ti_nspire_cx_lcd_panel = {
  4330. .modes = ti_nspire_cx_lcd_mode,
  4331. .num_modes = 1,
  4332. .bpc = 8,
  4333. .size = {
  4334. .width = 65,
  4335. .height = 49,
  4336. },
  4337. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  4338. .bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE,
  4339. };
  4340. static const struct drm_display_mode ti_nspire_classic_lcd_mode[] = {
  4341. {
  4342. .clock = 10000,
  4343. .hdisplay = 320,
  4344. .hsync_start = 320 + 6,
  4345. .hsync_end = 320 + 6 + 6,
  4346. .htotal = 320 + 6 + 6 + 6,
  4347. .vdisplay = 240,
  4348. .vsync_start = 240 + 0,
  4349. .vsync_end = 240 + 0 + 1,
  4350. .vtotal = 240 + 0 + 1 + 0,
  4351. .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
  4352. },
  4353. };
  4354. static const struct panel_desc ti_nspire_classic_lcd_panel = {
  4355. .modes = ti_nspire_classic_lcd_mode,
  4356. .num_modes = 1,
  4357. /* The grayscale panel has 8 bit for the color .. Y (black) */
  4358. .bpc = 8,
  4359. .size = {
  4360. .width = 71,
  4361. .height = 53,
  4362. },
  4363. /* This is the grayscale bus format */
  4364. .bus_format = MEDIA_BUS_FMT_Y8_1X8,
  4365. .bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
  4366. };
  4367. static const struct display_timing topland_tian_g07017_01_timing = {
  4368. .pixelclock = { 44900000, 51200000, 63000000 },
  4369. .hactive = { 1024, 1024, 1024 },
  4370. .hfront_porch = { 16, 160, 216 },
  4371. .hback_porch = { 160, 160, 160 },
  4372. .hsync_len = { 1, 1, 140 },
  4373. .vactive = { 600, 600, 600 },
  4374. .vfront_porch = { 1, 12, 127 },
  4375. .vback_porch = { 23, 23, 23 },
  4376. .vsync_len = { 1, 1, 20 },
  4377. };
  4378. static const struct panel_desc topland_tian_g07017_01 = {
  4379. .timings = &topland_tian_g07017_01_timing,
  4380. .num_timings = 1,
  4381. .bpc = 8,
  4382. .size = {
  4383. .width = 154,
  4384. .height = 86,
  4385. },
  4386. .delay = {
  4387. .prepare = 1, /* 6.5 - 150µs PLL wake-up time */
  4388. .enable = 100, /* 6.4 - Power on: 6 VSyncs */
  4389. .disable = 84, /* 6.4 - Power off: 5 Vsyncs */
  4390. .unprepare = 50, /* 6.4 - Power off: 3 Vsyncs */
  4391. },
  4392. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  4393. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  4394. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  4395. };
  4396. static const struct drm_display_mode toshiba_lt089ac29000_mode = {
  4397. .clock = 79500,
  4398. .hdisplay = 1280,
  4399. .hsync_start = 1280 + 192,
  4400. .hsync_end = 1280 + 192 + 128,
  4401. .htotal = 1280 + 192 + 128 + 64,
  4402. .vdisplay = 768,
  4403. .vsync_start = 768 + 20,
  4404. .vsync_end = 768 + 20 + 7,
  4405. .vtotal = 768 + 20 + 7 + 3,
  4406. };
  4407. static const struct panel_desc toshiba_lt089ac29000 = {
  4408. .modes = &toshiba_lt089ac29000_mode,
  4409. .num_modes = 1,
  4410. .size = {
  4411. .width = 194,
  4412. .height = 116,
  4413. },
  4414. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
  4415. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  4416. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  4417. };
  4418. static const struct drm_display_mode tpk_f07a_0102_mode = {
  4419. .clock = 33260,
  4420. .hdisplay = 800,
  4421. .hsync_start = 800 + 40,
  4422. .hsync_end = 800 + 40 + 128,
  4423. .htotal = 800 + 40 + 128 + 88,
  4424. .vdisplay = 480,
  4425. .vsync_start = 480 + 10,
  4426. .vsync_end = 480 + 10 + 2,
  4427. .vtotal = 480 + 10 + 2 + 33,
  4428. };
  4429. static const struct panel_desc tpk_f07a_0102 = {
  4430. .modes = &tpk_f07a_0102_mode,
  4431. .num_modes = 1,
  4432. .size = {
  4433. .width = 152,
  4434. .height = 91,
  4435. },
  4436. .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
  4437. };
  4438. static const struct drm_display_mode tpk_f10a_0102_mode = {
  4439. .clock = 45000,
  4440. .hdisplay = 1024,
  4441. .hsync_start = 1024 + 176,
  4442. .hsync_end = 1024 + 176 + 5,
  4443. .htotal = 1024 + 176 + 5 + 88,
  4444. .vdisplay = 600,
  4445. .vsync_start = 600 + 20,
  4446. .vsync_end = 600 + 20 + 5,
  4447. .vtotal = 600 + 20 + 5 + 25,
  4448. };
  4449. static const struct panel_desc tpk_f10a_0102 = {
  4450. .modes = &tpk_f10a_0102_mode,
  4451. .num_modes = 1,
  4452. .size = {
  4453. .width = 223,
  4454. .height = 125,
  4455. },
  4456. };
  4457. static const struct display_timing urt_umsh_8596md_timing = {
  4458. .pixelclock = { 33260000, 33260000, 33260000 },
  4459. .hactive = { 800, 800, 800 },
  4460. .hfront_porch = { 41, 41, 41 },
  4461. .hback_porch = { 216 - 128, 216 - 128, 216 - 128 },
  4462. .hsync_len = { 71, 128, 128 },
  4463. .vactive = { 480, 480, 480 },
  4464. .vfront_porch = { 10, 10, 10 },
  4465. .vback_porch = { 35 - 2, 35 - 2, 35 - 2 },
  4466. .vsync_len = { 2, 2, 2 },
  4467. .flags = DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE |
  4468. DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
  4469. };
  4470. static const struct panel_desc urt_umsh_8596md_lvds = {
  4471. .timings = &urt_umsh_8596md_timing,
  4472. .num_timings = 1,
  4473. .bpc = 6,
  4474. .size = {
  4475. .width = 152,
  4476. .height = 91,
  4477. },
  4478. .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
  4479. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  4480. };
  4481. static const struct panel_desc urt_umsh_8596md_parallel = {
  4482. .timings = &urt_umsh_8596md_timing,
  4483. .num_timings = 1,
  4484. .bpc = 6,
  4485. .size = {
  4486. .width = 152,
  4487. .height = 91,
  4488. },
  4489. .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
  4490. };
  4491. static const struct drm_display_mode vivax_tpc9150_panel_mode = {
  4492. .clock = 60000,
  4493. .hdisplay = 1024,
  4494. .hsync_start = 1024 + 160,
  4495. .hsync_end = 1024 + 160 + 100,
  4496. .htotal = 1024 + 160 + 100 + 60,
  4497. .vdisplay = 600,
  4498. .vsync_start = 600 + 12,
  4499. .vsync_end = 600 + 12 + 10,
  4500. .vtotal = 600 + 12 + 10 + 13,
  4501. };
  4502. static const struct panel_desc vivax_tpc9150_panel = {
  4503. .modes = &vivax_tpc9150_panel_mode,
  4504. .num_modes = 1,
  4505. .bpc = 6,
  4506. .size = {
  4507. .width = 200,
  4508. .height = 115,
  4509. },
  4510. .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
  4511. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  4512. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  4513. };
  4514. static const struct drm_display_mode vl050_8048nt_c01_mode = {
  4515. .clock = 33333,
  4516. .hdisplay = 800,
  4517. .hsync_start = 800 + 210,
  4518. .hsync_end = 800 + 210 + 20,
  4519. .htotal = 800 + 210 + 20 + 46,
  4520. .vdisplay = 480,
  4521. .vsync_start = 480 + 22,
  4522. .vsync_end = 480 + 22 + 10,
  4523. .vtotal = 480 + 22 + 10 + 23,
  4524. .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
  4525. };
  4526. static const struct panel_desc vl050_8048nt_c01 = {
  4527. .modes = &vl050_8048nt_c01_mode,
  4528. .num_modes = 1,
  4529. .bpc = 8,
  4530. .size = {
  4531. .width = 120,
  4532. .height = 76,
  4533. },
  4534. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  4535. .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
  4536. };
  4537. static const struct drm_display_mode winstar_wf35ltiacd_mode = {
  4538. .clock = 6410,
  4539. .hdisplay = 320,
  4540. .hsync_start = 320 + 20,
  4541. .hsync_end = 320 + 20 + 30,
  4542. .htotal = 320 + 20 + 30 + 38,
  4543. .vdisplay = 240,
  4544. .vsync_start = 240 + 4,
  4545. .vsync_end = 240 + 4 + 3,
  4546. .vtotal = 240 + 4 + 3 + 15,
  4547. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  4548. };
  4549. static const struct panel_desc winstar_wf35ltiacd = {
  4550. .modes = &winstar_wf35ltiacd_mode,
  4551. .num_modes = 1,
  4552. .bpc = 8,
  4553. .size = {
  4554. .width = 70,
  4555. .height = 53,
  4556. },
  4557. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  4558. };
  4559. static const struct drm_display_mode yes_optoelectronics_ytc700tlag_05_201c_mode = {
  4560. .clock = 51200,
  4561. .hdisplay = 1024,
  4562. .hsync_start = 1024 + 100,
  4563. .hsync_end = 1024 + 100 + 100,
  4564. .htotal = 1024 + 100 + 100 + 120,
  4565. .vdisplay = 600,
  4566. .vsync_start = 600 + 10,
  4567. .vsync_end = 600 + 10 + 10,
  4568. .vtotal = 600 + 10 + 10 + 15,
  4569. .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
  4570. };
  4571. static const struct panel_desc yes_optoelectronics_ytc700tlag_05_201c = {
  4572. .modes = &yes_optoelectronics_ytc700tlag_05_201c_mode,
  4573. .num_modes = 1,
  4574. .bpc = 8,
  4575. .size = {
  4576. .width = 154,
  4577. .height = 90,
  4578. },
  4579. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  4580. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
  4581. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  4582. };
  4583. static const struct drm_display_mode mchp_ac69t88a_mode = {
  4584. .clock = 25000,
  4585. .hdisplay = 800,
  4586. .hsync_start = 800 + 88,
  4587. .hsync_end = 800 + 88 + 5,
  4588. .htotal = 800 + 88 + 5 + 40,
  4589. .vdisplay = 480,
  4590. .vsync_start = 480 + 23,
  4591. .vsync_end = 480 + 23 + 5,
  4592. .vtotal = 480 + 23 + 5 + 1,
  4593. };
  4594. static const struct panel_desc mchp_ac69t88a = {
  4595. .modes = &mchp_ac69t88a_mode,
  4596. .num_modes = 1,
  4597. .bpc = 8,
  4598. .size = {
  4599. .width = 108,
  4600. .height = 65,
  4601. },
  4602. .bus_flags = DRM_BUS_FLAG_DE_HIGH,
  4603. .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
  4604. .connector_type = DRM_MODE_CONNECTOR_LVDS,
  4605. };
  4606. static const struct drm_display_mode arm_rtsm_mode[] = {
  4607. {
  4608. .clock = 65000,
  4609. .hdisplay = 1024,
  4610. .hsync_start = 1024 + 24,
  4611. .hsync_end = 1024 + 24 + 136,
  4612. .htotal = 1024 + 24 + 136 + 160,
  4613. .vdisplay = 768,
  4614. .vsync_start = 768 + 3,
  4615. .vsync_end = 768 + 3 + 6,
  4616. .vtotal = 768 + 3 + 6 + 29,
  4617. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  4618. },
  4619. };
  4620. static const struct panel_desc arm_rtsm = {
  4621. .modes = arm_rtsm_mode,
  4622. .num_modes = 1,
  4623. .bpc = 8,
  4624. .size = {
  4625. .width = 400,
  4626. .height = 300,
  4627. },
  4628. .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  4629. };
  4630. static const struct of_device_id platform_of_match[] = {
  4631. {
  4632. .compatible = "ampire,am-1280800n3tzqw-t00h",
  4633. .data = &ampire_am_1280800n3tzqw_t00h,
  4634. }, {
  4635. .compatible = "ampire,am-480272h3tmqw-t01h",
  4636. .data = &ampire_am_480272h3tmqw_t01h,
  4637. }, {
  4638. .compatible = "ampire,am-800480l1tmqw-t00h",
  4639. .data = &ampire_am_800480l1tmqw_t00h,
  4640. }, {
  4641. .compatible = "ampire,am800480r3tmqwa1h",
  4642. .data = &ampire_am800480r3tmqwa1h,
  4643. }, {
  4644. .compatible = "ampire,am800600p5tmqw-tb8h",
  4645. .data = &ampire_am800600p5tmqwtb8h,
  4646. }, {
  4647. .compatible = "arm,rtsm-display",
  4648. .data = &arm_rtsm,
  4649. }, {
  4650. .compatible = "armadeus,st0700-adapt",
  4651. .data = &armadeus_st0700_adapt,
  4652. }, {
  4653. .compatible = "auo,b101aw03",
  4654. .data = &auo_b101aw03,
  4655. }, {
  4656. .compatible = "auo,b101xtn01",
  4657. .data = &auo_b101xtn01,
  4658. }, {
  4659. .compatible = "auo,b116xw03",
  4660. .data = &auo_b116xw03,
  4661. }, {
  4662. .compatible = "auo,g070vvn01",
  4663. .data = &auo_g070vvn01,
  4664. }, {
  4665. .compatible = "auo,g101evn010",
  4666. .data = &auo_g101evn010,
  4667. }, {
  4668. .compatible = "auo,g104sn02",
  4669. .data = &auo_g104sn02,
  4670. }, {
  4671. .compatible = "auo,g104stn01",
  4672. .data = &auo_g104stn01,
  4673. }, {
  4674. .compatible = "auo,g121ean01",
  4675. .data = &auo_g121ean01,
  4676. }, {
  4677. .compatible = "auo,g133han01",
  4678. .data = &auo_g133han01,
  4679. }, {
  4680. .compatible = "auo,g156han04",
  4681. .data = &auo_g156han04,
  4682. }, {
  4683. .compatible = "auo,g156xtn01",
  4684. .data = &auo_g156xtn01,
  4685. }, {
  4686. .compatible = "auo,g185han01",
  4687. .data = &auo_g185han01,
  4688. }, {
  4689. .compatible = "auo,g190ean01",
  4690. .data = &auo_g190ean01,
  4691. }, {
  4692. .compatible = "auo,p238han01",
  4693. .data = &auo_p238han01,
  4694. }, {
  4695. .compatible = "auo,p320hvn03",
  4696. .data = &auo_p320hvn03,
  4697. }, {
  4698. .compatible = "auo,t215hvn01",
  4699. .data = &auo_t215hvn01,
  4700. }, {
  4701. .compatible = "avic,tm070ddh03",
  4702. .data = &avic_tm070ddh03,
  4703. }, {
  4704. .compatible = "bananapi,s070wv20-ct16",
  4705. .data = &bananapi_s070wv20_ct16,
  4706. }, {
  4707. .compatible = "boe,av101hdt-a10",
  4708. .data = &boe_av101hdt_a10,
  4709. }, {
  4710. .compatible = "boe,av123z7m-n17",
  4711. .data = &boe_av123z7m_n17,
  4712. }, {
  4713. .compatible = "boe,bp082wx1-100",
  4714. .data = &boe_bp082wx1_100,
  4715. }, {
  4716. .compatible = "boe,bp101wx1-100",
  4717. .data = &boe_bp101wx1_100,
  4718. }, {
  4719. .compatible = "boe,ev121wxm-n10-1850",
  4720. .data = &boe_ev121wxm_n10_1850,
  4721. }, {
  4722. .compatible = "boe,hv070wsa-100",
  4723. .data = &boe_hv070wsa
  4724. }, {
  4725. .compatible = "cct,cmt430b19n00",
  4726. .data = &cct_cmt430b19n00,
  4727. }, {
  4728. .compatible = "cdtech,s043wq26h-ct7",
  4729. .data = &cdtech_s043wq26h_ct7,
  4730. }, {
  4731. .compatible = "cdtech,s070pws19hp-fc21",
  4732. .data = &cdtech_s070pws19hp_fc21,
  4733. }, {
  4734. .compatible = "cdtech,s070swv29hg-dc44",
  4735. .data = &cdtech_s070swv29hg_dc44,
  4736. }, {
  4737. .compatible = "cdtech,s070wv95-ct16",
  4738. .data = &cdtech_s070wv95_ct16,
  4739. }, {
  4740. .compatible = "chefree,ch101olhlwh-002",
  4741. .data = &chefree_ch101olhlwh_002,
  4742. }, {
  4743. .compatible = "chunghwa,claa070wp03xg",
  4744. .data = &chunghwa_claa070wp03xg,
  4745. }, {
  4746. .compatible = "chunghwa,claa101wa01a",
  4747. .data = &chunghwa_claa101wa01a
  4748. }, {
  4749. .compatible = "chunghwa,claa101wb01",
  4750. .data = &chunghwa_claa101wb01
  4751. }, {
  4752. .compatible = "dataimage,fg040346dsswbg04",
  4753. .data = &dataimage_fg040346dsswbg04,
  4754. }, {
  4755. .compatible = "dataimage,fg1001l0dsswmg01",
  4756. .data = &dataimage_fg1001l0dsswmg01,
  4757. }, {
  4758. .compatible = "dataimage,scf0700c48ggu18",
  4759. .data = &dataimage_scf0700c48ggu18,
  4760. }, {
  4761. .compatible = "dlc,dlc0700yzg-1",
  4762. .data = &dlc_dlc0700yzg_1,
  4763. }, {
  4764. .compatible = "dlc,dlc1010gig",
  4765. .data = &dlc_dlc1010gig,
  4766. }, {
  4767. .compatible = "edt,et035012dm6",
  4768. .data = &edt_et035012dm6,
  4769. }, {
  4770. .compatible = "edt,etm0350g0dh6",
  4771. .data = &edt_etm0350g0dh6,
  4772. }, {
  4773. .compatible = "edt,etm043080dh6gp",
  4774. .data = &edt_etm043080dh6gp,
  4775. }, {
  4776. .compatible = "edt,etm0430g0dh6",
  4777. .data = &edt_etm0430g0dh6,
  4778. }, {
  4779. .compatible = "edt,et057090dhu",
  4780. .data = &edt_et057090dhu,
  4781. }, {
  4782. .compatible = "edt,et070080dh6",
  4783. .data = &edt_etm0700g0dh6,
  4784. }, {
  4785. .compatible = "edt,etm0700g0dh6",
  4786. .data = &edt_etm0700g0dh6,
  4787. }, {
  4788. .compatible = "edt,etm0700g0bdh6",
  4789. .data = &edt_etm0700g0bdh6,
  4790. }, {
  4791. .compatible = "edt,etm0700g0edh6",
  4792. .data = &edt_etm0700g0bdh6,
  4793. }, {
  4794. .compatible = "edt,etml0700y5dha",
  4795. .data = &edt_etml0700y5dha,
  4796. }, {
  4797. .compatible = "edt,etml1010g3dra",
  4798. .data = &edt_etml1010g3dra,
  4799. }, {
  4800. .compatible = "edt,etmv570g2dhu",
  4801. .data = &edt_etmv570g2dhu,
  4802. }, {
  4803. .compatible = "eink,vb3300-kca",
  4804. .data = &eink_vb3300_kca,
  4805. }, {
  4806. .compatible = "evervision,vgg644804",
  4807. .data = &evervision_vgg644804,
  4808. }, {
  4809. .compatible = "evervision,vgg804821",
  4810. .data = &evervision_vgg804821,
  4811. }, {
  4812. .compatible = "foxlink,fl500wvr00-a0t",
  4813. .data = &foxlink_fl500wvr00_a0t,
  4814. }, {
  4815. .compatible = "frida,frd350h54004",
  4816. .data = &frida_frd350h54004,
  4817. }, {
  4818. .compatible = "friendlyarm,hd702e",
  4819. .data = &friendlyarm_hd702e,
  4820. }, {
  4821. .compatible = "giantplus,gpg482739qs5",
  4822. .data = &giantplus_gpg482739qs5
  4823. }, {
  4824. .compatible = "giantplus,gpm940b0",
  4825. .data = &giantplus_gpm940b0,
  4826. }, {
  4827. .compatible = "hannstar,hsd070pww1",
  4828. .data = &hannstar_hsd070pww1,
  4829. }, {
  4830. .compatible = "hannstar,hsd100pxn1",
  4831. .data = &hannstar_hsd100pxn1,
  4832. }, {
  4833. .compatible = "hannstar,hsd101pww2",
  4834. .data = &hannstar_hsd101pww2,
  4835. }, {
  4836. .compatible = "hannstar,hsd156juw2",
  4837. .data = &hannstar_hsd156juw2,
  4838. }, {
  4839. .compatible = "hit,tx23d38vm0caa",
  4840. .data = &hitachi_tx23d38vm0caa
  4841. }, {
  4842. .compatible = "innolux,at043tn24",
  4843. .data = &innolux_at043tn24,
  4844. }, {
  4845. .compatible = "innolux,at070tn92",
  4846. .data = &innolux_at070tn92,
  4847. }, {
  4848. .compatible = "innolux,g070ace-l01",
  4849. .data = &innolux_g070ace_l01,
  4850. }, {
  4851. .compatible = "innolux,g070ace-lh3",
  4852. .data = &innolux_g070ace_lh3,
  4853. }, {
  4854. .compatible = "innolux,g070y2-l01",
  4855. .data = &innolux_g070y2_l01,
  4856. }, {
  4857. .compatible = "innolux,g070y2-t02",
  4858. .data = &innolux_g070y2_t02,
  4859. }, {
  4860. .compatible = "innolux,g101ice-l01",
  4861. .data = &innolux_g101ice_l01
  4862. }, {
  4863. .compatible = "innolux,g121i1-l01",
  4864. .data = &innolux_g121i1_l01
  4865. }, {
  4866. .compatible = "innolux,g121x1-l03",
  4867. .data = &innolux_g121x1_l03,
  4868. }, {
  4869. .compatible = "innolux,g121xce-l01",
  4870. .data = &innolux_g121xce_l01,
  4871. }, {
  4872. .compatible = "innolux,g150xge-l05",
  4873. .data = &innolux_g150xge_l05,
  4874. }, {
  4875. .compatible = "innolux,g156hce-l01",
  4876. .data = &innolux_g156hce_l01,
  4877. }, {
  4878. .compatible = "innolux,n156bge-l21",
  4879. .data = &innolux_n156bge_l21,
  4880. }, {
  4881. .compatible = "innolux,zj070na-01p",
  4882. .data = &innolux_zj070na_01p,
  4883. }, {
  4884. .compatible = "jutouch,jt101tm023",
  4885. .data = &jutouch_jt101tm023,
  4886. }, {
  4887. .compatible = "koe,tx14d24vm1bpa",
  4888. .data = &koe_tx14d24vm1bpa,
  4889. }, {
  4890. .compatible = "koe,tx26d202vm0bwa",
  4891. .data = &koe_tx26d202vm0bwa,
  4892. }, {
  4893. .compatible = "koe,tx31d200vm0baa",
  4894. .data = &koe_tx31d200vm0baa,
  4895. }, {
  4896. .compatible = "kyo,tcg121xglp",
  4897. .data = &kyo_tcg121xglp,
  4898. }, {
  4899. .compatible = "lemaker,bl035-rgb-002",
  4900. .data = &lemaker_bl035_rgb_002,
  4901. }, {
  4902. .compatible = "lg,lb070wv8",
  4903. .data = &lg_lb070wv8,
  4904. }, {
  4905. .compatible = "lincolntech,lcd185-101ct",
  4906. .data = &lincolntech_lcd185_101ct,
  4907. }, {
  4908. .compatible = "logicpd,type28",
  4909. .data = &logicpd_type_28,
  4910. }, {
  4911. .compatible = "logictechno,lt161010-2nhc",
  4912. .data = &logictechno_lt161010_2nh,
  4913. }, {
  4914. .compatible = "logictechno,lt161010-2nhr",
  4915. .data = &logictechno_lt161010_2nh,
  4916. }, {
  4917. .compatible = "logictechno,lt170410-2whc",
  4918. .data = &logictechno_lt170410_2whc,
  4919. }, {
  4920. .compatible = "logictechno,lttd800480070-l2rt",
  4921. .data = &logictechno_lttd800480070_l2rt,
  4922. }, {
  4923. .compatible = "logictechno,lttd800480070-l6wh-rt",
  4924. .data = &logictechno_lttd800480070_l6wh_rt,
  4925. }, {
  4926. .compatible = "microtips,mf-101hiebcaf0",
  4927. .data = &microtips_mf_101hiebcaf0_c,
  4928. }, {
  4929. .compatible = "microtips,mf-103hieb0ga0",
  4930. .data = &microtips_mf_103hieb0ga0,
  4931. }, {
  4932. .compatible = "mitsubishi,aa070mc01-ca1",
  4933. .data = &mitsubishi_aa070mc01,
  4934. }, {
  4935. .compatible = "mitsubishi,aa084xe01",
  4936. .data = &mitsubishi_aa084xe01,
  4937. }, {
  4938. .compatible = "multi-inno,mi0700a2t-30",
  4939. .data = &multi_inno_mi0700a2t_30,
  4940. }, {
  4941. .compatible = "multi-inno,mi0700s4t-6",
  4942. .data = &multi_inno_mi0700s4t_6,
  4943. }, {
  4944. .compatible = "multi-inno,mi0800ft-9",
  4945. .data = &multi_inno_mi0800ft_9,
  4946. }, {
  4947. .compatible = "multi-inno,mi1010ait-1cp",
  4948. .data = &multi_inno_mi1010ait_1cp,
  4949. }, {
  4950. .compatible = "multi-inno,mi1010z1t-1cp11",
  4951. .data = &multi_inno_mi1010z1t_1cp11,
  4952. }, {
  4953. .compatible = "nec,nl12880bc20-05",
  4954. .data = &nec_nl12880bc20_05,
  4955. }, {
  4956. .compatible = "nec,nl4827hc19-05b",
  4957. .data = &nec_nl4827hc19_05b,
  4958. }, {
  4959. .compatible = "netron-dy,e231732",
  4960. .data = &netron_dy_e231732,
  4961. }, {
  4962. .compatible = "newhaven,nhd-4.3-480272ef-atxl",
  4963. .data = &newhaven_nhd_43_480272ef_atxl,
  4964. }, {
  4965. .compatible = "nlt,nl13676bc25-03f",
  4966. .data = &nlt_nl13676bc25_03f,
  4967. }, {
  4968. .compatible = "nlt,nl192108ac18-02d",
  4969. .data = &nlt_nl192108ac18_02d,
  4970. }, {
  4971. .compatible = "nvd,9128",
  4972. .data = &nvd_9128,
  4973. }, {
  4974. .compatible = "okaya,rs800480t-7x0gp",
  4975. .data = &okaya_rs800480t_7x0gp,
  4976. }, {
  4977. .compatible = "olimex,lcd-olinuxino-43-ts",
  4978. .data = &olimex_lcd_olinuxino_43ts,
  4979. }, {
  4980. .compatible = "olimex,lcd-olinuxino-5-cts",
  4981. .data = &olimex_lcd_olinuxino_5cts,
  4982. }, {
  4983. .compatible = "ontat,kd50g21-40nt-a1",
  4984. .data = &ontat_kd50g21_40nt_a1,
  4985. }, {
  4986. .compatible = "ontat,yx700wv03",
  4987. .data = &ontat_yx700wv03,
  4988. }, {
  4989. .compatible = "ortustech,com37h3m05dtc",
  4990. .data = &ortustech_com37h3m,
  4991. }, {
  4992. .compatible = "ortustech,com37h3m99dtc",
  4993. .data = &ortustech_com37h3m,
  4994. }, {
  4995. .compatible = "ortustech,com43h4m85ulc",
  4996. .data = &ortustech_com43h4m85ulc,
  4997. }, {
  4998. .compatible = "osddisplays,osd070t1718-19ts",
  4999. .data = &osddisplays_osd070t1718_19ts,
  5000. }, {
  5001. .compatible = "pda,91-00156-a0",
  5002. .data = &pda_91_00156_a0,
  5003. }, {
  5004. .compatible = "powertip,ph128800t004-zza01",
  5005. .data = &powertip_ph128800t004_zza01,
  5006. }, {
  5007. .compatible = "powertip,ph128800t006-zhc01",
  5008. .data = &powertip_ph128800t006_zhc01,
  5009. }, {
  5010. .compatible = "powertip,ph800480t013-idf02",
  5011. .data = &powertip_ph800480t013_idf02,
  5012. }, {
  5013. .compatible = "primeview,pm070wl4",
  5014. .data = &primeview_pm070wl4,
  5015. }, {
  5016. .compatible = "qiaodian,qd43003c0-40",
  5017. .data = &qd43003c0_40,
  5018. }, {
  5019. .compatible = "qishenglong,gopher2b-lcd",
  5020. .data = &qishenglong_gopher2b_lcd,
  5021. }, {
  5022. .compatible = "raystar,rff500f-awh-dnn",
  5023. .data = &raystar_rff500f_awh_dnn,
  5024. }, {
  5025. .compatible = "rocktech,rk043fn48h",
  5026. .data = &rocktech_rk043fn48h,
  5027. }, {
  5028. .compatible = "rocktech,rk070er9427",
  5029. .data = &rocktech_rk070er9427,
  5030. }, {
  5031. .compatible = "rocktech,rk101ii01d-ct",
  5032. .data = &rocktech_rk101ii01d_ct,
  5033. }, {
  5034. .compatible = "samsung,ltl101al01",
  5035. .data = &samsung_ltl101al01,
  5036. }, {
  5037. .compatible = "samsung,ltl106al01",
  5038. .data = &samsung_ltl106al01,
  5039. }, {
  5040. .compatible = "samsung,ltn101nt05",
  5041. .data = &samsung_ltn101nt05,
  5042. }, {
  5043. .compatible = "satoz,sat050at40h12r2",
  5044. .data = &satoz_sat050at40h12r2,
  5045. }, {
  5046. .compatible = "sharp,lq035q7db03",
  5047. .data = &sharp_lq035q7db03,
  5048. }, {
  5049. .compatible = "sharp,lq070y3dg3b",
  5050. .data = &sharp_lq070y3dg3b,
  5051. }, {
  5052. .compatible = "sharp,lq101k1ly04",
  5053. .data = &sharp_lq101k1ly04,
  5054. }, {
  5055. .compatible = "sharp,ls020b1dd01d",
  5056. .data = &sharp_ls020b1dd01d,
  5057. }, {
  5058. .compatible = "shelly,sca07010-bfn-lnn",
  5059. .data = &shelly_sca07010_bfn_lnn,
  5060. }, {
  5061. .compatible = "starry,kr070pe2t",
  5062. .data = &starry_kr070pe2t,
  5063. }, {
  5064. .compatible = "startek,kd070wvfpa",
  5065. .data = &startek_kd070wvfpa,
  5066. }, {
  5067. .compatible = "team-source-display,tst043015cmhx",
  5068. .data = &tsd_tst043015cmhx,
  5069. }, {
  5070. .compatible = "tfc,s9700rtwv43tr-01b",
  5071. .data = &tfc_s9700rtwv43tr_01b,
  5072. }, {
  5073. .compatible = "tianma,p0700wxf1mbaa",
  5074. .data = &tianma_p0700wxf1mbaa,
  5075. }, {
  5076. .compatible = "tianma,tm070jdhg30",
  5077. .data = &tianma_tm070jdhg30,
  5078. }, {
  5079. .compatible = "tianma,tm070jdhg34-00",
  5080. .data = &tianma_tm070jdhg34_00,
  5081. }, {
  5082. .compatible = "tianma,tm070jvhg33",
  5083. .data = &tianma_tm070jvhg33,
  5084. }, {
  5085. .compatible = "tianma,tm070rvhg71",
  5086. .data = &tianma_tm070rvhg71,
  5087. }, {
  5088. .compatible = "ti,nspire-cx-lcd-panel",
  5089. .data = &ti_nspire_cx_lcd_panel,
  5090. }, {
  5091. .compatible = "ti,nspire-classic-lcd-panel",
  5092. .data = &ti_nspire_classic_lcd_panel,
  5093. }, {
  5094. .compatible = "toshiba,lt089ac29000",
  5095. .data = &toshiba_lt089ac29000,
  5096. }, {
  5097. .compatible = "topland,tian-g07017-01",
  5098. .data = &topland_tian_g07017_01,
  5099. }, {
  5100. .compatible = "tpk,f07a-0102",
  5101. .data = &tpk_f07a_0102,
  5102. }, {
  5103. .compatible = "tpk,f10a-0102",
  5104. .data = &tpk_f10a_0102,
  5105. }, {
  5106. .compatible = "urt,umsh-8596md-t",
  5107. .data = &urt_umsh_8596md_parallel,
  5108. }, {
  5109. .compatible = "urt,umsh-8596md-1t",
  5110. .data = &urt_umsh_8596md_parallel,
  5111. }, {
  5112. .compatible = "urt,umsh-8596md-7t",
  5113. .data = &urt_umsh_8596md_parallel,
  5114. }, {
  5115. .compatible = "urt,umsh-8596md-11t",
  5116. .data = &urt_umsh_8596md_lvds,
  5117. }, {
  5118. .compatible = "urt,umsh-8596md-19t",
  5119. .data = &urt_umsh_8596md_lvds,
  5120. }, {
  5121. .compatible = "urt,umsh-8596md-20t",
  5122. .data = &urt_umsh_8596md_parallel,
  5123. }, {
  5124. .compatible = "vivax,tpc9150-panel",
  5125. .data = &vivax_tpc9150_panel,
  5126. }, {
  5127. .compatible = "vxt,vl050-8048nt-c01",
  5128. .data = &vl050_8048nt_c01,
  5129. }, {
  5130. .compatible = "winstar,wf35ltiacd",
  5131. .data = &winstar_wf35ltiacd,
  5132. }, {
  5133. .compatible = "yes-optoelectronics,ytc700tlag-05-201c",
  5134. .data = &yes_optoelectronics_ytc700tlag_05_201c,
  5135. }, {
  5136. .compatible = "microchip,ac69t88a",
  5137. .data = &mchp_ac69t88a,
  5138. }, {
  5139. /* Must be the last entry */
  5140. .compatible = "panel-dpi",
  5141. /*
  5142. * Explicitly NULL, the panel_desc structure will be
  5143. * allocated by panel_dpi_probe().
  5144. */
  5145. .data = NULL,
  5146. }, {
  5147. /* sentinel */
  5148. }
  5149. };
  5150. MODULE_DEVICE_TABLE(of, platform_of_match);
  5151. static int panel_simple_platform_probe(struct platform_device *pdev)
  5152. {
  5153. struct panel_simple *panel;
  5154. panel = panel_simple_probe(&pdev->dev);
  5155. if (IS_ERR(panel))
  5156. return PTR_ERR(panel);
  5157. return 0;
  5158. }
  5159. static void panel_simple_platform_remove(struct platform_device *pdev)
  5160. {
  5161. panel_simple_remove(&pdev->dev);
  5162. }
  5163. static void panel_simple_platform_shutdown(struct platform_device *pdev)
  5164. {
  5165. panel_simple_shutdown(&pdev->dev);
  5166. }
  5167. static const struct dev_pm_ops panel_simple_pm_ops = {
  5168. SET_RUNTIME_PM_OPS(panel_simple_suspend, panel_simple_resume, NULL)
  5169. SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
  5170. pm_runtime_force_resume)
  5171. };
  5172. static struct platform_driver panel_simple_platform_driver = {
  5173. .driver = {
  5174. .name = "panel-simple",
  5175. .of_match_table = platform_of_match,
  5176. .pm = &panel_simple_pm_ops,
  5177. },
  5178. .probe = panel_simple_platform_probe,
  5179. .remove = panel_simple_platform_remove,
  5180. .shutdown = panel_simple_platform_shutdown,
  5181. };
  5182. static const struct drm_display_mode auo_b080uan01_mode = {
  5183. .clock = 154500,
  5184. .hdisplay = 1200,
  5185. .hsync_start = 1200 + 62,
  5186. .hsync_end = 1200 + 62 + 4,
  5187. .htotal = 1200 + 62 + 4 + 62,
  5188. .vdisplay = 1920,
  5189. .vsync_start = 1920 + 9,
  5190. .vsync_end = 1920 + 9 + 2,
  5191. .vtotal = 1920 + 9 + 2 + 8,
  5192. };
  5193. static const struct panel_desc_dsi auo_b080uan01 = {
  5194. .desc = {
  5195. .modes = &auo_b080uan01_mode,
  5196. .num_modes = 1,
  5197. .bpc = 8,
  5198. .size = {
  5199. .width = 108,
  5200. .height = 272,
  5201. },
  5202. .connector_type = DRM_MODE_CONNECTOR_DSI,
  5203. },
  5204. .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS,
  5205. .format = MIPI_DSI_FMT_RGB888,
  5206. .lanes = 4,
  5207. };
  5208. static const struct drm_display_mode boe_tv080wum_nl0_mode = {
  5209. .clock = 160000,
  5210. .hdisplay = 1200,
  5211. .hsync_start = 1200 + 120,
  5212. .hsync_end = 1200 + 120 + 20,
  5213. .htotal = 1200 + 120 + 20 + 21,
  5214. .vdisplay = 1920,
  5215. .vsync_start = 1920 + 21,
  5216. .vsync_end = 1920 + 21 + 3,
  5217. .vtotal = 1920 + 21 + 3 + 18,
  5218. .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  5219. };
  5220. static const struct panel_desc_dsi boe_tv080wum_nl0 = {
  5221. .desc = {
  5222. .modes = &boe_tv080wum_nl0_mode,
  5223. .num_modes = 1,
  5224. .size = {
  5225. .width = 107,
  5226. .height = 172,
  5227. },
  5228. .connector_type = DRM_MODE_CONNECTOR_DSI,
  5229. },
  5230. .flags = MIPI_DSI_MODE_VIDEO |
  5231. MIPI_DSI_MODE_VIDEO_BURST |
  5232. MIPI_DSI_MODE_VIDEO_SYNC_PULSE,
  5233. .format = MIPI_DSI_FMT_RGB888,
  5234. .lanes = 4,
  5235. };
  5236. static const struct drm_display_mode lg_lh500wx1_sd03_mode = {
  5237. .clock = 67000,
  5238. .hdisplay = 720,
  5239. .hsync_start = 720 + 12,
  5240. .hsync_end = 720 + 12 + 4,
  5241. .htotal = 720 + 12 + 4 + 112,
  5242. .vdisplay = 1280,
  5243. .vsync_start = 1280 + 8,
  5244. .vsync_end = 1280 + 8 + 4,
  5245. .vtotal = 1280 + 8 + 4 + 12,
  5246. };
  5247. static const struct panel_desc_dsi lg_lh500wx1_sd03 = {
  5248. .desc = {
  5249. .modes = &lg_lh500wx1_sd03_mode,
  5250. .num_modes = 1,
  5251. .bpc = 8,
  5252. .size = {
  5253. .width = 62,
  5254. .height = 110,
  5255. },
  5256. .connector_type = DRM_MODE_CONNECTOR_DSI,
  5257. },
  5258. .flags = MIPI_DSI_MODE_VIDEO,
  5259. .format = MIPI_DSI_FMT_RGB888,
  5260. .lanes = 4,
  5261. };
  5262. static const struct drm_display_mode panasonic_vvx10f004b00_mode = {
  5263. .clock = 157200,
  5264. .hdisplay = 1920,
  5265. .hsync_start = 1920 + 154,
  5266. .hsync_end = 1920 + 154 + 16,
  5267. .htotal = 1920 + 154 + 16 + 32,
  5268. .vdisplay = 1200,
  5269. .vsync_start = 1200 + 17,
  5270. .vsync_end = 1200 + 17 + 2,
  5271. .vtotal = 1200 + 17 + 2 + 16,
  5272. };
  5273. static const struct panel_desc_dsi panasonic_vvx10f004b00 = {
  5274. .desc = {
  5275. .modes = &panasonic_vvx10f004b00_mode,
  5276. .num_modes = 1,
  5277. .bpc = 8,
  5278. .size = {
  5279. .width = 217,
  5280. .height = 136,
  5281. },
  5282. .connector_type = DRM_MODE_CONNECTOR_DSI,
  5283. },
  5284. .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
  5285. MIPI_DSI_CLOCK_NON_CONTINUOUS,
  5286. .format = MIPI_DSI_FMT_RGB888,
  5287. .lanes = 4,
  5288. };
  5289. static const struct drm_display_mode lg_acx467akm_7_mode = {
  5290. .clock = 150000,
  5291. .hdisplay = 1080,
  5292. .hsync_start = 1080 + 2,
  5293. .hsync_end = 1080 + 2 + 2,
  5294. .htotal = 1080 + 2 + 2 + 2,
  5295. .vdisplay = 1920,
  5296. .vsync_start = 1920 + 2,
  5297. .vsync_end = 1920 + 2 + 2,
  5298. .vtotal = 1920 + 2 + 2 + 2,
  5299. };
  5300. static const struct panel_desc_dsi lg_acx467akm_7 = {
  5301. .desc = {
  5302. .modes = &lg_acx467akm_7_mode,
  5303. .num_modes = 1,
  5304. .bpc = 8,
  5305. .size = {
  5306. .width = 62,
  5307. .height = 110,
  5308. },
  5309. .connector_type = DRM_MODE_CONNECTOR_DSI,
  5310. },
  5311. .flags = 0,
  5312. .format = MIPI_DSI_FMT_RGB888,
  5313. .lanes = 4,
  5314. };
  5315. static const struct drm_display_mode osd101t2045_53ts_mode = {
  5316. .clock = 154500,
  5317. .hdisplay = 1920,
  5318. .hsync_start = 1920 + 112,
  5319. .hsync_end = 1920 + 112 + 16,
  5320. .htotal = 1920 + 112 + 16 + 32,
  5321. .vdisplay = 1200,
  5322. .vsync_start = 1200 + 16,
  5323. .vsync_end = 1200 + 16 + 2,
  5324. .vtotal = 1200 + 16 + 2 + 16,
  5325. .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
  5326. };
  5327. static const struct panel_desc_dsi osd101t2045_53ts = {
  5328. .desc = {
  5329. .modes = &osd101t2045_53ts_mode,
  5330. .num_modes = 1,
  5331. .bpc = 8,
  5332. .size = {
  5333. .width = 217,
  5334. .height = 136,
  5335. },
  5336. .connector_type = DRM_MODE_CONNECTOR_DSI,
  5337. },
  5338. .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
  5339. MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
  5340. MIPI_DSI_MODE_NO_EOT_PACKET,
  5341. .format = MIPI_DSI_FMT_RGB888,
  5342. .lanes = 4,
  5343. };
  5344. static const struct of_device_id dsi_of_match[] = {
  5345. {
  5346. .compatible = "auo,b080uan01",
  5347. .data = &auo_b080uan01
  5348. }, {
  5349. .compatible = "boe,tv080wum-nl0",
  5350. .data = &boe_tv080wum_nl0
  5351. }, {
  5352. .compatible = "lg,lh500wx1-sd03",
  5353. .data = &lg_lh500wx1_sd03
  5354. }, {
  5355. .compatible = "panasonic,vvx10f004b00",
  5356. .data = &panasonic_vvx10f004b00
  5357. }, {
  5358. .compatible = "lg,acx467akm-7",
  5359. .data = &lg_acx467akm_7
  5360. }, {
  5361. .compatible = "osddisplays,osd101t2045-53ts",
  5362. .data = &osd101t2045_53ts
  5363. }, {
  5364. /* sentinel */
  5365. }
  5366. };
  5367. MODULE_DEVICE_TABLE(of, dsi_of_match);
  5368. static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi)
  5369. {
  5370. const struct panel_desc_dsi *desc;
  5371. struct panel_simple *panel;
  5372. int err;
  5373. panel = panel_simple_probe(&dsi->dev);
  5374. if (IS_ERR(panel))
  5375. return PTR_ERR(panel);
  5376. desc = container_of(panel->desc, struct panel_desc_dsi, desc);
  5377. dsi->mode_flags = desc->flags;
  5378. dsi->format = desc->format;
  5379. dsi->lanes = desc->lanes;
  5380. err = mipi_dsi_attach(dsi);
  5381. if (err) {
  5382. struct panel_simple *panel = mipi_dsi_get_drvdata(dsi);
  5383. drm_panel_remove(&panel->base);
  5384. }
  5385. return err;
  5386. }
  5387. static void panel_simple_dsi_remove(struct mipi_dsi_device *dsi)
  5388. {
  5389. int err;
  5390. err = mipi_dsi_detach(dsi);
  5391. if (err < 0)
  5392. dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err);
  5393. panel_simple_remove(&dsi->dev);
  5394. }
  5395. static void panel_simple_dsi_shutdown(struct mipi_dsi_device *dsi)
  5396. {
  5397. panel_simple_shutdown(&dsi->dev);
  5398. }
  5399. static struct mipi_dsi_driver panel_simple_dsi_driver = {
  5400. .driver = {
  5401. .name = "panel-simple-dsi",
  5402. .of_match_table = dsi_of_match,
  5403. .pm = &panel_simple_pm_ops,
  5404. },
  5405. .probe = panel_simple_dsi_probe,
  5406. .remove = panel_simple_dsi_remove,
  5407. .shutdown = panel_simple_dsi_shutdown,
  5408. };
  5409. static int __init panel_simple_init(void)
  5410. {
  5411. int err;
  5412. err = platform_driver_register(&panel_simple_platform_driver);
  5413. if (err < 0)
  5414. return err;
  5415. if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) {
  5416. err = mipi_dsi_driver_register(&panel_simple_dsi_driver);
  5417. if (err < 0)
  5418. goto err_did_platform_register;
  5419. }
  5420. return 0;
  5421. err_did_platform_register:
  5422. platform_driver_unregister(&panel_simple_platform_driver);
  5423. return err;
  5424. }
  5425. module_init(panel_simple_init);
  5426. static void __exit panel_simple_exit(void)
  5427. {
  5428. if (IS_ENABLED(CONFIG_DRM_MIPI_DSI))
  5429. mipi_dsi_driver_unregister(&panel_simple_dsi_driver);
  5430. platform_driver_unregister(&panel_simple_platform_driver);
  5431. }
  5432. module_exit(panel_simple_exit);
  5433. MODULE_AUTHOR("Thierry Reding <treding@nvidia.com>");
  5434. MODULE_DESCRIPTION("DRM Driver for Simple Panels");
  5435. MODULE_LICENSE("GPL and additional rights");