mtd-physmap.txt 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. The device tree may optionally contain sub-nodes describing partitions of the
  22. address space. See partition.txt for more detail.
  23. Example:
  24. flash@ff000000 {
  25. compatible = "amd,am29lv128ml", "cfi-flash";
  26. reg = <ff000000 01000000>;
  27. bank-width = <4>;
  28. device-width = <1>;
  29. #address-cells = <1>;
  30. #size-cells = <1>;
  31. fs@0 {
  32. label = "fs";
  33. reg = <0 f80000>;
  34. };
  35. firmware@f80000 {
  36. label ="firmware";
  37. reg = <f80000 80000>;
  38. read-only;
  39. };
  40. };
  41. Here an example with multiple "reg" tuples:
  42. flash@f0000000,0 {
  43. #address-cells = <1>;
  44. #size-cells = <1>;
  45. compatible = "intel,PC48F4400P0VB", "cfi-flash";
  46. reg = <0 0x00000000 0x02000000
  47. 0 0x02000000 0x02000000>;
  48. bank-width = <2>;
  49. partition@0 {
  50. label = "test-part1";
  51. reg = <0 0x04000000>;
  52. };
  53. };
  54. An example using SRAM:
  55. sram@2,0 {
  56. compatible = "samsung,k6f1616u6a", "mtd-ram";
  57. reg = <2 0 0x00200000>;
  58. bank-width = <2>;
  59. };