18c2ecf20Sopenharmony_ciWhat: /sys/class/watchdog/watchdogn/bootstatus 28c2ecf20Sopenharmony_ciDate: August 2015 38c2ecf20Sopenharmony_ciContact: Wim Van Sebroeck <wim@iguana.be> 48c2ecf20Sopenharmony_ciDescription: 58c2ecf20Sopenharmony_ci It is a read only file. It contains status of the watchdog 68c2ecf20Sopenharmony_ci device at boot. It is equivalent to WDIOC_GETBOOTSTATUS of 78c2ecf20Sopenharmony_ci ioctl interface. 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ciWhat: /sys/class/watchdog/watchdogn/identity 108c2ecf20Sopenharmony_ciDate: August 2015 118c2ecf20Sopenharmony_ciContact: Wim Van Sebroeck <wim@iguana.be> 128c2ecf20Sopenharmony_ciDescription: 138c2ecf20Sopenharmony_ci It is a read only file. It contains identity string of 148c2ecf20Sopenharmony_ci watchdog device. 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciWhat: /sys/class/watchdog/watchdogn/nowayout 178c2ecf20Sopenharmony_ciDate: August 2015 188c2ecf20Sopenharmony_ciContact: Wim Van Sebroeck <wim@iguana.be> 198c2ecf20Sopenharmony_ciDescription: 208c2ecf20Sopenharmony_ci It is a read/write file. While reading, it gives '1' 218c2ecf20Sopenharmony_ci if the device has the nowayout feature set, otherwise 228c2ecf20Sopenharmony_ci it gives '0'. Writing a '1' to the file enables the 238c2ecf20Sopenharmony_ci nowayout feature. Once set, the nowayout feature 248c2ecf20Sopenharmony_ci cannot be disabled, so writing a '0' either has no 258c2ecf20Sopenharmony_ci effect (if the feature was already disabled) or 268c2ecf20Sopenharmony_ci results in a permission error. 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ciWhat: /sys/class/watchdog/watchdogn/state 298c2ecf20Sopenharmony_ciDate: August 2015 308c2ecf20Sopenharmony_ciContact: Wim Van Sebroeck <wim@iguana.be> 318c2ecf20Sopenharmony_ciDescription: 328c2ecf20Sopenharmony_ci It is a read only file. It gives active/inactive status of 338c2ecf20Sopenharmony_ci watchdog device. 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ciWhat: /sys/class/watchdog/watchdogn/status 368c2ecf20Sopenharmony_ciDate: August 2015 378c2ecf20Sopenharmony_ciContact: Wim Van Sebroeck <wim@iguana.be> 388c2ecf20Sopenharmony_ciDescription: 398c2ecf20Sopenharmony_ci It is a read only file. It contains watchdog device's 408c2ecf20Sopenharmony_ci internal status bits. It is equivalent to WDIOC_GETSTATUS 418c2ecf20Sopenharmony_ci of ioctl interface. 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ciWhat: /sys/class/watchdog/watchdogn/timeleft 448c2ecf20Sopenharmony_ciDate: August 2015 458c2ecf20Sopenharmony_ciContact: Wim Van Sebroeck <wim@iguana.be> 468c2ecf20Sopenharmony_ciDescription: 478c2ecf20Sopenharmony_ci It is a read only file. It contains value of time left for 488c2ecf20Sopenharmony_ci reset generation. It is equivalent to WDIOC_GETTIMELEFT of 498c2ecf20Sopenharmony_ci ioctl interface. 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ciWhat: /sys/class/watchdog/watchdogn/timeout 528c2ecf20Sopenharmony_ciDate: August 2015 538c2ecf20Sopenharmony_ciContact: Wim Van Sebroeck <wim@iguana.be> 548c2ecf20Sopenharmony_ciDescription: 558c2ecf20Sopenharmony_ci It is a read only file. It is read to know about current 568c2ecf20Sopenharmony_ci value of timeout programmed. 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ciWhat: /sys/class/watchdog/watchdogn/pretimeout 598c2ecf20Sopenharmony_ciDate: December 2016 608c2ecf20Sopenharmony_ciContact: Wim Van Sebroeck <wim@iguana.be> 618c2ecf20Sopenharmony_ciDescription: 628c2ecf20Sopenharmony_ci It is a read only file. It specifies the time in seconds before 638c2ecf20Sopenharmony_ci timeout when the pretimeout interrupt is delivered. Pretimeout 648c2ecf20Sopenharmony_ci is an optional feature. 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ciWhat: /sys/class/watchdog/watchdogn/pretimeout_avaialable_governors 678c2ecf20Sopenharmony_ciDate: February 2017 688c2ecf20Sopenharmony_ciContact: Wim Van Sebroeck <wim@iguana.be> 698c2ecf20Sopenharmony_ciDescription: 708c2ecf20Sopenharmony_ci It is a read only file. It shows the pretimeout governors 718c2ecf20Sopenharmony_ci available for this watchdog. 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ciWhat: /sys/class/watchdog/watchdogn/pretimeout_governor 748c2ecf20Sopenharmony_ciDate: February 2017 758c2ecf20Sopenharmony_ciContact: Wim Van Sebroeck <wim@iguana.be> 768c2ecf20Sopenharmony_ciDescription: 778c2ecf20Sopenharmony_ci It is a read/write file. When read, the currently assigned 788c2ecf20Sopenharmony_ci pretimeout governor is returned. When written, it sets 798c2ecf20Sopenharmony_ci the pretimeout governor. 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ciWhat: /sys/class/watchdog/watchdog1/access_cs0 828c2ecf20Sopenharmony_ciDate: August 2019 838c2ecf20Sopenharmony_ciContact: Ivan Mikhaylov <i.mikhaylov@yadro.com>, 848c2ecf20Sopenharmony_ci Alexander Amelkin <a.amelkin@yadro.com> 858c2ecf20Sopenharmony_ciDescription: 868c2ecf20Sopenharmony_ci It is a read/write file. This attribute exists only if the 878c2ecf20Sopenharmony_ci system has booted from the alternate flash chip due to 888c2ecf20Sopenharmony_ci expiration of a watchdog timer of AST2400/AST2500 when 898c2ecf20Sopenharmony_ci alternate boot function was enabled with 'aspeed,alt-boot' 908c2ecf20Sopenharmony_ci devicetree option for that watchdog or with an appropriate 918c2ecf20Sopenharmony_ci h/w strapping (for WDT2 only). 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ci At alternate flash the 'access_cs0' sysfs node provides: 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ci ast2400: 968c2ecf20Sopenharmony_ci a way to get access to the primary SPI flash 978c2ecf20Sopenharmony_ci chip at CS0 after booting from the alternate 988c2ecf20Sopenharmony_ci chip at CS1. 998c2ecf20Sopenharmony_ci ast2500: 1008c2ecf20Sopenharmony_ci a way to restore the normal address mapping 1018c2ecf20Sopenharmony_ci from (CS0->CS1, CS1->CS0) to (CS0->CS0, 1028c2ecf20Sopenharmony_ci CS1->CS1). 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_ci Clearing the boot code selection and timeout counter also 1058c2ecf20Sopenharmony_ci resets to the initial state the chip select line mapping. When 1068c2ecf20Sopenharmony_ci the SoC is in normal mapping state (i.e. booted from CS0), 1078c2ecf20Sopenharmony_ci clearing those bits does nothing for both versions of the SoC. 1088c2ecf20Sopenharmony_ci For alternate boot mode (booted from CS1 due to wdt2 1098c2ecf20Sopenharmony_ci expiration) the behavior differs as described above. 1108c2ecf20Sopenharmony_ci 1118c2ecf20Sopenharmony_ci This option can be used with wdt2 (watchdog1) only. 1128c2ecf20Sopenharmony_ci 1138c2ecf20Sopenharmony_ci When read, the current status of the boot code selection is 1148c2ecf20Sopenharmony_ci shown. When written with any non-zero value, it clears 1158c2ecf20Sopenharmony_ci the boot code selection and the timeout counter, which results 1168c2ecf20Sopenharmony_ci in chipselect reset for AST2400/AST2500. 117