0001 Samsung S5P/Exynos SoC Camera Subsystem (FIMC)
0002 ----------------------------------------------
0003
0004 The S5P/Exynos SoC Camera subsystem comprises of multiple sub-devices
0005 represented by separate device tree nodes. Currently this includes: FIMC (in
0006 the S5P SoCs series known as CAMIF), MIPI CSIS, FIMC-LITE and FIMC-IS (ISP).
0007
0008 The sub-subdevices are defined as child nodes of the common 'camera' node which
0009 also includes common properties of the whole subsystem not really specific to
0010 any single sub-device, like common camera port pins or the CAMCLK clock outputs
0011 for external image sensors attached to an SoC.
0012
0013 Common 'camera' node
0014 --------------------
0015
0016 Required properties:
0017
0018 - compatible: must be "samsung,fimc", "simple-bus"
0019 - clocks: list of clock specifiers, corresponding to entries in
0020 the clock-names property;
0021 - clock-names : must contain "sclk_cam0", "sclk_cam1", "pxl_async0",
0022 "pxl_async1" entries, matching entries in the clocks property.
0023
0024 - #clock-cells: from the common clock bindings (../clock/clock-bindings.txt),
0025 must be 1. A clock provider is associated with the 'camera' node and it should
0026 be referenced by external sensors that use clocks provided by the SoC on
0027 CAM_*_CLKOUT pins. The clock specifier cell stores an index of a clock.
0028 The indices are 0, 1 for CAM_A_CLKOUT, CAM_B_CLKOUT clocks respectively.
0029
0030 - clock-output-names: from the common clock bindings, should contain names of
0031 clocks registered by the camera subsystem corresponding to CAM_A_CLKOUT,
0032 CAM_B_CLKOUT output clocks respectively.
0033
0034 The pinctrl bindings defined in ../pinctrl/pinctrl-bindings.txt must be used
0035 to define a required pinctrl state named "default" and optional pinctrl states:
0036 "idle", "active-a", active-b". These optional states can be used to switch the
0037 camera port pinmux at runtime. The "idle" state should configure both the camera
0038 ports A and B into high impedance state, especially the CAMCLK clock output
0039 should be inactive. For the "active-a" state the camera port A must be activated
0040 and the port B deactivated and for the state "active-b" it should be the other
0041 way around.
0042
0043 The 'camera' node must include at least one 'fimc' child node.
0044
0045
0046 'fimc' device nodes
0047 -------------------
0048
0049 Required properties:
0050
0051 - compatible: "samsung,s5pv210-fimc" for S5PV210, "samsung,exynos4210-fimc"
0052 for Exynos4210 and "samsung,exynos4212-fimc" for Exynos4x12 SoCs;
0053 - reg: physical base address and length of the registers set for the device;
0054 - interrupts: should contain FIMC interrupt;
0055 - clocks: list of clock specifiers, must contain an entry for each required
0056 entry in clock-names;
0057 - clock-names: must contain "fimc", "sclk_fimc" entries.
0058 - samsung,pix-limits: an array of maximum supported image sizes in pixels, for
0059 details refer to Table 2-1 in the S5PV210 SoC User Manual; The meaning of
0060 each cell is as follows:
0061 0 - scaler input horizontal size,
0062 1 - input horizontal size for the scaler bypassed,
0063 2 - REAL_WIDTH without input rotation,
0064 3 - REAL_HEIGHT with input rotation,
0065 - samsung,sysreg: a phandle to the SYSREG node.
0066
0067 Each FIMC device should have an alias in the aliases node, in the form of
0068 fimc<n>, where <n> is an integer specifying the IP block instance.
0069
0070 Optional properties:
0071
0072 - clock-frequency: maximum FIMC local clock (LCLK) frequency;
0073 - samsung,min-pix-sizes: an array specyfing minimum image size in pixels at
0074 the FIMC input and output DMA, in the first and second cell respectively.
0075 Default value when this property is not present is <16 16>;
0076 - samsung,min-pix-alignment: minimum supported image height alignment (first
0077 cell) and the horizontal image offset (second cell). The values are in pixels
0078 and default to <2 1> when this property is not present;
0079 - samsung,mainscaler-ext: a boolean property indicating whether the FIMC IP
0080 supports extended image size and has CIEXTEN register;
0081 - samsung,rotators: a bitmask specifying whether this IP has the input and
0082 the output rotator. Bits 4 and 0 correspond to input and output rotator
0083 respectively. If a rotator is present its corresponding bit should be set.
0084 Default value when this property is not specified is 0x11.
0085 - samsung,cam-if: a bolean property indicating whether the IP block includes
0086 the camera input interface.
0087 - samsung,isp-wb: this property must be present if the IP block has the ISP
0088 writeback input.
0089 - samsung,lcd-wb: this property must be present if the IP block has the LCD
0090 writeback input.
0091
0092
0093 'parallel-ports' node
0094 ---------------------
0095
0096 This node should contain child 'port' nodes specifying active parallel video
0097 input ports. It includes camera A and camera B inputs. 'reg' property in the
0098 port nodes specifies data input - 1, 2 indicates input A, B respectively.
0099
0100 Optional properties
0101
0102 - samsung,camclk-out (deprecated) : specifies clock output for remote sensor,
0103 0 - CAM_A_CLKOUT, 1 - CAM_B_CLKOUT;
0104
0105 Image sensor nodes
0106 ------------------
0107
0108 The sensor device nodes should be added to their control bus controller (e.g.
0109 I2C0) nodes and linked to a port node in the csis or the parallel-ports node,
0110 using the common video interfaces bindings, defined in video-interfaces.txt.
0111
0112 Example:
0113
0114 aliases {
0115 fimc0 = &fimc_0;
0116 };
0117
0118 /* Parallel bus IF sensor */
0119 i2c_0: i2c@13860000 {
0120 s5k6aa: sensor@3c {
0121 compatible = "samsung,s5k6aafx";
0122 reg = <0x3c>;
0123 vddio-supply = <...>;
0124
0125 clock-frequency = <24000000>;
0126 clocks = <&camera 1>;
0127 clock-names = "mclk";
0128
0129 port {
0130 s5k6aa_ep: endpoint {
0131 remote-endpoint = <&fimc0_ep>;
0132 bus-width = <8>;
0133 hsync-active = <0>;
0134 vsync-active = <1>;
0135 pclk-sample = <1>;
0136 };
0137 };
0138 };
0139
0140 /* MIPI CSI-2 bus IF sensor */
0141 s5c73m3: sensor@1a {
0142 compatible = "samsung,s5c73m3";
0143 reg = <0x1a>;
0144 vddio-supply = <...>;
0145
0146 clock-frequency = <24000000>;
0147 clocks = <&camera 0>;
0148 clock-names = "mclk";
0149
0150 port {
0151 s5c73m3_1: endpoint {
0152 data-lanes = <1 2 3 4>;
0153 remote-endpoint = <&csis0_ep>;
0154 };
0155 };
0156 };
0157 };
0158
0159 camera {
0160 compatible = "samsung,fimc", "simple-bus";
0161 clocks = <&clock 132>, <&clock 133>, <&clock 351>,
0162 <&clock 352>;
0163 clock-names = "sclk_cam0", "sclk_cam1", "pxl_async0",
0164 "pxl_async1";
0165 #clock-cells = <1>;
0166 clock-output-names = "cam_a_clkout", "cam_b_clkout";
0167 pinctrl-names = "default";
0168 pinctrl-0 = <&cam_port_a_clk_active>;
0169 #address-cells = <1>;
0170 #size-cells = <1>;
0171
0172 /* parallel camera ports */
0173 parallel-ports {
0174 /* camera A input */
0175 port@1 {
0176 reg = <1>;
0177 fimc0_ep: endpoint {
0178 remote-endpoint = <&s5k6aa_ep>;
0179 bus-width = <8>;
0180 hsync-active = <0>;
0181 vsync-active = <1>;
0182 pclk-sample = <1>;
0183 };
0184 };
0185 };
0186
0187 fimc_0: fimc@11800000 {
0188 compatible = "samsung,exynos4210-fimc";
0189 reg = <0x11800000 0x1000>;
0190 interrupts = <0 85 0>;
0191 };
0192
0193 csis_0: csis@11880000 {
0194 compatible = "samsung,exynos4210-csis";
0195 reg = <0x11880000 0x1000>;
0196 interrupts = <0 78 0>;
0197 /* camera C input */
0198 port@3 {
0199 reg = <3>;
0200 csis0_ep: endpoint {
0201 remote-endpoint = <&s5c73m3_ep>;
0202 data-lanes = <1 2 3 4>;
0203 samsung,csis-hs-settle = <12>;
0204 };
0205 };
0206 };
0207 };
0208
0209 The MIPI-CSIS device binding is defined in samsung-mipi-csis.txt.