partition.txt 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. Representing flash partitions in devicetree
  2. Partitions can be represented by sub-nodes of an mtd device. This can be used
  3. on platforms which have strong conventions about which portions of a flash are
  4. used for what purposes, but which don't use an on-flash partition table such
  5. as RedBoot.
  6. #address-cells & #size-cells must both be present in the mtd device. There are
  7. two valid values for both:
  8. <1>: for partitions that require a single 32-bit cell to represent their
  9. size/address (aka the value is below 4 GiB)
  10. <2>: for partitions that require two 32-bit cells to represent their
  11. size/address (aka the value is 4 GiB or greater).
  12. Required properties:
  13. - reg : The partition's offset and size within the mtd bank.
  14. Optional properties:
  15. - label : The label / name for this partition. If omitted, the label is taken
  16. from the node name (excluding the unit address).
  17. - read-only : This parameter, if present, is a hint to Linux that this
  18. partition should only be mounted read-only. This is usually used for flash
  19. partitions containing early-boot firmware images or data which should not be
  20. clobbered.
  21. Examples:
  22. flash@0 {
  23. #address-cells = <1>;
  24. #size-cells = <1>;
  25. partition@0 {
  26. label = "u-boot";
  27. reg = <0x0000000 0x100000>;
  28. read-only;
  29. };
  30. uimage@100000 {
  31. reg = <0x0100000 0x200000>;
  32. };
  33. };
  34. flash@1 {
  35. #address-cells = <1>;
  36. #size-cells = <2>;
  37. /* a 4 GiB partition */
  38. partition@0 {
  39. label = "filesystem";
  40. reg = <0x00000000 0x1 0x00000000>;
  41. };
  42. };
  43. flash@2 {
  44. #address-cells = <2>;
  45. #size-cells = <2>;
  46. /* an 8 GiB partition */
  47. partition@0 {
  48. label = "filesystem #1";
  49. reg = <0x0 0x00000000 0x2 0x00000000>;
  50. };
  51. /* a 4 GiB partition */
  52. partition@200000000 {
  53. label = "filesystem #2";
  54. reg = <0x2 0x00000000 0x1 0x00000000>;
  55. };
  56. };