samsung-fimc.txt 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. Samsung S5P/EXYNOS SoC Camera Subsystem (FIMC)
  2. ----------------------------------------------
  3. The S5P/Exynos SoC Camera subsystem comprises of multiple sub-devices
  4. represented by separate device tree nodes. Currently this includes: FIMC (in
  5. the S5P SoCs series known as CAMIF), MIPI CSIS, FIMC-LITE and FIMC-IS (ISP).
  6. The sub-subdevices are defined as child nodes of the common 'camera' node which
  7. also includes common properties of the whole subsystem not really specific to
  8. any single sub-device, like common camera port pins or the CAMCLK clock outputs
  9. for external image sensors attached to an SoC.
  10. Common 'camera' node
  11. --------------------
  12. Required properties:
  13. - compatible: must be "samsung,fimc", "simple-bus"
  14. - clocks: list of clock specifiers, corresponding to entries in
  15. the clock-names property;
  16. - clock-names : must contain "sclk_cam0", "sclk_cam1", "pxl_async0",
  17. "pxl_async1" entries, matching entries in the clocks property.
  18. - #clock-cells: from the common clock bindings (../clock/clock-bindings.txt),
  19. must be 1. A clock provider is associated with the 'camera' node and it should
  20. be referenced by external sensors that use clocks provided by the SoC on
  21. CAM_*_CLKOUT pins. The clock specifier cell stores an index of a clock.
  22. The indices are 0, 1 for CAM_A_CLKOUT, CAM_B_CLKOUT clocks respectively.
  23. - clock-output-names: from the common clock bindings, should contain names of
  24. clocks registered by the camera subsystem corresponding to CAM_A_CLKOUT,
  25. CAM_B_CLKOUT output clocks respectively.
  26. The pinctrl bindings defined in ../pinctrl/pinctrl-bindings.txt must be used
  27. to define a required pinctrl state named "default" and optional pinctrl states:
  28. "idle", "active-a", active-b". These optional states can be used to switch the
  29. camera port pinmux at runtime. The "idle" state should configure both the camera
  30. ports A and B into high impedance state, especially the CAMCLK clock output
  31. should be inactive. For the "active-a" state the camera port A must be activated
  32. and the port B deactivated and for the state "active-b" it should be the other
  33. way around.
  34. The 'camera' node must include at least one 'fimc' child node.
  35. 'fimc' device nodes
  36. -------------------
  37. Required properties:
  38. - compatible: "samsung,s5pv210-fimc" for S5PV210, "samsung,exynos4210-fimc"
  39. for Exynos4210 and "samsung,exynos4212-fimc" for Exynos4x12 SoCs;
  40. - reg: physical base address and length of the registers set for the device;
  41. - interrupts: should contain FIMC interrupt;
  42. - clocks: list of clock specifiers, must contain an entry for each required
  43. entry in clock-names;
  44. - clock-names: must contain "fimc", "sclk_fimc" entries.
  45. - samsung,pix-limits: an array of maximum supported image sizes in pixels, for
  46. details refer to Table 2-1 in the S5PV210 SoC User Manual; The meaning of
  47. each cell is as follows:
  48. 0 - scaler input horizontal size,
  49. 1 - input horizontal size for the scaler bypassed,
  50. 2 - REAL_WIDTH without input rotation,
  51. 3 - REAL_HEIGHT with input rotation,
  52. - samsung,sysreg: a phandle to the SYSREG node.
  53. Each FIMC device should have an alias in the aliases node, in the form of
  54. fimc<n>, where <n> is an integer specifying the IP block instance.
  55. Optional properties:
  56. - clock-frequency: maximum FIMC local clock (LCLK) frequency;
  57. - samsung,min-pix-sizes: an array specyfing minimum image size in pixels at
  58. the FIMC input and output DMA, in the first and second cell respectively.
  59. Default value when this property is not present is <16 16>;
  60. - samsung,min-pix-alignment: minimum supported image height alignment (first
  61. cell) and the horizontal image offset (second cell). The values are in pixels
  62. and default to <2 1> when this property is not present;
  63. - samsung,mainscaler-ext: a boolean property indicating whether the FIMC IP
  64. supports extended image size and has CIEXTEN register;
  65. - samsung,rotators: a bitmask specifying whether this IP has the input and
  66. the output rotator. Bits 4 and 0 correspond to input and output rotator
  67. respectively. If a rotator is present its corresponding bit should be set.
  68. Default value when this property is not specified is 0x11.
  69. - samsung,cam-if: a bolean property indicating whether the IP block includes
  70. the camera input interface.
  71. - samsung,isp-wb: this property must be present if the IP block has the ISP
  72. writeback input.
  73. - samsung,lcd-wb: this property must be present if the IP block has the LCD
  74. writeback input.
  75. 'parallel-ports' node
  76. ---------------------
  77. This node should contain child 'port' nodes specifying active parallel video
  78. input ports. It includes camera A and camera B inputs. 'reg' property in the
  79. port nodes specifies data input - 0, 1 indicates input A, B respectively.
  80. Optional properties
  81. - samsung,camclk-out (deprecated) : specifies clock output for remote sensor,
  82. 0 - CAM_A_CLKOUT, 1 - CAM_B_CLKOUT;
  83. Image sensor nodes
  84. ------------------
  85. The sensor device nodes should be added to their control bus controller (e.g.
  86. I2C0) nodes and linked to a port node in the csis or the parallel-ports node,
  87. using the common video interfaces bindings, defined in video-interfaces.txt.
  88. Example:
  89. aliases {
  90. fimc0 = &fimc_0;
  91. };
  92. /* Parallel bus IF sensor */
  93. i2c_0: i2c@13860000 {
  94. s5k6aa: sensor@3c {
  95. compatible = "samsung,s5k6aafx";
  96. reg = <0x3c>;
  97. vddio-supply = <...>;
  98. clock-frequency = <24000000>;
  99. clocks = <&camera 1>;
  100. clock-names = "mclk";
  101. port {
  102. s5k6aa_ep: endpoint {
  103. remote-endpoint = <&fimc0_ep>;
  104. bus-width = <8>;
  105. hsync-active = <0>;
  106. vsync-active = <1>;
  107. pclk-sample = <1>;
  108. };
  109. };
  110. };
  111. /* MIPI CSI-2 bus IF sensor */
  112. s5c73m3: sensor@0x1a {
  113. compatible = "samsung,s5c73m3";
  114. reg = <0x1a>;
  115. vddio-supply = <...>;
  116. clock-frequency = <24000000>;
  117. clocks = <&camera 0>;
  118. clock-names = "mclk";
  119. port {
  120. s5c73m3_1: endpoint {
  121. data-lanes = <1 2 3 4>;
  122. remote-endpoint = <&csis0_ep>;
  123. };
  124. };
  125. };
  126. };
  127. camera {
  128. compatible = "samsung,fimc", "simple-bus";
  129. clocks = <&clock 132>, <&clock 133>, <&clock 351>,
  130. <&clock 352>;
  131. clock-names = "sclk_cam0", "sclk_cam1", "pxl_async0",
  132. "pxl_async1";
  133. #clock-cells = <1>;
  134. clock-output-names = "cam_a_clkout", "cam_b_clkout";
  135. pinctrl-names = "default";
  136. pinctrl-0 = <&cam_port_a_clk_active>;
  137. status = "okay";
  138. #address-cells = <1>;
  139. #size-cells = <1>;
  140. /* parallel camera ports */
  141. parallel-ports {
  142. /* camera A input */
  143. port@0 {
  144. reg = <0>;
  145. fimc0_ep: endpoint {
  146. remote-endpoint = <&s5k6aa_ep>;
  147. bus-width = <8>;
  148. hsync-active = <0>;
  149. vsync-active = <1>;
  150. pclk-sample = <1>;
  151. };
  152. };
  153. };
  154. fimc_0: fimc@11800000 {
  155. compatible = "samsung,exynos4210-fimc";
  156. reg = <0x11800000 0x1000>;
  157. interrupts = <0 85 0>;
  158. status = "okay";
  159. };
  160. csis_0: csis@11880000 {
  161. compatible = "samsung,exynos4210-csis";
  162. reg = <0x11880000 0x1000>;
  163. interrupts = <0 78 0>;
  164. /* camera C input */
  165. port@3 {
  166. reg = <3>;
  167. csis0_ep: endpoint {
  168. remote-endpoint = <&s5c73m3_ep>;
  169. data-lanes = <1 2 3 4>;
  170. samsung,csis-hs-settle = <12>;
  171. };
  172. };
  173. };
  174. };
  175. The MIPI-CSIS device binding is defined in samsung-mipi-csis.txt.