1
0

011-dt-sync-dts-files-with-kernel.patch 173 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211
  1. From 80e5f83c0fc4bf42110cc55ce671ad7ddc7b08a4 Mon Sep 17 00:00:00 2001
  2. From: Hans de Goede <hdegoede@redhat.com>
  3. Date: Mon, 14 Mar 2016 17:37:09 +0100
  4. Subject: [PATCH] sunxi: Sync dts files with the upstream kernel
  5. Sync dts files with the upstream kernel including
  6. changes queued for 4.6:
  7. https://git.kernel.org/cgit/linux/kernel/git/mripard/linux.git/commit/?h=sunxi/dt-for-4.6
  8. Note this adds a number of new unused board dts files. I've asked the
  9. authors of the kernel commits adding these to submit a matching defconfig
  10. to u-boot.
  11. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  12. Acked-by: Ian Campbell <ijc@hellion.org.uk>
  13. ---
  14. arch/arm/dts/Makefile | 8 +-
  15. arch/arm/dts/axp22x.dtsi | 145 ++++++++++++
  16. arch/arm/dts/sun4i-a10-a1000.dts | 4 +
  17. arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts | 22 ++
  18. arch/arm/dts/sun4i-a10-cubieboard.dts | 4 +
  19. arch/arm/dts/sun4i-a10-gemei-g9.dts | 63 +++++-
  20. arch/arm/dts/sun4i-a10-inet1.dts | 48 ++++
  21. arch/arm/dts/sun4i-a10-inet97fv2.dts | 127 ++++++++++-
  22. arch/arm/dts/sun4i-a10-inet9f-rev03.dts | 181 +++++++++++++++
  23. arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts | 86 +------
  24. arch/arm/dts/sun4i-a10-jesurun-q5.dts | 15 ++
  25. arch/arm/dts/sun4i-a10-marsboard.dts | 23 ++
  26. arch/arm/dts/sun4i-a10-mk802.dts | 37 +++
  27. arch/arm/dts/sun4i-a10-olinuxino-lime.dts | 12 +
  28. arch/arm/dts/sun4i-a10-pcduino.dts | 58 ++++-
  29. arch/arm/dts/sun4i-a10-pcduino2.dts | 78 +++++++
  30. arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts | 69 ++++++
  31. arch/arm/dts/sun4i-a10.dtsi | 153 +++++++++++--
  32. arch/arm/dts/sun5i-a10s-auxtek-t004.dts | 14 ++
  33. arch/arm/dts/sun5i-a10s-olinuxino-micro.dts | 2 +-
  34. arch/arm/dts/sun5i-a13-empire-electronix-d709.dts | 19 +-
  35. arch/arm/dts/sun5i-a13-inet-98v-rev2.dts | 26 +--
  36. arch/arm/dts/sun5i-a13-utoo-p66.dts | 30 +++
  37. arch/arm/dts/sun5i-q8-common.dtsi | 10 +
  38. arch/arm/dts/sun5i-r8-chip.dts | 47 +++-
  39. arch/arm/dts/sun5i.dtsi | 31 +++
  40. arch/arm/dts/sun6i-a31-colombus.dts | 24 ++
  41. arch/arm/dts/sun6i-a31-hummingbird.dts | 132 ++++++-----
  42. arch/arm/dts/sun6i-a31.dtsi | 65 +++++-
  43. arch/arm/dts/sun6i-a31s-primo81.dts | 247 ++++++++++++++++++++-
  44. arch/arm/dts/sun6i-a31s-sina31s-core.dtsi | 142 ++++++++++++
  45. arch/arm/dts/sun6i-a31s-sina31s.dts | 153 +++++++++++++
  46. .../arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts | 205 +++++++++++++++++
  47. arch/arm/dts/sun7i-a20-bananapi.dts | 78 ++++++-
  48. arch/arm/dts/sun7i-a20-cubieboard2.dts | 23 ++
  49. arch/arm/dts/sun7i-a20-cubietruck.dts | 4 +
  50. arch/arm/dts/sun7i-a20-icnova-swac.dts | 169 ++++++++++++++
  51. arch/arm/dts/sun7i-a20-itead-ibox.dts | 125 +++++++++++
  52. arch/arm/dts/sun7i-a20-lamobo-r1.dts | 10 -
  53. arch/arm/dts/sun7i-a20-mk808c.dts | 39 ++++
  54. arch/arm/dts/sun7i-a20-olimex-som-evb.dts | 95 ++++++--
  55. arch/arm/dts/sun7i-a20-olinuxino-lime.dts | 12 +
  56. arch/arm/dts/sun7i-a20-olinuxino-lime2.dts | 47 ++++
  57. arch/arm/dts/sun7i-a20-olinuxino-micro.dts | 6 +
  58. arch/arm/dts/sun7i-a20-orangepi-mini.dts | 33 +++
  59. arch/arm/dts/sun7i-a20-orangepi.dts | 29 +++
  60. arch/arm/dts/sun7i-a20-pcduino3-nano.dts | 69 +++++-
  61. arch/arm/dts/sun7i-a20-pcduino3.dts | 58 ++++-
  62. arch/arm/dts/sun7i-a20-wexler-tab7200.dts | 90 +++++++-
  63. arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts | 187 +++++++++++++++-
  64. arch/arm/dts/sun7i-a20.dtsi | 113 +++++++++-
  65. arch/arm/dts/sun8i-a23-a33.dtsi | 71 ++++--
  66. arch/arm/dts/sun8i-a23-gt90h-v4.dts | 120 +++++++++-
  67. arch/arm/dts/sun8i-a23.dtsi | 25 +++
  68. arch/arm/dts/sun8i-a33-sinlinx-sina33.dts | 83 ++++++-
  69. arch/arm/dts/sun8i-a33.dtsi | 45 ++++
  70. arch/arm/dts/sun8i-a83t-cubietruck-plus.dts | 65 ++++++
  71. arch/arm/dts/sun8i-a83t.dtsi | 125 +++++------
  72. arch/arm/dts/sun8i-h3-orangepi-pc.dts | 69 ++++++
  73. arch/arm/dts/sun8i-h3-orangepi-plus.dts | 63 ++++++
  74. arch/arm/dts/sun8i-h3.dtsi | 189 +++++++++++-----
  75. arch/arm/dts/sun8i-q8-common.dtsi | 96 +++++++-
  76. arch/arm/dts/sun9i-a80-cubieboard4.dts | 36 +++
  77. arch/arm/dts/sun9i-a80-optimus.dts | 48 ++--
  78. arch/arm/dts/sun9i-a80.dtsi | 204 +++++++++++++++--
  79. arch/arm/dts/sunxi-itead-core-common.dtsi | 136 ++++++++++++
  80. arch/arm/dts/sunxi-q8-common.dtsi | 6 +
  81. 67 files changed, 4351 insertions(+), 497 deletions(-)
  82. create mode 100644 arch/arm/dts/axp22x.dtsi
  83. create mode 100644 arch/arm/dts/sun4i-a10-pcduino2.dts
  84. create mode 100644 arch/arm/dts/sun6i-a31s-sina31s-core.dtsi
  85. create mode 100644 arch/arm/dts/sun6i-a31s-sina31s.dts
  86. create mode 100644 arch/arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts
  87. create mode 100644 arch/arm/dts/sun7i-a20-icnova-swac.dts
  88. create mode 100644 arch/arm/dts/sun7i-a20-itead-ibox.dts
  89. create mode 100644 arch/arm/dts/sun8i-a83t-cubietruck-plus.dts
  90. create mode 100644 arch/arm/dts/sunxi-itead-core-common.dtsi
  91. --- a/arch/arm/dts/Makefile
  92. +++ b/arch/arm/dts/Makefile
  93. @@ -126,6 +126,7 @@ dtb-$(CONFIG_MACH_SUN4I) += \
  94. sun4i-a10-mk802ii.dtb \
  95. sun4i-a10-olinuxino-lime.dtb \
  96. sun4i-a10-pcduino.dtb \
  97. + sun4i-a10-pcduino2.dtb \
  98. sun4i-a10-pov-protab2-ips9.dtb
  99. dtb-$(CONFIG_MACH_SUN5I) += \
  100. sun5i-a10s-auxtek-t003.dtb \
  101. @@ -155,7 +156,9 @@ dtb-$(CONFIG_MACH_SUN6I) += \
  102. sun6i-a31-pangolin.dtb \
  103. sun6i-a31s-cs908.dtb \
  104. sun6i-a31s-primo81.dtb \
  105. - sun6i-a31s-sinovoip-bpi-m2.dtb
  106. + sun6i-a31s-sina31s.dtb \
  107. + sun6i-a31s-sinovoip-bpi-m2.dtb \
  108. + sun6i-a31s-yones-toptech-bs1078-v2.dtb
  109. dtb-$(CONFIG_MACH_SUN7I) += \
  110. sun7i-a20-ainol-aw1.dtb \
  111. sun7i-a20-bananapi.dtb \
  112. @@ -164,6 +167,8 @@ dtb-$(CONFIG_MACH_SUN7I) += \
  113. sun7i-a20-cubietruck.dtb \
  114. sun7i-a20-hummingbird.dtb \
  115. sun7i-a20-i12-tvbox.dtb \
  116. + sun7i-a20-icnova-swac.dtb \
  117. + sun7i-a20-itead-ibox.dtb \
  118. sun7i-a20-lamobo-r1.dtb \
  119. sun7i-a20-m3.dtb \
  120. sun7i-a20-m5.dtb \
  121. @@ -190,6 +195,7 @@ dtb-$(CONFIG_MACH_SUN8I_A33) += \
  122. sun8i-a33-sinlinx-sina33.dtb
  123. dtb-$(CONFIG_MACH_SUN8I_A83T) += \
  124. sun8i-a83t-allwinner-h8homlet-v2.dtb \
  125. + sun8i-a83t-cubietruck-plus.dtb \
  126. sun8i-a83t-sinovoip-bpi-m3.dtb
  127. dtb-$(CONFIG_MACH_SUN8I_H3) += \
  128. sun8i-h3-orangepi-pc.dtb \
  129. --- /dev/null
  130. +++ b/arch/arm/dts/axp22x.dtsi
  131. @@ -0,0 +1,145 @@
  132. +/*
  133. + * Copyright 2015 Chen-Yu Tsai
  134. + *
  135. + * Chen-Yu Tsai <wens@csie.org>
  136. + *
  137. + * This file is dual-licensed: you can use it either under the terms
  138. + * of the GPL or the X11 license, at your option. Note that this dual
  139. + * licensing only applies to this file, and not this project as a
  140. + * whole.
  141. + *
  142. + * a) This file is free software; you can redistribute it and/or
  143. + * modify it under the terms of the GNU General Public License as
  144. + * published by the Free Software Foundation; either version 2 of the
  145. + * License, or (at your option) any later version.
  146. + *
  147. + * This file is distributed in the hope that it will be useful,
  148. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  149. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  150. + * GNU General Public License for more details.
  151. + *
  152. + * Or, alternatively,
  153. + *
  154. + * b) Permission is hereby granted, free of charge, to any person
  155. + * obtaining a copy of this software and associated documentation
  156. + * files (the "Software"), to deal in the Software without
  157. + * restriction, including without limitation the rights to use,
  158. + * copy, modify, merge, publish, distribute, sublicense, and/or
  159. + * sell copies of the Software, and to permit persons to whom the
  160. + * Software is furnished to do so, subject to the following
  161. + * conditions:
  162. + *
  163. + * The above copyright notice and this permission notice shall be
  164. + * included in all copies or substantial portions of the Software.
  165. + *
  166. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  167. + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  168. + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  169. + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  170. + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  171. + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  172. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  173. + * OTHER DEALINGS IN THE SOFTWARE.
  174. + */
  175. +
  176. +/*
  177. + * AXP221/221s/223 Integrated Power Management Chip
  178. + * http://www.x-powers.com/product/AXP22X.php
  179. + * http://dl.linux-sunxi.org/AXP/AXP221%20Datasheet%20V1.2%2020130326%20.pdf
  180. + */
  181. +
  182. +&axp22x {
  183. + interrupt-controller;
  184. + #interrupt-cells = <1>;
  185. +
  186. + regulators {
  187. + /* Default work frequency for buck regulators */
  188. + x-powers,dcdc-freq = <3000>;
  189. +
  190. + reg_dcdc1: dcdc1 {
  191. + regulator-name = "dcdc1";
  192. + };
  193. +
  194. + reg_dcdc2: dcdc2 {
  195. + regulator-name = "dcdc2";
  196. + };
  197. +
  198. + reg_dcdc3: dcdc3 {
  199. + regulator-name = "dcdc3";
  200. + };
  201. +
  202. + reg_dcdc4: dcdc4 {
  203. + regulator-name = "dcdc4";
  204. + };
  205. +
  206. + reg_dcdc5: dcdc5 {
  207. + regulator-name = "dcdc5";
  208. + };
  209. +
  210. + reg_dc1sw: dc1sw {
  211. + regulator-name = "dc1sw";
  212. + };
  213. +
  214. + reg_dc5ldo: dc5ldo {
  215. + regulator-name = "dc5ldo";
  216. + };
  217. +
  218. + reg_aldo1: aldo1 {
  219. + regulator-name = "aldo1";
  220. + };
  221. +
  222. + reg_aldo2: aldo2 {
  223. + regulator-name = "aldo2";
  224. + };
  225. +
  226. + reg_aldo3: aldo3 {
  227. + regulator-name = "aldo3";
  228. + };
  229. +
  230. + reg_dldo1: dldo1 {
  231. + regulator-name = "dldo1";
  232. + };
  233. +
  234. + reg_dldo2: dldo2 {
  235. + regulator-name = "dldo2";
  236. + };
  237. +
  238. + reg_dldo3: dldo3 {
  239. + regulator-name = "dldo3";
  240. + };
  241. +
  242. + reg_dldo4: dldo4 {
  243. + regulator-name = "dldo4";
  244. + };
  245. +
  246. + reg_eldo1: eldo1 {
  247. + regulator-name = "eldo1";
  248. + };
  249. +
  250. + reg_eldo2: eldo2 {
  251. + regulator-name = "eldo2";
  252. + };
  253. +
  254. + reg_eldo3: eldo3 {
  255. + regulator-name = "eldo3";
  256. + };
  257. +
  258. + reg_ldo_io0: ldo_io0 {
  259. + regulator-name = "ldo_io0";
  260. + status = "disabled";
  261. + };
  262. +
  263. + reg_ldo_io1: ldo_io1 {
  264. + regulator-name = "ldo_io1";
  265. + status = "disabled";
  266. + };
  267. +
  268. + reg_rtc_ldo: rtc_ldo {
  269. + /* RTC_LDO is a fixed, always-on regulator */
  270. + regulator-always-on;
  271. + regulator-min-microvolt = <3000000>;
  272. + regulator-max-microvolt = <3000000>;
  273. + regulator-name = "rtc_ldo";
  274. + };
  275. + };
  276. +};
  277. --- a/arch/arm/dts/sun4i-a10-a1000.dts
  278. +++ b/arch/arm/dts/sun4i-a10-a1000.dts
  279. @@ -93,6 +93,10 @@
  280. status = "okay";
  281. };
  282. +&codec {
  283. + status = "okay";
  284. +};
  285. +
  286. &ehci0 {
  287. status = "okay";
  288. };
  289. --- a/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts
  290. +++ b/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts
  291. @@ -45,6 +45,7 @@
  292. #include "sunxi-common-regulators.dtsi"
  293. #include <dt-bindings/gpio/gpio.h>
  294. #include <dt-bindings/input/input.h>
  295. +#include <dt-bindings/interrupt-controller/irq.h>
  296. / {
  297. model = "Chuwi V7 CW0825";
  298. @@ -78,6 +79,27 @@
  299. };
  300. };
  301. +&i2c1 {
  302. + pinctrl-names = "default";
  303. + pinctrl-0 = <&i2c1_pins_a>;
  304. + status = "okay";
  305. +};
  306. +
  307. +&i2c2 {
  308. + pinctrl-names = "default";
  309. + pinctrl-0 = <&i2c2_pins_a>;
  310. + status = "okay";
  311. +
  312. + ft5306de4: touchscreen@38 {
  313. + compatible = "edt,edt-ft5406";
  314. + reg = <0x38>;
  315. + interrupt-parent = <&pio>;
  316. + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
  317. + touchscreen-size-x = <1024>;
  318. + touchscreen-size-y = <768>;
  319. + };
  320. +};
  321. +
  322. &lradc {
  323. vref-supply = <&reg_vcc3v0>;
  324. status = "okay";
  325. --- a/arch/arm/dts/sun4i-a10-cubieboard.dts
  326. +++ b/arch/arm/dts/sun4i-a10-cubieboard.dts
  327. @@ -83,6 +83,10 @@
  328. status = "okay";
  329. };
  330. +&codec {
  331. + status = "okay";
  332. +};
  333. +
  334. &cpu0 {
  335. cpu-supply = <&reg_dcdc2>;
  336. };
  337. --- a/arch/arm/dts/sun4i-a10-gemei-g9.dts
  338. +++ b/arch/arm/dts/sun4i-a10-gemei-g9.dts
  339. @@ -47,6 +47,7 @@
  340. #include "sunxi-common-regulators.dtsi"
  341. #include <dt-bindings/gpio/gpio.h>
  342. #include <dt-bindings/input/input.h>
  343. +#include <dt-bindings/interrupt-controller/irq.h>
  344. / {
  345. model = "Gemei G9 Tablet";
  346. @@ -64,12 +65,22 @@
  347. /*
  348. * TODO:
  349. * 2x cameras via CSI
  350. - * bma250 IRQs
  351. * AXP battery management
  352. * NAND
  353. * OTG
  354. * Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48
  355. */
  356. +&codec {
  357. + /* PH15 controls power to external amplifier (ft2012q) */
  358. + pinctrl-names = "default";
  359. + pinctrl-0 = <&codec_pa_pin>;
  360. + allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>;
  361. + status = "okay";
  362. +};
  363. +
  364. +&cpu0 {
  365. + cpu-supply = <&reg_dcdc2>;
  366. +};
  367. &ehci0 {
  368. status = "okay";
  369. @@ -85,15 +96,13 @@
  370. status = "okay";
  371. axp209: pmic@34 {
  372. - compatible = "x-powers,axp209";
  373. reg = <0x34>;
  374. interrupts = <0>;
  375. -
  376. - interrupt-controller;
  377. - #interrupt-cells = <1>;
  378. };
  379. };
  380. +#include "axp209.dtsi"
  381. +
  382. &i2c1 {
  383. pinctrl-names = "default";
  384. pinctrl-0 = <&i2c1_pins_a>;
  385. @@ -103,17 +112,13 @@
  386. bma250@18 {
  387. compatible = "bosch,bma250";
  388. reg = <0x18>;
  389. -
  390. - /*
  391. - * TODO: interrupt pins:
  392. - * int1 - PH00
  393. - * int2 - PI10
  394. - */
  395. + interrupt-parent = <&pio>;
  396. + interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH00 / EINT0 */
  397. };
  398. };
  399. &lradc {
  400. - vref-supply = <&reg_vcc3v0>;
  401. + vref-supply = <&reg_ldo2>;
  402. status = "okay";
  403. @@ -149,6 +154,40 @@
  404. status = "okay";
  405. };
  406. +&pio {
  407. + codec_pa_pin: codec_pa_pin@0 {
  408. + allwinner,pins = "PH15";
  409. + allwinner,function = "gpio_out";
  410. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  411. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  412. + };
  413. +};
  414. +
  415. +&reg_dcdc2 {
  416. + regulator-always-on;
  417. + regulator-min-microvolt = <1000000>;
  418. + regulator-max-microvolt = <1400000>;
  419. + regulator-name = "vdd-cpu";
  420. +};
  421. +
  422. +&reg_dcdc3 {
  423. + regulator-always-on;
  424. + regulator-min-microvolt = <1250000>;
  425. + regulator-max-microvolt = <1250000>;
  426. + regulator-name = "vdd-int-dll";
  427. +};
  428. +
  429. +&reg_ldo1 {
  430. + regulator-name = "vdd-rtc";
  431. +};
  432. +
  433. +&reg_ldo2 {
  434. + regulator-always-on;
  435. + regulator-min-microvolt = <3000000>;
  436. + regulator-max-microvolt = <3000000>;
  437. + regulator-name = "avcc";
  438. +};
  439. +
  440. &reg_usb1_vbus {
  441. status = "okay";
  442. };
  443. --- a/arch/arm/dts/sun4i-a10-inet1.dts
  444. +++ b/arch/arm/dts/sun4i-a10-inet1.dts
  445. @@ -47,6 +47,7 @@
  446. #include <dt-bindings/input/input.h>
  447. #include <dt-bindings/interrupt-controller/irq.h>
  448. #include <dt-bindings/pinctrl/sun4i-a10.h>
  449. +#include <dt-bindings/pwm/pwm.h>
  450. / {
  451. model = "iNet-1";
  452. @@ -56,11 +57,25 @@
  453. serial0 = &uart0;
  454. };
  455. + backlight: backlight {
  456. + compatible = "pwm-backlight";
  457. + pinctrl-names = "default";
  458. + pinctrl-0 = <&bl_en_pin_inet>;
  459. + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
  460. + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
  461. + default-brightness-level = <8>;
  462. + enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
  463. + };
  464. +
  465. chosen {
  466. stdout-path = "serial0:115200n8";
  467. };
  468. };
  469. +&codec {
  470. + status = "okay";
  471. +};
  472. +
  473. &cpu0 {
  474. cpu-supply = <&reg_dcdc2>;
  475. };
  476. @@ -104,6 +119,19 @@
  477. pinctrl-names = "default";
  478. pinctrl-0 = <&i2c2_pins_a>;
  479. status = "okay";
  480. +
  481. + ft5x: touchscreen@38 {
  482. + compatible = "edt,edt-ft5406";
  483. + reg = <0x38>;
  484. + interrupt-parent = <&pio>;
  485. + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
  486. + pinctrl-names = "default";
  487. + pinctrl-0 = <&touchscreen_wake_pin>;
  488. + wake-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* PB13 */
  489. + touchscreen-size-x = <600>;
  490. + touchscreen-size-y = <1024>;
  491. + touchscreen-swapped-x-y;
  492. + };
  493. };
  494. &lradc {
  495. @@ -151,6 +179,20 @@
  496. };
  497. &pio {
  498. + bl_en_pin_inet: bl_en_pin@0 {
  499. + allwinner,pins = "PH7";
  500. + allwinner,function = "gpio_out";
  501. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  502. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  503. + };
  504. +
  505. + touchscreen_wake_pin: touchscreen_wake_pin@0 {
  506. + allwinner,pins = "PB13";
  507. + allwinner,function = "gpio_out";
  508. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  509. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  510. + };
  511. +
  512. usb0_id_detect_pin: usb0_id_detect_pin@0 {
  513. allwinner,pins = "PH4";
  514. allwinner,function = "gpio_in";
  515. @@ -166,6 +208,12 @@
  516. };
  517. };
  518. +&pwm {
  519. + pinctrl-names = "default";
  520. + pinctrl-0 = <&pwm0_pins_a>;
  521. + status = "okay";
  522. +};
  523. +
  524. &reg_dcdc2 {
  525. regulator-always-on;
  526. regulator-min-microvolt = <1000000>;
  527. --- a/arch/arm/dts/sun4i-a10-inet97fv2.dts
  528. +++ b/arch/arm/dts/sun4i-a10-inet97fv2.dts
  529. @@ -47,6 +47,8 @@
  530. #include "sunxi-common-regulators.dtsi"
  531. #include <dt-bindings/gpio/gpio.h>
  532. +#include <dt-bindings/input/input.h>
  533. +#include <dt-bindings/interrupt-controller/irq.h>
  534. / {
  535. model = "INet-97F Rev 02";
  536. @@ -61,8 +63,8 @@
  537. };
  538. };
  539. -&ehci0 {
  540. - status = "okay";
  541. +&cpu0 {
  542. + cpu-supply = <&reg_dcdc2>;
  543. };
  544. &ehci1 {
  545. @@ -75,12 +77,71 @@
  546. status = "okay";
  547. axp209: pmic@34 {
  548. - compatible = "x-powers,axp209";
  549. reg = <0x34>;
  550. interrupts = <0>;
  551. + };
  552. +};
  553. +
  554. +#include "axp209.dtsi"
  555. +
  556. +&i2c1 {
  557. + pinctrl-names = "default";
  558. + pinctrl-0 = <&i2c1_pins_a>;
  559. + status = "okay";
  560. +};
  561. +
  562. +&i2c2 {
  563. + pinctrl-names = "default";
  564. + pinctrl-0 = <&i2c2_pins_a>;
  565. + status = "okay";
  566. +
  567. + ft5406ee8: touchscreen@38 {
  568. + compatible = "edt,edt-ft5406";
  569. + reg = <0x38>;
  570. + interrupt-parent = <&pio>;
  571. + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
  572. + touchscreen-size-x = <800>;
  573. + touchscreen-size-y = <480>;
  574. + };
  575. +};
  576. +
  577. +&lradc {
  578. + vref-supply = <&reg_ldo2>;
  579. + status = "okay";
  580. +
  581. + button@200 {
  582. + label = "Menu";
  583. + linux,code = <KEY_MENU>;
  584. + channel = <0>;
  585. + voltage = <200000>;
  586. + };
  587. +
  588. + button@600 {
  589. + label = "Volume Up";
  590. + linux,code = <KEY_VOLUMEUP>;
  591. + channel = <0>;
  592. + voltage = <600000>;
  593. + };
  594. - interrupt-controller;
  595. - #interrupt-cells = <1>;
  596. + button@800 {
  597. + label = "Volume Down";
  598. + linux,code = <KEY_VOLUMEDOWN>;
  599. + channel = <0>;
  600. + voltage = <800000>;
  601. + };
  602. +
  603. + button@1000 {
  604. + label = "Home";
  605. + linux,code = <KEY_HOMEPAGE>;
  606. + channel = <0>;
  607. + voltage = <1000000>;
  608. + };
  609. +
  610. + button@1200 {
  611. + label = "Esc";
  612. + linux,code = <KEY_ESC>;
  613. + channel = <0>;
  614. + voltage = <1200000>;
  615. };
  616. };
  617. @@ -94,15 +155,52 @@
  618. status = "okay";
  619. };
  620. -&ohci0 {
  621. +&otg_sram {
  622. status = "okay";
  623. };
  624. -&ohci1 {
  625. - status = "okay";
  626. +&pio {
  627. + usb0_id_detect_pin: usb0_id_detect_pin@0 {
  628. + allwinner,pins = "PH4";
  629. + allwinner,function = "gpio_in";
  630. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  631. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  632. + };
  633. +
  634. + usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
  635. + allwinner,pins = "PH5";
  636. + allwinner,function = "gpio_in";
  637. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  638. + allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
  639. + };
  640. +};
  641. +
  642. +&reg_dcdc2 {
  643. + regulator-always-on;
  644. + regulator-min-microvolt = <1000000>;
  645. + regulator-max-microvolt = <1400000>;
  646. + regulator-name = "vdd-cpu";
  647. };
  648. -&reg_usb1_vbus {
  649. +&reg_dcdc3 {
  650. + regulator-always-on;
  651. + regulator-min-microvolt = <1250000>;
  652. + regulator-max-microvolt = <1250000>;
  653. + regulator-name = "vdd-int-dll";
  654. +};
  655. +
  656. +&reg_ldo1 {
  657. + regulator-name = "vdd-rtc";
  658. +};
  659. +
  660. +&reg_ldo2 {
  661. + regulator-always-on;
  662. + regulator-min-microvolt = <3000000>;
  663. + regulator-max-microvolt = <3000000>;
  664. + regulator-name = "avcc";
  665. +};
  666. +
  667. +&reg_usb0_vbus {
  668. status = "okay";
  669. };
  670. @@ -116,8 +214,17 @@
  671. status = "okay";
  672. };
  673. +&usb_otg {
  674. + dr_mode = "otg";
  675. + status = "okay";
  676. +};
  677. +
  678. &usbphy {
  679. - usb1_vbus-supply = <&reg_usb1_vbus>;
  680. + pinctrl-names = "default";
  681. + pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
  682. + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  683. + usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
  684. + usb0_vbus-supply = <&reg_usb0_vbus>;
  685. usb2_vbus-supply = <&reg_usb2_vbus>;
  686. status = "okay";
  687. };
  688. --- a/arch/arm/dts/sun4i-a10-inet9f-rev03.dts
  689. +++ b/arch/arm/dts/sun4i-a10-inet9f-rev03.dts
  690. @@ -59,6 +59,159 @@
  691. chosen {
  692. stdout-path = "serial0:115200n8";
  693. };
  694. +
  695. + gpio_keys {
  696. + compatible = "gpio-keys-polled";
  697. + pinctrl-names = "default";
  698. + pinctrl-0 = <&key_pins_inet9f>;
  699. + #address-cells = <1>;
  700. + #size-cells = <0>;
  701. + poll-interval = <20>;
  702. +
  703. + button@0 {
  704. + label = "Left Joystick Left";
  705. + linux,code = <ABS_X>;
  706. + linux,input-type = <EV_ABS>;
  707. + linux,input-value = <0xffffffff>; /* -1 */
  708. + gpios = <&pio 0 6 GPIO_ACTIVE_LOW>; /* PA6 */
  709. + };
  710. +
  711. + button@1 {
  712. + label = "Left Joystick Right";
  713. + linux,code = <ABS_X>;
  714. + linux,input-type = <EV_ABS>;
  715. + linux,input-value = <1>;
  716. + gpios = <&pio 0 5 GPIO_ACTIVE_LOW>; /* PA5 */
  717. + };
  718. +
  719. + button@2 {
  720. + label = "Left Joystick Up";
  721. + linux,code = <ABS_Y>;
  722. + linux,input-type = <EV_ABS>;
  723. + linux,input-value = <0xffffffff>; /* -1 */
  724. + gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */
  725. + };
  726. +
  727. + button@3 {
  728. + label = "Left Joystick Down";
  729. + linux,code = <ABS_Y>;
  730. + linux,input-type = <EV_ABS>;
  731. + linux,input-value = <1>;
  732. + gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */
  733. + };
  734. +
  735. + button@4 {
  736. + label = "Right Joystick Left";
  737. + linux,code = <ABS_Z>;
  738. + linux,input-type = <EV_ABS>;
  739. + linux,input-value = <0xffffffff>; /* -1 */
  740. + gpios = <&pio 0 1 GPIO_ACTIVE_LOW>; /* PA1 */
  741. + };
  742. +
  743. + button@5 {
  744. + label = "Right Joystick Right";
  745. + linux,code = <ABS_Z>;
  746. + linux,input-type = <EV_ABS>;
  747. + linux,input-value = <1>;
  748. + gpios = <&pio 0 0 GPIO_ACTIVE_LOW>; /* PA0 */
  749. + };
  750. +
  751. + button@6 {
  752. + label = "Right Joystick Up";
  753. + linux,code = <ABS_RZ>;
  754. + linux,input-type = <EV_ABS>;
  755. + linux,input-value = <0xffffffff>; /* -1 */
  756. + gpios = <&pio 0 3 GPIO_ACTIVE_LOW>; /* PA3 */
  757. + };
  758. +
  759. + button@7 {
  760. + label = "Right Joystick Down";
  761. + linux,code = <ABS_RZ>;
  762. + linux,input-type = <EV_ABS>;
  763. + linux,input-value = <1>;
  764. + gpios = <&pio 0 4 GPIO_ACTIVE_LOW>; /* PA4 */
  765. + };
  766. +
  767. + button@8 {
  768. + label = "DPad Left";
  769. + linux,code = <ABS_HAT0X>;
  770. + linux,input-type = <EV_ABS>;
  771. + linux,input-value = <0xffffffff>; /* -1 */
  772. + gpios = <&pio 7 23 GPIO_ACTIVE_LOW>; /* PH23 */
  773. + };
  774. +
  775. + button@9 {
  776. + label = "DPad Right";
  777. + linux,code = <ABS_HAT0X>;
  778. + linux,input-type = <EV_ABS>;
  779. + linux,input-value = <1>;
  780. + gpios = <&pio 7 24 GPIO_ACTIVE_LOW>; /* PH24 */
  781. + };
  782. +
  783. + button@10 {
  784. + label = "DPad Up";
  785. + linux,code = <ABS_HAT0Y>;
  786. + linux,input-type = <EV_ABS>;
  787. + linux,input-value = <0xffffffff>; /* -1 */
  788. + gpios = <&pio 7 25 GPIO_ACTIVE_LOW>; /* PH25 */
  789. + };
  790. +
  791. + button@11 {
  792. + label = "DPad Down";
  793. + linux,code = <ABS_HAT0Y>;
  794. + linux,input-type = <EV_ABS>;
  795. + linux,input-value = <1>;
  796. + gpios = <&pio 7 26 GPIO_ACTIVE_LOW>; /* PH26 */
  797. + };
  798. +
  799. + button@12 {
  800. + label = "Button X";
  801. + linux,code = <BTN_X>;
  802. + gpios = <&pio 0 16 GPIO_ACTIVE_LOW>; /* PA16 */
  803. + };
  804. +
  805. + button@13 {
  806. + label = "Button Y";
  807. + linux,code = <BTN_Y>;
  808. + gpios = <&pio 0 14 GPIO_ACTIVE_LOW>; /* PA14 */
  809. + };
  810. +
  811. + button@14 {
  812. + label = "Button A";
  813. + linux,code = <BTN_A>;
  814. + gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */
  815. + };
  816. +
  817. + button@15 {
  818. + label = "Button B";
  819. + linux,code = <BTN_B>;
  820. + gpios = <&pio 0 15 GPIO_ACTIVE_LOW>; /* PA15 */
  821. + };
  822. +
  823. + button@16 {
  824. + label = "Select Button";
  825. + linux,code = <BTN_SELECT>;
  826. + gpios = <&pio 0 11 GPIO_ACTIVE_LOW>; /* PA11 */
  827. + };
  828. +
  829. + button@17 {
  830. + label = "Start Button";
  831. + linux,code = <BTN_START>;
  832. + gpios = <&pio 0 12 GPIO_ACTIVE_LOW>; /* PA12 */
  833. + };
  834. +
  835. + button@18 {
  836. + label = "Top Left Button";
  837. + linux,code = <BTN_TL>;
  838. + gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 */
  839. + };
  840. +
  841. + button@19 {
  842. + label = "Top Right Button";
  843. + linux,code = <BTN_TR>;
  844. + gpios = <&pio 0 13 GPIO_ACTIVE_LOW>; /* PA13 */
  845. + };
  846. + };
  847. };
  848. &cpu0 {
  849. @@ -86,12 +239,29 @@
  850. pinctrl-names = "default";
  851. pinctrl-0 = <&i2c1_pins_a>;
  852. status = "okay";
  853. +
  854. + /* Accelerometer */
  855. + bma250@18 {
  856. + compatible = "bosch,bma250";
  857. + reg = <0x18>;
  858. + interrupt-parent = <&pio>;
  859. + interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */
  860. + };
  861. };
  862. &i2c2 {
  863. pinctrl-names = "default";
  864. pinctrl-0 = <&i2c2_pins_a>;
  865. status = "okay";
  866. +
  867. + ft5406ee8: touchscreen@38 {
  868. + compatible = "edt,edt-ft5406";
  869. + reg = <0x38>;
  870. + interrupt-parent = <&pio>;
  871. + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
  872. + touchscreen-size-x = <800>;
  873. + touchscreen-size-y = <480>;
  874. + };
  875. };
  876. &lradc {
  877. @@ -149,6 +319,17 @@
  878. };
  879. &pio {
  880. + key_pins_inet9f: key_pins@0 {
  881. + allwinner,pins = "PA0", "PA1", "PA3", "PA4",
  882. + "PA5", "PA6", "PA8", "PA9",
  883. + "PA11", "PA12", "PA13",
  884. + "PA14", "PA15", "PA16", "PA17",
  885. + "PH22", "PH23", "PH24", "PH25", "PH26";
  886. + allwinner,function = "gpio_in";
  887. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  888. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  889. + };
  890. +
  891. usb0_id_detect_pin: usb0_id_detect_pin@0 {
  892. allwinner,pins = "PH4";
  893. allwinner,function = "gpio_in";
  894. --- a/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts
  895. +++ b/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts
  896. @@ -1,5 +1,6 @@
  897. /*
  898. * Copyright 2015 Josef Gajdusek <atx@atx.name>
  899. + * Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
  900. *
  901. * This file is dual-licensed: you can use it either under the terms
  902. * of the GPL or the X11 license, at your option. Note that this dual
  903. @@ -42,22 +43,11 @@
  904. /dts-v1/;
  905. #include "sun4i-a10.dtsi"
  906. -#include "sunxi-common-regulators.dtsi"
  907. -
  908. -#include <dt-bindings/gpio/gpio.h>
  909. -#include <dt-bindings/pinctrl/sun4i-a10.h>
  910. +#include "sunxi-itead-core-common.dtsi"
  911. / {
  912. model = "Iteaduino Plus A10";
  913. compatible = "itead,iteaduino-plus-a10", "allwinner,sun4i-a10";
  914. -
  915. - aliases {
  916. - serial0 = &uart0;
  917. - };
  918. -
  919. - chosen {
  920. - stdout-path = "serial0:115200n8";
  921. - };
  922. };
  923. &ahci {
  924. @@ -65,18 +55,6 @@
  925. status = "okay";
  926. };
  927. -&cpu0 {
  928. - cpu-supply = <&reg_dcdc2>;
  929. -};
  930. -
  931. -&ehci0 {
  932. - status = "okay";
  933. -};
  934. -
  935. -&ehci1 {
  936. - status = "okay";
  937. -};
  938. -
  939. &emac {
  940. pinctrl-names = "default";
  941. pinctrl-0 = <&emac_pins_a>;
  942. @@ -89,12 +67,7 @@
  943. };
  944. &i2c0 {
  945. - pinctrl-names = "default";
  946. - pinctrl-0 = <&i2c0_pins_a>;
  947. - status = "okay";
  948. -
  949. axp209: pmic@34 {
  950. - reg = <0x34>;
  951. interrupts = <0>;
  952. };
  953. };
  954. @@ -135,68 +108,13 @@
  955. status = "okay";
  956. };
  957. -&ohci0 {
  958. - status = "okay";
  959. -};
  960. -
  961. -&ohci1 {
  962. - status = "okay";
  963. -};
  964. -
  965. &reg_ahci_5v {
  966. status = "okay";
  967. };
  968. -#include "axp209.dtsi"
  969. -
  970. -&reg_dcdc2 {
  971. - regulator-always-on;
  972. - regulator-min-microvolt = <1000000>;
  973. - regulator-max-microvolt = <1450000>;
  974. - regulator-name = "vdd-cpu";
  975. -};
  976. -
  977. -&reg_dcdc3 {
  978. - regulator-always-on;
  979. - regulator-min-microvolt = <1000000>;
  980. - regulator-max-microvolt = <1400000>;
  981. - regulator-name = "vdd-int-dll";
  982. -};
  983. -
  984. -&reg_ldo1 {
  985. - regulator-name = "vdd-rtc";
  986. -};
  987. -
  988. -&reg_ldo2 {
  989. - regulator-always-on;
  990. - regulator-min-microvolt = <3000000>;
  991. - regulator-max-microvolt = <3000000>;
  992. - regulator-name = "avcc";
  993. -};
  994. -
  995. -&reg_usb1_vbus {
  996. - status = "okay";
  997. -};
  998. -
  999. -&reg_usb2_vbus {
  1000. - status = "okay";
  1001. -};
  1002. -
  1003. &spi0 {
  1004. pinctrl-names = "default";
  1005. pinctrl-0 = <&spi0_pins_a>,
  1006. <&spi0_cs0_pins_a>;
  1007. status = "okay";
  1008. };
  1009. -
  1010. -&uart0 {
  1011. - pinctrl-names = "default";
  1012. - pinctrl-0 = <&uart0_pins_a>;
  1013. - status = "okay";
  1014. -};
  1015. -
  1016. -&usbphy {
  1017. - usb1_vbus-supply = <&reg_usb1_vbus>;
  1018. - usb2_vbus-supply = <&reg_usb2_vbus>;
  1019. - status = "okay";
  1020. -};
  1021. --- a/arch/arm/dts/sun4i-a10-jesurun-q5.dts
  1022. +++ b/arch/arm/dts/sun4i-a10-jesurun-q5.dts
  1023. @@ -156,6 +156,10 @@
  1024. status = "okay";
  1025. };
  1026. +&otg_sram {
  1027. + status = "okay";
  1028. +};
  1029. +
  1030. &pio {
  1031. emac_power_pin_q5: emac_power_pin@0 {
  1032. allwinner,pins = "PH19";
  1033. @@ -172,6 +176,11 @@
  1034. };
  1035. };
  1036. +&reg_usb0_vbus {
  1037. + regulator-boot-on;
  1038. + status = "okay";
  1039. +};
  1040. +
  1041. &reg_usb1_vbus {
  1042. status = "okay";
  1043. };
  1044. @@ -186,7 +195,13 @@
  1045. status = "okay";
  1046. };
  1047. +&usb_otg {
  1048. + dr_mode = "host";
  1049. + status = "okay";
  1050. +};
  1051. +
  1052. &usbphy {
  1053. + usb0_vbus-supply = <&reg_usb0_vbus>;
  1054. usb1_vbus-supply = <&reg_usb1_vbus>;
  1055. usb2_vbus-supply = <&reg_usb2_vbus>;
  1056. status = "okay";
  1057. --- a/arch/arm/dts/sun4i-a10-marsboard.dts
  1058. +++ b/arch/arm/dts/sun4i-a10-marsboard.dts
  1059. @@ -91,6 +91,10 @@
  1060. status = "okay";
  1061. };
  1062. +&codec {
  1063. + status = "okay";
  1064. +};
  1065. +
  1066. &ehci0 {
  1067. status = "okay";
  1068. };
  1069. @@ -154,6 +158,10 @@
  1070. status = "okay";
  1071. };
  1072. +&otg_sram {
  1073. + status = "okay";
  1074. +};
  1075. +
  1076. &pio {
  1077. led_pins_marsboard: led_pins@0 {
  1078. allwinner,pins = "PB5", "PB6", "PB7", "PB8";
  1079. @@ -161,6 +169,13 @@
  1080. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  1081. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  1082. };
  1083. +
  1084. + usb0_id_detect_pin: usb0_id_detect_pin@0 {
  1085. + allwinner,pins = "PH4";
  1086. + allwinner,function = "gpio_in";
  1087. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  1088. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  1089. + };
  1090. };
  1091. &reg_usb1_vbus {
  1092. @@ -184,7 +199,15 @@
  1093. status = "okay";
  1094. };
  1095. +&usb_otg {
  1096. + dr_mode = "otg";
  1097. + status = "okay";
  1098. +};
  1099. +
  1100. &usbphy {
  1101. + pinctrl-names = "default";
  1102. + pinctrl-0 = <&usb0_id_detect_pin>;
  1103. + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  1104. usb1_vbus-supply = <&reg_usb1_vbus>;
  1105. usb2_vbus-supply = <&reg_usb2_vbus>;
  1106. status = "okay";
  1107. --- a/arch/arm/dts/sun4i-a10-mk802.dts
  1108. +++ b/arch/arm/dts/sun4i-a10-mk802.dts
  1109. @@ -44,6 +44,7 @@
  1110. #include "sun4i-a10.dtsi"
  1111. #include "sunxi-common-regulators.dtsi"
  1112. #include <dt-bindings/gpio/gpio.h>
  1113. +#include <dt-bindings/pinctrl/sun4i-a10.h>
  1114. / {
  1115. model = "MK802";
  1116. @@ -58,6 +59,10 @@
  1117. };
  1118. };
  1119. +&codec {
  1120. + status = "okay";
  1121. +};
  1122. +
  1123. &ehci0 {
  1124. status = "okay";
  1125. };
  1126. @@ -80,7 +85,25 @@
  1127. status = "okay";
  1128. };
  1129. +&otg_sram {
  1130. + status = "okay";
  1131. +};
  1132. +
  1133. &pio {
  1134. + usb0_id_detect_pin: usb0_id_detect_pin@0 {
  1135. + allwinner,pins = "PH4";
  1136. + allwinner,function = "gpio_in";
  1137. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  1138. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  1139. + };
  1140. +
  1141. + usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
  1142. + allwinner,pins = "PH5";
  1143. + allwinner,function = "gpio_in";
  1144. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  1145. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  1146. + };
  1147. +
  1148. usb2_vbus_pin_mk802: usb2_vbus_pin@0 {
  1149. allwinner,pins = "PH12";
  1150. allwinner,function = "gpio_out";
  1151. @@ -89,6 +112,10 @@
  1152. };
  1153. };
  1154. +&reg_usb0_vbus {
  1155. + status = "okay";
  1156. +};
  1157. +
  1158. &reg_usb1_vbus {
  1159. status = "okay";
  1160. };
  1161. @@ -105,7 +132,17 @@
  1162. status = "okay";
  1163. };
  1164. +&usb_otg {
  1165. + dr_mode = "otg";
  1166. + status = "okay";
  1167. +};
  1168. +
  1169. &usbphy {
  1170. + pinctrl-names = "default";
  1171. + pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
  1172. + usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  1173. + usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
  1174. + usb0_vbus-supply = <&reg_usb0_vbus>;
  1175. usb1_vbus-supply = <&reg_usb1_vbus>;
  1176. usb2_vbus-supply = <&reg_usb2_vbus>;
  1177. status = "okay";
  1178. --- a/arch/arm/dts/sun4i-a10-olinuxino-lime.dts
  1179. +++ b/arch/arm/dts/sun4i-a10-olinuxino-lime.dts
  1180. @@ -124,6 +124,18 @@
  1181. };
  1182. };
  1183. +&i2c1 {
  1184. + pinctrl-names = "default";
  1185. + pinctrl-0 = <&i2c1_pins_a>;
  1186. + status = "okay";
  1187. +
  1188. + eeprom: eeprom@50 {
  1189. + compatible = "atmel,24c16";
  1190. + reg = <0x50>;
  1191. + pagesize = <16>;
  1192. + };
  1193. +};
  1194. +
  1195. &mdio {
  1196. status = "okay";
  1197. --- a/arch/arm/dts/sun4i-a10-pcduino.dts
  1198. +++ b/arch/arm/dts/sun4i-a10-pcduino.dts
  1199. @@ -104,6 +104,10 @@
  1200. };
  1201. };
  1202. +&cpu0 {
  1203. + cpu-supply = <&reg_dcdc2>;
  1204. +};
  1205. +
  1206. &ehci0 {
  1207. status = "okay";
  1208. };
  1209. @@ -129,12 +133,8 @@
  1210. status = "okay";
  1211. axp209: pmic@34 {
  1212. - compatible = "x-powers,axp209";
  1213. reg = <0x34>;
  1214. interrupts = <0>;
  1215. -
  1216. - interrupt-controller;
  1217. - #interrupt-cells = <1>;
  1218. };
  1219. };
  1220. @@ -164,6 +164,10 @@
  1221. status = "okay";
  1222. };
  1223. +&otg_sram {
  1224. + status = "okay";
  1225. +};
  1226. +
  1227. &pio {
  1228. led_pins_pcduino: led_pins@0 {
  1229. allwinner,pins = "PH15", "PH16";
  1230. @@ -178,14 +182,40 @@
  1231. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  1232. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  1233. };
  1234. +
  1235. + usb0_id_detect_pin: usb0_id_detect_pin@0 {
  1236. + allwinner,pins = "PH4";
  1237. + allwinner,function = "gpio_in";
  1238. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  1239. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  1240. + };
  1241. };
  1242. -&reg_usb1_vbus {
  1243. - status = "okay";
  1244. +#include "axp209.dtsi"
  1245. +
  1246. +&reg_dcdc2 {
  1247. + regulator-always-on;
  1248. + regulator-min-microvolt = <1000000>;
  1249. + regulator-max-microvolt = <1400000>;
  1250. + regulator-name = "vdd-cpu";
  1251. };
  1252. -&reg_usb2_vbus {
  1253. - status = "okay";
  1254. +&reg_dcdc3 {
  1255. + regulator-always-on;
  1256. + regulator-min-microvolt = <1000000>;
  1257. + regulator-max-microvolt = <1400000>;
  1258. + regulator-name = "vdd-int-dll";
  1259. +};
  1260. +
  1261. +&reg_ldo1 {
  1262. + regulator-name = "vdd-rtc";
  1263. +};
  1264. +
  1265. +&reg_ldo2 {
  1266. + regulator-always-on;
  1267. + regulator-min-microvolt = <3000000>;
  1268. + regulator-max-microvolt = <3000000>;
  1269. + regulator-name = "avcc";
  1270. };
  1271. &uart0 {
  1272. @@ -194,8 +224,16 @@
  1273. status = "okay";
  1274. };
  1275. +&usb_otg {
  1276. + dr_mode = "otg";
  1277. + status = "okay";
  1278. +};
  1279. +
  1280. &usbphy {
  1281. - usb1_vbus-supply = <&reg_usb1_vbus>;
  1282. - usb2_vbus-supply = <&reg_usb2_vbus>;
  1283. + pinctrl-names = "default";
  1284. + pinctrl-0 = <&usb0_id_detect_pin>;
  1285. + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  1286. + usb1_vbus-supply = <&reg_vcc5v0>; /* USB1 VBUS is always on */
  1287. + usb2_vbus-supply = <&reg_vcc5v0>; /* USB2 VBUS is always on */
  1288. status = "okay";
  1289. };
  1290. --- /dev/null
  1291. +++ b/arch/arm/dts/sun4i-a10-pcduino2.dts
  1292. @@ -0,0 +1,78 @@
  1293. +/*
  1294. + * Copyright 2015 Siarhei Siamashka <siarhei.siamashka@gmail.com>
  1295. + *
  1296. + * This file is dual-licensed: you can use it either under the terms
  1297. + * of the GPL or the X11 license, at your option. Note that this dual
  1298. + * licensing only applies to this file, and not this project as a
  1299. + * whole.
  1300. + *
  1301. + * a) This file is free software; you can redistribute it and/or
  1302. + * modify it under the terms of the GNU General Public License as
  1303. + * published by the Free Software Foundation; either version 2 of the
  1304. + * License, or (at your option) any later version.
  1305. + *
  1306. + * This file is distributed in the hope that it will be useful,
  1307. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  1308. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1309. + * GNU General Public License for more details.
  1310. + *
  1311. + * Or, alternatively,
  1312. + *
  1313. + * b) Permission is hereby granted, free of charge, to any person
  1314. + * obtaining a copy of this software and associated documentation
  1315. + * files (the "Software"), to deal in the Software without
  1316. + * restriction, including without limitation the rights to use,
  1317. + * copy, modify, merge, publish, distribute, sublicense, and/or
  1318. + * sell copies of the Software, and to permit persons to whom the
  1319. + * Software is furnished to do so, subject to the following
  1320. + * conditions:
  1321. + *
  1322. + * The above copyright notice and this permission notice shall be
  1323. + * included in all copies or substantial portions of the Software.
  1324. + *
  1325. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  1326. + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  1327. + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  1328. + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  1329. + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  1330. + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  1331. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  1332. + * OTHER DEALINGS IN THE SOFTWARE.
  1333. + */
  1334. +
  1335. +/*
  1336. + * The LinkSprite pcDuino2 board is almost identical to the older
  1337. + * LinkSprite pcDuino1 board. The only software visible difference
  1338. + * is that the pcDuino2 board got a USB VBUS voltage regulator, which
  1339. + * is controlled by the PD2 pin (pulled-up by default). Also one of
  1340. + * the USB host ports has been replaced with a USB WIFI chip.
  1341. + */
  1342. +
  1343. +#include "sun4i-a10-pcduino.dts"
  1344. +
  1345. +/ {
  1346. + model = "LinkSprite pcDuino2";
  1347. + compatible = "linksprite,a10-pcduino2", "allwinner,sun4i-a10";
  1348. +};
  1349. +
  1350. +&pio {
  1351. + usb2_vbus_pin_pcduino2: usb2_vbus_pin@0 {
  1352. + allwinner,pins = "PD2";
  1353. + allwinner,function = "gpio_out";
  1354. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  1355. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  1356. + };
  1357. +};
  1358. +
  1359. +&reg_usb2_vbus {
  1360. + pinctrl-names = "default";
  1361. + pinctrl-0 = <&usb2_vbus_pin_pcduino2>;
  1362. + gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>;
  1363. + status = "okay";
  1364. +};
  1365. +
  1366. +&usbphy {
  1367. + usb1_vbus-supply = <&reg_vcc3v3>; /* USB WIFI is always on */
  1368. + usb2_vbus-supply = <&reg_usb2_vbus>;
  1369. + status = "okay";
  1370. +};
  1371. --- a/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts
  1372. +++ b/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts
  1373. @@ -47,6 +47,7 @@
  1374. #include <dt-bindings/input/input.h>
  1375. #include <dt-bindings/interrupt-controller/irq.h>
  1376. #include <dt-bindings/pinctrl/sun4i-a10.h>
  1377. +#include <dt-bindings/pwm/pwm.h>
  1378. / {
  1379. model = "Point of View Protab2-IPS9";
  1380. @@ -56,11 +57,28 @@
  1381. serial0 = &uart0;
  1382. };
  1383. + backlight: backlight {
  1384. + compatible = "pwm-backlight";
  1385. + pinctrl-names = "default";
  1386. + pinctrl-0 = <&bl_en_pin_protab>;
  1387. + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
  1388. + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
  1389. + default-brightness-level = <8>;
  1390. + enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
  1391. + };
  1392. +
  1393. chosen {
  1394. stdout-path = "serial0:115200n8";
  1395. };
  1396. };
  1397. +&codec {
  1398. + pinctrl-names = "default";
  1399. + pinctrl-0 = <&codec_pa_pin>;
  1400. + allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
  1401. + status = "okay";
  1402. +};
  1403. +
  1404. &cpu0 {
  1405. cpu-supply = <&reg_dcdc2>;
  1406. };
  1407. @@ -86,12 +104,36 @@
  1408. pinctrl-names = "default";
  1409. pinctrl-0 = <&i2c1_pins_a>;
  1410. status = "okay";
  1411. +
  1412. + /* Accelerometer */
  1413. + bma250@18 {
  1414. + compatible = "bosch,bma250";
  1415. + reg = <0x18>;
  1416. + interrupt-parent = <&pio>;
  1417. + interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */
  1418. + };
  1419. };
  1420. &i2c2 {
  1421. pinctrl-names = "default";
  1422. pinctrl-0 = <&i2c2_pins_a>;
  1423. status = "okay";
  1424. +
  1425. + pixcir_ts@5c {
  1426. + pinctrl-names = "default";
  1427. + pinctrl-0 = <&touchscreen_pins>;
  1428. + compatible = "pixcir,pixcir_tangoc";
  1429. + reg = <0x5c>;
  1430. + interrupt-parent = <&pio>;
  1431. + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
  1432. + attb-gpio = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* PH21 */
  1433. + enable-gpios = <&pio 0 5 GPIO_ACTIVE_LOW>;
  1434. + wake-gpios = <&pio 1 13 GPIO_ACTIVE_LOW>;
  1435. + touchscreen-size-x = <1024>;
  1436. + touchscreen-size-y = <768>;
  1437. + touchscreen-inverted-x;
  1438. + touchscreen-inverted-y;
  1439. + };
  1440. };
  1441. &lradc {
  1442. @@ -128,6 +170,27 @@
  1443. };
  1444. &pio {
  1445. + bl_en_pin_protab: bl_en_pin@0 {
  1446. + allwinner,pins = "PH7";
  1447. + allwinner,function = "gpio_out";
  1448. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  1449. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  1450. + };
  1451. +
  1452. + codec_pa_pin: codec_pa_pin@0 {
  1453. + allwinner,pins = "PH15";
  1454. + allwinner,function = "gpio_out";
  1455. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  1456. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  1457. + };
  1458. +
  1459. + touchscreen_pins: touchscreen_pins@0 {
  1460. + allwinner,pins = "PA5", "PB13";
  1461. + allwinner,function = "gpio_out";
  1462. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  1463. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  1464. + };
  1465. +
  1466. usb0_id_detect_pin: usb0_id_detect_pin@0 {
  1467. allwinner,pins = "PH4";
  1468. allwinner,function = "gpio_in";
  1469. @@ -143,6 +206,12 @@
  1470. };
  1471. };
  1472. +&pwm {
  1473. + pinctrl-names = "default";
  1474. + pinctrl-0 = <&pwm0_pins_a>;
  1475. + status = "okay";
  1476. +};
  1477. +
  1478. &reg_dcdc2 {
  1479. regulator-always-on;
  1480. regulator-min-microvolt = <1000000>;
  1481. --- a/arch/arm/dts/sun4i-a10.dtsi
  1482. +++ b/arch/arm/dts/sun4i-a10.dtsi
  1483. @@ -45,6 +45,7 @@
  1484. #include <dt-bindings/thermal/thermal.h>
  1485. +#include <dt-bindings/clock/sun4i-a10-pll2.h>
  1486. #include <dt-bindings/dma/sun4i-a10.h>
  1487. #include <dt-bindings/pinctrl/sun4i-a10.h>
  1488. @@ -65,7 +66,7 @@
  1489. "simple-framebuffer";
  1490. allwinner,pipeline = "de_be0-lcd0-hdmi";
  1491. clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
  1492. - <&ahb_gates 44>;
  1493. + <&ahb_gates 44>, <&dram_gates 26>;
  1494. status = "disabled";
  1495. };
  1496. @@ -74,7 +75,8 @@
  1497. "simple-framebuffer";
  1498. allwinner,pipeline = "de_fe0-de_be0-lcd0-hdmi";
  1499. clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
  1500. - <&ahb_gates 44>, <&ahb_gates 46>;
  1501. + <&ahb_gates 44>, <&ahb_gates 46>,
  1502. + <&dram_gates 25>, <&dram_gates 26>;
  1503. status = "disabled";
  1504. };
  1505. @@ -83,7 +85,8 @@
  1506. "simple-framebuffer";
  1507. allwinner,pipeline = "de_fe0-de_be0-lcd0";
  1508. clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>,
  1509. - <&ahb_gates 46>;
  1510. + <&ahb_gates 46>, <&dram_gates 25>,
  1511. + <&dram_gates 26>;
  1512. status = "disabled";
  1513. };
  1514. @@ -92,7 +95,8 @@
  1515. "simple-framebuffer";
  1516. allwinner,pipeline = "de_fe0-de_be0-lcd0-tve0";
  1517. clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
  1518. - <&ahb_gates 44>, <&ahb_gates 46>;
  1519. + <&ahb_gates 44>, <&ahb_gates 46>,
  1520. + <&dram_gates 25>, <&dram_gates 26>;
  1521. status = "disabled";
  1522. };
  1523. };
  1524. @@ -195,6 +199,15 @@
  1525. clock-output-names = "pll1";
  1526. };
  1527. + pll2: clk@01c20008 {
  1528. + #clock-cells = <1>;
  1529. + compatible = "allwinner,sun4i-a10-pll2-clk";
  1530. + reg = <0x01c20008 0x8>;
  1531. + clocks = <&osc24M>;
  1532. + clock-output-names = "pll2-1x", "pll2-2x",
  1533. + "pll2-4x", "pll2-8x";
  1534. + };
  1535. +
  1536. pll4: clk@01c20018 {
  1537. #clock-cells = <0>;
  1538. compatible = "allwinner,sun4i-a10-pll1-clk";
  1539. @@ -241,6 +254,7 @@
  1540. compatible = "allwinner,sun4i-a10-axi-gates-clk";
  1541. reg = <0x01c2005c 0x4>;
  1542. clocks = <&axi>;
  1543. + clock-indices = <0>;
  1544. clock-output-names = "axi_dram";
  1545. };
  1546. @@ -257,17 +271,36 @@
  1547. compatible = "allwinner,sun4i-a10-ahb-gates-clk";
  1548. reg = <0x01c20060 0x8>;
  1549. clocks = <&ahb>;
  1550. + clock-indices = <0>, <1>,
  1551. + <2>, <3>,
  1552. + <4>, <5>, <6>,
  1553. + <7>, <8>, <9>,
  1554. + <10>, <11>, <12>,
  1555. + <13>, <14>, <16>,
  1556. + <17>, <18>, <20>,
  1557. + <21>, <22>, <23>,
  1558. + <24>, <25>, <26>,
  1559. + <32>, <33>, <34>,
  1560. + <35>, <36>, <37>,
  1561. + <40>, <41>, <43>,
  1562. + <44>, <45>,
  1563. + <46>, <47>,
  1564. + <50>, <52>;
  1565. clock-output-names = "ahb_usb0", "ahb_ehci0",
  1566. - "ahb_ohci0", "ahb_ehci1", "ahb_ohci1", "ahb_ss",
  1567. - "ahb_dma", "ahb_bist", "ahb_mmc0", "ahb_mmc1",
  1568. - "ahb_mmc2", "ahb_mmc3", "ahb_ms", "ahb_nand",
  1569. - "ahb_sdram", "ahb_ace", "ahb_emac", "ahb_ts",
  1570. - "ahb_spi0", "ahb_spi1", "ahb_spi2", "ahb_spi3",
  1571. - "ahb_pata", "ahb_sata", "ahb_gps", "ahb_ve",
  1572. - "ahb_tvd", "ahb_tve0", "ahb_tve1", "ahb_lcd0",
  1573. - "ahb_lcd1", "ahb_csi0", "ahb_csi1", "ahb_hdmi",
  1574. - "ahb_de_be0", "ahb_de_be1", "ahb_de_fe0",
  1575. - "ahb_de_fe1", "ahb_mp", "ahb_mali400";
  1576. + "ahb_ohci0", "ahb_ehci1",
  1577. + "ahb_ohci1", "ahb_ss", "ahb_dma",
  1578. + "ahb_bist", "ahb_mmc0", "ahb_mmc1",
  1579. + "ahb_mmc2", "ahb_mmc3", "ahb_ms",
  1580. + "ahb_nand", "ahb_sdram", "ahb_ace",
  1581. + "ahb_emac", "ahb_ts", "ahb_spi0",
  1582. + "ahb_spi1", "ahb_spi2", "ahb_spi3",
  1583. + "ahb_pata", "ahb_sata", "ahb_gps",
  1584. + "ahb_ve", "ahb_tvd", "ahb_tve0",
  1585. + "ahb_tve1", "ahb_lcd0", "ahb_lcd1",
  1586. + "ahb_csi0", "ahb_csi1", "ahb_hdmi",
  1587. + "ahb_de_be0", "ahb_de_be1",
  1588. + "ahb_de_fe0", "ahb_de_fe1",
  1589. + "ahb_mp", "ahb_mali400";
  1590. };
  1591. apb0: apb0@01c20054 {
  1592. @@ -283,9 +316,14 @@
  1593. compatible = "allwinner,sun4i-a10-apb0-gates-clk";
  1594. reg = <0x01c20068 0x4>;
  1595. clocks = <&apb0>;
  1596. + clock-indices = <0>, <1>,
  1597. + <2>, <3>,
  1598. + <5>, <6>,
  1599. + <7>, <10>;
  1600. clock-output-names = "apb0_codec", "apb0_spdif",
  1601. - "apb0_ac97", "apb0_iis", "apb0_pio", "apb0_ir0",
  1602. - "apb0_ir1", "apb0_keypad";
  1603. + "apb0_ac97", "apb0_iis",
  1604. + "apb0_pio", "apb0_ir0",
  1605. + "apb0_ir1", "apb0_keypad";
  1606. };
  1607. apb1: clk@01c20058 {
  1608. @@ -301,12 +339,22 @@
  1609. compatible = "allwinner,sun4i-a10-apb1-gates-clk";
  1610. reg = <0x01c2006c 0x4>;
  1611. clocks = <&apb1>;
  1612. + clock-indices = <0>, <1>,
  1613. + <2>, <4>,
  1614. + <5>, <6>,
  1615. + <7>, <16>,
  1616. + <17>, <18>,
  1617. + <19>, <20>,
  1618. + <21>, <22>,
  1619. + <23>;
  1620. clock-output-names = "apb1_i2c0", "apb1_i2c1",
  1621. - "apb1_i2c2", "apb1_can", "apb1_scr",
  1622. - "apb1_ps20", "apb1_ps21", "apb1_uart0",
  1623. - "apb1_uart1", "apb1_uart2", "apb1_uart3",
  1624. - "apb1_uart4", "apb1_uart5", "apb1_uart6",
  1625. - "apb1_uart7";
  1626. + "apb1_i2c2", "apb1_can",
  1627. + "apb1_scr", "apb1_ps20",
  1628. + "apb1_ps21", "apb1_uart0",
  1629. + "apb1_uart1", "apb1_uart2",
  1630. + "apb1_uart3", "apb1_uart4",
  1631. + "apb1_uart5", "apb1_uart6",
  1632. + "apb1_uart7";
  1633. };
  1634. nand_clk: clk@01c20080 {
  1635. @@ -446,6 +494,48 @@
  1636. clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
  1637. clock-output-names = "spi3";
  1638. };
  1639. +
  1640. + dram_gates: clk@01c20100 {
  1641. + #clock-cells = <1>;
  1642. + compatible = "allwinner,sun4i-a10-dram-gates-clk";
  1643. + reg = <0x01c20100 0x4>;
  1644. + clocks = <&pll5 0>;
  1645. + clock-indices = <0>,
  1646. + <1>, <2>,
  1647. + <3>,
  1648. + <4>,
  1649. + <5>, <6>,
  1650. + <15>,
  1651. + <24>, <25>,
  1652. + <26>, <27>,
  1653. + <28>, <29>;
  1654. + clock-output-names = "dram_ve",
  1655. + "dram_csi0", "dram_csi1",
  1656. + "dram_ts",
  1657. + "dram_tvd",
  1658. + "dram_tve0", "dram_tve1",
  1659. + "dram_output",
  1660. + "dram_de_fe1", "dram_de_fe0",
  1661. + "dram_de_be0", "dram_de_be1",
  1662. + "dram_de_mp", "dram_ace";
  1663. + };
  1664. +
  1665. + ve_clk: clk@01c2013c {
  1666. + #clock-cells = <0>;
  1667. + #reset-cells = <0>;
  1668. + compatible = "allwinner,sun4i-a10-ve-clk";
  1669. + reg = <0x01c2013c 0x4>;
  1670. + clocks = <&pll4>;
  1671. + clock-output-names = "ve";
  1672. + };
  1673. +
  1674. + codec_clk: clk@01c20140 {
  1675. + #clock-cells = <0>;
  1676. + compatible = "allwinner,sun4i-a10-codec-clk";
  1677. + reg = <0x01c20140 0x4>;
  1678. + clocks = <&pll2 SUN4I_A10_PLL2_1X>;
  1679. + clock-output-names = "codec";
  1680. + };
  1681. };
  1682. soc@01c00000 {
  1683. @@ -656,6 +746,14 @@
  1684. status = "disabled";
  1685. };
  1686. + crypto: crypto-engine@01c15000 {
  1687. + compatible = "allwinner,sun4i-a10-crypto";
  1688. + reg = <0x01c15000 0x1000>;
  1689. + interrupts = <86>;
  1690. + clocks = <&ahb_gates 5>, <&ss_clk>;
  1691. + clock-names = "ahb", "mod";
  1692. + };
  1693. +
  1694. spi2: spi@01c17000 {
  1695. compatible = "allwinner,sun4i-a10-spi";
  1696. reg = <0x01c17000 0x1000>;
  1697. @@ -961,6 +1059,19 @@
  1698. status = "disabled";
  1699. };
  1700. + codec: codec@01c22c00 {
  1701. + #sound-dai-cells = <0>;
  1702. + compatible = "allwinner,sun4i-a10-codec";
  1703. + reg = <0x01c22c00 0x40>;
  1704. + interrupts = <30>;
  1705. + clocks = <&apb0_gates 0>, <&codec_clk>;
  1706. + clock-names = "apb", "codec";
  1707. + dmas = <&dma SUN4I_DMA_NORMAL 19>,
  1708. + <&dma SUN4I_DMA_NORMAL 19>;
  1709. + dma-names = "rx", "tx";
  1710. + status = "disabled";
  1711. + };
  1712. +
  1713. sid: eeprom@01c23800 {
  1714. compatible = "allwinner,sun4i-a10-sid";
  1715. reg = <0x01c23800 0x10>;
  1716. --- a/arch/arm/dts/sun5i-a10s-auxtek-t004.dts
  1717. +++ b/arch/arm/dts/sun5i-a10s-auxtek-t004.dts
  1718. @@ -86,6 +86,20 @@
  1719. status = "okay";
  1720. };
  1721. +&i2c0 {
  1722. + pinctrl-names = "default";
  1723. + pinctrl-0 = <&i2c0_pins_a>;
  1724. + status = "okay";
  1725. +
  1726. + axp152: pmic@30 {
  1727. + compatible = "x-powers,axp152";
  1728. + reg = <0x30>;
  1729. + interrupts = <0>;
  1730. + interrupt-controller;
  1731. + #interrupt-cells = <1>;
  1732. + };
  1733. +};
  1734. +
  1735. &mmc0 {
  1736. pinctrl-names = "default";
  1737. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_t004>;
  1738. --- a/arch/arm/dts/sun5i-a10s-olinuxino-micro.dts
  1739. +++ b/arch/arm/dts/sun5i-a10s-olinuxino-micro.dts
  1740. @@ -111,7 +111,7 @@
  1741. status = "okay";
  1742. at24@50 {
  1743. - compatible = "at,24c16";
  1744. + compatible = "atmel,24c16";
  1745. pagesize = <16>;
  1746. reg = <0x50>;
  1747. read-only;
  1748. --- a/arch/arm/dts/sun5i-a13-empire-electronix-d709.dts
  1749. +++ b/arch/arm/dts/sun5i-a13-empire-electronix-d709.dts
  1750. @@ -123,7 +123,7 @@
  1751. &mmc0 {
  1752. pinctrl-names = "default";
  1753. - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_inet98fv2>;
  1754. + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_d709>;
  1755. vmmc-supply = <&reg_vcc3v3>;
  1756. bus-width = <4>;
  1757. cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
  1758. @@ -131,27 +131,12 @@
  1759. status = "okay";
  1760. };
  1761. -&mmc2 {
  1762. - pinctrl-names = "default";
  1763. - pinctrl-0 = <&mmc2_pins_a>;
  1764. - vmmc-supply = <&reg_vcc3v3>;
  1765. - bus-width = <8>;
  1766. - non-removable;
  1767. - status = "okay";
  1768. -
  1769. - mmccard: mmccard@0 {
  1770. - reg = <0>;
  1771. - compatible = "mmc-card";
  1772. - broken-hpi;
  1773. - };
  1774. -};
  1775. -
  1776. &otg_sram {
  1777. status = "okay";
  1778. };
  1779. &pio {
  1780. - mmc0_cd_pin_inet98fv2: mmc0_cd_pin@0 {
  1781. + mmc0_cd_pin_d709: mmc0_cd_pin@0 {
  1782. allwinner,pins = "PG0";
  1783. allwinner,function = "gpio_in";
  1784. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  1785. --- a/arch/arm/dts/sun5i-a13-inet-98v-rev2.dts
  1786. +++ b/arch/arm/dts/sun5i-a13-inet-98v-rev2.dts
  1787. @@ -123,21 +123,6 @@
  1788. status = "okay";
  1789. };
  1790. -&mmc2 {
  1791. - pinctrl-names = "default";
  1792. - pinctrl-0 = <&mmc2_pins_a>;
  1793. - vmmc-supply = <&reg_vcc3v3>;
  1794. - bus-width = <8>;
  1795. - non-removable;
  1796. - status = "okay";
  1797. -
  1798. - mmccard: mmccard@0 {
  1799. - reg = <0>;
  1800. - compatible = "mmc-card";
  1801. - broken-hpi;
  1802. - };
  1803. -};
  1804. -
  1805. &otg_sram {
  1806. status = "okay";
  1807. };
  1808. @@ -201,11 +186,6 @@
  1809. status = "okay";
  1810. };
  1811. -&reg_usb1_vbus {
  1812. - gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
  1813. - status = "okay";
  1814. -};
  1815. -
  1816. &uart1 {
  1817. pinctrl-names = "default";
  1818. pinctrl-0 = <&uart1_pins_b>;
  1819. @@ -221,16 +201,12 @@
  1820. allwinner,pins = "PG12";
  1821. };
  1822. -&usb1_vbus_pin_a {
  1823. - allwinner,pins = "PG11";
  1824. -};
  1825. -
  1826. &usbphy {
  1827. pinctrl-names = "default";
  1828. pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
  1829. usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
  1830. usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
  1831. usb0_vbus-supply = <&reg_usb0_vbus>;
  1832. - usb1_vbus-supply = <&reg_usb1_vbus>;
  1833. + usb1_vbus-supply = <&reg_ldo3>;
  1834. status = "okay";
  1835. };
  1836. --- a/arch/arm/dts/sun5i-a13-utoo-p66.dts
  1837. +++ b/arch/arm/dts/sun5i-a13-utoo-p66.dts
  1838. @@ -47,11 +47,21 @@
  1839. #include <dt-bindings/input/input.h>
  1840. #include <dt-bindings/interrupt-controller/irq.h>
  1841. #include <dt-bindings/pinctrl/sun4i-a10.h>
  1842. +#include <dt-bindings/pwm/pwm.h>
  1843. / {
  1844. model = "Utoo P66";
  1845. compatible = "utoo,p66", "allwinner,sun5i-a13";
  1846. + backlight: backlight {
  1847. + compatible = "pwm-backlight";
  1848. + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
  1849. + /* Note levels of 10 / 20% result in backlight off */
  1850. + brightness-levels = <0 30 40 50 60 70 80 90 100>;
  1851. + default-brightness-level = <6>;
  1852. + /* TODO: backlight uses axp gpio1 as enable pin */
  1853. + };
  1854. +
  1855. i2c_lcd: i2c@0 {
  1856. /* The lcd panel i2c interface is hooked up via gpios */
  1857. compatible = "i2c-gpio";
  1858. @@ -63,6 +73,13 @@
  1859. };
  1860. };
  1861. +&codec {
  1862. + pinctrl-names = "default";
  1863. + pinctrl-0 = <&codec_pa_pin>;
  1864. + allwinner,pa-gpios = <&pio 6 3 GPIO_ACTIVE_HIGH>; /* PG3 */
  1865. + status = "okay";
  1866. +};
  1867. +
  1868. &cpu0 {
  1869. cpu-supply = <&reg_dcdc2>;
  1870. };
  1871. @@ -158,6 +175,13 @@
  1872. };
  1873. &pio {
  1874. + codec_pa_pin: codec_pa_pin@0 {
  1875. + allwinner,pins = "PG3";
  1876. + allwinner,function = "gpio_out";
  1877. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  1878. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  1879. + };
  1880. +
  1881. mmc0_cd_pin_p66: mmc0_cd_pin@0 {
  1882. allwinner,pins = "PG0";
  1883. allwinner,function = "gpio_in";
  1884. @@ -201,6 +225,12 @@
  1885. };
  1886. };
  1887. +&pwm {
  1888. + pinctrl-names = "default";
  1889. + pinctrl-0 = <&pwm0_pins>;
  1890. + status = "okay";
  1891. +};
  1892. +
  1893. &reg_dcdc2 {
  1894. regulator-always-on;
  1895. regulator-min-microvolt = <1000000>;
  1896. --- a/arch/arm/dts/sun5i-q8-common.dtsi
  1897. +++ b/arch/arm/dts/sun5i-q8-common.dtsi
  1898. @@ -41,11 +41,21 @@
  1899. */
  1900. #include "sunxi-q8-common.dtsi"
  1901. +#include <dt-bindings/pwm/pwm.h>
  1902. +
  1903. / {
  1904. aliases {
  1905. serial0 = &uart1;
  1906. };
  1907. + backlight: backlight {
  1908. + compatible = "pwm-backlight";
  1909. + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
  1910. + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
  1911. + default-brightness-level = <8>;
  1912. + /* TODO: backlight uses axp gpio1 as enable pin */
  1913. + };
  1914. +
  1915. chosen {
  1916. stdout-path = "serial0:115200n8";
  1917. };
  1918. --- a/arch/arm/dts/sun5i-r8-chip.dts
  1919. +++ b/arch/arm/dts/sun5i-r8-chip.dts
  1920. @@ -64,6 +64,26 @@
  1921. chosen {
  1922. stdout-path = "serial0:115200n8";
  1923. };
  1924. +
  1925. + wifi_reg_on: wifi_reg_on {
  1926. + compatible = "regulator-fixed";
  1927. + pinctrl-names = "default";
  1928. + pinctrl-0 = <&chip_wifi_reg_on_pin>;
  1929. +
  1930. + regulator-name = "wifi-reg-on";
  1931. + regulator-min-microvolt = <3300000>;
  1932. + regulator-max-microvolt = <3300000>;
  1933. + gpio = <&pio 2 19 GPIO_ACTIVE_HIGH>; /* PC19 */
  1934. + enable-active-high;
  1935. + };
  1936. +};
  1937. +
  1938. +&codec {
  1939. + status = "okay";
  1940. +};
  1941. +
  1942. +&cpu0 {
  1943. + cpu-supply = <&reg_dcdc2>;
  1944. };
  1945. &ehci0 {
  1946. @@ -109,10 +129,14 @@
  1947. };
  1948. };
  1949. +&mmc0_pins_a {
  1950. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  1951. +};
  1952. +
  1953. &mmc0 {
  1954. pinctrl-names = "default";
  1955. pinctrl-0 = <&mmc0_pins_a>;
  1956. - vmmc-supply = <&reg_vcc3v3>;
  1957. + vmmc-supply = <&wifi_reg_on>;
  1958. bus-width = <4>;
  1959. non-removable;
  1960. status = "okay";
  1961. @@ -134,6 +158,13 @@
  1962. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  1963. };
  1964. + chip_wifi_reg_on_pin: chip_wifi_reg_on_pin@0 {
  1965. + allwinner,pins = "PC19";
  1966. + allwinner,function = "gpio_out";
  1967. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  1968. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  1969. + };
  1970. +
  1971. chip_id_det_pin: chip_id_det_pin@0 {
  1972. allwinner,pins = "PG2";
  1973. allwinner,function = "gpio_in";
  1974. @@ -167,6 +198,20 @@
  1975. regulator-always-on;
  1976. };
  1977. +&reg_ldo3 {
  1978. + regulator-min-microvolt = <3300000>;
  1979. + regulator-max-microvolt = <3300000>;
  1980. + regulator-name = "vdd-wifi1";
  1981. + regulator-always-on;
  1982. +};
  1983. +
  1984. +&reg_ldo4 {
  1985. + regulator-min-microvolt = <3300000>;
  1986. + regulator-max-microvolt = <3300000>;
  1987. + regulator-name = "vdd-wifi2";
  1988. + regulator-always-on;
  1989. +};
  1990. +
  1991. &reg_ldo5 {
  1992. regulator-min-microvolt = <1800000>;
  1993. regulator-max-microvolt = <1800000>;
  1994. --- a/arch/arm/dts/sun5i.dtsi
  1995. +++ b/arch/arm/dts/sun5i.dtsi
  1996. @@ -44,6 +44,7 @@
  1997. #include "skeleton.dtsi"
  1998. +#include <dt-bindings/clock/sun4i-a10-pll2.h>
  1999. #include <dt-bindings/dma/sun4i-a10.h>
  2000. #include <dt-bindings/pinctrl/sun4i-a10.h>
  2001. @@ -102,6 +103,15 @@
  2002. clock-output-names = "pll1";
  2003. };
  2004. + pll2: clk@01c20008 {
  2005. + #clock-cells = <1>;
  2006. + compatible = "allwinner,sun5i-a13-pll2-clk";
  2007. + reg = <0x01c20008 0x8>;
  2008. + clocks = <&osc24M>;
  2009. + clock-output-names = "pll2-1x", "pll2-2x",
  2010. + "pll2-4x", "pll2-8x";
  2011. + };
  2012. +
  2013. pll4: clk@01c20018 {
  2014. #clock-cells = <0>;
  2015. compatible = "allwinner,sun4i-a10-pll1-clk";
  2016. @@ -285,6 +295,14 @@
  2017. clock-output-names = "usb_ohci0", "usb_phy";
  2018. };
  2019. + codec_clk: clk@01c20140 {
  2020. + #clock-cells = <0>;
  2021. + compatible = "allwinner,sun4i-a10-codec-clk";
  2022. + reg = <0x01c20140 0x4>;
  2023. + clocks = <&pll2 SUN4I_A10_PLL2_1X>;
  2024. + clock-output-names = "codec";
  2025. + };
  2026. +
  2027. mbus_clk: clk@01c2015c {
  2028. #clock-cells = <0>;
  2029. compatible = "allwinner,sun5i-a13-mbus-clk";
  2030. @@ -571,6 +589,19 @@
  2031. status = "disabled";
  2032. };
  2033. + codec: codec@01c22c00 {
  2034. + #sound-dai-cells = <0>;
  2035. + compatible = "allwinner,sun4i-a10-codec";
  2036. + reg = <0x01c22c00 0x40>;
  2037. + interrupts = <30>;
  2038. + clocks = <&apb0_gates 0>, <&codec_clk>;
  2039. + clock-names = "apb", "codec";
  2040. + dmas = <&dma SUN4I_DMA_NORMAL 19>,
  2041. + <&dma SUN4I_DMA_NORMAL 19>;
  2042. + dma-names = "rx", "tx";
  2043. + status = "disabled";
  2044. + };
  2045. +
  2046. sid: eeprom@01c23800 {
  2047. compatible = "allwinner,sun4i-a10-sid";
  2048. reg = <0x01c23800 0x10>;
  2049. --- a/arch/arm/dts/sun6i-a31-colombus.dts
  2050. +++ b/arch/arm/dts/sun6i-a31-colombus.dts
  2051. @@ -60,6 +60,16 @@
  2052. chosen {
  2053. stdout-path = "serial0:115200n8";
  2054. };
  2055. +
  2056. + i2c_lcd: i2c@0 {
  2057. + /* The lcd panel i2c interface is hooked up via gpios */
  2058. + compatible = "i2c-gpio";
  2059. + pinctrl-names = "default";
  2060. + pinctrl-0 = <&i2c_lcd_pins>;
  2061. + gpios = <&pio 0 23 GPIO_ACTIVE_HIGH>, /* PA23, sda */
  2062. + <&pio 0 24 GPIO_ACTIVE_HIGH>; /* PA24, scl */
  2063. + i2c-gpio,delay-us = <5>;
  2064. + };
  2065. };
  2066. &ehci1 {
  2067. @@ -94,6 +104,13 @@
  2068. pinctrl-names = "default";
  2069. pinctrl-0 = <&i2c2_pins_a>;
  2070. status = "okay";
  2071. +
  2072. + mma8452: mma8452@1d {
  2073. + compatible = "fsl,mma8452";
  2074. + reg = <0x1d>;
  2075. + interrupt-parent = <&pio>;
  2076. + interrupts = <0 9 IRQ_TYPE_LEVEL_LOW>; /* PA9 */
  2077. + };
  2078. };
  2079. &mmc0 {
  2080. @@ -124,6 +141,13 @@
  2081. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  2082. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  2083. };
  2084. +
  2085. + i2c_lcd_pins: i2c_lcd_pin@0 {
  2086. + allwinner,pins = "PA23", "PA24";
  2087. + allwinner,function = "gpio_out";
  2088. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  2089. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  2090. + };
  2091. };
  2092. &reg_usb2_vbus {
  2093. --- a/arch/arm/dts/sun6i-a31-hummingbird.dts
  2094. +++ b/arch/arm/dts/sun6i-a31-hummingbird.dts
  2095. @@ -54,6 +54,8 @@
  2096. compatible = "merrii,a31-hummingbird", "allwinner,sun6i-a31";
  2097. aliases {
  2098. + rtc0 = &pcf8563;
  2099. + rtc1 = &rtc;
  2100. serial0 = &uart0;
  2101. };
  2102. @@ -67,13 +69,17 @@
  2103. };
  2104. };
  2105. +&cpu0 {
  2106. + cpu-supply = <&reg_dcdc3>;
  2107. +};
  2108. +
  2109. &ehci0 {
  2110. status = "okay";
  2111. };
  2112. &gmac {
  2113. pinctrl-names = "default";
  2114. - pinctrl-0 = <&gmac_pins_rgmii_a>;
  2115. + pinctrl-0 = <&gmac_pins_rgmii_a>, <&gmac_phy_reset_pin_hummingbird>;
  2116. phy = <&phy1>;
  2117. phy-mode = "rgmii";
  2118. snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>;
  2119. @@ -119,7 +125,7 @@
  2120. &mmc0 {
  2121. pinctrl-names = "default";
  2122. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>;
  2123. - vmmc-supply = <&vcc_3v0>;
  2124. + vmmc-supply = <&reg_dcdc1>;
  2125. bus-width = <4>;
  2126. cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
  2127. cd-inverted;
  2128. @@ -134,7 +140,7 @@
  2129. &mmc1 {
  2130. pinctrl-names = "default";
  2131. pinctrl-0 = <&mmc1_pins_a>, <&wifi_reset_pin_hummingbird>;
  2132. - vmmc-supply = <&vcc_wifi>;
  2133. + vmmc-supply = <&reg_aldo1>;
  2134. mmc-pwrseq = <&wifi_pwrseq>;
  2135. bus-width = <4>;
  2136. non-removable;
  2137. @@ -146,6 +152,13 @@
  2138. };
  2139. &pio {
  2140. + gmac_phy_reset_pin_hummingbird: gmac_phy_reset_pin@0 {
  2141. + allwinner,pins = "PA21";
  2142. + allwinner,function = "gpio_out";
  2143. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  2144. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  2145. + };
  2146. +
  2147. mmc0_cd_pin_hummingbird: mmc0_cd_pin@0 {
  2148. allwinner,pins = "PA8";
  2149. allwinner,function = "gpio_in";
  2150. @@ -164,70 +177,69 @@
  2151. &p2wi {
  2152. status = "okay";
  2153. - axp221: pmic@68 {
  2154. + axp22x: pmic@68 {
  2155. compatible = "x-powers,axp221";
  2156. reg = <0x68>;
  2157. interrupt-parent = <&nmi_intc>;
  2158. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  2159. - interrupt-controller;
  2160. - #interrupt-cells = <1>;
  2161. - dcdc1-supply = <&vcc_3v0>;
  2162. - dcdc5-supply = <&vcc_dram>;
  2163. -
  2164. - regulators {
  2165. - x-powers,dcdc-freq = <3000>;
  2166. -
  2167. - vcc_3v0: dcdc1 {
  2168. - regulator-always-on;
  2169. - regulator-min-microvolt = <3000000>;
  2170. - regulator-max-microvolt = <3000000>;
  2171. - regulator-name = "vcc-3v0";
  2172. - };
  2173. -
  2174. - vdd_cpu: dcdc2 {
  2175. - regulator-always-on;
  2176. - regulator-min-microvolt = <700000>;
  2177. - regulator-max-microvolt = <1320000>;
  2178. - regulator-name = "vdd-cpu";
  2179. - };
  2180. -
  2181. - vdd_gpu: dcdc3 {
  2182. - regulator-always-on;
  2183. - regulator-min-microvolt = <700000>;
  2184. - regulator-max-microvolt = <1320000>;
  2185. - regulator-name = "vdd-gpu";
  2186. - };
  2187. -
  2188. - vdd_sys_dll: dcdc4 {
  2189. - regulator-always-on;
  2190. - regulator-min-microvolt = <1100000>;
  2191. - regulator-max-microvolt = <1100000>;
  2192. - regulator-name = "vdd-sys-dll";
  2193. - };
  2194. -
  2195. - vcc_dram: dcdc5 {
  2196. - regulator-always-on;
  2197. - regulator-min-microvolt = <1500000>;
  2198. - regulator-max-microvolt = <1500000>;
  2199. - regulator-name = "vcc-dram";
  2200. - };
  2201. -
  2202. - vcc_wifi: aldo1 {
  2203. - regulator-min-microvolt = <3300000>;
  2204. - regulator-max-microvolt = <3300000>;
  2205. - regulator-name = "vcc_wifi";
  2206. - };
  2207. -
  2208. - avcc: aldo3 {
  2209. - regulator-always-on;
  2210. - regulator-min-microvolt = <3000000>;
  2211. - regulator-max-microvolt = <3000000>;
  2212. - regulator-name = "avcc";
  2213. - };
  2214. - };
  2215. };
  2216. };
  2217. +#include "axp22x.dtsi"
  2218. +
  2219. +&reg_aldo1 {
  2220. + regulator-min-microvolt = <3300000>;
  2221. + regulator-max-microvolt = <3300000>;
  2222. + regulator-name = "vcc-wifi";
  2223. +};
  2224. +
  2225. +&reg_aldo3 {
  2226. + regulator-always-on;
  2227. + regulator-min-microvolt = <2700000>;
  2228. + regulator-max-microvolt = <3300000>;
  2229. + regulator-name = "avcc";
  2230. +};
  2231. +
  2232. +&reg_dc5ldo {
  2233. + regulator-min-microvolt = <700000>;
  2234. + regulator-max-microvolt = <1320000>;
  2235. + regulator-name = "vdd-cpus";
  2236. +};
  2237. +
  2238. +&reg_dcdc1 {
  2239. + regulator-always-on;
  2240. + regulator-min-microvolt = <3000000>;
  2241. + regulator-max-microvolt = <3000000>;
  2242. + regulator-name = "vcc-3v0";
  2243. +};
  2244. +
  2245. +&reg_dcdc2 {
  2246. + regulator-min-microvolt = <700000>;
  2247. + regulator-max-microvolt = <1320000>;
  2248. + regulator-name = "vdd-gpu";
  2249. +};
  2250. +
  2251. +&reg_dcdc3 {
  2252. + regulator-always-on;
  2253. + regulator-min-microvolt = <700000>;
  2254. + regulator-max-microvolt = <1320000>;
  2255. + regulator-name = "vdd-cpu";
  2256. +};
  2257. +
  2258. +&reg_dcdc4 {
  2259. + regulator-always-on;
  2260. + regulator-min-microvolt = <700000>;
  2261. + regulator-max-microvolt = <1320000>;
  2262. + regulator-name = "vdd-sys-dll";
  2263. +};
  2264. +
  2265. +&reg_dcdc5 {
  2266. + regulator-always-on;
  2267. + regulator-min-microvolt = <1500000>;
  2268. + regulator-max-microvolt = <1500000>;
  2269. + regulator-name = "vcc-dram";
  2270. +};
  2271. +
  2272. &reg_usb1_vbus {
  2273. gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
  2274. status = "okay";
  2275. --- a/arch/arm/dts/sun6i-a31.dtsi
  2276. +++ b/arch/arm/dts/sun6i-a31.dtsi
  2277. @@ -61,7 +61,7 @@
  2278. #size-cells = <1>;
  2279. ranges;
  2280. - framebuffer@0 {
  2281. + simplefb_hdmi: framebuffer@0 {
  2282. compatible = "allwinner,simple-framebuffer",
  2283. "simple-framebuffer";
  2284. allwinner,pipeline = "de_be0-lcd0-hdmi";
  2285. @@ -69,7 +69,7 @@
  2286. status = "disabled";
  2287. };
  2288. - framebuffer@1 {
  2289. + simplefb_lcd: framebuffer@1 {
  2290. compatible = "allwinner,simple-framebuffer",
  2291. "simple-framebuffer";
  2292. allwinner,pipeline = "de_be0-lcd0";
  2293. @@ -252,6 +252,20 @@
  2294. compatible = "allwinner,sun6i-a31-ahb1-gates-clk";
  2295. reg = <0x01c20060 0x8>;
  2296. clocks = <&ahb1>;
  2297. + clock-indices = <1>, <5>,
  2298. + <6>, <8>, <9>,
  2299. + <10>, <11>, <12>,
  2300. + <13>, <14>,
  2301. + <17>, <18>, <19>,
  2302. + <20>, <21>, <22>,
  2303. + <23>, <24>, <26>,
  2304. + <27>, <29>,
  2305. + <30>, <31>, <32>,
  2306. + <36>, <37>, <40>,
  2307. + <43>, <44>, <45>,
  2308. + <46>, <47>, <50>,
  2309. + <52>, <55>, <56>,
  2310. + <57>, <58>;
  2311. clock-output-names = "ahb1_mipidsi", "ahb1_ss",
  2312. "ahb1_dma", "ahb1_mmc0", "ahb1_mmc1",
  2313. "ahb1_mmc2", "ahb1_mmc3", "ahb1_nand1",
  2314. @@ -281,6 +295,9 @@
  2315. compatible = "allwinner,sun6i-a31-apb1-gates-clk";
  2316. reg = <0x01c20068 0x4>;
  2317. clocks = <&apb1>;
  2318. + clock-indices = <0>, <4>,
  2319. + <5>, <12>,
  2320. + <13>;
  2321. clock-output-names = "apb1_codec", "apb1_digital_mic",
  2322. "apb1_pio", "apb1_daudio0",
  2323. "apb1_daudio1";
  2324. @@ -299,6 +316,10 @@
  2325. compatible = "allwinner,sun6i-a31-apb2-gates-clk";
  2326. reg = <0x01c2006c 0x4>;
  2327. clocks = <&apb2>;
  2328. + clock-indices = <0>, <1>,
  2329. + <2>, <3>, <16>,
  2330. + <17>, <18>, <19>,
  2331. + <20>, <21>;
  2332. clock-output-names = "apb2_i2c0", "apb2_i2c1",
  2333. "apb2_i2c2", "apb2_i2c3",
  2334. "apb2_uart0", "apb2_uart1",
  2335. @@ -346,6 +367,14 @@
  2336. "mmc3_sample";
  2337. };
  2338. + ss_clk: clk@01c2009c {
  2339. + #clock-cells = <0>;
  2340. + compatible = "allwinner,sun4i-a10-mod0-clk";
  2341. + reg = <0x01c2009c 0x4>;
  2342. + clocks = <&osc24M>, <&pll6 0>;
  2343. + clock-output-names = "ss";
  2344. + };
  2345. +
  2346. spi0_clk: clk@01c200a0 {
  2347. #clock-cells = <0>;
  2348. compatible = "allwinner,sun4i-a10-mod0-clk";
  2349. @@ -384,6 +413,9 @@
  2350. compatible = "allwinner,sun6i-a31-usb-clk";
  2351. reg = <0x01c200cc 0x4>;
  2352. clocks = <&osc24M>;
  2353. + clock-indices = <8>, <9>, <10>,
  2354. + <16>, <17>,
  2355. + <18>;
  2356. clock-output-names = "usb_phy0", "usb_phy1", "usb_phy2",
  2357. "usb_ohci0", "usb_ohci1",
  2358. "usb_ohci2";
  2359. @@ -684,6 +716,16 @@
  2360. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  2361. };
  2362. + mmc3_8bit_emmc_pins: mmc3@1 {
  2363. + allwinner,pins = "PC6", "PC7", "PC8", "PC9",
  2364. + "PC10", "PC11", "PC12",
  2365. + "PC13", "PC14", "PC15",
  2366. + "PC24";
  2367. + allwinner,function = "mmc3";
  2368. + allwinner,drive = <SUN4I_PINCTRL_40_MA>;
  2369. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  2370. + };
  2371. +
  2372. gmac_pins_mii_a: gmac_mii@0 {
  2373. allwinner,pins = "PA0", "PA1", "PA2", "PA3",
  2374. "PA8", "PA9", "PA11",
  2375. @@ -761,6 +803,13 @@
  2376. reg = <0x01c20ca0 0x20>;
  2377. };
  2378. + lradc: lradc@01c22800 {
  2379. + compatible = "allwinner,sun4i-a10-lradc-keys";
  2380. + reg = <0x01c22800 0x100>;
  2381. + interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
  2382. + status = "disabled";
  2383. + };
  2384. +
  2385. rtp: rtp@01c25000 {
  2386. compatible = "allwinner,sun6i-a31-ts";
  2387. reg = <0x01c25000 0x100>;
  2388. @@ -907,6 +956,16 @@
  2389. #size-cells = <0>;
  2390. };
  2391. + crypto: crypto-engine@01c15000 {
  2392. + compatible = "allwinner,sun4i-a10-crypto";
  2393. + reg = <0x01c15000 0x1000>;
  2394. + interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
  2395. + clocks = <&ahb1_gates 5>, <&ss_clk>;
  2396. + clock-names = "ahb", "mod";
  2397. + resets = <&ahb1_rst 5>;
  2398. + reset-names = "ahb";
  2399. + };
  2400. +
  2401. timer@01c60000 {
  2402. compatible = "allwinner,sun6i-a31-hstimer",
  2403. "allwinner,sun7i-a20-hstimer";
  2404. @@ -1068,7 +1127,7 @@
  2405. resets = <&apb0_rst 0>;
  2406. gpio-controller;
  2407. interrupt-controller;
  2408. - #interrupt-cells = <2>;
  2409. + #interrupt-cells = <3>;
  2410. #size-cells = <0>;
  2411. #gpio-cells = <3>;
  2412. --- a/arch/arm/dts/sun6i-a31s-primo81.dts
  2413. +++ b/arch/arm/dts/sun6i-a31s-primo81.dts
  2414. @@ -1,16 +1,57 @@
  2415. /*
  2416. - * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
  2417. + * Copyright 2014 Siarhei Siamashka <siarhei.siamashka@gmail.com>
  2418. + * Copyright 2015 Karsten Merker <merker@debian.org>
  2419. + * Copyright 2015 Chen-Yu Tsai <wens@csie.org>
  2420. *
  2421. - * Minimal dts file for the MSI Primo81 for u-boot only
  2422. + * This file is dual-licensed: you can use it either under the terms
  2423. + * of the GPL or the X11 license, at your option. Note that this dual
  2424. + * licensing only applies to this file, and not this project as a
  2425. + * whole.
  2426. *
  2427. - * SPDX-License-Identifier: GPL-2.0+ or X11
  2428. + * a) This file is free software; you can redistribute it and/or
  2429. + * modify it under the terms of the GNU General Public License as
  2430. + * published by the Free Software Foundation; either version 2 of the
  2431. + * License, or (at your option) any later version.
  2432. + *
  2433. + * This file is distributed in the hope that it will be useful,
  2434. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  2435. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  2436. + * GNU General Public License for more details.
  2437. + *
  2438. + * Or, alternatively,
  2439. + *
  2440. + * b) Permission is hereby granted, free of charge, to any person
  2441. + * obtaining a copy of this software and associated documentation
  2442. + * files (the "Software"), to deal in the Software without
  2443. + * restriction, including without limitation the rights to use,
  2444. + * copy, modify, merge, publish, distribute, sublicense, and/or
  2445. + * sell copies of the Software, and to permit persons to whom the
  2446. + * Software is furnished to do so, subject to the following
  2447. + * conditions:
  2448. + *
  2449. + * The above copyright notice and this permission notice shall be
  2450. + * included in all copies or substantial portions of the Software.
  2451. + *
  2452. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  2453. + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  2454. + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  2455. + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  2456. + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  2457. + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  2458. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  2459. + * OTHER DEALINGS IN THE SOFTWARE.
  2460. */
  2461. /dts-v1/;
  2462. #include "sun6i-a31s.dtsi"
  2463. +#include "sunxi-common-regulators.dtsi"
  2464. +
  2465. +#include <dt-bindings/gpio/gpio.h>
  2466. +#include <dt-bindings/input/input.h>
  2467. +#include <dt-bindings/pinctrl/sun4i-a10.h>
  2468. / {
  2469. - model = "MSI Primo81";
  2470. + model = "MSI Primo81 tablet";
  2471. compatible = "msi,primo81", "allwinner,sun6i-a31s";
  2472. aliases {
  2473. @@ -22,8 +63,202 @@
  2474. };
  2475. };
  2476. -&uart0 {
  2477. +&cpu0 {
  2478. + cpu-supply = <&reg_dcdc3>;
  2479. +};
  2480. +
  2481. +&ehci0 {
  2482. + /* rtl8188etv wifi is connected here */
  2483. + status = "okay";
  2484. +};
  2485. +
  2486. +&i2c0 {
  2487. + /* pull-ups and device VDDIO use AXP221 DLDO3 */
  2488. + pinctrl-names = "default";
  2489. + pinctrl-0 = <&i2c0_pins_a>;
  2490. + status = "failed";
  2491. +};
  2492. +
  2493. +&i2c1 {
  2494. + pinctrl-names = "default";
  2495. + pinctrl-0 = <&i2c1_pins_a>;
  2496. + status = "okay";
  2497. +
  2498. + ctp@5d {
  2499. + pinctrl-names = "default";
  2500. + pinctrl-0 = <&gt911_int_primo81>;
  2501. + compatible = "goodix,gt911";
  2502. + reg = <0x5d>;
  2503. + interrupt-parent = <&pio>;
  2504. + interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */
  2505. + touchscreen-swapped-x-y;
  2506. + };
  2507. +};
  2508. +
  2509. +&i2c2 {
  2510. pinctrl-names = "default";
  2511. - pinctrl-0 = <&uart0_pins_a>;
  2512. + pinctrl-0 = <&i2c2_pins_a>;
  2513. + status = "okay";
  2514. +
  2515. + accelerometer@1c {
  2516. + pinctrl-names = "default";
  2517. + pinctrl-0 = <&mma8452_int_primo81>;
  2518. + compatible = "fsl,mma8452";
  2519. + reg = <0x1c>;
  2520. + interrupt-parent = <&pio>;
  2521. + interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>; /* PA9 */
  2522. + #io-channel-cells = <1>;
  2523. + };
  2524. +};
  2525. +
  2526. +&lradc {
  2527. + vref-supply = <&reg_aldo3>;
  2528. + status = "okay";
  2529. +
  2530. + button@158 {
  2531. + label = "Volume Up";
  2532. + linux,code = <KEY_VOLUMEUP>;
  2533. + channel = <0>;
  2534. + voltage = <158730>;
  2535. + };
  2536. +
  2537. + button@349 {
  2538. + label = "Volume Down";
  2539. + linux,code = <KEY_VOLUMEDOWN>;
  2540. + channel = <0>;
  2541. + voltage = <349206>;
  2542. + };
  2543. +};
  2544. +
  2545. +&mmc0 {
  2546. + pinctrl-names = "default";
  2547. + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
  2548. + vmmc-supply = <&reg_dcdc1>;
  2549. + bus-width = <4>;
  2550. + cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
  2551. + cd-inverted;
  2552. + status = "okay";
  2553. +};
  2554. +
  2555. +&pio {
  2556. + gt911_int_primo81: gt911_int_pin@0 {
  2557. + allwinner,pins = "PA3";
  2558. + allwinner,function = "gpio_in";
  2559. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  2560. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  2561. + };
  2562. +
  2563. + mma8452_int_primo81: mma8452_int_pin@0 {
  2564. + allwinner,pins = "PA9";
  2565. + allwinner,function = "gpio_in";
  2566. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  2567. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  2568. + };
  2569. +
  2570. + mmc0_cd_pin_primo81: mmc0_cd_pin@0 {
  2571. + allwinner,pins = "PA8";
  2572. + allwinner,function = "gpio_in";
  2573. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  2574. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  2575. + };
  2576. +};
  2577. +
  2578. +&p2wi {
  2579. + status = "okay";
  2580. +
  2581. + axp22x: pmic@68 {
  2582. + compatible = "x-powers,axp221";
  2583. + reg = <0x68>;
  2584. + interrupt-parent = <&nmi_intc>;
  2585. + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  2586. + };
  2587. +};
  2588. +
  2589. +#include "axp22x.dtsi"
  2590. +
  2591. +&reg_aldo3 {
  2592. + regulator-always-on;
  2593. + regulator-min-microvolt = <2700000>;
  2594. + regulator-max-microvolt = <3300000>;
  2595. + regulator-name = "avcc";
  2596. +};
  2597. +
  2598. +&reg_dc1sw {
  2599. + regulator-min-microvolt = <3000000>;
  2600. + regulator-max-microvolt = <3000000>;
  2601. + regulator-name = "vcc-lcd";
  2602. +};
  2603. +
  2604. +&reg_dc5ldo {
  2605. + regulator-min-microvolt = <700000>;
  2606. + regulator-max-microvolt = <1320000>;
  2607. + regulator-name = "vdd-cpus"; /* This is an educated guess */
  2608. +};
  2609. +
  2610. +&reg_dcdc1 {
  2611. + regulator-always-on;
  2612. + regulator-min-microvolt = <3000000>;
  2613. + regulator-max-microvolt = <3000000>;
  2614. + regulator-name = "vcc-3v0";
  2615. +};
  2616. +
  2617. +&reg_dcdc2 {
  2618. + regulator-min-microvolt = <700000>;
  2619. + regulator-max-microvolt = <1320000>;
  2620. + regulator-name = "vdd-gpu";
  2621. +};
  2622. +
  2623. +&reg_dcdc3 {
  2624. + regulator-always-on;
  2625. + regulator-min-microvolt = <700000>;
  2626. + regulator-max-microvolt = <1320000>;
  2627. + regulator-name = "vdd-cpu";
  2628. +};
  2629. +
  2630. +&reg_dcdc4 {
  2631. + regulator-always-on;
  2632. + regulator-min-microvolt = <700000>;
  2633. + regulator-max-microvolt = <1320000>;
  2634. + regulator-name = "vdd-sys-dll";
  2635. +};
  2636. +
  2637. +&reg_dcdc5 {
  2638. + regulator-always-on;
  2639. + regulator-min-microvolt = <1500000>;
  2640. + regulator-max-microvolt = <1500000>;
  2641. + regulator-name = "vcc-dram";
  2642. +};
  2643. +
  2644. +&reg_dldo1 {
  2645. + regulator-min-microvolt = <3300000>;
  2646. + regulator-max-microvolt = <3300000>;
  2647. + regulator-name = "vcc-wifi";
  2648. +};
  2649. +
  2650. +&reg_dldo3 {
  2651. + regulator-min-microvolt = <2800000>;
  2652. + regulator-max-microvolt = <2800000>;
  2653. + regulator-name = "vddio-csi";
  2654. +};
  2655. +
  2656. +&reg_eldo3 {
  2657. + regulator-min-microvolt = <1080000>;
  2658. + regulator-max-microvolt = <1320000>;
  2659. + regulator-name = "vdd-mipi-bridge";
  2660. +};
  2661. +
  2662. +&simplefb_lcd {
  2663. + vcc-lcd-supply = <&reg_dc1sw>;
  2664. + vdd-mipi-bridge-supply = <&reg_eldo3>;
  2665. +};
  2666. +
  2667. +&usb_otg {
  2668. + /* otg support requires support for AXP221 usb-power-supply and GPIO */
  2669. + dr_mode = "host";
  2670. + status = "okay";
  2671. +};
  2672. +
  2673. +&usbphy {
  2674. + usb1_vbus-supply = <&reg_dldo1>;
  2675. status = "okay";
  2676. };
  2677. --- /dev/null
  2678. +++ b/arch/arm/dts/sun6i-a31s-sina31s-core.dtsi
  2679. @@ -0,0 +1,142 @@
  2680. +/*
  2681. + * Copyright 2015 Chen-Yu Tsai <wens@csie.org>
  2682. + *
  2683. + * This file is dual-licensed: you can use it either under the terms
  2684. + * of the GPL or the X11 license, at your option. Note that this dual
  2685. + * licensing only applies to this file, and not this project as a
  2686. + * whole.
  2687. + *
  2688. + * a) This file is free software; you can redistribute it and/or
  2689. + * modify it under the terms of the GNU General Public License as
  2690. + * published by the Free Software Foundation; either version 2 of the
  2691. + * License, or (at your option) any later version.
  2692. + *
  2693. + * This file is distributed in the hope that it will be useful,
  2694. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  2695. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  2696. + * GNU General Public License for more details.
  2697. + *
  2698. + * Or, alternatively,
  2699. + *
  2700. + * b) Permission is hereby granted, free of charge, to any person
  2701. + * obtaining a copy of this software and associated documentation
  2702. + * files (the "Software"), to deal in the Software without
  2703. + * restriction, including without limitation the rights to use,
  2704. + * copy, modify, merge, publish, distribute, sublicense, and/or
  2705. + * sell copies of the Software, and to permit persons to whom the
  2706. + * Software is furnished to do so, subject to the following
  2707. + * conditions:
  2708. + *
  2709. + * The above copyright notice and this permission notice shall be
  2710. + * included in all copies or substantial portions of the Software.
  2711. + *
  2712. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  2713. + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  2714. + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  2715. + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  2716. + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  2717. + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  2718. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  2719. + * OTHER DEALINGS IN THE SOFTWARE.
  2720. + */
  2721. +
  2722. +/dts-v1/;
  2723. +#include "sun6i-a31s.dtsi"
  2724. +#include "sunxi-common-regulators.dtsi"
  2725. +
  2726. +#include <dt-bindings/gpio/gpio.h>
  2727. +#include <dt-bindings/pinctrl/sun4i-a10.h>
  2728. +
  2729. +/ {
  2730. + model = "Sinlinx SinA31s Core Board";
  2731. + compatible = "sinlinx,sina31s", "allwinner,sun6i-a31s";
  2732. +
  2733. + aliases {
  2734. + serial0 = &uart0;
  2735. + };
  2736. +};
  2737. +
  2738. +&cpu0 {
  2739. + cpu-supply = <&reg_dcdc3>;
  2740. +};
  2741. +
  2742. +/* eMMC on core board */
  2743. +&mmc3 {
  2744. + pinctrl-names = "default";
  2745. + pinctrl-0 = <&mmc3_8bit_emmc_pins>;
  2746. + vmmc-supply = <&reg_dcdc1>;
  2747. + vqmmc-supply = <&reg_dcdc1>;
  2748. + bus-width = <8>;
  2749. + non-removable;
  2750. + cap-mmc-hw-reset;
  2751. + status = "okay";
  2752. +};
  2753. +
  2754. +/* AXP221s PMIC on core board */
  2755. +&p2wi {
  2756. + status = "okay";
  2757. +
  2758. + axp22x: pmic@68 {
  2759. + compatible = "x-powers,axp221";
  2760. + reg = <0x68>;
  2761. + interrupt-parent = <&nmi_intc>;
  2762. + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  2763. + };
  2764. +};
  2765. +
  2766. +#include "axp22x.dtsi"
  2767. +
  2768. +&reg_aldo3 {
  2769. + regulator-always-on;
  2770. + regulator-min-microvolt = <2700000>;
  2771. + regulator-max-microvolt = <3300000>;
  2772. + regulator-name = "avcc";
  2773. +};
  2774. +
  2775. +&reg_dc5ldo {
  2776. + regulator-min-microvolt = <700000>;
  2777. + regulator-max-microvolt = <1320000>;
  2778. + regulator-name = "vdd-cpus";
  2779. +};
  2780. +
  2781. +&reg_dcdc1 {
  2782. + regulator-always-on;
  2783. + regulator-min-microvolt = <3000000>;
  2784. + regulator-max-microvolt = <3000000>;
  2785. + regulator-name = "vcc-3v0";
  2786. +};
  2787. +
  2788. +&reg_dcdc2 {
  2789. + regulator-min-microvolt = <700000>;
  2790. + regulator-max-microvolt = <1320000>;
  2791. + regulator-name = "vdd-gpu";
  2792. +};
  2793. +
  2794. +&reg_dcdc3 {
  2795. + regulator-always-on;
  2796. + regulator-min-microvolt = <700000>;
  2797. + regulator-max-microvolt = <1320000>;
  2798. + regulator-name = "vdd-cpu";
  2799. +};
  2800. +
  2801. +&reg_dcdc4 {
  2802. + regulator-always-on;
  2803. + regulator-min-microvolt = <700000>;
  2804. + regulator-max-microvolt = <1320000>;
  2805. + regulator-name = "vdd-sys-dll";
  2806. +};
  2807. +
  2808. +&reg_dcdc5 {
  2809. + regulator-always-on;
  2810. + regulator-min-microvolt = <1500000>;
  2811. + regulator-max-microvolt = <1500000>;
  2812. + regulator-name = "vcc-dram";
  2813. +};
  2814. +
  2815. +/* UART0 pads available on core board */
  2816. +&uart0 {
  2817. + pinctrl-names = "default";
  2818. + pinctrl-0 = <&uart0_pins_a>;
  2819. + status = "okay";
  2820. +};
  2821. +
  2822. --- /dev/null
  2823. +++ b/arch/arm/dts/sun6i-a31s-sina31s.dts
  2824. @@ -0,0 +1,153 @@
  2825. +/*
  2826. + * Copyright 2015 Chen-Yu Tsai <wens@csie.org>
  2827. + *
  2828. + * This file is dual-licensed: you can use it either under the terms
  2829. + * of the GPL or the X11 license, at your option. Note that this dual
  2830. + * licensing only applies to this file, and not this project as a
  2831. + * whole.
  2832. + *
  2833. + * a) This file is free software; you can redistribute it and/or
  2834. + * modify it under the terms of the GNU General Public License as
  2835. + * published by the Free Software Foundation; either version 2 of the
  2836. + * License, or (at your option) any later version.
  2837. + *
  2838. + * This file is distributed in the hope that it will be useful,
  2839. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  2840. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  2841. + * GNU General Public License for more details.
  2842. + *
  2843. + * Or, alternatively,
  2844. + *
  2845. + * b) Permission is hereby granted, free of charge, to any person
  2846. + * obtaining a copy of this software and associated documentation
  2847. + * files (the "Software"), to deal in the Software without
  2848. + * restriction, including without limitation the rights to use,
  2849. + * copy, modify, merge, publish, distribute, sublicense, and/or
  2850. + * sell copies of the Software, and to permit persons to whom the
  2851. + * Software is furnished to do so, subject to the following
  2852. + * conditions:
  2853. + *
  2854. + * The above copyright notice and this permission notice shall be
  2855. + * included in all copies or substantial portions of the Software.
  2856. + *
  2857. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  2858. + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  2859. + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  2860. + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  2861. + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  2862. + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  2863. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  2864. + * OTHER DEALINGS IN THE SOFTWARE.
  2865. + */
  2866. +
  2867. +/* The SinA31s development board has the SinA31s core board soldered on */
  2868. +#include "sun6i-a31s-sina31s-core.dtsi"
  2869. +
  2870. +#include <dt-bindings/input/input.h>
  2871. +
  2872. +/ {
  2873. + model = "Sinlinx SinA31s Development Board";
  2874. + compatible = "sinlinx,sina31s-sdk", "allwinner,sun6i-a31s";
  2875. +
  2876. + chosen {
  2877. + stdout-path = "serial0:115200n8";
  2878. + };
  2879. +
  2880. + leds {
  2881. + compatible = "gpio-leds";
  2882. + pinctrl-names = "default";
  2883. + pinctrl-0 = <&led_pin_sina31s>;
  2884. +
  2885. + status {
  2886. + label = "sina31s:status:usr";
  2887. + gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */
  2888. + };
  2889. + };
  2890. +};
  2891. +
  2892. +&ehci0 {
  2893. + /* USB 2.0 4 port hub IC */
  2894. + status = "okay";
  2895. +};
  2896. +
  2897. +&ehci1 {
  2898. + status = "okay";
  2899. +};
  2900. +
  2901. +&gmac {
  2902. + pinctrl-names = "default";
  2903. + pinctrl-0 = <&gmac_pins_mii_a>;
  2904. + phy = <&phy1>;
  2905. + phy-mode = "mii";
  2906. + phy-supply = <&reg_dldo1>;
  2907. + status = "okay";
  2908. +
  2909. + phy1: ethernet-phy@1 {
  2910. + reg = <1>;
  2911. + };
  2912. +};
  2913. +
  2914. +&ir {
  2915. + pinctrl-names = "default";
  2916. + pinctrl-0 = <&ir_pins_a>;
  2917. + status = "okay";
  2918. +};
  2919. +
  2920. +&lradc {
  2921. + vref-supply = <&reg_aldo3>;
  2922. + status = "okay";
  2923. +
  2924. + button@158 {
  2925. + label = "Volume Up";
  2926. + linux,code = <KEY_VOLUMEUP>;
  2927. + channel = <0>;
  2928. + voltage = <158730>;
  2929. + };
  2930. +
  2931. + button@349 {
  2932. + label = "Volume Down";
  2933. + linux,code = <KEY_VOLUMEDOWN>;
  2934. + channel = <0>;
  2935. + voltage = <349206>;
  2936. + };
  2937. +};
  2938. +
  2939. +&mmc0 {
  2940. + pinctrl-names = "default";
  2941. + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina31s>;
  2942. + vmmc-supply = <&reg_dcdc1>;
  2943. + bus-width = <4>;
  2944. + cd-gpios = <&pio 0 4 GPIO_ACTIVE_HIGH>; /* PA4 */
  2945. + cd-inverted;
  2946. + status = "okay";
  2947. +};
  2948. +
  2949. +&ohci1 {
  2950. + status = "okay";
  2951. +};
  2952. +
  2953. +&pio {
  2954. + led_pin_sina31s: led_pin@0 {
  2955. + allwinner,pins = "PH13";
  2956. + allwinner,function = "gpio_out";
  2957. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  2958. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  2959. + };
  2960. +
  2961. + mmc0_cd_pin_sina31s: mmc0_cd_pin@0 {
  2962. + allwinner,pins = "PA4";
  2963. + allwinner,function = "gpio_in";
  2964. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  2965. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  2966. + };
  2967. +};
  2968. +
  2969. +&reg_dldo1 {
  2970. + regulator-min-microvolt = <3300000>;
  2971. + regulator-max-microvolt = <3300000>;
  2972. + regulator-name = "vcc-gmac-phy";
  2973. +};
  2974. +
  2975. +&usbphy {
  2976. + status = "okay";
  2977. +};
  2978. --- /dev/null
  2979. +++ b/arch/arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts
  2980. @@ -0,0 +1,205 @@
  2981. +/*
  2982. + * Copyright 2015 Lawrence Yu <lyu@micile.com>
  2983. + *
  2984. + * This file is dual-licensed: you can use it either under the terms
  2985. + * of the GPL or the X11 license, at your option. Note that this dual
  2986. + * licensing only applies to this file, and not this project as a
  2987. + * whole.
  2988. + *
  2989. + * a) This file is free software; you can redistribute it and/or
  2990. + * modify it under the terms of the GNU General Public License as
  2991. + * published by the Free Software Foundation; either version 2 of the
  2992. + * License, or (at your option) any later version.
  2993. + *
  2994. + * This file is distributed in the hope that it will be useful,
  2995. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  2996. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  2997. + * GNU General Public License for more details.
  2998. + *
  2999. + * Or, alternatively,
  3000. + *
  3001. + * b) Permission is hereby granted, free of charge, to any person
  3002. + * obtaining a copy of this software and associated documentation
  3003. + * files (the "Software"), to deal in the Software without
  3004. + * restriction, including without limitation the rights to use,
  3005. + * copy, modify, merge, publish, distribute, sublicense, and/or
  3006. + * sell copies of the Software, and to permit persons to whom the
  3007. + * Software is furnished to do so, subject to the following
  3008. + * conditions:
  3009. + *
  3010. + * The above copyright notice and this permission notice shall be
  3011. + * included in all copies or substantial portions of the Software.
  3012. + *
  3013. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  3014. + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  3015. + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  3016. + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  3017. + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  3018. + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  3019. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  3020. + * OTHER DEALINGS IN THE SOFTWARE.
  3021. + */
  3022. +
  3023. +/dts-v1/;
  3024. +#include "sun6i-a31s.dtsi"
  3025. +#include "sunxi-common-regulators.dtsi"
  3026. +
  3027. +#include <dt-bindings/gpio/gpio.h>
  3028. +#include <dt-bindings/pinctrl/sun4i-a10.h>
  3029. +
  3030. +/ {
  3031. + model = "Yones TopTech BS1078 v2 Tablet";
  3032. + compatible = "yones-toptech,bs1078-v2", "allwinner,sun6i-a31s";
  3033. +
  3034. + aliases {
  3035. + serial0 = &uart0;
  3036. + i2c1 = &i2c1;
  3037. + i2c2 = &i2c2;
  3038. + };
  3039. +
  3040. + chosen {
  3041. + stdout-path = "serial0:115200n8";
  3042. + };
  3043. +};
  3044. +
  3045. +&i2c1 {
  3046. + pinctrl-names = "default";
  3047. + pinctrl-0 = <&i2c1_pins_a>;
  3048. + status = "okay";
  3049. +};
  3050. +
  3051. +&i2c2 {
  3052. + pinctrl-names = "default";
  3053. + pinctrl-0 = <&i2c2_pins_a>;
  3054. + status = "okay";
  3055. +};
  3056. +
  3057. +&ehci0 {
  3058. + status = "okay";
  3059. +};
  3060. +
  3061. +&ehci1 {
  3062. + status = "okay";
  3063. +};
  3064. +
  3065. +&ohci0 {
  3066. + status = "okay";
  3067. +};
  3068. +
  3069. +&ohci1 {
  3070. + status = "okay";
  3071. +};
  3072. +
  3073. +&pio {
  3074. + mmc0_cd_pin_bs1078v2: mmc0_cd_pin@0 {
  3075. + allwinner,pins = "PA8";
  3076. + allwinner,function = "gpio_in";
  3077. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  3078. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  3079. + };
  3080. +};
  3081. +
  3082. +&mmc0 {
  3083. + pinctrl-names = "default";
  3084. + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bs1078v2>;
  3085. + vmmc-supply = <&reg_vcc3v0>;
  3086. + bus-width = <4>;
  3087. + cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
  3088. + cd-inverted;
  3089. + status = "okay";
  3090. +};
  3091. +
  3092. +&mmc0_pins_a {
  3093. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  3094. +};
  3095. +
  3096. +&p2wi {
  3097. + status = "okay";
  3098. +
  3099. + axp22x: pmic@68 {
  3100. + compatible = "x-powers,axp221";
  3101. + reg = <0x68>;
  3102. + interrupt-parent = <&nmi_intc>;
  3103. + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  3104. + };
  3105. +};
  3106. +
  3107. +#include "axp22x.dtsi"
  3108. +
  3109. +&reg_aldo3 {
  3110. + regulator-always-on;
  3111. + regulator-min-microvolt = <2700000>;
  3112. + regulator-max-microvolt = <3300000>;
  3113. + regulator-name = "avcc";
  3114. +};
  3115. +
  3116. +&reg_dc1sw {
  3117. + regulator-name = "vcc-lcd-usb2";
  3118. + regulator-min-microvolt = <3000000>;
  3119. + regulator-max-microvolt = <3000000>;
  3120. +};
  3121. +
  3122. +&reg_dc5ldo {
  3123. + regulator-min-microvolt = <700000>;
  3124. + regulator-max-microvolt = <1320000>;
  3125. + regulator-name = "vdd-cpus";
  3126. +};
  3127. +
  3128. +&reg_dcdc1 {
  3129. + regulator-always-on;
  3130. + regulator-min-microvolt = <3000000>;
  3131. + regulator-max-microvolt = <3000000>;
  3132. + regulator-name = "vcc-3v0";
  3133. +};
  3134. +
  3135. +&reg_dcdc2 {
  3136. + regulator-min-microvolt = <700000>;
  3137. + regulator-max-microvolt = <1320000>;
  3138. + regulator-name = "vdd-gpu";
  3139. +};
  3140. +
  3141. +&reg_dcdc3 {
  3142. + regulator-always-on;
  3143. + regulator-min-microvolt = <700000>;
  3144. + regulator-max-microvolt = <1320000>;
  3145. + regulator-name = "vdd-cpu";
  3146. +};
  3147. +
  3148. +&reg_dcdc4 {
  3149. + regulator-always-on;
  3150. + regulator-min-microvolt = <700000>;
  3151. + regulator-max-microvolt = <1320000>;
  3152. + regulator-name = "vdd-sys-dll";
  3153. +};
  3154. +
  3155. +&reg_dcdc5 {
  3156. + regulator-always-on;
  3157. + regulator-min-microvolt = <1500000>;
  3158. + regulator-max-microvolt = <1500000>;
  3159. + regulator-name = "vcc-dram";
  3160. +};
  3161. +
  3162. +&reg_dldo1 {
  3163. + regulator-min-microvolt = <3300000>;
  3164. + regulator-max-microvolt = <3300000>;
  3165. + regulator-name = "vcc-wifi";
  3166. +};
  3167. +
  3168. +/* Voltage source for I2C pullup resistors for I2C Bus 0 */
  3169. +&reg_dldo3 {
  3170. + regulator-min-microvolt = <2800000>;
  3171. + regulator-max-microvolt = <2800000>;
  3172. + regulator-name = "vddio-csi";
  3173. +};
  3174. +
  3175. +&uart0 {
  3176. + pinctrl-names = "default";
  3177. + pinctrl-0 = <&uart0_pins_a>;
  3178. + status = "okay";
  3179. +};
  3180. +
  3181. +&usbphy {
  3182. + usb1_vbus-supply = <&reg_dldo1>;
  3183. + usb2_vbus-supply = <&reg_dc1sw>;
  3184. + status = "okay";
  3185. +};
  3186. --- a/arch/arm/dts/sun7i-a20-bananapi.dts
  3187. +++ b/arch/arm/dts/sun7i-a20-bananapi.dts
  3188. @@ -92,6 +92,24 @@
  3189. status = "okay";
  3190. };
  3191. +&codec {
  3192. + status = "okay";
  3193. +};
  3194. +
  3195. +&cpu0 {
  3196. + cpu-supply = <&reg_dcdc2>;
  3197. + operating-points = <
  3198. + /* kHz uV */
  3199. + 960000 1400000
  3200. + 912000 1400000
  3201. + 864000 1350000
  3202. + 720000 1250000
  3203. + 528000 1150000
  3204. + 312000 1100000
  3205. + 144000 1050000
  3206. + >;
  3207. +};
  3208. +
  3209. &ehci0 {
  3210. status = "okay";
  3211. };
  3212. @@ -119,13 +137,9 @@
  3213. status = "okay";
  3214. axp209: pmic@34 {
  3215. - compatible = "x-powers,axp209";
  3216. reg = <0x34>;
  3217. interrupt-parent = <&nmi_intc>;
  3218. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  3219. -
  3220. - interrupt-controller;
  3221. - #interrupt-cells = <1>;
  3222. };
  3223. };
  3224. @@ -159,7 +173,18 @@
  3225. status = "okay";
  3226. };
  3227. +&otg_sram {
  3228. + status = "okay";
  3229. +};
  3230. +
  3231. &pio {
  3232. + usb0_id_detect_pin: usb0_id_detect_pin@0 {
  3233. + allwinner,pins = "PH4";
  3234. + allwinner,function = "gpio_in";
  3235. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  3236. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  3237. + };
  3238. +
  3239. mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
  3240. allwinner,pins = "PH10";
  3241. allwinner,function = "gpio_in";
  3242. @@ -182,6 +207,37 @@
  3243. };
  3244. };
  3245. +#include "axp209.dtsi"
  3246. +
  3247. +&reg_dcdc2 {
  3248. + regulator-always-on;
  3249. + regulator-min-microvolt = <1000000>;
  3250. + regulator-max-microvolt = <1400000>;
  3251. + regulator-name = "vdd-cpu";
  3252. +};
  3253. +
  3254. +&reg_dcdc3 {
  3255. + regulator-always-on;
  3256. + regulator-min-microvolt = <1000000>;
  3257. + regulator-max-microvolt = <1400000>;
  3258. + regulator-name = "vdd-int-dll";
  3259. +};
  3260. +
  3261. +&reg_ldo1 {
  3262. + regulator-name = "vdd-rtc";
  3263. +};
  3264. +
  3265. +&reg_ldo2 {
  3266. + regulator-always-on;
  3267. + regulator-min-microvolt = <3000000>;
  3268. + regulator-max-microvolt = <3000000>;
  3269. + regulator-name = "avcc";
  3270. +};
  3271. +
  3272. +&reg_usb0_vbus {
  3273. + status = "okay";
  3274. +};
  3275. +
  3276. &reg_usb1_vbus {
  3277. status = "okay";
  3278. };
  3279. @@ -216,7 +272,21 @@
  3280. status = "okay";
  3281. };
  3282. +&usb_otg {
  3283. + dr_mode = "otg";
  3284. + status = "okay";
  3285. +};
  3286. +
  3287. +&usb_power_supply {
  3288. + status = "okay";
  3289. +};
  3290. +
  3291. &usbphy {
  3292. + pinctrl-names = "default";
  3293. + pinctrl-0 = <&usb0_id_detect_pin>;
  3294. + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  3295. + usb0_vbus_power-supply = <&usb_power_supply>;
  3296. + usb0_vbus-supply = <&reg_usb0_vbus>;
  3297. usb1_vbus-supply = <&reg_usb1_vbus>;
  3298. usb2_vbus-supply = <&reg_usb2_vbus>;
  3299. status = "okay";
  3300. --- a/arch/arm/dts/sun7i-a20-cubieboard2.dts
  3301. +++ b/arch/arm/dts/sun7i-a20-cubieboard2.dts
  3302. @@ -84,6 +84,10 @@
  3303. status = "okay";
  3304. };
  3305. +&codec {
  3306. + status = "okay";
  3307. +};
  3308. +
  3309. &cpu0 {
  3310. cpu-supply = <&reg_dcdc2>;
  3311. };
  3312. @@ -150,6 +154,10 @@
  3313. status = "okay";
  3314. };
  3315. +&otg_sram {
  3316. + status = "okay";
  3317. +};
  3318. +
  3319. &pio {
  3320. led_pins_cubieboard2: led_pins@0 {
  3321. allwinner,pins = "PH20", "PH21";
  3322. @@ -157,12 +165,24 @@
  3323. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  3324. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  3325. };
  3326. +
  3327. + usb0_id_detect_pin: usb0_id_detect_pin@0 {
  3328. + allwinner,pins = "PH4";
  3329. + allwinner,function = "gpio_in";
  3330. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  3331. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  3332. + };
  3333. };
  3334. &reg_ahci_5v {
  3335. status = "okay";
  3336. };
  3337. +&usb_otg {
  3338. + dr_mode = "otg";
  3339. + status = "okay";
  3340. +};
  3341. +
  3342. #include "axp209.dtsi"
  3343. &reg_dcdc2 {
  3344. @@ -205,6 +225,9 @@
  3345. };
  3346. &usbphy {
  3347. + pinctrl-names = "default";
  3348. + pinctrl-0 = <&usb0_id_detect_pin>;
  3349. + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  3350. usb1_vbus-supply = <&reg_usb1_vbus>;
  3351. usb2_vbus-supply = <&reg_usb2_vbus>;
  3352. status = "okay";
  3353. --- a/arch/arm/dts/sun7i-a20-cubietruck.dts
  3354. +++ b/arch/arm/dts/sun7i-a20-cubietruck.dts
  3355. @@ -101,6 +101,10 @@
  3356. status = "okay";
  3357. };
  3358. +&codec {
  3359. + status = "okay";
  3360. +};
  3361. +
  3362. &cpu0 {
  3363. cpu-supply = <&reg_dcdc2>;
  3364. };
  3365. --- /dev/null
  3366. +++ b/arch/arm/dts/sun7i-a20-icnova-swac.dts
  3367. @@ -0,0 +1,169 @@
  3368. +/*
  3369. + * Copyright 2015 Stefan Roese <sr@denx.de>
  3370. + *
  3371. + * This file is dual-licensed: you can use it either under the terms
  3372. + * of the GPL or the X11 license, at your option. Note that this dual
  3373. + * licensing only applies to this file, and not this project as a
  3374. + * whole.
  3375. + *
  3376. + * a) This file is free software; you can redistribute it and/or
  3377. + * modify it under the terms of the GNU General Public License as
  3378. + * published by the Free Software Foundation; either version 2 of the
  3379. + * License, or (at your option) any later version.
  3380. + *
  3381. + * This file is distributed in the hope that it will be useful,
  3382. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  3383. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  3384. + * GNU General Public License for more details.
  3385. + *
  3386. + * Or, alternatively,
  3387. + *
  3388. + * b) Permission is hereby granted, free of charge, to any person
  3389. + * obtaining a copy of this software and associated documentation
  3390. + * files (the "Software"), to deal in the Software without
  3391. + * restriction, including without limitation the rights to use,
  3392. + * copy, modify, merge, publish, distribute, sublicense, and/or
  3393. + * sell copies of the Software, and to permit persons to whom the
  3394. + * Software is furnished to do so, subject to the following
  3395. + * conditions:
  3396. + *
  3397. + * The above copyright notice and this permission notice shall be
  3398. + * included in all copies or substantial portions of the Software.
  3399. + *
  3400. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  3401. + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  3402. + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  3403. + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  3404. + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  3405. + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  3406. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  3407. + * OTHER DEALINGS IN THE SOFTWARE.
  3408. + */
  3409. +
  3410. +/dts-v1/;
  3411. +#include "sun7i-a20.dtsi"
  3412. +#include "sunxi-common-regulators.dtsi"
  3413. +
  3414. +#include <dt-bindings/gpio/gpio.h>
  3415. +#include <dt-bindings/interrupt-controller/irq.h>
  3416. +#include <dt-bindings/pinctrl/sun4i-a10.h>
  3417. +
  3418. +/ {
  3419. + model = "ICnova-A20 SWAC";
  3420. + compatible = "swac,icnova-a20-swac", "incircuit,icnova-a20", "allwinner,sun7i-a20";
  3421. +
  3422. + aliases {
  3423. + serial0 = &uart0;
  3424. + };
  3425. +
  3426. + chosen {
  3427. + stdout-path = "serial0:115200n8";
  3428. + };
  3429. +};
  3430. +
  3431. +&cpu0 {
  3432. + cpu-supply = <&reg_dcdc2>;
  3433. +};
  3434. +
  3435. +&ehci0 {
  3436. + status = "okay";
  3437. +};
  3438. +
  3439. +&ehci1 {
  3440. + status = "okay";
  3441. +};
  3442. +
  3443. +&gmac {
  3444. + pinctrl-names = "default";
  3445. + pinctrl-0 = <&gmac_pins_mii_a>;
  3446. + phy = <&phy1>;
  3447. + phy-mode = "mii";
  3448. + status = "okay";
  3449. +
  3450. + phy1: ethernet-phy@1 {
  3451. + reg = <1>;
  3452. + };
  3453. +};
  3454. +
  3455. +&i2c0 {
  3456. + pinctrl-names = "default";
  3457. + pinctrl-0 = <&i2c0_pins_a>;
  3458. + status = "okay";
  3459. +
  3460. + axp209: pmic@34 {
  3461. + reg = <0x34>;
  3462. + interrupt-parent = <&nmi_intc>;
  3463. + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  3464. + };
  3465. +};
  3466. +
  3467. +&i2c1 {
  3468. + pinctrl-names = "default";
  3469. + pinctrl-0 = <&i2c1_pins_a>;
  3470. + status = "okay";
  3471. +};
  3472. +
  3473. +&mmc0 {
  3474. + pinctrl-names = "default";
  3475. + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
  3476. + vmmc-supply = <&reg_vcc3v3>;
  3477. + bus-width = <4>;
  3478. + cd-gpios = <&pio 8 5 GPIO_ACTIVE_HIGH>; /* PI5 */
  3479. + cd-inverted;
  3480. + status = "okay";
  3481. +};
  3482. +
  3483. +&ohci0 {
  3484. + status = "okay";
  3485. +};
  3486. +
  3487. +&ohci1 {
  3488. + status = "okay";
  3489. +};
  3490. +
  3491. +#include "axp209.dtsi"
  3492. +
  3493. +&reg_dcdc2 {
  3494. + regulator-always-on;
  3495. + regulator-min-microvolt = <1000000>;
  3496. + regulator-max-microvolt = <1400000>;
  3497. + regulator-name = "vdd-cpu";
  3498. +};
  3499. +
  3500. +&reg_dcdc3 {
  3501. + regulator-always-on;
  3502. + regulator-min-microvolt = <1000000>;
  3503. + regulator-max-microvolt = <1400000>;
  3504. + regulator-name = "vdd-int-dll";
  3505. +};
  3506. +
  3507. +&reg_ldo1 {
  3508. + regulator-name = "vdd-rtc";
  3509. +};
  3510. +
  3511. +&reg_ldo2 {
  3512. + regulator-always-on;
  3513. + regulator-min-microvolt = <3000000>;
  3514. + regulator-max-microvolt = <3000000>;
  3515. + regulator-name = "avcc";
  3516. +};
  3517. +
  3518. +&reg_usb1_vbus {
  3519. + status = "okay";
  3520. +};
  3521. +
  3522. +&reg_usb2_vbus {
  3523. + status = "okay";
  3524. +};
  3525. +
  3526. +&uart0 {
  3527. + pinctrl-names = "default";
  3528. + pinctrl-0 = <&uart0_pins_a>;
  3529. + status = "okay";
  3530. +};
  3531. +
  3532. +&usbphy {
  3533. + usb1_vbus-supply = <&reg_usb1_vbus>;
  3534. + usb2_vbus-supply = <&reg_usb2_vbus>;
  3535. + status = "okay";
  3536. +};
  3537. --- /dev/null
  3538. +++ b/arch/arm/dts/sun7i-a20-itead-ibox.dts
  3539. @@ -0,0 +1,125 @@
  3540. +/*
  3541. + * Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
  3542. + *
  3543. + * This file is dual-licensed: you can use it either under the terms
  3544. + * of the GPL or the X11 license, at your option. Note that this dual
  3545. + * licensing only applies to this file, and not this project as a
  3546. + * whole.
  3547. + *
  3548. + * a) This file is free software; you can redistribute it and/or
  3549. + * modify it under the terms of the GNU General Public License as
  3550. + * published by the Free Software Foundation; either version 2 of the
  3551. + * License, or (at your option) any later version.
  3552. + *
  3553. + * This file is distributed in the hope that it will be useful,
  3554. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  3555. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  3556. + * GNU General Public License for more details.
  3557. + *
  3558. + * Or, alternatively,
  3559. + *
  3560. + * b) Permission is hereby granted, free of charge, to any person
  3561. + * obtaining a copy of this software and associated documentation
  3562. + * files (the "Software"), to deal in the Software without
  3563. + * restriction, including without limitation the rights to use,
  3564. + * copy, modify, merge, publish, distribute, sublicense, and/or
  3565. + * sell copies of the Software, and to permit persons to whom the
  3566. + * Software is furnished to do so, subject to the following
  3567. + * conditions:
  3568. + *
  3569. + * The above copyright notice and this permission notice shall be
  3570. + * included in all copies or substantial portions of the Software.
  3571. + *
  3572. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  3573. + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  3574. + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  3575. + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  3576. + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  3577. + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  3578. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  3579. + * OTHER DEALINGS IN THE SOFTWARE.
  3580. + */
  3581. +
  3582. +/dts-v1/;
  3583. +#include "sun7i-a20.dtsi"
  3584. +#include "sunxi-itead-core-common.dtsi"
  3585. +
  3586. +/ {
  3587. + model = "Itead Ibox A20";
  3588. + compatible = "itead,itead-ibox-a20", "allwinner,sun7i-a20";
  3589. +
  3590. + leds {
  3591. + compatible = "gpio-leds";
  3592. + pinctrl-names = "default";
  3593. + pinctrl-0 = <&led_pins_itead_core>;
  3594. +
  3595. + green {
  3596. + label = "itead_core:green:usr";
  3597. + gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
  3598. + default-state = "on";
  3599. + };
  3600. +
  3601. + blue {
  3602. + label = "itead_core:blue:usr";
  3603. + gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
  3604. + default-state = "on";
  3605. + };
  3606. + };
  3607. +};
  3608. +
  3609. +&ahci {
  3610. + target-supply = <&reg_ahci_5v>;
  3611. + status = "okay";
  3612. +};
  3613. +
  3614. +&codec {
  3615. + status = "okay";
  3616. +};
  3617. +
  3618. +&gmac {
  3619. + pinctrl-names = "default";
  3620. + pinctrl-0 = <&gmac_pins_mii_a>;
  3621. + phy = <&phy1>;
  3622. + phy-mode = "mii";
  3623. + status = "okay";
  3624. +
  3625. + phy1: ethernet-phy@1 {
  3626. + reg = <1>;
  3627. + };
  3628. +};
  3629. +
  3630. +&i2c0 {
  3631. + axp209: pmic@34 {
  3632. + interrupt-parent = <&nmi_intc>;
  3633. + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  3634. + };
  3635. +};
  3636. +
  3637. +&ir0 {
  3638. + pinctrl-names = "default";
  3639. + pinctrl-0 = <&ir0_rx_pins_a>;
  3640. + status = "okay";
  3641. +};
  3642. +
  3643. +&mmc0 {
  3644. + pinctrl-names = "default";
  3645. + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
  3646. + vmmc-supply = <&reg_vcc3v3>;
  3647. + bus-width = <4>;
  3648. + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
  3649. + cd-inverted;
  3650. + status = "okay";
  3651. +};
  3652. +
  3653. +&pio {
  3654. + led_pins_itead_core: led_pins@0 {
  3655. + allwinner,pins = "PH20","PH21";
  3656. + allwinner,function = "gpio_out";
  3657. + allwinner,drive = <SUN4I_PINCTRL_20_MA>;
  3658. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  3659. + };
  3660. +};
  3661. +
  3662. +&reg_ahci_5v {
  3663. + status = "okay";
  3664. +};
  3665. --- a/arch/arm/dts/sun7i-a20-lamobo-r1.dts
  3666. +++ b/arch/arm/dts/sun7i-a20-lamobo-r1.dts
  3667. @@ -97,16 +97,6 @@
  3668. &cpu0 {
  3669. cpu-supply = <&reg_dcdc2>;
  3670. - operating-points = <
  3671. - /* kHz uV */
  3672. - 960000 1400000
  3673. - 912000 1400000
  3674. - 864000 1350000
  3675. - 720000 1250000
  3676. - 528000 1150000
  3677. - 312000 1100000
  3678. - 144000 1050000
  3679. - >;
  3680. };
  3681. &ehci0 {
  3682. --- a/arch/arm/dts/sun7i-a20-mk808c.dts
  3683. +++ b/arch/arm/dts/sun7i-a20-mk808c.dts
  3684. @@ -53,6 +53,7 @@
  3685. #include <dt-bindings/gpio/gpio.h>
  3686. #include <dt-bindings/interrupt-controller/irq.h>
  3687. +#include <dt-bindings/pinctrl/sun4i-a10.h>
  3688. / {
  3689. model = "mk808c";
  3690. @@ -68,6 +69,10 @@
  3691. };
  3692. };
  3693. +&codec {
  3694. + status = "okay";
  3695. +};
  3696. +
  3697. &ehci0 {
  3698. status = "okay";
  3699. };
  3700. @@ -121,6 +126,30 @@
  3701. status = "okay";
  3702. };
  3703. +&otg_sram {
  3704. + status = "okay";
  3705. +};
  3706. +
  3707. +&pio {
  3708. + usb0_id_detect_pin: usb0_id_detect_pin@0 {
  3709. + allwinner,pins = "PH4";
  3710. + allwinner,function = "gpio_in";
  3711. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  3712. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  3713. + };
  3714. +
  3715. + usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
  3716. + allwinner,pins = "PH5";
  3717. + allwinner,function = "gpio_in";
  3718. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  3719. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  3720. + };
  3721. +};
  3722. +
  3723. +&reg_usb0_vbus {
  3724. + status = "okay";
  3725. +};
  3726. +
  3727. &reg_usb1_vbus {
  3728. status = "okay";
  3729. };
  3730. @@ -141,7 +170,17 @@
  3731. status = "okay";
  3732. };
  3733. +&usb_otg {
  3734. + dr_mode = "otg";
  3735. + status = "okay";
  3736. +};
  3737. +
  3738. &usbphy {
  3739. + pinctrl-names = "default";
  3740. + pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
  3741. + usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  3742. + usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
  3743. + usb0_vbus-supply = <&reg_usb0_vbus>;
  3744. usb1_vbus-supply = <&reg_usb1_vbus>;
  3745. usb2_vbus-supply = <&reg_usb2_vbus>;
  3746. status = "okay";
  3747. --- a/arch/arm/dts/sun7i-a20-olimex-som-evb.dts
  3748. +++ b/arch/arm/dts/sun7i-a20-olimex-som-evb.dts
  3749. @@ -1,5 +1,6 @@
  3750. /*
  3751. * Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
  3752. + * Copyright 2015 - Karsten Merker <merker@debian.org>
  3753. *
  3754. * This file is dual-licensed: you can use it either under the terms
  3755. * of the GPL or the X11 license, at your option. Note that this dual
  3756. @@ -45,6 +46,7 @@
  3757. #include "sunxi-common-regulators.dtsi"
  3758. #include <dt-bindings/gpio/gpio.h>
  3759. +#include <dt-bindings/input/input.h>
  3760. #include <dt-bindings/interrupt-controller/irq.h>
  3761. #include <dt-bindings/pinctrl/sun4i-a10.h>
  3762. @@ -71,14 +73,6 @@
  3763. default-state = "on";
  3764. };
  3765. };
  3766. -
  3767. - reg_axp_ipsout: axp_ipsout {
  3768. - compatible = "regulator-fixed";
  3769. - regulator-name = "axp-ipsout";
  3770. - regulator-min-microvolt = <5000000>;
  3771. - regulator-max-microvolt = <5000000>;
  3772. - regulator-always-on;
  3773. - };
  3774. };
  3775. &ahci {
  3776. @@ -94,6 +88,10 @@
  3777. status = "okay";
  3778. };
  3779. +&codec {
  3780. + status = "okay";
  3781. +};
  3782. +
  3783. &gmac {
  3784. pinctrl-names = "default";
  3785. pinctrl-0 = <&gmac_pins_rgmii_a>;
  3786. @@ -118,10 +116,58 @@
  3787. };
  3788. };
  3789. -&i2c1 {
  3790. - pinctrl-names = "default";
  3791. - pinctrl-0 = <&i2c1_pins_a>;
  3792. +&lradc {
  3793. + vref-supply = <&reg_vcc3v0>;
  3794. status = "okay";
  3795. +
  3796. + button@190 {
  3797. + label = "Volume Up";
  3798. + linux,code = <KEY_VOLUMEUP>;
  3799. + channel = <0>;
  3800. + voltage = <190000>;
  3801. + };
  3802. +
  3803. + button@390 {
  3804. + label = "Volume Down";
  3805. + linux,code = <KEY_VOLUMEDOWN>;
  3806. + channel = <0>;
  3807. + voltage = <390000>;
  3808. + };
  3809. +
  3810. + button@600 {
  3811. + label = "Menu";
  3812. + linux,code = <KEY_MENU>;
  3813. + channel = <0>;
  3814. + voltage = <600000>;
  3815. + };
  3816. +
  3817. + button@800 {
  3818. + label = "Search";
  3819. + linux,code = <KEY_SEARCH>;
  3820. + channel = <0>;
  3821. + voltage = <800000>;
  3822. + };
  3823. +
  3824. + button@980 {
  3825. + label = "Home";
  3826. + linux,code = <KEY_HOMEPAGE>;
  3827. + channel = <0>;
  3828. + voltage = <980000>;
  3829. + };
  3830. +
  3831. + button@1180 {
  3832. + label = "Esc";
  3833. + linux,code = <KEY_ESC>;
  3834. + channel = <0>;
  3835. + voltage = <1180000>;
  3836. + };
  3837. +
  3838. + button@1400 {
  3839. + label = "Enter";
  3840. + linux,code = <KEY_ENTER>;
  3841. + channel = <0>;
  3842. + voltage = <1400000>;
  3843. + };
  3844. };
  3845. &mmc0 {
  3846. @@ -134,6 +180,16 @@
  3847. status = "okay";
  3848. };
  3849. +&mmc3 {
  3850. + pinctrl-names = "default";
  3851. + pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olimex_som_evb>;
  3852. + vmmc-supply = <&reg_vcc3v3>;
  3853. + bus-width = <4>;
  3854. + cd-gpios = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */
  3855. + cd-inverted;
  3856. + status = "okay";
  3857. +};
  3858. +
  3859. &ohci0 {
  3860. status = "okay";
  3861. };
  3862. @@ -161,15 +217,22 @@
  3863. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  3864. };
  3865. + mmc3_cd_pin_olimex_som_evb: mmc3_cd_pin@0 {
  3866. + allwinner,pins = "PH0";
  3867. + allwinner,function = "gpio_in";
  3868. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  3869. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  3870. + };
  3871. +
  3872. usb0_id_detect_pin: usb0_id_detect_pin@0 {
  3873. - allwinner,pins = "PH04";
  3874. + allwinner,pins = "PH4";
  3875. allwinner,function = "gpio_in";
  3876. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  3877. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  3878. };
  3879. usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
  3880. - allwinner,pins = "PH05";
  3881. + allwinner,pins = "PH5";
  3882. allwinner,function = "gpio_in";
  3883. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  3884. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  3885. @@ -187,7 +250,7 @@
  3886. &reg_dcdc2 {
  3887. regulator-always-on;
  3888. regulator-min-microvolt = <1000000>;
  3889. - regulator-max-microvolt = <1425000>;
  3890. + regulator-max-microvolt = <1400000>;
  3891. regulator-name = "vdd-cpu";
  3892. };
  3893. @@ -235,8 +298,8 @@
  3894. &usbphy {
  3895. pinctrl-names = "default";
  3896. pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
  3897. - usb0_id_det-gpios = <&pio 7 04 GPIO_ACTIVE_HIGH>; /* PH04 */
  3898. - usb0_vbus_det-gpios = <&pio 7 05 GPIO_ACTIVE_HIGH>; /* PH05 */
  3899. + usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH04 */
  3900. + usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH05 */
  3901. usb0_vbus-supply = <&reg_usb0_vbus>;
  3902. usb1_vbus-supply = <&reg_usb1_vbus>;
  3903. usb2_vbus-supply = <&reg_usb2_vbus>;
  3904. --- a/arch/arm/dts/sun7i-a20-olinuxino-lime.dts
  3905. +++ b/arch/arm/dts/sun7i-a20-olinuxino-lime.dts
  3906. @@ -117,6 +117,18 @@
  3907. };
  3908. };
  3909. +&i2c1 {
  3910. + pinctrl-names = "default";
  3911. + pinctrl-0 = <&i2c1_pins_a>;
  3912. + status = "okay";
  3913. +
  3914. + eeprom: eeprom@50 {
  3915. + compatible = "atmel,24c16";
  3916. + reg = <0x50>;
  3917. + pagesize = <16>;
  3918. + };
  3919. +};
  3920. +
  3921. &mmc0 {
  3922. pinctrl-names = "default";
  3923. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
  3924. --- a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
  3925. +++ b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
  3926. @@ -170,6 +170,12 @@
  3927. pinctrl-names = "default";
  3928. pinctrl-0 = <&i2c1_pins_a>;
  3929. status = "okay";
  3930. +
  3931. + eeprom: eeprom@50 {
  3932. + compatible = "atmel,24c16";
  3933. + reg = <0x50>;
  3934. + pagesize = <16>;
  3935. + };
  3936. };
  3937. &mmc0 {
  3938. @@ -190,6 +196,10 @@
  3939. status = "okay";
  3940. };
  3941. +&otg_sram {
  3942. + status = "okay";
  3943. +};
  3944. +
  3945. &pio {
  3946. ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
  3947. allwinner,pins = "PC3";
  3948. @@ -204,6 +214,27 @@
  3949. allwinner,drive = <SUN4I_PINCTRL_20_MA>;
  3950. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  3951. };
  3952. +
  3953. + usb0_id_detect_pin: usb0_id_detect_pin@0 {
  3954. + allwinner,pins = "PH4";
  3955. + allwinner,function = "gpio_in";
  3956. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  3957. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  3958. + };
  3959. +
  3960. + usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
  3961. + allwinner,pins = "PH5";
  3962. + allwinner,function = "gpio_in";
  3963. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  3964. + allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
  3965. + };
  3966. +
  3967. + usb0_vbus_pin_lime2: usb0_vbus_pin@0 {
  3968. + allwinner,pins = "PC17";
  3969. + allwinner,function = "gpio_out";
  3970. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  3971. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  3972. + };
  3973. };
  3974. &reg_ahci_5v {
  3975. @@ -212,6 +243,12 @@
  3976. status = "okay";
  3977. };
  3978. +&reg_usb0_vbus {
  3979. + pinctrl-0 = <&usb0_vbus_pin_lime2>;
  3980. + gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
  3981. + status = "okay";
  3982. +};
  3983. +
  3984. &reg_usb1_vbus {
  3985. status = "okay";
  3986. };
  3987. @@ -226,7 +263,17 @@
  3988. status = "okay";
  3989. };
  3990. +&usb_otg {
  3991. + dr_mode = "otg";
  3992. + status = "okay";
  3993. +};
  3994. +
  3995. &usbphy {
  3996. + pinctrl-names = "default";
  3997. + pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
  3998. + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  3999. + usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
  4000. + usb0_vbus-supply = <&reg_usb0_vbus>;
  4001. usb1_vbus-supply = <&reg_usb1_vbus>;
  4002. usb2_vbus-supply = <&reg_usb2_vbus>;
  4003. status = "okay";
  4004. --- a/arch/arm/dts/sun7i-a20-olinuxino-micro.dts
  4005. +++ b/arch/arm/dts/sun7i-a20-olinuxino-micro.dts
  4006. @@ -125,6 +125,12 @@
  4007. pinctrl-names = "default";
  4008. pinctrl-0 = <&i2c1_pins_a>;
  4009. status = "okay";
  4010. +
  4011. + eeprom: eeprom@50 {
  4012. + compatible = "atmel,24c16";
  4013. + reg = <0x50>;
  4014. + pagesize = <16>;
  4015. + };
  4016. };
  4017. &i2c2 {
  4018. --- a/arch/arm/dts/sun7i-a20-orangepi-mini.dts
  4019. +++ b/arch/arm/dts/sun7i-a20-orangepi-mini.dts
  4020. @@ -95,6 +95,10 @@
  4021. status = "okay";
  4022. };
  4023. +&codec {
  4024. + status = "okay";
  4025. +};
  4026. +
  4027. &ehci0 {
  4028. status = "okay";
  4029. };
  4030. @@ -156,7 +160,18 @@
  4031. status = "okay";
  4032. };
  4033. +&otg_sram {
  4034. + status = "okay";
  4035. +};
  4036. +
  4037. &pio {
  4038. + usb0_id_detect_pin: usb0_id_detect_pin@0 {
  4039. + allwinner,pins = "PH4";
  4040. + allwinner,function = "gpio_in";
  4041. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  4042. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  4043. + };
  4044. +
  4045. mmc0_cd_pin_orangepi: mmc0_cd_pin@0 {
  4046. allwinner,pins = "PH10";
  4047. allwinner,function = "gpio_in";
  4048. @@ -225,6 +240,10 @@
  4049. regulator-name = "avcc";
  4050. };
  4051. +&reg_usb0_vbus {
  4052. + status = "okay";
  4053. +};
  4054. +
  4055. &reg_usb1_vbus {
  4056. pinctrl-0 = <&usb1_vbus_pin_bananapro>;
  4057. gpio = <&pio 7 26 GPIO_ACTIVE_HIGH>; /* PH26 */
  4058. @@ -243,7 +262,21 @@
  4059. status = "okay";
  4060. };
  4061. +&usb_otg {
  4062. + dr_mode = "otg";
  4063. + status = "okay";
  4064. +};
  4065. +
  4066. +&usb_power_supply {
  4067. + status = "okay";
  4068. +};
  4069. +
  4070. &usbphy {
  4071. + pinctrl-names = "default";
  4072. + pinctrl-0 = <&usb0_id_detect_pin>;
  4073. + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  4074. + usb0_vbus_power-supply = <&usb_power_supply>;
  4075. + usb0_vbus-supply = <&reg_usb0_vbus>;
  4076. usb1_vbus-supply = <&reg_usb1_vbus>;
  4077. usb2_vbus-supply = <&reg_usb2_vbus>;
  4078. status = "okay";
  4079. --- a/arch/arm/dts/sun7i-a20-orangepi.dts
  4080. +++ b/arch/arm/dts/sun7i-a20-orangepi.dts
  4081. @@ -141,7 +141,18 @@
  4082. status = "okay";
  4083. };
  4084. +&otg_sram {
  4085. + status = "okay";
  4086. +};
  4087. +
  4088. &pio {
  4089. + usb0_id_detect_pin: usb0_id_detect_pin@0 {
  4090. + allwinner,pins = "PH4";
  4091. + allwinner,function = "gpio_in";
  4092. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  4093. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  4094. + };
  4095. +
  4096. mmc0_cd_pin_orangepi: mmc0_cd_pin@0 {
  4097. allwinner,pins = "PH10";
  4098. allwinner,function = "gpio_in";
  4099. @@ -203,6 +214,10 @@
  4100. regulator-name = "avcc";
  4101. };
  4102. +&reg_usb0_vbus {
  4103. + status = "okay";
  4104. +};
  4105. +
  4106. &reg_usb1_vbus {
  4107. pinctrl-0 = <&usb1_vbus_pin_bananapro>;
  4108. gpio = <&pio 7 26 GPIO_ACTIVE_HIGH>; /* PH26 */
  4109. @@ -221,7 +236,21 @@
  4110. status = "okay";
  4111. };
  4112. +&usb_otg {
  4113. + dr_mode = "otg";
  4114. + status = "okay";
  4115. +};
  4116. +
  4117. +&usb_power_supply {
  4118. + status = "okay";
  4119. +};
  4120. +
  4121. &usbphy {
  4122. + pinctrl-names = "default";
  4123. + pinctrl-0 = <&usb0_id_detect_pin>;
  4124. + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  4125. + usb0_vbus_power-supply = <&usb_power_supply>;
  4126. + usb0_vbus-supply = <&reg_usb0_vbus>;
  4127. usb1_vbus-supply = <&reg_usb1_vbus>;
  4128. usb2_vbus-supply = <&reg_usb2_vbus>;
  4129. status = "okay";
  4130. --- a/arch/arm/dts/sun7i-a20-pcduino3-nano.dts
  4131. +++ b/arch/arm/dts/sun7i-a20-pcduino3-nano.dts
  4132. @@ -82,6 +82,14 @@
  4133. status = "okay";
  4134. };
  4135. +&codec {
  4136. + status = "okay";
  4137. +};
  4138. +
  4139. +&cpu0 {
  4140. + cpu-supply = <&reg_dcdc2>;
  4141. +};
  4142. +
  4143. &ehci0 {
  4144. status = "okay";
  4145. };
  4146. @@ -108,13 +116,9 @@
  4147. status = "okay";
  4148. axp209: pmic@34 {
  4149. - compatible = "x-powers,axp209";
  4150. reg = <0x34>;
  4151. interrupt-parent = <&nmi_intc>;
  4152. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  4153. -
  4154. - interrupt-controller;
  4155. - #interrupt-cells = <1>;
  4156. };
  4157. };
  4158. @@ -142,6 +146,10 @@
  4159. status = "okay";
  4160. };
  4161. +&otg_sram {
  4162. + status = "okay";
  4163. +};
  4164. +
  4165. &pio {
  4166. ahci_pwr_pin_pcduino3_nano: ahci_pwr_pin@0 {
  4167. allwinner,pins = "PH2";
  4168. @@ -157,8 +165,15 @@
  4169. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  4170. };
  4171. + usb0_id_detect_pin: usb0_id_detect_pin@0 {
  4172. + allwinner,pins = "PH4";
  4173. + allwinner,function = "gpio_in";
  4174. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  4175. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  4176. + };
  4177. +
  4178. usb1_vbus_pin_pcduino3_nano: usb1_vbus_pin@0 {
  4179. - allwinner,pins = "PH11";
  4180. + allwinner,pins = "PD2";
  4181. allwinner,function = "gpio_out";
  4182. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  4183. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  4184. @@ -171,13 +186,37 @@
  4185. status = "okay";
  4186. };
  4187. -&reg_usb1_vbus {
  4188. - pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>;
  4189. - gpio = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
  4190. - status = "okay";
  4191. +#include "axp209.dtsi"
  4192. +
  4193. +&reg_dcdc2 {
  4194. + regulator-always-on;
  4195. + regulator-min-microvolt = <1000000>;
  4196. + regulator-max-microvolt = <1400000>;
  4197. + regulator-name = "vdd-cpu";
  4198. +};
  4199. +
  4200. +&reg_dcdc3 {
  4201. + regulator-always-on;
  4202. + regulator-min-microvolt = <1000000>;
  4203. + regulator-max-microvolt = <1400000>;
  4204. + regulator-name = "vdd-int-pll";
  4205. +};
  4206. +
  4207. +&reg_ldo1 {
  4208. + regulator-name = "vdd-rtc";
  4209. +};
  4210. +
  4211. +&reg_ldo2 {
  4212. + regulator-always-on;
  4213. + regulator-min-microvolt = <3000000>;
  4214. + regulator-max-microvolt = <3000000>;
  4215. + regulator-name = "avcc";
  4216. };
  4217. -&reg_usb2_vbus {
  4218. +/* A single regulator (U24) powers both USB host ports. */
  4219. +&reg_usb1_vbus {
  4220. + pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>;
  4221. + gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
  4222. status = "okay";
  4223. };
  4224. @@ -187,8 +226,16 @@
  4225. status = "okay";
  4226. };
  4227. +&usb_otg {
  4228. + dr_mode = "otg";
  4229. + status = "okay";
  4230. +};
  4231. +
  4232. &usbphy {
  4233. + pinctrl-names = "default";
  4234. + pinctrl-0 = <&usb0_id_detect_pin>;
  4235. + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  4236. usb1_vbus-supply = <&reg_usb1_vbus>;
  4237. - usb2_vbus-supply = <&reg_usb2_vbus>;
  4238. + usb2_vbus-supply = <&reg_usb1_vbus>;
  4239. status = "okay";
  4240. };
  4241. --- a/arch/arm/dts/sun7i-a20-pcduino3.dts
  4242. +++ b/arch/arm/dts/sun7i-a20-pcduino3.dts
  4243. @@ -111,6 +111,14 @@
  4244. allwinner,pins = "PH2";
  4245. };
  4246. +&codec {
  4247. + status = "okay";
  4248. +};
  4249. +
  4250. +&cpu0 {
  4251. + cpu-supply = <&reg_dcdc2>;
  4252. +};
  4253. +
  4254. &ehci0 {
  4255. status = "okay";
  4256. };
  4257. @@ -137,16 +145,14 @@
  4258. status = "okay";
  4259. axp209: pmic@34 {
  4260. - compatible = "x-powers,axp209";
  4261. reg = <0x34>;
  4262. interrupt-parent = <&nmi_intc>;
  4263. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  4264. -
  4265. - interrupt-controller;
  4266. - #interrupt-cells = <1>;
  4267. };
  4268. };
  4269. +#include "axp209.dtsi"
  4270. +
  4271. &ir0 {
  4272. pinctrl-names = "default";
  4273. pinctrl-0 = <&ir0_rx_pins_a>;
  4274. @@ -171,6 +177,10 @@
  4275. status = "okay";
  4276. };
  4277. +&otg_sram {
  4278. + status = "okay";
  4279. +};
  4280. +
  4281. &pio {
  4282. led_pins_pcduino3: led_pins@0 {
  4283. allwinner,pins = "PH15", "PH16";
  4284. @@ -185,6 +195,13 @@
  4285. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  4286. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  4287. };
  4288. +
  4289. + usb0_id_detect_pin: usb0_id_detect_pin@0 {
  4290. + allwinner,pins = "PH4";
  4291. + allwinner,function = "gpio_in";
  4292. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  4293. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  4294. + };
  4295. };
  4296. &reg_ahci_5v {
  4297. @@ -192,6 +209,31 @@
  4298. status = "okay";
  4299. };
  4300. +&reg_dcdc2 {
  4301. + regulator-always-on;
  4302. + regulator-min-microvolt = <1000000>;
  4303. + regulator-max-microvolt = <1400000>;
  4304. + regulator-name = "vdd-cpu";
  4305. +};
  4306. +
  4307. +&reg_dcdc3 {
  4308. + regulator-always-on;
  4309. + regulator-min-microvolt = <1000000>;
  4310. + regulator-max-microvolt = <1400000>;
  4311. + regulator-name = "vdd-int-pll";
  4312. +};
  4313. +
  4314. +&reg_ldo1 {
  4315. + regulator-name = "vdd-rtc";
  4316. +};
  4317. +
  4318. +&reg_ldo2 {
  4319. + regulator-always-on;
  4320. + regulator-min-microvolt = <3000000>;
  4321. + regulator-max-microvolt = <3000000>;
  4322. + regulator-name = "avcc";
  4323. +};
  4324. +
  4325. &reg_usb1_vbus {
  4326. status = "okay";
  4327. };
  4328. @@ -206,7 +248,15 @@
  4329. status = "okay";
  4330. };
  4331. +&usb_otg {
  4332. + dr_mode = "otg";
  4333. + status = "okay";
  4334. +};
  4335. +
  4336. &usbphy {
  4337. + pinctrl-names = "default";
  4338. + pinctrl-0 = <&usb0_id_detect_pin>;
  4339. + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  4340. usb1_vbus-supply = <&reg_usb1_vbus>;
  4341. usb2_vbus-supply = <&reg_usb2_vbus>;
  4342. status = "okay";
  4343. --- a/arch/arm/dts/sun7i-a20-wexler-tab7200.dts
  4344. +++ b/arch/arm/dts/sun7i-a20-wexler-tab7200.dts
  4345. @@ -48,6 +48,7 @@
  4346. #include <dt-bindings/gpio/gpio.h>
  4347. #include <dt-bindings/input/input.h>
  4348. #include <dt-bindings/interrupt-controller/irq.h>
  4349. +#include <dt-bindings/pwm/pwm.h>
  4350. / {
  4351. model = "Wexler TAB7200";
  4352. @@ -57,11 +58,28 @@
  4353. serial0 = &uart0;
  4354. };
  4355. + backlight {
  4356. + compatible = "pwm-backlight";
  4357. + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
  4358. + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
  4359. + default-brightness-level = <8>;
  4360. + pinctrl-names = "default";
  4361. + pinctrl-0 = <&bl_enable_pin>;
  4362. + enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
  4363. + };
  4364. +
  4365. chosen {
  4366. stdout-path = "serial0:115200n8";
  4367. };
  4368. };
  4369. +&codec {
  4370. + pinctrl-names = "default";
  4371. + pinctrl-0 = <&codec_pa_pin>;
  4372. + allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
  4373. + status = "okay";
  4374. +};
  4375. +
  4376. &cpu0 {
  4377. cpu-supply = <&reg_dcdc2>;
  4378. };
  4379. @@ -86,6 +104,8 @@
  4380. };
  4381. };
  4382. +#include "axp209.dtsi"
  4383. +
  4384. &i2c1 {
  4385. pinctrl-names = "default";
  4386. pinctrl-0 = <&i2c1_pins_a>;
  4387. @@ -96,6 +116,18 @@
  4388. pinctrl-names = "default";
  4389. pinctrl-0 = <&i2c2_pins_a>;
  4390. status = "okay";
  4391. +
  4392. + gt911: touchscreen@5d {
  4393. + compatible = "goodix,gt911";
  4394. + reg = <0x5d>;
  4395. + interrupt-parent = <&pio>;
  4396. + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
  4397. + pinctrl-names = "default";
  4398. + pinctrl-0 = <&ts_reset_pin>;
  4399. + irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */
  4400. + reset-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* RST (PB13) */
  4401. + touchscreen-swapped-x-y;
  4402. + };
  4403. };
  4404. &lradc {
  4405. @@ -135,7 +167,45 @@
  4406. status = "okay";
  4407. };
  4408. -#include "axp209.dtsi"
  4409. +&otg_sram {
  4410. + status = "okay";
  4411. +};
  4412. +
  4413. +&pio {
  4414. + bl_enable_pin: bl_enable_pin@0 {
  4415. + allwinner,pins = "PH7";
  4416. + allwinner,function = "gpio_out";
  4417. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  4418. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  4419. + };
  4420. +
  4421. + codec_pa_pin: codec_pa_pin@0 {
  4422. + allwinner,pins = "PH15";
  4423. + allwinner,function = "gpio_out";
  4424. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  4425. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  4426. + };
  4427. +
  4428. + ts_reset_pin: ts_reset_pin@0 {
  4429. + allwinner,pins = "PB13";
  4430. + allwinner,function = "gpio_out";
  4431. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  4432. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  4433. + };
  4434. +
  4435. + usb0_id_detect_pin: usb0_id_detect_pin@0 {
  4436. + allwinner,pins = "PH4";
  4437. + allwinner,function = "gpio_in";
  4438. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  4439. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  4440. + };
  4441. +};
  4442. +
  4443. +&pwm {
  4444. + pinctrl-names = "default";
  4445. + pinctrl-0 = <&pwm0_pins_a>;
  4446. + status = "okay";
  4447. +};
  4448. &reg_dcdc2 {
  4449. regulator-always-on;
  4450. @@ -162,6 +232,10 @@
  4451. regulator-name = "avcc";
  4452. };
  4453. +&reg_usb0_vbus {
  4454. + status = "okay";
  4455. +};
  4456. +
  4457. &reg_usb1_vbus {
  4458. status = "okay";
  4459. };
  4460. @@ -176,7 +250,21 @@
  4461. status = "okay";
  4462. };
  4463. +&usb_otg {
  4464. + dr_mode = "otg";
  4465. + status = "okay";
  4466. +};
  4467. +
  4468. +&usb_power_supply {
  4469. + status = "okay";
  4470. +};
  4471. +
  4472. &usbphy {
  4473. + pinctrl-names = "default";
  4474. + pinctrl-0 = <&usb0_id_detect_pin>;
  4475. + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  4476. + usb0_vbus_power-supply = <&usb_power_supply>;
  4477. + usb0_vbus-supply = <&reg_usb0_vbus>;
  4478. usb1_vbus-supply = <&reg_usb1_vbus>;
  4479. usb2_vbus-supply = <&reg_usb2_vbus>;
  4480. status = "okay";
  4481. --- a/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts
  4482. +++ b/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts
  4483. @@ -1,13 +1,52 @@
  4484. /*
  4485. - * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
  4486. + * Copyright 2015 Jelle de Jong <jelledejong@powercraft.nl>
  4487. *
  4488. - * Minimal dts file for the Wits Pro A20 DKT for u-boot only
  4489. + * This file is dual-licensed: you can use it either under the terms
  4490. + * of the GPL or the X11 license, at your option. Note that this dual
  4491. + * licensing only applies to this file, and not this project as a
  4492. + * whole.
  4493. *
  4494. - * SPDX-License-Identifier: GPL-2.0+ or X11
  4495. + * a) This file is free software; you can redistribute it and/or
  4496. + * modify it under the terms of the GNU General Public License as
  4497. + * published by the Free Software Foundation; either version 2 of the
  4498. + * License, or (at your option) any later version.
  4499. + *
  4500. + * This file is distributed in the hope that it will be useful,
  4501. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  4502. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  4503. + * GNU General Public License for more details.
  4504. + *
  4505. + * Or, alternatively,
  4506. + *
  4507. + * b) Permission is hereby granted, free of charge, to any person
  4508. + * obtaining a copy of this software and associated documentation
  4509. + * files (the "Software"), to deal in the Software without
  4510. + * restriction, including without limitation the rights to use,
  4511. + * copy, modify, merge, publish, distribute, sublicense, and/or
  4512. + * sell copies of the Software, and to permit persons to whom the
  4513. + * Software is furnished to do so, subject to the following
  4514. + * conditions:
  4515. + *
  4516. + * The above copyright notice and this permission notice shall be
  4517. + * included in all copies or substantial portions of the Software.
  4518. + *
  4519. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  4520. + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  4521. + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  4522. + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  4523. + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  4524. + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  4525. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  4526. + * OTHER DEALINGS IN THE SOFTWARE.
  4527. */
  4528. /dts-v1/;
  4529. #include "sun7i-a20.dtsi"
  4530. +#include "sunxi-common-regulators.dtsi"
  4531. +
  4532. +#include <dt-bindings/gpio/gpio.h>
  4533. +#include <dt-bindings/input/input.h>
  4534. +#include <dt-bindings/interrupt-controller/irq.h>
  4535. / {
  4536. model = "Wits Pro A20 DKT";
  4537. @@ -20,6 +59,17 @@
  4538. chosen {
  4539. stdout-path = "serial0:115200n8";
  4540. };
  4541. +
  4542. + mmc3_pwrseq: mmc3_pwrseq {
  4543. + compatible = "mmc-pwrseq-simple";
  4544. + pinctrl-names = "default";
  4545. + pinctrl-0 = <&vmmc3_pin_ap6xxx_wl_regon>;
  4546. + reset-gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; /* PH9 WIFI_EN */
  4547. + };
  4548. +};
  4549. +
  4550. +&cpu0 {
  4551. + cpu-supply = <&reg_dcdc2>;
  4552. };
  4553. &ehci0 {
  4554. @@ -42,6 +92,60 @@
  4555. };
  4556. };
  4557. +&i2c0 {
  4558. + pinctrl-names = "default";
  4559. + pinctrl-0 = <&i2c0_pins_a>;
  4560. + status = "okay";
  4561. +
  4562. + axp209: pmic@34 {
  4563. + reg = <0x34>;
  4564. + interrupt-parent = <&nmi_intc>;
  4565. + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  4566. + };
  4567. +};
  4568. +
  4569. +&i2c1 {
  4570. + pinctrl-names = "default";
  4571. + pinctrl-0 = <&i2c1_pins_a>;
  4572. + status = "okay";
  4573. +};
  4574. +
  4575. +&i2c2 {
  4576. + pinctrl-names = "default";
  4577. + pinctrl-0 = <&i2c2_pins_a>;
  4578. + status = "okay";
  4579. +};
  4580. +
  4581. +#include "axp209.dtsi"
  4582. +
  4583. +&mmc0 {
  4584. + pinctrl-names = "default";
  4585. + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
  4586. + vmmc-supply = <&reg_vcc3v3>;
  4587. + bus-width = <4>;
  4588. + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
  4589. + cd-inverted;
  4590. + status = "okay";
  4591. +};
  4592. +
  4593. +&mmc3 {
  4594. + pinctrl-names = "default";
  4595. + pinctrl-0 = <&mmc3_pins_a>;
  4596. + vmmc-supply = <&reg_vcc3v3>;
  4597. + mmc-pwrseq = <&mmc3_pwrseq>;
  4598. + bus-width = <4>;
  4599. + non-removable;
  4600. + status = "okay";
  4601. +
  4602. + brcmf: bcrmf@1 {
  4603. + reg = <1>;
  4604. + compatible = "brcm,bcm4329-fmac";
  4605. + interrupt-parent = <&pio>;
  4606. + interrupts = <7 10 IRQ_TYPE_LEVEL_LOW>; /* PH10 / EINT10 */
  4607. + interrupt-names = "host-wake";
  4608. + };
  4609. +};
  4610. +
  4611. &ohci0 {
  4612. status = "okay";
  4613. };
  4614. @@ -50,8 +154,85 @@
  4615. status = "okay";
  4616. };
  4617. +&otg_sram {
  4618. + status = "okay";
  4619. +};
  4620. +
  4621. +&pio {
  4622. + vmmc3_pin_ap6xxx_wl_regon: vmmc3_pin@0 {
  4623. + allwinner,pins = "PH9";
  4624. + allwinner,function = "gpio_out";
  4625. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  4626. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  4627. + };
  4628. +
  4629. + usb0_id_detect_pin: usb0_id_detect_pin@0 {
  4630. + allwinner,pins = "PH4";
  4631. + allwinner,function = "gpio_in";
  4632. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  4633. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  4634. + };
  4635. +};
  4636. +
  4637. +&reg_dcdc2 {
  4638. + regulator-always-on;
  4639. + regulator-min-microvolt = <1000000>;
  4640. + regulator-max-microvolt = <1450000>;
  4641. + regulator-name = "vdd-cpu";
  4642. +};
  4643. +
  4644. +&reg_dcdc3 {
  4645. + regulator-always-on;
  4646. + regulator-min-microvolt = <1000000>;
  4647. + regulator-max-microvolt = <1400000>;
  4648. + regulator-name = "vdd-int-dll";
  4649. +};
  4650. +
  4651. +&reg_ldo1 {
  4652. + regulator-name = "vdd-rtc";
  4653. +};
  4654. +
  4655. +&reg_ldo2 {
  4656. + regulator-always-on;
  4657. + regulator-min-microvolt = <3000000>;
  4658. + regulator-max-microvolt = <3000000>;
  4659. + regulator-name = "avcc";
  4660. +};
  4661. +
  4662. +&reg_usb0_vbus {
  4663. + status = "okay";
  4664. +};
  4665. +
  4666. +&reg_usb1_vbus {
  4667. + status = "okay";
  4668. +};
  4669. +
  4670. +&reg_usb2_vbus {
  4671. + status = "okay";
  4672. +};
  4673. +
  4674. &uart0 {
  4675. pinctrl-names = "default";
  4676. pinctrl-0 = <&uart0_pins_a>;
  4677. status = "okay";
  4678. };
  4679. +
  4680. +&usb_otg {
  4681. + dr_mode = "otg";
  4682. + status = "okay";
  4683. +};
  4684. +
  4685. +&usb_power_supply {
  4686. + status = "okay";
  4687. +};
  4688. +
  4689. +&usbphy {
  4690. + pinctrl-names = "default";
  4691. + pinctrl-0 = <&usb0_id_detect_pin>;
  4692. + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  4693. + usb0_vbus_power-supply = <&usb_power_supply>;
  4694. + usb0_vbus-supply = <&reg_usb0_vbus>;
  4695. + usb1_vbus-supply = <&reg_usb1_vbus>;
  4696. + usb2_vbus-supply = <&reg_usb2_vbus>;
  4697. + status = "okay";
  4698. +};
  4699. --- a/arch/arm/dts/sun7i-a20.dtsi
  4700. +++ b/arch/arm/dts/sun7i-a20.dtsi
  4701. @@ -47,6 +47,7 @@
  4702. #include <dt-bindings/interrupt-controller/arm-gic.h>
  4703. #include <dt-bindings/thermal/thermal.h>
  4704. +#include <dt-bindings/clock/sun4i-a10-pll2.h>
  4705. #include <dt-bindings/dma/sun4i-a10.h>
  4706. #include <dt-bindings/pinctrl/sun4i-a10.h>
  4707. @@ -67,7 +68,7 @@
  4708. "simple-framebuffer";
  4709. allwinner,pipeline = "de_be0-lcd0-hdmi";
  4710. clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
  4711. - <&ahb_gates 44>;
  4712. + <&ahb_gates 44>, <&dram_gates 26>;
  4713. status = "disabled";
  4714. };
  4715. @@ -75,7 +76,8 @@
  4716. compatible = "allwinner,simple-framebuffer",
  4717. "simple-framebuffer";
  4718. allwinner,pipeline = "de_be0-lcd0";
  4719. - clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>;
  4720. + clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>,
  4721. + <&dram_gates 26>;
  4722. status = "disabled";
  4723. };
  4724. @@ -84,7 +86,7 @@
  4725. "simple-framebuffer";
  4726. allwinner,pipeline = "de_be0-lcd0-tve0";
  4727. clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
  4728. - <&ahb_gates 44>;
  4729. + <&ahb_gates 44>, <&dram_gates 26>;
  4730. status = "disabled";
  4731. };
  4732. };
  4733. @@ -107,7 +109,7 @@
  4734. 720000 1200000
  4735. 528000 1100000
  4736. 312000 1000000
  4737. - 144000 900000
  4738. + 144000 1000000
  4739. >;
  4740. #cooling-cells = <2>;
  4741. cooling-min-level = <0>;
  4742. @@ -199,6 +201,15 @@
  4743. clock-output-names = "pll1";
  4744. };
  4745. + pll2: clk@01c20008 {
  4746. + #clock-cells = <1>;
  4747. + compatible = "allwinner,sun4i-a10-pll2-clk";
  4748. + reg = <0x01c20008 0x8>;
  4749. + clocks = <&osc24M>;
  4750. + clock-output-names = "pll2-1x", "pll2-2x",
  4751. + "pll2-4x", "pll2-8x";
  4752. + };
  4753. +
  4754. pll4: clk@01c20018 {
  4755. #clock-cells = <0>;
  4756. compatible = "allwinner,sun7i-a20-pll4-clk";
  4757. @@ -267,6 +278,19 @@
  4758. compatible = "allwinner,sun7i-a20-ahb-gates-clk";
  4759. reg = <0x01c20060 0x8>;
  4760. clocks = <&ahb>;
  4761. + clock-indices = <0>, <1>,
  4762. + <2>, <3>, <4>,
  4763. + <5>, <6>, <7>, <8>,
  4764. + <9>, <10>, <11>, <12>,
  4765. + <13>, <14>, <16>,
  4766. + <17>, <18>, <20>, <21>,
  4767. + <22>, <23>, <25>,
  4768. + <28>, <32>, <33>, <34>,
  4769. + <35>, <36>, <37>, <40>,
  4770. + <41>, <42>, <43>,
  4771. + <44>, <45>, <46>,
  4772. + <47>, <49>, <50>,
  4773. + <52>;
  4774. clock-output-names = "ahb_usb0", "ahb_ehci0",
  4775. "ahb_ohci0", "ahb_ehci1", "ahb_ohci1",
  4776. "ahb_ss", "ahb_dma", "ahb_bist", "ahb_mmc0",
  4777. @@ -295,6 +319,10 @@
  4778. compatible = "allwinner,sun7i-a20-apb0-gates-clk";
  4779. reg = <0x01c20068 0x4>;
  4780. clocks = <&apb0>;
  4781. + clock-indices = <0>, <1>,
  4782. + <2>, <3>, <4>,
  4783. + <5>, <6>, <7>,
  4784. + <8>, <10>;
  4785. clock-output-names = "apb0_codec", "apb0_spdif",
  4786. "apb0_ac97", "apb0_iis0", "apb0_iis1",
  4787. "apb0_pio", "apb0_ir0", "apb0_ir1",
  4788. @@ -314,6 +342,12 @@
  4789. compatible = "allwinner,sun7i-a20-apb1-gates-clk";
  4790. reg = <0x01c2006c 0x4>;
  4791. clocks = <&apb1>;
  4792. + clock-indices = <0>, <1>,
  4793. + <2>, <3>, <4>,
  4794. + <5>, <6>, <7>,
  4795. + <15>, <16>, <17>,
  4796. + <18>, <19>, <20>,
  4797. + <21>, <22>, <23>;
  4798. clock-output-names = "apb1_i2c0", "apb1_i2c1",
  4799. "apb1_i2c2", "apb1_i2c3", "apb1_can",
  4800. "apb1_scr", "apb1_ps20", "apb1_ps21",
  4801. @@ -442,6 +476,14 @@
  4802. clock-output-names = "ir1";
  4803. };
  4804. + keypad_clk: clk@01c200c4 {
  4805. + #clock-cells = <0>;
  4806. + compatible = "allwinner,sun4i-a10-mod0-clk";
  4807. + reg = <0x01c200c4 0x4>;
  4808. + clocks = <&osc24M>;
  4809. + clock-output-names = "keypad";
  4810. + };
  4811. +
  4812. usb_clk: clk@01c200cc {
  4813. #clock-cells = <1>;
  4814. #reset-cells = <1>;
  4815. @@ -460,6 +502,48 @@
  4816. clock-output-names = "spi3";
  4817. };
  4818. + dram_gates: clk@01c20100 {
  4819. + #clock-cells = <1>;
  4820. + compatible = "allwinner,sun4i-a10-dram-gates-clk";
  4821. + reg = <0x01c20100 0x4>;
  4822. + clocks = <&pll5 0>;
  4823. + clock-indices = <0>,
  4824. + <1>, <2>,
  4825. + <3>,
  4826. + <4>,
  4827. + <5>, <6>,
  4828. + <15>,
  4829. + <24>, <25>,
  4830. + <26>, <27>,
  4831. + <28>, <29>;
  4832. + clock-output-names = "dram_ve",
  4833. + "dram_csi0", "dram_csi1",
  4834. + "dram_ts",
  4835. + "dram_tvd",
  4836. + "dram_tve0", "dram_tve1",
  4837. + "dram_output",
  4838. + "dram_de_fe1", "dram_de_fe0",
  4839. + "dram_de_be0", "dram_de_be1",
  4840. + "dram_de_mp", "dram_ace";
  4841. + };
  4842. +
  4843. + ve_clk: clk@01c2013c {
  4844. + #clock-cells = <0>;
  4845. + #reset-cells = <0>;
  4846. + compatible = "allwinner,sun4i-a10-ve-clk";
  4847. + reg = <0x01c2013c 0x4>;
  4848. + clocks = <&pll4>;
  4849. + clock-output-names = "ve";
  4850. + };
  4851. +
  4852. + codec_clk: clk@01c20140 {
  4853. + #clock-cells = <0>;
  4854. + compatible = "allwinner,sun4i-a10-codec-clk";
  4855. + reg = <0x01c20140 0x4>;
  4856. + clocks = <&pll2 SUN4I_A10_PLL2_1X>;
  4857. + clock-output-names = "codec";
  4858. + };
  4859. +
  4860. mbus_clk: clk@01c2015c {
  4861. #clock-cells = <0>;
  4862. compatible = "allwinner,sun5i-a13-mbus-clk";
  4863. @@ -744,6 +828,14 @@
  4864. status = "disabled";
  4865. };
  4866. + crypto: crypto-engine@01c15000 {
  4867. + compatible = "allwinner,sun4i-a10-crypto";
  4868. + reg = <0x01c15000 0x1000>;
  4869. + interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
  4870. + clocks = <&ahb_gates 5>, <&ss_clk>;
  4871. + clock-names = "ahb", "mod";
  4872. + };
  4873. +
  4874. spi2: spi@01c17000 {
  4875. compatible = "allwinner,sun4i-a10-spi";
  4876. reg = <0x01c17000 0x1000>;
  4877. @@ -1159,6 +1251,19 @@
  4878. status = "disabled";
  4879. };
  4880. + codec: codec@01c22c00 {
  4881. + #sound-dai-cells = <0>;
  4882. + compatible = "allwinner,sun7i-a20-codec";
  4883. + reg = <0x01c22c00 0x40>;
  4884. + interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
  4885. + clocks = <&apb0_gates 0>, <&codec_clk>;
  4886. + clock-names = "apb", "codec";
  4887. + dmas = <&dma SUN4I_DMA_NORMAL 19>,
  4888. + <&dma SUN4I_DMA_NORMAL 19>;
  4889. + dma-names = "rx", "tx";
  4890. + status = "disabled";
  4891. + };
  4892. +
  4893. sid: eeprom@01c23800 {
  4894. compatible = "allwinner,sun7i-a20-sid";
  4895. reg = <0x01c23800 0x200>;
  4896. --- a/arch/arm/dts/sun8i-a23-a33.dtsi
  4897. +++ b/arch/arm/dts/sun8i-a23-a33.dtsi
  4898. @@ -56,7 +56,7 @@
  4899. #size-cells = <1>;
  4900. ranges;
  4901. - framebuffer@0 {
  4902. + simplefb_lcd: framebuffer@0 {
  4903. compatible = "allwinner,simple-framebuffer",
  4904. "simple-framebuffer";
  4905. allwinner,pipeline = "de_be0-lcd0";
  4906. @@ -175,27 +175,13 @@
  4907. clock-output-names = "apb1";
  4908. };
  4909. - ahb1_gates: clk@01c20060 {
  4910. - #clock-cells = <1>;
  4911. - compatible = "allwinner,sun8i-a23-ahb1-gates-clk";
  4912. - reg = <0x01c20060 0x8>;
  4913. - clocks = <&ahb1>;
  4914. - clock-output-names = "ahb1_mipidsi", "ahb1_dma",
  4915. - "ahb1_mmc0", "ahb1_mmc1", "ahb1_mmc2",
  4916. - "ahb1_nand", "ahb1_sdram",
  4917. - "ahb1_hstimer", "ahb1_spi0",
  4918. - "ahb1_spi1", "ahb1_otg", "ahb1_ehci",
  4919. - "ahb1_ohci", "ahb1_ve", "ahb1_lcd",
  4920. - "ahb1_csi", "ahb1_be", "ahb1_fe",
  4921. - "ahb1_gpu", "ahb1_spinlock",
  4922. - "ahb1_drc";
  4923. - };
  4924. -
  4925. apb1_gates: clk@01c20068 {
  4926. #clock-cells = <1>;
  4927. compatible = "allwinner,sun8i-a23-apb1-gates-clk";
  4928. reg = <0x01c20068 0x4>;
  4929. clocks = <&apb1>;
  4930. + clock-indices = <0>, <5>,
  4931. + <12>, <13>;
  4932. clock-output-names = "apb1_codec", "apb1_pio",
  4933. "apb1_daudio0", "apb1_daudio1";
  4934. };
  4935. @@ -213,6 +199,10 @@
  4936. compatible = "allwinner,sun8i-a23-apb2-gates-clk";
  4937. reg = <0x01c2006c 0x4>;
  4938. clocks = <&apb2>;
  4939. + clock-indices = <0>, <1>,
  4940. + <2>, <16>,
  4941. + <17>, <18>,
  4942. + <19>, <20>;
  4943. clock-output-names = "apb2_i2c0", "apb2_i2c1",
  4944. "apb2_i2c2", "apb2_uart0",
  4945. "apb2_uart1", "apb2_uart2",
  4946. @@ -391,12 +381,19 @@
  4947. allwinner,pins = "PC5", "PC6", "PC8",
  4948. "PC9", "PC10", "PC11",
  4949. "PC12", "PC13", "PC14",
  4950. - "PC15";
  4951. + "PC15", "PC16";
  4952. allwinner,function = "mmc2";
  4953. allwinner,drive = <SUN4I_PINCTRL_30_MA>;
  4954. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  4955. };
  4956. + pwm0_pins: pwm0 {
  4957. + allwinner,pins = "PH0";
  4958. + allwinner,function = "pwm0";
  4959. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  4960. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  4961. + };
  4962. +
  4963. i2c0_pins_a: i2c0@0 {
  4964. allwinner,pins = "PH2", "PH3";
  4965. allwinner,function = "i2c0";
  4966. @@ -451,6 +448,14 @@
  4967. interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
  4968. };
  4969. + pwm: pwm@01c21400 {
  4970. + compatible = "allwinner,sun7i-a20-pwm";
  4971. + reg = <0x01c21400 0xc>;
  4972. + clocks = <&osc24M>;
  4973. + #pwm-cells = <3>;
  4974. + status = "disabled";
  4975. + };
  4976. +
  4977. lradc: lradc@01c22800 {
  4978. compatible = "allwinner,sun4i-a10-lradc-keys";
  4979. reg = <0x01c22800 0x100>;
  4980. @@ -574,6 +579,14 @@
  4981. <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
  4982. };
  4983. + nmi_intc: interrupt-controller@01f00c0c {
  4984. + compatible = "allwinner,sun6i-a31-sc-nmi";
  4985. + interrupt-controller;
  4986. + #interrupt-cells = <2>;
  4987. + reg = <0x01f00c0c 0x38>;
  4988. + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
  4989. + };
  4990. +
  4991. prcm@01f01400 {
  4992. compatible = "allwinner,sun8i-a23-prcm";
  4993. reg = <0x01f01400 0x200>;
  4994. @@ -642,10 +655,18 @@
  4995. resets = <&apb0_rst 0>;
  4996. gpio-controller;
  4997. interrupt-controller;
  4998. + #interrupt-cells = <3>;
  4999. #address-cells = <1>;
  5000. #size-cells = <0>;
  5001. #gpio-cells = <3>;
  5002. + r_rsb_pins: r_rsb {
  5003. + allwinner,pins = "PL0", "PL1";
  5004. + allwinner,function = "s_rsb";
  5005. + allwinner,drive = <SUN4I_PINCTRL_20_MA>;
  5006. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  5007. + };
  5008. +
  5009. r_uart_pins_a: r_uart@0 {
  5010. allwinner,pins = "PL2", "PL3";
  5011. allwinner,function = "s_uart";
  5012. @@ -653,5 +674,19 @@
  5013. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  5014. };
  5015. };
  5016. +
  5017. + r_rsb: rsb@01f03400 {
  5018. + compatible = "allwinner,sun8i-a23-rsb";
  5019. + reg = <0x01f03400 0x400>;
  5020. + interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
  5021. + clocks = <&apb0_gates 3>;
  5022. + clock-frequency = <3000000>;
  5023. + resets = <&apb0_rst 3>;
  5024. + pinctrl-names = "default";
  5025. + pinctrl-0 = <&r_rsb_pins>;
  5026. + status = "disabled";
  5027. + #address-cells = <1>;
  5028. + #size-cells = <0>;
  5029. + };
  5030. };
  5031. };
  5032. --- a/arch/arm/dts/sun8i-a23-gt90h-v4.dts
  5033. +++ b/arch/arm/dts/sun8i-a23-gt90h-v4.dts
  5034. @@ -47,15 +47,26 @@
  5035. #include <dt-bindings/gpio/gpio.h>
  5036. #include <dt-bindings/input/input.h>
  5037. #include <dt-bindings/pinctrl/sun4i-a10.h>
  5038. +#include <dt-bindings/pwm/pwm.h>
  5039. / {
  5040. - model = "Allwinner GT90H Quad Core Tablet (v4)";
  5041. - compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a33";
  5042. + model = "Allwinner GT90H Dual Core Tablet (v4)";
  5043. + compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a23";
  5044. aliases {
  5045. serial0 = &r_uart;
  5046. };
  5047. + backlight: backlight {
  5048. + compatible = "pwm-backlight";
  5049. + pinctrl-names = "default";
  5050. + pinctrl-0 = <&bl_en_pin_gt90h>;
  5051. + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
  5052. + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
  5053. + default-brightness-level = <8>;
  5054. + enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
  5055. + };
  5056. +
  5057. chosen {
  5058. stdout-path = "serial0:115200n8";
  5059. };
  5060. @@ -106,8 +117,7 @@
  5061. &mmc0 {
  5062. pinctrl-names = "default";
  5063. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_gt90h>;
  5064. - /* FIXME this really is aldo1, correct once we've pmic support */
  5065. - vmmc-supply = <&reg_vcc3v0>;
  5066. + vmmc-supply = <&reg_aldo1>;
  5067. bus-width = <4>;
  5068. cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
  5069. cd-inverted;
  5070. @@ -115,6 +125,13 @@
  5071. };
  5072. &pio {
  5073. + bl_en_pin_gt90h: bl_en_pin@0 {
  5074. + allwinner,pins = "PH6";
  5075. + allwinner,function = "gpio_in";
  5076. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  5077. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  5078. + };
  5079. +
  5080. mmc0_cd_pin_gt90h: mmc0_cd_pin@0 {
  5081. allwinner,pins = "PB4";
  5082. allwinner,function = "gpio_in";
  5083. @@ -123,12 +140,106 @@
  5084. };
  5085. };
  5086. +&pwm {
  5087. + pinctrl-names = "default";
  5088. + pinctrl-0 = <&pwm0_pins>;
  5089. + status = "okay";
  5090. +};
  5091. +
  5092. +&r_rsb {
  5093. + status = "okay";
  5094. +
  5095. + axp22x: pmic@3a3 {
  5096. + compatible = "x-powers,axp223";
  5097. + reg = <0x3a3>;
  5098. + interrupt-parent = <&nmi_intc>;
  5099. + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  5100. + eldoin-supply = <&reg_dcdc1>;
  5101. + };
  5102. +};
  5103. +
  5104. &r_uart {
  5105. pinctrl-names = "default";
  5106. pinctrl-0 = <&r_uart_pins_a>;
  5107. status = "okay";
  5108. };
  5109. +#include "axp22x.dtsi"
  5110. +
  5111. +&reg_aldo1 {
  5112. + regulator-always-on;
  5113. + regulator-min-microvolt = <3000000>;
  5114. + regulator-max-microvolt = <3000000>;
  5115. + regulator-name = "vcc-io";
  5116. +};
  5117. +
  5118. +&reg_aldo2 {
  5119. + regulator-always-on;
  5120. + regulator-min-microvolt = <2350000>;
  5121. + regulator-max-microvolt = <2650000>;
  5122. + regulator-name = "vdd-dll";
  5123. +};
  5124. +
  5125. +&reg_aldo3 {
  5126. + regulator-always-on;
  5127. + regulator-min-microvolt = <2700000>;
  5128. + regulator-max-microvolt = <3300000>;
  5129. + regulator-name = "vcc-pll-avcc";
  5130. +};
  5131. +
  5132. +&reg_dc1sw {
  5133. + regulator-name = "vcc-lcd";
  5134. +};
  5135. +
  5136. +&reg_dc5ldo {
  5137. + regulator-always-on;
  5138. + regulator-min-microvolt = <900000>;
  5139. + regulator-max-microvolt = <1400000>;
  5140. + regulator-name = "vdd-cpus";
  5141. +};
  5142. +
  5143. +&reg_dcdc1 {
  5144. + regulator-always-on;
  5145. + regulator-min-microvolt = <3000000>;
  5146. + regulator-max-microvolt = <3000000>;
  5147. + regulator-name = "vcc-3v0";
  5148. +};
  5149. +
  5150. +&reg_dcdc2 {
  5151. + regulator-always-on;
  5152. + regulator-min-microvolt = <900000>;
  5153. + regulator-max-microvolt = <1400000>;
  5154. + regulator-name = "vdd-sys";
  5155. +};
  5156. +
  5157. +&reg_dcdc3 {
  5158. + regulator-always-on;
  5159. + regulator-min-microvolt = <900000>;
  5160. + regulator-max-microvolt = <1400000>;
  5161. + regulator-name = "vdd-cpu";
  5162. +};
  5163. +
  5164. +&reg_dcdc5 {
  5165. + regulator-always-on;
  5166. + regulator-min-microvolt = <1500000>;
  5167. + regulator-max-microvolt = <1500000>;
  5168. + regulator-name = "vcc-dram";
  5169. +};
  5170. +
  5171. +&reg_dldo1 {
  5172. + regulator-min-microvolt = <3300000>;
  5173. + regulator-max-microvolt = <3300000>;
  5174. + regulator-name = "vcc-wifi";
  5175. +};
  5176. +
  5177. +&reg_rtc_ldo {
  5178. + regulator-name = "vcc-rtc";
  5179. +};
  5180. +
  5181. +&simplefb_lcd {
  5182. + vcc-lcd-supply = <&reg_dc1sw>;
  5183. +};
  5184. +
  5185. /*
  5186. * FIXME for now we only support host mode and rely on u-boot to have
  5187. * turned on Vbus which is controlled by the axp223 pmic on the board.
  5188. @@ -141,5 +252,6 @@
  5189. };
  5190. &usbphy {
  5191. + usb1_vbus-supply = <&reg_dldo1>;
  5192. status = "okay";
  5193. };
  5194. --- a/arch/arm/dts/sun8i-a23.dtsi
  5195. +++ b/arch/arm/dts/sun8i-a23.dtsi
  5196. @@ -50,6 +50,31 @@
  5197. };
  5198. clocks {
  5199. + ahb1_gates: clk@01c20060 {
  5200. + #clock-cells = <1>;
  5201. + compatible = "allwinner,sun8i-a23-ahb1-gates-clk";
  5202. + reg = <0x01c20060 0x8>;
  5203. + clocks = <&ahb1>;
  5204. + clock-indices = <1>, <6>,
  5205. + <8>, <9>, <10>,
  5206. + <13>, <14>,
  5207. + <19>, <20>,
  5208. + <21>, <24>, <26>,
  5209. + <29>, <32>, <36>,
  5210. + <40>, <44>, <46>,
  5211. + <52>, <53>,
  5212. + <54>, <57>;
  5213. + clock-output-names = "ahb1_mipidsi", "ahb1_dma",
  5214. + "ahb1_mmc0", "ahb1_mmc1", "ahb1_mmc2",
  5215. + "ahb1_nand", "ahb1_sdram",
  5216. + "ahb1_hstimer", "ahb1_spi0",
  5217. + "ahb1_spi1", "ahb1_otg", "ahb1_ehci",
  5218. + "ahb1_ohci", "ahb1_ve", "ahb1_lcd",
  5219. + "ahb1_csi", "ahb1_be", "ahb1_fe",
  5220. + "ahb1_gpu", "ahb1_msgbox",
  5221. + "ahb1_spinlock", "ahb1_drc";
  5222. + };
  5223. +
  5224. mbus_clk: clk@01c2015c {
  5225. #clock-cells = <0>;
  5226. compatible = "allwinner,sun8i-a23-mbus-clk";
  5227. --- a/arch/arm/dts/sun8i-a33-sinlinx-sina33.dts
  5228. +++ b/arch/arm/dts/sun8i-a33-sinlinx-sina33.dts
  5229. @@ -68,7 +68,7 @@
  5230. };
  5231. &lradc {
  5232. - vref-supply = <&reg_vcc3v0>;
  5233. + vref-supply = <&reg_dcdc1>;
  5234. status = "okay";
  5235. button@200 {
  5236. @@ -96,7 +96,7 @@
  5237. &mmc0 {
  5238. pinctrl-names = "default";
  5239. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina33>;
  5240. - vmmc-supply = <&reg_vcc3v0>;
  5241. + vmmc-supply = <&reg_dcdc1>;
  5242. bus-width = <4>;
  5243. cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
  5244. cd-inverted;
  5245. @@ -106,13 +106,16 @@
  5246. &mmc2 {
  5247. pinctrl-names = "default";
  5248. pinctrl-0 = <&mmc2_8bit_pins>;
  5249. - vmmc-supply = <&reg_vcc3v0>;
  5250. + vmmc-supply = <&reg_dcdc1>;
  5251. bus-width = <8>;
  5252. non-removable;
  5253. + cap-mmc-hw-reset;
  5254. status = "okay";
  5255. };
  5256. &mmc2_8bit_pins {
  5257. + /* Increase drive strength for DDR modes */
  5258. + allwinner,drive = <SUN4I_PINCTRL_40_MA>;
  5259. /* eMMC is missing pull-ups */
  5260. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  5261. };
  5262. @@ -130,6 +133,80 @@
  5263. };
  5264. };
  5265. +&r_rsb {
  5266. + status = "okay";
  5267. +
  5268. + axp22x: pmic@3a3 {
  5269. + compatible = "x-powers,axp223";
  5270. + reg = <0x3a3>;
  5271. + interrupt-parent = <&nmi_intc>;
  5272. + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  5273. + eldoin-supply = <&reg_dcdc1>;
  5274. + };
  5275. +};
  5276. +
  5277. +#include "axp22x.dtsi"
  5278. +
  5279. +&reg_aldo1 {
  5280. + regulator-always-on;
  5281. + regulator-min-microvolt = <3000000>;
  5282. + regulator-max-microvolt = <3000000>;
  5283. + regulator-name = "vcc-io";
  5284. +};
  5285. +
  5286. +&reg_aldo2 {
  5287. + regulator-always-on;
  5288. + regulator-min-microvolt = <2350000>;
  5289. + regulator-max-microvolt = <2650000>;
  5290. + regulator-name = "vdd-dll";
  5291. +};
  5292. +
  5293. +&reg_aldo3 {
  5294. + regulator-always-on;
  5295. + regulator-min-microvolt = <2700000>;
  5296. + regulator-max-microvolt = <3300000>;
  5297. + regulator-name = "vcc-pll-avcc";
  5298. +};
  5299. +
  5300. +&reg_dc5ldo {
  5301. + regulator-always-on;
  5302. + regulator-min-microvolt = <900000>;
  5303. + regulator-max-microvolt = <1400000>;
  5304. + regulator-name = "vdd-cpus";
  5305. +};
  5306. +
  5307. +&reg_dcdc1 {
  5308. + regulator-always-on;
  5309. + regulator-min-microvolt = <3000000>;
  5310. + regulator-max-microvolt = <3000000>;
  5311. + regulator-name = "vcc-3v0";
  5312. +};
  5313. +
  5314. +&reg_dcdc2 {
  5315. + regulator-always-on;
  5316. + regulator-min-microvolt = <900000>;
  5317. + regulator-max-microvolt = <1400000>;
  5318. + regulator-name = "vdd-sys";
  5319. +};
  5320. +
  5321. +&reg_dcdc3 {
  5322. + regulator-always-on;
  5323. + regulator-min-microvolt = <900000>;
  5324. + regulator-max-microvolt = <1400000>;
  5325. + regulator-name = "vdd-cpu";
  5326. +};
  5327. +
  5328. +&reg_dcdc5 {
  5329. + regulator-always-on;
  5330. + regulator-min-microvolt = <1500000>;
  5331. + regulator-max-microvolt = <1500000>;
  5332. + regulator-name = "vcc-dram";
  5333. +};
  5334. +
  5335. +&reg_rtc_ldo {
  5336. + regulator-name = "vcc-rtc";
  5337. +};
  5338. +
  5339. &uart0 {
  5340. pinctrl-names = "default";
  5341. pinctrl-0 = <&uart0_pins_b>;
  5342. --- a/arch/arm/dts/sun8i-a33.dtsi
  5343. +++ b/arch/arm/dts/sun8i-a33.dtsi
  5344. @@ -72,6 +72,41 @@
  5345. clock-output-names = "pll11";
  5346. };
  5347. + ahb1_gates: clk@01c20060 {
  5348. + #clock-cells = <1>;
  5349. + compatible = "allwinner,sun8i-a33-ahb1-gates-clk";
  5350. + reg = <0x01c20060 0x8>;
  5351. + clocks = <&ahb1>;
  5352. + clock-indices = <1>, <5>,
  5353. + <6>, <8>, <9>,
  5354. + <10>, <13>, <14>,
  5355. + <19>, <20>,
  5356. + <21>, <24>, <26>,
  5357. + <29>, <32>, <36>,
  5358. + <40>, <44>, <46>,
  5359. + <52>, <53>,
  5360. + <54>, <57>,
  5361. + <58>;
  5362. + clock-output-names = "ahb1_mipidsi", "ahb1_ss",
  5363. + "ahb1_dma","ahb1_mmc0", "ahb1_mmc1",
  5364. + "ahb1_mmc2", "ahb1_nand", "ahb1_sdram",
  5365. + "ahb1_hstimer", "ahb1_spi0",
  5366. + "ahb1_spi1", "ahb1_otg", "ahb1_ehci",
  5367. + "ahb1_ohci", "ahb1_ve", "ahb1_lcd",
  5368. + "ahb1_csi", "ahb1_be", "ahb1_fe",
  5369. + "ahb1_gpu", "ahb1_msgbox",
  5370. + "ahb1_spinlock", "ahb1_drc",
  5371. + "ahb1_sat";
  5372. + };
  5373. +
  5374. + ss_clk: clk@01c2009c {
  5375. + #clock-cells = <0>;
  5376. + compatible = "allwinner,sun4i-a10-mod0-clk";
  5377. + reg = <0x01c2009c 0x4>;
  5378. + clocks = <&osc24M>, <&pll6 0>;
  5379. + clock-output-names = "ss";
  5380. + };
  5381. +
  5382. mbus_clk: clk@01c2015c {
  5383. #clock-cells = <0>;
  5384. compatible = "allwinner,sun8i-a23-mbus-clk";
  5385. @@ -82,6 +117,16 @@
  5386. };
  5387. soc@01c00000 {
  5388. + crypto: crypto-engine@01c15000 {
  5389. + compatible = "allwinner,sun4i-a10-crypto";
  5390. + reg = <0x01c15000 0x1000>;
  5391. + interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
  5392. + clocks = <&ahb1_gates 5>, <&ss_clk>;
  5393. + clock-names = "ahb", "mod";
  5394. + resets = <&ahb1_rst 5>;
  5395. + reset-names = "ahb";
  5396. + };
  5397. +
  5398. usb_otg: usb@01c19000 {
  5399. compatible = "allwinner,sun8i-a33-musb";
  5400. reg = <0x01c19000 0x0400>;
  5401. --- /dev/null
  5402. +++ b/arch/arm/dts/sun8i-a83t-cubietruck-plus.dts
  5403. @@ -0,0 +1,65 @@
  5404. +/*
  5405. + * Copyright 2015 Chen-Yu Tsai
  5406. + *
  5407. + * Chen-Yu Tsai <wens@csie.org>
  5408. + *
  5409. + * This file is dual-licensed: you can use it either under the terms
  5410. + * of the GPL or the X11 license, at your option. Note that this dual
  5411. + * licensing only applies to this file, and not this project as a
  5412. + * whole.
  5413. + *
  5414. + * a) This file is free software; you can redistribute it and/or
  5415. + * modify it under the terms of the GNU General Public License as
  5416. + * published by the Free Software Foundation; either version 2 of the
  5417. + * License, or (at your option) any later version.
  5418. + *
  5419. + * This file is distributed in the hope that it will be useful,
  5420. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  5421. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  5422. + * GNU General Public License for more details.
  5423. + *
  5424. + * Or, alternatively,
  5425. + *
  5426. + * b) Permission is hereby granted, free of charge, to any person
  5427. + * obtaining a copy of this software and associated documentation
  5428. + * files (the "Software"), to deal in the Software without
  5429. + * restriction, including without limitation the rights to use,
  5430. + * copy, modify, merge, publish, distribute, sublicense, and/or
  5431. + * sell copies of the Software, and to permit persons to whom the
  5432. + * Software is furnished to do so, subject to the following
  5433. + * conditions:
  5434. + *
  5435. + * The above copyright notice and this permission notice shall be
  5436. + * included in all copies or substantial portions of the Software.
  5437. + *
  5438. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  5439. + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  5440. + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  5441. + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  5442. + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  5443. + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  5444. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  5445. + * OTHER DEALINGS IN THE SOFTWARE.
  5446. + */
  5447. +
  5448. +/dts-v1/;
  5449. +#include "sun8i-a83t.dtsi"
  5450. +
  5451. +/ {
  5452. + model = "Cubietech Cubietruck Plus";
  5453. + compatible = "cubietech,cubietruck-plus", "allwinner,sun8i-a83t";
  5454. +
  5455. + aliases {
  5456. + serial0 = &uart0;
  5457. + };
  5458. +
  5459. + chosen {
  5460. + stdout-path = "serial0:115200n8";
  5461. + };
  5462. +};
  5463. +
  5464. +&uart0 {
  5465. + pinctrl-names = "default";
  5466. + pinctrl-0 = <&uart0_pins_b>;
  5467. + status = "okay";
  5468. +};
  5469. --- a/arch/arm/dts/sun8i-a83t.dtsi
  5470. +++ b/arch/arm/dts/sun8i-a83t.dtsi
  5471. @@ -52,12 +52,6 @@
  5472. / {
  5473. interrupt-parent = <&gic>;
  5474. - chosen {
  5475. - #address-cells = <1>;
  5476. - #size-cells = <1>;
  5477. - ranges;
  5478. - };
  5479. -
  5480. cpus {
  5481. #address-cells = <1>;
  5482. #size-cells = <0>;
  5483. @@ -85,6 +79,7 @@
  5484. device_type = "cpu";
  5485. reg = <3>;
  5486. };
  5487. +
  5488. cpu@100 {
  5489. compatible = "arm,cortex-a7";
  5490. device_type = "cpu";
  5491. @@ -96,6 +91,7 @@
  5492. device_type = "cpu";
  5493. reg = <0x101>;
  5494. };
  5495. +
  5496. cpu@102 {
  5497. compatible = "arm,cortex-a7";
  5498. device_type = "cpu";
  5499. @@ -109,18 +105,12 @@
  5500. };
  5501. };
  5502. - memory {
  5503. - reg = <0x40000000 0x80000000>;
  5504. - };
  5505. -
  5506. timer {
  5507. compatible = "arm,armv7-timer";
  5508. - interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
  5509. - <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
  5510. - <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
  5511. - <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
  5512. - clock-frequency = <24000000>;
  5513. - arm,cpu-registers-not-fw-configured;
  5514. + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
  5515. + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
  5516. + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
  5517. + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>;
  5518. };
  5519. clocks {
  5520. @@ -128,6 +118,7 @@
  5521. #size-cells = <1>;
  5522. ranges;
  5523. + /* TODO: PRCM block has a mux for this. */
  5524. osc24M: osc24M_clk {
  5525. #clock-cells = <0>;
  5526. compatible = "fixed-clock";
  5527. @@ -135,36 +126,39 @@
  5528. clock-output-names = "osc24M";
  5529. };
  5530. - osc32k: osc32k_clk {
  5531. + /*
  5532. + * This is called "internal OSC" in some places.
  5533. + * It is an internal RC-based oscillator.
  5534. + * TODO: Its controls are in the PRCM block.
  5535. + */
  5536. + osc16M: osc16M_clk {
  5537. #clock-cells = <0>;
  5538. compatible = "fixed-clock";
  5539. - clock-frequency = <32768>;
  5540. - clock-output-names = "osc32k";
  5541. + clock-frequency = <16000000>;
  5542. + clock-output-names = "osc16M";
  5543. + };
  5544. +
  5545. + osc16Md512: osc16Md512_clk {
  5546. + #clock-cells = <0>;
  5547. + compatible = "fixed-factor-clock";
  5548. + clock-div = <512>;
  5549. + clock-mult = <1>;
  5550. + clocks = <&osc16M>;
  5551. + clock-output-names = "osc16M-d512";
  5552. };
  5553. };
  5554. - soc@01c00000 {
  5555. + soc {
  5556. compatible = "simple-bus";
  5557. #address-cells = <1>;
  5558. #size-cells = <1>;
  5559. ranges;
  5560. - gic: interrupt-controller@01c81000 {
  5561. - compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
  5562. - reg = <0x01c81000 0x1000>,
  5563. - <0x01c82000 0x1000>,
  5564. - <0x01c84000 0x2000>,
  5565. - <0x01c86000 0x2000>;
  5566. - interrupt-controller;
  5567. - #interrupt-cells = <3>;
  5568. - interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
  5569. - };
  5570. -
  5571. pio: pinctrl@01c20800 {
  5572. compatible = "allwinner,sun8i-a83t-pinctrl";
  5573. interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
  5574. - <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
  5575. - <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
  5576. + <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
  5577. + <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
  5578. reg = <0x01c20800 0x400>;
  5579. clocks = <&osc24M>;
  5580. gpio-controller;
  5581. @@ -172,27 +166,6 @@
  5582. #interrupt-cells = <3>;
  5583. #gpio-cells = <3>;
  5584. - i2c0_pins_a: i2c0@0 {
  5585. - allwinner,pins = "PH0", "PH1";
  5586. - allwinner,function = "i2c0";
  5587. - allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  5588. - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  5589. - };
  5590. -
  5591. - i2c1_pins_a: i2c1@0 {
  5592. - allwinner,pins = "PH2", "PH3";
  5593. - allwinner,function = "i2c1";
  5594. - allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  5595. - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  5596. - };
  5597. -
  5598. - i2c2_pins_a: i2c2@0 {
  5599. - allwinner,pins = "PH4", "PH5";
  5600. - allwinner,function = "i2c2";
  5601. - allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  5602. - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  5603. - };
  5604. -
  5605. mmc0_pins_a: mmc0@0 {
  5606. allwinner,pins = "PF0", "PF1", "PF2",
  5607. "PF3", "PF4", "PF5";
  5608. @@ -201,24 +174,6 @@
  5609. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  5610. };
  5611. - mmc1_pins_a: mmc1@0 {
  5612. - allwinner,pins = "PG0", "PG1", "PG2",
  5613. - "PG3", "PG4", "PG5";
  5614. - allwinner,function = "mmc1";
  5615. - allwinner,drive = <SUN4I_PINCTRL_30_MA>;
  5616. - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  5617. - };
  5618. -
  5619. - mmc2_8bit_pins: mmc2_8bit {
  5620. - allwinner,pins = "PC5", "PC6", "PC8",
  5621. - "PC9", "PC10", "PC11",
  5622. - "PC12", "PC13", "PC14",
  5623. - "PC15";
  5624. - allwinner,function = "mmc2";
  5625. - allwinner,drive = <SUN4I_PINCTRL_30_MA>;
  5626. - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  5627. - };
  5628. -
  5629. uart0_pins_a: uart0@0 {
  5630. allwinner,pins = "PF2", "PF4";
  5631. allwinner,function = "uart0";
  5632. @@ -234,6 +189,21 @@
  5633. };
  5634. };
  5635. + timer@01c20c00 {
  5636. + compatible = "allwinner,sun4i-a10-timer";
  5637. + reg = <0x01c20c00 0xa0>;
  5638. + interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
  5639. + <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
  5640. + clocks = <&osc24M>;
  5641. + };
  5642. +
  5643. + watchdog@01c20ca0 {
  5644. + compatible = "allwinner,sun6i-a31-wdt";
  5645. + reg = <0x01c20ca0 0x20>;
  5646. + interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
  5647. + clocks = <&osc24M>;
  5648. + };
  5649. +
  5650. uart0: serial@01c28000 {
  5651. compatible = "snps,dw-apb-uart";
  5652. reg = <0x01c28000 0x400>;
  5653. @@ -243,5 +213,16 @@
  5654. clocks = <&osc24M>;
  5655. status = "disabled";
  5656. };
  5657. +
  5658. + gic: interrupt-controller@01c81000 {
  5659. + compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
  5660. + reg = <0x01c81000 0x1000>,
  5661. + <0x01c82000 0x1000>,
  5662. + <0x01c84000 0x2000>,
  5663. + <0x01c86000 0x2000>;
  5664. + interrupt-controller;
  5665. + #interrupt-cells = <3>;
  5666. + interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
  5667. + };
  5668. };
  5669. };
  5670. --- a/arch/arm/dts/sun8i-h3-orangepi-pc.dts
  5671. +++ b/arch/arm/dts/sun8i-h3-orangepi-pc.dts
  5672. @@ -45,6 +45,7 @@
  5673. #include "sunxi-common-regulators.dtsi"
  5674. #include <dt-bindings/gpio/gpio.h>
  5675. +#include <dt-bindings/input/input.h>
  5676. #include <dt-bindings/pinctrl/sun4i-a10.h>
  5677. / {
  5678. @@ -58,6 +59,43 @@
  5679. chosen {
  5680. stdout-path = "serial0:115200n8";
  5681. };
  5682. +
  5683. + leds {
  5684. + compatible = "gpio-leds";
  5685. + pinctrl-names = "default";
  5686. + pinctrl-0 = <&leds_opc>;
  5687. +
  5688. + status_led {
  5689. + label = "status:red:user";
  5690. + gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
  5691. + };
  5692. + };
  5693. +
  5694. + r_leds {
  5695. + compatible = "gpio-leds";
  5696. + pinctrl-names = "default";
  5697. + pinctrl-0 = <&leds_r_opc>;
  5698. +
  5699. + tx {
  5700. + label = "pwr:green:user";
  5701. + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
  5702. + default-state = "on";
  5703. + };
  5704. + };
  5705. +
  5706. + r_gpio_keys {
  5707. + compatible = "gpio-keys";
  5708. + input-name = "sw4";
  5709. +
  5710. + pinctrl-names = "default";
  5711. + pinctrl-0 = <&sw_r_opc>;
  5712. +
  5713. + sw4@0 {
  5714. + label = "sw4";
  5715. + linux,code = <BTN_0>;
  5716. + gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
  5717. + };
  5718. + };
  5719. };
  5720. &ehci1 {
  5721. @@ -72,6 +110,12 @@
  5722. status = "okay";
  5723. };
  5724. +&ir {
  5725. + pinctrl-names = "default";
  5726. + pinctrl-0 = <&ir_pins_a>;
  5727. + status = "okay";
  5728. +};
  5729. +
  5730. &mmc0 {
  5731. pinctrl-names = "default";
  5732. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
  5733. @@ -94,6 +138,31 @@
  5734. status = "okay";
  5735. };
  5736. +&pio {
  5737. + leds_opc: led_pins@0 {
  5738. + allwinner,pins = "PA15";
  5739. + allwinner,function = "gpio_out";
  5740. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  5741. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  5742. + };
  5743. +};
  5744. +
  5745. +&r_pio {
  5746. + leds_r_opc: led_pins@0 {
  5747. + allwinner,pins = "PL10";
  5748. + allwinner,function = "gpio_out";
  5749. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  5750. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  5751. + };
  5752. +
  5753. + sw_r_opc: key_pins@0 {
  5754. + allwinner,pins = "PL03";
  5755. + allwinner,function = "gpio_in";
  5756. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  5757. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  5758. + };
  5759. +};
  5760. +
  5761. &uart0 {
  5762. pinctrl-names = "default";
  5763. pinctrl-0 = <&uart0_pins_a>;
  5764. --- a/arch/arm/dts/sun8i-h3-orangepi-plus.dts
  5765. +++ b/arch/arm/dts/sun8i-h3-orangepi-plus.dts
  5766. @@ -45,6 +45,7 @@
  5767. #include "sunxi-common-regulators.dtsi"
  5768. #include <dt-bindings/gpio/gpio.h>
  5769. +#include <dt-bindings/input/input.h>
  5770. #include <dt-bindings/pinctrl/sun4i-a10.h>
  5771. / {
  5772. @@ -70,6 +71,68 @@
  5773. enable-active-high;
  5774. gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
  5775. };
  5776. +
  5777. + leds {
  5778. + compatible = "gpio-leds";
  5779. + pinctrl-names = "default";
  5780. + pinctrl-0 = <&leds_opc>;
  5781. +
  5782. + status_led {
  5783. + label = "status:red:user";
  5784. + gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
  5785. + };
  5786. + };
  5787. +
  5788. + r_leds {
  5789. + compatible = "gpio-leds";
  5790. + pinctrl-names = "default";
  5791. + pinctrl-0 = <&leds_r_opc>;
  5792. +
  5793. + tx {
  5794. + label = "pwr:green:user";
  5795. + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
  5796. + default-state = "on";
  5797. + };
  5798. + };
  5799. +
  5800. + r_gpio_keys {
  5801. + compatible = "gpio-keys";
  5802. + input-name = "sw4";
  5803. +
  5804. + pinctrl-names = "default";
  5805. + pinctrl-0 = <&sw_r_opc>;
  5806. +
  5807. + sw4@0 {
  5808. + label = "sw4";
  5809. + linux,code = <BTN_0>;
  5810. + gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
  5811. + };
  5812. + };
  5813. +};
  5814. +
  5815. +&pio {
  5816. + leds_opc: led_pins@0 {
  5817. + allwinner,pins = "PA15";
  5818. + allwinner,function = "gpio_out";
  5819. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  5820. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  5821. + };
  5822. +};
  5823. +
  5824. +&r_pio {
  5825. + leds_r_opc: led_pins@0 {
  5826. + allwinner,pins = "PL10";
  5827. + allwinner,function = "gpio_out";
  5828. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  5829. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  5830. + };
  5831. +
  5832. + sw_r_opc: key_pins@0 {
  5833. + allwinner,pins = "PL03";
  5834. + allwinner,function = "gpio_in";
  5835. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  5836. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  5837. + };
  5838. };
  5839. &ehci1 {
  5840. --- a/arch/arm/dts/sun8i-h3.dtsi
  5841. +++ b/arch/arm/dts/sun8i-h3.dtsi
  5842. @@ -83,12 +83,6 @@
  5843. <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
  5844. <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
  5845. <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
  5846. - clock-frequency = <24000000>;
  5847. - arm,cpu-registers-not-fw-configured;
  5848. - };
  5849. -
  5850. - memory {
  5851. - reg = <0x40000000 0x80000000>;
  5852. };
  5853. clocks {
  5854. @@ -131,15 +125,24 @@
  5855. compatible = "allwinner,sun6i-a31-pll6-clk";
  5856. reg = <0x01c20028 0x4>;
  5857. clocks = <&osc24M>;
  5858. - clock-output-names = "pll6", "pll6x2", "pll6d2";
  5859. + clock-output-names = "pll6", "pll6x2";
  5860. };
  5861. - pll8: clk@01c20044 {
  5862. - #clock-cells = <1>;
  5863. - compatible = "allwinner,sun6i-a31-pll6-clk";
  5864. - reg = <0x01c20044 0x4>;
  5865. - clocks = <&osc24M>;
  5866. - clock-output-names = "pll8", "pll8x2";
  5867. + pll6d2: pll6d2_clk {
  5868. + #clock-cells = <0>;
  5869. + compatible = "fixed-factor-clock";
  5870. + clock-div = <2>;
  5871. + clock-mult = <1>;
  5872. + clocks = <&pll6 0>;
  5873. + clock-output-names = "pll6d2";
  5874. + };
  5875. +
  5876. + /* dummy clock until pll6 can be reused */
  5877. + pll8: pll8_clk {
  5878. + #clock-cells = <0>;
  5879. + compatible = "fixed-clock";
  5880. + clock-frequency = <1>;
  5881. + clock-output-names = "pll8";
  5882. };
  5883. cpu: cpu_clk@01c20050 {
  5884. @@ -170,7 +173,7 @@
  5885. #clock-cells = <0>;
  5886. compatible = "allwinner,sun8i-h3-ahb2-clk";
  5887. reg = <0x01c2005c 0x4>;
  5888. - clocks = <&ahb1>, <&pll6 2>;
  5889. + clocks = <&ahb1>, <&pll6d2>;
  5890. clock-output-names = "ahb2";
  5891. };
  5892. @@ -213,34 +216,34 @@
  5893. <76>, <77>, <78>,
  5894. <96>, <97>, <98>,
  5895. <112>, <113>,
  5896. - <114>, <115>, <116>,
  5897. - <128>, <135>;
  5898. - clock-output-names = "ahb1_ce", "ahb1_dma", "ahb1_mmc0",
  5899. - "ahb1_mmc1", "ahb1_mmc2", "ahb1_nand",
  5900. - "ahb1_sdram", "ahb2_gmac", "ahb1_ts",
  5901. - "ahb1_hstimer", "ahb1_spi0",
  5902. - "ahb1_spi1", "ahb1_otg",
  5903. - "ahb1_otg_ehci0", "ahb1_ehic1",
  5904. - "ahb1_ehic2", "ahb1_ehic3",
  5905. - "ahb1_otg_ohci0", "ahb2_ohic1",
  5906. - "ahb2_ohic2", "ahb2_ohic3", "ahb1_ve",
  5907. - "ahb1_lcd0", "ahb1_lcd1", "ahb1_deint",
  5908. - "ahb1_csi", "ahb1_tve", "ahb1_hdmi",
  5909. - "ahb1_de", "ahb1_gpu", "ahb1_msgbox",
  5910. - "ahb1_spinlock", "apb1_codec",
  5911. - "apb1_spdif", "apb1_pio", "apb1_ths",
  5912. - "apb1_i2s0", "apb1_i2s1", "apb1_i2s2",
  5913. - "apb2_i2c0", "apb2_i2c1", "apb2_i2c2",
  5914. - "apb2_uart0", "apb2_uart1",
  5915. - "apb2_uart2", "apb2_uart3", "apb2_scr",
  5916. - "ahb1_ephy", "ahb1_dbg";
  5917. + <114>, <115>,
  5918. + <116>, <128>, <135>;
  5919. + clock-output-names = "bus_ce", "bus_dma", "bus_mmc0",
  5920. + "bus_mmc1", "bus_mmc2", "bus_nand",
  5921. + "bus_sdram", "bus_gmac", "bus_ts",
  5922. + "bus_hstimer", "bus_spi0",
  5923. + "bus_spi1", "bus_otg",
  5924. + "bus_otg_ehci0", "bus_ehci1",
  5925. + "bus_ehci2", "bus_ehci3",
  5926. + "bus_otg_ohci0", "bus_ohci1",
  5927. + "bus_ohci2", "bus_ohci3", "bus_ve",
  5928. + "bus_lcd0", "bus_lcd1", "bus_deint",
  5929. + "bus_csi", "bus_tve", "bus_hdmi",
  5930. + "bus_de", "bus_gpu", "bus_msgbox",
  5931. + "bus_spinlock", "bus_codec",
  5932. + "bus_spdif", "bus_pio", "bus_ths",
  5933. + "bus_i2s0", "bus_i2s1", "bus_i2s2",
  5934. + "bus_i2c0", "bus_i2c1", "bus_i2c2",
  5935. + "bus_uart0", "bus_uart1",
  5936. + "bus_uart2", "bus_uart3",
  5937. + "bus_scr", "bus_ephy", "bus_dbg";
  5938. };
  5939. mmc0_clk: clk@01c20088 {
  5940. #clock-cells = <1>;
  5941. compatible = "allwinner,sun4i-a10-mmc-clk";
  5942. reg = <0x01c20088 0x4>;
  5943. - clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
  5944. + clocks = <&osc24M>, <&pll6 0>, <&pll8>;
  5945. clock-output-names = "mmc0",
  5946. "mmc0_output",
  5947. "mmc0_sample";
  5948. @@ -250,7 +253,7 @@
  5949. #clock-cells = <1>;
  5950. compatible = "allwinner,sun4i-a10-mmc-clk";
  5951. reg = <0x01c2008c 0x4>;
  5952. - clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
  5953. + clocks = <&osc24M>, <&pll6 0>, <&pll8>;
  5954. clock-output-names = "mmc1",
  5955. "mmc1_output",
  5956. "mmc1_sample";
  5957. @@ -260,7 +263,7 @@
  5958. #clock-cells = <1>;
  5959. compatible = "allwinner,sun4i-a10-mmc-clk";
  5960. reg = <0x01c20090 0x4>;
  5961. - clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
  5962. + clocks = <&osc24M>, <&pll6 0>, <&pll8>;
  5963. clock-output-names = "mmc2",
  5964. "mmc2_output",
  5965. "mmc2_sample";
  5966. @@ -285,6 +288,33 @@
  5967. clocks = <&osc24M>, <&pll6 1>, <&pll5>;
  5968. clock-output-names = "mbus";
  5969. };
  5970. +
  5971. + apb0: apb0_clk {
  5972. + compatible = "fixed-factor-clock";
  5973. + #clock-cells = <0>;
  5974. + clock-div = <1>;
  5975. + clock-mult = <1>;
  5976. + clocks = <&osc24M>;
  5977. + clock-output-names = "apb0";
  5978. + };
  5979. +
  5980. + apb0_gates: clk@01f01428 {
  5981. + compatible = "allwinner,sun8i-h3-apb0-gates-clk",
  5982. + "allwinner,sun4i-a10-gates-clk";
  5983. + reg = <0x01f01428 0x4>;
  5984. + #clock-cells = <1>;
  5985. + clocks = <&apb0>;
  5986. + clock-indices = <0>, <1>;
  5987. + clock-output-names = "apb0_pio", "apb0_ir";
  5988. + };
  5989. +
  5990. + ir_clk: ir_clk@01f01454 {
  5991. + compatible = "allwinner,sun4i-a10-mod0-clk";
  5992. + reg = <0x01f01454 0x4>;
  5993. + #clock-cells = <0>;
  5994. + clocks = <&osc32k>, <&osc24M>;
  5995. + clock-output-names = "ir";
  5996. + };
  5997. };
  5998. soc {
  5999. @@ -298,7 +328,7 @@
  6000. reg = <0x01c02000 0x1000>;
  6001. interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
  6002. clocks = <&bus_gates 6>;
  6003. - resets = <&bus_rst 6>;
  6004. + resets = <&ahb_rst 6>;
  6005. #dma-cells = <1>;
  6006. };
  6007. @@ -313,7 +343,7 @@
  6008. "mmc",
  6009. "output",
  6010. "sample";
  6011. - resets = <&bus_rst 8>;
  6012. + resets = <&ahb_rst 8>;
  6013. reset-names = "ahb";
  6014. interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
  6015. status = "disabled";
  6016. @@ -332,7 +362,7 @@
  6017. "mmc",
  6018. "output",
  6019. "sample";
  6020. - resets = <&bus_rst 9>;
  6021. + resets = <&ahb_rst 9>;
  6022. reset-names = "ahb";
  6023. interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
  6024. status = "disabled";
  6025. @@ -351,7 +381,7 @@
  6026. "mmc",
  6027. "output",
  6028. "sample";
  6029. - resets = <&bus_rst 10>;
  6030. + resets = <&ahb_rst 10>;
  6031. reset-names = "ahb";
  6032. interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
  6033. status = "disabled";
  6034. @@ -396,7 +426,7 @@
  6035. reg = <0x01c1b000 0x100>;
  6036. interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
  6037. clocks = <&bus_gates 25>, <&bus_gates 29>;
  6038. - resets = <&bus_rst 25>, <&bus_rst 29>;
  6039. + resets = <&ahb_rst 25>, <&ahb_rst 29>;
  6040. phys = <&usbphy 1>;
  6041. phy-names = "usb";
  6042. status = "disabled";
  6043. @@ -408,7 +438,7 @@
  6044. interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
  6045. clocks = <&bus_gates 29>, <&bus_gates 25>,
  6046. <&usb_clk 17>;
  6047. - resets = <&bus_rst 29>, <&bus_rst 25>;
  6048. + resets = <&ahb_rst 29>, <&ahb_rst 25>;
  6049. phys = <&usbphy 1>;
  6050. phy-names = "usb";
  6051. status = "disabled";
  6052. @@ -419,7 +449,7 @@
  6053. reg = <0x01c1c000 0x100>;
  6054. interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
  6055. clocks = <&bus_gates 26>, <&bus_gates 30>;
  6056. - resets = <&bus_rst 26>, <&bus_rst 30>;
  6057. + resets = <&ahb_rst 26>, <&ahb_rst 30>;
  6058. phys = <&usbphy 2>;
  6059. phy-names = "usb";
  6060. status = "disabled";
  6061. @@ -431,7 +461,7 @@
  6062. interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
  6063. clocks = <&bus_gates 30>, <&bus_gates 26>,
  6064. <&usb_clk 18>;
  6065. - resets = <&bus_rst 30>, <&bus_rst 26>;
  6066. + resets = <&ahb_rst 30>, <&ahb_rst 26>;
  6067. phys = <&usbphy 2>;
  6068. phy-names = "usb";
  6069. status = "disabled";
  6070. @@ -442,7 +472,7 @@
  6071. reg = <0x01c1d000 0x100>;
  6072. interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
  6073. clocks = <&bus_gates 27>, <&bus_gates 31>;
  6074. - resets = <&bus_rst 27>, <&bus_rst 31>;
  6075. + resets = <&ahb_rst 27>, <&ahb_rst 31>;
  6076. phys = <&usbphy 3>;
  6077. phy-names = "usb";
  6078. status = "disabled";
  6079. @@ -454,7 +484,7 @@
  6080. interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
  6081. clocks = <&bus_gates 31>, <&bus_gates 27>,
  6082. <&usb_clk 19>;
  6083. - resets = <&bus_rst 31>, <&bus_rst 27>;
  6084. + resets = <&ahb_rst 31>, <&ahb_rst 27>;
  6085. phys = <&usbphy 3>;
  6086. phy-names = "usb";
  6087. status = "disabled";
  6088. @@ -469,7 +499,7 @@
  6089. gpio-controller;
  6090. #gpio-cells = <3>;
  6091. interrupt-controller;
  6092. - #interrupt-cells = <2>;
  6093. + #interrupt-cells = <3>;
  6094. uart0_pins_a: uart0@0 {
  6095. allwinner,pins = "PA4", "PA5";
  6096. @@ -502,10 +532,22 @@
  6097. };
  6098. };
  6099. - bus_rst: reset@01c202c0 {
  6100. + ahb_rst: reset@01c202c0 {
  6101. #reset-cells = <1>;
  6102. - compatible = "allwinner,sun8i-h3-bus-reset";
  6103. - reg = <0x01c202c0 0x1c>;
  6104. + compatible = "allwinner,sun6i-a31-ahb1-reset";
  6105. + reg = <0x01c202c0 0xc>;
  6106. + };
  6107. +
  6108. + apb1_rst: reset@01c202d0 {
  6109. + #reset-cells = <1>;
  6110. + compatible = "allwinner,sun6i-a31-clock-reset";
  6111. + reg = <0x01c202d0 0x4>;
  6112. + };
  6113. +
  6114. + apb2_rst: reset@01c202d8 {
  6115. + #reset-cells = <1>;
  6116. + compatible = "allwinner,sun6i-a31-clock-reset";
  6117. + reg = <0x01c202d8 0x4>;
  6118. };
  6119. timer@01c20c00 {
  6120. @@ -529,7 +571,7 @@
  6121. reg-shift = <2>;
  6122. reg-io-width = <4>;
  6123. clocks = <&bus_gates 112>;
  6124. - resets = <&bus_rst 144>;
  6125. + resets = <&apb2_rst 16>;
  6126. dmas = <&dma 6>, <&dma 6>;
  6127. dma-names = "rx", "tx";
  6128. status = "disabled";
  6129. @@ -542,7 +584,7 @@
  6130. reg-shift = <2>;
  6131. reg-io-width = <4>;
  6132. clocks = <&bus_gates 113>;
  6133. - resets = <&bus_rst 145>;
  6134. + resets = <&apb2_rst 17>;
  6135. dmas = <&dma 7>, <&dma 7>;
  6136. dma-names = "rx", "tx";
  6137. status = "disabled";
  6138. @@ -555,7 +597,7 @@
  6139. reg-shift = <2>;
  6140. reg-io-width = <4>;
  6141. clocks = <&bus_gates 114>;
  6142. - resets = <&bus_rst 146>;
  6143. + resets = <&apb2_rst 18>;
  6144. dmas = <&dma 8>, <&dma 8>;
  6145. dma-names = "rx", "tx";
  6146. status = "disabled";
  6147. @@ -568,7 +610,7 @@
  6148. reg-shift = <2>;
  6149. reg-io-width = <4>;
  6150. clocks = <&bus_gates 115>;
  6151. - resets = <&bus_rst 147>;
  6152. + resets = <&apb2_rst 19>;
  6153. dmas = <&dma 9>, <&dma 9>;
  6154. dma-names = "rx", "tx";
  6155. status = "disabled";
  6156. @@ -591,5 +633,40 @@
  6157. interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
  6158. <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
  6159. };
  6160. +
  6161. + apb0_reset: reset@01f014b0 {
  6162. + reg = <0x01f014b0 0x4>;
  6163. + compatible = "allwinner,sun6i-a31-clock-reset";
  6164. + #reset-cells = <1>;
  6165. + };
  6166. +
  6167. + ir: ir@01f02000 {
  6168. + compatible = "allwinner,sun5i-a13-ir";
  6169. + clocks = <&apb0_gates 1>, <&ir_clk>;
  6170. + clock-names = "apb", "ir";
  6171. + resets = <&apb0_reset 1>;
  6172. + interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
  6173. + reg = <0x01f02000 0x40>;
  6174. + status = "disabled";
  6175. + };
  6176. +
  6177. + r_pio: pinctrl@01f02c00 {
  6178. + compatible = "allwinner,sun8i-h3-r-pinctrl";
  6179. + reg = <0x01f02c00 0x400>;
  6180. + interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
  6181. + clocks = <&apb0_gates 0>;
  6182. + resets = <&apb0_reset 0>;
  6183. + gpio-controller;
  6184. + #gpio-cells = <3>;
  6185. + interrupt-controller;
  6186. + #interrupt-cells = <3>;
  6187. +
  6188. + ir_pins_a: ir@0 {
  6189. + allwinner,pins = "PL11";
  6190. + allwinner,function = "s_cir_rx";
  6191. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  6192. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  6193. + };
  6194. + };
  6195. };
  6196. };
  6197. --- a/arch/arm/dts/sun8i-q8-common.dtsi
  6198. +++ b/arch/arm/dts/sun8i-q8-common.dtsi
  6199. @@ -41,11 +41,23 @@
  6200. */
  6201. #include "sunxi-q8-common.dtsi"
  6202. +#include <dt-bindings/pwm/pwm.h>
  6203. +
  6204. / {
  6205. aliases {
  6206. serial0 = &r_uart;
  6207. };
  6208. + backlight: backlight {
  6209. + compatible = "pwm-backlight";
  6210. + pinctrl-names = "default";
  6211. + pinctrl-0 = <&bl_en_pin_q8>;
  6212. + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
  6213. + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
  6214. + default-brightness-level = <8>;
  6215. + enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
  6216. + };
  6217. +
  6218. chosen {
  6219. stdout-path = "serial0:115200n8";
  6220. };
  6221. @@ -54,7 +66,7 @@
  6222. &mmc0 {
  6223. pinctrl-names = "default";
  6224. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>;
  6225. - vmmc-supply = <&reg_vcc3v0>;
  6226. + vmmc-supply = <&reg_dcdc1>;
  6227. bus-width = <4>;
  6228. cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
  6229. cd-inverted;
  6230. @@ -77,8 +89,90 @@
  6231. };
  6232. };
  6233. +&r_rsb {
  6234. + status = "okay";
  6235. +
  6236. + axp22x: pmic@3a3 {
  6237. + compatible = "x-powers,axp223";
  6238. + reg = <0x3a3>;
  6239. + interrupt-parent = <&nmi_intc>;
  6240. + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  6241. + eldoin-supply = <&reg_dcdc1>;
  6242. + };
  6243. +};
  6244. +
  6245. +#include "axp22x.dtsi"
  6246. +
  6247. +&reg_aldo1 {
  6248. + regulator-always-on;
  6249. + regulator-min-microvolt = <3000000>;
  6250. + regulator-max-microvolt = <3000000>;
  6251. + regulator-name = "vcc-io";
  6252. +};
  6253. +
  6254. +&reg_aldo2 {
  6255. + regulator-always-on;
  6256. + regulator-min-microvolt = <2350000>;
  6257. + regulator-max-microvolt = <2650000>;
  6258. + regulator-name = "vdd-dll";
  6259. +};
  6260. +
  6261. +&reg_aldo3 {
  6262. + regulator-always-on;
  6263. + regulator-min-microvolt = <2700000>;
  6264. + regulator-max-microvolt = <3300000>;
  6265. + regulator-name = "vcc-pll-avcc";
  6266. +};
  6267. +
  6268. +&reg_dc1sw {
  6269. + regulator-name = "vcc-lcd";
  6270. +};
  6271. +
  6272. +&reg_dc5ldo {
  6273. + regulator-always-on;
  6274. + regulator-min-microvolt = <900000>;
  6275. + regulator-max-microvolt = <1400000>;
  6276. + regulator-name = "vdd-cpus";
  6277. +};
  6278. +
  6279. +&reg_dcdc1 {
  6280. + regulator-always-on;
  6281. + regulator-min-microvolt = <3000000>;
  6282. + regulator-max-microvolt = <3000000>;
  6283. + regulator-name = "vcc-3v0";
  6284. +};
  6285. +
  6286. +&reg_dcdc2 {
  6287. + regulator-always-on;
  6288. + regulator-min-microvolt = <900000>;
  6289. + regulator-max-microvolt = <1400000>;
  6290. + regulator-name = "vdd-sys";
  6291. +};
  6292. +
  6293. +&reg_dcdc3 {
  6294. + regulator-always-on;
  6295. + regulator-min-microvolt = <900000>;
  6296. + regulator-max-microvolt = <1400000>;
  6297. + regulator-name = "vdd-cpu";
  6298. +};
  6299. +
  6300. +&reg_dcdc5 {
  6301. + regulator-always-on;
  6302. + regulator-min-microvolt = <1500000>;
  6303. + regulator-max-microvolt = <1500000>;
  6304. + regulator-name = "vcc-dram";
  6305. +};
  6306. +
  6307. +&reg_rtc_ldo {
  6308. + regulator-name = "vcc-rtc";
  6309. +};
  6310. +
  6311. &r_uart {
  6312. pinctrl-names = "default";
  6313. pinctrl-0 = <&r_uart_pins_a>;
  6314. status = "okay";
  6315. };
  6316. +
  6317. +&simplefb_lcd {
  6318. + vcc-lcd-supply = <&reg_dc1sw>;
  6319. +};
  6320. --- a/arch/arm/dts/sun9i-a80-cubieboard4.dts
  6321. +++ b/arch/arm/dts/sun9i-a80-cubieboard4.dts
  6322. @@ -62,9 +62,31 @@
  6323. stdout-path = "serial0:115200n8";
  6324. };
  6325. + leds {
  6326. + compatible = "gpio-leds";
  6327. + pinctrl-names = "default";
  6328. + pinctrl-0 = <&led_pins_cubieboard4>;
  6329. +
  6330. + green {
  6331. + label = "cubieboard4:green:usr";
  6332. + gpios = <&pio 7 17 GPIO_ACTIVE_HIGH>; /* PH17 */
  6333. + };
  6334. +
  6335. + red {
  6336. + label = "cubieboard4:red:usr";
  6337. + gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
  6338. + };
  6339. + };
  6340. };
  6341. &pio {
  6342. + led_pins_cubieboard4: led-pins@0 {
  6343. + allwinner,pins = "PH6", "PH17";
  6344. + allwinner,function = "gpio_out";
  6345. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  6346. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  6347. + };
  6348. +
  6349. mmc0_cd_pin_cubieboard4: mmc0_cd_pin@0 {
  6350. allwinner,pins = "PH18";
  6351. allwinner,function = "gpio_in";
  6352. @@ -89,6 +111,20 @@
  6353. vmmc-supply = <&reg_vcc3v0>;
  6354. bus-width = <8>;
  6355. non-removable;
  6356. + cap-mmc-hw-reset;
  6357. + status = "okay";
  6358. +};
  6359. +
  6360. +&mmc2_8bit_pins {
  6361. + /* Increase drive strength for DDR modes */
  6362. + allwinner,drive = <SUN4I_PINCTRL_40_MA>;
  6363. +};
  6364. +
  6365. +&r_ir {
  6366. + status = "okay";
  6367. +};
  6368. +
  6369. +&r_rsb {
  6370. status = "okay";
  6371. };
  6372. --- a/arch/arm/dts/sun9i-a80-optimus.dts
  6373. +++ b/arch/arm/dts/sun9i-a80-optimus.dts
  6374. @@ -65,7 +65,7 @@
  6375. leds {
  6376. compatible = "gpio-leds";
  6377. pinctrl-names = "default";
  6378. - pinctrl-0 = <&led_pins_optimus>;
  6379. + pinctrl-0 = <&led_pins_optimus>, <&led_r_pins_optimus>;
  6380. /* The LED names match those found on the board */
  6381. @@ -74,7 +74,10 @@
  6382. gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>;
  6383. };
  6384. - /* led3 is on PM15, in R_PIO */
  6385. + led3 {
  6386. + label = "optimus:led3:usr";
  6387. + gpios = <&r_pio 1 15 GPIO_ACTIVE_HIGH>; /* PM15 */
  6388. + };
  6389. led4 {
  6390. label = "optimus:led4:usr";
  6391. @@ -106,17 +109,6 @@
  6392. status = "okay";
  6393. };
  6394. -&i2c3 {
  6395. - pinctrl-names = "default";
  6396. - pinctrl-0 = <&i2c3_pins_a>;
  6397. - status = "okay";
  6398. -};
  6399. -
  6400. -&i2c3_pins_a {
  6401. - /* Enable internal pull-up */
  6402. - allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  6403. -};
  6404. -
  6405. &ohci0 {
  6406. status = "okay";
  6407. };
  6408. @@ -171,30 +163,42 @@
  6409. vmmc-supply = <&reg_vcc3v0>;
  6410. bus-width = <8>;
  6411. non-removable;
  6412. + cap-mmc-hw-reset;
  6413. status = "okay";
  6414. };
  6415. +&mmc2_8bit_pins {
  6416. + /* Increase drive strength for DDR modes */
  6417. + allwinner,drive = <SUN4I_PINCTRL_40_MA>;
  6418. +};
  6419. +
  6420. &reg_usb1_vbus {
  6421. pinctrl-0 = <&usb1_vbus_pin_optimus>;
  6422. gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  6423. status = "okay";
  6424. };
  6425. -&uart0 {
  6426. - pinctrl-names = "default";
  6427. - pinctrl-0 = <&uart0_pins_a>;
  6428. +&r_ir {
  6429. status = "okay";
  6430. };
  6431. -&uart4 {
  6432. - pinctrl-names = "default";
  6433. - pinctrl-0 = <&uart4_pins_a>;
  6434. +&r_pio {
  6435. + led_r_pins_optimus: led-pins@1 {
  6436. + allwinner,pins = "PM15";
  6437. + allwinner,function = "gpio_out";
  6438. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  6439. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  6440. + };
  6441. +};
  6442. +
  6443. +&r_rsb {
  6444. status = "okay";
  6445. };
  6446. -&uart4_pins_a {
  6447. - /* Enable internal pull-up */
  6448. - allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  6449. +&uart0 {
  6450. + pinctrl-names = "default";
  6451. + pinctrl-0 = <&uart0_pins_a>;
  6452. + status = "okay";
  6453. };
  6454. &usbphy1 {
  6455. --- a/arch/arm/dts/sun9i-a80.dtsi
  6456. +++ b/arch/arm/dts/sun9i-a80.dtsi
  6457. @@ -128,6 +128,17 @@
  6458. */
  6459. ranges = <0 0 0 0x20000000>;
  6460. + /*
  6461. + * This clock is actually configurable from the PRCM address
  6462. + * space. The external 24M oscillator can be turned off, and
  6463. + * the clock switched to an internal 16M RC oscillator. Under
  6464. + * normal operation there's no reason to do this, and the
  6465. + * default is to use the external good one, so just model this
  6466. + * as a fixed clock. Also it is not entirely clear if the
  6467. + * osc24M mux in the PRCM affects the entire clock tree, which
  6468. + * would also throw all the PLL clock rates off, or just the
  6469. + * downstream clocks in the PRCM.
  6470. + */
  6471. osc24M: osc24M_clk {
  6472. #clock-cells = <0>;
  6473. compatible = "fixed-clock";
  6474. @@ -135,6 +146,13 @@
  6475. clock-output-names = "osc24M";
  6476. };
  6477. + /*
  6478. + * The 32k clock is from an external source, normally the
  6479. + * AC100 codec/RTC chip. This clock is by default enabled
  6480. + * and clocked at 32768 Hz, from the oscillator connected
  6481. + * to the AC100. It is configurable, but no such driver or
  6482. + * bindings exist yet.
  6483. + */
  6484. osc32k: osc32k_clk {
  6485. #clock-cells = <0>;
  6486. compatible = "fixed-clock";
  6487. @@ -164,6 +182,14 @@
  6488. "usb_phy2", "usb_hsic_12M";
  6489. };
  6490. + pll3: clk@06000008 {
  6491. + /* placeholder until implemented */
  6492. + #clock-cells = <0>;
  6493. + compatible = "fixed-clock";
  6494. + clock-rate = <0>;
  6495. + clock-output-names = "pll3";
  6496. + };
  6497. +
  6498. pll4: clk@0600000c {
  6499. #clock-cells = <0>;
  6500. compatible = "allwinner,sun9i-a80-pll4-clk";
  6501. @@ -277,9 +303,12 @@
  6502. compatible = "allwinner,sun9i-a80-ahb0-gates-clk";
  6503. reg = <0x06000580 0x4>;
  6504. clocks = <&ahb0>;
  6505. - clock-indices = <0>, <1>, <3>, <5>, <8>, <12>, <13>,
  6506. - <14>, <15>, <16>, <18>, <20>, <21>,
  6507. - <22>, <23>;
  6508. + clock-indices = <0>, <1>, <3>,
  6509. + <5>, <8>, <12>,
  6510. + <13>, <14>,
  6511. + <15>, <16>, <18>,
  6512. + <20>, <21>, <22>,
  6513. + <23>;
  6514. clock-output-names = "ahb0_fd", "ahb0_ve", "ahb0_gpu",
  6515. "ahb0_ss", "ahb0_sd", "ahb0_nand1",
  6516. "ahb0_nand0", "ahb0_sdram",
  6517. @@ -293,7 +322,10 @@
  6518. compatible = "allwinner,sun9i-a80-ahb1-gates-clk";
  6519. reg = <0x06000584 0x4>;
  6520. clocks = <&ahb1>;
  6521. - clock-indices = <0>, <1>, <17>, <21>, <22>, <23>, <24>;
  6522. + clock-indices = <0>, <1>,
  6523. + <17>, <21>,
  6524. + <22>, <23>,
  6525. + <24>;
  6526. clock-output-names = "ahb1_usbotg", "ahb1_usbhci",
  6527. "ahb1_gmac", "ahb1_msgbox",
  6528. "ahb1_spinlock", "ahb1_hstimer",
  6529. @@ -305,8 +337,9 @@
  6530. compatible = "allwinner,sun9i-a80-ahb2-gates-clk";
  6531. reg = <0x06000588 0x4>;
  6532. clocks = <&ahb2>;
  6533. - clock-indices = <0>, <1>, <2>, <4>, <5>, <7>, <8>,
  6534. - <11>;
  6535. + clock-indices = <0>, <1>,
  6536. + <2>, <4>, <5>,
  6537. + <7>, <8>, <11>;
  6538. clock-output-names = "ahb2_lcd0", "ahb2_lcd1",
  6539. "ahb2_edp", "ahb2_csi", "ahb2_hdmi",
  6540. "ahb2_de", "ahb2_mp", "ahb2_mipi_dsi";
  6541. @@ -317,8 +350,10 @@
  6542. compatible = "allwinner,sun9i-a80-apb0-gates-clk";
  6543. reg = <0x06000590 0x4>;
  6544. clocks = <&apb0>;
  6545. - clock-indices = <1>, <5>, <11>, <12>, <13>, <15>,
  6546. - <17>, <18>, <19>;
  6547. + clock-indices = <1>, <5>,
  6548. + <11>, <12>, <13>,
  6549. + <15>, <17>, <18>,
  6550. + <19>;
  6551. clock-output-names = "apb0_spdif", "apb0_pio",
  6552. "apb0_ac97", "apb0_i2s0", "apb0_i2s1",
  6553. "apb0_lradc", "apb0_gpadc", "apb0_twd",
  6554. @@ -330,14 +365,79 @@
  6555. compatible = "allwinner,sun9i-a80-apb1-gates-clk";
  6556. reg = <0x06000594 0x4>;
  6557. clocks = <&apb1>;
  6558. - clock-indices = <0>, <1>, <2>, <3>, <4>,
  6559. - <16>, <17>, <18>, <19>, <20>, <21>;
  6560. + clock-indices = <0>, <1>,
  6561. + <2>, <3>, <4>,
  6562. + <16>, <17>,
  6563. + <18>, <19>,
  6564. + <20>, <21>;
  6565. clock-output-names = "apb1_i2c0", "apb1_i2c1",
  6566. "apb1_i2c2", "apb1_i2c3", "apb1_i2c4",
  6567. "apb1_uart0", "apb1_uart1",
  6568. "apb1_uart2", "apb1_uart3",
  6569. "apb1_uart4", "apb1_uart5";
  6570. };
  6571. +
  6572. + cpus_clk: clk@08001410 {
  6573. + compatible = "allwinner,sun9i-a80-cpus-clk";
  6574. + reg = <0x08001410 0x4>;
  6575. + #clock-cells = <0>;
  6576. + clocks = <&osc32k>, <&osc24M>, <&pll4>, <&pll3>;
  6577. + clock-output-names = "cpus";
  6578. + };
  6579. +
  6580. + ahbs: ahbs_clk {
  6581. + compatible = "fixed-factor-clock";
  6582. + #clock-cells = <0>;
  6583. + clock-div = <1>;
  6584. + clock-mult = <1>;
  6585. + clocks = <&cpus_clk>;
  6586. + clock-output-names = "ahbs";
  6587. + };
  6588. +
  6589. + apbs: clk@0800141c {
  6590. + compatible = "allwinner,sun8i-a23-apb0-clk";
  6591. + reg = <0x0800141c 0x4>;
  6592. + #clock-cells = <0>;
  6593. + clocks = <&ahbs>;
  6594. + clock-output-names = "apbs";
  6595. + };
  6596. +
  6597. + apbs_gates: clk@08001428 {
  6598. + compatible = "allwinner,sun9i-a80-apbs-gates-clk";
  6599. + reg = <0x08001428 0x4>;
  6600. + #clock-cells = <1>;
  6601. + clocks = <&apbs>;
  6602. + clock-indices = <0>, <1>,
  6603. + <2>, <3>,
  6604. + <4>, <5>,
  6605. + <6>, <7>,
  6606. + <12>, <13>,
  6607. + <16>, <17>,
  6608. + <18>, <20>;
  6609. + clock-output-names = "apbs_pio", "apbs_ir",
  6610. + "apbs_timer", "apbs_rsb",
  6611. + "apbs_uart", "apbs_1wire",
  6612. + "apbs_i2c0", "apbs_i2c1",
  6613. + "apbs_ps2_0", "apbs_ps2_1",
  6614. + "apbs_dma", "apbs_i2s0",
  6615. + "apbs_i2s1", "apbs_twd";
  6616. + };
  6617. +
  6618. + r_1wire_clk: clk@08001450 {
  6619. + reg = <0x08001450 0x4>;
  6620. + #clock-cells = <0>;
  6621. + compatible = "allwinner,sun4i-a10-mod0-clk";
  6622. + clocks = <&osc32k>, <&osc24M>;
  6623. + clock-output-names = "r_1wire";
  6624. + };
  6625. +
  6626. + r_ir_clk: clk@08001454 {
  6627. + reg = <0x08001454 0x4>;
  6628. + #clock-cells = <0>;
  6629. + compatible = "allwinner,sun4i-a10-mod0-clk";
  6630. + clocks = <&osc32k>, <&osc24M>;
  6631. + clock-output-names = "r_ir";
  6632. + };
  6633. };
  6634. soc {
  6635. @@ -443,7 +543,7 @@
  6636. };
  6637. mmc0: mmc@01c0f000 {
  6638. - compatible = "allwinner,sun5i-a13-mmc";
  6639. + compatible = "allwinner,sun9i-a80-mmc";
  6640. reg = <0x01c0f000 0x1000>;
  6641. clocks = <&mmc_config_clk 0>, <&mmc0_clk 0>,
  6642. <&mmc0_clk 1>, <&mmc0_clk 2>;
  6643. @@ -457,7 +557,7 @@
  6644. };
  6645. mmc1: mmc@01c10000 {
  6646. - compatible = "allwinner,sun5i-a13-mmc";
  6647. + compatible = "allwinner,sun9i-a80-mmc";
  6648. reg = <0x01c10000 0x1000>;
  6649. clocks = <&mmc_config_clk 1>, <&mmc1_clk 0>,
  6650. <&mmc1_clk 1>, <&mmc1_clk 2>;
  6651. @@ -471,7 +571,7 @@
  6652. };
  6653. mmc2: mmc@01c11000 {
  6654. - compatible = "allwinner,sun5i-a13-mmc";
  6655. + compatible = "allwinner,sun9i-a80-mmc";
  6656. reg = <0x01c11000 0x1000>;
  6657. clocks = <&mmc_config_clk 2>, <&mmc2_clk 0>,
  6658. <&mmc2_clk 1>, <&mmc2_clk 2>;
  6659. @@ -485,7 +585,7 @@
  6660. };
  6661. mmc3: mmc@01c12000 {
  6662. - compatible = "allwinner,sun5i-a13-mmc";
  6663. + compatible = "allwinner,sun9i-a80-mmc";
  6664. reg = <0x01c12000 0x1000>;
  6665. clocks = <&mmc_config_clk 3>, <&mmc3_clk 0>,
  6666. <&mmc3_clk 1>, <&mmc3_clk 2>;
  6667. @@ -582,7 +682,7 @@
  6668. clocks = <&apb0_gates 5>;
  6669. gpio-controller;
  6670. interrupt-controller;
  6671. - #interrupt-cells = <2>;
  6672. + #interrupt-cells = <3>;
  6673. #size-cells = <0>;
  6674. #gpio-cells = <3>;
  6675. @@ -604,7 +704,8 @@
  6676. mmc2_8bit_pins: mmc2_8bit {
  6677. allwinner,pins = "PC6", "PC7", "PC8", "PC9",
  6678. "PC10", "PC11", "PC12",
  6679. - "PC13", "PC14", "PC15";
  6680. + "PC13", "PC14", "PC15",
  6681. + "PC16";
  6682. allwinner,function = "mmc2";
  6683. allwinner,drive = <SUN4I_PINCTRL_30_MA>;
  6684. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  6685. @@ -752,14 +853,83 @@
  6686. interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
  6687. };
  6688. + apbs_rst: reset@080014b0 {
  6689. + reg = <0x080014b0 0x4>;
  6690. + compatible = "allwinner,sun6i-a31-clock-reset";
  6691. + #reset-cells = <1>;
  6692. + };
  6693. +
  6694. + nmi_intc: interrupt-controller@080015a0 {
  6695. + compatible = "allwinner,sun9i-a80-nmi";
  6696. + interrupt-controller;
  6697. + #interrupt-cells = <2>;
  6698. + reg = <0x080015a0 0xc>;
  6699. + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
  6700. + };
  6701. +
  6702. + r_ir: ir@08002000 {
  6703. + compatible = "allwinner,sun5i-a13-ir";
  6704. + interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
  6705. + pinctrl-names = "default";
  6706. + pinctrl-0 = <&r_ir_pins>;
  6707. + clocks = <&apbs_gates 1>, <&r_ir_clk>;
  6708. + clock-names = "apb", "ir";
  6709. + resets = <&apbs_rst 1>;
  6710. + reg = <0x08002000 0x40>;
  6711. + status = "disabled";
  6712. + };
  6713. +
  6714. r_uart: serial@08002800 {
  6715. compatible = "snps,dw-apb-uart";
  6716. reg = <0x08002800 0x400>;
  6717. interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
  6718. reg-shift = <2>;
  6719. reg-io-width = <4>;
  6720. - clocks = <&osc24M>;
  6721. + clocks = <&apbs_gates 4>;
  6722. + resets = <&apbs_rst 4>;
  6723. status = "disabled";
  6724. };
  6725. +
  6726. + r_pio: pinctrl@08002c00 {
  6727. + compatible = "allwinner,sun9i-a80-r-pinctrl";
  6728. + reg = <0x08002c00 0x400>;
  6729. + interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
  6730. + <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
  6731. + clocks = <&apbs_gates 0>;
  6732. + resets = <&apbs_rst 0>;
  6733. + gpio-controller;
  6734. + interrupt-controller;
  6735. + #address-cells = <1>;
  6736. + #size-cells = <0>;
  6737. + #gpio-cells = <3>;
  6738. +
  6739. + r_ir_pins: r_ir {
  6740. + allwinner,pins = "PL6";
  6741. + allwinner,function = "s_cir_rx";
  6742. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  6743. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  6744. + };
  6745. +
  6746. + r_rsb_pins: r_rsb {
  6747. + allwinner,pins = "PN0", "PN1";
  6748. + allwinner,function = "s_rsb";
  6749. + allwinner,drive = <SUN4I_PINCTRL_20_MA>;
  6750. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  6751. + };
  6752. + };
  6753. +
  6754. + r_rsb: i2c@08003400 {
  6755. + compatible = "allwinner,sun8i-a23-rsb";
  6756. + reg = <0x08003400 0x400>;
  6757. + interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
  6758. + clocks = <&apbs_gates 3>;
  6759. + clock-frequency = <3000000>;
  6760. + resets = <&apbs_rst 3>;
  6761. + pinctrl-names = "default";
  6762. + pinctrl-0 = <&r_rsb_pins>;
  6763. + status = "disabled";
  6764. + #address-cells = <1>;
  6765. + #size-cells = <0>;
  6766. + };
  6767. };
  6768. };
  6769. --- /dev/null
  6770. +++ b/arch/arm/dts/sunxi-itead-core-common.dtsi
  6771. @@ -0,0 +1,136 @@
  6772. +/*
  6773. + * Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
  6774. + *
  6775. + * This file is dual-licensed: you can use it either under the terms
  6776. + * of the GPL or the X11 license, at your option. Note that this dual
  6777. + * licensing only applies to this file, and not this project as a
  6778. + * whole.
  6779. + *
  6780. + * a) This file is free software; you can redistribute it and/or
  6781. + * modify it under the terms of the GNU General Public License as
  6782. + * published by the Free Software Foundation; either version 2 of the
  6783. + * License, or (at your option) any later version.
  6784. + *
  6785. + * This file is distributed in the hope that it will be useful,
  6786. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  6787. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  6788. + * GNU General Public License for more details.
  6789. + *
  6790. + * Or, alternatively,
  6791. + *
  6792. + * b) Permission is hereby granted, free of charge, to any person
  6793. + * obtaining a copy of this software and associated documentation
  6794. + * files (the "Software"), to deal in the Software without
  6795. + * restriction, including without limitation the rights to use,
  6796. + * copy, modify, merge, publish, distribute, sublicense, and/or
  6797. + * sell copies of the Software, and to permit persons to whom the
  6798. + * Software is furnished to do so, subject to the following
  6799. + * conditions:
  6800. + *
  6801. + * The above copyright notice and this permission notice shall be
  6802. + * included in all copies or substantial portions of the Software.
  6803. + *
  6804. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  6805. + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  6806. + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  6807. + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  6808. + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  6809. + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  6810. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  6811. + * OTHER DEALINGS IN THE SOFTWARE.
  6812. + */
  6813. +
  6814. +#include "sunxi-common-regulators.dtsi"
  6815. +
  6816. +/ {
  6817. + aliases {
  6818. + serial0 = &uart0;
  6819. + };
  6820. +
  6821. + chosen {
  6822. + stdout-path = "serial0:115200n8";
  6823. + };
  6824. +};
  6825. +
  6826. +&cpu0 {
  6827. + cpu-supply = <&reg_dcdc2>;
  6828. +};
  6829. +
  6830. +&ehci0 {
  6831. + status = "okay";
  6832. +};
  6833. +
  6834. +&ehci1 {
  6835. + status = "okay";
  6836. +};
  6837. +
  6838. +&i2c0 {
  6839. + pinctrl-names = "default";
  6840. + pinctrl-0 = <&i2c0_pins_a>;
  6841. + status = "okay";
  6842. +
  6843. + axp209: pmic@34 {
  6844. + reg = <0x34>;
  6845. + };
  6846. +};
  6847. +
  6848. +&i2c1 {
  6849. + pinctrl-names = "default";
  6850. + pinctrl-0 = <&i2c1_pins_a>;
  6851. + status = "okay";
  6852. +};
  6853. +
  6854. +&ohci0 {
  6855. + status = "okay";
  6856. +};
  6857. +
  6858. +&ohci1 {
  6859. + status = "okay";
  6860. +};
  6861. +
  6862. +#include "axp209.dtsi"
  6863. +
  6864. +&reg_dcdc2 {
  6865. + regulator-always-on;
  6866. + regulator-min-microvolt = <1000000>;
  6867. + regulator-max-microvolt = <1400000>;
  6868. + regulator-name = "vdd-cpu";
  6869. +};
  6870. +
  6871. +&reg_dcdc3 {
  6872. + regulator-always-on;
  6873. + regulator-min-microvolt = <1000000>;
  6874. + regulator-max-microvolt = <1400000>;
  6875. + regulator-name = "vdd-int-dll";
  6876. +};
  6877. +
  6878. +&reg_ldo1 {
  6879. + regulator-name = "vdd-rtc";
  6880. +};
  6881. +
  6882. +&reg_ldo2 {
  6883. + regulator-always-on;
  6884. + regulator-min-microvolt = <3000000>;
  6885. + regulator-max-microvolt = <3000000>;
  6886. + regulator-name = "avcc";
  6887. +};
  6888. +
  6889. +&reg_usb1_vbus {
  6890. + status = "okay";
  6891. +};
  6892. +
  6893. +&reg_usb2_vbus {
  6894. + status = "okay";
  6895. +};
  6896. +
  6897. +&uart0 {
  6898. + pinctrl-names = "default";
  6899. + pinctrl-0 = <&uart0_pins_a>;
  6900. + status = "okay";
  6901. +};
  6902. +
  6903. +&usbphy {
  6904. + usb1_vbus-supply = <&reg_usb1_vbus>;
  6905. + usb2_vbus-supply = <&reg_usb2_vbus>;
  6906. + status = "okay";
  6907. +};
  6908. --- a/arch/arm/dts/sunxi-q8-common.dtsi
  6909. +++ b/arch/arm/dts/sunxi-q8-common.dtsi
  6910. @@ -75,3 +75,9 @@
  6911. voltage = <400000>;
  6912. };
  6913. };
  6914. +
  6915. +&pwm {
  6916. + pinctrl-names = "default";
  6917. + pinctrl-0 = <&pwm0_pins>;
  6918. + status = "okay";
  6919. +};