1b97ee269SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2b97ee269SEmmanuel Vadot%YAML 1.2
3b97ee269SEmmanuel Vadot---
4b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/display/tegra/nvidia,tegra20-vi.yaml#
5b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6b97ee269SEmmanuel Vadot
7b97ee269SEmmanuel Vadottitle: NVIDIA Tegra Video Input controller
8b97ee269SEmmanuel Vadot
9b97ee269SEmmanuel Vadotmaintainers:
10b97ee269SEmmanuel Vadot  - Thierry Reding <thierry.reding@gmail.com>
11b97ee269SEmmanuel Vadot  - Jon Hunter <jonathanh@nvidia.com>
12b97ee269SEmmanuel Vadot
13b97ee269SEmmanuel Vadotproperties:
14b97ee269SEmmanuel Vadot  $nodename:
15b97ee269SEmmanuel Vadot    pattern: "^vi@[0-9a-f]+$"
16b97ee269SEmmanuel Vadot
17b97ee269SEmmanuel Vadot  compatible:
18b97ee269SEmmanuel Vadot    oneOf:
19b97ee269SEmmanuel Vadot      - const: nvidia,tegra20-vi
20b97ee269SEmmanuel Vadot      - const: nvidia,tegra30-vi
21b97ee269SEmmanuel Vadot      - const: nvidia,tegra114-vi
22b97ee269SEmmanuel Vadot      - const: nvidia,tegra124-vi
23b97ee269SEmmanuel Vadot      - items:
24b97ee269SEmmanuel Vadot          - const: nvidia,tegra132-vi
25b97ee269SEmmanuel Vadot          - const: nvidia,tegra124-vi
26b97ee269SEmmanuel Vadot      - const: nvidia,tegra210-vi
27b97ee269SEmmanuel Vadot      - const: nvidia,tegra186-vi
28b97ee269SEmmanuel Vadot      - const: nvidia,tegra194-vi
29b97ee269SEmmanuel Vadot
30b97ee269SEmmanuel Vadot  reg:
31b97ee269SEmmanuel Vadot    maxItems: 1
32b97ee269SEmmanuel Vadot
33b97ee269SEmmanuel Vadot  interrupts:
34b97ee269SEmmanuel Vadot    maxItems: 1
35b97ee269SEmmanuel Vadot
36b97ee269SEmmanuel Vadot  clocks:
37b97ee269SEmmanuel Vadot    maxItems: 1
38b97ee269SEmmanuel Vadot
39b97ee269SEmmanuel Vadot  resets:
40b97ee269SEmmanuel Vadot    items:
41b97ee269SEmmanuel Vadot      - description: module reset
42b97ee269SEmmanuel Vadot
43b97ee269SEmmanuel Vadot  reset-names:
44b97ee269SEmmanuel Vadot    items:
45b97ee269SEmmanuel Vadot      - const: vi
46b97ee269SEmmanuel Vadot
47b97ee269SEmmanuel Vadot  iommus:
48b97ee269SEmmanuel Vadot    maxItems: 1
49b97ee269SEmmanuel Vadot
50b97ee269SEmmanuel Vadot  interconnects:
51b97ee269SEmmanuel Vadot    minItems: 4
52b97ee269SEmmanuel Vadot    maxItems: 5
53b97ee269SEmmanuel Vadot
54b97ee269SEmmanuel Vadot  interconnect-names:
55b97ee269SEmmanuel Vadot    minItems: 4
56b97ee269SEmmanuel Vadot    maxItems: 5
57b97ee269SEmmanuel Vadot
58cb7aa33aSEmmanuel Vadot  operating-points-v2: true
59b97ee269SEmmanuel Vadot
60b97ee269SEmmanuel Vadot  power-domains:
61b97ee269SEmmanuel Vadot    items:
62b97ee269SEmmanuel Vadot      - description: phandle to the VENC power domain
63b97ee269SEmmanuel Vadot
64b97ee269SEmmanuel Vadot  "#address-cells":
65b97ee269SEmmanuel Vadot    const: 1
66b97ee269SEmmanuel Vadot
67b97ee269SEmmanuel Vadot  "#size-cells":
68b97ee269SEmmanuel Vadot    const: 1
69b97ee269SEmmanuel Vadot
70b97ee269SEmmanuel Vadot  ranges:
71b97ee269SEmmanuel Vadot    maxItems: 1
72b97ee269SEmmanuel Vadot
73b97ee269SEmmanuel Vadot  avdd-dsi-csi-supply:
74b97ee269SEmmanuel Vadot    description: DSI/CSI power supply. Must supply 1.2 V.
75b97ee269SEmmanuel Vadot
76*f126890aSEmmanuel Vadot  vip:
77*f126890aSEmmanuel Vadot    $ref: /schemas/display/tegra/nvidia,tegra20-vip.yaml
78*f126890aSEmmanuel Vadot
79*f126890aSEmmanuel Vadot  ports:
80*f126890aSEmmanuel Vadot    $ref: /schemas/graph.yaml#/properties/ports
81*f126890aSEmmanuel Vadot
82*f126890aSEmmanuel Vadot    properties:
83*f126890aSEmmanuel Vadot      port@0:
84*f126890aSEmmanuel Vadot        $ref: /schemas/graph.yaml#/properties/port
85*f126890aSEmmanuel Vadot        description:
86*f126890aSEmmanuel Vadot          Input from the VIP (parallel input capture) module
87*f126890aSEmmanuel Vadot
88b97ee269SEmmanuel VadotpatternProperties:
89b97ee269SEmmanuel Vadot  "^csi@[0-9a-f]+$":
90b97ee269SEmmanuel Vadot    type: object
91b97ee269SEmmanuel Vadot
92b97ee269SEmmanuel VadotadditionalProperties: false
93b97ee269SEmmanuel Vadot
94b97ee269SEmmanuel Vadotrequired:
95b97ee269SEmmanuel Vadot  - compatible
96b97ee269SEmmanuel Vadot  - reg
97b97ee269SEmmanuel Vadot  - interrupts
98b97ee269SEmmanuel Vadot  - clocks
99b97ee269SEmmanuel Vadot
100b97ee269SEmmanuel VadotallOf:
101b97ee269SEmmanuel Vadot  - if:
102b97ee269SEmmanuel Vadot      properties:
103b97ee269SEmmanuel Vadot        compatible:
104b97ee269SEmmanuel Vadot          contains:
105b97ee269SEmmanuel Vadot            enum:
106b97ee269SEmmanuel Vadot              - nvidia,tegra20-vi
107b97ee269SEmmanuel Vadot              - nvidia,tegra30-vi
108b97ee269SEmmanuel Vadot              - nvidia,tegra114-vi
109b97ee269SEmmanuel Vadot              - nvidia,tegra124-vi
110b97ee269SEmmanuel Vadot    then:
111b97ee269SEmmanuel Vadot      required:
112b97ee269SEmmanuel Vadot        - resets
113b97ee269SEmmanuel Vadot        - reset-names
114b97ee269SEmmanuel Vadot    else:
115b97ee269SEmmanuel Vadot      required:
116b97ee269SEmmanuel Vadot        - power-domains
117b97ee269SEmmanuel Vadot
118b97ee269SEmmanuel Vadotexamples:
119b97ee269SEmmanuel Vadot  - |
120b97ee269SEmmanuel Vadot    #include <dt-bindings/clock/tegra20-car.h>
121b97ee269SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
122b97ee269SEmmanuel Vadot
123*f126890aSEmmanuel Vadot    i2c {
124*f126890aSEmmanuel Vadot        #address-cells = <1>;
125*f126890aSEmmanuel Vadot        #size-cells = <0>;
126*f126890aSEmmanuel Vadot        camera@48 {
127*f126890aSEmmanuel Vadot            compatible = "aptina,mt9v111";
128*f126890aSEmmanuel Vadot            reg = <0x48>;
129*f126890aSEmmanuel Vadot            clocks = <&camera_clk>;
130*f126890aSEmmanuel Vadot
131*f126890aSEmmanuel Vadot            port {
132*f126890aSEmmanuel Vadot                mt9v111_out: endpoint {
133*f126890aSEmmanuel Vadot                    remote-endpoint = <&vi_vip_in>;
134*f126890aSEmmanuel Vadot                };
135*f126890aSEmmanuel Vadot            };
136*f126890aSEmmanuel Vadot        };
137*f126890aSEmmanuel Vadot    };
138*f126890aSEmmanuel Vadot
139b97ee269SEmmanuel Vadot    vi@54080000 {
140b97ee269SEmmanuel Vadot        compatible = "nvidia,tegra20-vi";
141b97ee269SEmmanuel Vadot        reg = <0x54080000 0x00040000>;
142b97ee269SEmmanuel Vadot        interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
143b97ee269SEmmanuel Vadot        clocks = <&tegra_car TEGRA20_CLK_VI>;
144b97ee269SEmmanuel Vadot        resets = <&tegra_car 100>;
145b97ee269SEmmanuel Vadot        reset-names = "vi";
146*f126890aSEmmanuel Vadot
147*f126890aSEmmanuel Vadot        vip {
148*f126890aSEmmanuel Vadot            compatible = "nvidia,tegra20-vip";
149*f126890aSEmmanuel Vadot            ports {
150*f126890aSEmmanuel Vadot                #address-cells = <1>;
151*f126890aSEmmanuel Vadot                #size-cells = <0>;
152*f126890aSEmmanuel Vadot                port@0 {
153*f126890aSEmmanuel Vadot                    reg = <0>;
154*f126890aSEmmanuel Vadot                    vi_vip_in: endpoint {
155*f126890aSEmmanuel Vadot                        remote-endpoint = <&mt9v111_out>;
156*f126890aSEmmanuel Vadot                    };
157*f126890aSEmmanuel Vadot                };
158*f126890aSEmmanuel Vadot                port@1 {
159*f126890aSEmmanuel Vadot                    reg = <1>;
160*f126890aSEmmanuel Vadot                    vi_vip_out: endpoint {
161*f126890aSEmmanuel Vadot                        remote-endpoint = <&vi_in>;
162*f126890aSEmmanuel Vadot                    };
163*f126890aSEmmanuel Vadot                };
164*f126890aSEmmanuel Vadot            };
165*f126890aSEmmanuel Vadot        };
166*f126890aSEmmanuel Vadot
167*f126890aSEmmanuel Vadot        ports {
168*f126890aSEmmanuel Vadot            #address-cells = <1>;
169*f126890aSEmmanuel Vadot            #size-cells = <0>;
170*f126890aSEmmanuel Vadot            port@0 {
171*f126890aSEmmanuel Vadot                reg = <0>;
172*f126890aSEmmanuel Vadot                vi_in: endpoint {
173*f126890aSEmmanuel Vadot                    remote-endpoint = <&vi_vip_out>;
174*f126890aSEmmanuel Vadot                };
175*f126890aSEmmanuel Vadot            };
176*f126890aSEmmanuel Vadot        };
177b97ee269SEmmanuel Vadot    };
178b97ee269SEmmanuel Vadot
179b97ee269SEmmanuel Vadot  - |
180b97ee269SEmmanuel Vadot    #include <dt-bindings/clock/tegra210-car.h>
181b97ee269SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
182b97ee269SEmmanuel Vadot
183b97ee269SEmmanuel Vadot    vi@54080000 {
184b97ee269SEmmanuel Vadot        compatible = "nvidia,tegra210-vi";
185b97ee269SEmmanuel Vadot        reg = <0x54080000 0x00000700>;
186b97ee269SEmmanuel Vadot        interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
187b97ee269SEmmanuel Vadot        assigned-clocks = <&tegra_car TEGRA210_CLK_VI>;
188b97ee269SEmmanuel Vadot        assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_C4_OUT0>;
189b97ee269SEmmanuel Vadot
190b97ee269SEmmanuel Vadot        clocks = <&tegra_car TEGRA210_CLK_VI>;
191b97ee269SEmmanuel Vadot        power-domains = <&pd_venc>;
192b97ee269SEmmanuel Vadot
193b97ee269SEmmanuel Vadot        #address-cells = <1>;
194b97ee269SEmmanuel Vadot        #size-cells = <1>;
195b97ee269SEmmanuel Vadot
196b97ee269SEmmanuel Vadot        ranges = <0x0 0x54080000 0x2000>;
197b97ee269SEmmanuel Vadot
198b97ee269SEmmanuel Vadot        csi@838 {
199b97ee269SEmmanuel Vadot            compatible = "nvidia,tegra210-csi";
200b97ee269SEmmanuel Vadot            reg = <0x838 0x1300>;
201b97ee269SEmmanuel Vadot            assigned-clocks = <&tegra_car TEGRA210_CLK_CILAB>,
202b97ee269SEmmanuel Vadot                              <&tegra_car TEGRA210_CLK_CILCD>,
203b97ee269SEmmanuel Vadot                              <&tegra_car TEGRA210_CLK_CILE>,
204b97ee269SEmmanuel Vadot                              <&tegra_car TEGRA210_CLK_CSI_TPG>;
205b97ee269SEmmanuel Vadot            assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_P>,
206b97ee269SEmmanuel Vadot                                     <&tegra_car TEGRA210_CLK_PLL_P>,
207b97ee269SEmmanuel Vadot                                     <&tegra_car TEGRA210_CLK_PLL_P>;
208b97ee269SEmmanuel Vadot            assigned-clock-rates = <102000000>,
209b97ee269SEmmanuel Vadot                                   <102000000>,
210b97ee269SEmmanuel Vadot                                   <102000000>,
211b97ee269SEmmanuel Vadot                                   <972000000>;
212b97ee269SEmmanuel Vadot
213b97ee269SEmmanuel Vadot            clocks = <&tegra_car TEGRA210_CLK_CSI>,
214b97ee269SEmmanuel Vadot                     <&tegra_car TEGRA210_CLK_CILAB>,
215b97ee269SEmmanuel Vadot                     <&tegra_car TEGRA210_CLK_CILCD>,
216b97ee269SEmmanuel Vadot                     <&tegra_car TEGRA210_CLK_CILE>,
217b97ee269SEmmanuel Vadot                     <&tegra_car TEGRA210_CLK_CSI_TPG>;
218b97ee269SEmmanuel Vadot            clock-names = "csi", "cilab", "cilcd", "cile", "csi_tpg";
219b97ee269SEmmanuel Vadot            power-domains = <&pd_sor>;
220b97ee269SEmmanuel Vadot        };
221b97ee269SEmmanuel Vadot    };
222