mirror of
git://nv-tegra.nvidia.com/3rdparty/dtc-src/1.4.5.git
synced 2025-12-22 09:12:08 +03:00
dfac199a7539a404407098a2541b9482279f690d - dtc-1.4.5/GPL 688431c05a68fedfcb7a36fb482a952d75b05a75 - dtc-1.4.5/Makefile a4555a920b020b1bb06ca45224d692c0094362c1 - dtc-1.4.5/fdtoverlay.c 81ec523838a03a9f6e95e6e6b4a57a0a2b81620a - dtc-1.4.5/.gitignore d525dcaa04b47f205c8cb69936399691e89b1fbb - dtc-1.4.5/README 29d5b51f10d7874704f2faaf9741d793e973a8ba - dtc-1.4.5/fdtget.c db29d7f8b36abb5ab1d3c0ff25a2e056cbb7471e - dtc-1.4.5/flattree.c cab130d5213077509e3b7c88fb99c589945625f1 - dtc-1.4.5/fdtput.c e6060b19e275bde4187546231ba289a486d987e9 - dtc-1.4.5/README.license 95a16c709f1da90f55607005158862d34bd777ca - dtc-1.4.5/data.c 01c714a2f40e85b39871ff83605edbf2078ffe57 - dtc-1.4.5/srcpos.c 3c3ab9789cf4a6bce3448e8fbfdc9f2df2bd2aff - dtc-1.4.5/treesource.c aa5cc18bcc85135e1d2a053a9ee8a3c40fc6ae7b - dtc-1.4.5/dtdiff ebfc1d387c8ae94200e421549e1a301add720c66 - dtc-1.4.5/dtc.c ce3d01a2829cf142f32579b9b429c0a53fc27bdb - dtc-1.4.5/dtc-lexer.l 53a52ecbb1b16bf144144f68c5e681f9554ff862 - dtc-1.4.5/util.h e565c2b61d5c44d608b35f52a321ea68ccc794b0 - dtc-1.4.5/dtc-parser.y 453c878d681e2e6bbfec2a0b522e7e05e2363056 - dtc-1.4.5/checks.c a39cc082f177f5f833b7fbfa2a35f8ca88f41826 - dtc-1.4.5/Makefile.dtc edc3f2659d0771955ddea5e11f6d4d8b73dbd85b - dtc-1.4.5/.travis.yml 0cb72d7f3aeaee1cb122bac3c9d4c2227725b8f0 - dtc-1.4.5/fstree.c e5147ec0a4049d9551c81c703e5fd4d51db8f366 - dtc-1.4.5/Makefile.convert-dtsv0 5ea9fc651c441c3cd5a381092581ed691dc49d5d - dtc-1.4.5/fdtdump.c ce99f6374471fc140add69b0c86f623b4fe23186 - dtc-1.4.5/util.c 597d528effbe428cb6bacc6d4a4d093644e3fbd4 - dtc-1.4.5/dtc.h cc0e7e5a498451c733e735ed95db6c2591aaf868 - dtc-1.4.5/Makefile.utils 25ae5e897cd351320137faa6577f11cf585f32da - dtc-1.4.5/srcpos.h c56abdacfd7fe1144c6e68e7b1d0465e66e1545b - dtc-1.4.5/TODO 2c9a841513149efc0f5234215752b58b1c93a0f6 - dtc-1.4.5/convert-dtsv0-lexer.l 2e76fbfb41b15c4a60f2479eb1657308d4a024e1 - dtc-1.4.5/livetree.c 23dae1b1e6d96cbf7557ceac42bfa1cf13936ad5 - dtc-1.4.5/libfdt/fdt_wip.c cb6dd625a5f8e41e0a0312c2bed4ba2167e62750 - dtc-1.4.5/libfdt/fdt_ro.c 2eb4a858b80211c6b700414b37b3ba1d9558ace1 - dtc-1.4.5/libfdt/fdt.h 9a1e89e0a6ad35bb3463e3a3f87dd7626d918c20 - dtc-1.4.5/libfdt/fdt_overlay.c ebadc1eeeb3e463427b13de190569c9ca3849c27 - dtc-1.4.5/libfdt/fdt_rw.c cb09ff924d581148c98dce072ecdaee4c5f289cd - dtc-1.4.5/libfdt/fdt.c 09a844c8978591b0af11e81928b851d4599a40fa - dtc-1.4.5/libfdt/fdt_empty_tree.c a288dd3281a869616871849278224af702129e47 - dtc-1.4.5/libfdt/libfdt_env.h e1c374080fc1e9f2101102f8aeb356082fe370c8 - dtc-1.4.5/libfdt/fdt_strerror.c e49c8031e598fa2956bb26367570d8c06745367f - dtc-1.4.5/libfdt/fdt_sw.c 9332862189cd63c6d7e7e80c6b67446181fdd4c4 - dtc-1.4.5/libfdt/libfdt_internal.h b929dc832e5ad67a6027aa0fdb3d39868f10125e - dtc-1.4.5/libfdt/Makefile.libfdt 431fd6a95e97ff1fec779f086cf35833c2bc33dd - dtc-1.4.5/libfdt/fdt_addresses.c 31ae7f44847e5a4e4a207f182dbb80f8714ec510 - dtc-1.4.5/libfdt/version.lds f88a9a1f847941e4e8d8cd75b8337251c2ac8a1b - dtc-1.4.5/libfdt/libfdt.h 96d83160ed4341696adae458a154984eec3c7dfc - dtc-1.4.5/libfdt/TODO 628865d7616d254cc4c7996d1e972842ad922d98 - dtc-1.4.5/scripts/kup-dtc 2a320e30ee21461af08bb76f4051052044441de8 - dtc-1.4.5/scripts/setlocalversion 5b6353ff199345f7dde7fd8dcaaf32441befef95 - dtc-1.4.5/tests/obsolete-chosen-interrupt-controller.dts 1a13a82806e74da0fe7e39587e6bb9d6323d0012 - dtc-1.4.5/tests/truncated_property.c e04703bdbb788f6f519059006d11a04c66c2d4e9 - dtc-1.4.5/tests/nonexist-label-ref.dts 6fb4a06a4267d2efe200ba82a2516817c70e7338 - dtc-1.4.5/tests/boot-cpuid.c 7e60aa8d9e1d0fc859d83bb287b12c7884b51d54 - dtc-1.4.5/tests/minusone-phandle.dts a92ee30ee224515ec9e74dd392d22f1c370583c1 - dtc-1.4.5/tests/test_tree1_wrong4.dts 17a04207b4941b17fd362cb2e4cd958e3e74ad91 - dtc-1.4.5/tests/test01.dts b1ee15fb5ad66b865f12e6994c4c8cd8ff125d57 - dtc-1.4.5/tests/dtbs_equal_ordered.c dc4372a1ce8bf6a8175133dbc747b8e5802ef767 - dtc-1.4.5/tests/bad-gpio.dts e597380112f351dc1d96530824b4c9eab2130c8b - dtc-1.4.5/tests/mangle-layout.supp 1a1de5c063dff543882f638a0dc5801628364556 - dtc-1.4.5/tests/extra-terminating-null.c db16441c4b330570a9ac83b0e0b006fcd74cc32b - dtc-1.4.5/tests/incbin.bin e94ef627a9dbfae24ea5eaccc985ced1738ad96f - dtc-1.4.5/tests/test_tree1_wrong9.dts b3d47e46906126d2e0277adb8c35e6fc22e6380e - dtc-1.4.5/tests/include8.dts a2cd7d79b779d2adfe2ec0c6b2a87312287c7abe - dtc-1.4.5/tests/include5a.dts 3e3767ef8b845fa7cace62543fda1fb19dd59d9d - dtc-1.4.5/tests/include2.dts 45e3fa0098f1d154ea2c1b3b61e87853f63cc4c2 - dtc-1.4.5/tests/sw_tree1.supp 58a4885d5573e8f0153839633f0c27820b373359 - dtc-1.4.5/tests/.gitignore 8f42d8e919b03dc09cac7ab58b2f9a28c830c9f5 - dtc-1.4.5/tests/stringlist.dts 968572da053916799c6b292dbd7ae6aba6755eda - dtc-1.4.5/tests/stacked_overlay_bar.dts 5fe77cdfa90bb405ded8bf20f7c3ed796f40abd5 - dtc-1.4.5/tests/reuse-label5.dts e7e02f700b8e537130b0bc7a5fd9459660f8060c - dtc-1.4.5/tests/subnode_offset.c 7eae2be2813b5dca217a4e56bf8fae289e35166b - dtc-1.4.5/tests/Makefile.tests e2d500c1ce6a9cff11cfba7b3859ebbcbbc588f4 - dtc-1.4.5/tests/trees.S d576360fbfe36cc1f2c8f8c879f9109ab7cf9001 - dtc-1.4.5/tests/overlay_bad_fixup_index_trailing.dts 0082526b79f4d6d567faa039b5bec0295b5ec40b - dtc-1.4.5/tests/incbin.c 0886327c6106fd381312af3ceca674a4101380e0 - dtc-1.4.5/tests/nonexist-node-ref2.dts fd68ece161bb07980e8ab678c61e293439906e2e - dtc-1.4.5/tests/run_tests.sh 4d98a0b920d0a7d37426b858e02387b16f007d58 - dtc-1.4.5/tests/overlay_overlay.dts 99c9cab16ce9f3db83dab99f1798f0bee79f055c - dtc-1.4.5/tests/open_pack.supp 210a4bfe688816869d79d5e9ce31a0a757441921 - dtc-1.4.5/tests/embedded_nul.dts 67c6674e15b3157690e444af5b5bedbd987659e2 - dtc-1.4.5/tests/overlay.c cfcd5acf194801ca0b01302bf1d64eabeca89f68 - dtc-1.4.5/tests/value-labels.c e3accfdb6f94c8d1bebcca85d9a5b52db0333670 - dtc-1.4.5/tests/sw_tree1.c 17846cb1d5428c6b0736ebcf8c2426dce37b47cf - dtc-1.4.5/tests/tests.h 773742f1338a51bde4d17f50b8ce97aac353a4ce - dtc-1.4.5/tests/overlay_bad_fixup_bad_index.dts 2a3c7f084000959f1b8fb4c405c23baf507835eb - dtc-1.4.5/tests/subnode_iterate.dts 7d6aa332681677fa7ac56d3390d1790b24ecc67f - dtc-1.4.5/tests/del_node.c 50be2e1000a7f0e19b94276143ed086a3081d161 - dtc-1.4.5/tests/get_path.c 4d1ae34edf08284d07b15103276d9c2a90059528 - dtc-1.4.5/tests/property_iterate.dts 097641bc7cdb15643af0ce67afa53910b559fa71 - dtc-1.4.5/tests/test_tree1_wrong5.dts b98faf87f6f8dc361fc5fb11938921027c08b84f - dtc-1.4.5/tests/overlay_bad_fixup.c cc5da65a932ea3005fb828dd16adb4b6049c0503 - dtc-1.4.5/tests/reuse-label6.dts 0bbd9c00bbe4150c13eed944cb787cf1480ddb9a - dtc-1.4.5/tests/references.dts 09c7a2b43ab5861b597da0497506e5a1a6ea1a9c - dtc-1.4.5/tests/include6.dts bdcecf87f4aeb28c666d1196253746415f459864 - dtc-1.4.5/tests/overlay_bad_fixup_path_empty_prop.dts 53d884493b1a91d6d94e2d9fef517f9edbbdb7ec - dtc-1.4.5/tests/test_kernel_dts 3f29e779d64b1fb3fe743c958473e6a37879e1d9 - dtc-1.4.5/tests/path_offset_aliases.c bace86d14d5a88839dc38c67b7bfdb78a0cd30f7 - dtc-1.4.5/tests/overlay_overlay_manual_fixups.dts e15294970cf6645789ecb2fa573f4cfcdfc18008 - dtc-1.4.5/tests/appendprop2.c 78c9a2794d6684c52e601e58a6348f808a667122 - dtc-1.4.5/tests/bad-interrupt-cells.dts dc911a4dd77c234586d0abdfccb66d23b990279f - dtc-1.4.5/tests/test01.asm c58561b0a7af860779d89d27ebd4fbcfe3dd9862 - dtc-1.4.5/tests/base01.asm 4c182e2cd290bbc9677007b2cc26d526525cea7e - dtc-1.4.5/tests/overlay_base_manual_symbols.dts 3d58b283fc73faeab28eddf460ba97a401469c8c - dtc-1.4.5/tests/nonexist-node-ref.dts 1450026fe5e5d5c0854803d9d90567e9999a7c94 - dtc-1.4.5/tests/getprop.c ca049c8511a0081118bca5cc76d17a5214b6fe9a - dtc-1.4.5/tests/fdtput-runtest.sh 557bd08f0cb8a37abd7568e5857508b1dd861474 - dtc-1.4.5/tests/parent_offset.c ff6959ed32b3495ef5766c03da4f312488bb3983 - dtc-1.4.5/tests/deps_inc1.dtsi 7856fa203be221173cb6bafca81bf394a4f355bd - dtc-1.4.5/tests/test_tree1_merge.dts 4e44e71434ff788af4781ee934c70331870458ca - dtc-1.4.5/tests/path-references.c e000be7a8d461e4a76027d36cc9c4839fbc2d58d - dtc-1.4.5/tests/node_offset_by_phandle.c 8abd5ffeb21a0ebc6795240d73152acb2240f442 - dtc-1.4.5/tests/include5.dts 7895dc6b800832b032bc29c87e78b1c97408f605 - dtc-1.4.5/tests/search_paths.dts d0d88754d30e63fedd93010747838960d98c915e - dtc-1.4.5/tests/dup-propname.dts e03aa51b95a671a3f98cae0051cd3474b7c207dd - dtc-1.4.5/tests/test_tree1_wrong7.dts 56b55df15337c52aac7c0246a5d44b3e82b76c6f - dtc-1.4.5/tests/overlay_base.dts 0e209c69b49d699ee05d19ae1424ea08585b1b6b - dtc-1.4.5/tests/pylibfdt_tests.py 4548237d664096155c80836bb9f273adddf7b6d6 - dtc-1.4.5/tests/comments-cmp.dts a9415e9554e16fc01e5978cea5881c7ef5ddee40 - dtc-1.4.5/tests/node_offset_by_prop_value.c 2b5cf055b95da40dfa61458471fe259db8e9d0ee - dtc-1.4.5/tests/extra-terminating-null.dts 6cf4266274b916b715ada14627a86b19435a202e - dtc-1.4.5/tests/subnode_iterate.c 95a8a947549e7daaea521605f6bd4613d006dd29 - dtc-1.4.5/tests/fdtget-runtest.sh b71203a02d1cb91de3b063e87aab076fee50cb3f - dtc-1.4.5/tests/references.c 064610a3c824b272b84c94e2518ed42b09e598ff - dtc-1.4.5/tests/reuse-label4.dts dfd7e528eefbe6be39865053c8d1787ab95faf81 - dtc-1.4.5/tests/add_subnode_with_nops.c 18a64c7d93e2dc77c78cca13d9d187a0a2ee5d83 - dtc-1.4.5/tests/del_property.c 825eaa2f39e18b03c44e4fc04869294fb955d56c - dtc-1.4.5/tests/dup-nodename.dts a34a59272e4ded11d69fa1563608a7cf417efb53 - dtc-1.4.5/tests/addresses.dts a9323cf5194c13e3c29af052c1a85286f9492fa4 - dtc-1.4.5/tests/overlay_bad_fixup_base.dtsi d2e394c31434137df0d3989fb15cebeec2bed2e7 - dtc-1.4.5/tests/base01.stderr c267915a9a6b62629b509d13990b19aac4ad44ca - dtc-1.4.5/tests/fdtoverlay-runtest.sh 6225480114e8a14d25c2bd170f55ed78529db893 - dtc-1.4.5/tests/bad-ncells.dts 1ea38bf20a653f9b757f98160739a90737c4ce00 - dtc-1.4.5/tests/reg-ranges-root.dts 03e8cf8533103cb87b399fef32a36514b64bdcbc - dtc-1.4.5/tests/dtbs_equal_unordered.c c3bbd9a0eb2ce642a716955eab223cca11e427ac - dtc-1.4.5/tests/overlay_bad_fixup_empty.dts a6f8e3450be51ce6cd2ec18fa592726889b616ee - dtc-1.4.5/tests/char_literal.dts 627781fdd8a4fc415142e12d0edd5f7ac92f8f14 - dtc-1.4.5/tests/check_path.c c27562784d986c84137d4e2500b8b3e321d46a1b - dtc-1.4.5/tests/nopulate.c 238b692003697e0cc242d047971bb6a3af60b464 - dtc-1.4.5/tests/nul-in-line-info2.dts 48599e299578b9ca040e45ab220edbb397a55108 - dtc-1.4.5/tests/embedded_nul_equiv.dts a577bd5b22f52302600164b952210ee0a69b86fe - dtc-1.4.5/tests/stringlist.c 606a0da173c3d23f841cf8f5184a867f3cc9b1f3 - dtc-1.4.5/tests/utilfdt_test.c 1171b227d4252d704d9a300c0cd5e85e244b55e9 - dtc-1.4.5/tests/include4.dts 6e38c669946d6d95d026f40d735e730ade3aa714 - dtc-1.4.5/tests/deps_inc2.dtsi c31535957cc2cea57dab87317a0bbb7c5a107b0c - dtc-1.4.5/tests/label01.dts 944504b8f4474793305037eddf9dd13979265432 - dtc-1.4.5/tests/get_name.c aadb873ed244256fb50ea64d1b25b7796ffcffca - dtc-1.4.5/tests/include7.dts 6ff537c825a6683b1e857eebd754a1cdfc18d75c - dtc-1.4.5/tests/phandle_format.c 4cdb0a0f5aeddf820d35d5f9154e4359325c3e2e - dtc-1.4.5/tests/reuse-label.dts fdf6935c1ab9032dc683ecfff2cc21f0185370f4 - dtc-1.4.5/tests/bad-name-property.dts b0a1a56999d7db375e2e52055cbcf8f60ebf7077 - dtc-1.4.5/tests/overlay_overlay_simple.dts b6517c85f38b3175d84d2986922d1751c92d242e - dtc-1.4.5/tests/appendprop.dts e7e1445b585cd04a7992a66c346374f9c97a1188 - dtc-1.4.5/tests/bad-reg-ranges.dts b5a2155cb7a8d9094f7de6f7bb16442abaf42436 - dtc-1.4.5/tests/unit-addr-leading-0s.dts 05057f2e73c3d8a5c9dfea99ccfe6553cafcbf74 - dtc-1.4.5/tests/bad-string-props.dts 27ac33471f9f470dd15959f1b43a58582b763298 - dtc-1.4.5/tests/root_node.c 8f1d286da170262b3ac2e705c175bd6cf1af14cd - dtc-1.4.5/tests/multilabel.dts df629984df17b68032f9e61a688865fe5ec52798 - dtc-1.4.5/tests/move_and_save.c 59f8b8532a360f30d639aee56ecf821d8810c39e - dtc-1.4.5/tests/empty.dts 587400ca7d9a39476a5162859da7d21f9e816d64 - dtc-1.4.5/tests/testdata.h 399a348f311be369f68220b3732fcefde0f740f1 - dtc-1.4.5/tests/test_tree1.dts 94e0a5da6d15f081a21a2a5d02bbf45c3f85b62b - dtc-1.4.5/tests/supernode_atdepth_offset.c c5deddb0fb0cd547da34fcaf924bdbe303b17492 - dtc-1.4.5/tests/test_tree1_wrong2.dts 49599b99ec6deb90718c05cb56711f1072ef623a - dtc-1.4.5/tests/reg-without-unit-addr.dts 6e6a7ec861bd63506d082a793bda483f8540be5b - dtc-1.4.5/tests/open_pack.c 08a95e2c1ce9ff35b2b6d9bad6a31bda3d2dadb4 - dtc-1.4.5/tests/overlay_bad_fixup_empty_index.dts 29a54f5c1c352e672dd7742b342629f356e5df6e - dtc-1.4.5/tests/zero-phandle.dts 8b046ab9a11a0c3a6780cf09cc82b5a6c5cec5c9 - dtc-1.4.5/tests/overlay_bad_fixup_path_prop.dts 9bc91516a068a176123a69777f41ad435c82933f - dtc-1.4.5/tests/string_escapes.c c33c776418f1a2f4206f32680137822d6665eb89 - dtc-1.4.5/tests/mangle-layout.c 2e52702a5a474751f42991a4c68246a7c6356102 - dtc-1.4.5/tests/default-addr-size.dts 7c16967c713c20f58949e9a1d64dd14fcc0006a1 - dtc-1.4.5/tests/escapes.dts 265a369071203707125f015936d258f095f7db10 - dtc-1.4.5/tests/dtc-fatal.sh da2bc0ecdecb507bfd11c951c3f0612834fcc922 - dtc-1.4.5/tests/nul-in-escape.dts 58bb1310303666817f190475c130e19a411a0c1f - dtc-1.4.5/tests/base01.dts a1720d7f7d1c022c7e4f6717009a691693556aa1 - dtc-1.4.5/tests/find_property.c 03e96eb3ee1f650106cb90e06a4841681de15197 - dtc-1.4.5/tests/addr_size_cells.c a748aadffd49ef78eeac7ad521a0d84aebcdbdbf - dtc-1.4.5/tests/dumptrees.c f0eeb4b91084a61d9008a90d09b86425f4733c0c - dtc-1.4.5/tests/test01.stderr 8700502c294e949f908fa5c0c44248bd96af5ca6 - dtc-1.4.5/tests/dtc-fails.sh 9dcc1f85d0c8a1ce34c57d64c8e3fff4920f2df7 - dtc-1.4.5/tests/asm_tree_dump.c 1e8705f0eaec9950cd074b09b8463ede99a019b6 - dtc-1.4.5/tests/test_label_ref.dts 1ab3cfcd6d35f35618dc3d0b90a1b093a3467c1d - dtc-1.4.5/tests/division-by-zero.dts 06d3aebaaa4a26b6cb8fc1b3804fbef8d3ddd9ac - dtc-1.4.5/tests/line_directives.dts 9f00325b7377977b942eb0a1e01f978c806482f4 - dtc-1.4.5/tests/property_iterate.c 0181f2cb1a32b682733fa9db274226c7745c80cd - dtc-1.4.5/tests/test_tree1_delete.dts bcc58605628d627ab670e8afe59d82916737e534 - dtc-1.4.5/tests/comments.dts 21e36b524a10b28810260a151e718818b79d87d1 - dtc-1.4.5/tests/sized_cells.c 3d6060bcbb5d4e369be0b5b518f0b80fd448faa0 - dtc-1.4.5/tests/setprop.c 82c9e391f5ba20d3b1c56ea7978a925f60481f18 - dtc-1.4.5/tests/overlay_overlay_no_fixups.dts c825d82e7ed5fa8bdc4b0cd04cca5cc73a156709 - dtc-1.4.5/tests/bad-octal-literal.dts 444db827745be8840705a7cce26b024194624d15 - dtc-1.4.5/tests/incbin.dts 6ea01b148f3a82e51d775f9fadc37602ffe095ed - dtc-1.4.5/tests/testutils.c 026b4b16a20b6e79c02dba88f997f35d9562bb30 - dtc-1.4.5/tests/appendprop1.c 132e01eefa23f6a8c7b88c2a234b04c7d6529e4c - dtc-1.4.5/tests/unit-addr-without-reg.dts 9533807e3b9982017e411ba37f29dc322e691b68 - dtc-1.4.5/tests/unit-addr-leading-0x.dts 5286525de751b12c681101f6336d48533d904aa5 - dtc-1.4.5/tests/node_check_compatible.c 3f3316bfa1b4b2e718c30765c999b5a7075af3bd - dtc-1.4.5/tests/sized_cells.dts 09d871f55acf837e1467bde782781212dfecabc1 - dtc-1.4.5/tests/dependencies.dts 66f3655753343a0b87ff386da265bede08f99aee - dtc-1.4.5/tests/path_offset.c f62430e11919a194daf565d6681a1df5fc6017f9 - dtc-1.4.5/tests/fdtdump-runtest.sh c05d5b477def26d28273932ffc2bac34a91f4b8e - dtc-1.4.5/tests/propname_escapes.c e6f56bdf21ace78b4e2150b088263c3ce7e1f1c9 - dtc-1.4.5/tests/test_tree1_merge_path.dts c95ed15e2b3847366ecf12d1a7c8f4756ee745e6 - dtc-1.4.5/tests/delete_reinstate_multilabel_ref.dts fd7d8b2bb9a288532134b0c82ee7fc3d7c983bfb - dtc-1.4.5/tests/dependencies.cmp 80911d8420ea3e794b86bd9c04aeae892eaad657 - dtc-1.4.5/tests/label_repeated.dts 3150edab60c72057f68b275f7f0bd2abeabf67de - dtc-1.4.5/tests/nop_property.c 1df4762532e24bf29f9cfaf82772fef9487683d2 - dtc-1.4.5/tests/search_paths_b.dts 52cf04b57ff7424ca1c57a12f5df19247940a3eb - dtc-1.4.5/tests/fdtdump.dts 332afd52254b8dbfaff4c7c1644d8c73cac2d855 - dtc-1.4.5/tests/stacked_overlay_baz.dts 02eef4caeaddab2f3722b86026ce2e1e434cde14 - dtc-1.4.5/tests/reuse-label1.dts bdd28adcd03ea8a4c41a3e75de84a85c6938a044 - dtc-1.4.5/tests/dtc-checkfails.sh 53995be36144e22baca01a26b5c2113e5e9dea11 - dtc-1.4.5/tests/overlay_bad_fixup_path_only_sep.dts 6d74b16a531067c828acfdf118ecd5765f3168da - dtc-1.4.5/tests/node_offset_by_compatible.c 05a8ec0dae916212ba5e29c17ab63c766b8f6142 - dtc-1.4.5/tests/nop_node.c badb0d8f62608674030ca278620b061f1d53f625 - dtc-1.4.5/tests/notfound.c 52ffd7a9b99beedbf46df87b18396daf91187d2d - dtc-1.4.5/tests/test_tree1_label_noderef.dts ccecd5a83df37929613b6fdde5c88c3ecc8e84a8 - dtc-1.4.5/tests/include3.dts 78c91d2a0808bae30377b1dae9731c15725a972d - dtc-1.4.5/tests/prop-after-subnode.dts 42a972b76e039f30913fa708eb708901ed470c38 - dtc-1.4.5/tests/test_tree1_wrong8.dts c7f82cecdd0ce4ca602890f2dd9d029d216deddf - dtc-1.4.5/tests/get_alias.c 771dc03d722d5c951a41f1fbab202f3f66f9a91e - dtc-1.4.5/tests/aliases.dts 2d816cf202120e151e9a4c10a11a68c4115f4f29 - dtc-1.4.5/tests/value-labels.dts 555bcf861816bdd82884301d1de455221cb1d288 - dtc-1.4.5/tests/data.S c925cf6f789d4e7b879863a4414b3805a201cbae - dtc-1.4.5/tests/base01.cmd 03535626db5128f181593328582a7ef441776e2f - dtc-1.4.5/tests/sourceoutput.dts a82abc5909ca25c13485da36752562db0acb1d3e - dtc-1.4.5/tests/get_mem_rsv.c 7b4ee02efa4d17433ba49c82dd2f30f1773c9d7a - dtc-1.4.5/tests/boot-cpuid.dts 55074ad8e933275058412606c278e1002a94b55a - dtc-1.4.5/tests/bad-size-cells.dts fda3eb684c8ea2dae5845f23fd2f18ac8719d3e1 - dtc-1.4.5/tests/reuse-label3.dts 1187a7fb193ca9eb92ddbfb1500cf9ec7595a43a - dtc-1.4.5/tests/dtb_reverse.c cd3ebe8d5c0e89669dc866b78d74611ec1d399cb - dtc-1.4.5/tests/reuse-label2.dts fbaa8c4c9b156b24b74456bc8824f1aa6e777ec3 - dtc-1.4.5/tests/include1.dts 18a5eaaf67886b19caeec13d1f91fbac9dab40ea - dtc-1.4.5/tests/include0.dts e220e5db0820592bd028adb9431401970522cd93 - dtc-1.4.5/tests/nul-in-line-info1.dts 9cb78df0d0f7fd73119b57ce7a171704631af5e4 - dtc-1.4.5/tests/delete_reinstate_multilabel.dts ba55daa9627a9fa3af7ddbbb4c8e23b159fef96b - dtc-1.4.5/tests/char_literal.c 7997cfd671338152e5947ad6e3a7476b762f84b0 - dtc-1.4.5/tests/set_name.c f7c3f569b0ef5a9c2ffe17656de222437bdcba78 - dtc-1.4.5/tests/overlay_bad_fixup_path_only.dts 738ebbc0f6e1fc9e4462d3b74081a83335be17aa - dtc-1.4.5/tests/bad-empty-ranges.dts 3a30897484d829884db97735b23fedec00d1df18 - dtc-1.4.5/tests/test_tree1_wrong3.dts f3b0a0b0586f072ca642e33648ad6a8cc88f0ac9 - dtc-1.4.5/tests/setprop_inplace.c 549b82463e24ea3d3cbb8992cc21c8ea65686671 - dtc-1.4.5/tests/test_tree1_merge_labelled.dts 7ff38d835b0084e9a2fa409cd697a2e0d135ac19 - dtc-1.4.5/tests/tests.sh 86e03f6d539ccb33585658f93b9b53e89534719c - dtc-1.4.5/tests/path-references.dts 42c311ee4bcf10bd46c6894d5338d00b69a0a7e7 - dtc-1.4.5/tests/propname_escapes.dts 32913f10eab70e2a11e13a7d4a0f31aee903a53d - dtc-1.4.5/tests/test_tree1_wrong6.dts d7da06091195ba54e6904bd46ccd5aeb5445c22a - dtc-1.4.5/tests/test_tree1_wrong1.dts 54b58cc0e02047df34ab21ff906ad4d8669521c8 - dtc-1.4.5/tests/bad-phandle-cells.dts 2c7f7bed3fa31d608e32095cc3469559a80376df - dtc-1.4.5/tests/multilabel_merge.dts 81c4b081a92462f90ffa24915b2cad76cb687f88 - dtc-1.4.5/tests/dup-phandle.dts 665f89ab83944d57bb09f3a18a1391280f446db3 - dtc-1.4.5/tests/rw_tree1.c 90fd6ea3d82dfc9cadd37a93e3a62fc72e6b336d - dtc-1.4.5/tests/integer-expressions.c e8c561bde2558fb895f327e6e005c7af8818a1f5 - dtc-1.4.5/tests/stacked_overlay_base.dts 0ea1b9337b59fd9872199301ac37114c37a2a620 - dtc-1.4.5/tests/get_phandle.c 448994a1143852a9b1154db51a9db49d717d9c31 - dtc-1.4.5/tests/search_dir_b/search_test_c.dtsi 74d5e33802b093e2abd21b884a018223a853c93d - dtc-1.4.5/tests/search_dir_b/search_test_b.dtsi 60d17f79adc996b2b1ea979208cca39f6acf4145 - dtc-1.4.5/tests/search_dir_b/search_paths_subdir.dts e3a9bc2e23703093aca0d62db5587a8c7da3e9a3 - dtc-1.4.5/tests/search_dir_b/search_test_b2.dtsi a3efef7df14727a6a4e97a1a6c5c5dc70ee761d9 - dtc-1.4.5/tests/search_dir/search_test2.dtsi 2adb422636000206499201175d397a4e065118d1 - dtc-1.4.5/tests/search_dir/search_test.dtsi cbaff71343d90c58f78fa1ee686fc0114bc88399 - dtc-1.4.5/pylibfdt/.gitignore 950f95518e818abf2c8f84f1074b6f7c67002a36 - dtc-1.4.5/pylibfdt/Makefile.pylibfdt 103f0f23a13380d020ea07587574e3c16a8812d2 - dtc-1.4.5/pylibfdt/setup.py efd79993fabe982fc1c772d90d796f9ca3be096c - dtc-1.4.5/pylibfdt/libfdt.i edcd4769af7d6adf1bd71db82c02b377a55a665f - dtc-1.4.5/Documentation/dtc-paper.tex 657ff4514367b424637b70b785eda2b5f527374c - dtc-1.4.5/Documentation/dtc-paper.bib Change-Id: Iff413c5995a683bc324c6fa4ed8ff863a0186807
696 lines
24 KiB
Plaintext
696 lines
24 KiB
Plaintext
Device Tree Compiler Manual
|
|
===========================
|
|
|
|
I - "dtc", the device tree compiler
|
|
1) Obtaining Sources
|
|
1.1) Submitting Patches
|
|
2) Description
|
|
3) Command Line
|
|
4) Source File
|
|
4.1) Overview
|
|
4.2) Properties
|
|
4.3) Labels and References
|
|
|
|
II - The DT block format
|
|
1) Header
|
|
2) Device tree generalities
|
|
3) Device tree "structure" block
|
|
4) Device tree "strings" block
|
|
|
|
|
|
III - libfdt
|
|
|
|
IV - Utility Tools
|
|
1) convert-dtsv0 -- Conversion to Version 1
|
|
1) fdtdump
|
|
|
|
|
|
I - "dtc", the device tree compiler
|
|
===================================
|
|
|
|
1) Sources
|
|
|
|
Source code for the Device Tree Compiler can be found at git.kernel.org.
|
|
|
|
The upstream repository is here:
|
|
|
|
git://git.kernel.org/pub/scm/utils/dtc/dtc.git
|
|
https://git.kernel.org/pub/scm/utils/dtc/dtc.git
|
|
|
|
The gitweb interface for the upstream respository is:
|
|
|
|
https://git.kernel.org/cgit/utils/dtc/dtc.git/
|
|
|
|
1.1) Submitting Patches
|
|
|
|
Patches should be sent to the maintainers:
|
|
David Gibson <david@gibson.dropbear.id.au>
|
|
Jon Loeliger <jdl@jdl.com>
|
|
and CCed to <devicetree-compiler@vger.kernel.org>.
|
|
|
|
2) Description
|
|
|
|
The Device Tree Compiler, dtc, takes as input a device-tree in
|
|
a given format and outputs a device-tree in another format.
|
|
Typically, the input format is "dts", a human readable source
|
|
format, and creates a "dtb", or binary format as output.
|
|
|
|
The currently supported Input Formats are:
|
|
|
|
- "dtb": "blob" format. A flattened device-tree block with
|
|
header in one binary blob.
|
|
|
|
- "dts": "source" format. A text file containing a "source"
|
|
for a device-tree.
|
|
|
|
- "fs" format. A representation equivalent to the output of
|
|
/proc/device-tree where nodes are directories and
|
|
properties are files.
|
|
|
|
The currently supported Output Formats are:
|
|
|
|
- "dtb": "blob" format
|
|
|
|
- "dts": "source" format
|
|
|
|
- "asm": assembly language file. A file that can be sourced
|
|
by gas to generate a device-tree "blob". That file can
|
|
then simply be added to your Makefile. Additionally, the
|
|
assembly file exports some symbols that can be used.
|
|
|
|
|
|
3) Command Line
|
|
|
|
The syntax of the dtc command line is:
|
|
|
|
dtc [options] [<input_filename>]
|
|
|
|
Options:
|
|
|
|
<input_filename>
|
|
The name of the input source file. If no <input_filename>
|
|
or "-" is given, stdin is used.
|
|
|
|
-b <number>
|
|
Set the physical boot cpu.
|
|
|
|
-f
|
|
Force. Try to produce output even if the input tree has errors.
|
|
|
|
-h
|
|
Emit a brief usage and help message.
|
|
|
|
-I <input_format>
|
|
The source input format, as listed above.
|
|
|
|
-o <output_filename>
|
|
The name of the generated output file. Use "-" for stdout.
|
|
|
|
-O <output_format>
|
|
The generated output format, as listed above.
|
|
|
|
-d <dependency_filename>
|
|
Generate a dependency file during compilation.
|
|
|
|
-q
|
|
Quiet: -q suppress warnings, -qq errors, -qqq all
|
|
|
|
-R <number>
|
|
Make space for <number> reserve map entries
|
|
Relevant for dtb and asm output only.
|
|
|
|
-@
|
|
Generates a __symbols__ node at the root node of the resulting blob
|
|
for any node labels used, and for any local references using phandles
|
|
it also generates a __local_fixups__ node that tracks them.
|
|
|
|
When using the /plugin/ tag all unresolved label references to
|
|
be tracked in the __fixups__ node, making dynamic resolution possible.
|
|
|
|
-A
|
|
Generate automatically aliases for all node labels. This is similar to
|
|
the -@ option (the __symbols__ node contain identical information) but
|
|
the semantics are slightly different since no phandles are automatically
|
|
generated for labeled nodes.
|
|
|
|
-S <bytes>
|
|
Ensure the blob at least <bytes> long, adding additional
|
|
space if needed.
|
|
|
|
-v
|
|
Print DTC version and exit.
|
|
|
|
-V <output_version>
|
|
Generate output conforming to the given <output_version>.
|
|
By default the most recent version is generated.
|
|
Relevant for dtb and asm output only.
|
|
|
|
|
|
The <output_version> defines what version of the "blob" format will be
|
|
generated. Supported versions are 1, 2, 3, 16 and 17. The default is
|
|
always the most recent version and is likely the highest number.
|
|
|
|
Additionally, dtc performs various sanity checks on the tree.
|
|
|
|
|
|
4) Device Tree Source file
|
|
|
|
4.1) Overview
|
|
|
|
Here is a very rough overview of the layout of a DTS source file:
|
|
|
|
|
|
sourcefile: versioninfo plugindecl list_of_memreserve devicetree
|
|
|
|
memreserve: label 'memreserve' ADDR ADDR ';'
|
|
| label 'memreserve' ADDR '-' ADDR ';'
|
|
|
|
devicetree: '/' nodedef
|
|
|
|
versioninfo: '/' 'dts-v1' '/' ';'
|
|
|
|
plugindecl: '/' 'plugin' '/' ';'
|
|
| /* empty */
|
|
|
|
nodedef: '{' list_of_property list_of_subnode '}' ';'
|
|
|
|
property: label PROPNAME '=' propdata ';'
|
|
|
|
propdata: STRING
|
|
| '<' list_of_cells '>'
|
|
| '[' list_of_bytes ']'
|
|
|
|
subnode: label nodename nodedef
|
|
|
|
That structure forms a hierarchical layout of nodes and properties
|
|
rooted at an initial node as:
|
|
|
|
/ {
|
|
}
|
|
|
|
Both classic C style and C++ style comments are supported.
|
|
|
|
Source files may be directly included using the syntax:
|
|
|
|
/include/ "filename"
|
|
|
|
|
|
4.2) Properties
|
|
|
|
Properties are named, possibly labeled, values. Each value
|
|
is one of:
|
|
|
|
- A null-teminated C-like string,
|
|
- A numeric value fitting in 32 bits,
|
|
- A list of 32-bit values
|
|
- A byte sequence
|
|
|
|
Here are some example property definitions:
|
|
|
|
- A property containing a 0 terminated string
|
|
|
|
property1 = "string_value";
|
|
|
|
- A property containing a numerical 32-bit hexadecimal value
|
|
|
|
property2 = <1234abcd>;
|
|
|
|
- A property containing 3 numerical 32-bit hexadecimal values
|
|
|
|
property3 = <12345678 12345678 deadbeef>;
|
|
|
|
- A property whose content is an arbitrary array of bytes
|
|
|
|
property4 = [0a 0b 0c 0d de ea ad be ef];
|
|
|
|
|
|
Node may contain sub-nodes to obtain a hierarchical structure.
|
|
For example:
|
|
|
|
- A child node named "childnode" whose unit name is
|
|
"childnode at address". It in turn has a string property
|
|
called "childprop".
|
|
|
|
childnode@addresss {
|
|
childprop = "hello\n";
|
|
};
|
|
|
|
|
|
By default, all numeric values are hexadecimal. Alternate bases
|
|
may be specified using a prefix "d#" for decimal, "b#" for binary,
|
|
and "o#" for octal.
|
|
|
|
Strings support common escape sequences from C: "\n", "\t", "\r",
|
|
"\(octal value)", "\x(hex value)".
|
|
|
|
|
|
4.3) Labels and References
|
|
|
|
Labels may be applied to nodes or properties. Labels appear
|
|
before a node name, and are referenced using an ampersand: &label.
|
|
Absolute node path names are also allowed in node references.
|
|
|
|
In this exmaple, a node is labled "mpic" and then referenced:
|
|
|
|
mpic: interrupt-controller@40000 {
|
|
...
|
|
};
|
|
|
|
ethernet-phy@3 {
|
|
interrupt-parent = <&mpic>;
|
|
...
|
|
};
|
|
|
|
And used in properties, lables may appear before or after any value:
|
|
|
|
randomnode {
|
|
prop: string = data: "mystring\n" data_end: ;
|
|
...
|
|
};
|
|
|
|
|
|
|
|
II - The DT block format
|
|
========================
|
|
|
|
This chapter defines the format of the flattened device-tree
|
|
passed to the kernel. The actual content of the device tree
|
|
are described in the kernel documentation in the file
|
|
|
|
linux-2.6/Documentation/powerpc/booting-without-of.txt
|
|
|
|
You can find example of code manipulating that format within
|
|
the kernel. For example, the file:
|
|
|
|
including arch/powerpc/kernel/prom_init.c
|
|
|
|
will generate a flattened device-tree from the Open Firmware
|
|
representation. Other utilities such as fs2dt, which is part of
|
|
the kexec tools, will generate one from a filesystem representation.
|
|
Some bootloaders such as U-Boot provide a bit more support by
|
|
using the libfdt code.
|
|
|
|
For booting the kernel, the device tree block has to be in main memory.
|
|
It has to be accessible in both real mode and virtual mode with no
|
|
mapping other than main memory. If you are writing a simple flash
|
|
bootloader, it should copy the block to RAM before passing it to
|
|
the kernel.
|
|
|
|
|
|
1) Header
|
|
---------
|
|
|
|
The kernel is entered with r3 pointing to an area of memory that is
|
|
roughly described in include/asm-powerpc/prom.h by the structure
|
|
boot_param_header:
|
|
|
|
struct boot_param_header {
|
|
u32 magic; /* magic word OF_DT_HEADER */
|
|
u32 totalsize; /* total size of DT block */
|
|
u32 off_dt_struct; /* offset to structure */
|
|
u32 off_dt_strings; /* offset to strings */
|
|
u32 off_mem_rsvmap; /* offset to memory reserve map */
|
|
u32 version; /* format version */
|
|
u32 last_comp_version; /* last compatible version */
|
|
|
|
/* version 2 fields below */
|
|
u32 boot_cpuid_phys; /* Which physical CPU id we're
|
|
booting on */
|
|
/* version 3 fields below */
|
|
u32 size_dt_strings; /* size of the strings block */
|
|
|
|
/* version 17 fields below */
|
|
u32 size_dt_struct; /* size of the DT structure block */
|
|
};
|
|
|
|
Along with the constants:
|
|
|
|
/* Definitions used by the flattened device tree */
|
|
#define OF_DT_HEADER 0xd00dfeed /* 4: version,
|
|
4: total size */
|
|
#define OF_DT_BEGIN_NODE 0x1 /* Start node: full name
|
|
*/
|
|
#define OF_DT_END_NODE 0x2 /* End node */
|
|
#define OF_DT_PROP 0x3 /* Property: name off,
|
|
size, content */
|
|
#define OF_DT_END 0x9
|
|
|
|
All values in this header are in big endian format, the various
|
|
fields in this header are defined more precisely below. All "offset"
|
|
values are in bytes from the start of the header; that is from the
|
|
value of r3.
|
|
|
|
- magic
|
|
|
|
This is a magic value that "marks" the beginning of the
|
|
device-tree block header. It contains the value 0xd00dfeed and is
|
|
defined by the constant OF_DT_HEADER
|
|
|
|
- totalsize
|
|
|
|
This is the total size of the DT block including the header. The
|
|
"DT" block should enclose all data structures defined in this
|
|
chapter (who are pointed to by offsets in this header). That is,
|
|
the device-tree structure, strings, and the memory reserve map.
|
|
|
|
- off_dt_struct
|
|
|
|
This is an offset from the beginning of the header to the start
|
|
of the "structure" part the device tree. (see 2) device tree)
|
|
|
|
- off_dt_strings
|
|
|
|
This is an offset from the beginning of the header to the start
|
|
of the "strings" part of the device-tree
|
|
|
|
- off_mem_rsvmap
|
|
|
|
This is an offset from the beginning of the header to the start
|
|
of the reserved memory map. This map is a list of pairs of 64-
|
|
bit integers. Each pair is a physical address and a size. The
|
|
list is terminated by an entry of size 0. This map provides the
|
|
kernel with a list of physical memory areas that are "reserved"
|
|
and thus not to be used for memory allocations, especially during
|
|
early initialization. The kernel needs to allocate memory during
|
|
boot for things like un-flattening the device-tree, allocating an
|
|
MMU hash table, etc... Those allocations must be done in such a
|
|
way to avoid overriding critical things like, on Open Firmware
|
|
capable machines, the RTAS instance, or on some pSeries, the TCE
|
|
tables used for the iommu. Typically, the reserve map should
|
|
contain _at least_ this DT block itself (header,total_size). If
|
|
you are passing an initrd to the kernel, you should reserve it as
|
|
well. You do not need to reserve the kernel image itself. The map
|
|
should be 64-bit aligned.
|
|
|
|
- version
|
|
|
|
This is the version of this structure. Version 1 stops
|
|
here. Version 2 adds an additional field boot_cpuid_phys.
|
|
Version 3 adds the size of the strings block, allowing the kernel
|
|
to reallocate it easily at boot and free up the unused flattened
|
|
structure after expansion. Version 16 introduces a new more
|
|
"compact" format for the tree itself that is however not backward
|
|
compatible. Version 17 adds an additional field, size_dt_struct,
|
|
allowing it to be reallocated or moved more easily (this is
|
|
particularly useful for bootloaders which need to make
|
|
adjustments to a device tree based on probed information). You
|
|
should always generate a structure of the highest version defined
|
|
at the time of your implementation. Currently that is version 17,
|
|
unless you explicitly aim at being backward compatible.
|
|
|
|
- last_comp_version
|
|
|
|
Last compatible version. This indicates down to what version of
|
|
the DT block you are backward compatible. For example, version 2
|
|
is backward compatible with version 1 (that is, a kernel build
|
|
for version 1 will be able to boot with a version 2 format). You
|
|
should put a 1 in this field if you generate a device tree of
|
|
version 1 to 3, or 16 if you generate a tree of version 16 or 17
|
|
using the new unit name format.
|
|
|
|
- boot_cpuid_phys
|
|
|
|
This field only exist on version 2 headers. It indicate which
|
|
physical CPU ID is calling the kernel entry point. This is used,
|
|
among others, by kexec. If you are on an SMP system, this value
|
|
should match the content of the "reg" property of the CPU node in
|
|
the device-tree corresponding to the CPU calling the kernel entry
|
|
point (see further chapters for more informations on the required
|
|
device-tree contents)
|
|
|
|
- size_dt_strings
|
|
|
|
This field only exists on version 3 and later headers. It
|
|
gives the size of the "strings" section of the device tree (which
|
|
starts at the offset given by off_dt_strings).
|
|
|
|
- size_dt_struct
|
|
|
|
This field only exists on version 17 and later headers. It gives
|
|
the size of the "structure" section of the device tree (which
|
|
starts at the offset given by off_dt_struct).
|
|
|
|
So the typical layout of a DT block (though the various parts don't
|
|
need to be in that order) looks like this (addresses go from top to
|
|
bottom):
|
|
|
|
------------------------------
|
|
r3 -> | struct boot_param_header |
|
|
------------------------------
|
|
| (alignment gap) (*) |
|
|
------------------------------
|
|
| memory reserve map |
|
|
------------------------------
|
|
| (alignment gap) |
|
|
------------------------------
|
|
| |
|
|
| device-tree structure |
|
|
| |
|
|
------------------------------
|
|
| (alignment gap) |
|
|
------------------------------
|
|
| |
|
|
| device-tree strings |
|
|
| |
|
|
-----> ------------------------------
|
|
|
|
|
|
|
|
--- (r3 + totalsize)
|
|
|
|
(*) The alignment gaps are not necessarily present; their presence
|
|
and size are dependent on the various alignment requirements of
|
|
the individual data blocks.
|
|
|
|
|
|
2) Device tree generalities
|
|
---------------------------
|
|
|
|
This device-tree itself is separated in two different blocks, a
|
|
structure block and a strings block. Both need to be aligned to a 4
|
|
byte boundary.
|
|
|
|
First, let's quickly describe the device-tree concept before detailing
|
|
the storage format. This chapter does _not_ describe the detail of the
|
|
required types of nodes & properties for the kernel, this is done
|
|
later in chapter III.
|
|
|
|
The device-tree layout is strongly inherited from the definition of
|
|
the Open Firmware IEEE 1275 device-tree. It's basically a tree of
|
|
nodes, each node having two or more named properties. A property can
|
|
have a value or not.
|
|
|
|
It is a tree, so each node has one and only one parent except for the
|
|
root node who has no parent.
|
|
|
|
A node has 2 names. The actual node name is generally contained in a
|
|
property of type "name" in the node property list whose value is a
|
|
zero terminated string and is mandatory for version 1 to 3 of the
|
|
format definition (as it is in Open Firmware). Version 16 makes it
|
|
optional as it can generate it from the unit name defined below.
|
|
|
|
There is also a "unit name" that is used to differentiate nodes with
|
|
the same name at the same level, it is usually made of the node
|
|
names, the "@" sign, and a "unit address", which definition is
|
|
specific to the bus type the node sits on.
|
|
|
|
The unit name doesn't exist as a property per-se but is included in
|
|
the device-tree structure. It is typically used to represent "path" in
|
|
the device-tree. More details about the actual format of these will be
|
|
below.
|
|
|
|
The kernel powerpc generic code does not make any formal use of the
|
|
unit address (though some board support code may do) so the only real
|
|
requirement here for the unit address is to ensure uniqueness of
|
|
the node unit name at a given level of the tree. Nodes with no notion
|
|
of address and no possible sibling of the same name (like /memory or
|
|
/cpus) may omit the unit address in the context of this specification,
|
|
or use the "@0" default unit address. The unit name is used to define
|
|
a node "full path", which is the concatenation of all parent node
|
|
unit names separated with "/".
|
|
|
|
The root node doesn't have a defined name, and isn't required to have
|
|
a name property either if you are using version 3 or earlier of the
|
|
format. It also has no unit address (no @ symbol followed by a unit
|
|
address). The root node unit name is thus an empty string. The full
|
|
path to the root node is "/".
|
|
|
|
Every node which actually represents an actual device (that is, a node
|
|
which isn't only a virtual "container" for more nodes, like "/cpus"
|
|
is) is also required to have a "device_type" property indicating the
|
|
type of node .
|
|
|
|
Finally, every node that can be referenced from a property in another
|
|
node is required to have a "linux,phandle" property. Real open
|
|
firmware implementations provide a unique "phandle" value for every
|
|
node that the "prom_init()" trampoline code turns into
|
|
"linux,phandle" properties. However, this is made optional if the
|
|
flattened device tree is used directly. An example of a node
|
|
referencing another node via "phandle" is when laying out the
|
|
interrupt tree which will be described in a further version of this
|
|
document.
|
|
|
|
This "linux, phandle" property is a 32-bit value that uniquely
|
|
identifies a node. You are free to use whatever values or system of
|
|
values, internal pointers, or whatever to generate these, the only
|
|
requirement is that every node for which you provide that property has
|
|
a unique value for it.
|
|
|
|
Here is an example of a simple device-tree. In this example, an "o"
|
|
designates a node followed by the node unit name. Properties are
|
|
presented with their name followed by their content. "content"
|
|
represents an ASCII string (zero terminated) value, while <content>
|
|
represents a 32-bit hexadecimal value. The various nodes in this
|
|
example will be discussed in a later chapter. At this point, it is
|
|
only meant to give you a idea of what a device-tree looks like. I have
|
|
purposefully kept the "name" and "linux,phandle" properties which
|
|
aren't necessary in order to give you a better idea of what the tree
|
|
looks like in practice.
|
|
|
|
/ o device-tree
|
|
|- name = "device-tree"
|
|
|- model = "MyBoardName"
|
|
|- compatible = "MyBoardFamilyName"
|
|
|- #address-cells = <2>
|
|
|- #size-cells = <2>
|
|
|- linux,phandle = <0>
|
|
|
|
|
o cpus
|
|
| | - name = "cpus"
|
|
| | - linux,phandle = <1>
|
|
| | - #address-cells = <1>
|
|
| | - #size-cells = <0>
|
|
| |
|
|
| o PowerPC,970@0
|
|
| |- name = "PowerPC,970"
|
|
| |- device_type = "cpu"
|
|
| |- reg = <0>
|
|
| |- clock-frequency = <5f5e1000>
|
|
| |- 64-bit
|
|
| |- linux,phandle = <2>
|
|
|
|
|
o memory@0
|
|
| |- name = "memory"
|
|
| |- device_type = "memory"
|
|
| |- reg = <00000000 00000000 00000000 20000000>
|
|
| |- linux,phandle = <3>
|
|
|
|
|
o chosen
|
|
|- name = "chosen"
|
|
|- bootargs = "root=/dev/sda2"
|
|
|- linux,phandle = <4>
|
|
|
|
This tree is almost a minimal tree. It pretty much contains the
|
|
minimal set of required nodes and properties to boot a linux kernel;
|
|
that is, some basic model informations at the root, the CPUs, and the
|
|
physical memory layout. It also includes misc information passed
|
|
through /chosen, like in this example, the platform type (mandatory)
|
|
and the kernel command line arguments (optional).
|
|
|
|
The /cpus/PowerPC,970@0/64-bit property is an example of a
|
|
property without a value. All other properties have a value. The
|
|
significance of the #address-cells and #size-cells properties will be
|
|
explained in chapter IV which defines precisely the required nodes and
|
|
properties and their content.
|
|
|
|
|
|
3) Device tree "structure" block
|
|
|
|
The structure of the device tree is a linearized tree structure. The
|
|
"OF_DT_BEGIN_NODE" token starts a new node, and the "OF_DT_END_NODE"
|
|
ends that node definition. Child nodes are simply defined before
|
|
"OF_DT_END_NODE" (that is nodes within the node). A 'token' is a 32
|
|
bit value. The tree has to be "finished" with a OF_DT_END token
|
|
|
|
Here's the basic structure of a single node:
|
|
|
|
* token OF_DT_BEGIN_NODE (that is 0x00000001)
|
|
* for version 1 to 3, this is the node full path as a zero
|
|
terminated string, starting with "/". For version 16 and later,
|
|
this is the node unit name only (or an empty string for the
|
|
root node)
|
|
* [align gap to next 4 bytes boundary]
|
|
* for each property:
|
|
* token OF_DT_PROP (that is 0x00000003)
|
|
* 32-bit value of property value size in bytes (or 0 if no
|
|
value)
|
|
* 32-bit value of offset in string block of property name
|
|
* property value data if any
|
|
* [align gap to next 4 bytes boundary]
|
|
* [child nodes if any]
|
|
* token OF_DT_END_NODE (that is 0x00000002)
|
|
|
|
So the node content can be summarized as a start token, a full path,
|
|
a list of properties, a list of child nodes, and an end token. Every
|
|
child node is a full node structure itself as defined above.
|
|
|
|
NOTE: The above definition requires that all property definitions for
|
|
a particular node MUST precede any subnode definitions for that node.
|
|
Although the structure would not be ambiguous if properties and
|
|
subnodes were intermingled, the kernel parser requires that the
|
|
properties come first (up until at least 2.6.22). Any tools
|
|
manipulating a flattened tree must take care to preserve this
|
|
constraint.
|
|
|
|
4) Device tree "strings" block
|
|
|
|
In order to save space, property names, which are generally redundant,
|
|
are stored separately in the "strings" block. This block is simply the
|
|
whole bunch of zero terminated strings for all property names
|
|
concatenated together. The device-tree property definitions in the
|
|
structure block will contain offset values from the beginning of the
|
|
strings block.
|
|
|
|
|
|
III - libfdt
|
|
============
|
|
|
|
This library should be merged into dtc proper.
|
|
This library should likely be worked into U-Boot and the kernel.
|
|
|
|
|
|
IV - Utility Tools
|
|
==================
|
|
|
|
1) convert-dtsv0 -- Conversion to Version 1
|
|
|
|
convert-dtsv0 is a small utility program which converts (DTS)
|
|
Device Tree Source from the obsolete version 0 to version 1.
|
|
|
|
Version 1 DTS files are marked by line "/dts-v1/;" at the top of the file.
|
|
|
|
The syntax of the convert-dtsv0 command line is:
|
|
|
|
convert-dtsv0 [<input_filename ... >]
|
|
|
|
Each file passed will be converted to the new /dts-v1/ version by creating
|
|
a new file with a "v1" appended the filename.
|
|
|
|
Comments, empty lines, etc. are preserved.
|
|
|
|
|
|
2) fdtdump -- Flat Device Tree dumping utility
|
|
|
|
The fdtdump program prints a readable version of a flat device tree file.
|
|
|
|
The syntax of the fdtdump command line is:
|
|
|
|
fdtdump [options] <DTB-file-name>
|
|
|
|
Where options are:
|
|
-d,--debug Dump debug information while decoding the file
|
|
-s,--scan Scan for an embedded fdt in given file
|
|
|
|
3) fdtoverlay -- Flat Device Tree overlay applicator
|
|
|
|
The fdtoverlay applies an arbitrary number of FDT overlays to a base FDT blob
|
|
to a given output file.
|
|
|
|
The syntax of the fdtoverlay command line is:
|
|
|
|
fdtoverlay -i <base-blob> -o <output-blob> <overlay-blob0> [<overlay-blob1> ...]
|
|
|
|
Where options are:
|
|
-i, --input Input base DT blob
|
|
-o, --output Output DT blob
|
|
-v, --verbose Verbose message output
|