xref: /freebsd/sys/contrib/device-tree/Bindings/media/samsung,fimc.yaml (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
1fac71e4eSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2fac71e4eSEmmanuel Vadot%YAML 1.2
3fac71e4eSEmmanuel Vadot---
4fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/media/samsung,fimc.yaml#
5fac71e4eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6fac71e4eSEmmanuel Vadot
7fac71e4eSEmmanuel Vadottitle: Samsung S5P/Exynos SoC Camera Subsystem (FIMC)
8fac71e4eSEmmanuel Vadot
9fac71e4eSEmmanuel Vadotmaintainers:
10fac71e4eSEmmanuel Vadot  - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
11fac71e4eSEmmanuel Vadot  - Sylwester Nawrocki <s.nawrocki@samsung.com>
12fac71e4eSEmmanuel Vadot
13fac71e4eSEmmanuel Vadotdescription: |
14fac71e4eSEmmanuel Vadot  The S5P/Exynos SoC Camera subsystem comprises of multiple sub-devices
15fac71e4eSEmmanuel Vadot  represented by separate device tree nodes. Currently this includes: Fully
16fac71e4eSEmmanuel Vadot  Integrated Mobile Camera (FIMC, in the S5P SoCs series known as CAMIF), MIPI
17fac71e4eSEmmanuel Vadot  CSIS, FIMC-LITE and FIMC-IS (ISP).
18fac71e4eSEmmanuel Vadot
19fac71e4eSEmmanuel Vadotproperties:
20fac71e4eSEmmanuel Vadot  compatible:
21fac71e4eSEmmanuel Vadot    const: samsung,fimc
22fac71e4eSEmmanuel Vadot
23fac71e4eSEmmanuel Vadot  ranges: true
24fac71e4eSEmmanuel Vadot
25fac71e4eSEmmanuel Vadot  '#address-cells':
26fac71e4eSEmmanuel Vadot    const: 1
27fac71e4eSEmmanuel Vadot
28fac71e4eSEmmanuel Vadot  '#size-cells':
29fac71e4eSEmmanuel Vadot    const: 1
30fac71e4eSEmmanuel Vadot
31fac71e4eSEmmanuel Vadot  '#clock-cells':
32fac71e4eSEmmanuel Vadot    const: 1
33fac71e4eSEmmanuel Vadot    description: |
34fac71e4eSEmmanuel Vadot      The clock specifier cell stores an index of a clock: 0, 1 for
35fac71e4eSEmmanuel Vadot      CAM_A_CLKOUT, CAM_B_CLKOUT clocks respectively.
36fac71e4eSEmmanuel Vadot
37fac71e4eSEmmanuel Vadot  clocks:
38fac71e4eSEmmanuel Vadot    minItems: 2
39fac71e4eSEmmanuel Vadot    maxItems: 4
40fac71e4eSEmmanuel Vadot
41fac71e4eSEmmanuel Vadot  clock-names:
42fac71e4eSEmmanuel Vadot    minItems: 2
43fac71e4eSEmmanuel Vadot    items:
44fac71e4eSEmmanuel Vadot      - const: sclk_cam0
45fac71e4eSEmmanuel Vadot      - const: sclk_cam1
46fac71e4eSEmmanuel Vadot      - const: pxl_async0
47fac71e4eSEmmanuel Vadot      - const: pxl_async1
48fac71e4eSEmmanuel Vadot
49fac71e4eSEmmanuel Vadot  clock-output-names:
50fac71e4eSEmmanuel Vadot    maxItems: 2
51fac71e4eSEmmanuel Vadot
52fac71e4eSEmmanuel Vadot  parallel-ports:
53fac71e4eSEmmanuel Vadot    $ref: /schemas/graph.yaml#/properties/ports
54fac71e4eSEmmanuel Vadot    description:
55fac71e4eSEmmanuel Vadot      Active parallel video input ports.
56fac71e4eSEmmanuel Vadot
57fac71e4eSEmmanuel Vadot    patternProperties:
58fac71e4eSEmmanuel Vadot      "^port@[01]$":
59fac71e4eSEmmanuel Vadot        $ref: /schemas/graph.yaml#/$defs/port-base
60aa1a8ff2SEmmanuel Vadot        unevaluatedProperties: false
61fac71e4eSEmmanuel Vadot        description:
62fac71e4eSEmmanuel Vadot          Camera A and camera B inputs.
63fac71e4eSEmmanuel Vadot
64fac71e4eSEmmanuel Vadot        properties:
65fac71e4eSEmmanuel Vadot          endpoint:
66fac71e4eSEmmanuel Vadot            $ref: /schemas/media/video-interfaces.yaml#
67fac71e4eSEmmanuel Vadot            unevaluatedProperties: false
68fac71e4eSEmmanuel Vadot
69fac71e4eSEmmanuel Vadot  pinctrl-names:
70fac71e4eSEmmanuel Vadot    minItems: 1
71fac71e4eSEmmanuel Vadot    items:
72fac71e4eSEmmanuel Vadot      - const: default
73fac71e4eSEmmanuel Vadot      - const: idle
74fac71e4eSEmmanuel Vadot      - const: active_a
75fac71e4eSEmmanuel Vadot      - const: active_b
76fac71e4eSEmmanuel Vadot
77fac71e4eSEmmanuel VadotpatternProperties:
78fac71e4eSEmmanuel Vadot  "^csis@[0-9a-f]+$":
79fac71e4eSEmmanuel Vadot    type: object
80fac71e4eSEmmanuel Vadot    $ref: samsung,exynos4210-csis.yaml#
81fac71e4eSEmmanuel Vadot    description: MIPI CSI-2 receiver.
82fac71e4eSEmmanuel Vadot
83fac71e4eSEmmanuel Vadot  "^fimc@[0-9a-f]+$":
84fac71e4eSEmmanuel Vadot    type: object
85fac71e4eSEmmanuel Vadot    $ref: samsung,exynos4210-fimc.yaml#
86fac71e4eSEmmanuel Vadot    description: Fully Integrated Mobile Camera.
87fac71e4eSEmmanuel Vadot
88fac71e4eSEmmanuel Vadot  "^fimc-is@[0-9a-f]+$":
89fac71e4eSEmmanuel Vadot    type: object
90fac71e4eSEmmanuel Vadot    $ref: samsung,exynos4212-fimc-is.yaml#
91fac71e4eSEmmanuel Vadot    description: Imaging Subsystem (FIMC-IS).
92fac71e4eSEmmanuel Vadot
93fac71e4eSEmmanuel Vadot  "^fimc-lite@[0-9a-f]+$":
94fac71e4eSEmmanuel Vadot    type: object
95fac71e4eSEmmanuel Vadot    $ref: samsung,exynos4212-fimc-lite.yaml#
96fac71e4eSEmmanuel Vadot    description: Camera host interface (FIMC-LITE).
97fac71e4eSEmmanuel Vadot
98fac71e4eSEmmanuel Vadotrequired:
99fac71e4eSEmmanuel Vadot  - compatible
100fac71e4eSEmmanuel Vadot  - '#address-cells'
101fac71e4eSEmmanuel Vadot  - '#clock-cells'
102fac71e4eSEmmanuel Vadot  - clocks
103fac71e4eSEmmanuel Vadot  - clock-names
104fac71e4eSEmmanuel Vadot  - clock-output-names
105fac71e4eSEmmanuel Vadot  - ranges
106fac71e4eSEmmanuel Vadot  - '#size-cells'
107fac71e4eSEmmanuel Vadot
108fac71e4eSEmmanuel VadotadditionalProperties: false
109fac71e4eSEmmanuel Vadot
110fac71e4eSEmmanuel Vadotexamples:
111fac71e4eSEmmanuel Vadot  - |
112fac71e4eSEmmanuel Vadot    #include <dt-bindings/clock/exynos4.h>
113fac71e4eSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
114fac71e4eSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
115fac71e4eSEmmanuel Vadot
116fac71e4eSEmmanuel Vadot    camera@11800000 {
117fac71e4eSEmmanuel Vadot        compatible = "samsung,fimc";
118fac71e4eSEmmanuel Vadot        #clock-cells = <1>;
119fac71e4eSEmmanuel Vadot        #address-cells = <1>;
120fac71e4eSEmmanuel Vadot        #size-cells = <1>;
121*84943d6fSEmmanuel Vadot        ranges = <0x0 0x0 0xba1000>;
122fac71e4eSEmmanuel Vadot
123fac71e4eSEmmanuel Vadot        clocks = <&clock CLK_SCLK_CAM0>, <&clock CLK_SCLK_CAM1>,
124fac71e4eSEmmanuel Vadot                 <&clock CLK_PIXELASYNCM0>, <&clock CLK_PIXELASYNCM1>;
125fac71e4eSEmmanuel Vadot        clock-names = "sclk_cam0", "sclk_cam1", "pxl_async0", "pxl_async1";
126fac71e4eSEmmanuel Vadot        clock-output-names = "cam_a_clkout", "cam_b_clkout";
127fac71e4eSEmmanuel Vadot
128fac71e4eSEmmanuel Vadot        assigned-clocks = <&clock CLK_MOUT_CAM0>,
129fac71e4eSEmmanuel Vadot                          <&clock CLK_MOUT_CAM1>;
130fac71e4eSEmmanuel Vadot        assigned-clock-parents = <&clock CLK_XUSBXTI>,
131fac71e4eSEmmanuel Vadot                                 <&clock CLK_XUSBXTI>;
132fac71e4eSEmmanuel Vadot
133fac71e4eSEmmanuel Vadot        pinctrl-0 = <&cam_port_a_clk_active &cam_port_b_clk_active>;
134fac71e4eSEmmanuel Vadot        pinctrl-names = "default";
135fac71e4eSEmmanuel Vadot
136*84943d6fSEmmanuel Vadot        fimc@0 {
137fac71e4eSEmmanuel Vadot            compatible = "samsung,exynos4212-fimc";
138*84943d6fSEmmanuel Vadot            reg = <0x00000000 0x1000>;
139fac71e4eSEmmanuel Vadot            interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
140fac71e4eSEmmanuel Vadot            clocks = <&clock CLK_FIMC0>,
141fac71e4eSEmmanuel Vadot                     <&clock CLK_SCLK_FIMC0>;
142fac71e4eSEmmanuel Vadot            clock-names = "fimc", "sclk_fimc";
143fac71e4eSEmmanuel Vadot            power-domains = <&pd_cam>;
144fac71e4eSEmmanuel Vadot            samsung,sysreg = <&sys_reg>;
145fac71e4eSEmmanuel Vadot            iommus = <&sysmmu_fimc0>;
146fac71e4eSEmmanuel Vadot
147fac71e4eSEmmanuel Vadot            samsung,pix-limits = <4224 8192 1920 4224>;
148fac71e4eSEmmanuel Vadot            samsung,mainscaler-ext;
149fac71e4eSEmmanuel Vadot            samsung,isp-wb;
150fac71e4eSEmmanuel Vadot            samsung,cam-if;
151fac71e4eSEmmanuel Vadot        };
152fac71e4eSEmmanuel Vadot
153fac71e4eSEmmanuel Vadot        /* ... FIMC 1-3 */
154fac71e4eSEmmanuel Vadot
155*84943d6fSEmmanuel Vadot        csis@80000 {
156fac71e4eSEmmanuel Vadot            compatible = "samsung,exynos4210-csis";
157*84943d6fSEmmanuel Vadot            reg = <0x00080000 0x4000>;
158fac71e4eSEmmanuel Vadot            interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
159fac71e4eSEmmanuel Vadot            clocks = <&clock CLK_CSIS0>,
160fac71e4eSEmmanuel Vadot                     <&clock CLK_SCLK_CSIS0>;
161fac71e4eSEmmanuel Vadot            clock-names = "csis", "sclk_csis";
162fac71e4eSEmmanuel Vadot            assigned-clocks = <&clock CLK_MOUT_CSIS0>,
163fac71e4eSEmmanuel Vadot                              <&clock CLK_SCLK_CSIS0>;
164fac71e4eSEmmanuel Vadot            assigned-clock-parents = <&clock CLK_MOUT_MPLL_USER_T>;
165fac71e4eSEmmanuel Vadot            assigned-clock-rates = <0>, <176000000>;
166fac71e4eSEmmanuel Vadot
167fac71e4eSEmmanuel Vadot            bus-width = <4>;
168fac71e4eSEmmanuel Vadot            power-domains = <&pd_cam>;
169fac71e4eSEmmanuel Vadot            phys = <&mipi_phy 0>;
170fac71e4eSEmmanuel Vadot            phy-names = "csis";
171fac71e4eSEmmanuel Vadot            #address-cells = <1>;
172fac71e4eSEmmanuel Vadot            #size-cells = <0>;
173fac71e4eSEmmanuel Vadot
174fac71e4eSEmmanuel Vadot            vddcore-supply = <&ldo8_reg>;
175fac71e4eSEmmanuel Vadot            vddio-supply = <&ldo10_reg>;
176fac71e4eSEmmanuel Vadot
177fac71e4eSEmmanuel Vadot            /* Camera C (3) MIPI CSI-2 (CSIS0) */
178fac71e4eSEmmanuel Vadot            port@3 {
179fac71e4eSEmmanuel Vadot                reg = <3>;
180fac71e4eSEmmanuel Vadot                endpoint {
181fac71e4eSEmmanuel Vadot                    remote-endpoint = <&s5c73m3_ep>;
182fac71e4eSEmmanuel Vadot                    data-lanes = <1 2 3 4>;
183fac71e4eSEmmanuel Vadot                    samsung,csis-hs-settle = <12>;
184fac71e4eSEmmanuel Vadot                };
185fac71e4eSEmmanuel Vadot            };
186fac71e4eSEmmanuel Vadot        };
187fac71e4eSEmmanuel Vadot
188fac71e4eSEmmanuel Vadot        /* ... CSIS 1 */
189fac71e4eSEmmanuel Vadot
190*84943d6fSEmmanuel Vadot        fimc-lite@b90000 {
191fac71e4eSEmmanuel Vadot              compatible = "samsung,exynos4212-fimc-lite";
192*84943d6fSEmmanuel Vadot              reg = <0xb90000 0x1000>;
193fac71e4eSEmmanuel Vadot              interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
194fac71e4eSEmmanuel Vadot              power-domains = <&pd_isp>;
195fac71e4eSEmmanuel Vadot              clocks = <&isp_clock CLK_ISP_FIMC_LITE0>;
196fac71e4eSEmmanuel Vadot              clock-names = "flite";
197fac71e4eSEmmanuel Vadot              iommus = <&sysmmu_fimc_lite0>;
198fac71e4eSEmmanuel Vadot        };
199fac71e4eSEmmanuel Vadot
200fac71e4eSEmmanuel Vadot        /* ... FIMC-LITE 1 */
201fac71e4eSEmmanuel Vadot
202*84943d6fSEmmanuel Vadot        fimc-is@800000 {
203fac71e4eSEmmanuel Vadot            compatible = "samsung,exynos4212-fimc-is";
204*84943d6fSEmmanuel Vadot            reg = <0x00800000 0x260000>;
205fac71e4eSEmmanuel Vadot            interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>,
206fac71e4eSEmmanuel Vadot                         <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
207fac71e4eSEmmanuel Vadot            clocks = <&isp_clock CLK_ISP_FIMC_LITE0>,
208fac71e4eSEmmanuel Vadot                     <&isp_clock CLK_ISP_FIMC_LITE1>,
209fac71e4eSEmmanuel Vadot                     <&isp_clock CLK_ISP_PPMUISPX>,
210fac71e4eSEmmanuel Vadot                     <&isp_clock CLK_ISP_PPMUISPMX>,
211fac71e4eSEmmanuel Vadot                     <&isp_clock CLK_ISP_FIMC_ISP>,
212fac71e4eSEmmanuel Vadot                     <&isp_clock CLK_ISP_FIMC_DRC>,
213fac71e4eSEmmanuel Vadot                     <&isp_clock CLK_ISP_FIMC_FD>,
214fac71e4eSEmmanuel Vadot                     <&isp_clock CLK_ISP_MCUISP>,
215fac71e4eSEmmanuel Vadot                     <&isp_clock CLK_ISP_GICISP>,
216fac71e4eSEmmanuel Vadot                     <&isp_clock CLK_ISP_MCUCTL_ISP>,
217fac71e4eSEmmanuel Vadot                     <&isp_clock CLK_ISP_PWM_ISP>,
218fac71e4eSEmmanuel Vadot                     <&isp_clock CLK_ISP_DIV_ISP0>,
219fac71e4eSEmmanuel Vadot                     <&isp_clock CLK_ISP_DIV_ISP1>,
220fac71e4eSEmmanuel Vadot                     <&isp_clock CLK_ISP_DIV_MCUISP0>,
221fac71e4eSEmmanuel Vadot                     <&isp_clock CLK_ISP_DIV_MCUISP1>,
222fac71e4eSEmmanuel Vadot                     <&clock CLK_MOUT_MPLL_USER_T>,
223fac71e4eSEmmanuel Vadot                     <&clock CLK_ACLK200>,
224fac71e4eSEmmanuel Vadot                     <&clock CLK_ACLK400_MCUISP>,
225fac71e4eSEmmanuel Vadot                     <&clock CLK_DIV_ACLK200>,
226fac71e4eSEmmanuel Vadot                     <&clock CLK_DIV_ACLK400_MCUISP>,
227fac71e4eSEmmanuel Vadot                     <&clock CLK_UART_ISP_SCLK>;
228fac71e4eSEmmanuel Vadot            clock-names = "lite0", "lite1", "ppmuispx",
229fac71e4eSEmmanuel Vadot                          "ppmuispmx", "isp",
230fac71e4eSEmmanuel Vadot                          "drc", "fd", "mcuisp",
231fac71e4eSEmmanuel Vadot                          "gicisp", "mcuctl_isp", "pwm_isp",
232fac71e4eSEmmanuel Vadot                          "ispdiv0", "ispdiv1", "mcuispdiv0",
233fac71e4eSEmmanuel Vadot                          "mcuispdiv1", "mpll", "aclk200",
234fac71e4eSEmmanuel Vadot                          "aclk400mcuisp", "div_aclk200",
235fac71e4eSEmmanuel Vadot                          "div_aclk400mcuisp", "uart";
236fac71e4eSEmmanuel Vadot            iommus = <&sysmmu_fimc_isp>, <&sysmmu_fimc_drc>,
237fac71e4eSEmmanuel Vadot                     <&sysmmu_fimc_fd>, <&sysmmu_fimc_mcuctl>;
238fac71e4eSEmmanuel Vadot            iommu-names = "isp", "drc", "fd", "mcuctl";
239fac71e4eSEmmanuel Vadot            power-domains = <&pd_isp>;
240*84943d6fSEmmanuel Vadot            samsung,pmu-syscon = <&pmu_system_controller>;
241fac71e4eSEmmanuel Vadot
242fac71e4eSEmmanuel Vadot            #address-cells = <1>;
243fac71e4eSEmmanuel Vadot            #size-cells = <1>;
244fac71e4eSEmmanuel Vadot            ranges;
245fac71e4eSEmmanuel Vadot
246*84943d6fSEmmanuel Vadot            i2c-isp@940000 {
247fac71e4eSEmmanuel Vadot                compatible = "samsung,exynos4212-i2c-isp";
248*84943d6fSEmmanuel Vadot                reg = <0x00940000 0x100>;
249fac71e4eSEmmanuel Vadot                clocks = <&isp_clock CLK_ISP_I2C1_ISP>;
250fac71e4eSEmmanuel Vadot                clock-names = "i2c_isp";
251fac71e4eSEmmanuel Vadot                pinctrl-0 = <&fimc_is_i2c1>;
252fac71e4eSEmmanuel Vadot                pinctrl-names = "default";
253fac71e4eSEmmanuel Vadot                #address-cells = <1>;
254fac71e4eSEmmanuel Vadot                #size-cells = <0>;
255fac71e4eSEmmanuel Vadot
256fac71e4eSEmmanuel Vadot                image-sensor@10 {
257fac71e4eSEmmanuel Vadot                    compatible = "samsung,s5k6a3";
258fac71e4eSEmmanuel Vadot                    reg = <0x10>;
259fac71e4eSEmmanuel Vadot                    svdda-supply = <&cam_io_reg>;
260fac71e4eSEmmanuel Vadot                    svddio-supply = <&ldo19_reg>;
261fac71e4eSEmmanuel Vadot                    afvdd-supply = <&ldo19_reg>;
262fac71e4eSEmmanuel Vadot                    clock-frequency = <24000000>;
263fac71e4eSEmmanuel Vadot                    /* CAM_B_CLKOUT */
264fac71e4eSEmmanuel Vadot                    clocks = <&camera 1>;
265fac71e4eSEmmanuel Vadot                    clock-names = "extclk";
266fac71e4eSEmmanuel Vadot                    gpios = <&gpm1 6 GPIO_ACTIVE_LOW>;
267fac71e4eSEmmanuel Vadot
268fac71e4eSEmmanuel Vadot                    port {
269fac71e4eSEmmanuel Vadot                        endpoint {
270fac71e4eSEmmanuel Vadot                            remote-endpoint = <&csis1_ep>;
271fac71e4eSEmmanuel Vadot                            data-lanes = <1>;
272fac71e4eSEmmanuel Vadot                        };
273fac71e4eSEmmanuel Vadot                    };
274fac71e4eSEmmanuel Vadot                };
275fac71e4eSEmmanuel Vadot            };
276fac71e4eSEmmanuel Vadot        };
277fac71e4eSEmmanuel Vadot    };
278