aspeed-lpc.yaml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. # # Copyright (c) 2021 Aspeed Technology Inc.
  3. %YAML 1.2
  4. ---
  5. $id: http://devicetree.org/schemas/mfd/aspeed-lpc.yaml#
  6. $schema: http://devicetree.org/meta-schemas/core.yaml#
  7. title: Aspeed Low Pin Count (LPC) Bus Controller
  8. maintainers:
  9. - Andrew Jeffery <andrew@aj.id.au>
  10. - Chia-Wei Wang <chiawei_wang@aspeedtech.com>
  11. description:
  12. The LPC bus is a means to bridge a host CPU to a number of low-bandwidth
  13. peripheral devices, replacing the use of the ISA bus in the age of PCI[0]. The
  14. primary use case of the Aspeed LPC controller is as a slave on the bus
  15. (typically in a Baseboard Management Controller SoC), but under certain
  16. conditions it can also take the role of bus master.
  17. The LPC controller is represented as a multi-function device to account for the
  18. mix of functionality, which includes, but is not limited to
  19. * An IPMI Block Transfer[2] Controller
  20. * An LPC Host Interface Controller manages functions exposed to the host such
  21. as LPC firmware hub cycles, configuration of the LPC-to-AHB mapping, UART
  22. management and bus snoop configuration.
  23. * A set of SuperIO[3] scratch registers enabling implementation of e.g. custom
  24. hardware management protocols for handover between the host and baseboard
  25. management controller.
  26. Additionally the state of the LPC controller influences the pinmux
  27. configuration, therefore the host portion of the controller is exposed as a
  28. syscon as a means to arbitrate access.
  29. properties:
  30. compatible:
  31. items:
  32. - enum:
  33. - aspeed,ast2400-lpc-v2
  34. - aspeed,ast2500-lpc-v2
  35. - aspeed,ast2600-lpc-v2
  36. - const: simple-mfd
  37. - const: syscon
  38. reg:
  39. maxItems: 1
  40. '#address-cells':
  41. const: 1
  42. '#size-cells':
  43. const: 1
  44. ranges: true
  45. patternProperties:
  46. '^lpc-ctrl@[0-9a-f]+$':
  47. type: object
  48. additionalProperties: false
  49. description: |
  50. The LPC Host Interface Controller manages functions exposed to the host such as
  51. LPC firmware hub cycles, configuration of the LPC-to-AHB mapping, UART management
  52. and bus snoop configuration.
  53. properties:
  54. compatible:
  55. items:
  56. - enum:
  57. - aspeed,ast2400-lpc-ctrl
  58. - aspeed,ast2500-lpc-ctrl
  59. - aspeed,ast2600-lpc-ctrl
  60. reg:
  61. maxItems: 1
  62. clocks:
  63. maxItems: 1
  64. memory-region:
  65. maxItems: 1
  66. description: handle to memory reservation for the LPC to AHB mapping region
  67. flash:
  68. $ref: /schemas/types.yaml#/definitions/phandle
  69. description: The SPI flash controller containing the flash to be exposed over the LPC to AHB mapping
  70. required:
  71. - compatible
  72. - clocks
  73. '^reset-controller@[0-9a-f]+$':
  74. type: object
  75. additionalProperties: false
  76. description:
  77. The UARTs present in the ASPEED SoC can have their resets tied to the reset
  78. state of the LPC bus. Some systems may chose to modify this configuration
  79. properties:
  80. compatible:
  81. items:
  82. - enum:
  83. - aspeed,ast2400-lpc-reset
  84. - aspeed,ast2500-lpc-reset
  85. - aspeed,ast2600-lpc-reset
  86. reg:
  87. maxItems: 1
  88. '#reset-cells':
  89. const: 1
  90. required:
  91. - compatible
  92. - '#reset-cells'
  93. '^lpc-snoop@[0-9a-f]+$':
  94. type: object
  95. additionalProperties: false
  96. description:
  97. The LPC snoop interface allows the BMC to listen on and record the data
  98. bytes written by the Host to the targeted LPC I/O pots.
  99. properties:
  100. compatible:
  101. items:
  102. - enum:
  103. - aspeed,ast2400-lpc-snoop
  104. - aspeed,ast2500-lpc-snoop
  105. - aspeed,ast2600-lpc-snoop
  106. reg:
  107. maxItems: 1
  108. clocks:
  109. maxItems: 1
  110. interrupts:
  111. maxItems: 1
  112. snoop-ports:
  113. $ref: /schemas/types.yaml#/definitions/uint32-array
  114. description: The LPC I/O ports to snoop
  115. required:
  116. - compatible
  117. - interrupts
  118. - snoop-ports
  119. '^uart-routing@[0-9a-f]+$':
  120. $ref: /schemas/soc/aspeed/uart-routing.yaml#
  121. description: The UART routing control under LPC register space
  122. required:
  123. - compatible
  124. - reg
  125. - '#address-cells'
  126. - '#size-cells'
  127. - ranges
  128. additionalProperties:
  129. type: object
  130. examples:
  131. - |
  132. #include <dt-bindings/interrupt-controller/arm-gic.h>
  133. #include <dt-bindings/clock/ast2600-clock.h>
  134. lpc: lpc@1e789000 {
  135. compatible = "aspeed,ast2600-lpc-v2", "simple-mfd", "syscon";
  136. reg = <0x1e789000 0x1000>;
  137. #address-cells = <1>;
  138. #size-cells = <1>;
  139. ranges = <0x0 0x1e789000 0x1000>;
  140. lpc_ctrl: lpc-ctrl@80 {
  141. compatible = "aspeed,ast2600-lpc-ctrl";
  142. reg = <0x80 0x80>;
  143. clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
  144. memory-region = <&flash_memory>;
  145. flash = <&spi>;
  146. };
  147. lpc_reset: reset-controller@98 {
  148. compatible = "aspeed,ast2600-lpc-reset";
  149. reg = <0x98 0x4>;
  150. #reset-cells = <1>;
  151. };
  152. lpc_snoop: lpc-snoop@90 {
  153. compatible = "aspeed,ast2600-lpc-snoop";
  154. reg = <0x90 0x8>;
  155. interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
  156. snoop-ports = <0x80>;
  157. };
  158. };