rockchip-isp1.yaml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. # SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/media/rockchip-isp1.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Rockchip SoC Image Signal Processing unit v1
  7. maintainers:
  8. - Helen Koike <helen.koike@collabora.com>
  9. description: |
  10. Rockchip ISP1 is the Camera interface for the Rockchip series of SoCs
  11. which contains image processing, scaling, and compression functions.
  12. properties:
  13. compatible:
  14. enum:
  15. - fsl,imx8mp-isp
  16. - rockchip,px30-cif-isp
  17. - rockchip,rk3399-cif-isp
  18. reg:
  19. maxItems: 1
  20. interrupts:
  21. minItems: 1
  22. maxItems: 3
  23. interrupt-names:
  24. items:
  25. - const: isp
  26. - const: mi
  27. - const: mipi
  28. clocks:
  29. minItems: 3
  30. items:
  31. # isp0 and isp1
  32. - description: ISP clock (for imx8mp, clk)
  33. - description: ISP AXI clock (for imx8mp, m_hclk)
  34. - description: ISP AHB clock (for imx8mp, hclk)
  35. # only for isp1
  36. - description: ISP Pixel clock
  37. clock-names:
  38. minItems: 3
  39. items:
  40. # isp0 and isp1
  41. - const: isp
  42. - const: aclk
  43. - const: hclk
  44. # only for isp1
  45. - const: pclk
  46. fsl,blk-ctrl:
  47. $ref: /schemas/types.yaml#/definitions/phandle-array
  48. maxItems: 1
  49. description:
  50. A phandle to the media block control for the ISP, followed by a cell
  51. containing the index of the gasket.
  52. iommus:
  53. maxItems: 1
  54. phys:
  55. maxItems: 1
  56. description: phandle for the PHY port
  57. phy-names:
  58. const: dphy
  59. power-domains:
  60. maxItems: 1
  61. ports:
  62. $ref: /schemas/graph.yaml#/properties/ports
  63. properties:
  64. port@0:
  65. $ref: /schemas/graph.yaml#/$defs/port-base
  66. unevaluatedProperties: false
  67. description: connection point for sensors at MIPI-DPHY RX0
  68. properties:
  69. endpoint:
  70. $ref: video-interfaces.yaml#
  71. unevaluatedProperties: false
  72. properties:
  73. data-lanes:
  74. minItems: 1
  75. maxItems: 4
  76. port@1:
  77. $ref: /schemas/graph.yaml#/$defs/port-base
  78. unevaluatedProperties: false
  79. description: connection point for input on the parallel interface
  80. properties:
  81. endpoint:
  82. $ref: video-interfaces.yaml#
  83. unevaluatedProperties: false
  84. properties:
  85. bus-type:
  86. enum: [5, 6]
  87. required:
  88. - bus-type
  89. anyOf:
  90. - required:
  91. - port@0
  92. - required:
  93. - port@1
  94. required:
  95. - compatible
  96. - reg
  97. - interrupts
  98. - clocks
  99. - clock-names
  100. - power-domains
  101. - ports
  102. allOf:
  103. - if:
  104. properties:
  105. compatible:
  106. contains:
  107. const: rockchip,rk3399-cif-isp
  108. then:
  109. properties:
  110. clocks:
  111. minItems: 3
  112. maxItems: 4
  113. clock-names:
  114. minItems: 3
  115. maxItems: 4
  116. - if:
  117. properties:
  118. compatible:
  119. contains:
  120. const: rockchip,px30-cif-isp
  121. then:
  122. required:
  123. - interrupt-names
  124. - if:
  125. properties:
  126. compatible:
  127. contains:
  128. const: fsl,imx8mp-isp
  129. then:
  130. properties:
  131. iommus: false
  132. phys: false
  133. phy-names: false
  134. required:
  135. - fsl,blk-ctrl
  136. else:
  137. properties:
  138. fsl,blk-ctrl: false
  139. required:
  140. - iommus
  141. - phys
  142. - phy-names
  143. additionalProperties: false
  144. examples:
  145. - |
  146. #include <dt-bindings/clock/rk3399-cru.h>
  147. #include <dt-bindings/interrupt-controller/arm-gic.h>
  148. #include <dt-bindings/power/rk3399-power.h>
  149. parent0: parent {
  150. #address-cells = <2>;
  151. #size-cells = <2>;
  152. isp0: isp0@ff910000 {
  153. compatible = "rockchip,rk3399-cif-isp";
  154. reg = <0x0 0xff910000 0x0 0x4000>;
  155. interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>;
  156. clocks = <&cru SCLK_ISP0>,
  157. <&cru ACLK_ISP0_WRAPPER>,
  158. <&cru HCLK_ISP0_WRAPPER>;
  159. clock-names = "isp", "aclk", "hclk";
  160. iommus = <&isp0_mmu>;
  161. phys = <&dphy>;
  162. phy-names = "dphy";
  163. power-domains = <&power RK3399_PD_ISP0>;
  164. ports {
  165. #address-cells = <1>;
  166. #size-cells = <0>;
  167. port@0 {
  168. reg = <0>;
  169. #address-cells = <1>;
  170. #size-cells = <0>;
  171. mipi_in_wcam: endpoint@0 {
  172. reg = <0>;
  173. remote-endpoint = <&wcam_out>;
  174. data-lanes = <1 2>;
  175. };
  176. mipi_in_ucam: endpoint@1 {
  177. reg = <1>;
  178. remote-endpoint = <&ucam_out>;
  179. data-lanes = <1>;
  180. };
  181. };
  182. };
  183. };
  184. i2c7: i2c {
  185. #address-cells = <1>;
  186. #size-cells = <0>;
  187. wcam: camera@36 {
  188. compatible = "ovti,ov5695";
  189. reg = <0x36>;
  190. clocks = <&cru SCLK_TESTCLKOUT1>;
  191. port {
  192. wcam_out: endpoint {
  193. remote-endpoint = <&mipi_in_wcam>;
  194. data-lanes = <1 2>;
  195. };
  196. };
  197. };
  198. ucam: camera@3c {
  199. compatible = "ovti,ov2685";
  200. reg = <0x3c>;
  201. clocks = <&cru SCLK_TESTCLKOUT1>;
  202. clock-names = "xvclk";
  203. avdd-supply = <&pp2800_cam>;
  204. dovdd-supply = <&pp1800>;
  205. dvdd-supply = <&pp1800>;
  206. port {
  207. ucam_out: endpoint {
  208. remote-endpoint = <&mipi_in_ucam>;
  209. data-lanes = <1>;
  210. };
  211. };
  212. };
  213. };
  214. };
  215. - |
  216. #include <dt-bindings/interrupt-controller/arm-gic.h>
  217. #include <dt-bindings/power/px30-power.h>
  218. parent1: parent {
  219. #address-cells = <2>;
  220. #size-cells = <2>;
  221. isp: isp@ff4a0000 {
  222. compatible = "rockchip,px30-cif-isp";
  223. reg = <0x0 0xff4a0000 0x0 0x8000>;
  224. interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
  225. <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>,
  226. <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
  227. interrupt-names = "isp", "mi", "mipi";
  228. clocks = <&cru SCLK_ISP0>,
  229. <&cru ACLK_ISP0_WRAPPER>,
  230. <&cru HCLK_ISP0_WRAPPER>,
  231. <&cru PCLK_ISP1_WRAPPER>;
  232. clock-names = "isp", "aclk", "hclk", "pclk";
  233. iommus = <&isp_mmu>;
  234. phys = <&csi_dphy>;
  235. phy-names = "dphy";
  236. power-domains = <&power PX30_PD_VI>;
  237. ports {
  238. #address-cells = <1>;
  239. #size-cells = <0>;
  240. port@0 {
  241. reg = <0>;
  242. #address-cells = <1>;
  243. #size-cells = <0>;
  244. mipi_in_ucam1: endpoint@0 {
  245. reg = <0>;
  246. remote-endpoint = <&ucam1_out>;
  247. data-lanes = <1 2>;
  248. };
  249. };
  250. };
  251. };
  252. i2c2: i2c {
  253. #address-cells = <1>;
  254. #size-cells = <0>;
  255. ov5695: camera@36 {
  256. compatible = "ovti,ov5647";
  257. reg = <0x36>;
  258. clocks = <&cru SCLK_CIF_OUT>;
  259. port {
  260. ucam1_out: endpoint {
  261. remote-endpoint = <&mipi_in_ucam1>;
  262. data-lanes = <1 2>;
  263. };
  264. };
  265. };
  266. };
  267. };