samsung-fimc.txt 6.3 KB

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