mediatek,gamma.yaml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/display/mediatek/mediatek,gamma.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Mediatek display gamma correction
  7. maintainers:
  8. - Chun-Kuang Hu <chunkuang.hu@kernel.org>
  9. - Philipp Zabel <p.zabel@pengutronix.de>
  10. description: |
  11. Mediatek display gamma correction, namely GAMMA, provides a nonlinear
  12. operation used to adjust luminance in display system.
  13. GAMMA device node must be siblings to the central MMSYS_CONFIG node.
  14. For a description of the MMSYS_CONFIG binding, see
  15. Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml
  16. for details.
  17. properties:
  18. compatible:
  19. oneOf:
  20. - enum:
  21. - mediatek,mt8173-disp-gamma
  22. - mediatek,mt8183-disp-gamma
  23. - mediatek,mt8195-disp-gamma
  24. - items:
  25. - enum:
  26. - mediatek,mt6795-disp-gamma
  27. - const: mediatek,mt8173-disp-gamma
  28. - items:
  29. - enum:
  30. - mediatek,mt8186-disp-gamma
  31. - mediatek,mt8188-disp-gamma
  32. - mediatek,mt8192-disp-gamma
  33. - mediatek,mt8195-disp-gamma
  34. - mediatek,mt8365-disp-gamma
  35. - const: mediatek,mt8183-disp-gamma
  36. - items:
  37. - enum:
  38. - mediatek,mt8188-disp-gamma
  39. - const: mediatek,mt8195-disp-gamma
  40. reg:
  41. maxItems: 1
  42. interrupts:
  43. maxItems: 1
  44. power-domains:
  45. description: A phandle and PM domain specifier as defined by bindings of
  46. the power controller specified by phandle. See
  47. Documentation/devicetree/bindings/power/power-domain.yaml for details.
  48. clocks:
  49. items:
  50. - description: GAMMA Clock
  51. mediatek,gce-client-reg:
  52. description: The register of client driver can be configured by gce with
  53. 4 arguments defined in this property, such as phandle of gce, subsys id,
  54. register offset and size. Each GCE subsys id is mapping to a client
  55. defined in the header include/dt-bindings/gce/<chip>-gce.h.
  56. $ref: /schemas/types.yaml#/definitions/phandle-array
  57. maxItems: 1
  58. ports:
  59. $ref: /schemas/graph.yaml#/properties/ports
  60. properties:
  61. port@0:
  62. $ref: /schemas/graph.yaml#/properties/port
  63. description: GAMMA input, usually from one of the AAL blocks.
  64. port@1:
  65. $ref: /schemas/graph.yaml#/properties/port
  66. description:
  67. GAMMA output to the input of the next desired component in the
  68. display pipeline, for example one of the available DITHER or
  69. POSTMASK blocks.
  70. required:
  71. - port@0
  72. - port@1
  73. required:
  74. - compatible
  75. - reg
  76. - interrupts
  77. - power-domains
  78. - clocks
  79. additionalProperties: false
  80. examples:
  81. - |
  82. #include <dt-bindings/interrupt-controller/arm-gic.h>
  83. #include <dt-bindings/clock/mt8173-clk.h>
  84. #include <dt-bindings/power/mt8173-power.h>
  85. #include <dt-bindings/gce/mt8173-gce.h>
  86. soc {
  87. #address-cells = <2>;
  88. #size-cells = <2>;
  89. gamma@14016000 {
  90. compatible = "mediatek,mt8173-disp-gamma";
  91. reg = <0 0x14016000 0 0x1000>;
  92. interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_LOW>;
  93. power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
  94. clocks = <&mmsys CLK_MM_DISP_GAMMA>;
  95. mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0x6000 0x1000>;
  96. };
  97. };