mediatek,pmic-keys.yaml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/input/mediatek,pmic-keys.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: MediaTek PMIC Keys
  7. maintainers:
  8. - Chen Zhong <chen.zhong@mediatek.com>
  9. allOf:
  10. - $ref: input.yaml#
  11. description: |
  12. There are two key functions provided by MT6397, MT6323 and other MediaTek
  13. PMICs: pwrkey and homekey.
  14. The key functions are defined as the subnode of the function node provided
  15. by the PMIC that is defined as a Multi-Function Device (MFD).
  16. For MediaTek MT6323/MT6397 PMIC bindings see
  17. Documentation/devicetree/bindings/mfd/mt6397.txt
  18. properties:
  19. compatible:
  20. enum:
  21. - mediatek,mt6323-keys
  22. - mediatek,mt6331-keys
  23. - mediatek,mt6357-keys
  24. - mediatek,mt6358-keys
  25. - mediatek,mt6397-keys
  26. power-off-time-sec: true
  27. mediatek,long-press-mode:
  28. description: |
  29. Key long-press force shutdown setting
  30. 0 - disabled
  31. 1 - pwrkey
  32. 2 - pwrkey+homekey
  33. $ref: /schemas/types.yaml#/definitions/uint32
  34. default: 0
  35. maximum: 2
  36. patternProperties:
  37. "^((power|home)|(key-[a-z0-9-]+|[a-z0-9-]+-key))$":
  38. $ref: input.yaml#
  39. properties:
  40. interrupts:
  41. minItems: 1
  42. items:
  43. - description: Key press interrupt
  44. - description: Key release interrupt
  45. interrupt-names: true
  46. linux,keycodes:
  47. maxItems: 1
  48. wakeup-source: true
  49. required:
  50. - linux,keycodes
  51. if:
  52. properties:
  53. interrupt-names:
  54. contains:
  55. const: powerkey
  56. then:
  57. properties:
  58. interrupt-names:
  59. minItems: 1
  60. items:
  61. - const: powerkey
  62. - const: powerkey_r
  63. else:
  64. properties:
  65. interrupt-names:
  66. minItems: 1
  67. items:
  68. - const: homekey
  69. - const: homekey_r
  70. unevaluatedProperties: false
  71. required:
  72. - compatible
  73. unevaluatedProperties: false
  74. ...