mediatek,mt6370-backlight.yaml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/leds/backlight/mediatek,mt6370-backlight.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: MediaTek MT6370 Backlight
  7. maintainers:
  8. - ChiaEn Wu <chiaen_wu@richtek.com>
  9. description: |
  10. This module is part of the MT6370 MFD device.
  11. The MT6370 Backlight WLED driver supports up to a 29V output voltage for
  12. 4 channels of 8 series WLEDs. Each channel supports up to 30mA of current
  13. capability with 2048 current steps (11 bits, only for MT6370/MT6371) or
  14. 16384 current steps (14 bits, only for MT6372) in exponential or linear
  15. mapping curves.
  16. allOf:
  17. - $ref: common.yaml#
  18. properties:
  19. compatible:
  20. enum:
  21. - mediatek,mt6370-backlight
  22. - mediatek,mt6372-backlight
  23. default-brightness:
  24. minimum: 0
  25. max-brightness:
  26. minimum: 0
  27. enable-gpios:
  28. description: External backlight 'enable' pin
  29. maxItems: 1
  30. mediatek,bled-pwm-enable:
  31. description: |
  32. Enable external PWM input for backlight dimming
  33. type: boolean
  34. mediatek,bled-pwm-hys-enable:
  35. description: |
  36. Enable the backlight input-hysteresis for PWM mode
  37. type: boolean
  38. mediatek,bled-pwm-hys-input-th-steps:
  39. $ref: /schemas/types.yaml#/definitions/uint8
  40. enum: [1, 4, 16, 64]
  41. description: |
  42. The selection of the upper and lower bounds threshold of backlight
  43. PWM resolution. If we choose selection 64, the variation of PWM
  44. resolution needs more than 64 steps.
  45. mediatek,bled-ovp-shutdown:
  46. description: |
  47. Enable the backlight shutdown when OVP level triggered
  48. type: boolean
  49. mediatek,bled-ovp-microvolt:
  50. enum: [17000000, 21000000, 25000000, 29000000]
  51. description: |
  52. Backlight OVP level selection.
  53. mediatek,bled-ocp-shutdown:
  54. description: |
  55. Enable the backlight shutdown when OCP level triggered.
  56. type: boolean
  57. mediatek,bled-ocp-microamp:
  58. enum: [900000, 1200000, 1500000, 1800000]
  59. description: |
  60. Backlight OC level selection.
  61. mediatek,bled-exponential-mode-enable:
  62. description: |
  63. Enable the exponential mode of backlight brightness. If this property
  64. is not enabled, the default is to use linear mode.
  65. type: boolean
  66. mediatek,bled-channel-use:
  67. $ref: /schemas/types.yaml#/definitions/uint8
  68. description: |
  69. Backlight LED channel to be used.
  70. Each bit mapping to:
  71. - 0: CH4
  72. - 1: CH3
  73. - 2: CH2
  74. - 3: CH1
  75. minimum: 1
  76. maximum: 15
  77. if:
  78. properties:
  79. compatible:
  80. contains:
  81. const: mediatek,mt6372-backlight
  82. then:
  83. properties:
  84. default-brightness:
  85. maximum: 16384
  86. max-brightness:
  87. maximum: 16384
  88. else:
  89. properties:
  90. default-brightness:
  91. maximum: 2048
  92. max-brightness:
  93. maximum: 2048
  94. required:
  95. - compatible
  96. - mediatek,bled-channel-use
  97. additionalProperties: false