ti,gpmc.yaml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/memory-controllers/ti,gpmc.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Texas Instruments GPMC Memory Controller device-tree bindings
  7. maintainers:
  8. - Tony Lindgren <tony@atomide.com>
  9. - Roger Quadros <rogerq@kernel.org>
  10. description:
  11. The GPMC is a unified memory controller dedicated for interfacing
  12. with external memory devices like
  13. - Asynchronous SRAM-like memories and ASICs
  14. - Asynchronous, synchronous, and page mode burst NOR flash
  15. - NAND flash
  16. - Pseudo-SRAM devices
  17. properties:
  18. compatible:
  19. items:
  20. - enum:
  21. - ti,am3352-gpmc
  22. - ti,am64-gpmc
  23. - ti,omap2420-gpmc
  24. - ti,omap2430-gpmc
  25. - ti,omap3430-gpmc
  26. - ti,omap4430-gpmc
  27. reg:
  28. minItems: 1
  29. maxItems: 2
  30. reg-names:
  31. items:
  32. - const: cfg
  33. - const: data
  34. interrupts:
  35. maxItems: 1
  36. clocks:
  37. maxItems: 1
  38. description: |
  39. Functional clock. Used for bus timing calculations and
  40. GPMC configuration.
  41. clock-names:
  42. items:
  43. - const: fck
  44. power-domains:
  45. maxItems: 1
  46. dmas:
  47. items:
  48. - description: DMA channel for GPMC NAND prefetch
  49. dma-names:
  50. items:
  51. - const: rxtx
  52. "#address-cells": true
  53. "#size-cells": true
  54. gpmc,num-cs:
  55. description: maximum number of supported chip-select lines.
  56. $ref: /schemas/types.yaml#/definitions/uint32
  57. gpmc,num-waitpins:
  58. description: maximum number of supported wait pins.
  59. $ref: /schemas/types.yaml#/definitions/uint32
  60. ranges:
  61. minItems: 1
  62. description: |
  63. Must be set up to reflect the memory layout with four
  64. integer values for each chip-select line in use,
  65. <cs-number> 0 <physical address of mapping> <size>
  66. items:
  67. - description: NAND bank 0
  68. - description: NOR/SRAM bank 0
  69. - description: NOR/SRAM bank 1
  70. '#interrupt-cells':
  71. const: 2
  72. interrupt-controller:
  73. description: |
  74. The GPMC driver implements and interrupt controller for
  75. the NAND events "fifoevent" and "termcount" plus the
  76. rising/falling edges on the GPMC_WAIT pins.
  77. The interrupt number mapping is as follows
  78. 0 - NAND_fifoevent
  79. 1 - NAND_termcount
  80. 2 - GPMC_WAIT0 pin edge
  81. 3 - GPMC_WAIT1 pin edge, and so on.
  82. '#gpio-cells':
  83. const: 2
  84. gpio-controller:
  85. description: |
  86. The GPMC driver implements a GPIO controller for the
  87. GPMC WAIT pins that can be used as general purpose inputs.
  88. 0 maps to GPMC_WAIT0 pin.
  89. ti,hwmods:
  90. description:
  91. Name of the HWMOD associated with GPMC. This is for legacy
  92. omap2/3 platforms only.
  93. $ref: /schemas/types.yaml#/definitions/string
  94. deprecated: true
  95. ti,no-idle-on-init:
  96. description:
  97. Prevent idling the module at init. This is for legacy omap2/3
  98. platforms only.
  99. type: boolean
  100. deprecated: true
  101. patternProperties:
  102. "@[0-7],[a-f0-9]+$":
  103. type: object
  104. description: |
  105. The child device node represents the device connected to the GPMC
  106. bus. The device can be a NAND chip, SRAM device, NOR device
  107. or an ASIC.
  108. $ref: "ti,gpmc-child.yaml"
  109. required:
  110. - compatible
  111. - reg
  112. - gpmc,num-cs
  113. - gpmc,num-waitpins
  114. - "#address-cells"
  115. - "#size-cells"
  116. allOf:
  117. - if:
  118. properties:
  119. compatible:
  120. contains:
  121. const: ti,am64-gpmc
  122. then:
  123. required:
  124. - reg-names
  125. - power-domains
  126. additionalProperties: false
  127. examples:
  128. - |
  129. #include <dt-bindings/interrupt-controller/arm-gic.h>
  130. #include <dt-bindings/gpio/gpio.h>
  131. gpmc: memory-controller@50000000 {
  132. compatible = "ti,am3352-gpmc";
  133. reg = <0x50000000 0x2000>;
  134. interrupts = <100>;
  135. clocks = <&l3s_clkctrl>;
  136. clock-names = "fck";
  137. dmas = <&edma 52 0>;
  138. dma-names = "rxtx";
  139. gpmc,num-cs = <8>;
  140. gpmc,num-waitpins = <2>;
  141. #address-cells = <2>;
  142. #size-cells = <1>;
  143. ranges = <0 0 0x08000000 0x10000000>; /* CS0 @addr 0x8000000, size 0x10000000 */
  144. interrupt-controller;
  145. #interrupt-cells = <2>;
  146. gpio-controller;
  147. #gpio-cells = <2>;
  148. nand@0,0 {
  149. compatible = "ti,omap2-nand";
  150. reg = <0 0 4>;
  151. interrupt-parent = <&gpmc>;
  152. interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
  153. <1 IRQ_TYPE_NONE>; /* termcount */
  154. ti,nand-xfer-type = "prefetch-dma";
  155. ti,nand-ecc-opt = "bch16";
  156. ti,elm-id = <&elm>;
  157. rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 pin */
  158. };
  159. };