exynos-srom.yaml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/memory-controllers/exynos-srom.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Samsung Exynos SoC SROM Controller driver
  7. maintainers:
  8. - Krzysztof Kozlowski <krzk@kernel.org>
  9. description: |+
  10. The SROM controller can be used to attach external peripherals. In this case
  11. extra properties, describing the bus behind it, should be specified.
  12. properties:
  13. compatible:
  14. items:
  15. - const: samsung,exynos4210-srom
  16. reg:
  17. maxItems: 1
  18. "#address-cells":
  19. const: 2
  20. "#size-cells":
  21. const: 1
  22. ranges:
  23. minItems: 1
  24. maxItems: 4
  25. description: |
  26. Reflects the memory layout with four integer values per bank. Format:
  27. <bank-number> 0 <parent address of bank> <size>
  28. Up to four banks are supported.
  29. patternProperties:
  30. "^.*@[0-3],[a-f0-9]+$":
  31. type: object
  32. additionalProperties: true
  33. description:
  34. The actual device nodes should be added as subnodes to the SROMc node.
  35. These subnodes, in addition to regular device specification, should
  36. contain the following properties, describing configuration
  37. of the relevant SROM bank.
  38. properties:
  39. reg:
  40. description:
  41. Bank number, base address (relative to start of the bank) and size
  42. of the memory mapped for the device. Note that base address will be
  43. typically 0 as this is the start of the bank.
  44. maxItems: 1
  45. reg-io-width:
  46. enum: [1, 2]
  47. description:
  48. Data width in bytes (1 or 2). If omitted, default of 1 is used.
  49. samsung,srom-page-mode:
  50. description:
  51. If page mode is set, 4 data page mode will be configured,
  52. else normal (1 data) page mode will be set.
  53. type: boolean
  54. samsung,srom-timing:
  55. $ref: /schemas/types.yaml#/definitions/uint32-array
  56. items:
  57. minItems: 6
  58. maxItems: 6
  59. description: |
  60. Array of 6 integers, specifying bank timings in the following order:
  61. Tacp, Tcah, Tcoh, Tacc, Tcos, Tacs.
  62. Each value is specified in cycles and has the following meaning
  63. and valid range:
  64. Tacp: Page mode access cycle at Page mode (0 - 15)
  65. Tcah: Address holding time after CSn (0 - 15)
  66. Tcoh: Chip selection hold on OEn (0 - 15)
  67. Tacc: Access cycle (0 - 31, the actual time is N + 1)
  68. Tcos: Chip selection set-up before OEn (0 - 15)
  69. Tacs: Address set-up before CSn (0 - 15)
  70. required:
  71. - reg
  72. - samsung,srom-timing
  73. required:
  74. - compatible
  75. - reg
  76. additionalProperties: false
  77. examples:
  78. - |
  79. // Example: basic definition, no banks are configured
  80. memory-controller@12560000 {
  81. compatible = "samsung,exynos4210-srom";
  82. reg = <0x12560000 0x14>;
  83. };
  84. - |
  85. // Example: SROMc with SMSC911x ethernet chip on bank 3
  86. memory-controller@12570000 {
  87. #address-cells = <2>;
  88. #size-cells = <1>;
  89. ranges = <0 0 0x04000000 0x20000 // Bank0
  90. 1 0 0x05000000 0x20000 // Bank1
  91. 2 0 0x06000000 0x20000 // Bank2
  92. 3 0 0x07000000 0x20000>; // Bank3
  93. compatible = "samsung,exynos4210-srom";
  94. reg = <0x12570000 0x14>;
  95. ethernet@3,0 {
  96. compatible = "smsc,lan9115";
  97. reg = <3 0 0x10000>; // Bank 3, offset = 0
  98. phy-mode = "mii";
  99. interrupt-parent = <&gpx0>;
  100. interrupts = <5 8>;
  101. reg-io-width = <2>;
  102. smsc,irq-push-pull;
  103. smsc,force-internal-phy;
  104. samsung,srom-page-mode;
  105. samsung,srom-timing = <9 12 1 9 1 1>;
  106. };
  107. };