booting-without-of.txt 130 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600
  1. Booting the Linux/ppc kernel without Open Firmware
  2. --------------------------------------------------
  3. (c) 2005 Benjamin Herrenschmidt <benh at kernel.crashing.org>,
  4. IBM Corp.
  5. (c) 2005 Becky Bruce <becky.bruce at freescale.com>,
  6. Freescale Semiconductor, FSL SOC and 32-bit additions
  7. (c) 2006 MontaVista Software, Inc.
  8. Flash chip node definition
  9. Table of Contents
  10. =================
  11. I - Introduction
  12. 1) Entry point for arch/powerpc
  13. 2) Board support
  14. II - The DT block format
  15. 1) Header
  16. 2) Device tree generalities
  17. 3) Device tree "structure" block
  18. 4) Device tree "strings" block
  19. III - Required content of the device tree
  20. 1) Note about cells and address representation
  21. 2) Note about "compatible" properties
  22. 3) Note about "name" properties
  23. 4) Note about node and property names and character set
  24. 5) Required nodes and properties
  25. a) The root node
  26. b) The /cpus node
  27. c) The /cpus/* nodes
  28. d) the /memory node(s)
  29. e) The /chosen node
  30. f) the /soc<SOCname> node
  31. IV - "dtc", the device tree compiler
  32. V - Recommendations for a bootloader
  33. VI - System-on-a-chip devices and nodes
  34. 1) Defining child nodes of an SOC
  35. 2) Representing devices without a current OF specification
  36. a) MDIO IO device
  37. b) Gianfar-compatible ethernet nodes
  38. c) PHY nodes
  39. d) Interrupt controllers
  40. e) I2C
  41. f) Freescale SOC USB controllers
  42. g) Freescale SOC SEC Security Engines
  43. h) Board Control and Status (BCSR)
  44. i) Freescale QUICC Engine module (QE)
  45. j) CFI or JEDEC memory-mapped NOR flash
  46. k) Global Utilities Block
  47. l) Freescale Communications Processor Module
  48. m) Chipselect/Local Bus
  49. n) 4xx/Axon EMAC ethernet nodes
  50. o) Xilinx IP cores
  51. p) Freescale Synchronous Serial Interface
  52. q) USB EHCI controllers
  53. VII - Marvell Discovery mv64[345]6x System Controller chips
  54. 1) The /system-controller node
  55. 2) Child nodes of /system-controller
  56. a) Marvell Discovery MDIO bus
  57. b) Marvell Discovery ethernet controller
  58. c) Marvell Discovery PHY nodes
  59. d) Marvell Discovery SDMA nodes
  60. e) Marvell Discovery BRG nodes
  61. f) Marvell Discovery CUNIT nodes
  62. g) Marvell Discovery MPSCROUTING nodes
  63. h) Marvell Discovery MPSCINTR nodes
  64. i) Marvell Discovery MPSC nodes
  65. j) Marvell Discovery Watch Dog Timer nodes
  66. k) Marvell Discovery I2C nodes
  67. l) Marvell Discovery PIC (Programmable Interrupt Controller) nodes
  68. m) Marvell Discovery MPP (Multipurpose Pins) multiplexing nodes
  69. n) Marvell Discovery GPP (General Purpose Pins) nodes
  70. o) Marvell Discovery PCI host bridge node
  71. p) Marvell Discovery CPU Error nodes
  72. q) Marvell Discovery SRAM Controller nodes
  73. r) Marvell Discovery PCI Error Handler nodes
  74. s) Marvell Discovery Memory Controller nodes
  75. VIII - Specifying interrupt information for devices
  76. 1) interrupts property
  77. 2) interrupt-parent property
  78. 3) OpenPIC Interrupt Controllers
  79. 4) ISA Interrupt Controllers
  80. VIII - Specifying GPIO information for devices
  81. 1) gpios property
  82. 2) gpio-controller nodes
  83. Appendix A - Sample SOC node for MPC8540
  84. Revision Information
  85. ====================
  86. May 18, 2005: Rev 0.1 - Initial draft, no chapter III yet.
  87. May 19, 2005: Rev 0.2 - Add chapter III and bits & pieces here or
  88. clarifies the fact that a lot of things are
  89. optional, the kernel only requires a very
  90. small device tree, though it is encouraged
  91. to provide an as complete one as possible.
  92. May 24, 2005: Rev 0.3 - Precise that DT block has to be in RAM
  93. - Misc fixes
  94. - Define version 3 and new format version 16
  95. for the DT block (version 16 needs kernel
  96. patches, will be fwd separately).
  97. String block now has a size, and full path
  98. is replaced by unit name for more
  99. compactness.
  100. linux,phandle is made optional, only nodes
  101. that are referenced by other nodes need it.
  102. "name" property is now automatically
  103. deduced from the unit name
  104. June 1, 2005: Rev 0.4 - Correct confusion between OF_DT_END and
  105. OF_DT_END_NODE in structure definition.
  106. - Change version 16 format to always align
  107. property data to 4 bytes. Since tokens are
  108. already aligned, that means no specific
  109. required alignment between property size
  110. and property data. The old style variable
  111. alignment would make it impossible to do
  112. "simple" insertion of properties using
  113. memmove (thanks Milton for
  114. noticing). Updated kernel patch as well
  115. - Correct a few more alignment constraints
  116. - Add a chapter about the device-tree
  117. compiler and the textural representation of
  118. the tree that can be "compiled" by dtc.
  119. November 21, 2005: Rev 0.5
  120. - Additions/generalizations for 32-bit
  121. - Changed to reflect the new arch/powerpc
  122. structure
  123. - Added chapter VI
  124. ToDo:
  125. - Add some definitions of interrupt tree (simple/complex)
  126. - Add some definitions for PCI host bridges
  127. - Add some common address format examples
  128. - Add definitions for standard properties and "compatible"
  129. names for cells that are not already defined by the existing
  130. OF spec.
  131. - Compare FSL SOC use of PCI to standard and make sure no new
  132. node definition required.
  133. - Add more information about node definitions for SOC devices
  134. that currently have no standard, like the FSL CPM.
  135. I - Introduction
  136. ================
  137. During the recent development of the Linux/ppc64 kernel, and more
  138. specifically, the addition of new platform types outside of the old
  139. IBM pSeries/iSeries pair, it was decided to enforce some strict rules
  140. regarding the kernel entry and bootloader <-> kernel interfaces, in
  141. order to avoid the degeneration that had become the ppc32 kernel entry
  142. point and the way a new platform should be added to the kernel. The
  143. legacy iSeries platform breaks those rules as it predates this scheme,
  144. but no new board support will be accepted in the main tree that
  145. doesn't follows them properly. In addition, since the advent of the
  146. arch/powerpc merged architecture for ppc32 and ppc64, new 32-bit
  147. platforms and 32-bit platforms which move into arch/powerpc will be
  148. required to use these rules as well.
  149. The main requirement that will be defined in more detail below is
  150. the presence of a device-tree whose format is defined after Open
  151. Firmware specification. However, in order to make life easier
  152. to embedded board vendors, the kernel doesn't require the device-tree
  153. to represent every device in the system and only requires some nodes
  154. and properties to be present. This will be described in detail in
  155. section III, but, for example, the kernel does not require you to
  156. create a node for every PCI device in the system. It is a requirement
  157. to have a node for PCI host bridges in order to provide interrupt
  158. routing informations and memory/IO ranges, among others. It is also
  159. recommended to define nodes for on chip devices and other busses that
  160. don't specifically fit in an existing OF specification. This creates a
  161. great flexibility in the way the kernel can then probe those and match
  162. drivers to device, without having to hard code all sorts of tables. It
  163. also makes it more flexible for board vendors to do minor hardware
  164. upgrades without significantly impacting the kernel code or cluttering
  165. it with special cases.
  166. 1) Entry point for arch/powerpc
  167. -------------------------------
  168. There is one and one single entry point to the kernel, at the start
  169. of the kernel image. That entry point supports two calling
  170. conventions:
  171. a) Boot from Open Firmware. If your firmware is compatible
  172. with Open Firmware (IEEE 1275) or provides an OF compatible
  173. client interface API (support for "interpret" callback of
  174. forth words isn't required), you can enter the kernel with:
  175. r5 : OF callback pointer as defined by IEEE 1275
  176. bindings to powerpc. Only the 32-bit client interface
  177. is currently supported
  178. r3, r4 : address & length of an initrd if any or 0
  179. The MMU is either on or off; the kernel will run the
  180. trampoline located in arch/powerpc/kernel/prom_init.c to
  181. extract the device-tree and other information from open
  182. firmware and build a flattened device-tree as described
  183. in b). prom_init() will then re-enter the kernel using
  184. the second method. This trampoline code runs in the
  185. context of the firmware, which is supposed to handle all
  186. exceptions during that time.
  187. b) Direct entry with a flattened device-tree block. This entry
  188. point is called by a) after the OF trampoline and can also be
  189. called directly by a bootloader that does not support the Open
  190. Firmware client interface. It is also used by "kexec" to
  191. implement "hot" booting of a new kernel from a previous
  192. running one. This method is what I will describe in more
  193. details in this document, as method a) is simply standard Open
  194. Firmware, and thus should be implemented according to the
  195. various standard documents defining it and its binding to the
  196. PowerPC platform. The entry point definition then becomes:
  197. r3 : physical pointer to the device-tree block
  198. (defined in chapter II) in RAM
  199. r4 : physical pointer to the kernel itself. This is
  200. used by the assembly code to properly disable the MMU
  201. in case you are entering the kernel with MMU enabled
  202. and a non-1:1 mapping.
  203. r5 : NULL (as to differentiate with method a)
  204. Note about SMP entry: Either your firmware puts your other
  205. CPUs in some sleep loop or spin loop in ROM where you can get
  206. them out via a soft reset or some other means, in which case
  207. you don't need to care, or you'll have to enter the kernel
  208. with all CPUs. The way to do that with method b) will be
  209. described in a later revision of this document.
  210. 2) Board support
  211. ----------------
  212. 64-bit kernels:
  213. Board supports (platforms) are not exclusive config options. An
  214. arbitrary set of board supports can be built in a single kernel
  215. image. The kernel will "know" what set of functions to use for a
  216. given platform based on the content of the device-tree. Thus, you
  217. should:
  218. a) add your platform support as a _boolean_ option in
  219. arch/powerpc/Kconfig, following the example of PPC_PSERIES,
  220. PPC_PMAC and PPC_MAPLE. The later is probably a good
  221. example of a board support to start from.
  222. b) create your main platform file as
  223. "arch/powerpc/platforms/myplatform/myboard_setup.c" and add it
  224. to the Makefile under the condition of your CONFIG_
  225. option. This file will define a structure of type "ppc_md"
  226. containing the various callbacks that the generic code will
  227. use to get to your platform specific code
  228. c) Add a reference to your "ppc_md" structure in the
  229. "machines" table in arch/powerpc/kernel/setup_64.c if you are
  230. a 64-bit platform.
  231. d) request and get assigned a platform number (see PLATFORM_*
  232. constants in include/asm-powerpc/processor.h
  233. 32-bit embedded kernels:
  234. Currently, board support is essentially an exclusive config option.
  235. The kernel is configured for a single platform. Part of the reason
  236. for this is to keep kernels on embedded systems small and efficient;
  237. part of this is due to the fact the code is already that way. In the
  238. future, a kernel may support multiple platforms, but only if the
  239. platforms feature the same core architecture. A single kernel build
  240. cannot support both configurations with Book E and configurations
  241. with classic Powerpc architectures.
  242. 32-bit embedded platforms that are moved into arch/powerpc using a
  243. flattened device tree should adopt the merged tree practice of
  244. setting ppc_md up dynamically, even though the kernel is currently
  245. built with support for only a single platform at a time. This allows
  246. unification of the setup code, and will make it easier to go to a
  247. multiple-platform-support model in the future.
  248. NOTE: I believe the above will be true once Ben's done with the merge
  249. of the boot sequences.... someone speak up if this is wrong!
  250. To add a 32-bit embedded platform support, follow the instructions
  251. for 64-bit platforms above, with the exception that the Kconfig
  252. option should be set up such that the kernel builds exclusively for
  253. the platform selected. The processor type for the platform should
  254. enable another config option to select the specific board
  255. supported.
  256. NOTE: If Ben doesn't merge the setup files, may need to change this to
  257. point to setup_32.c
  258. I will describe later the boot process and various callbacks that
  259. your platform should implement.
  260. II - The DT block format
  261. ========================
  262. This chapter defines the actual format of the flattened device-tree
  263. passed to the kernel. The actual content of it and kernel requirements
  264. are described later. You can find example of code manipulating that
  265. format in various places, including arch/powerpc/kernel/prom_init.c
  266. which will generate a flattened device-tree from the Open Firmware
  267. representation, or the fs2dt utility which is part of the kexec tools
  268. which will generate one from a filesystem representation. It is
  269. expected that a bootloader like uboot provides a bit more support,
  270. that will be discussed later as well.
  271. Note: The block has to be in main memory. It has to be accessible in
  272. both real mode and virtual mode with no mapping other than main
  273. memory. If you are writing a simple flash bootloader, it should copy
  274. the block to RAM before passing it to the kernel.
  275. 1) Header
  276. ---------
  277. The kernel is entered with r3 pointing to an area of memory that is
  278. roughly described in include/asm-powerpc/prom.h by the structure
  279. boot_param_header:
  280. struct boot_param_header {
  281. u32 magic; /* magic word OF_DT_HEADER */
  282. u32 totalsize; /* total size of DT block */
  283. u32 off_dt_struct; /* offset to structure */
  284. u32 off_dt_strings; /* offset to strings */
  285. u32 off_mem_rsvmap; /* offset to memory reserve map
  286. */
  287. u32 version; /* format version */
  288. u32 last_comp_version; /* last compatible version */
  289. /* version 2 fields below */
  290. u32 boot_cpuid_phys; /* Which physical CPU id we're
  291. booting on */
  292. /* version 3 fields below */
  293. u32 size_dt_strings; /* size of the strings block */
  294. /* version 17 fields below */
  295. u32 size_dt_struct; /* size of the DT structure block */
  296. };
  297. Along with the constants:
  298. /* Definitions used by the flattened device tree */
  299. #define OF_DT_HEADER 0xd00dfeed /* 4: version,
  300. 4: total size */
  301. #define OF_DT_BEGIN_NODE 0x1 /* Start node: full name
  302. */
  303. #define OF_DT_END_NODE 0x2 /* End node */
  304. #define OF_DT_PROP 0x3 /* Property: name off,
  305. size, content */
  306. #define OF_DT_END 0x9
  307. All values in this header are in big endian format, the various
  308. fields in this header are defined more precisely below. All
  309. "offset" values are in bytes from the start of the header; that is
  310. from the value of r3.
  311. - magic
  312. This is a magic value that "marks" the beginning of the
  313. device-tree block header. It contains the value 0xd00dfeed and is
  314. defined by the constant OF_DT_HEADER
  315. - totalsize
  316. This is the total size of the DT block including the header. The
  317. "DT" block should enclose all data structures defined in this
  318. chapter (who are pointed to by offsets in this header). That is,
  319. the device-tree structure, strings, and the memory reserve map.
  320. - off_dt_struct
  321. This is an offset from the beginning of the header to the start
  322. of the "structure" part the device tree. (see 2) device tree)
  323. - off_dt_strings
  324. This is an offset from the beginning of the header to the start
  325. of the "strings" part of the device-tree
  326. - off_mem_rsvmap
  327. This is an offset from the beginning of the header to the start
  328. of the reserved memory map. This map is a list of pairs of 64-
  329. bit integers. Each pair is a physical address and a size. The
  330. list is terminated by an entry of size 0. This map provides the
  331. kernel with a list of physical memory areas that are "reserved"
  332. and thus not to be used for memory allocations, especially during
  333. early initialization. The kernel needs to allocate memory during
  334. boot for things like un-flattening the device-tree, allocating an
  335. MMU hash table, etc... Those allocations must be done in such a
  336. way to avoid overriding critical things like, on Open Firmware
  337. capable machines, the RTAS instance, or on some pSeries, the TCE
  338. tables used for the iommu. Typically, the reserve map should
  339. contain _at least_ this DT block itself (header,total_size). If
  340. you are passing an initrd to the kernel, you should reserve it as
  341. well. You do not need to reserve the kernel image itself. The map
  342. should be 64-bit aligned.
  343. - version
  344. This is the version of this structure. Version 1 stops
  345. here. Version 2 adds an additional field boot_cpuid_phys.
  346. Version 3 adds the size of the strings block, allowing the kernel
  347. to reallocate it easily at boot and free up the unused flattened
  348. structure after expansion. Version 16 introduces a new more
  349. "compact" format for the tree itself that is however not backward
  350. compatible. Version 17 adds an additional field, size_dt_struct,
  351. allowing it to be reallocated or moved more easily (this is
  352. particularly useful for bootloaders which need to make
  353. adjustments to a device tree based on probed information). You
  354. should always generate a structure of the highest version defined
  355. at the time of your implementation. Currently that is version 17,
  356. unless you explicitly aim at being backward compatible.
  357. - last_comp_version
  358. Last compatible version. This indicates down to what version of
  359. the DT block you are backward compatible. For example, version 2
  360. is backward compatible with version 1 (that is, a kernel build
  361. for version 1 will be able to boot with a version 2 format). You
  362. should put a 1 in this field if you generate a device tree of
  363. version 1 to 3, or 16 if you generate a tree of version 16 or 17
  364. using the new unit name format.
  365. - boot_cpuid_phys
  366. This field only exist on version 2 headers. It indicate which
  367. physical CPU ID is calling the kernel entry point. This is used,
  368. among others, by kexec. If you are on an SMP system, this value
  369. should match the content of the "reg" property of the CPU node in
  370. the device-tree corresponding to the CPU calling the kernel entry
  371. point (see further chapters for more informations on the required
  372. device-tree contents)
  373. - size_dt_strings
  374. This field only exists on version 3 and later headers. It
  375. gives the size of the "strings" section of the device tree (which
  376. starts at the offset given by off_dt_strings).
  377. - size_dt_struct
  378. This field only exists on version 17 and later headers. It gives
  379. the size of the "structure" section of the device tree (which
  380. starts at the offset given by off_dt_struct).
  381. So the typical layout of a DT block (though the various parts don't
  382. need to be in that order) looks like this (addresses go from top to
  383. bottom):
  384. ------------------------------
  385. r3 -> | struct boot_param_header |
  386. ------------------------------
  387. | (alignment gap) (*) |
  388. ------------------------------
  389. | memory reserve map |
  390. ------------------------------
  391. | (alignment gap) |
  392. ------------------------------
  393. | |
  394. | device-tree structure |
  395. | |
  396. ------------------------------
  397. | (alignment gap) |
  398. ------------------------------
  399. | |
  400. | device-tree strings |
  401. | |
  402. -----> ------------------------------
  403. |
  404. |
  405. --- (r3 + totalsize)
  406. (*) The alignment gaps are not necessarily present; their presence
  407. and size are dependent on the various alignment requirements of
  408. the individual data blocks.
  409. 2) Device tree generalities
  410. ---------------------------
  411. This device-tree itself is separated in two different blocks, a
  412. structure block and a strings block. Both need to be aligned to a 4
  413. byte boundary.
  414. First, let's quickly describe the device-tree concept before detailing
  415. the storage format. This chapter does _not_ describe the detail of the
  416. required types of nodes & properties for the kernel, this is done
  417. later in chapter III.
  418. The device-tree layout is strongly inherited from the definition of
  419. the Open Firmware IEEE 1275 device-tree. It's basically a tree of
  420. nodes, each node having two or more named properties. A property can
  421. have a value or not.
  422. It is a tree, so each node has one and only one parent except for the
  423. root node who has no parent.
  424. A node has 2 names. The actual node name is generally contained in a
  425. property of type "name" in the node property list whose value is a
  426. zero terminated string and is mandatory for version 1 to 3 of the
  427. format definition (as it is in Open Firmware). Version 16 makes it
  428. optional as it can generate it from the unit name defined below.
  429. There is also a "unit name" that is used to differentiate nodes with
  430. the same name at the same level, it is usually made of the node
  431. names, the "@" sign, and a "unit address", which definition is
  432. specific to the bus type the node sits on.
  433. The unit name doesn't exist as a property per-se but is included in
  434. the device-tree structure. It is typically used to represent "path" in
  435. the device-tree. More details about the actual format of these will be
  436. below.
  437. The kernel powerpc generic code does not make any formal use of the
  438. unit address (though some board support code may do) so the only real
  439. requirement here for the unit address is to ensure uniqueness of
  440. the node unit name at a given level of the tree. Nodes with no notion
  441. of address and no possible sibling of the same name (like /memory or
  442. /cpus) may omit the unit address in the context of this specification,
  443. or use the "@0" default unit address. The unit name is used to define
  444. a node "full path", which is the concatenation of all parent node
  445. unit names separated with "/".
  446. The root node doesn't have a defined name, and isn't required to have
  447. a name property either if you are using version 3 or earlier of the
  448. format. It also has no unit address (no @ symbol followed by a unit
  449. address). The root node unit name is thus an empty string. The full
  450. path to the root node is "/".
  451. Every node which actually represents an actual device (that is, a node
  452. which isn't only a virtual "container" for more nodes, like "/cpus"
  453. is) is also required to have a "device_type" property indicating the
  454. type of node .
  455. Finally, every node that can be referenced from a property in another
  456. node is required to have a "linux,phandle" property. Real open
  457. firmware implementations provide a unique "phandle" value for every
  458. node that the "prom_init()" trampoline code turns into
  459. "linux,phandle" properties. However, this is made optional if the
  460. flattened device tree is used directly. An example of a node
  461. referencing another node via "phandle" is when laying out the
  462. interrupt tree which will be described in a further version of this
  463. document.
  464. This "linux, phandle" property is a 32-bit value that uniquely
  465. identifies a node. You are free to use whatever values or system of
  466. values, internal pointers, or whatever to generate these, the only
  467. requirement is that every node for which you provide that property has
  468. a unique value for it.
  469. Here is an example of a simple device-tree. In this example, an "o"
  470. designates a node followed by the node unit name. Properties are
  471. presented with their name followed by their content. "content"
  472. represents an ASCII string (zero terminated) value, while <content>
  473. represents a 32-bit hexadecimal value. The various nodes in this
  474. example will be discussed in a later chapter. At this point, it is
  475. only meant to give you a idea of what a device-tree looks like. I have
  476. purposefully kept the "name" and "linux,phandle" properties which
  477. aren't necessary in order to give you a better idea of what the tree
  478. looks like in practice.
  479. / o device-tree
  480. |- name = "device-tree"
  481. |- model = "MyBoardName"
  482. |- compatible = "MyBoardFamilyName"
  483. |- #address-cells = <2>
  484. |- #size-cells = <2>
  485. |- linux,phandle = <0>
  486. |
  487. o cpus
  488. | | - name = "cpus"
  489. | | - linux,phandle = <1>
  490. | | - #address-cells = <1>
  491. | | - #size-cells = <0>
  492. | |
  493. | o PowerPC,970@0
  494. | |- name = "PowerPC,970"
  495. | |- device_type = "cpu"
  496. | |- reg = <0>
  497. | |- clock-frequency = <5f5e1000>
  498. | |- 64-bit
  499. | |- linux,phandle = <2>
  500. |
  501. o memory@0
  502. | |- name = "memory"
  503. | |- device_type = "memory"
  504. | |- reg = <00000000 00000000 00000000 20000000>
  505. | |- linux,phandle = <3>
  506. |
  507. o chosen
  508. |- name = "chosen"
  509. |- bootargs = "root=/dev/sda2"
  510. |- linux,phandle = <4>
  511. This tree is almost a minimal tree. It pretty much contains the
  512. minimal set of required nodes and properties to boot a linux kernel;
  513. that is, some basic model informations at the root, the CPUs, and the
  514. physical memory layout. It also includes misc information passed
  515. through /chosen, like in this example, the platform type (mandatory)
  516. and the kernel command line arguments (optional).
  517. The /cpus/PowerPC,970@0/64-bit property is an example of a
  518. property without a value. All other properties have a value. The
  519. significance of the #address-cells and #size-cells properties will be
  520. explained in chapter IV which defines precisely the required nodes and
  521. properties and their content.
  522. 3) Device tree "structure" block
  523. The structure of the device tree is a linearized tree structure. The
  524. "OF_DT_BEGIN_NODE" token starts a new node, and the "OF_DT_END_NODE"
  525. ends that node definition. Child nodes are simply defined before
  526. "OF_DT_END_NODE" (that is nodes within the node). A 'token' is a 32
  527. bit value. The tree has to be "finished" with a OF_DT_END token
  528. Here's the basic structure of a single node:
  529. * token OF_DT_BEGIN_NODE (that is 0x00000001)
  530. * for version 1 to 3, this is the node full path as a zero
  531. terminated string, starting with "/". For version 16 and later,
  532. this is the node unit name only (or an empty string for the
  533. root node)
  534. * [align gap to next 4 bytes boundary]
  535. * for each property:
  536. * token OF_DT_PROP (that is 0x00000003)
  537. * 32-bit value of property value size in bytes (or 0 if no
  538. value)
  539. * 32-bit value of offset in string block of property name
  540. * property value data if any
  541. * [align gap to next 4 bytes boundary]
  542. * [child nodes if any]
  543. * token OF_DT_END_NODE (that is 0x00000002)
  544. So the node content can be summarized as a start token, a full path,
  545. a list of properties, a list of child nodes, and an end token. Every
  546. child node is a full node structure itself as defined above.
  547. NOTE: The above definition requires that all property definitions for
  548. a particular node MUST precede any subnode definitions for that node.
  549. Although the structure would not be ambiguous if properties and
  550. subnodes were intermingled, the kernel parser requires that the
  551. properties come first (up until at least 2.6.22). Any tools
  552. manipulating a flattened tree must take care to preserve this
  553. constraint.
  554. 4) Device tree "strings" block
  555. In order to save space, property names, which are generally redundant,
  556. are stored separately in the "strings" block. This block is simply the
  557. whole bunch of zero terminated strings for all property names
  558. concatenated together. The device-tree property definitions in the
  559. structure block will contain offset values from the beginning of the
  560. strings block.
  561. III - Required content of the device tree
  562. =========================================
  563. WARNING: All "linux,*" properties defined in this document apply only
  564. to a flattened device-tree. If your platform uses a real
  565. implementation of Open Firmware or an implementation compatible with
  566. the Open Firmware client interface, those properties will be created
  567. by the trampoline code in the kernel's prom_init() file. For example,
  568. that's where you'll have to add code to detect your board model and
  569. set the platform number. However, when using the flattened device-tree
  570. entry point, there is no prom_init() pass, and thus you have to
  571. provide those properties yourself.
  572. 1) Note about cells and address representation
  573. ----------------------------------------------
  574. The general rule is documented in the various Open Firmware
  575. documentations. If you choose to describe a bus with the device-tree
  576. and there exist an OF bus binding, then you should follow the
  577. specification. However, the kernel does not require every single
  578. device or bus to be described by the device tree.
  579. In general, the format of an address for a device is defined by the
  580. parent bus type, based on the #address-cells and #size-cells
  581. properties. Note that the parent's parent definitions of #address-cells
  582. and #size-cells are not inhereted so every node with children must specify
  583. them. The kernel requires the root node to have those properties defining
  584. addresses format for devices directly mapped on the processor bus.
  585. Those 2 properties define 'cells' for representing an address and a
  586. size. A "cell" is a 32-bit number. For example, if both contain 2
  587. like the example tree given above, then an address and a size are both
  588. composed of 2 cells, and each is a 64-bit number (cells are
  589. concatenated and expected to be in big endian format). Another example
  590. is the way Apple firmware defines them, with 2 cells for an address
  591. and one cell for a size. Most 32-bit implementations should define
  592. #address-cells and #size-cells to 1, which represents a 32-bit value.
  593. Some 32-bit processors allow for physical addresses greater than 32
  594. bits; these processors should define #address-cells as 2.
  595. "reg" properties are always a tuple of the type "address size" where
  596. the number of cells of address and size is specified by the bus
  597. #address-cells and #size-cells. When a bus supports various address
  598. spaces and other flags relative to a given address allocation (like
  599. prefetchable, etc...) those flags are usually added to the top level
  600. bits of the physical address. For example, a PCI physical address is
  601. made of 3 cells, the bottom two containing the actual address itself
  602. while the top cell contains address space indication, flags, and pci
  603. bus & device numbers.
  604. For busses that support dynamic allocation, it's the accepted practice
  605. to then not provide the address in "reg" (keep it 0) though while
  606. providing a flag indicating the address is dynamically allocated, and
  607. then, to provide a separate "assigned-addresses" property that
  608. contains the fully allocated addresses. See the PCI OF bindings for
  609. details.
  610. In general, a simple bus with no address space bits and no dynamic
  611. allocation is preferred if it reflects your hardware, as the existing
  612. kernel address parsing functions will work out of the box. If you
  613. define a bus type with a more complex address format, including things
  614. like address space bits, you'll have to add a bus translator to the
  615. prom_parse.c file of the recent kernels for your bus type.
  616. The "reg" property only defines addresses and sizes (if #size-cells is
  617. non-0) within a given bus. In order to translate addresses upward
  618. (that is into parent bus addresses, and possibly into CPU physical
  619. addresses), all busses must contain a "ranges" property. If the
  620. "ranges" property is missing at a given level, it's assumed that
  621. translation isn't possible, i.e., the registers are not visible on the
  622. parent bus. The format of the "ranges" property for a bus is a list
  623. of:
  624. bus address, parent bus address, size
  625. "bus address" is in the format of the bus this bus node is defining,
  626. that is, for a PCI bridge, it would be a PCI address. Thus, (bus
  627. address, size) defines a range of addresses for child devices. "parent
  628. bus address" is in the format of the parent bus of this bus. For
  629. example, for a PCI host controller, that would be a CPU address. For a
  630. PCI<->ISA bridge, that would be a PCI address. It defines the base
  631. address in the parent bus where the beginning of that range is mapped.
  632. For a new 64-bit powerpc board, I recommend either the 2/2 format or
  633. Apple's 2/1 format which is slightly more compact since sizes usually
  634. fit in a single 32-bit word. New 32-bit powerpc boards should use a
  635. 1/1 format, unless the processor supports physical addresses greater
  636. than 32-bits, in which case a 2/1 format is recommended.
  637. Alternatively, the "ranges" property may be empty, indicating that the
  638. registers are visible on the parent bus using an identity mapping
  639. translation. In other words, the parent bus address space is the same
  640. as the child bus address space.
  641. 2) Note about "compatible" properties
  642. -------------------------------------
  643. These properties are optional, but recommended in devices and the root
  644. node. The format of a "compatible" property is a list of concatenated
  645. zero terminated strings. They allow a device to express its
  646. compatibility with a family of similar devices, in some cases,
  647. allowing a single driver to match against several devices regardless
  648. of their actual names.
  649. 3) Note about "name" properties
  650. -------------------------------
  651. While earlier users of Open Firmware like OldWorld macintoshes tended
  652. to use the actual device name for the "name" property, it's nowadays
  653. considered a good practice to use a name that is closer to the device
  654. class (often equal to device_type). For example, nowadays, ethernet
  655. controllers are named "ethernet", an additional "model" property
  656. defining precisely the chip type/model, and "compatible" property
  657. defining the family in case a single driver can driver more than one
  658. of these chips. However, the kernel doesn't generally put any
  659. restriction on the "name" property; it is simply considered good
  660. practice to follow the standard and its evolutions as closely as
  661. possible.
  662. Note also that the new format version 16 makes the "name" property
  663. optional. If it's absent for a node, then the node's unit name is then
  664. used to reconstruct the name. That is, the part of the unit name
  665. before the "@" sign is used (or the entire unit name if no "@" sign
  666. is present).
  667. 4) Note about node and property names and character set
  668. -------------------------------------------------------
  669. While open firmware provides more flexible usage of 8859-1, this
  670. specification enforces more strict rules. Nodes and properties should
  671. be comprised only of ASCII characters 'a' to 'z', '0' to
  672. '9', ',', '.', '_', '+', '#', '?', and '-'. Node names additionally
  673. allow uppercase characters 'A' to 'Z' (property names should be
  674. lowercase. The fact that vendors like Apple don't respect this rule is
  675. irrelevant here). Additionally, node and property names should always
  676. begin with a character in the range 'a' to 'z' (or 'A' to 'Z' for node
  677. names).
  678. The maximum number of characters for both nodes and property names
  679. is 31. In the case of node names, this is only the leftmost part of
  680. a unit name (the pure "name" property), it doesn't include the unit
  681. address which can extend beyond that limit.
  682. 5) Required nodes and properties
  683. --------------------------------
  684. These are all that are currently required. However, it is strongly
  685. recommended that you expose PCI host bridges as documented in the
  686. PCI binding to open firmware, and your interrupt tree as documented
  687. in OF interrupt tree specification.
  688. a) The root node
  689. The root node requires some properties to be present:
  690. - model : this is your board name/model
  691. - #address-cells : address representation for "root" devices
  692. - #size-cells: the size representation for "root" devices
  693. - device_type : This property shouldn't be necessary. However, if
  694. you decide to create a device_type for your root node, make sure it
  695. is _not_ "chrp" unless your platform is a pSeries or PAPR compliant
  696. one for 64-bit, or a CHRP-type machine for 32-bit as this will
  697. matched by the kernel this way.
  698. Additionally, some recommended properties are:
  699. - compatible : the board "family" generally finds its way here,
  700. for example, if you have 2 board models with a similar layout,
  701. that typically get driven by the same platform code in the
  702. kernel, you would use a different "model" property but put a
  703. value in "compatible". The kernel doesn't directly use that
  704. value but it is generally useful.
  705. The root node is also generally where you add additional properties
  706. specific to your board like the serial number if any, that sort of
  707. thing. It is recommended that if you add any "custom" property whose
  708. name may clash with standard defined ones, you prefix them with your
  709. vendor name and a comma.
  710. b) The /cpus node
  711. This node is the parent of all individual CPU nodes. It doesn't
  712. have any specific requirements, though it's generally good practice
  713. to have at least:
  714. #address-cells = <00000001>
  715. #size-cells = <00000000>
  716. This defines that the "address" for a CPU is a single cell, and has
  717. no meaningful size. This is not necessary but the kernel will assume
  718. that format when reading the "reg" properties of a CPU node, see
  719. below
  720. c) The /cpus/* nodes
  721. So under /cpus, you are supposed to create a node for every CPU on
  722. the machine. There is no specific restriction on the name of the
  723. CPU, though It's common practice to call it PowerPC,<name>. For
  724. example, Apple uses PowerPC,G5 while IBM uses PowerPC,970FX.
  725. Required properties:
  726. - device_type : has to be "cpu"
  727. - reg : This is the physical CPU number, it's a single 32-bit cell
  728. and is also used as-is as the unit number for constructing the
  729. unit name in the full path. For example, with 2 CPUs, you would
  730. have the full path:
  731. /cpus/PowerPC,970FX@0
  732. /cpus/PowerPC,970FX@1
  733. (unit addresses do not require leading zeroes)
  734. - d-cache-block-size : one cell, L1 data cache block size in bytes (*)
  735. - i-cache-block-size : one cell, L1 instruction cache block size in
  736. bytes
  737. - d-cache-size : one cell, size of L1 data cache in bytes
  738. - i-cache-size : one cell, size of L1 instruction cache in bytes
  739. (*) The cache "block" size is the size on which the cache management
  740. instructions operate. Historically, this document used the cache
  741. "line" size here which is incorrect. The kernel will prefer the cache
  742. block size and will fallback to cache line size for backward
  743. compatibility.
  744. Recommended properties:
  745. - timebase-frequency : a cell indicating the frequency of the
  746. timebase in Hz. This is not directly used by the generic code,
  747. but you are welcome to copy/paste the pSeries code for setting
  748. the kernel timebase/decrementer calibration based on this
  749. value.
  750. - clock-frequency : a cell indicating the CPU core clock frequency
  751. in Hz. A new property will be defined for 64-bit values, but if
  752. your frequency is < 4Ghz, one cell is enough. Here as well as
  753. for the above, the common code doesn't use that property, but
  754. you are welcome to re-use the pSeries or Maple one. A future
  755. kernel version might provide a common function for this.
  756. - d-cache-line-size : one cell, L1 data cache line size in bytes
  757. if different from the block size
  758. - i-cache-line-size : one cell, L1 instruction cache line size in
  759. bytes if different from the block size
  760. You are welcome to add any property you find relevant to your board,
  761. like some information about the mechanism used to soft-reset the
  762. CPUs. For example, Apple puts the GPIO number for CPU soft reset
  763. lines in there as a "soft-reset" property since they start secondary
  764. CPUs by soft-resetting them.
  765. d) the /memory node(s)
  766. To define the physical memory layout of your board, you should
  767. create one or more memory node(s). You can either create a single
  768. node with all memory ranges in its reg property, or you can create
  769. several nodes, as you wish. The unit address (@ part) used for the
  770. full path is the address of the first range of memory defined by a
  771. given node. If you use a single memory node, this will typically be
  772. @0.
  773. Required properties:
  774. - device_type : has to be "memory"
  775. - reg : This property contains all the physical memory ranges of
  776. your board. It's a list of addresses/sizes concatenated
  777. together, with the number of cells of each defined by the
  778. #address-cells and #size-cells of the root node. For example,
  779. with both of these properties being 2 like in the example given
  780. earlier, a 970 based machine with 6Gb of RAM could typically
  781. have a "reg" property here that looks like:
  782. 00000000 00000000 00000000 80000000
  783. 00000001 00000000 00000001 00000000
  784. That is a range starting at 0 of 0x80000000 bytes and a range
  785. starting at 0x100000000 and of 0x100000000 bytes. You can see
  786. that there is no memory covering the IO hole between 2Gb and
  787. 4Gb. Some vendors prefer splitting those ranges into smaller
  788. segments, but the kernel doesn't care.
  789. e) The /chosen node
  790. This node is a bit "special". Normally, that's where open firmware
  791. puts some variable environment information, like the arguments, or
  792. the default input/output devices.
  793. This specification makes a few of these mandatory, but also defines
  794. some linux-specific properties that would be normally constructed by
  795. the prom_init() trampoline when booting with an OF client interface,
  796. but that you have to provide yourself when using the flattened format.
  797. Recommended properties:
  798. - bootargs : This zero-terminated string is passed as the kernel
  799. command line
  800. - linux,stdout-path : This is the full path to your standard
  801. console device if any. Typically, if you have serial devices on
  802. your board, you may want to put the full path to the one set as
  803. the default console in the firmware here, for the kernel to pick
  804. it up as its own default console. If you look at the function
  805. set_preferred_console() in arch/ppc64/kernel/setup.c, you'll see
  806. that the kernel tries to find out the default console and has
  807. knowledge of various types like 8250 serial ports. You may want
  808. to extend this function to add your own.
  809. Note that u-boot creates and fills in the chosen node for platforms
  810. that use it.
  811. (Note: a practice that is now obsolete was to include a property
  812. under /chosen called interrupt-controller which had a phandle value
  813. that pointed to the main interrupt controller)
  814. f) the /soc<SOCname> node
  815. This node is used to represent a system-on-a-chip (SOC) and must be
  816. present if the processor is a SOC. The top-level soc node contains
  817. information that is global to all devices on the SOC. The node name
  818. should contain a unit address for the SOC, which is the base address
  819. of the memory-mapped register set for the SOC. The name of an soc
  820. node should start with "soc", and the remainder of the name should
  821. represent the part number for the soc. For example, the MPC8540's
  822. soc node would be called "soc8540".
  823. Required properties:
  824. - device_type : Should be "soc"
  825. - ranges : Should be defined as specified in 1) to describe the
  826. translation of SOC addresses for memory mapped SOC registers.
  827. - bus-frequency: Contains the bus frequency for the SOC node.
  828. Typically, the value of this field is filled in by the boot
  829. loader.
  830. Recommended properties:
  831. - reg : This property defines the address and size of the
  832. memory-mapped registers that are used for the SOC node itself.
  833. It does not include the child device registers - these will be
  834. defined inside each child node. The address specified in the
  835. "reg" property should match the unit address of the SOC node.
  836. - #address-cells : Address representation for "soc" devices. The
  837. format of this field may vary depending on whether or not the
  838. device registers are memory mapped. For memory mapped
  839. registers, this field represents the number of cells needed to
  840. represent the address of the registers. For SOCs that do not
  841. use MMIO, a special address format should be defined that
  842. contains enough cells to represent the required information.
  843. See 1) above for more details on defining #address-cells.
  844. - #size-cells : Size representation for "soc" devices
  845. - #interrupt-cells : Defines the width of cells used to represent
  846. interrupts. Typically this value is <2>, which includes a
  847. 32-bit number that represents the interrupt number, and a
  848. 32-bit number that represents the interrupt sense and level.
  849. This field is only needed if the SOC contains an interrupt
  850. controller.
  851. The SOC node may contain child nodes for each SOC device that the
  852. platform uses. Nodes should not be created for devices which exist
  853. on the SOC but are not used by a particular platform. See chapter VI
  854. for more information on how to specify devices that are part of a SOC.
  855. Example SOC node for the MPC8540:
  856. soc8540@e0000000 {
  857. #address-cells = <1>;
  858. #size-cells = <1>;
  859. #interrupt-cells = <2>;
  860. device_type = "soc";
  861. ranges = <00000000 e0000000 00100000>
  862. reg = <e0000000 00003000>;
  863. bus-frequency = <0>;
  864. }
  865. IV - "dtc", the device tree compiler
  866. ====================================
  867. dtc source code can be found at
  868. <http://ozlabs.org/~dgibson/dtc/dtc.tar.gz>
  869. WARNING: This version is still in early development stage; the
  870. resulting device-tree "blobs" have not yet been validated with the
  871. kernel. The current generated bloc lacks a useful reserve map (it will
  872. be fixed to generate an empty one, it's up to the bootloader to fill
  873. it up) among others. The error handling needs work, bugs are lurking,
  874. etc...
  875. dtc basically takes a device-tree in a given format and outputs a
  876. device-tree in another format. The currently supported formats are:
  877. Input formats:
  878. -------------
  879. - "dtb": "blob" format, that is a flattened device-tree block
  880. with
  881. header all in a binary blob.
  882. - "dts": "source" format. This is a text file containing a
  883. "source" for a device-tree. The format is defined later in this
  884. chapter.
  885. - "fs" format. This is a representation equivalent to the
  886. output of /proc/device-tree, that is nodes are directories and
  887. properties are files
  888. Output formats:
  889. ---------------
  890. - "dtb": "blob" format
  891. - "dts": "source" format
  892. - "asm": assembly language file. This is a file that can be
  893. sourced by gas to generate a device-tree "blob". That file can
  894. then simply be added to your Makefile. Additionally, the
  895. assembly file exports some symbols that can be used.
  896. The syntax of the dtc tool is
  897. dtc [-I <input-format>] [-O <output-format>]
  898. [-o output-filename] [-V output_version] input_filename
  899. The "output_version" defines what version of the "blob" format will be
  900. generated. Supported versions are 1,2,3 and 16. The default is
  901. currently version 3 but that may change in the future to version 16.
  902. Additionally, dtc performs various sanity checks on the tree, like the
  903. uniqueness of linux, phandle properties, validity of strings, etc...
  904. The format of the .dts "source" file is "C" like, supports C and C++
  905. style comments.
  906. / {
  907. }
  908. The above is the "device-tree" definition. It's the only statement
  909. supported currently at the toplevel.
  910. / {
  911. property1 = "string_value"; /* define a property containing a 0
  912. * terminated string
  913. */
  914. property2 = <1234abcd>; /* define a property containing a
  915. * numerical 32-bit value (hexadecimal)
  916. */
  917. property3 = <12345678 12345678 deadbeef>;
  918. /* define a property containing 3
  919. * numerical 32-bit values (cells) in
  920. * hexadecimal
  921. */
  922. property4 = [0a 0b 0c 0d de ea ad be ef];
  923. /* define a property whose content is
  924. * an arbitrary array of bytes
  925. */
  926. childnode@addresss { /* define a child node named "childnode"
  927. * whose unit name is "childnode at
  928. * address"
  929. */
  930. childprop = "hello\n"; /* define a property "childprop" of
  931. * childnode (in this case, a string)
  932. */
  933. };
  934. };
  935. Nodes can contain other nodes etc... thus defining the hierarchical
  936. structure of the tree.
  937. Strings support common escape sequences from C: "\n", "\t", "\r",
  938. "\(octal value)", "\x(hex value)".
  939. It is also suggested that you pipe your source file through cpp (gcc
  940. preprocessor) so you can use #include's, #define for constants, etc...
  941. Finally, various options are planned but not yet implemented, like
  942. automatic generation of phandles, labels (exported to the asm file so
  943. you can point to a property content and change it easily from whatever
  944. you link the device-tree with), label or path instead of numeric value
  945. in some cells to "point" to a node (replaced by a phandle at compile
  946. time), export of reserve map address to the asm file, ability to
  947. specify reserve map content at compile time, etc...
  948. We may provide a .h include file with common definitions of that
  949. proves useful for some properties (like building PCI properties or
  950. interrupt maps) though it may be better to add a notion of struct
  951. definitions to the compiler...
  952. V - Recommendations for a bootloader
  953. ====================================
  954. Here are some various ideas/recommendations that have been proposed
  955. while all this has been defined and implemented.
  956. - The bootloader may want to be able to use the device-tree itself
  957. and may want to manipulate it (to add/edit some properties,
  958. like physical memory size or kernel arguments). At this point, 2
  959. choices can be made. Either the bootloader works directly on the
  960. flattened format, or the bootloader has its own internal tree
  961. representation with pointers (similar to the kernel one) and
  962. re-flattens the tree when booting the kernel. The former is a bit
  963. more difficult to edit/modify, the later requires probably a bit
  964. more code to handle the tree structure. Note that the structure
  965. format has been designed so it's relatively easy to "insert"
  966. properties or nodes or delete them by just memmoving things
  967. around. It contains no internal offsets or pointers for this
  968. purpose.
  969. - An example of code for iterating nodes & retrieving properties
  970. directly from the flattened tree format can be found in the kernel
  971. file arch/ppc64/kernel/prom.c, look at scan_flat_dt() function,
  972. its usage in early_init_devtree(), and the corresponding various
  973. early_init_dt_scan_*() callbacks. That code can be re-used in a
  974. GPL bootloader, and as the author of that code, I would be happy
  975. to discuss possible free licensing to any vendor who wishes to
  976. integrate all or part of this code into a non-GPL bootloader.
  977. VI - System-on-a-chip devices and nodes
  978. =======================================
  979. Many companies are now starting to develop system-on-a-chip
  980. processors, where the processor core (CPU) and many peripheral devices
  981. exist on a single piece of silicon. For these SOCs, an SOC node
  982. should be used that defines child nodes for the devices that make
  983. up the SOC. While platforms are not required to use this model in
  984. order to boot the kernel, it is highly encouraged that all SOC
  985. implementations define as complete a flat-device-tree as possible to
  986. describe the devices on the SOC. This will allow for the
  987. genericization of much of the kernel code.
  988. 1) Defining child nodes of an SOC
  989. ---------------------------------
  990. Each device that is part of an SOC may have its own node entry inside
  991. the SOC node. For each device that is included in the SOC, the unit
  992. address property represents the address offset for this device's
  993. memory-mapped registers in the parent's address space. The parent's
  994. address space is defined by the "ranges" property in the top-level soc
  995. node. The "reg" property for each node that exists directly under the
  996. SOC node should contain the address mapping from the child address space
  997. to the parent SOC address space and the size of the device's
  998. memory-mapped register file.
  999. For many devices that may exist inside an SOC, there are predefined
  1000. specifications for the format of the device tree node. All SOC child
  1001. nodes should follow these specifications, except where noted in this
  1002. document.
  1003. See appendix A for an example partial SOC node definition for the
  1004. MPC8540.
  1005. 2) Representing devices without a current OF specification
  1006. ----------------------------------------------------------
  1007. Currently, there are many devices on SOCs that do not have a standard
  1008. representation pre-defined as part of the open firmware
  1009. specifications, mainly because the boards that contain these SOCs are
  1010. not currently booted using open firmware. This section contains
  1011. descriptions for the SOC devices for which new nodes have been
  1012. defined; this list will expand as more and more SOC-containing
  1013. platforms are moved over to use the flattened-device-tree model.
  1014. a) MDIO IO device
  1015. The MDIO is a bus to which the PHY devices are connected. For each
  1016. device that exists on this bus, a child node should be created. See
  1017. the definition of the PHY node below for an example of how to define
  1018. a PHY.
  1019. Required properties:
  1020. - reg : Offset and length of the register set for the device
  1021. - compatible : Should define the compatible device type for the
  1022. mdio. Currently, this is most likely to be "fsl,gianfar-mdio"
  1023. Example:
  1024. mdio@24520 {
  1025. reg = <24520 20>;
  1026. compatible = "fsl,gianfar-mdio";
  1027. ethernet-phy@0 {
  1028. ......
  1029. };
  1030. };
  1031. b) Gianfar-compatible ethernet nodes
  1032. Required properties:
  1033. - device_type : Should be "network"
  1034. - model : Model of the device. Can be "TSEC", "eTSEC", or "FEC"
  1035. - compatible : Should be "gianfar"
  1036. - reg : Offset and length of the register set for the device
  1037. - mac-address : List of bytes representing the ethernet address of
  1038. this controller
  1039. - interrupts : <a b> where a is the interrupt number and b is a
  1040. field that represents an encoding of the sense and level
  1041. information for the interrupt. This should be encoded based on
  1042. the information in section 2) depending on the type of interrupt
  1043. controller you have.
  1044. - interrupt-parent : the phandle for the interrupt controller that
  1045. services interrupts for this device.
  1046. - phy-handle : The phandle for the PHY connected to this ethernet
  1047. controller.
  1048. - fixed-link : <a b c d e> where a is emulated phy id - choose any,
  1049. but unique to the all specified fixed-links, b is duplex - 0 half,
  1050. 1 full, c is link speed - d#10/d#100/d#1000, d is pause - 0 no
  1051. pause, 1 pause, e is asym_pause - 0 no asym_pause, 1 asym_pause.
  1052. Recommended properties:
  1053. - phy-connection-type : a string naming the controller/PHY interface type,
  1054. i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "sgmii",
  1055. "tbi", or "rtbi". This property is only really needed if the connection
  1056. is of type "rgmii-id", as all other connection types are detected by
  1057. hardware.
  1058. Example:
  1059. ethernet@24000 {
  1060. #size-cells = <0>;
  1061. device_type = "network";
  1062. model = "TSEC";
  1063. compatible = "gianfar";
  1064. reg = <24000 1000>;
  1065. mac-address = [ 00 E0 0C 00 73 00 ];
  1066. interrupts = <d 3 e 3 12 3>;
  1067. interrupt-parent = <40000>;
  1068. phy-handle = <2452000>
  1069. };
  1070. c) PHY nodes
  1071. Required properties:
  1072. - device_type : Should be "ethernet-phy"
  1073. - interrupts : <a b> where a is the interrupt number and b is a
  1074. field that represents an encoding of the sense and level
  1075. information for the interrupt. This should be encoded based on
  1076. the information in section 2) depending on the type of interrupt
  1077. controller you have.
  1078. - interrupt-parent : the phandle for the interrupt controller that
  1079. services interrupts for this device.
  1080. - reg : The ID number for the phy, usually a small integer
  1081. - linux,phandle : phandle for this node; likely referenced by an
  1082. ethernet controller node.
  1083. Example:
  1084. ethernet-phy@0 {
  1085. linux,phandle = <2452000>
  1086. interrupt-parent = <40000>;
  1087. interrupts = <35 1>;
  1088. reg = <0>;
  1089. device_type = "ethernet-phy";
  1090. };
  1091. d) Interrupt controllers
  1092. Some SOC devices contain interrupt controllers that are different
  1093. from the standard Open PIC specification. The SOC device nodes for
  1094. these types of controllers should be specified just like a standard
  1095. OpenPIC controller. Sense and level information should be encoded
  1096. as specified in section 2) of this chapter for each device that
  1097. specifies an interrupt.
  1098. Example :
  1099. pic@40000 {
  1100. linux,phandle = <40000>;
  1101. clock-frequency = <0>;
  1102. interrupt-controller;
  1103. #address-cells = <0>;
  1104. reg = <40000 40000>;
  1105. built-in;
  1106. compatible = "chrp,open-pic";
  1107. device_type = "open-pic";
  1108. big-endian;
  1109. };
  1110. e) I2C
  1111. Required properties :
  1112. - device_type : Should be "i2c"
  1113. - reg : Offset and length of the register set for the device
  1114. Recommended properties :
  1115. - compatible : Should be "fsl-i2c" for parts compatible with
  1116. Freescale I2C specifications.
  1117. - interrupts : <a b> where a is the interrupt number and b is a
  1118. field that represents an encoding of the sense and level
  1119. information for the interrupt. This should be encoded based on
  1120. the information in section 2) depending on the type of interrupt
  1121. controller you have.
  1122. - interrupt-parent : the phandle for the interrupt controller that
  1123. services interrupts for this device.
  1124. - dfsrr : boolean; if defined, indicates that this I2C device has
  1125. a digital filter sampling rate register
  1126. - fsl5200-clocking : boolean; if defined, indicated that this device
  1127. uses the FSL 5200 clocking mechanism.
  1128. Example :
  1129. i2c@3000 {
  1130. interrupt-parent = <40000>;
  1131. interrupts = <1b 3>;
  1132. reg = <3000 18>;
  1133. device_type = "i2c";
  1134. compatible = "fsl-i2c";
  1135. dfsrr;
  1136. };
  1137. f) Freescale SOC USB controllers
  1138. The device node for a USB controller that is part of a Freescale
  1139. SOC is as described in the document "Open Firmware Recommended
  1140. Practice : Universal Serial Bus" with the following modifications
  1141. and additions :
  1142. Required properties :
  1143. - compatible : Should be "fsl-usb2-mph" for multi port host USB
  1144. controllers, or "fsl-usb2-dr" for dual role USB controllers
  1145. - phy_type : For multi port host USB controllers, should be one of
  1146. "ulpi", or "serial". For dual role USB controllers, should be
  1147. one of "ulpi", "utmi", "utmi_wide", or "serial".
  1148. - reg : Offset and length of the register set for the device
  1149. - port0 : boolean; if defined, indicates port0 is connected for
  1150. fsl-usb2-mph compatible controllers. Either this property or
  1151. "port1" (or both) must be defined for "fsl-usb2-mph" compatible
  1152. controllers.
  1153. - port1 : boolean; if defined, indicates port1 is connected for
  1154. fsl-usb2-mph compatible controllers. Either this property or
  1155. "port0" (or both) must be defined for "fsl-usb2-mph" compatible
  1156. controllers.
  1157. - dr_mode : indicates the working mode for "fsl-usb2-dr" compatible
  1158. controllers. Can be "host", "peripheral", or "otg". Default to
  1159. "host" if not defined for backward compatibility.
  1160. Recommended properties :
  1161. - interrupts : <a b> where a is the interrupt number and b is a
  1162. field that represents an encoding of the sense and level
  1163. information for the interrupt. This should be encoded based on
  1164. the information in section 2) depending on the type of interrupt
  1165. controller you have.
  1166. - interrupt-parent : the phandle for the interrupt controller that
  1167. services interrupts for this device.
  1168. Example multi port host USB controller device node :
  1169. usb@22000 {
  1170. compatible = "fsl-usb2-mph";
  1171. reg = <22000 1000>;
  1172. #address-cells = <1>;
  1173. #size-cells = <0>;
  1174. interrupt-parent = <700>;
  1175. interrupts = <27 1>;
  1176. phy_type = "ulpi";
  1177. port0;
  1178. port1;
  1179. };
  1180. Example dual role USB controller device node :
  1181. usb@23000 {
  1182. compatible = "fsl-usb2-dr";
  1183. reg = <23000 1000>;
  1184. #address-cells = <1>;
  1185. #size-cells = <0>;
  1186. interrupt-parent = <700>;
  1187. interrupts = <26 1>;
  1188. dr_mode = "otg";
  1189. phy = "ulpi";
  1190. };
  1191. g) Freescale SOC SEC Security Engines
  1192. Required properties:
  1193. - device_type : Should be "crypto"
  1194. - model : Model of the device. Should be "SEC1" or "SEC2"
  1195. - compatible : Should be "talitos"
  1196. - reg : Offset and length of the register set for the device
  1197. - interrupts : <a b> where a is the interrupt number and b is a
  1198. field that represents an encoding of the sense and level
  1199. information for the interrupt. This should be encoded based on
  1200. the information in section 2) depending on the type of interrupt
  1201. controller you have.
  1202. - interrupt-parent : the phandle for the interrupt controller that
  1203. services interrupts for this device.
  1204. - num-channels : An integer representing the number of channels
  1205. available.
  1206. - channel-fifo-len : An integer representing the number of
  1207. descriptor pointers each channel fetch fifo can hold.
  1208. - exec-units-mask : The bitmask representing what execution units
  1209. (EUs) are available. It's a single 32-bit cell. EU information
  1210. should be encoded following the SEC's Descriptor Header Dword
  1211. EU_SEL0 field documentation, i.e. as follows:
  1212. bit 0 = reserved - should be 0
  1213. bit 1 = set if SEC has the ARC4 EU (AFEU)
  1214. bit 2 = set if SEC has the DES/3DES EU (DEU)
  1215. bit 3 = set if SEC has the message digest EU (MDEU)
  1216. bit 4 = set if SEC has the random number generator EU (RNG)
  1217. bit 5 = set if SEC has the public key EU (PKEU)
  1218. bit 6 = set if SEC has the AES EU (AESU)
  1219. bit 7 = set if SEC has the Kasumi EU (KEU)
  1220. bits 8 through 31 are reserved for future SEC EUs.
  1221. - descriptor-types-mask : The bitmask representing what descriptors
  1222. are available. It's a single 32-bit cell. Descriptor type
  1223. information should be encoded following the SEC's Descriptor
  1224. Header Dword DESC_TYPE field documentation, i.e. as follows:
  1225. bit 0 = set if SEC supports the aesu_ctr_nonsnoop desc. type
  1226. bit 1 = set if SEC supports the ipsec_esp descriptor type
  1227. bit 2 = set if SEC supports the common_nonsnoop desc. type
  1228. bit 3 = set if SEC supports the 802.11i AES ccmp desc. type
  1229. bit 4 = set if SEC supports the hmac_snoop_no_afeu desc. type
  1230. bit 5 = set if SEC supports the srtp descriptor type
  1231. bit 6 = set if SEC supports the non_hmac_snoop_no_afeu desc.type
  1232. bit 7 = set if SEC supports the pkeu_assemble descriptor type
  1233. bit 8 = set if SEC supports the aesu_key_expand_output desc.type
  1234. bit 9 = set if SEC supports the pkeu_ptmul descriptor type
  1235. bit 10 = set if SEC supports the common_nonsnoop_afeu desc. type
  1236. bit 11 = set if SEC supports the pkeu_ptadd_dbl descriptor type
  1237. ..and so on and so forth.
  1238. Example:
  1239. /* MPC8548E */
  1240. crypto@30000 {
  1241. device_type = "crypto";
  1242. model = "SEC2";
  1243. compatible = "talitos";
  1244. reg = <30000 10000>;
  1245. interrupts = <1d 3>;
  1246. interrupt-parent = <40000>;
  1247. num-channels = <4>;
  1248. channel-fifo-len = <18>;
  1249. exec-units-mask = <000000fe>;
  1250. descriptor-types-mask = <012b0ebf>;
  1251. };
  1252. h) Board Control and Status (BCSR)
  1253. Required properties:
  1254. - device_type : Should be "board-control"
  1255. - reg : Offset and length of the register set for the device
  1256. Example:
  1257. bcsr@f8000000 {
  1258. device_type = "board-control";
  1259. reg = <f8000000 8000>;
  1260. };
  1261. i) Freescale QUICC Engine module (QE)
  1262. This represents qe module that is installed on PowerQUICC II Pro.
  1263. NOTE: This is an interim binding; it should be updated to fit
  1264. in with the CPM binding later in this document.
  1265. Basically, it is a bus of devices, that could act more or less
  1266. as a complete entity (UCC, USB etc ). All of them should be siblings on
  1267. the "root" qe node, using the common properties from there.
  1268. The description below applies to the qe of MPC8360 and
  1269. more nodes and properties would be extended in the future.
  1270. i) Root QE device
  1271. Required properties:
  1272. - compatible : should be "fsl,qe";
  1273. - model : precise model of the QE, Can be "QE", "CPM", or "CPM2"
  1274. - reg : offset and length of the device registers.
  1275. - bus-frequency : the clock frequency for QUICC Engine.
  1276. Recommended properties
  1277. - brg-frequency : the internal clock source frequency for baud-rate
  1278. generators in Hz.
  1279. Example:
  1280. qe@e0100000 {
  1281. #address-cells = <1>;
  1282. #size-cells = <1>;
  1283. #interrupt-cells = <2>;
  1284. compatible = "fsl,qe";
  1285. ranges = <0 e0100000 00100000>;
  1286. reg = <e0100000 480>;
  1287. brg-frequency = <0>;
  1288. bus-frequency = <179A7B00>;
  1289. }
  1290. ii) SPI (Serial Peripheral Interface)
  1291. Required properties:
  1292. - cell-index : SPI controller index.
  1293. - compatible : should be "fsl,spi".
  1294. - mode : the SPI operation mode, it can be "cpu" or "cpu-qe".
  1295. - reg : Offset and length of the register set for the device
  1296. - interrupts : <a b> where a is the interrupt number and b is a
  1297. field that represents an encoding of the sense and level
  1298. information for the interrupt. This should be encoded based on
  1299. the information in section 2) depending on the type of interrupt
  1300. controller you have.
  1301. - interrupt-parent : the phandle for the interrupt controller that
  1302. services interrupts for this device.
  1303. Example:
  1304. spi@4c0 {
  1305. cell-index = <0>;
  1306. compatible = "fsl,spi";
  1307. reg = <4c0 40>;
  1308. interrupts = <82 0>;
  1309. interrupt-parent = <700>;
  1310. mode = "cpu";
  1311. };
  1312. iii) USB (Universal Serial Bus Controller)
  1313. Required properties:
  1314. - compatible : could be "qe_udc" or "fhci-hcd".
  1315. - mode : the could be "host" or "slave".
  1316. - reg : Offset and length of the register set for the device
  1317. - interrupts : <a b> where a is the interrupt number and b is a
  1318. field that represents an encoding of the sense and level
  1319. information for the interrupt. This should be encoded based on
  1320. the information in section 2) depending on the type of interrupt
  1321. controller you have.
  1322. - interrupt-parent : the phandle for the interrupt controller that
  1323. services interrupts for this device.
  1324. Example(slave):
  1325. usb@6c0 {
  1326. compatible = "qe_udc";
  1327. reg = <6c0 40>;
  1328. interrupts = <8b 0>;
  1329. interrupt-parent = <700>;
  1330. mode = "slave";
  1331. };
  1332. iv) UCC (Unified Communications Controllers)
  1333. Required properties:
  1334. - device_type : should be "network", "hldc", "uart", "transparent"
  1335. "bisync", "atm", or "serial".
  1336. - compatible : could be "ucc_geth" or "fsl_atm" and so on.
  1337. - cell-index : the ucc number(1-8), corresponding to UCCx in UM.
  1338. - reg : Offset and length of the register set for the device
  1339. - interrupts : <a b> where a is the interrupt number and b is a
  1340. field that represents an encoding of the sense and level
  1341. information for the interrupt. This should be encoded based on
  1342. the information in section 2) depending on the type of interrupt
  1343. controller you have.
  1344. - interrupt-parent : the phandle for the interrupt controller that
  1345. services interrupts for this device.
  1346. - pio-handle : The phandle for the Parallel I/O port configuration.
  1347. - port-number : for UART drivers, the port number to use, between 0 and 3.
  1348. This usually corresponds to the /dev/ttyQE device, e.g. <0> = /dev/ttyQE0.
  1349. The port number is added to the minor number of the device. Unlike the
  1350. CPM UART driver, the port-number is required for the QE UART driver.
  1351. - soft-uart : for UART drivers, if specified this means the QE UART device
  1352. driver should use "Soft-UART" mode, which is needed on some SOCs that have
  1353. broken UART hardware. Soft-UART is provided via a microcode upload.
  1354. - rx-clock-name: the UCC receive clock source
  1355. "none": clock source is disabled
  1356. "brg1" through "brg16": clock source is BRG1-BRG16, respectively
  1357. "clk1" through "clk24": clock source is CLK1-CLK24, respectively
  1358. - tx-clock-name: the UCC transmit clock source
  1359. "none": clock source is disabled
  1360. "brg1" through "brg16": clock source is BRG1-BRG16, respectively
  1361. "clk1" through "clk24": clock source is CLK1-CLK24, respectively
  1362. The following two properties are deprecated. rx-clock has been replaced
  1363. with rx-clock-name, and tx-clock has been replaced with tx-clock-name.
  1364. Drivers that currently use the deprecated properties should continue to
  1365. do so, in order to support older device trees, but they should be updated
  1366. to check for the new properties first.
  1367. - rx-clock : represents the UCC receive clock source.
  1368. 0x00 : clock source is disabled;
  1369. 0x1~0x10 : clock source is BRG1~BRG16 respectively;
  1370. 0x11~0x28: clock source is QE_CLK1~QE_CLK24 respectively.
  1371. - tx-clock: represents the UCC transmit clock source;
  1372. 0x00 : clock source is disabled;
  1373. 0x1~0x10 : clock source is BRG1~BRG16 respectively;
  1374. 0x11~0x28: clock source is QE_CLK1~QE_CLK24 respectively.
  1375. Required properties for network device_type:
  1376. - mac-address : list of bytes representing the ethernet address.
  1377. - phy-handle : The phandle for the PHY connected to this controller.
  1378. Recommended properties:
  1379. - phy-connection-type : a string naming the controller/PHY interface type,
  1380. i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id" (Internal
  1381. Delay), "rgmii-txid" (delay on TX only), "rgmii-rxid" (delay on RX only),
  1382. "tbi", or "rtbi".
  1383. Example:
  1384. ucc@2000 {
  1385. device_type = "network";
  1386. compatible = "ucc_geth";
  1387. cell-index = <1>;
  1388. reg = <2000 200>;
  1389. interrupts = <a0 0>;
  1390. interrupt-parent = <700>;
  1391. mac-address = [ 00 04 9f 00 23 23 ];
  1392. rx-clock = "none";
  1393. tx-clock = "clk9";
  1394. phy-handle = <212000>;
  1395. phy-connection-type = "gmii";
  1396. pio-handle = <140001>;
  1397. };
  1398. v) Parallel I/O Ports
  1399. This node configures Parallel I/O ports for CPUs with QE support.
  1400. The node should reside in the "soc" node of the tree. For each
  1401. device that using parallel I/O ports, a child node should be created.
  1402. See the definition of the Pin configuration nodes below for more
  1403. information.
  1404. Required properties:
  1405. - device_type : should be "par_io".
  1406. - reg : offset to the register set and its length.
  1407. - num-ports : number of Parallel I/O ports
  1408. Example:
  1409. par_io@1400 {
  1410. reg = <1400 100>;
  1411. #address-cells = <1>;
  1412. #size-cells = <0>;
  1413. device_type = "par_io";
  1414. num-ports = <7>;
  1415. ucc_pin@01 {
  1416. ......
  1417. };
  1418. vi) Pin configuration nodes
  1419. Required properties:
  1420. - linux,phandle : phandle of this node; likely referenced by a QE
  1421. device.
  1422. - pio-map : array of pin configurations. Each pin is defined by 6
  1423. integers. The six numbers are respectively: port, pin, dir,
  1424. open_drain, assignment, has_irq.
  1425. - port : port number of the pin; 0-6 represent port A-G in UM.
  1426. - pin : pin number in the port.
  1427. - dir : direction of the pin, should encode as follows:
  1428. 0 = The pin is disabled
  1429. 1 = The pin is an output
  1430. 2 = The pin is an input
  1431. 3 = The pin is I/O
  1432. - open_drain : indicates the pin is normal or wired-OR:
  1433. 0 = The pin is actively driven as an output
  1434. 1 = The pin is an open-drain driver. As an output, the pin is
  1435. driven active-low, otherwise it is three-stated.
  1436. - assignment : function number of the pin according to the Pin Assignment
  1437. tables in User Manual. Each pin can have up to 4 possible functions in
  1438. QE and two options for CPM.
  1439. - has_irq : indicates if the pin is used as source of external
  1440. interrupts.
  1441. Example:
  1442. ucc_pin@01 {
  1443. linux,phandle = <140001>;
  1444. pio-map = <
  1445. /* port pin dir open_drain assignment has_irq */
  1446. 0 3 1 0 1 0 /* TxD0 */
  1447. 0 4 1 0 1 0 /* TxD1 */
  1448. 0 5 1 0 1 0 /* TxD2 */
  1449. 0 6 1 0 1 0 /* TxD3 */
  1450. 1 6 1 0 3 0 /* TxD4 */
  1451. 1 7 1 0 1 0 /* TxD5 */
  1452. 1 9 1 0 2 0 /* TxD6 */
  1453. 1 a 1 0 2 0 /* TxD7 */
  1454. 0 9 2 0 1 0 /* RxD0 */
  1455. 0 a 2 0 1 0 /* RxD1 */
  1456. 0 b 2 0 1 0 /* RxD2 */
  1457. 0 c 2 0 1 0 /* RxD3 */
  1458. 0 d 2 0 1 0 /* RxD4 */
  1459. 1 1 2 0 2 0 /* RxD5 */
  1460. 1 0 2 0 2 0 /* RxD6 */
  1461. 1 4 2 0 2 0 /* RxD7 */
  1462. 0 7 1 0 1 0 /* TX_EN */
  1463. 0 8 1 0 1 0 /* TX_ER */
  1464. 0 f 2 0 1 0 /* RX_DV */
  1465. 0 10 2 0 1 0 /* RX_ER */
  1466. 0 0 2 0 1 0 /* RX_CLK */
  1467. 2 9 1 0 3 0 /* GTX_CLK - CLK10 */
  1468. 2 8 2 0 1 0>; /* GTX125 - CLK9 */
  1469. };
  1470. vii) Multi-User RAM (MURAM)
  1471. Required properties:
  1472. - compatible : should be "fsl,qe-muram", "fsl,cpm-muram".
  1473. - mode : the could be "host" or "slave".
  1474. - ranges : Should be defined as specified in 1) to describe the
  1475. translation of MURAM addresses.
  1476. - data-only : sub-node which defines the address area under MURAM
  1477. bus that can be allocated as data/parameter
  1478. Example:
  1479. muram@10000 {
  1480. compatible = "fsl,qe-muram", "fsl,cpm-muram";
  1481. ranges = <0 00010000 0000c000>;
  1482. data-only@0{
  1483. compatible = "fsl,qe-muram-data",
  1484. "fsl,cpm-muram-data";
  1485. reg = <0 c000>;
  1486. };
  1487. };
  1488. viii) Uploaded QE firmware
  1489. If a new firwmare has been uploaded to the QE (usually by the
  1490. boot loader), then a 'firmware' child node should be added to the QE
  1491. node. This node provides information on the uploaded firmware that
  1492. device drivers may need.
  1493. Required properties:
  1494. - id: The string name of the firmware. This is taken from the 'id'
  1495. member of the qe_firmware structure of the uploaded firmware.
  1496. Device drivers can search this string to determine if the
  1497. firmware they want is already present.
  1498. - extended-modes: The Extended Modes bitfield, taken from the
  1499. firmware binary. It is a 64-bit number represented
  1500. as an array of two 32-bit numbers.
  1501. - virtual-traps: The virtual traps, taken from the firmware binary.
  1502. It is an array of 8 32-bit numbers.
  1503. Example:
  1504. firmware {
  1505. id = "Soft-UART";
  1506. extended-modes = <0 0>;
  1507. virtual-traps = <0 0 0 0 0 0 0 0>;
  1508. }
  1509. j) CFI or JEDEC memory-mapped NOR flash
  1510. Flash chips (Memory Technology Devices) are often used for solid state
  1511. file systems on embedded devices.
  1512. - compatible : should contain the specific model of flash chip(s)
  1513. used, if known, followed by either "cfi-flash" or "jedec-flash"
  1514. - reg : Address range of the flash chip
  1515. - bank-width : Width (in bytes) of the flash bank. Equal to the
  1516. device width times the number of interleaved chips.
  1517. - device-width : (optional) Width of a single flash chip. If
  1518. omitted, assumed to be equal to 'bank-width'.
  1519. - #address-cells, #size-cells : Must be present if the flash has
  1520. sub-nodes representing partitions (see below). In this case
  1521. both #address-cells and #size-cells must be equal to 1.
  1522. For JEDEC compatible devices, the following additional properties
  1523. are defined:
  1524. - vendor-id : Contains the flash chip's vendor id (1 byte).
  1525. - device-id : Contains the flash chip's device id (1 byte).
  1526. In addition to the information on the flash bank itself, the
  1527. device tree may optionally contain additional information
  1528. describing partitions of the flash address space. This can be
  1529. used on platforms which have strong conventions about which
  1530. portions of the flash are used for what purposes, but which don't
  1531. use an on-flash partition table such as RedBoot.
  1532. Each partition is represented as a sub-node of the flash device.
  1533. Each node's name represents the name of the corresponding
  1534. partition of the flash device.
  1535. Flash partitions
  1536. - reg : The partition's offset and size within the flash bank.
  1537. - label : (optional) The label / name for this flash partition.
  1538. If omitted, the label is taken from the node name (excluding
  1539. the unit address).
  1540. - read-only : (optional) This parameter, if present, is a hint to
  1541. Linux that this flash partition should only be mounted
  1542. read-only. This is usually used for flash partitions
  1543. containing early-boot firmware images or data which should not
  1544. be clobbered.
  1545. Example:
  1546. flash@ff000000 {
  1547. compatible = "amd,am29lv128ml", "cfi-flash";
  1548. reg = <ff000000 01000000>;
  1549. bank-width = <4>;
  1550. device-width = <1>;
  1551. #address-cells = <1>;
  1552. #size-cells = <1>;
  1553. fs@0 {
  1554. label = "fs";
  1555. reg = <0 f80000>;
  1556. };
  1557. firmware@f80000 {
  1558. label ="firmware";
  1559. reg = <f80000 80000>;
  1560. read-only;
  1561. };
  1562. };
  1563. k) Global Utilities Block
  1564. The global utilities block controls power management, I/O device
  1565. enabling, power-on-reset configuration monitoring, general-purpose
  1566. I/O signal configuration, alternate function selection for multiplexed
  1567. signals, and clock control.
  1568. Required properties:
  1569. - compatible : Should define the compatible device type for
  1570. global-utilities.
  1571. - reg : Offset and length of the register set for the device.
  1572. Recommended properties:
  1573. - fsl,has-rstcr : Indicates that the global utilities register set
  1574. contains a functioning "reset control register" (i.e. the board
  1575. is wired to reset upon setting the HRESET_REQ bit in this register).
  1576. Example:
  1577. global-utilities@e0000 { /* global utilities block */
  1578. compatible = "fsl,mpc8548-guts";
  1579. reg = <e0000 1000>;
  1580. fsl,has-rstcr;
  1581. };
  1582. l) Freescale Communications Processor Module
  1583. NOTE: This is an interim binding, and will likely change slightly,
  1584. as more devices are supported. The QE bindings especially are
  1585. incomplete.
  1586. i) Root CPM node
  1587. Properties:
  1588. - compatible : "fsl,cpm1", "fsl,cpm2", or "fsl,qe".
  1589. - reg : A 48-byte region beginning with CPCR.
  1590. Example:
  1591. cpm@119c0 {
  1592. #address-cells = <1>;
  1593. #size-cells = <1>;
  1594. #interrupt-cells = <2>;
  1595. compatible = "fsl,mpc8272-cpm", "fsl,cpm2";
  1596. reg = <119c0 30>;
  1597. }
  1598. ii) Properties common to mulitple CPM/QE devices
  1599. - fsl,cpm-command : This value is ORed with the opcode and command flag
  1600. to specify the device on which a CPM command operates.
  1601. - fsl,cpm-brg : Indicates which baud rate generator the device
  1602. is associated with. If absent, an unused BRG
  1603. should be dynamically allocated. If zero, the
  1604. device uses an external clock rather than a BRG.
  1605. - reg : Unless otherwise specified, the first resource represents the
  1606. scc/fcc/ucc registers, and the second represents the device's
  1607. parameter RAM region (if it has one).
  1608. iii) Serial
  1609. Currently defined compatibles:
  1610. - fsl,cpm1-smc-uart
  1611. - fsl,cpm2-smc-uart
  1612. - fsl,cpm1-scc-uart
  1613. - fsl,cpm2-scc-uart
  1614. - fsl,qe-uart
  1615. Example:
  1616. serial@11a00 {
  1617. device_type = "serial";
  1618. compatible = "fsl,mpc8272-scc-uart",
  1619. "fsl,cpm2-scc-uart";
  1620. reg = <11a00 20 8000 100>;
  1621. interrupts = <28 8>;
  1622. interrupt-parent = <&PIC>;
  1623. fsl,cpm-brg = <1>;
  1624. fsl,cpm-command = <00800000>;
  1625. };
  1626. iii) Network
  1627. Currently defined compatibles:
  1628. - fsl,cpm1-scc-enet
  1629. - fsl,cpm2-scc-enet
  1630. - fsl,cpm1-fec-enet
  1631. - fsl,cpm2-fcc-enet (third resource is GFEMR)
  1632. - fsl,qe-enet
  1633. Example:
  1634. ethernet@11300 {
  1635. device_type = "network";
  1636. compatible = "fsl,mpc8272-fcc-enet",
  1637. "fsl,cpm2-fcc-enet";
  1638. reg = <11300 20 8400 100 11390 1>;
  1639. local-mac-address = [ 00 00 00 00 00 00 ];
  1640. interrupts = <20 8>;
  1641. interrupt-parent = <&PIC>;
  1642. phy-handle = <&PHY0>;
  1643. fsl,cpm-command = <12000300>;
  1644. };
  1645. iv) MDIO
  1646. Currently defined compatibles:
  1647. fsl,pq1-fec-mdio (reg is same as first resource of FEC device)
  1648. fsl,cpm2-mdio-bitbang (reg is port C registers)
  1649. Properties for fsl,cpm2-mdio-bitbang:
  1650. fsl,mdio-pin : pin of port C controlling mdio data
  1651. fsl,mdc-pin : pin of port C controlling mdio clock
  1652. Example:
  1653. mdio@10d40 {
  1654. device_type = "mdio";
  1655. compatible = "fsl,mpc8272ads-mdio-bitbang",
  1656. "fsl,mpc8272-mdio-bitbang",
  1657. "fsl,cpm2-mdio-bitbang";
  1658. reg = <10d40 14>;
  1659. #address-cells = <1>;
  1660. #size-cells = <0>;
  1661. fsl,mdio-pin = <12>;
  1662. fsl,mdc-pin = <13>;
  1663. };
  1664. v) Baud Rate Generators
  1665. Currently defined compatibles:
  1666. fsl,cpm-brg
  1667. fsl,cpm1-brg
  1668. fsl,cpm2-brg
  1669. Properties:
  1670. - reg : There may be an arbitrary number of reg resources; BRG
  1671. numbers are assigned to these in order.
  1672. - clock-frequency : Specifies the base frequency driving
  1673. the BRG.
  1674. Example:
  1675. brg@119f0 {
  1676. compatible = "fsl,mpc8272-brg",
  1677. "fsl,cpm2-brg",
  1678. "fsl,cpm-brg";
  1679. reg = <119f0 10 115f0 10>;
  1680. clock-frequency = <d#25000000>;
  1681. };
  1682. vi) Interrupt Controllers
  1683. Currently defined compatibles:
  1684. - fsl,cpm1-pic
  1685. - only one interrupt cell
  1686. - fsl,pq1-pic
  1687. - fsl,cpm2-pic
  1688. - second interrupt cell is level/sense:
  1689. - 2 is falling edge
  1690. - 8 is active low
  1691. Example:
  1692. interrupt-controller@10c00 {
  1693. #interrupt-cells = <2>;
  1694. interrupt-controller;
  1695. reg = <10c00 80>;
  1696. compatible = "mpc8272-pic", "fsl,cpm2-pic";
  1697. };
  1698. vii) USB (Universal Serial Bus Controller)
  1699. Properties:
  1700. - compatible : "fsl,cpm1-usb", "fsl,cpm2-usb", "fsl,qe-usb"
  1701. Example:
  1702. usb@11bc0 {
  1703. #address-cells = <1>;
  1704. #size-cells = <0>;
  1705. compatible = "fsl,cpm2-usb";
  1706. reg = <11b60 18 8b00 100>;
  1707. interrupts = <b 8>;
  1708. interrupt-parent = <&PIC>;
  1709. fsl,cpm-command = <2e600000>;
  1710. };
  1711. viii) Multi-User RAM (MURAM)
  1712. The multi-user/dual-ported RAM is expressed as a bus under the CPM node.
  1713. Ranges must be set up subject to the following restrictions:
  1714. - Children's reg nodes must be offsets from the start of all muram, even
  1715. if the user-data area does not begin at zero.
  1716. - If multiple range entries are used, the difference between the parent
  1717. address and the child address must be the same in all, so that a single
  1718. mapping can cover them all while maintaining the ability to determine
  1719. CPM-side offsets with pointer subtraction. It is recommended that
  1720. multiple range entries not be used.
  1721. - A child address of zero must be translatable, even if no reg resources
  1722. contain it.
  1723. A child "data" node must exist, compatible with "fsl,cpm-muram-data", to
  1724. indicate the portion of muram that is usable by the OS for arbitrary
  1725. purposes. The data node may have an arbitrary number of reg resources,
  1726. all of which contribute to the allocatable muram pool.
  1727. Example, based on mpc8272:
  1728. muram@0 {
  1729. #address-cells = <1>;
  1730. #size-cells = <1>;
  1731. ranges = <0 0 10000>;
  1732. data@0 {
  1733. compatible = "fsl,cpm-muram-data";
  1734. reg = <0 2000 9800 800>;
  1735. };
  1736. };
  1737. m) Chipselect/Local Bus
  1738. Properties:
  1739. - name : Should be localbus
  1740. - #address-cells : Should be either two or three. The first cell is the
  1741. chipselect number, and the remaining cells are the
  1742. offset into the chipselect.
  1743. - #size-cells : Either one or two, depending on how large each chipselect
  1744. can be.
  1745. - ranges : Each range corresponds to a single chipselect, and cover
  1746. the entire access window as configured.
  1747. Example:
  1748. localbus@f0010100 {
  1749. compatible = "fsl,mpc8272-localbus",
  1750. "fsl,pq2-localbus";
  1751. #address-cells = <2>;
  1752. #size-cells = <1>;
  1753. reg = <f0010100 40>;
  1754. ranges = <0 0 fe000000 02000000
  1755. 1 0 f4500000 00008000>;
  1756. flash@0,0 {
  1757. compatible = "jedec-flash";
  1758. reg = <0 0 2000000>;
  1759. bank-width = <4>;
  1760. device-width = <1>;
  1761. };
  1762. board-control@1,0 {
  1763. reg = <1 0 20>;
  1764. compatible = "fsl,mpc8272ads-bcsr";
  1765. };
  1766. };
  1767. n) 4xx/Axon EMAC ethernet nodes
  1768. The EMAC ethernet controller in IBM and AMCC 4xx chips, and also
  1769. the Axon bridge. To operate this needs to interact with a ths
  1770. special McMAL DMA controller, and sometimes an RGMII or ZMII
  1771. interface. In addition to the nodes and properties described
  1772. below, the node for the OPB bus on which the EMAC sits must have a
  1773. correct clock-frequency property.
  1774. i) The EMAC node itself
  1775. Required properties:
  1776. - device_type : "network"
  1777. - compatible : compatible list, contains 2 entries, first is
  1778. "ibm,emac-CHIP" where CHIP is the host ASIC (440gx,
  1779. 405gp, Axon) and second is either "ibm,emac" or
  1780. "ibm,emac4". For Axon, thus, we have: "ibm,emac-axon",
  1781. "ibm,emac4"
  1782. - interrupts : <interrupt mapping for EMAC IRQ and WOL IRQ>
  1783. - interrupt-parent : optional, if needed for interrupt mapping
  1784. - reg : <registers mapping>
  1785. - local-mac-address : 6 bytes, MAC address
  1786. - mal-device : phandle of the associated McMAL node
  1787. - mal-tx-channel : 1 cell, index of the tx channel on McMAL associated
  1788. with this EMAC
  1789. - mal-rx-channel : 1 cell, index of the rx channel on McMAL associated
  1790. with this EMAC
  1791. - cell-index : 1 cell, hardware index of the EMAC cell on a given
  1792. ASIC (typically 0x0 and 0x1 for EMAC0 and EMAC1 on
  1793. each Axon chip)
  1794. - max-frame-size : 1 cell, maximum frame size supported in bytes
  1795. - rx-fifo-size : 1 cell, Rx fifo size in bytes for 10 and 100 Mb/sec
  1796. operations.
  1797. For Axon, 2048
  1798. - tx-fifo-size : 1 cell, Tx fifo size in bytes for 10 and 100 Mb/sec
  1799. operations.
  1800. For Axon, 2048.
  1801. - fifo-entry-size : 1 cell, size of a fifo entry (used to calculate
  1802. thresholds).
  1803. For Axon, 0x00000010
  1804. - mal-burst-size : 1 cell, MAL burst size (used to calculate thresholds)
  1805. in bytes.
  1806. For Axon, 0x00000100 (I think ...)
  1807. - phy-mode : string, mode of operations of the PHY interface.
  1808. Supported values are: "mii", "rmii", "smii", "rgmii",
  1809. "tbi", "gmii", rtbi", "sgmii".
  1810. For Axon on CAB, it is "rgmii"
  1811. - mdio-device : 1 cell, required iff using shared MDIO registers
  1812. (440EP). phandle of the EMAC to use to drive the
  1813. MDIO lines for the PHY used by this EMAC.
  1814. - zmii-device : 1 cell, required iff connected to a ZMII. phandle of
  1815. the ZMII device node
  1816. - zmii-channel : 1 cell, required iff connected to a ZMII. Which ZMII
  1817. channel or 0xffffffff if ZMII is only used for MDIO.
  1818. - rgmii-device : 1 cell, required iff connected to an RGMII. phandle
  1819. of the RGMII device node.
  1820. For Axon: phandle of plb5/plb4/opb/rgmii
  1821. - rgmii-channel : 1 cell, required iff connected to an RGMII. Which
  1822. RGMII channel is used by this EMAC.
  1823. Fox Axon: present, whatever value is appropriate for each
  1824. EMAC, that is the content of the current (bogus) "phy-port"
  1825. property.
  1826. Optional properties:
  1827. - phy-address : 1 cell, optional, MDIO address of the PHY. If absent,
  1828. a search is performed.
  1829. - phy-map : 1 cell, optional, bitmap of addresses to probe the PHY
  1830. for, used if phy-address is absent. bit 0x00000001 is
  1831. MDIO address 0.
  1832. For Axon it can be absent, thouugh my current driver
  1833. doesn't handle phy-address yet so for now, keep
  1834. 0x00ffffff in it.
  1835. - rx-fifo-size-gige : 1 cell, Rx fifo size in bytes for 1000 Mb/sec
  1836. operations (if absent the value is the same as
  1837. rx-fifo-size). For Axon, either absent or 2048.
  1838. - tx-fifo-size-gige : 1 cell, Tx fifo size in bytes for 1000 Mb/sec
  1839. operations (if absent the value is the same as
  1840. tx-fifo-size). For Axon, either absent or 2048.
  1841. - tah-device : 1 cell, optional. If connected to a TAH engine for
  1842. offload, phandle of the TAH device node.
  1843. - tah-channel : 1 cell, optional. If appropriate, channel used on the
  1844. TAH engine.
  1845. Example:
  1846. EMAC0: ethernet@40000800 {
  1847. device_type = "network";
  1848. compatible = "ibm,emac-440gp", "ibm,emac";
  1849. interrupt-parent = <&UIC1>;
  1850. interrupts = <1c 4 1d 4>;
  1851. reg = <40000800 70>;
  1852. local-mac-address = [00 04 AC E3 1B 1E];
  1853. mal-device = <&MAL0>;
  1854. mal-tx-channel = <0 1>;
  1855. mal-rx-channel = <0>;
  1856. cell-index = <0>;
  1857. max-frame-size = <5dc>;
  1858. rx-fifo-size = <1000>;
  1859. tx-fifo-size = <800>;
  1860. phy-mode = "rmii";
  1861. phy-map = <00000001>;
  1862. zmii-device = <&ZMII0>;
  1863. zmii-channel = <0>;
  1864. };
  1865. ii) McMAL node
  1866. Required properties:
  1867. - device_type : "dma-controller"
  1868. - compatible : compatible list, containing 2 entries, first is
  1869. "ibm,mcmal-CHIP" where CHIP is the host ASIC (like
  1870. emac) and the second is either "ibm,mcmal" or
  1871. "ibm,mcmal2".
  1872. For Axon, "ibm,mcmal-axon","ibm,mcmal2"
  1873. - interrupts : <interrupt mapping for the MAL interrupts sources:
  1874. 5 sources: tx_eob, rx_eob, serr, txde, rxde>.
  1875. For Axon: This is _different_ from the current
  1876. firmware. We use the "delayed" interrupts for txeob
  1877. and rxeob. Thus we end up with mapping those 5 MPIC
  1878. interrupts, all level positive sensitive: 10, 11, 32,
  1879. 33, 34 (in decimal)
  1880. - dcr-reg : < DCR registers range >
  1881. - dcr-parent : if needed for dcr-reg
  1882. - num-tx-chans : 1 cell, number of Tx channels
  1883. - num-rx-chans : 1 cell, number of Rx channels
  1884. iii) ZMII node
  1885. Required properties:
  1886. - compatible : compatible list, containing 2 entries, first is
  1887. "ibm,zmii-CHIP" where CHIP is the host ASIC (like
  1888. EMAC) and the second is "ibm,zmii".
  1889. For Axon, there is no ZMII node.
  1890. - reg : <registers mapping>
  1891. iv) RGMII node
  1892. Required properties:
  1893. - compatible : compatible list, containing 2 entries, first is
  1894. "ibm,rgmii-CHIP" where CHIP is the host ASIC (like
  1895. EMAC) and the second is "ibm,rgmii".
  1896. For Axon, "ibm,rgmii-axon","ibm,rgmii"
  1897. - reg : <registers mapping>
  1898. - revision : as provided by the RGMII new version register if
  1899. available.
  1900. For Axon: 0x0000012a
  1901. o) Xilinx IP cores
  1902. The Xilinx EDK toolchain ships with a set of IP cores (devices) for use
  1903. in Xilinx Spartan and Virtex FPGAs. The devices cover the whole range
  1904. of standard device types (network, serial, etc.) and miscellanious
  1905. devices (gpio, LCD, spi, etc). Also, since these devices are
  1906. implemented within the fpga fabric every instance of the device can be
  1907. synthesised with different options that change the behaviour.
  1908. Each IP-core has a set of parameters which the FPGA designer can use to
  1909. control how the core is synthesized. Historically, the EDK tool would
  1910. extract the device parameters relevant to device drivers and copy them
  1911. into an 'xparameters.h' in the form of #define symbols. This tells the
  1912. device drivers how the IP cores are configured, but it requres the kernel
  1913. to be recompiled every time the FPGA bitstream is resynthesized.
  1914. The new approach is to export the parameters into the device tree and
  1915. generate a new device tree each time the FPGA bitstream changes. The
  1916. parameters which used to be exported as #defines will now become
  1917. properties of the device node. In general, device nodes for IP-cores
  1918. will take the following form:
  1919. (name): (generic-name)@(base-address) {
  1920. compatible = "xlnx,(ip-core-name)-(HW_VER)"
  1921. [, (list of compatible devices), ...];
  1922. reg = <(baseaddr) (size)>;
  1923. interrupt-parent = <&interrupt-controller-phandle>;
  1924. interrupts = < ... >;
  1925. xlnx,(parameter1) = "(string-value)";
  1926. xlnx,(parameter2) = <(int-value)>;
  1927. };
  1928. (generic-name): an open firmware-style name that describes the
  1929. generic class of device. Preferably, this is one word, such
  1930. as 'serial' or 'ethernet'.
  1931. (ip-core-name): the name of the ip block (given after the BEGIN
  1932. directive in system.mhs). Should be in lowercase
  1933. and all underscores '_' converted to dashes '-'.
  1934. (name): is derived from the "PARAMETER INSTANCE" value.
  1935. (parameter#): C_* parameters from system.mhs. The C_ prefix is
  1936. dropped from the parameter name, the name is converted
  1937. to lowercase and all underscore '_' characters are
  1938. converted to dashes '-'.
  1939. (baseaddr): the baseaddr parameter value (often named C_BASEADDR).
  1940. (HW_VER): from the HW_VER parameter.
  1941. (size): the address range size (often C_HIGHADDR - C_BASEADDR + 1).
  1942. Typically, the compatible list will include the exact IP core version
  1943. followed by an older IP core version which implements the same
  1944. interface or any other device with the same interface.
  1945. 'reg', 'interrupt-parent' and 'interrupts' are all optional properties.
  1946. For example, the following block from system.mhs:
  1947. BEGIN opb_uartlite
  1948. PARAMETER INSTANCE = opb_uartlite_0
  1949. PARAMETER HW_VER = 1.00.b
  1950. PARAMETER C_BAUDRATE = 115200
  1951. PARAMETER C_DATA_BITS = 8
  1952. PARAMETER C_ODD_PARITY = 0
  1953. PARAMETER C_USE_PARITY = 0
  1954. PARAMETER C_CLK_FREQ = 50000000
  1955. PARAMETER C_BASEADDR = 0xEC100000
  1956. PARAMETER C_HIGHADDR = 0xEC10FFFF
  1957. BUS_INTERFACE SOPB = opb_7
  1958. PORT OPB_Clk = CLK_50MHz
  1959. PORT Interrupt = opb_uartlite_0_Interrupt
  1960. PORT RX = opb_uartlite_0_RX
  1961. PORT TX = opb_uartlite_0_TX
  1962. PORT OPB_Rst = sys_bus_reset_0
  1963. END
  1964. becomes the following device tree node:
  1965. opb_uartlite_0: serial@ec100000 {
  1966. device_type = "serial";
  1967. compatible = "xlnx,opb-uartlite-1.00.b";
  1968. reg = <ec100000 10000>;
  1969. interrupt-parent = <&opb_intc_0>;
  1970. interrupts = <1 0>; // got this from the opb_intc parameters
  1971. current-speed = <d#115200>; // standard serial device prop
  1972. clock-frequency = <d#50000000>; // standard serial device prop
  1973. xlnx,data-bits = <8>;
  1974. xlnx,odd-parity = <0>;
  1975. xlnx,use-parity = <0>;
  1976. };
  1977. Some IP cores actually implement 2 or more logical devices. In
  1978. this case, the device should still describe the whole IP core with
  1979. a single node and add a child node for each logical device. The
  1980. ranges property can be used to translate from parent IP-core to the
  1981. registers of each device. In addition, the parent node should be
  1982. compatible with the bus type 'xlnx,compound', and should contain
  1983. #address-cells and #size-cells, as with any other bus. (Note: this
  1984. makes the assumption that both logical devices have the same bus
  1985. binding. If this is not true, then separate nodes should be used
  1986. for each logical device). The 'cell-index' property can be used to
  1987. enumerate logical devices within an IP core. For example, the
  1988. following is the system.mhs entry for the dual ps2 controller found
  1989. on the ml403 reference design.
  1990. BEGIN opb_ps2_dual_ref
  1991. PARAMETER INSTANCE = opb_ps2_dual_ref_0
  1992. PARAMETER HW_VER = 1.00.a
  1993. PARAMETER C_BASEADDR = 0xA9000000
  1994. PARAMETER C_HIGHADDR = 0xA9001FFF
  1995. BUS_INTERFACE SOPB = opb_v20_0
  1996. PORT Sys_Intr1 = ps2_1_intr
  1997. PORT Sys_Intr2 = ps2_2_intr
  1998. PORT Clkin1 = ps2_clk_rx_1
  1999. PORT Clkin2 = ps2_clk_rx_2
  2000. PORT Clkpd1 = ps2_clk_tx_1
  2001. PORT Clkpd2 = ps2_clk_tx_2
  2002. PORT Rx1 = ps2_d_rx_1
  2003. PORT Rx2 = ps2_d_rx_2
  2004. PORT Txpd1 = ps2_d_tx_1
  2005. PORT Txpd2 = ps2_d_tx_2
  2006. END
  2007. It would result in the following device tree nodes:
  2008. opb_ps2_dual_ref_0: opb-ps2-dual-ref@a9000000 {
  2009. #address-cells = <1>;
  2010. #size-cells = <1>;
  2011. compatible = "xlnx,compound";
  2012. ranges = <0 a9000000 2000>;
  2013. // If this device had extra parameters, then they would
  2014. // go here.
  2015. ps2@0 {
  2016. compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
  2017. reg = <0 40>;
  2018. interrupt-parent = <&opb_intc_0>;
  2019. interrupts = <3 0>;
  2020. cell-index = <0>;
  2021. };
  2022. ps2@1000 {
  2023. compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
  2024. reg = <1000 40>;
  2025. interrupt-parent = <&opb_intc_0>;
  2026. interrupts = <3 0>;
  2027. cell-index = <0>;
  2028. };
  2029. };
  2030. Also, the system.mhs file defines bus attachments from the processor
  2031. to the devices. The device tree structure should reflect the bus
  2032. attachments. Again an example; this system.mhs fragment:
  2033. BEGIN ppc405_virtex4
  2034. PARAMETER INSTANCE = ppc405_0
  2035. PARAMETER HW_VER = 1.01.a
  2036. BUS_INTERFACE DPLB = plb_v34_0
  2037. BUS_INTERFACE IPLB = plb_v34_0
  2038. END
  2039. BEGIN opb_intc
  2040. PARAMETER INSTANCE = opb_intc_0
  2041. PARAMETER HW_VER = 1.00.c
  2042. PARAMETER C_BASEADDR = 0xD1000FC0
  2043. PARAMETER C_HIGHADDR = 0xD1000FDF
  2044. BUS_INTERFACE SOPB = opb_v20_0
  2045. END
  2046. BEGIN opb_uart16550
  2047. PARAMETER INSTANCE = opb_uart16550_0
  2048. PARAMETER HW_VER = 1.00.d
  2049. PARAMETER C_BASEADDR = 0xa0000000
  2050. PARAMETER C_HIGHADDR = 0xa0001FFF
  2051. BUS_INTERFACE SOPB = opb_v20_0
  2052. END
  2053. BEGIN plb_v34
  2054. PARAMETER INSTANCE = plb_v34_0
  2055. PARAMETER HW_VER = 1.02.a
  2056. END
  2057. BEGIN plb_bram_if_cntlr
  2058. PARAMETER INSTANCE = plb_bram_if_cntlr_0
  2059. PARAMETER HW_VER = 1.00.b
  2060. PARAMETER C_BASEADDR = 0xFFFF0000
  2061. PARAMETER C_HIGHADDR = 0xFFFFFFFF
  2062. BUS_INTERFACE SPLB = plb_v34_0
  2063. END
  2064. BEGIN plb2opb_bridge
  2065. PARAMETER INSTANCE = plb2opb_bridge_0
  2066. PARAMETER HW_VER = 1.01.a
  2067. PARAMETER C_RNG0_BASEADDR = 0x20000000
  2068. PARAMETER C_RNG0_HIGHADDR = 0x3FFFFFFF
  2069. PARAMETER C_RNG1_BASEADDR = 0x60000000
  2070. PARAMETER C_RNG1_HIGHADDR = 0x7FFFFFFF
  2071. PARAMETER C_RNG2_BASEADDR = 0x80000000
  2072. PARAMETER C_RNG2_HIGHADDR = 0xBFFFFFFF
  2073. PARAMETER C_RNG3_BASEADDR = 0xC0000000
  2074. PARAMETER C_RNG3_HIGHADDR = 0xDFFFFFFF
  2075. BUS_INTERFACE SPLB = plb_v34_0
  2076. BUS_INTERFACE MOPB = opb_v20_0
  2077. END
  2078. Gives this device tree (some properties removed for clarity):
  2079. plb@0 {
  2080. #address-cells = <1>;
  2081. #size-cells = <1>;
  2082. compatible = "xlnx,plb-v34-1.02.a";
  2083. device_type = "ibm,plb";
  2084. ranges; // 1:1 translation
  2085. plb_bram_if_cntrl_0: bram@ffff0000 {
  2086. reg = <ffff0000 10000>;
  2087. }
  2088. opb@20000000 {
  2089. #address-cells = <1>;
  2090. #size-cells = <1>;
  2091. ranges = <20000000 20000000 20000000
  2092. 60000000 60000000 20000000
  2093. 80000000 80000000 40000000
  2094. c0000000 c0000000 20000000>;
  2095. opb_uart16550_0: serial@a0000000 {
  2096. reg = <a00000000 2000>;
  2097. };
  2098. opb_intc_0: interrupt-controller@d1000fc0 {
  2099. reg = <d1000fc0 20>;
  2100. };
  2101. };
  2102. };
  2103. That covers the general approach to binding xilinx IP cores into the
  2104. device tree. The following are bindings for specific devices:
  2105. i) Xilinx ML300 Framebuffer
  2106. Simple framebuffer device from the ML300 reference design (also on the
  2107. ML403 reference design as well as others).
  2108. Optional properties:
  2109. - resolution = <xres yres> : pixel resolution of framebuffer. Some
  2110. implementations use a different resolution.
  2111. Default is <d#640 d#480>
  2112. - virt-resolution = <xvirt yvirt> : Size of framebuffer in memory.
  2113. Default is <d#1024 d#480>.
  2114. - rotate-display (empty) : rotate display 180 degrees.
  2115. ii) Xilinx SystemACE
  2116. The Xilinx SystemACE device is used to program FPGAs from an FPGA
  2117. bitstream stored on a CF card. It can also be used as a generic CF
  2118. interface device.
  2119. Optional properties:
  2120. - 8-bit (empty) : Set this property for SystemACE in 8 bit mode
  2121. iii) Xilinx EMAC and Xilinx TEMAC
  2122. Xilinx Ethernet devices. In addition to general xilinx properties
  2123. listed above, nodes for these devices should include a phy-handle
  2124. property, and may include other common network device properties
  2125. like local-mac-address.
  2126. iv) Xilinx Uartlite
  2127. Xilinx uartlite devices are simple fixed speed serial ports.
  2128. Requred properties:
  2129. - current-speed : Baud rate of uartlite
  2130. v) Xilinx hwicap
  2131. Xilinx hwicap devices provide access to the configuration logic
  2132. of the FPGA through the Internal Configuration Access Port
  2133. (ICAP). The ICAP enables partial reconfiguration of the FPGA,
  2134. readback of the configuration information, and some control over
  2135. 'warm boots' of the FPGA fabric.
  2136. Required properties:
  2137. - xlnx,family : The family of the FPGA, necessary since the
  2138. capabilities of the underlying ICAP hardware
  2139. differ between different families. May be
  2140. 'virtex2p', 'virtex4', or 'virtex5'.
  2141. p) Freescale Synchronous Serial Interface
  2142. The SSI is a serial device that communicates with audio codecs. It can
  2143. be programmed in AC97, I2S, left-justified, or right-justified modes.
  2144. Required properties:
  2145. - compatible : compatible list, containing "fsl,ssi"
  2146. - cell-index : the SSI, <0> = SSI1, <1> = SSI2, and so on
  2147. - reg : offset and length of the register set for the device
  2148. - interrupts : <a b> where a is the interrupt number and b is a
  2149. field that represents an encoding of the sense and
  2150. level information for the interrupt. This should be
  2151. encoded based on the information in section 2)
  2152. depending on the type of interrupt controller you
  2153. have.
  2154. - interrupt-parent : the phandle for the interrupt controller that
  2155. services interrupts for this device.
  2156. - fsl,mode : the operating mode for the SSI interface
  2157. "i2s-slave" - I2S mode, SSI is clock slave
  2158. "i2s-master" - I2S mode, SSI is clock master
  2159. "lj-slave" - left-justified mode, SSI is clock slave
  2160. "lj-master" - l.j. mode, SSI is clock master
  2161. "rj-slave" - right-justified mode, SSI is clock slave
  2162. "rj-master" - r.j., SSI is clock master
  2163. "ac97-slave" - AC97 mode, SSI is clock slave
  2164. "ac97-master" - AC97 mode, SSI is clock master
  2165. Optional properties:
  2166. - codec-handle : phandle to a 'codec' node that defines an audio
  2167. codec connected to this SSI. This node is typically
  2168. a child of an I2C or other control node.
  2169. Child 'codec' node required properties:
  2170. - compatible : compatible list, contains the name of the codec
  2171. Child 'codec' node optional properties:
  2172. - clock-frequency : The frequency of the input clock, which typically
  2173. comes from an on-board dedicated oscillator.
  2174. * Freescale 83xx DMA Controller
  2175. Freescale PowerPC 83xx have on chip general purpose DMA controllers.
  2176. Required properties:
  2177. - compatible : compatible list, contains 2 entries, first is
  2178. "fsl,CHIP-dma", where CHIP is the processor
  2179. (mpc8349, mpc8360, etc.) and the second is
  2180. "fsl,elo-dma"
  2181. - reg : <registers mapping for DMA general status reg>
  2182. - ranges : Should be defined as specified in 1) to describe the
  2183. DMA controller channels.
  2184. - cell-index : controller index. 0 for controller @ 0x8100
  2185. - interrupts : <interrupt mapping for DMA IRQ>
  2186. - interrupt-parent : optional, if needed for interrupt mapping
  2187. - DMA channel nodes:
  2188. - compatible : compatible list, contains 2 entries, first is
  2189. "fsl,CHIP-dma-channel", where CHIP is the processor
  2190. (mpc8349, mpc8350, etc.) and the second is
  2191. "fsl,elo-dma-channel"
  2192. - reg : <registers mapping for channel>
  2193. - cell-index : dma channel index starts at 0.
  2194. Optional properties:
  2195. - interrupts : <interrupt mapping for DMA channel IRQ>
  2196. (on 83xx this is expected to be identical to
  2197. the interrupts property of the parent node)
  2198. - interrupt-parent : optional, if needed for interrupt mapping
  2199. Example:
  2200. dma@82a8 {
  2201. #address-cells = <1>;
  2202. #size-cells = <1>;
  2203. compatible = "fsl,mpc8349-dma", "fsl,elo-dma";
  2204. reg = <82a8 4>;
  2205. ranges = <0 8100 1a4>;
  2206. interrupt-parent = <&ipic>;
  2207. interrupts = <47 8>;
  2208. cell-index = <0>;
  2209. dma-channel@0 {
  2210. compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
  2211. cell-index = <0>;
  2212. reg = <0 80>;
  2213. };
  2214. dma-channel@80 {
  2215. compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
  2216. cell-index = <1>;
  2217. reg = <80 80>;
  2218. };
  2219. dma-channel@100 {
  2220. compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
  2221. cell-index = <2>;
  2222. reg = <100 80>;
  2223. };
  2224. dma-channel@180 {
  2225. compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
  2226. cell-index = <3>;
  2227. reg = <180 80>;
  2228. };
  2229. };
  2230. * Freescale 85xx/86xx DMA Controller
  2231. Freescale PowerPC 85xx/86xx have on chip general purpose DMA controllers.
  2232. Required properties:
  2233. - compatible : compatible list, contains 2 entries, first is
  2234. "fsl,CHIP-dma", where CHIP is the processor
  2235. (mpc8540, mpc8540, etc.) and the second is
  2236. "fsl,eloplus-dma"
  2237. - reg : <registers mapping for DMA general status reg>
  2238. - cell-index : controller index. 0 for controller @ 0x21000,
  2239. 1 for controller @ 0xc000
  2240. - ranges : Should be defined as specified in 1) to describe the
  2241. DMA controller channels.
  2242. - DMA channel nodes:
  2243. - compatible : compatible list, contains 2 entries, first is
  2244. "fsl,CHIP-dma-channel", where CHIP is the processor
  2245. (mpc8540, mpc8560, etc.) and the second is
  2246. "fsl,eloplus-dma-channel"
  2247. - cell-index : dma channel index starts at 0.
  2248. - reg : <registers mapping for channel>
  2249. - interrupts : <interrupt mapping for DMA channel IRQ>
  2250. - interrupt-parent : optional, if needed for interrupt mapping
  2251. Example:
  2252. dma@21300 {
  2253. #address-cells = <1>;
  2254. #size-cells = <1>;
  2255. compatible = "fsl,mpc8540-dma", "fsl,eloplus-dma";
  2256. reg = <21300 4>;
  2257. ranges = <0 21100 200>;
  2258. cell-index = <0>;
  2259. dma-channel@0 {
  2260. compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel";
  2261. reg = <0 80>;
  2262. cell-index = <0>;
  2263. interrupt-parent = <&mpic>;
  2264. interrupts = <14 2>;
  2265. };
  2266. dma-channel@80 {
  2267. compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel";
  2268. reg = <80 80>;
  2269. cell-index = <1>;
  2270. interrupt-parent = <&mpic>;
  2271. interrupts = <15 2>;
  2272. };
  2273. dma-channel@100 {
  2274. compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel";
  2275. reg = <100 80>;
  2276. cell-index = <2>;
  2277. interrupt-parent = <&mpic>;
  2278. interrupts = <16 2>;
  2279. };
  2280. dma-channel@180 {
  2281. compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel";
  2282. reg = <180 80>;
  2283. cell-index = <3>;
  2284. interrupt-parent = <&mpic>;
  2285. interrupts = <17 2>;
  2286. };
  2287. };
  2288. * Freescale 8xxx/3.0 Gb/s SATA nodes
  2289. SATA nodes are defined to describe on-chip Serial ATA controllers.
  2290. Each SATA port should have its own node.
  2291. Required properties:
  2292. - compatible : compatible list, contains 2 entries, first is
  2293. "fsl,CHIP-sata", where CHIP is the processor
  2294. (mpc8315, mpc8379, etc.) and the second is
  2295. "fsl,pq-sata"
  2296. - interrupts : <interrupt mapping for SATA IRQ>
  2297. - cell-index : controller index.
  2298. 1 for controller @ 0x18000
  2299. 2 for controller @ 0x19000
  2300. 3 for controller @ 0x1a000
  2301. 4 for controller @ 0x1b000
  2302. Optional properties:
  2303. - interrupt-parent : optional, if needed for interrupt mapping
  2304. - reg : <registers mapping>
  2305. Example:
  2306. sata@18000 {
  2307. compatible = "fsl,mpc8379-sata", "fsl,pq-sata";
  2308. reg = <0x18000 0x1000>;
  2309. cell-index = <1>;
  2310. interrupts = <2c 8>;
  2311. interrupt-parent = < &ipic >;
  2312. };
  2313. q) USB EHCI controllers
  2314. Required properties:
  2315. - compatible : should be "usb-ehci".
  2316. - reg : should contain at least address and length of the standard EHCI
  2317. register set for the device. Optional platform-dependent registers
  2318. (debug-port or other) can be also specified here, but only after
  2319. definition of standard EHCI registers.
  2320. - interrupts : one EHCI interrupt should be described here.
  2321. If device registers are implemented in big endian mode, the device
  2322. node should have "big-endian-regs" property.
  2323. If controller implementation operates with big endian descriptors,
  2324. "big-endian-desc" property should be specified.
  2325. If both big endian registers and descriptors are used by the controller
  2326. implementation, "big-endian" property can be specified instead of having
  2327. both "big-endian-regs" and "big-endian-desc".
  2328. Example (Sequoia 440EPx):
  2329. ehci@e0000300 {
  2330. compatible = "ibm,usb-ehci-440epx", "usb-ehci";
  2331. interrupt-parent = <&UIC0>;
  2332. interrupts = <1a 4>;
  2333. reg = <0 e0000300 90 0 e0000390 70>;
  2334. big-endian;
  2335. };
  2336. VII - Marvell Discovery mv64[345]6x System Controller chips
  2337. ===========================================================
  2338. The Marvell mv64[345]60 series of system controller chips contain
  2339. many of the peripherals needed to implement a complete computer
  2340. system. In this section, we define device tree nodes to describe
  2341. the system controller chip itself and each of the peripherals
  2342. which it contains. Compatible string values for each node are
  2343. prefixed with the string "marvell,", for Marvell Technology Group Ltd.
  2344. 1) The /system-controller node
  2345. This node is used to represent the system-controller and must be
  2346. present when the system uses a system contller chip. The top-level
  2347. system-controller node contains information that is global to all
  2348. devices within the system controller chip. The node name begins
  2349. with "system-controller" followed by the unit address, which is
  2350. the base address of the memory-mapped register set for the system
  2351. controller chip.
  2352. Required properties:
  2353. - ranges : Describes the translation of system controller addresses
  2354. for memory mapped registers.
  2355. - clock-frequency: Contains the main clock frequency for the system
  2356. controller chip.
  2357. - reg : This property defines the address and size of the
  2358. memory-mapped registers contained within the system controller
  2359. chip. The address specified in the "reg" property should match
  2360. the unit address of the system-controller node.
  2361. - #address-cells : Address representation for system controller
  2362. devices. This field represents the number of cells needed to
  2363. represent the address of the memory-mapped registers of devices
  2364. within the system controller chip.
  2365. - #size-cells : Size representation for for the memory-mapped
  2366. registers within the system controller chip.
  2367. - #interrupt-cells : Defines the width of cells used to represent
  2368. interrupts.
  2369. Optional properties:
  2370. - model : The specific model of the system controller chip. Such
  2371. as, "mv64360", "mv64460", or "mv64560".
  2372. - compatible : A string identifying the compatibility identifiers
  2373. of the system controller chip.
  2374. The system-controller node contains child nodes for each system
  2375. controller device that the platform uses. Nodes should not be created
  2376. for devices which exist on the system controller chip but are not used
  2377. Example Marvell Discovery mv64360 system-controller node:
  2378. system-controller@f1000000 { /* Marvell Discovery mv64360 */
  2379. #address-cells = <1>;
  2380. #size-cells = <1>;
  2381. model = "mv64360"; /* Default */
  2382. compatible = "marvell,mv64360";
  2383. clock-frequency = <133333333>;
  2384. reg = <0xf1000000 0x10000>;
  2385. virtual-reg = <0xf1000000>;
  2386. ranges = <0x88000000 0x88000000 0x1000000 /* PCI 0 I/O Space */
  2387. 0x80000000 0x80000000 0x8000000 /* PCI 0 MEM Space */
  2388. 0xa0000000 0xa0000000 0x4000000 /* User FLASH */
  2389. 0x00000000 0xf1000000 0x0010000 /* Bridge's regs */
  2390. 0xf2000000 0xf2000000 0x0040000>;/* Integrated SRAM */
  2391. [ child node definitions... ]
  2392. }
  2393. 2) Child nodes of /system-controller
  2394. a) Marvell Discovery MDIO bus
  2395. The MDIO is a bus to which the PHY devices are connected. For each
  2396. device that exists on this bus, a child node should be created. See
  2397. the definition of the PHY node below for an example of how to define
  2398. a PHY.
  2399. Required properties:
  2400. - #address-cells : Should be <1>
  2401. - #size-cells : Should be <0>
  2402. - device_type : Should be "mdio"
  2403. - compatible : Should be "marvell,mv64360-mdio"
  2404. Example:
  2405. mdio {
  2406. #address-cells = <1>;
  2407. #size-cells = <0>;
  2408. device_type = "mdio";
  2409. compatible = "marvell,mv64360-mdio";
  2410. ethernet-phy@0 {
  2411. ......
  2412. };
  2413. };
  2414. b) Marvell Discovery ethernet controller
  2415. The Discover ethernet controller is described with two levels
  2416. of nodes. The first level describes an ethernet silicon block
  2417. and the second level describes up to 3 ethernet nodes within
  2418. that block. The reason for the multiple levels is that the
  2419. registers for the node are interleaved within a single set
  2420. of registers. The "ethernet-block" level describes the
  2421. shared register set, and the "ethernet" nodes describe ethernet
  2422. port-specific properties.
  2423. Ethernet block node
  2424. Required properties:
  2425. - #address-cells : <1>
  2426. - #size-cells : <0>
  2427. - compatible : "marvell,mv64360-eth-block"
  2428. - reg : Offset and length of the register set for this block
  2429. Example Discovery Ethernet block node:
  2430. ethernet-block@2000 {
  2431. #address-cells = <1>;
  2432. #size-cells = <0>;
  2433. compatible = "marvell,mv64360-eth-block";
  2434. reg = <0x2000 0x2000>;
  2435. ethernet@0 {
  2436. .......
  2437. };
  2438. };
  2439. Ethernet port node
  2440. Required properties:
  2441. - device_type : Should be "network".
  2442. - compatible : Should be "marvell,mv64360-eth".
  2443. - reg : Should be <0>, <1>, or <2>, according to which registers
  2444. within the silicon block the device uses.
  2445. - interrupts : <a> where a is the interrupt number for the port.
  2446. - interrupt-parent : the phandle for the interrupt controller
  2447. that services interrupts for this device.
  2448. - phy : the phandle for the PHY connected to this ethernet
  2449. controller.
  2450. - local-mac-address : 6 bytes, MAC address
  2451. Example Discovery Ethernet port node:
  2452. ethernet@0 {
  2453. device_type = "network";
  2454. compatible = "marvell,mv64360-eth";
  2455. reg = <0>;
  2456. interrupts = <32>;
  2457. interrupt-parent = <&PIC>;
  2458. phy = <&PHY0>;
  2459. local-mac-address = [ 00 00 00 00 00 00 ];
  2460. };
  2461. c) Marvell Discovery PHY nodes
  2462. Required properties:
  2463. - device_type : Should be "ethernet-phy"
  2464. - interrupts : <a> where a is the interrupt number for this phy.
  2465. - interrupt-parent : the phandle for the interrupt controller that
  2466. services interrupts for this device.
  2467. - reg : The ID number for the phy, usually a small integer
  2468. Example Discovery PHY node:
  2469. ethernet-phy@1 {
  2470. device_type = "ethernet-phy";
  2471. compatible = "broadcom,bcm5421";
  2472. interrupts = <76>; /* GPP 12 */
  2473. interrupt-parent = <&PIC>;
  2474. reg = <1>;
  2475. };
  2476. d) Marvell Discovery SDMA nodes
  2477. Represent DMA hardware associated with the MPSC (multiprotocol
  2478. serial controllers).
  2479. Required properties:
  2480. - compatible : "marvell,mv64360-sdma"
  2481. - reg : Offset and length of the register set for this device
  2482. - interrupts : <a> where a is the interrupt number for the DMA
  2483. device.
  2484. - interrupt-parent : the phandle for the interrupt controller
  2485. that services interrupts for this device.
  2486. Example Discovery SDMA node:
  2487. sdma@4000 {
  2488. compatible = "marvell,mv64360-sdma";
  2489. reg = <0x4000 0xc18>;
  2490. virtual-reg = <0xf1004000>;
  2491. interrupts = <36>;
  2492. interrupt-parent = <&PIC>;
  2493. };
  2494. e) Marvell Discovery BRG nodes
  2495. Represent baud rate generator hardware associated with the MPSC
  2496. (multiprotocol serial controllers).
  2497. Required properties:
  2498. - compatible : "marvell,mv64360-brg"
  2499. - reg : Offset and length of the register set for this device
  2500. - clock-src : A value from 0 to 15 which selects the clock
  2501. source for the baud rate generator. This value corresponds
  2502. to the CLKS value in the BRGx configuration register. See
  2503. the mv64x60 User's Manual.
  2504. - clock-frequence : The frequency (in Hz) of the baud rate
  2505. generator's input clock.
  2506. - current-speed : The current speed setting (presumably by
  2507. firmware) of the baud rate generator.
  2508. Example Discovery BRG node:
  2509. brg@b200 {
  2510. compatible = "marvell,mv64360-brg";
  2511. reg = <0xb200 0x8>;
  2512. clock-src = <8>;
  2513. clock-frequency = <133333333>;
  2514. current-speed = <9600>;
  2515. };
  2516. f) Marvell Discovery CUNIT nodes
  2517. Represent the Serial Communications Unit device hardware.
  2518. Required properties:
  2519. - reg : Offset and length of the register set for this device
  2520. Example Discovery CUNIT node:
  2521. cunit@f200 {
  2522. reg = <0xf200 0x200>;
  2523. };
  2524. g) Marvell Discovery MPSCROUTING nodes
  2525. Represent the Discovery's MPSC routing hardware
  2526. Required properties:
  2527. - reg : Offset and length of the register set for this device
  2528. Example Discovery CUNIT node:
  2529. mpscrouting@b500 {
  2530. reg = <0xb400 0xc>;
  2531. };
  2532. h) Marvell Discovery MPSCINTR nodes
  2533. Represent the Discovery's MPSC DMA interrupt hardware registers
  2534. (SDMA cause and mask registers).
  2535. Required properties:
  2536. - reg : Offset and length of the register set for this device
  2537. Example Discovery MPSCINTR node:
  2538. mpsintr@b800 {
  2539. reg = <0xb800 0x100>;
  2540. };
  2541. i) Marvell Discovery MPSC nodes
  2542. Represent the Discovery's MPSC (Multiprotocol Serial Controller)
  2543. serial port.
  2544. Required properties:
  2545. - device_type : "serial"
  2546. - compatible : "marvell,mv64360-mpsc"
  2547. - reg : Offset and length of the register set for this device
  2548. - sdma : the phandle for the SDMA node used by this port
  2549. - brg : the phandle for the BRG node used by this port
  2550. - cunit : the phandle for the CUNIT node used by this port
  2551. - mpscrouting : the phandle for the MPSCROUTING node used by this port
  2552. - mpscintr : the phandle for the MPSCINTR node used by this port
  2553. - cell-index : the hardware index of this cell in the MPSC core
  2554. - max_idle : value needed for MPSC CHR3 (Maximum Frame Length)
  2555. register
  2556. - interrupts : <a> where a is the interrupt number for the MPSC.
  2557. - interrupt-parent : the phandle for the interrupt controller
  2558. that services interrupts for this device.
  2559. Example Discovery MPSCINTR node:
  2560. mpsc@8000 {
  2561. device_type = "serial";
  2562. compatible = "marvell,mv64360-mpsc";
  2563. reg = <0x8000 0x38>;
  2564. virtual-reg = <0xf1008000>;
  2565. sdma = <&SDMA0>;
  2566. brg = <&BRG0>;
  2567. cunit = <&CUNIT>;
  2568. mpscrouting = <&MPSCROUTING>;
  2569. mpscintr = <&MPSCINTR>;
  2570. cell-index = <0>;
  2571. max_idle = <40>;
  2572. interrupts = <40>;
  2573. interrupt-parent = <&PIC>;
  2574. };
  2575. j) Marvell Discovery Watch Dog Timer nodes
  2576. Represent the Discovery's watchdog timer hardware
  2577. Required properties:
  2578. - compatible : "marvell,mv64360-wdt"
  2579. - reg : Offset and length of the register set for this device
  2580. Example Discovery Watch Dog Timer node:
  2581. wdt@b410 {
  2582. compatible = "marvell,mv64360-wdt";
  2583. reg = <0xb410 0x8>;
  2584. };
  2585. k) Marvell Discovery I2C nodes
  2586. Represent the Discovery's I2C hardware
  2587. Required properties:
  2588. - device_type : "i2c"
  2589. - compatible : "marvell,mv64360-i2c"
  2590. - reg : Offset and length of the register set for this device
  2591. - interrupts : <a> where a is the interrupt number for the I2C.
  2592. - interrupt-parent : the phandle for the interrupt controller
  2593. that services interrupts for this device.
  2594. Example Discovery I2C node:
  2595. compatible = "marvell,mv64360-i2c";
  2596. reg = <0xc000 0x20>;
  2597. virtual-reg = <0xf100c000>;
  2598. interrupts = <37>;
  2599. interrupt-parent = <&PIC>;
  2600. };
  2601. l) Marvell Discovery PIC (Programmable Interrupt Controller) nodes
  2602. Represent the Discovery's PIC hardware
  2603. Required properties:
  2604. - #interrupt-cells : <1>
  2605. - #address-cells : <0>
  2606. - compatible : "marvell,mv64360-pic"
  2607. - reg : Offset and length of the register set for this device
  2608. - interrupt-controller
  2609. Example Discovery PIC node:
  2610. pic {
  2611. #interrupt-cells = <1>;
  2612. #address-cells = <0>;
  2613. compatible = "marvell,mv64360-pic";
  2614. reg = <0x0 0x88>;
  2615. interrupt-controller;
  2616. };
  2617. m) Marvell Discovery MPP (Multipurpose Pins) multiplexing nodes
  2618. Represent the Discovery's MPP hardware
  2619. Required properties:
  2620. - compatible : "marvell,mv64360-mpp"
  2621. - reg : Offset and length of the register set for this device
  2622. Example Discovery MPP node:
  2623. mpp@f000 {
  2624. compatible = "marvell,mv64360-mpp";
  2625. reg = <0xf000 0x10>;
  2626. };
  2627. n) Marvell Discovery GPP (General Purpose Pins) nodes
  2628. Represent the Discovery's GPP hardware
  2629. Required properties:
  2630. - compatible : "marvell,mv64360-gpp"
  2631. - reg : Offset and length of the register set for this device
  2632. Example Discovery GPP node:
  2633. gpp@f000 {
  2634. compatible = "marvell,mv64360-gpp";
  2635. reg = <0xf100 0x20>;
  2636. };
  2637. o) Marvell Discovery PCI host bridge node
  2638. Represents the Discovery's PCI host bridge device. The properties
  2639. for this node conform to Rev 2.1 of the PCI Bus Binding to IEEE
  2640. 1275-1994. A typical value for the compatible property is
  2641. "marvell,mv64360-pci".
  2642. Example Discovery PCI host bridge node
  2643. pci@80000000 {
  2644. #address-cells = <3>;
  2645. #size-cells = <2>;
  2646. #interrupt-cells = <1>;
  2647. device_type = "pci";
  2648. compatible = "marvell,mv64360-pci";
  2649. reg = <0xcf8 0x8>;
  2650. ranges = <0x01000000 0x0 0x0
  2651. 0x88000000 0x0 0x01000000
  2652. 0x02000000 0x0 0x80000000
  2653. 0x80000000 0x0 0x08000000>;
  2654. bus-range = <0 255>;
  2655. clock-frequency = <66000000>;
  2656. interrupt-parent = <&PIC>;
  2657. interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
  2658. interrupt-map = <
  2659. /* IDSEL 0x0a */
  2660. 0x5000 0 0 1 &PIC 80
  2661. 0x5000 0 0 2 &PIC 81
  2662. 0x5000 0 0 3 &PIC 91
  2663. 0x5000 0 0 4 &PIC 93
  2664. /* IDSEL 0x0b */
  2665. 0x5800 0 0 1 &PIC 91
  2666. 0x5800 0 0 2 &PIC 93
  2667. 0x5800 0 0 3 &PIC 80
  2668. 0x5800 0 0 4 &PIC 81
  2669. /* IDSEL 0x0c */
  2670. 0x6000 0 0 1 &PIC 91
  2671. 0x6000 0 0 2 &PIC 93
  2672. 0x6000 0 0 3 &PIC 80
  2673. 0x6000 0 0 4 &PIC 81
  2674. /* IDSEL 0x0d */
  2675. 0x6800 0 0 1 &PIC 93
  2676. 0x6800 0 0 2 &PIC 80
  2677. 0x6800 0 0 3 &PIC 81
  2678. 0x6800 0 0 4 &PIC 91
  2679. >;
  2680. };
  2681. p) Marvell Discovery CPU Error nodes
  2682. Represent the Discovery's CPU error handler device.
  2683. Required properties:
  2684. - compatible : "marvell,mv64360-cpu-error"
  2685. - reg : Offset and length of the register set for this device
  2686. - interrupts : the interrupt number for this device
  2687. - interrupt-parent : the phandle for the interrupt controller
  2688. that services interrupts for this device.
  2689. Example Discovery CPU Error node:
  2690. cpu-error@0070 {
  2691. compatible = "marvell,mv64360-cpu-error";
  2692. reg = <0x70 0x10 0x128 0x28>;
  2693. interrupts = <3>;
  2694. interrupt-parent = <&PIC>;
  2695. };
  2696. q) Marvell Discovery SRAM Controller nodes
  2697. Represent the Discovery's SRAM controller device.
  2698. Required properties:
  2699. - compatible : "marvell,mv64360-sram-ctrl"
  2700. - reg : Offset and length of the register set for this device
  2701. - interrupts : the interrupt number for this device
  2702. - interrupt-parent : the phandle for the interrupt controller
  2703. that services interrupts for this device.
  2704. Example Discovery SRAM Controller node:
  2705. sram-ctrl@0380 {
  2706. compatible = "marvell,mv64360-sram-ctrl";
  2707. reg = <0x380 0x80>;
  2708. interrupts = <13>;
  2709. interrupt-parent = <&PIC>;
  2710. };
  2711. r) Marvell Discovery PCI Error Handler nodes
  2712. Represent the Discovery's PCI error handler device.
  2713. Required properties:
  2714. - compatible : "marvell,mv64360-pci-error"
  2715. - reg : Offset and length of the register set for this device
  2716. - interrupts : the interrupt number for this device
  2717. - interrupt-parent : the phandle for the interrupt controller
  2718. that services interrupts for this device.
  2719. Example Discovery PCI Error Handler node:
  2720. pci-error@1d40 {
  2721. compatible = "marvell,mv64360-pci-error";
  2722. reg = <0x1d40 0x40 0xc28 0x4>;
  2723. interrupts = <12>;
  2724. interrupt-parent = <&PIC>;
  2725. };
  2726. s) Marvell Discovery Memory Controller nodes
  2727. Represent the Discovery's memory controller device.
  2728. Required properties:
  2729. - compatible : "marvell,mv64360-mem-ctrl"
  2730. - reg : Offset and length of the register set for this device
  2731. - interrupts : the interrupt number for this device
  2732. - interrupt-parent : the phandle for the interrupt controller
  2733. that services interrupts for this device.
  2734. Example Discovery Memory Controller node:
  2735. mem-ctrl@1400 {
  2736. compatible = "marvell,mv64360-mem-ctrl";
  2737. reg = <0x1400 0x60>;
  2738. interrupts = <17>;
  2739. interrupt-parent = <&PIC>;
  2740. };
  2741. VIII - Specifying interrupt information for devices
  2742. ===================================================
  2743. The device tree represents the busses and devices of a hardware
  2744. system in a form similar to the physical bus topology of the
  2745. hardware.
  2746. In addition, a logical 'interrupt tree' exists which represents the
  2747. hierarchy and routing of interrupts in the hardware.
  2748. The interrupt tree model is fully described in the
  2749. document "Open Firmware Recommended Practice: Interrupt
  2750. Mapping Version 0.9". The document is available at:
  2751. <http://playground.sun.com/1275/practice>.
  2752. 1) interrupts property
  2753. ----------------------
  2754. Devices that generate interrupts to a single interrupt controller
  2755. should use the conventional OF representation described in the
  2756. OF interrupt mapping documentation.
  2757. Each device which generates interrupts must have an 'interrupt'
  2758. property. The interrupt property value is an arbitrary number of
  2759. of 'interrupt specifier' values which describe the interrupt or
  2760. interrupts for the device.
  2761. The encoding of an interrupt specifier is determined by the
  2762. interrupt domain in which the device is located in the
  2763. interrupt tree. The root of an interrupt domain specifies in
  2764. its #interrupt-cells property the number of 32-bit cells
  2765. required to encode an interrupt specifier. See the OF interrupt
  2766. mapping documentation for a detailed description of domains.
  2767. For example, the binding for the OpenPIC interrupt controller
  2768. specifies an #interrupt-cells value of 2 to encode the interrupt
  2769. number and level/sense information. All interrupt children in an
  2770. OpenPIC interrupt domain use 2 cells per interrupt in their interrupts
  2771. property.
  2772. The PCI bus binding specifies a #interrupt-cell value of 1 to encode
  2773. which interrupt pin (INTA,INTB,INTC,INTD) is used.
  2774. 2) interrupt-parent property
  2775. ----------------------------
  2776. The interrupt-parent property is specified to define an explicit
  2777. link between a device node and its interrupt parent in
  2778. the interrupt tree. The value of interrupt-parent is the
  2779. phandle of the parent node.
  2780. If the interrupt-parent property is not defined for a node, it's
  2781. interrupt parent is assumed to be an ancestor in the node's
  2782. _device tree_ hierarchy.
  2783. 3) OpenPIC Interrupt Controllers
  2784. --------------------------------
  2785. OpenPIC interrupt controllers require 2 cells to encode
  2786. interrupt information. The first cell defines the interrupt
  2787. number. The second cell defines the sense and level
  2788. information.
  2789. Sense and level information should be encoded as follows:
  2790. 0 = low to high edge sensitive type enabled
  2791. 1 = active low level sensitive type enabled
  2792. 2 = active high level sensitive type enabled
  2793. 3 = high to low edge sensitive type enabled
  2794. 4) ISA Interrupt Controllers
  2795. ----------------------------
  2796. ISA PIC interrupt controllers require 2 cells to encode
  2797. interrupt information. The first cell defines the interrupt
  2798. number. The second cell defines the sense and level
  2799. information.
  2800. ISA PIC interrupt controllers should adhere to the ISA PIC
  2801. encodings listed below:
  2802. 0 = active low level sensitive type enabled
  2803. 1 = active high level sensitive type enabled
  2804. 2 = high to low edge sensitive type enabled
  2805. 3 = low to high edge sensitive type enabled
  2806. VIII - Specifying GPIO information for devices
  2807. ==============================================
  2808. 1) gpios property
  2809. -----------------
  2810. Nodes that makes use of GPIOs should define them using `gpios' property,
  2811. format of which is: <&gpio-controller1-phandle gpio1-specifier
  2812. &gpio-controller2-phandle gpio2-specifier
  2813. 0 /* holes are permitted, means no GPIO 3 */
  2814. &gpio-controller4-phandle gpio4-specifier
  2815. ...>;
  2816. Note that gpio-specifier length is controller dependent.
  2817. gpio-specifier may encode: bank, pin position inside the bank,
  2818. whether pin is open-drain and whether pin is logically inverted.
  2819. Example of the node using GPIOs:
  2820. node {
  2821. gpios = <&qe_pio_e 18 0>;
  2822. };
  2823. In this example gpio-specifier is "18 0" and encodes GPIO pin number,
  2824. and empty GPIO flags as accepted by the "qe_pio_e" gpio-controller.
  2825. 2) gpio-controller nodes
  2826. ------------------------
  2827. Every GPIO controller node must have #gpio-cells property defined,
  2828. this information will be used to translate gpio-specifiers.
  2829. Example of two SOC GPIO banks defined as gpio-controller nodes:
  2830. qe_pio_a: gpio-controller@1400 {
  2831. #gpio-cells = <2>;
  2832. compatible = "fsl,qe-pario-bank-a", "fsl,qe-pario-bank";
  2833. reg = <0x1400 0x18>;
  2834. gpio-controller;
  2835. };
  2836. qe_pio_e: gpio-controller@1460 {
  2837. #gpio-cells = <2>;
  2838. compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank";
  2839. reg = <0x1460 0x18>;
  2840. gpio-controller;
  2841. };
  2842. Appendix A - Sample SOC node for MPC8540
  2843. ========================================
  2844. Note that the #address-cells and #size-cells for the SoC node
  2845. in this example have been explicitly listed; these are likely
  2846. not necessary as they are usually the same as the root node.
  2847. soc8540@e0000000 {
  2848. #address-cells = <1>;
  2849. #size-cells = <1>;
  2850. #interrupt-cells = <2>;
  2851. device_type = "soc";
  2852. ranges = <00000000 e0000000 00100000>
  2853. reg = <e0000000 00003000>;
  2854. bus-frequency = <0>;
  2855. mdio@24520 {
  2856. reg = <24520 20>;
  2857. device_type = "mdio";
  2858. compatible = "gianfar";
  2859. ethernet-phy@0 {
  2860. linux,phandle = <2452000>
  2861. interrupt-parent = <40000>;
  2862. interrupts = <35 1>;
  2863. reg = <0>;
  2864. device_type = "ethernet-phy";
  2865. };
  2866. ethernet-phy@1 {
  2867. linux,phandle = <2452001>
  2868. interrupt-parent = <40000>;
  2869. interrupts = <35 1>;
  2870. reg = <1>;
  2871. device_type = "ethernet-phy";
  2872. };
  2873. ethernet-phy@3 {
  2874. linux,phandle = <2452002>
  2875. interrupt-parent = <40000>;
  2876. interrupts = <35 1>;
  2877. reg = <3>;
  2878. device_type = "ethernet-phy";
  2879. };
  2880. };
  2881. ethernet@24000 {
  2882. #size-cells = <0>;
  2883. device_type = "network";
  2884. model = "TSEC";
  2885. compatible = "gianfar";
  2886. reg = <24000 1000>;
  2887. mac-address = [ 00 E0 0C 00 73 00 ];
  2888. interrupts = <d 3 e 3 12 3>;
  2889. interrupt-parent = <40000>;
  2890. phy-handle = <2452000>;
  2891. };
  2892. ethernet@25000 {
  2893. #address-cells = <1>;
  2894. #size-cells = <0>;
  2895. device_type = "network";
  2896. model = "TSEC";
  2897. compatible = "gianfar";
  2898. reg = <25000 1000>;
  2899. mac-address = [ 00 E0 0C 00 73 01 ];
  2900. interrupts = <13 3 14 3 18 3>;
  2901. interrupt-parent = <40000>;
  2902. phy-handle = <2452001>;
  2903. };
  2904. ethernet@26000 {
  2905. #address-cells = <1>;
  2906. #size-cells = <0>;
  2907. device_type = "network";
  2908. model = "FEC";
  2909. compatible = "gianfar";
  2910. reg = <26000 1000>;
  2911. mac-address = [ 00 E0 0C 00 73 02 ];
  2912. interrupts = <19 3>;
  2913. interrupt-parent = <40000>;
  2914. phy-handle = <2452002>;
  2915. };
  2916. serial@4500 {
  2917. device_type = "serial";
  2918. compatible = "ns16550";
  2919. reg = <4500 100>;
  2920. clock-frequency = <0>;
  2921. interrupts = <1a 3>;
  2922. interrupt-parent = <40000>;
  2923. };
  2924. pic@40000 {
  2925. linux,phandle = <40000>;
  2926. clock-frequency = <0>;
  2927. interrupt-controller;
  2928. #address-cells = <0>;
  2929. reg = <40000 40000>;
  2930. built-in;
  2931. compatible = "chrp,open-pic";
  2932. device_type = "open-pic";
  2933. big-endian;
  2934. };
  2935. i2c@3000 {
  2936. interrupt-parent = <40000>;
  2937. interrupts = <1b 3>;
  2938. reg = <3000 18>;
  2939. device_type = "i2c";
  2940. compatible = "fsl-i2c";
  2941. dfsrr;
  2942. };
  2943. };