sram.yaml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/sram/sram.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Generic on-chip SRAM
  7. maintainers:
  8. - Rob Herring <robh@kernel.org>
  9. description: |+
  10. Simple IO memory regions to be managed by the genalloc API.
  11. Each child of the sram node specifies a region of reserved memory. Each
  12. child node should use a 'reg' property to specify a specific range of
  13. reserved memory.
  14. Following the generic-names recommended practice, node names should
  15. reflect the purpose of the node. Unit address (@<address>) should be
  16. appended to the name.
  17. properties:
  18. $nodename:
  19. pattern: "^sram(@.*)?"
  20. compatible:
  21. contains:
  22. enum:
  23. - mmio-sram
  24. - amlogic,meson-gxbb-sram
  25. - arm,juno-sram-ns
  26. - atmel,sama5d2-securam
  27. - nvidia,tegra186-sysram
  28. - nvidia,tegra194-sysram
  29. - nvidia,tegra234-sysram
  30. - qcom,rpm-msg-ram
  31. - rockchip,rk3288-pmu-sram
  32. reg:
  33. maxItems: 1
  34. clocks:
  35. maxItems: 1
  36. description:
  37. A list of phandle and clock specifier pair that controls the single
  38. SRAM clock.
  39. "#address-cells":
  40. const: 1
  41. "#size-cells":
  42. const: 1
  43. ranges:
  44. maxItems: 1
  45. description:
  46. Should translate from local addresses within the sram to bus addresses.
  47. no-memory-wc:
  48. description:
  49. The flag indicating, that SRAM memory region has not to be remapped
  50. as write combining. WC is used by default.
  51. type: boolean
  52. patternProperties:
  53. "^([a-z0-9]*-)?sram(-section)?@[a-f0-9]+$":
  54. type: object
  55. description:
  56. Each child of the sram node specifies a region of reserved memory.
  57. properties:
  58. compatible:
  59. description:
  60. Should contain a vendor specific string in the form
  61. <vendor>,[<device>-]<usage>
  62. contains:
  63. enum:
  64. - allwinner,sun4i-a10-sram-a3-a4
  65. - allwinner,sun4i-a10-sram-c1
  66. - allwinner,sun4i-a10-sram-d
  67. - allwinner,sun9i-a80-smp-sram
  68. - allwinner,sun50i-a64-sram-c
  69. - amlogic,meson8-ao-arc-sram
  70. - amlogic,meson8b-ao-arc-sram
  71. - amlogic,meson8-smp-sram
  72. - amlogic,meson8b-smp-sram
  73. - amlogic,meson-gxbb-scp-shmem
  74. - amlogic,meson-axg-scp-shmem
  75. - arm,juno-scp-shmem
  76. - arm,scmi-shmem
  77. - arm,scp-shmem
  78. - renesas,smp-sram
  79. - rockchip,rk3066-smp-sram
  80. - samsung,exynos4210-sysram
  81. - samsung,exynos4210-sysram-ns
  82. - socionext,milbeaut-smp-sram
  83. - stericsson,u8500-esram
  84. reg:
  85. description:
  86. IO mem address range, relative to the SRAM range.
  87. maxItems: 1
  88. pool:
  89. description:
  90. Indicates that the particular reserved SRAM area is addressable
  91. and in use by another device or devices.
  92. type: boolean
  93. export:
  94. description:
  95. Indicates that the reserved SRAM area may be accessed outside
  96. of the kernel, e.g. by bootloader or userspace.
  97. type: boolean
  98. protect-exec:
  99. description: |
  100. Same as 'pool' above but with the additional constraint that code
  101. will be run from the region and that the memory is maintained as
  102. read-only, executable during code execution. NOTE: This region must
  103. be page aligned on start and end in order to properly allow
  104. manipulation of the page attributes.
  105. type: boolean
  106. label:
  107. description:
  108. The name for the reserved partition, if omitted, the label is taken
  109. from the node name excluding the unit address.
  110. required:
  111. - reg
  112. additionalProperties: false
  113. required:
  114. - compatible
  115. - reg
  116. if:
  117. not:
  118. properties:
  119. compatible:
  120. contains:
  121. enum:
  122. - qcom,rpm-msg-ram
  123. - rockchip,rk3288-pmu-sram
  124. then:
  125. required:
  126. - "#address-cells"
  127. - "#size-cells"
  128. - ranges
  129. additionalProperties: false
  130. examples:
  131. - |
  132. sram@5c000000 {
  133. compatible = "mmio-sram";
  134. reg = <0x5c000000 0x40000>; /* 256 KiB SRAM at address 0x5c000000 */
  135. #address-cells = <1>;
  136. #size-cells = <1>;
  137. ranges = <0 0x5c000000 0x40000>;
  138. smp-sram@100 {
  139. reg = <0x100 0x50>;
  140. };
  141. device-sram@1000 {
  142. reg = <0x1000 0x1000>;
  143. pool;
  144. };
  145. exported-sram@20000 {
  146. reg = <0x20000 0x20000>;
  147. export;
  148. };
  149. };
  150. - |
  151. // Samsung SMP-capable Exynos SoCs use part of the SYSRAM for the bringup
  152. // of the secondary cores. Once the core gets powered up it executes the
  153. // code that is residing at some specific location of the SYSRAM.
  154. //
  155. // Therefore reserved section sub-nodes have to be added to the mmio-sram
  156. // declaration. These nodes are of two types depending upon secure or
  157. // non-secure execution environment.
  158. sram@2020000 {
  159. compatible = "mmio-sram";
  160. reg = <0x02020000 0x54000>;
  161. #address-cells = <1>;
  162. #size-cells = <1>;
  163. ranges = <0 0x02020000 0x54000>;
  164. smp-sram@0 {
  165. compatible = "samsung,exynos4210-sysram";
  166. reg = <0x0 0x1000>;
  167. };
  168. smp-sram@53000 {
  169. compatible = "samsung,exynos4210-sysram-ns";
  170. reg = <0x53000 0x1000>;
  171. };
  172. };
  173. - |
  174. // Amlogic's SMP-capable SoCs use part of the sram for the bringup of the cores.
  175. // Once the core gets powered up it executes the code that is residing at a
  176. // specific location.
  177. //
  178. // Therefore a reserved section sub-node has to be added to the mmio-sram
  179. // declaration.
  180. sram@d9000000 {
  181. compatible = "mmio-sram";
  182. reg = <0xd9000000 0x20000>;
  183. #address-cells = <1>;
  184. #size-cells = <1>;
  185. ranges = <0 0xd9000000 0x20000>;
  186. smp-sram@1ff80 {
  187. compatible = "amlogic,meson8b-smp-sram";
  188. reg = <0x1ff80 0x8>;
  189. };
  190. };
  191. - |
  192. sram@e63c0000 {
  193. compatible = "mmio-sram";
  194. reg = <0xe63c0000 0x1000>;
  195. #address-cells = <1>;
  196. #size-cells = <1>;
  197. ranges = <0 0xe63c0000 0x1000>;
  198. smp-sram@0 {
  199. compatible = "renesas,smp-sram";
  200. reg = <0 0x10>;
  201. };
  202. };
  203. - |
  204. sram@10080000 {
  205. compatible = "mmio-sram";
  206. reg = <0x10080000 0x10000>;
  207. #address-cells = <1>;
  208. #size-cells = <1>;
  209. ranges;
  210. smp-sram@10080000 {
  211. compatible = "rockchip,rk3066-smp-sram";
  212. reg = <0x10080000 0x50>;
  213. };
  214. };
  215. - |
  216. // Rockchip's rk3288 SoC uses the sram of pmu to store the function of
  217. // resume from maskrom(the 1st level loader). This is a common use of
  218. // the "pmu-sram" because it keeps power even in low power states
  219. // in the system.
  220. sram@ff720000 {
  221. compatible = "rockchip,rk3288-pmu-sram", "mmio-sram";
  222. reg = <0xff720000 0x1000>;
  223. };
  224. - |
  225. // Allwinner's A80 SoC uses part of the secure sram for hotplugging of the
  226. // primary core (cpu0). Once the core gets powered up it checks if a magic
  227. // value is set at a specific location. If it is then the BROM will jump
  228. // to the software entry address, instead of executing a standard boot.
  229. //
  230. // Also there are no "secure-only" properties. The implementation should
  231. // check if this SRAM is usable first.
  232. sram@20000 {
  233. // 256 KiB secure SRAM at 0x20000
  234. compatible = "mmio-sram";
  235. reg = <0x00020000 0x40000>;
  236. #address-cells = <1>;
  237. #size-cells = <1>;
  238. ranges = <0 0x00020000 0x40000>;
  239. smp-sram@1000 {
  240. // This is checked by BROM to determine if
  241. // cpu0 should jump to SMP entry vector
  242. compatible = "allwinner,sun9i-a80-smp-sram";
  243. reg = <0x1000 0x8>;
  244. };
  245. };
  246. - |
  247. sram@0 {
  248. compatible = "mmio-sram";
  249. reg = <0x0 0x10000>;
  250. #address-cells = <1>;
  251. #size-cells = <1>;
  252. ranges = <0 0x0 0x10000>;
  253. smp-sram@f100 {
  254. compatible = "socionext,milbeaut-smp-sram";
  255. reg = <0xf100 0x20>;
  256. };
  257. };