950-0649-media-dt-bindings-Convert-imx290.txt-to-YAML.patch 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. From 22774ebfc4073fd3c0fc729e2ae1e0e762ec127e Mon Sep 17 00:00:00 2001
  2. From: Laurent Pinchart <[email protected]>
  3. Date: Sun, 16 Oct 2022 09:15:04 +0300
  4. Subject: [PATCH] media: dt-bindings: Convert imx290.txt to YAML
  5. Upstream commit a96dfea1df25
  6. Convert the Sony IMX290 DT binding from text to YAML. Add Manivannan as
  7. a maintainer given that he is listed in MAINTAINERS for the file, as
  8. volunteering myself.
  9. The name of the input clock, "xclk", is wrong as the hardware manual
  10. names it INCK. As the device has a single clock, the name could be
  11. omitted, but that would require a corresponding change to the driver and
  12. is thus a candidate for further patches.
  13. Signed-off-by: Laurent Pinchart <[email protected]>
  14. Reviewed-by: Krzysztof Kozlowski <[email protected]>
  15. Signed-off-by: Sakari Ailus <[email protected]>
  16. ---
  17. .../devicetree/bindings/media/i2c/imx290.txt | 57 --------
  18. .../bindings/media/i2c/sony,imx290.yaml | 129 ++++++++++++++++++
  19. MAINTAINERS | 2 +-
  20. 3 files changed, 130 insertions(+), 58 deletions(-)
  21. delete mode 100644 Documentation/devicetree/bindings/media/i2c/imx290.txt
  22. create mode 100644 Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml
  23. --- a/Documentation/devicetree/bindings/media/i2c/imx290.txt
  24. +++ /dev/null
  25. @@ -1,57 +0,0 @@
  26. -* Sony IMX290 1/2.8-Inch CMOS Image Sensor
  27. -
  28. -The Sony IMX290 is a 1/2.8-Inch CMOS Solid-state image sensor with
  29. -Square Pixel for Color Cameras. It is programmable through I2C and 4-wire
  30. -interfaces. The sensor output is available via CMOS logic parallel SDR output,
  31. -Low voltage LVDS DDR output and CSI-2 serial data output. The CSI-2 bus is the
  32. -default. No bindings have been defined for the other busses.
  33. -
  34. -Required Properties:
  35. -- compatible: Should be "sony,imx290"
  36. -- reg: I2C bus address of the device
  37. -- clocks: Reference to the xclk clock.
  38. -- clock-names: Should be "xclk".
  39. -- clock-frequency: Frequency of the xclk clock in Hz.
  40. -- vdddo-supply: Sensor digital IO regulator.
  41. -- vdda-supply: Sensor analog regulator.
  42. -- vddd-supply: Sensor digital core regulator.
  43. -
  44. -Optional Properties:
  45. -- reset-gpios: Sensor reset GPIO
  46. -
  47. -The imx290 device node should contain one 'port' child node with
  48. -an 'endpoint' subnode. For further reading on port node refer to
  49. -Documentation/devicetree/bindings/media/video-interfaces.txt.
  50. -
  51. -Required Properties on endpoint:
  52. -- data-lanes: check ../video-interfaces.txt
  53. -- link-frequencies: check ../video-interfaces.txt
  54. -- remote-endpoint: check ../video-interfaces.txt
  55. -
  56. -Example:
  57. - &i2c1 {
  58. - ...
  59. - imx290: camera-sensor@1a {
  60. - compatible = "sony,imx290";
  61. - reg = <0x1a>;
  62. -
  63. - reset-gpios = <&msmgpio 35 GPIO_ACTIVE_LOW>;
  64. - pinctrl-names = "default";
  65. - pinctrl-0 = <&camera_rear_default>;
  66. -
  67. - clocks = <&gcc GCC_CAMSS_MCLK0_CLK>;
  68. - clock-names = "xclk";
  69. - clock-frequency = <37125000>;
  70. -
  71. - vdddo-supply = <&camera_vdddo_1v8>;
  72. - vdda-supply = <&camera_vdda_2v8>;
  73. - vddd-supply = <&camera_vddd_1v5>;
  74. -
  75. - port {
  76. - imx290_ep: endpoint {
  77. - data-lanes = <1 2 3 4>;
  78. - link-frequencies = /bits/ 64 <445500000>;
  79. - remote-endpoint = <&csiphy0_ep>;
  80. - };
  81. - };
  82. - };
  83. --- /dev/null
  84. +++ b/Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml
  85. @@ -0,0 +1,129 @@
  86. +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
  87. +%YAML 1.2
  88. +---
  89. +$id: http://devicetree.org/schemas/media/i2c/sony,imx290.yaml#
  90. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  91. +
  92. +title: Sony IMX290 1/2.8-Inch CMOS Image Sensor
  93. +
  94. +maintainers:
  95. + - Manivannan Sadhasivam <[email protected]>
  96. + - Laurent Pinchart <[email protected]>
  97. +
  98. +description: |-
  99. + The Sony IMX290 is a 1/2.8-Inch CMOS Solid-state image sensor with Square
  100. + Pixel for Color Cameras. It is programmable through I2C and 4-wire
  101. + interfaces. The sensor output is available via CMOS logic parallel SDR
  102. + output, Low voltage LVDS DDR output and CSI-2 serial data output. The CSI-2
  103. + bus is the default. No bindings have been defined for the other busses.
  104. +
  105. +properties:
  106. + compatible:
  107. + enum:
  108. + - sony,imx290
  109. +
  110. + reg:
  111. + maxItems: 1
  112. +
  113. + clocks:
  114. + maxItems: 1
  115. +
  116. + clock-names:
  117. + description: Input clock (37.125 MHz or 74.25 MHz)
  118. + items:
  119. + - const: xclk
  120. +
  121. + clock-frequency:
  122. + description: Frequency of the xclk clock in Hz
  123. +
  124. + vdda-supply:
  125. + description: Analog power supply (2.9V)
  126. +
  127. + vddd-supply:
  128. + description: Digital core power supply (1.2V)
  129. +
  130. + vdddo-supply:
  131. + description: Digital I/O power supply (1.8V)
  132. +
  133. + reset-gpios:
  134. + description: Sensor reset (XCLR) GPIO
  135. + maxItems: 1
  136. +
  137. + port:
  138. + $ref: /schemas/graph.yaml#/$defs/port-base
  139. + description: |
  140. + Video output port
  141. +
  142. + properties:
  143. + endpoint:
  144. + $ref: /schemas/media/video-interfaces.yaml#
  145. + unevaluatedProperties: false
  146. +
  147. + properties:
  148. + data-lanes:
  149. + anyOf:
  150. + - items:
  151. + - const: 1
  152. + - const: 2
  153. + - items:
  154. + - const: 1
  155. + - const: 2
  156. + - const: 3
  157. + - const: 4
  158. +
  159. + link-frequencies: true
  160. +
  161. + required:
  162. + - data-lanes
  163. + - link-frequencies
  164. +
  165. + additionalProperties: false
  166. +
  167. +required:
  168. + - compatible
  169. + - reg
  170. + - clocks
  171. + - clock-names
  172. + - clock-frequency
  173. + - vdda-supply
  174. + - vddd-supply
  175. + - vdddo-supply
  176. + - port
  177. +
  178. +additionalProperties: false
  179. +
  180. +examples:
  181. + - |
  182. + #include <dt-bindings/gpio/gpio.h>
  183. +
  184. + i2c {
  185. + #address-cells = <1>;
  186. + #size-cells = <0>;
  187. +
  188. + imx290: camera-sensor@1a {
  189. + compatible = "sony,imx290";
  190. + reg = <0x1a>;
  191. +
  192. + pinctrl-names = "default";
  193. + pinctrl-0 = <&camera_rear_default>;
  194. +
  195. + clocks = <&gcc 90>;
  196. + clock-names = "xclk";
  197. + clock-frequency = <37125000>;
  198. +
  199. + vdddo-supply = <&camera_vdddo_1v8>;
  200. + vdda-supply = <&camera_vdda_2v8>;
  201. + vddd-supply = <&camera_vddd_1v5>;
  202. +
  203. + reset-gpios = <&msmgpio 35 GPIO_ACTIVE_LOW>;
  204. +
  205. + port {
  206. + imx290_ep: endpoint {
  207. + data-lanes = <1 2 3 4>;
  208. + link-frequencies = /bits/ 64 <445500000>;
  209. + remote-endpoint = <&csiphy0_ep>;
  210. + };
  211. + };
  212. + };
  213. + };
  214. +...
  215. --- a/MAINTAINERS
  216. +++ b/MAINTAINERS
  217. @@ -19269,7 +19269,7 @@ M: Manivannan Sadhasivam <manivannan.sad
  218. L: [email protected]
  219. S: Maintained
  220. T: git git://linuxtv.org/media_tree.git
  221. -F: Documentation/devicetree/bindings/media/i2c/imx290.txt
  222. +F: Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml
  223. F: drivers/media/i2c/imx290.c
  224. SONY IMX296 SENSOR DRIVER