ahci-platform.yaml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: AHCI SATA Controller
  7. description: |
  8. SATA nodes are defined to describe on-chip Serial ATA controllers.
  9. Each SATA controller should have its own node.
  10. It is possible, but not required, to represent each port as a sub-node.
  11. It allows to enable each port independently when dealing with multiple
  12. PHYs.
  13. maintainers:
  14. - Hans de Goede <hdegoede@redhat.com>
  15. - Jens Axboe <axboe@kernel.dk>
  16. select:
  17. properties:
  18. compatible:
  19. contains:
  20. enum:
  21. - brcm,iproc-ahci
  22. - cavium,octeon-7130-ahci
  23. - hisilicon,hisi-ahci
  24. - ibm,476gtr-ahci
  25. - marvell,armada-3700-ahci
  26. - marvell,armada-8k-ahci
  27. - marvell,berlin2q-ahci
  28. - qcom,apq8064-ahci
  29. - qcom,ipq806x-ahci
  30. - socionext,uniphier-pro4-ahci
  31. - socionext,uniphier-pxs2-ahci
  32. - socionext,uniphier-pxs3-ahci
  33. required:
  34. - compatible
  35. properties:
  36. compatible:
  37. oneOf:
  38. - items:
  39. - enum:
  40. - brcm,iproc-ahci
  41. - marvell,armada-8k-ahci
  42. - marvell,berlin2-ahci
  43. - marvell,berlin2q-ahci
  44. - qcom,apq8064-ahci
  45. - qcom,ipq806x-ahci
  46. - socionext,uniphier-pro4-ahci
  47. - socionext,uniphier-pxs2-ahci
  48. - socionext,uniphier-pxs3-ahci
  49. - const: generic-ahci
  50. - enum:
  51. - cavium,octeon-7130-ahci
  52. - hisilicon,hisi-ahci
  53. - ibm,476gtr-ahci
  54. - marvell,armada-3700-ahci
  55. reg:
  56. minItems: 1
  57. maxItems: 2
  58. reg-names:
  59. maxItems: 1
  60. clocks:
  61. minItems: 1
  62. maxItems: 5
  63. clock-names:
  64. minItems: 1
  65. maxItems: 5
  66. interrupts:
  67. maxItems: 1
  68. power-domains:
  69. maxItems: 1
  70. resets:
  71. minItems: 1
  72. maxItems: 3
  73. patternProperties:
  74. "^sata-port@[0-9a-f]+$":
  75. $ref: /schemas/ata/ahci-common.yaml#/$defs/ahci-port
  76. anyOf:
  77. - required: [ phys ]
  78. - required: [ target-supply ]
  79. unevaluatedProperties: false
  80. required:
  81. - compatible
  82. - reg
  83. - interrupts
  84. allOf:
  85. - $ref: ahci-common.yaml#
  86. - if:
  87. properties:
  88. compatible:
  89. contains:
  90. enum:
  91. - qcom,apq8064-ahci
  92. - qcom,ipq806x-ahci
  93. then:
  94. properties:
  95. clocks:
  96. minItems: 5
  97. clock-names:
  98. items:
  99. - const: slave_iface
  100. - const: iface
  101. - const: core
  102. - const: rxoob
  103. - const: pmalive
  104. required:
  105. - phys
  106. - phy-names
  107. - clocks
  108. - clock-names
  109. - if:
  110. properties:
  111. compatible:
  112. contains:
  113. const: socionext,uniphier-pro4-ahci
  114. then:
  115. properties:
  116. resets:
  117. items:
  118. - description: reset line for the parent
  119. - description: reset line for the glue logic
  120. - description: reset line for the controller
  121. required:
  122. - resets
  123. else:
  124. if:
  125. properties:
  126. compatible:
  127. contains:
  128. enum:
  129. - socionext,uniphier-pxs2-ahci
  130. - socionext,uniphier-pxs3-ahci
  131. then:
  132. properties:
  133. resets:
  134. items:
  135. - description: reset for the glue logic
  136. - description: reset for the controller
  137. required:
  138. - resets
  139. else:
  140. properties:
  141. resets:
  142. maxItems: 1
  143. unevaluatedProperties: false
  144. examples:
  145. - |
  146. sata@ffe08000 {
  147. compatible = "snps,spear-ahci";
  148. reg = <0xffe08000 0x1000>;
  149. interrupts = <115>;
  150. };
  151. - |
  152. #include <dt-bindings/interrupt-controller/arm-gic.h>
  153. #include <dt-bindings/clock/berlin2q.h>
  154. #include <dt-bindings/ata/ahci.h>
  155. sata@f7e90000 {
  156. compatible = "marvell,berlin2q-ahci", "generic-ahci";
  157. reg = <0xf7e90000 0x1000>;
  158. interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
  159. clocks = <&chip CLKID_SATA>;
  160. #address-cells = <1>;
  161. #size-cells = <0>;
  162. hba-cap = <HBA_SMPS>;
  163. sata0: sata-port@0 {
  164. reg = <0>;
  165. phys = <&sata_phy 0>;
  166. target-supply = <&reg_sata0>;
  167. hba-port-cap = <(HBA_PORT_FBSCP | HBA_PORT_ESP)>;
  168. };
  169. sata1: sata-port@1 {
  170. reg = <1>;
  171. phys = <&sata_phy 1>;
  172. target-supply = <&reg_sata1>;
  173. hba-port-cap = <(HBA_PORT_HPCP | HBA_PORT_MPSP | HBA_PORT_FBSCP)>;
  174. };
  175. };