0094-dt-binding-pci-add-JH7110-PCIe-dt-binding-documents.patch 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. From 3d555cfd72df1a02849565f281149d321e0f8425 Mon Sep 17 00:00:00 2001
  2. From: Minda Chen <[email protected]>
  3. Date: Thu, 6 Apr 2023 19:11:40 +0800
  4. Subject: [PATCH 094/122] dt-binding: pci: add JH7110 PCIe dt-binding
  5. documents.
  6. Add PCIe controller driver dt-binding documents
  7. for StarFive JH7110 SoC platform.
  8. Signed-off-by: Minda Chen <[email protected]>
  9. ---
  10. .../bindings/pci/starfive,jh7110-pcie.yaml | 163 ++++++++++++++++++
  11. 1 file changed, 163 insertions(+)
  12. create mode 100644 Documentation/devicetree/bindings/pci/starfive,jh7110-pcie.yaml
  13. --- /dev/null
  14. +++ b/Documentation/devicetree/bindings/pci/starfive,jh7110-pcie.yaml
  15. @@ -0,0 +1,163 @@
  16. +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  17. +%YAML 1.2
  18. +---
  19. +$id: http://devicetree.org/schemas/pci/starfive,jh7110-pcie.yaml#
  20. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  21. +
  22. +title: StarFive JH7110 PCIe 2.0 host controller
  23. +
  24. +maintainers:
  25. + - Minda Chen <[email protected]>
  26. +
  27. +allOf:
  28. + - $ref: /schemas/pci/pci-bus.yaml#
  29. + - $ref: /schemas/interrupt-controller/msi-controller.yaml#
  30. +
  31. +properties:
  32. + compatible:
  33. + const: starfive,jh7110-pcie
  34. +
  35. + reg:
  36. + maxItems: 2
  37. +
  38. + reg-names:
  39. + items:
  40. + - const: reg
  41. + - const: config
  42. +
  43. + msi-parent: true
  44. +
  45. + interrupts:
  46. + maxItems: 1
  47. +
  48. + clocks:
  49. + maxItems: 4
  50. +
  51. + clock-names:
  52. + items:
  53. + - const: noc
  54. + - const: tl
  55. + - const: axi_mst0
  56. + - const: apb
  57. +
  58. + resets:
  59. + items:
  60. + - description: AXI MST0 reset
  61. + - description: AXI SLAVE reset
  62. + - description: AXI SLAVE0 reset
  63. + - description: PCIE BRIDGE reset
  64. + - description: PCIE CORE reset
  65. + - description: PCIE APB reset
  66. +
  67. + reset-names:
  68. + items:
  69. + - const: mst0
  70. + - const: slv0
  71. + - const: slv
  72. + - const: brg
  73. + - const: core
  74. + - const: apb
  75. +
  76. + starfive,stg-syscon:
  77. + $ref: /schemas/types.yaml#/definitions/phandle-array
  78. + items:
  79. + items:
  80. + - description: phandle to System Register Controller stg_syscon node.
  81. + - description: register0 offset of STG_SYSCONSAIF__SYSCFG register for PCIe.
  82. + - description: register1 offset of STG_SYSCONSAIF__SYSCFG register for PCIe.
  83. + - description: register2 offset of STG_SYSCONSAIF__SYSCFG register for PCIe.
  84. + - description: register3 offset of STG_SYSCONSAIF__SYSCFG register for PCIe.
  85. + description:
  86. + The phandle to System Register Controller syscon node and the offset
  87. + of STG_SYSCONSAIF__SYSCFG register for PCIe. Total 4 regsisters offset
  88. + for PCIe.
  89. +
  90. + pwren-gpios:
  91. + description: Should specify the GPIO for controlling the PCI bus device power on.
  92. + maxItems: 1
  93. +
  94. + reset-gpios:
  95. + maxItems: 1
  96. +
  97. + phys:
  98. + maxItems: 1
  99. +
  100. + interrupt-controller:
  101. + type: object
  102. + properties:
  103. + '#address-cells':
  104. + const: 0
  105. +
  106. + '#interrupt-cells':
  107. + const: 1
  108. +
  109. + interrupt-controller: true
  110. +
  111. + required:
  112. + - '#address-cells'
  113. + - '#interrupt-cells'
  114. + - interrupt-controller
  115. +
  116. + additionalProperties: false
  117. +
  118. +required:
  119. + - reg
  120. + - reg-names
  121. + - "#interrupt-cells"
  122. + - interrupts
  123. + - interrupt-map-mask
  124. + - interrupt-map
  125. + - clocks
  126. + - clock-names
  127. + - resets
  128. + - msi-controller
  129. +
  130. +unevaluatedProperties: false
  131. +
  132. +examples:
  133. + - |
  134. + bus {
  135. + #address-cells = <2>;
  136. + #size-cells = <2>;
  137. +
  138. + pcie0: pcie@2B000000 {
  139. + compatible = "starfive,jh7110-pcie";
  140. + #address-cells = <3>;
  141. + #size-cells = <2>;
  142. + #interrupt-cells = <1>;
  143. + reg = <0x0 0x2B000000 0x0 0x1000000>,
  144. + <0x9 0x40000000 0x0 0x10000000>;
  145. + reg-names = "reg", "config";
  146. + device_type = "pci";
  147. + starfive,stg-syscon = <&stg_syscon 0xc0 0xc4 0x130 0x1b8>;
  148. + bus-range = <0x0 0xff>;
  149. + ranges = <0x82000000 0x0 0x30000000 0x0 0x30000000 0x0 0x08000000>,
  150. + <0xc3000000 0x9 0x00000000 0x9 0x00000000 0x0 0x40000000>;
  151. + interrupt-parent = <&plic>;
  152. + interrupts = <56>;
  153. + interrupt-map-mask = <0x0 0x0 0x0 0x7>;
  154. + interrupt-map = <0x0 0x0 0x0 0x1 &pcie_intc0 0x1>,
  155. + <0x0 0x0 0x0 0x2 &pcie_intc0 0x2>,
  156. + <0x0 0x0 0x0 0x3 &pcie_intc0 0x3>,
  157. + <0x0 0x0 0x0 0x4 &pcie_intc0 0x4>;
  158. + msi-parent = <&pcie0>;
  159. + msi-controller;
  160. + clocks = <&syscrg 86>,
  161. + <&stgcrg 10>,
  162. + <&stgcrg 8>,
  163. + <&stgcrg 9>;
  164. + clock-names = "noc", "tl", "axi_mst0", "apb";
  165. + resets = <&stgcrg 11>,
  166. + <&stgcrg 12>,
  167. + <&stgcrg 13>,
  168. + <&stgcrg 14>,
  169. + <&stgcrg 15>,
  170. + <&stgcrg 16>;
  171. +
  172. + pcie_intc0: interrupt-controller {
  173. + #address-cells = <0>;
  174. + #interrupt-cells = <1>;
  175. + interrupt-controller;
  176. + };
  177. + };
  178. + };