mediatek,aal.yaml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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,aal.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Mediatek display adaptive ambient light processor
  7. maintainers:
  8. - Chun-Kuang Hu <chunkuang.hu@kernel.org>
  9. - Philipp Zabel <p.zabel@pengutronix.de>
  10. description: |
  11. Mediatek display adaptive ambient light processor, namely AAL,
  12. is responsible for backlight power saving and sunlight visibility improving.
  13. AAL 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-aal
  22. - mediatek,mt8183-disp-aal
  23. - mediatek,mt8195-mdp3-aal
  24. - items:
  25. - enum:
  26. - mediatek,mt8188-mdp3-aal
  27. - const: mediatek,mt8195-mdp3-aal
  28. - items:
  29. - enum:
  30. - mediatek,mt2712-disp-aal
  31. - mediatek,mt6795-disp-aal
  32. - const: mediatek,mt8173-disp-aal
  33. - items:
  34. - enum:
  35. - mediatek,mt8186-disp-aal
  36. - mediatek,mt8188-disp-aal
  37. - mediatek,mt8192-disp-aal
  38. - mediatek,mt8195-disp-aal
  39. - mediatek,mt8365-disp-aal
  40. - const: mediatek,mt8183-disp-aal
  41. reg:
  42. maxItems: 1
  43. interrupts:
  44. maxItems: 1
  45. power-domains:
  46. description: A phandle and PM domain specifier as defined by bindings of
  47. the power controller specified by phandle. See
  48. Documentation/devicetree/bindings/power/power-domain.yaml for details.
  49. clocks:
  50. items:
  51. - description: AAL Clock
  52. mediatek,gce-client-reg:
  53. description: The register of client driver can be configured by gce with
  54. 4 arguments defined in this property, such as phandle of gce, subsys id,
  55. register offset and size. Each GCE subsys id is mapping to a client
  56. defined in the header include/dt-bindings/gce/<chip>-gce.h.
  57. $ref: /schemas/types.yaml#/definitions/phandle-array
  58. maxItems: 1
  59. ports:
  60. $ref: /schemas/graph.yaml#/properties/ports
  61. description:
  62. Input and output ports can have multiple endpoints, each of those
  63. connects to either the primary, secondary, etc, display pipeline.
  64. properties:
  65. port@0:
  66. $ref: /schemas/graph.yaml#/properties/port
  67. description: AAL input port
  68. port@1:
  69. $ref: /schemas/graph.yaml#/properties/port
  70. description:
  71. AAL output to the next component's input, for example could be one
  72. of many gamma, overdrive or other blocks.
  73. required:
  74. - port@0
  75. - port@1
  76. required:
  77. - compatible
  78. - reg
  79. - interrupts
  80. - power-domains
  81. - clocks
  82. additionalProperties: false
  83. examples:
  84. - |
  85. #include <dt-bindings/interrupt-controller/arm-gic.h>
  86. #include <dt-bindings/clock/mt8173-clk.h>
  87. #include <dt-bindings/power/mt8173-power.h>
  88. #include <dt-bindings/gce/mt8173-gce.h>
  89. soc {
  90. #address-cells = <2>;
  91. #size-cells = <2>;
  92. aal@14015000 {
  93. compatible = "mediatek,mt8173-disp-aal";
  94. reg = <0 0x14015000 0 0x1000>;
  95. interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_LOW>;
  96. power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
  97. clocks = <&mmsys CLK_MM_DISP_AAL>;
  98. mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0x5000 0x1000>;
  99. ports {
  100. #address-cells = <1>;
  101. #size-cells = <0>;
  102. port@0 {
  103. reg = <0>;
  104. endpoint {
  105. remote-endpoint = <&ccorr0_out>;
  106. };
  107. };
  108. port@1 {
  109. reg = <1>;
  110. endpoint {
  111. remote-endpoint = <&gamma0_in>;
  112. };
  113. };
  114. };
  115. };
  116. };