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