media: dt-bindings: media: Use OF graph schema
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / media / st,stm32-dcmi.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/media/st,stm32-dcmi.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: STMicroelectronics STM32 Digital Camera Memory Interface (DCMI) binding
8
9 maintainers:
10   - Hugues Fruchet <hugues.fruchet@st.com>
11
12 properties:
13   compatible:
14     const: st,stm32-dcmi
15
16   reg:
17     maxItems: 1
18
19   interrupts:
20     maxItems: 1
21
22   clocks:
23     maxItems: 1
24
25   clock-names:
26     items:
27       - const: mclk
28
29   dmas:
30     maxItems: 1
31
32   dma-names:
33     items:
34       - const: tx
35
36   resets:
37     maxItems: 1
38
39   port:
40     $ref: /schemas/graph.yaml#/properties/port
41     description:
42       DCMI supports a single port node with parallel bus.
43
44     properties:
45       endpoint:
46         type: object
47
48         properties:
49           bus-type:
50             enum: [5, 6]
51             default: 5
52
53           bus-width:
54             enum: [8, 10, 12, 14]
55             default: 8
56
57           remote-endpoint: true
58
59         allOf:
60           - if:
61               properties:
62                 bus-type:
63                   const: 6
64
65             then:
66               properties:
67                 hsync-active: false
68                 vsync-active: false
69                 bus-width:
70                   enum: [8]
71
72         required:
73           - remote-endpoint
74           - bus-type
75           - pclk-sample
76
77         unevaluatedProperties: false
78
79     additionalProperties: false
80
81 required:
82   - compatible
83   - reg
84   - interrupts
85   - clocks
86   - clock-names
87   - resets
88   - dmas
89   - dma-names
90   - port
91
92 additionalProperties: false
93
94 examples:
95   - |
96     #include <dt-bindings/interrupt-controller/arm-gic.h>
97     #include <dt-bindings/clock/stm32mp1-clks.h>
98     #include <dt-bindings/reset/stm32mp1-resets.h>
99     dcmi: dcmi@4c006000 {
100         compatible = "st,stm32-dcmi";
101         reg = <0x4c006000 0x400>;
102         interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
103         resets = <&rcc CAMITF_R>;
104         clocks = <&rcc DCMI>;
105         clock-names = "mclk";
106         dmas = <&dmamux1 75 0x400 0x0d>;
107         dma-names = "tx";
108
109         port {
110              dcmi_0: endpoint {
111                    remote-endpoint = <&ov5640_0>;
112                    bus-type = <5>;
113                    bus-width = <8>;
114                    hsync-active = <0>;
115                    vsync-active = <0>;
116                    pclk-sample = <1>;
117              };
118         };
119     };
120
121 ...