xref: /linux/Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml (revision ec8a42e7343234802b9054874fe01810880289ce)
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
7title: STMicroelectronics STM32 Digital Camera Memory Interface (DCMI) binding
8
9maintainers:
10  - Hugues Fruchet <hugues.fruchet@st.com>
11
12properties:
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    type: object
41    description:
42      DCMI supports a single port node with parallel bus. It should contain
43      one 'port' child node with child 'endpoint' node. Please refer to the
44      bindings defined in
45      Documentation/devicetree/bindings/media/video-interfaces.txt.
46
47    properties:
48      endpoint:
49        type: object
50
51        properties:
52          bus-type:
53            enum: [5, 6]
54            default: 5
55
56          bus-width:
57            enum: [8, 10, 12, 14]
58            default: 8
59
60          remote-endpoint: true
61
62        allOf:
63          - if:
64              properties:
65                bus-type:
66                  const: 6
67
68            then:
69              properties:
70                hsync-active: false
71                vsync-active: false
72                bus-width:
73                  enum: [8]
74
75        required:
76          - remote-endpoint
77          - bus-type
78          - pclk-sample
79
80        unevaluatedProperties: false
81
82    additionalProperties: false
83
84required:
85  - compatible
86  - reg
87  - interrupts
88  - clocks
89  - clock-names
90  - resets
91  - dmas
92  - dma-names
93  - port
94
95additionalProperties: false
96
97examples:
98  - |
99    #include <dt-bindings/interrupt-controller/arm-gic.h>
100    #include <dt-bindings/clock/stm32mp1-clks.h>
101    #include <dt-bindings/reset/stm32mp1-resets.h>
102    dcmi: dcmi@4c006000 {
103        compatible = "st,stm32-dcmi";
104        reg = <0x4c006000 0x400>;
105        interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
106        resets = <&rcc CAMITF_R>;
107        clocks = <&rcc DCMI>;
108        clock-names = "mclk";
109        dmas = <&dmamux1 75 0x400 0x0d>;
110        dma-names = "tx";
111
112        port {
113             dcmi_0: endpoint {
114                   remote-endpoint = <&ov5640_0>;
115                   bus-type = <5>;
116                   bus-width = <8>;
117                   hsync-active = <0>;
118                   vsync-active = <0>;
119                   pclk-sample = <1>;
120             };
121        };
122    };
123
124...
125