18c2ecf20Sopenharmony_ciDrive a GPIO line that can be used to restart the system from a restart 28c2ecf20Sopenharmony_cihandler. 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ciThis binding supports level and edge triggered reset. At driver load 58c2ecf20Sopenharmony_citime, the driver will request the given gpio line and install a restart 68c2ecf20Sopenharmony_cihandler. If the optional properties 'open-source' is not found, the GPIO line 78c2ecf20Sopenharmony_ciwill be driven in the inactive state. Otherwise its not driven until 88c2ecf20Sopenharmony_cithe restart is initiated. 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ciWhen the system is restarted, the restart handler will be invoked in 118c2ecf20Sopenharmony_cipriority order. The gpio is configured as an output, and driven active, 128c2ecf20Sopenharmony_citriggering a level triggered reset condition. This will also cause an 138c2ecf20Sopenharmony_ciinactive->active edge condition, triggering positive edge triggered 148c2ecf20Sopenharmony_cireset. After a delay specified by active-delay, the GPIO is set to 158c2ecf20Sopenharmony_ciinactive, thus causing an active->inactive edge, triggering negative edge 168c2ecf20Sopenharmony_citriggered reset. After a delay specified by inactive-delay, the GPIO 178c2ecf20Sopenharmony_ciis driven active again. After a delay specified by wait-delay, the 188c2ecf20Sopenharmony_cirestart handler completes allowing other restart handlers to be attempted. 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ciRequired properties: 218c2ecf20Sopenharmony_ci- compatible : should be "gpio-restart". 228c2ecf20Sopenharmony_ci- gpios : The GPIO to set high/low, see "gpios property" in 238c2ecf20Sopenharmony_ci Documentation/devicetree/bindings/gpio/gpio.txt. If the pin should be 248c2ecf20Sopenharmony_ci low to reset the board set it to "Active Low", otherwise set 258c2ecf20Sopenharmony_ci gpio to "Active High". 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ciOptional properties: 288c2ecf20Sopenharmony_ci- open-source : Treat the GPIO as being open source and defer driving 298c2ecf20Sopenharmony_ci it to when the restart is initiated. If this optional property is not 308c2ecf20Sopenharmony_ci specified, the GPIO is initialized as an output in its inactive state. 318c2ecf20Sopenharmony_ci- priority : A priority ranging from 0 to 255 (default 128) according to 328c2ecf20Sopenharmony_ci the following guidelines: 338c2ecf20Sopenharmony_ci 0: Restart handler of last resort, with limited restart 348c2ecf20Sopenharmony_ci capabilities 358c2ecf20Sopenharmony_ci 128: Default restart handler; use if no other restart handler is 368c2ecf20Sopenharmony_ci expected to be available, and/or if restart functionality is 378c2ecf20Sopenharmony_ci sufficient to restart the entire system 388c2ecf20Sopenharmony_ci 255: Highest priority restart handler, will preempt all other 398c2ecf20Sopenharmony_ci restart handlers 408c2ecf20Sopenharmony_ci- active-delay: Delay (default 100) to wait after driving gpio active [ms] 418c2ecf20Sopenharmony_ci- inactive-delay: Delay (default 100) to wait after driving gpio inactive [ms] 428c2ecf20Sopenharmony_ci- wait-delay: Delay (default 3000) to wait after completing restart 438c2ecf20Sopenharmony_ci sequence [ms] 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ciExamples: 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_cigpio-restart { 488c2ecf20Sopenharmony_ci compatible = "gpio-restart"; 498c2ecf20Sopenharmony_ci gpios = <&gpio 4 0>; 508c2ecf20Sopenharmony_ci priority = <128>; 518c2ecf20Sopenharmony_ci active-delay = <100>; 528c2ecf20Sopenharmony_ci inactive-delay = <100>; 538c2ecf20Sopenharmony_ci wait-delay = <3000>; 548c2ecf20Sopenharmony_ci}; 55