1ef805f21SElliot Berman# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2ef805f21SElliot Berman%YAML 1.2 3ef805f21SElliot Berman--- 4ef805f21SElliot Berman$id: http://devicetree.org/schemas/power/reset/reboot-mode.yaml# 5ef805f21SElliot Berman$schema: http://devicetree.org/meta-schemas/core.yaml# 6ef805f21SElliot Berman 7ef805f21SElliot Bermantitle: Generic reboot mode core map 8ef805f21SElliot Berman 9ef805f21SElliot Bermanmaintainers: 10ef805f21SElliot Berman - Andy Yan <andy.yan@rock-chips.com> 11ef805f21SElliot Berman 12ef805f21SElliot Bermandescription: | 13ef805f21SElliot Berman This driver get reboot mode arguments and call the write 14ef805f21SElliot Berman interface to store the magic value in special register 15ef805f21SElliot Berman or ram. Then the bootloader can read it and take different 16ef805f21SElliot Berman action according to the argument stored. 17ef805f21SElliot Berman 18ef805f21SElliot Berman All mode properties are vendor specific, it is a indication to tell 19ef805f21SElliot Berman the bootloader what to do when the system reboots, and should be named 20ef805f21SElliot Berman as mode-xxx = <magic> (xxx is mode name, magic should be a non-zero value). 21ef805f21SElliot Berman 22ef805f21SElliot Berman For example, modes common Android platform are: 23ef805f21SElliot Berman - normal: Normal reboot mode, system reboot with command "reboot". 24ef805f21SElliot Berman - recovery: Android Recovery mode, it is a mode to format the device or update a new image. 25ef805f21SElliot Berman - bootloader: Android fastboot mode, it's a mode to re-flash partitions on the Android based device. 26ef805f21SElliot Berman - loader: A bootloader mode, it's a mode used to download image on Rockchip platform, 27ef805f21SElliot Berman usually used in development. 28ef805f21SElliot Berman 29ef805f21SElliot Bermanproperties: 30ef805f21SElliot Berman mode-normal: 31ef805f21SElliot Berman $ref: /schemas/types.yaml#/definitions/uint32 326ad8838dSRob Herring description: 33ef805f21SElliot Berman Default value to set on a reboot if no command was provided. 34ef805f21SElliot Berman 35ef805f21SElliot BermanpatternProperties: 36ef805f21SElliot Berman "^mode-.*$": 37ef805f21SElliot Berman $ref: /schemas/types.yaml#/definitions/uint32 38ef805f21SElliot Berman 39*da5e96ffSsatya priyaadditionalProperties: true 40f84e2c5cSRob Herring 41ef805f21SElliot Bermanexamples: 42ef805f21SElliot Berman - | 43ef805f21SElliot Berman reboot-mode { 44ef805f21SElliot Berman mode-normal = <0>; 45ef805f21SElliot Berman mode-recovery = <1>; 46ef805f21SElliot Berman mode-bootloader = <2>; 47ef805f21SElliot Berman mode-loader = <3>; 48ef805f21SElliot Berman }; 49ef805f21SElliot Berman... 50