ccs.rst 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. .. SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause
  2. .. include:: <isonum.txt>
  3. .. _media-ccs-driver:
  4. MIPI CCS camera sensor driver
  5. =============================
  6. The MIPI CCS camera sensor driver is a generic driver for `MIPI CCS
  7. <https://www.mipi.org/specifications/camera-command-set>`_ compliant
  8. camera sensors.
  9. Also see :ref:`the CCS driver UAPI documentation <media-ccs-uapi>`.
  10. CCS static data
  11. ---------------
  12. The MIPI CCS driver supports CCS static data for all compliant devices,
  13. including not just those compliant with CCS 1.1 but also CCS 1.0 and SMIA(++).
  14. For CCS the file names are formed as
  15. ccs/ccs-sensor-vvvv-mmmm-rrrr.fw (sensor) and
  16. ccs/ccs-module-vvvv-mmmm-rrrr.fw (module).
  17. For SMIA++ compliant devices the corresponding file names are
  18. ccs/smiapp-sensor-vv-mmmm-rr.fw (sensor) and
  19. ccs/smiapp-module-vv-mmmm-rrrr.fw (module).
  20. For SMIA (non-++) compliant devices the static data file name is
  21. ccs/smia-sensor-vv-mmmm-rr.fw (sensor).
  22. vvvv or vv denotes MIPI and SMIA manufacturer IDs respectively, mmmm model ID
  23. and rrrr or rr revision number.
  24. CCS tools
  25. ~~~~~~~~~
  26. `CCS tools <https://github.com/MIPI-Alliance/ccs-tools/>`_ is a set of
  27. tools for working with CCS static data files. CCS tools includes a
  28. definition of the human-readable CCS static data YAML format and includes a
  29. program to convert it to a binary.
  30. Register definition generator
  31. -----------------------------
  32. The ccs-regs.asc file contains MIPI CCS register definitions that are used
  33. to produce C source code files for definitions that can be better used by
  34. programs written in C language. As there are many dependencies between the
  35. produced files, please do not modify them manually as it's error-prone and
  36. in vain, but instead change the script producing them.
  37. Usage
  38. ~~~~~
  39. Conventionally the script is called this way to update the CCS driver
  40. definitions:
  41. .. code-block:: none
  42. $ Documentation/driver-api/media/drivers/ccs/mk-ccs-regs -k \
  43. -e drivers/media/i2c/ccs/ccs-regs.h \
  44. -L drivers/media/i2c/ccs/ccs-limits.h \
  45. -l drivers/media/i2c/ccs/ccs-limits.c \
  46. -c Documentation/driver-api/media/drivers/ccs/ccs-regs.asc
  47. CCS PLL calculator
  48. ==================
  49. The CCS PLL calculator is used to compute the PLL configuration, given sensor's
  50. capabilities as well as board configuration and user specified configuration. As
  51. the configuration space that encompasses all these configurations is vast, the
  52. PLL calculator isn't entirely trivial. Yet it is relatively simple to use for a
  53. driver.
  54. The PLL model implemented by the PLL calculator corresponds to MIPI CCS 1.1.
  55. .. kernel-doc:: drivers/media/i2c/ccs-pll.h
  56. **Copyright** |copy| 2020 Intel Corporation