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