syscon-reboot-mode.yaml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/power/reset/syscon-reboot-mode.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Generic SYSCON reboot mode driver
  7. maintainers:
  8. - Sebastian Reichel <sre@kernel.org>
  9. description: |
  10. This driver gets reboot mode magic value from reboot-mode driver
  11. and stores it in a SYSCON mapped register. Then the bootloader
  12. can read it and take different action according to the magic
  13. value stored. The SYSCON mapped register is retrieved from the
  14. parental dt-node plus the offset. So the SYSCON reboot-mode node
  15. should be represented as a sub-node of a "syscon", "simple-mfd" node.
  16. properties:
  17. compatible:
  18. const: syscon-reboot-mode
  19. mask:
  20. $ref: /schemas/types.yaml#/definitions/uint32
  21. description: Update only the register bits defined by the mask (32 bit)
  22. offset:
  23. $ref: /schemas/types.yaml#/definitions/uint32
  24. description: Offset in the register map for the mode register (in bytes)
  25. allOf:
  26. - $ref: reboot-mode.yaml#
  27. unevaluatedProperties: false
  28. required:
  29. - compatible
  30. - offset
  31. examples:
  32. - |
  33. #include <dt-bindings/soc/rockchip,boot-mode.h>
  34. reboot-mode {
  35. compatible = "syscon-reboot-mode";
  36. offset = <0x40>;
  37. mode-normal = <BOOT_NORMAL>;
  38. mode-recovery = <BOOT_RECOVERY>;
  39. mode-bootloader = <BOOT_FASTBOOT>;
  40. mode-loader = <BOOT_BL_DOWNLOAD>;
  41. };
  42. ...