microchip,csi2dc.yaml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/media/microchip,csi2dc.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Microchip CSI2 Demux Controller (CSI2DC)
  7. maintainers:
  8. - Eugen Hristev <eugen.hristev@microchip.com>
  9. description:
  10. CSI2DC - Camera Serial Interface 2 Demux Controller
  11. CSI2DC is a hardware block that receives incoming data from either from an
  12. IDI interface or from a parallel bus interface.
  13. It filters IDI packets based on their data type and virtual channel
  14. identifier, then converts the byte stream to a pixel stream into a cross
  15. clock domain towards a parallel interface that can be read by a sensor
  16. controller.
  17. IDI interface is Synopsys proprietary.
  18. CSI2DC can act a simple bypass bridge if the incoming data is coming from
  19. a parallel interface.
  20. CSI2DC provides two pipes, one video pipe and one data pipe. Video pipe
  21. is connected at the output to a sensor controller and the data pipe is
  22. accessible as a DMA slave port to a DMA controller.
  23. CSI2DC supports a single 'port' node as a sink port with either Synopsys
  24. 32-bit IDI interface or a parallel interface.
  25. CSI2DC supports one 'port' node as source port with parallel interface.
  26. This is called video pipe.
  27. This port has an 'endpoint' that can be connected to a sink port of another
  28. controller (next in pipeline).
  29. CSI2DC also supports direct access to the data through AHB, via DMA channel,
  30. called data pipe.
  31. For data pipe to be available, a dma controller and a dma channel must be
  32. referenced.
  33. properties:
  34. compatible:
  35. const: microchip,sama7g5-csi2dc
  36. reg:
  37. maxItems: 1
  38. clocks:
  39. minItems: 2
  40. maxItems: 2
  41. clock-names:
  42. description:
  43. CSI2DC must have two clocks to function correctly. One clock is the
  44. peripheral clock for the inside functionality of the hardware block.
  45. This is named 'pclk'. The second clock must be the cross domain clock,
  46. in which CSI2DC will perform clock crossing. This clock must be fed
  47. by the next controller in pipeline, which usually is a sensor controller.
  48. Normally this clock should be given by this sensor controller who
  49. is also a clock source. This clock is named 'scck', sensor controller clock.
  50. items:
  51. - const: pclk
  52. - const: scck
  53. dmas:
  54. maxItems: 1
  55. dma-names:
  56. const: rx
  57. ports:
  58. $ref: /schemas/graph.yaml#/properties/ports
  59. properties:
  60. port@0:
  61. $ref: /schemas/graph.yaml#/$defs/port-base
  62. unevaluatedProperties: false
  63. description:
  64. Input port node, single endpoint describing the input port.
  65. properties:
  66. endpoint:
  67. $ref: video-interfaces.yaml#
  68. unevaluatedProperties: false
  69. description: Endpoint connected to input device
  70. properties:
  71. bus-type:
  72. enum: [4, 5, 6]
  73. default: 4
  74. bus-width:
  75. enum: [8, 9, 10, 11, 12, 13, 14]
  76. default: 14
  77. clock-noncontinuous:
  78. type: boolean
  79. description:
  80. Presence of this boolean property decides whether clock is
  81. continuous or noncontinuous.
  82. remote-endpoint: true
  83. port@1:
  84. $ref: /schemas/graph.yaml#/$defs/port-base
  85. unevaluatedProperties: false
  86. description:
  87. Output port node, single endpoint describing the output port.
  88. properties:
  89. endpoint:
  90. unevaluatedProperties: false
  91. $ref: video-interfaces.yaml#
  92. description: Endpoint connected to output device
  93. properties:
  94. bus-type:
  95. enum: [5, 6]
  96. default: 5
  97. bus-width:
  98. enum: [8, 9, 10, 11, 12, 13, 14]
  99. default: 14
  100. remote-endpoint: true
  101. required:
  102. - port@0
  103. - port@1
  104. additionalProperties: false
  105. required:
  106. - compatible
  107. - reg
  108. - clocks
  109. - clock-names
  110. - ports
  111. examples:
  112. # Example for connecting to a parallel sensor controller block (video pipe)
  113. # and the input is received from Synopsys IDI interface
  114. - |
  115. csi2dc@e1404000 {
  116. compatible = "microchip,sama7g5-csi2dc";
  117. reg = <0xe1404000 0x500>;
  118. clocks = <&pclk>, <&scck>;
  119. clock-names = "pclk", "scck";
  120. ports {
  121. #address-cells = <1>;
  122. #size-cells = <0>;
  123. port@0 {
  124. reg = <0>; /* must be 0, first child port */
  125. csi2dc_in: endpoint { /* input from IDI interface */
  126. bus-type = <4>; /* MIPI CSI2 D-PHY */
  127. remote-endpoint = <&csi2host_out>;
  128. };
  129. };
  130. port@1 {
  131. reg = <1>; /* must be 1, second child port */
  132. csi2dc_out: endpoint {
  133. remote-endpoint = <&xisc_in>; /* output to sensor controller */
  134. };
  135. };
  136. };
  137. };
  138. # Example for connecting to a DMA master as an AHB slave
  139. # and the input is received from Synopsys IDI interface
  140. - |
  141. #include <dt-bindings/dma/at91.h>
  142. csi2dc@e1404000 {
  143. compatible = "microchip,sama7g5-csi2dc";
  144. reg = <0xe1404000 0x500>;
  145. clocks = <&pclk>, <&scck>;
  146. clock-names = "pclk", "scck";
  147. dmas = <&dma0 AT91_XDMAC_DT_PERID(34)>;
  148. dma-names = "rx";
  149. ports {
  150. #address-cells = <1>;
  151. #size-cells = <0>;
  152. port@0 {
  153. reg = <0>; /* must be 0, first child port */
  154. csi2dc_input: endpoint { /* input from IDI interface */
  155. remote-endpoint = <&csi2host_out>;
  156. };
  157. };
  158. port@1 {
  159. reg = <1>;
  160. };
  161. };
  162. };
  163. ...