syscon-poweroff.yaml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/power/reset/syscon-poweroff.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Generic SYSCON mapped register poweroff driver
  7. maintainers:
  8. - Sebastian Reichel <sre@kernel.org>
  9. description: |+
  10. This is a generic poweroff driver using syscon to map the poweroff register.
  11. The poweroff is generally performed with a write to the poweroff register
  12. defined by the register map pointed by syscon reference plus the offset
  13. with the value and mask defined in the poweroff node.
  14. Default will be little endian mode, 32 bit access only.
  15. The SYSCON register map is normally retrieved from the parental dt-node. So
  16. the SYSCON poweroff node should be represented as a sub-node of a "syscon",
  17. "simple-mfd" node.
  18. properties:
  19. compatible:
  20. const: syscon-poweroff
  21. reg:
  22. maxItems: 1
  23. mask:
  24. $ref: /schemas/types.yaml#/definitions/uint32
  25. description: Update only the register bits defined by the mask (32 bit).
  26. offset:
  27. $ref: /schemas/types.yaml#/definitions/uint32
  28. description: Offset in the register map for the poweroff register (in bytes).
  29. regmap:
  30. $ref: /schemas/types.yaml#/definitions/phandle
  31. deprecated: true
  32. description:
  33. Phandle to the register map node. This property is deprecated in favor of
  34. the syscon-poweroff node being a child of a system controller node.
  35. value:
  36. $ref: /schemas/types.yaml#/definitions/uint32
  37. description: The poweroff value written to the poweroff register (32 bit access).
  38. required:
  39. - compatible
  40. anyOf:
  41. - required: [offset]
  42. - required: [reg]
  43. additionalProperties: false
  44. allOf:
  45. - if:
  46. not:
  47. required:
  48. - mask
  49. then:
  50. required:
  51. - value
  52. examples:
  53. - |
  54. poweroff {
  55. compatible = "syscon-poweroff";
  56. offset = <0x0>;
  57. mask = <0x7a>;
  58. };