mtd-physmap.txt 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. CFI or JEDEC memory-mapped NOR flash, MTD-RAM (NVRAM...)
  2. Flash chips (Memory Technology Devices) are often used for solid state
  3. file systems on embedded devices.
  4. - compatible : should contain the specific model of mtd chip(s)
  5. used, if known, followed by either "cfi-flash", "jedec-flash"
  6. or "mtd-ram".
  7. - reg : Address range(s) of the mtd chip(s)
  8. It's possible to (optionally) define multiple "reg" tuples so that
  9. non-identical chips can be described in one node.
  10. - bank-width : Width (in bytes) of the bank. Equal to the
  11. device width times the number of interleaved chips.
  12. - device-width : (optional) Width of a single mtd chip. If
  13. omitted, assumed to be equal to 'bank-width'.
  14. - #address-cells, #size-cells : Must be present if the device has
  15. sub-nodes representing partitions (see below). In this case
  16. both #address-cells and #size-cells must be equal to 1.
  17. For JEDEC compatible devices, the following additional properties
  18. are defined:
  19. - vendor-id : Contains the flash chip's vendor id (1 byte).
  20. - device-id : Contains the flash chip's device id (1 byte).
  21. In addition to the information on the mtd bank itself, the
  22. device tree may optionally contain additional information
  23. describing partitions of the address space. This can be
  24. used on platforms which have strong conventions about which
  25. portions of a flash are used for what purposes, but which don't
  26. use an on-flash partition table such as RedBoot.
  27. Each partition is represented as a sub-node of the mtd device.
  28. Each node's name represents the name of the corresponding
  29. partition of the mtd device.
  30. Flash partitions
  31. - reg : The partition's offset and size within the mtd bank.
  32. - label : (optional) The label / name for this partition.
  33. If omitted, the label is taken from the node name (excluding
  34. the unit address).
  35. - read-only : (optional) This parameter, if present, is a hint to
  36. Linux that this partition should only be mounted
  37. read-only. This is usually used for flash partitions
  38. containing early-boot firmware images or data which should not
  39. be clobbered.
  40. Example:
  41. flash@ff000000 {
  42. compatible = "amd,am29lv128ml", "cfi-flash";
  43. reg = <ff000000 01000000>;
  44. bank-width = <4>;
  45. device-width = <1>;
  46. #address-cells = <1>;
  47. #size-cells = <1>;
  48. fs@0 {
  49. label = "fs";
  50. reg = <0 f80000>;
  51. };
  52. firmware@f80000 {
  53. label ="firmware";
  54. reg = <f80000 80000>;
  55. read-only;
  56. };
  57. };
  58. Here an example with multiple "reg" tuples:
  59. flash@f0000000,0 {
  60. #address-cells = <1>;
  61. #size-cells = <1>;
  62. compatible = "intel,PC48F4400P0VB", "cfi-flash";
  63. reg = <0 0x00000000 0x02000000
  64. 0 0x02000000 0x02000000>;
  65. bank-width = <2>;
  66. partition@0 {
  67. label = "test-part1";
  68. reg = <0 0x04000000>;
  69. };
  70. };
  71. An example using SRAM:
  72. sram@2,0 {
  73. compatible = "samsung,k6f1616u6a", "mtd-ram";
  74. reg = <2 0 0x00200000>;
  75. bank-width = <2>;
  76. };