booting-without-of.txt 129 KB

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