xref: /linux/Documentation/devicetree/bindings/media/samsung,fimc.yaml (revision 0ea5c948cb64bab5bc7a5516774eb8536f05aa0d)
1464c2572SKrzysztof Kozlowski# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2464c2572SKrzysztof Kozlowski%YAML 1.2
3464c2572SKrzysztof Kozlowski---
4464c2572SKrzysztof Kozlowski$id: http://devicetree.org/schemas/media/samsung,fimc.yaml#
5464c2572SKrzysztof Kozlowski$schema: http://devicetree.org/meta-schemas/core.yaml#
6464c2572SKrzysztof Kozlowski
7464c2572SKrzysztof Kozlowskititle: Samsung S5P/Exynos SoC Camera Subsystem (FIMC)
8464c2572SKrzysztof Kozlowski
9464c2572SKrzysztof Kozlowskimaintainers:
10464c2572SKrzysztof Kozlowski  - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
11464c2572SKrzysztof Kozlowski  - Sylwester Nawrocki <s.nawrocki@samsung.com>
12464c2572SKrzysztof Kozlowski
13464c2572SKrzysztof Kozlowskidescription: |
14464c2572SKrzysztof Kozlowski  The S5P/Exynos SoC Camera subsystem comprises of multiple sub-devices
15464c2572SKrzysztof Kozlowski  represented by separate device tree nodes. Currently this includes: Fully
16464c2572SKrzysztof Kozlowski  Integrated Mobile Camera (FIMC, in the S5P SoCs series known as CAMIF), MIPI
17464c2572SKrzysztof Kozlowski  CSIS, FIMC-LITE and FIMC-IS (ISP).
18464c2572SKrzysztof Kozlowski
19464c2572SKrzysztof Kozlowskiproperties:
20464c2572SKrzysztof Kozlowski  compatible:
21464c2572SKrzysztof Kozlowski    const: samsung,fimc
22464c2572SKrzysztof Kozlowski
23464c2572SKrzysztof Kozlowski  ranges: true
24464c2572SKrzysztof Kozlowski
25464c2572SKrzysztof Kozlowski  '#address-cells':
26464c2572SKrzysztof Kozlowski    const: 1
27464c2572SKrzysztof Kozlowski
28464c2572SKrzysztof Kozlowski  '#size-cells':
29464c2572SKrzysztof Kozlowski    const: 1
30464c2572SKrzysztof Kozlowski
31464c2572SKrzysztof Kozlowski  '#clock-cells':
32464c2572SKrzysztof Kozlowski    const: 1
33464c2572SKrzysztof Kozlowski    description: |
34464c2572SKrzysztof Kozlowski      The clock specifier cell stores an index of a clock: 0, 1 for
35464c2572SKrzysztof Kozlowski      CAM_A_CLKOUT, CAM_B_CLKOUT clocks respectively.
36464c2572SKrzysztof Kozlowski
37464c2572SKrzysztof Kozlowski  clocks:
38464c2572SKrzysztof Kozlowski    minItems: 2
39464c2572SKrzysztof Kozlowski    maxItems: 4
40464c2572SKrzysztof Kozlowski
41464c2572SKrzysztof Kozlowski  clock-names:
42464c2572SKrzysztof Kozlowski    minItems: 2
43464c2572SKrzysztof Kozlowski    items:
44464c2572SKrzysztof Kozlowski      - const: sclk_cam0
45464c2572SKrzysztof Kozlowski      - const: sclk_cam1
46464c2572SKrzysztof Kozlowski      - const: pxl_async0
47464c2572SKrzysztof Kozlowski      - const: pxl_async1
48464c2572SKrzysztof Kozlowski
49464c2572SKrzysztof Kozlowski  clock-output-names:
50464c2572SKrzysztof Kozlowski    maxItems: 2
51464c2572SKrzysztof Kozlowski
52464c2572SKrzysztof Kozlowski  parallel-ports:
53464c2572SKrzysztof Kozlowski    $ref: /schemas/graph.yaml#/properties/ports
54464c2572SKrzysztof Kozlowski    description:
55464c2572SKrzysztof Kozlowski      Active parallel video input ports.
56464c2572SKrzysztof Kozlowski
57464c2572SKrzysztof Kozlowski    patternProperties:
58464c2572SKrzysztof Kozlowski      "^port@[01]$":
59464c2572SKrzysztof Kozlowski        $ref: /schemas/graph.yaml#/$defs/port-base
60*a47f580cSRob Herring        unevaluatedProperties: false
61464c2572SKrzysztof Kozlowski        description:
62464c2572SKrzysztof Kozlowski          Camera A and camera B inputs.
63464c2572SKrzysztof Kozlowski
64464c2572SKrzysztof Kozlowski        properties:
65464c2572SKrzysztof Kozlowski          endpoint:
66464c2572SKrzysztof Kozlowski            $ref: /schemas/media/video-interfaces.yaml#
67464c2572SKrzysztof Kozlowski            unevaluatedProperties: false
68464c2572SKrzysztof Kozlowski
69464c2572SKrzysztof Kozlowski  pinctrl-names:
70464c2572SKrzysztof Kozlowski    minItems: 1
71464c2572SKrzysztof Kozlowski    items:
72464c2572SKrzysztof Kozlowski      - const: default
73464c2572SKrzysztof Kozlowski      - const: idle
74464c2572SKrzysztof Kozlowski      - const: active_a
75464c2572SKrzysztof Kozlowski      - const: active_b
76464c2572SKrzysztof Kozlowski
77464c2572SKrzysztof KozlowskipatternProperties:
78464c2572SKrzysztof Kozlowski  "^csis@[0-9a-f]+$":
79464c2572SKrzysztof Kozlowski    type: object
80464c2572SKrzysztof Kozlowski    $ref: samsung,exynos4210-csis.yaml#
81464c2572SKrzysztof Kozlowski    description: MIPI CSI-2 receiver.
82464c2572SKrzysztof Kozlowski
83464c2572SKrzysztof Kozlowski  "^fimc@[0-9a-f]+$":
84464c2572SKrzysztof Kozlowski    type: object
85464c2572SKrzysztof Kozlowski    $ref: samsung,exynos4210-fimc.yaml#
86464c2572SKrzysztof Kozlowski    description: Fully Integrated Mobile Camera.
87464c2572SKrzysztof Kozlowski
88464c2572SKrzysztof Kozlowski  "^fimc-is@[0-9a-f]+$":
89464c2572SKrzysztof Kozlowski    type: object
90464c2572SKrzysztof Kozlowski    $ref: samsung,exynos4212-fimc-is.yaml#
91464c2572SKrzysztof Kozlowski    description: Imaging Subsystem (FIMC-IS).
92464c2572SKrzysztof Kozlowski
93464c2572SKrzysztof Kozlowski  "^fimc-lite@[0-9a-f]+$":
94464c2572SKrzysztof Kozlowski    type: object
95464c2572SKrzysztof Kozlowski    $ref: samsung,exynos4212-fimc-lite.yaml#
96464c2572SKrzysztof Kozlowski    description: Camera host interface (FIMC-LITE).
97464c2572SKrzysztof Kozlowski
98464c2572SKrzysztof Kozlowskirequired:
99464c2572SKrzysztof Kozlowski  - compatible
100464c2572SKrzysztof Kozlowski  - '#address-cells'
101464c2572SKrzysztof Kozlowski  - '#clock-cells'
102464c2572SKrzysztof Kozlowski  - clocks
103464c2572SKrzysztof Kozlowski  - clock-names
104464c2572SKrzysztof Kozlowski  - clock-output-names
105464c2572SKrzysztof Kozlowski  - ranges
106464c2572SKrzysztof Kozlowski  - '#size-cells'
107464c2572SKrzysztof Kozlowski
108464c2572SKrzysztof KozlowskiadditionalProperties: false
109464c2572SKrzysztof Kozlowski
110464c2572SKrzysztof Kozlowskiexamples:
111464c2572SKrzysztof Kozlowski  - |
112464c2572SKrzysztof Kozlowski    #include <dt-bindings/clock/exynos4.h>
113464c2572SKrzysztof Kozlowski    #include <dt-bindings/gpio/gpio.h>
114464c2572SKrzysztof Kozlowski    #include <dt-bindings/interrupt-controller/arm-gic.h>
115464c2572SKrzysztof Kozlowski
116464c2572SKrzysztof Kozlowski    camera@11800000 {
117464c2572SKrzysztof Kozlowski        compatible = "samsung,fimc";
118464c2572SKrzysztof Kozlowski        #clock-cells = <1>;
119464c2572SKrzysztof Kozlowski        #address-cells = <1>;
120464c2572SKrzysztof Kozlowski        #size-cells = <1>;
1216c378c24SKrzysztof Kozlowski        ranges = <0x0 0x0 0xba1000>;
122464c2572SKrzysztof Kozlowski
123464c2572SKrzysztof Kozlowski        clocks = <&clock CLK_SCLK_CAM0>, <&clock CLK_SCLK_CAM1>,
124464c2572SKrzysztof Kozlowski                 <&clock CLK_PIXELASYNCM0>, <&clock CLK_PIXELASYNCM1>;
125464c2572SKrzysztof Kozlowski        clock-names = "sclk_cam0", "sclk_cam1", "pxl_async0", "pxl_async1";
126464c2572SKrzysztof Kozlowski        clock-output-names = "cam_a_clkout", "cam_b_clkout";
127464c2572SKrzysztof Kozlowski
128464c2572SKrzysztof Kozlowski        assigned-clocks = <&clock CLK_MOUT_CAM0>,
129464c2572SKrzysztof Kozlowski                          <&clock CLK_MOUT_CAM1>;
130464c2572SKrzysztof Kozlowski        assigned-clock-parents = <&clock CLK_XUSBXTI>,
131464c2572SKrzysztof Kozlowski                                 <&clock CLK_XUSBXTI>;
132464c2572SKrzysztof Kozlowski
133464c2572SKrzysztof Kozlowski        pinctrl-0 = <&cam_port_a_clk_active &cam_port_b_clk_active>;
134464c2572SKrzysztof Kozlowski        pinctrl-names = "default";
135464c2572SKrzysztof Kozlowski
1366c378c24SKrzysztof Kozlowski        fimc@0 {
137464c2572SKrzysztof Kozlowski            compatible = "samsung,exynos4212-fimc";
1386c378c24SKrzysztof Kozlowski            reg = <0x00000000 0x1000>;
139464c2572SKrzysztof Kozlowski            interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
140464c2572SKrzysztof Kozlowski            clocks = <&clock CLK_FIMC0>,
141464c2572SKrzysztof Kozlowski                     <&clock CLK_SCLK_FIMC0>;
142464c2572SKrzysztof Kozlowski            clock-names = "fimc", "sclk_fimc";
143464c2572SKrzysztof Kozlowski            power-domains = <&pd_cam>;
144464c2572SKrzysztof Kozlowski            samsung,sysreg = <&sys_reg>;
145464c2572SKrzysztof Kozlowski            iommus = <&sysmmu_fimc0>;
146464c2572SKrzysztof Kozlowski
147464c2572SKrzysztof Kozlowski            samsung,pix-limits = <4224 8192 1920 4224>;
148464c2572SKrzysztof Kozlowski            samsung,mainscaler-ext;
149464c2572SKrzysztof Kozlowski            samsung,isp-wb;
150464c2572SKrzysztof Kozlowski            samsung,cam-if;
151464c2572SKrzysztof Kozlowski        };
152464c2572SKrzysztof Kozlowski
153464c2572SKrzysztof Kozlowski        /* ... FIMC 1-3 */
154464c2572SKrzysztof Kozlowski
1556c378c24SKrzysztof Kozlowski        csis@80000 {
156464c2572SKrzysztof Kozlowski            compatible = "samsung,exynos4210-csis";
1576c378c24SKrzysztof Kozlowski            reg = <0x00080000 0x4000>;
158464c2572SKrzysztof Kozlowski            interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
159464c2572SKrzysztof Kozlowski            clocks = <&clock CLK_CSIS0>,
160464c2572SKrzysztof Kozlowski                     <&clock CLK_SCLK_CSIS0>;
161464c2572SKrzysztof Kozlowski            clock-names = "csis", "sclk_csis";
162464c2572SKrzysztof Kozlowski            assigned-clocks = <&clock CLK_MOUT_CSIS0>,
163464c2572SKrzysztof Kozlowski                              <&clock CLK_SCLK_CSIS0>;
164464c2572SKrzysztof Kozlowski            assigned-clock-parents = <&clock CLK_MOUT_MPLL_USER_T>;
165464c2572SKrzysztof Kozlowski            assigned-clock-rates = <0>, <176000000>;
166464c2572SKrzysztof Kozlowski
167464c2572SKrzysztof Kozlowski            bus-width = <4>;
168464c2572SKrzysztof Kozlowski            power-domains = <&pd_cam>;
169464c2572SKrzysztof Kozlowski            phys = <&mipi_phy 0>;
170464c2572SKrzysztof Kozlowski            phy-names = "csis";
171464c2572SKrzysztof Kozlowski            #address-cells = <1>;
172464c2572SKrzysztof Kozlowski            #size-cells = <0>;
173464c2572SKrzysztof Kozlowski
174464c2572SKrzysztof Kozlowski            vddcore-supply = <&ldo8_reg>;
175464c2572SKrzysztof Kozlowski            vddio-supply = <&ldo10_reg>;
176464c2572SKrzysztof Kozlowski
177464c2572SKrzysztof Kozlowski            /* Camera C (3) MIPI CSI-2 (CSIS0) */
178464c2572SKrzysztof Kozlowski            port@3 {
179464c2572SKrzysztof Kozlowski                reg = <3>;
180464c2572SKrzysztof Kozlowski                endpoint {
181464c2572SKrzysztof Kozlowski                    remote-endpoint = <&s5c73m3_ep>;
182464c2572SKrzysztof Kozlowski                    data-lanes = <1 2 3 4>;
183464c2572SKrzysztof Kozlowski                    samsung,csis-hs-settle = <12>;
184464c2572SKrzysztof Kozlowski                };
185464c2572SKrzysztof Kozlowski            };
186464c2572SKrzysztof Kozlowski        };
187464c2572SKrzysztof Kozlowski
188464c2572SKrzysztof Kozlowski        /* ... CSIS 1 */
189464c2572SKrzysztof Kozlowski
1906c378c24SKrzysztof Kozlowski        fimc-lite@b90000 {
191464c2572SKrzysztof Kozlowski              compatible = "samsung,exynos4212-fimc-lite";
1926c378c24SKrzysztof Kozlowski              reg = <0xb90000 0x1000>;
193464c2572SKrzysztof Kozlowski              interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
194464c2572SKrzysztof Kozlowski              power-domains = <&pd_isp>;
195464c2572SKrzysztof Kozlowski              clocks = <&isp_clock CLK_ISP_FIMC_LITE0>;
196464c2572SKrzysztof Kozlowski              clock-names = "flite";
197464c2572SKrzysztof Kozlowski              iommus = <&sysmmu_fimc_lite0>;
198464c2572SKrzysztof Kozlowski        };
199464c2572SKrzysztof Kozlowski
200464c2572SKrzysztof Kozlowski        /* ... FIMC-LITE 1 */
201464c2572SKrzysztof Kozlowski
2026c378c24SKrzysztof Kozlowski        fimc-is@800000 {
203464c2572SKrzysztof Kozlowski            compatible = "samsung,exynos4212-fimc-is";
2046c378c24SKrzysztof Kozlowski            reg = <0x00800000 0x260000>;
205464c2572SKrzysztof Kozlowski            interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>,
206464c2572SKrzysztof Kozlowski                         <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
207464c2572SKrzysztof Kozlowski            clocks = <&isp_clock CLK_ISP_FIMC_LITE0>,
208464c2572SKrzysztof Kozlowski                     <&isp_clock CLK_ISP_FIMC_LITE1>,
209464c2572SKrzysztof Kozlowski                     <&isp_clock CLK_ISP_PPMUISPX>,
210464c2572SKrzysztof Kozlowski                     <&isp_clock CLK_ISP_PPMUISPMX>,
211464c2572SKrzysztof Kozlowski                     <&isp_clock CLK_ISP_FIMC_ISP>,
212464c2572SKrzysztof Kozlowski                     <&isp_clock CLK_ISP_FIMC_DRC>,
213464c2572SKrzysztof Kozlowski                     <&isp_clock CLK_ISP_FIMC_FD>,
214464c2572SKrzysztof Kozlowski                     <&isp_clock CLK_ISP_MCUISP>,
215464c2572SKrzysztof Kozlowski                     <&isp_clock CLK_ISP_GICISP>,
216464c2572SKrzysztof Kozlowski                     <&isp_clock CLK_ISP_MCUCTL_ISP>,
217464c2572SKrzysztof Kozlowski                     <&isp_clock CLK_ISP_PWM_ISP>,
218464c2572SKrzysztof Kozlowski                     <&isp_clock CLK_ISP_DIV_ISP0>,
219464c2572SKrzysztof Kozlowski                     <&isp_clock CLK_ISP_DIV_ISP1>,
220464c2572SKrzysztof Kozlowski                     <&isp_clock CLK_ISP_DIV_MCUISP0>,
221464c2572SKrzysztof Kozlowski                     <&isp_clock CLK_ISP_DIV_MCUISP1>,
222464c2572SKrzysztof Kozlowski                     <&clock CLK_MOUT_MPLL_USER_T>,
223464c2572SKrzysztof Kozlowski                     <&clock CLK_ACLK200>,
224464c2572SKrzysztof Kozlowski                     <&clock CLK_ACLK400_MCUISP>,
225464c2572SKrzysztof Kozlowski                     <&clock CLK_DIV_ACLK200>,
226464c2572SKrzysztof Kozlowski                     <&clock CLK_DIV_ACLK400_MCUISP>,
227464c2572SKrzysztof Kozlowski                     <&clock CLK_UART_ISP_SCLK>;
228464c2572SKrzysztof Kozlowski            clock-names = "lite0", "lite1", "ppmuispx",
229464c2572SKrzysztof Kozlowski                          "ppmuispmx", "isp",
230464c2572SKrzysztof Kozlowski                          "drc", "fd", "mcuisp",
231464c2572SKrzysztof Kozlowski                          "gicisp", "mcuctl_isp", "pwm_isp",
232464c2572SKrzysztof Kozlowski                          "ispdiv0", "ispdiv1", "mcuispdiv0",
233464c2572SKrzysztof Kozlowski                          "mcuispdiv1", "mpll", "aclk200",
234464c2572SKrzysztof Kozlowski                          "aclk400mcuisp", "div_aclk200",
235464c2572SKrzysztof Kozlowski                          "div_aclk400mcuisp", "uart";
236464c2572SKrzysztof Kozlowski            iommus = <&sysmmu_fimc_isp>, <&sysmmu_fimc_drc>,
237464c2572SKrzysztof Kozlowski                     <&sysmmu_fimc_fd>, <&sysmmu_fimc_mcuctl>;
238464c2572SKrzysztof Kozlowski            iommu-names = "isp", "drc", "fd", "mcuctl";
239464c2572SKrzysztof Kozlowski            power-domains = <&pd_isp>;
24099e6eaabSKrzysztof Kozlowski            samsung,pmu-syscon = <&pmu_system_controller>;
241464c2572SKrzysztof Kozlowski
242464c2572SKrzysztof Kozlowski            #address-cells = <1>;
243464c2572SKrzysztof Kozlowski            #size-cells = <1>;
244464c2572SKrzysztof Kozlowski            ranges;
245464c2572SKrzysztof Kozlowski
2466c378c24SKrzysztof Kozlowski            i2c-isp@940000 {
247464c2572SKrzysztof Kozlowski                compatible = "samsung,exynos4212-i2c-isp";
2486c378c24SKrzysztof Kozlowski                reg = <0x00940000 0x100>;
249464c2572SKrzysztof Kozlowski                clocks = <&isp_clock CLK_ISP_I2C1_ISP>;
250464c2572SKrzysztof Kozlowski                clock-names = "i2c_isp";
251464c2572SKrzysztof Kozlowski                pinctrl-0 = <&fimc_is_i2c1>;
252464c2572SKrzysztof Kozlowski                pinctrl-names = "default";
253464c2572SKrzysztof Kozlowski                #address-cells = <1>;
254464c2572SKrzysztof Kozlowski                #size-cells = <0>;
255464c2572SKrzysztof Kozlowski
256464c2572SKrzysztof Kozlowski                image-sensor@10 {
257464c2572SKrzysztof Kozlowski                    compatible = "samsung,s5k6a3";
258464c2572SKrzysztof Kozlowski                    reg = <0x10>;
259464c2572SKrzysztof Kozlowski                    svdda-supply = <&cam_io_reg>;
260464c2572SKrzysztof Kozlowski                    svddio-supply = <&ldo19_reg>;
261464c2572SKrzysztof Kozlowski                    afvdd-supply = <&ldo19_reg>;
262464c2572SKrzysztof Kozlowski                    clock-frequency = <24000000>;
263464c2572SKrzysztof Kozlowski                    /* CAM_B_CLKOUT */
264464c2572SKrzysztof Kozlowski                    clocks = <&camera 1>;
265464c2572SKrzysztof Kozlowski                    clock-names = "extclk";
266464c2572SKrzysztof Kozlowski                    gpios = <&gpm1 6 GPIO_ACTIVE_LOW>;
267464c2572SKrzysztof Kozlowski
268464c2572SKrzysztof Kozlowski                    port {
269464c2572SKrzysztof Kozlowski                        endpoint {
270464c2572SKrzysztof Kozlowski                            remote-endpoint = <&csis1_ep>;
271464c2572SKrzysztof Kozlowski                            data-lanes = <1>;
272464c2572SKrzysztof Kozlowski                        };
273464c2572SKrzysztof Kozlowski                    };
274464c2572SKrzysztof Kozlowski                };
275464c2572SKrzysztof Kozlowski            };
276464c2572SKrzysztof Kozlowski        };
277464c2572SKrzysztof Kozlowski    };
278