syscon-reboot.yaml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/power/reset/syscon-reboot.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Generic SYSCON mapped register reset driver
  7. maintainers:
  8. - Sebastian Reichel <sre@kernel.org>
  9. description: |+
  10. This is a generic reset driver using syscon to map the reset register.
  11. The reset is generally performed with a write to the reset register
  12. defined by the SYSCON register map base plus the offset with the value and
  13. mask defined in the reboot node. Default will be little endian mode, 32 bit
  14. access only. The SYSCON registers map is normally retrieved from the
  15. parental dt-node. So the SYSCON reboot node should be represented as a
  16. sub-node of a "syscon", "simple-mfd" node. Though the regmap property
  17. pointing to the system controller node is also supported.
  18. properties:
  19. compatible:
  20. enum:
  21. - syscon-reboot
  22. - google,gs101-reboot
  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 reboot register (in bytes).
  29. reg:
  30. maxItems: 1
  31. description: Base address and size for the reboot register.
  32. regmap:
  33. $ref: /schemas/types.yaml#/definitions/phandle
  34. deprecated: true
  35. description: |
  36. Phandle to the register map node. This property is deprecated in favor of
  37. the syscon-reboot node been a child of a system controller node.
  38. value:
  39. $ref: /schemas/types.yaml#/definitions/uint32
  40. description: The reset value written to the reboot register (32 bit access).
  41. priority:
  42. default: 192
  43. required:
  44. - compatible
  45. additionalProperties: false
  46. allOf:
  47. - $ref: restart-handler.yaml#
  48. - if:
  49. properties:
  50. compatible:
  51. contains:
  52. const: google,gs101-reboot
  53. then:
  54. properties:
  55. mask: false
  56. offset: false
  57. reg: false
  58. value: false
  59. else:
  60. if:
  61. not:
  62. required:
  63. - mask
  64. then:
  65. required:
  66. - value
  67. anyOf:
  68. - required: [offset]
  69. - required: [reg]
  70. examples:
  71. - |
  72. reboot {
  73. compatible = "syscon-reboot";
  74. regmap = <&regmapnode>;
  75. offset = <0x0>;
  76. mask = <0x1>;
  77. };
  78. - |
  79. reboot {
  80. compatible = "google,gs101-reboot";
  81. };