partition.txt 1.8 KB

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