133b71126SPratyush AnandWhat: /sys/class/watchdog/watchdogn/bootstatus 233b71126SPratyush AnandDate: August 2015 333b71126SPratyush AnandContact: Wim Van Sebroeck <wim@iguana.be> 433b71126SPratyush AnandDescription: 533b71126SPratyush Anand It is a read only file. It contains status of the watchdog 633b71126SPratyush Anand device at boot. It is equivalent to WDIOC_GETBOOTSTATUS of 733b71126SPratyush Anand ioctl interface. 833b71126SPratyush Anand 933b71126SPratyush AnandWhat: /sys/class/watchdog/watchdogn/identity 1033b71126SPratyush AnandDate: August 2015 1133b71126SPratyush AnandContact: Wim Van Sebroeck <wim@iguana.be> 1233b71126SPratyush AnandDescription: 1333b71126SPratyush Anand It is a read only file. It contains identity string of 1433b71126SPratyush Anand watchdog device. 1533b71126SPratyush Anand 1633b71126SPratyush AnandWhat: /sys/class/watchdog/watchdogn/nowayout 1733b71126SPratyush AnandDate: August 2015 1833b71126SPratyush AnandContact: Wim Van Sebroeck <wim@iguana.be> 1933b71126SPratyush AnandDescription: 2033b71126SPratyush Anand It is a read only file. While reading, it gives '1' if that 2133b71126SPratyush Anand device supports nowayout feature else, it gives '0'. 2233b71126SPratyush Anand 2333b71126SPratyush AnandWhat: /sys/class/watchdog/watchdogn/state 2433b71126SPratyush AnandDate: August 2015 2533b71126SPratyush AnandContact: Wim Van Sebroeck <wim@iguana.be> 2633b71126SPratyush AnandDescription: 2733b71126SPratyush Anand It is a read only file. It gives active/inactive status of 2833b71126SPratyush Anand watchdog device. 2933b71126SPratyush Anand 3033b71126SPratyush AnandWhat: /sys/class/watchdog/watchdogn/status 3133b71126SPratyush AnandDate: August 2015 3233b71126SPratyush AnandContact: Wim Van Sebroeck <wim@iguana.be> 3333b71126SPratyush AnandDescription: 3433b71126SPratyush Anand It is a read only file. It contains watchdog device's 3533b71126SPratyush Anand internal status bits. It is equivalent to WDIOC_GETSTATUS 3633b71126SPratyush Anand of ioctl interface. 3733b71126SPratyush Anand 3833b71126SPratyush AnandWhat: /sys/class/watchdog/watchdogn/timeleft 3933b71126SPratyush AnandDate: August 2015 4033b71126SPratyush AnandContact: Wim Van Sebroeck <wim@iguana.be> 4133b71126SPratyush AnandDescription: 4233b71126SPratyush Anand It is a read only file. It contains value of time left for 4333b71126SPratyush Anand reset generation. It is equivalent to WDIOC_GETTIMELEFT of 4433b71126SPratyush Anand ioctl interface. 4533b71126SPratyush Anand 4633b71126SPratyush AnandWhat: /sys/class/watchdog/watchdogn/timeout 4733b71126SPratyush AnandDate: August 2015 4833b71126SPratyush AnandContact: Wim Van Sebroeck <wim@iguana.be> 4933b71126SPratyush AnandDescription: 5033b71126SPratyush Anand It is a read only file. It is read to know about current 5133b71126SPratyush Anand value of timeout programmed. 52d02d104eSJerry Hoemann 53d02d104eSJerry HoemannWhat: /sys/class/watchdog/watchdogn/pretimeout 54d02d104eSJerry HoemannDate: December 2016 55d02d104eSJerry HoemannContact: Wim Van Sebroeck <wim@iguana.be> 56d02d104eSJerry HoemannDescription: 57d02d104eSJerry Hoemann It is a read only file. It specifies the time in seconds before 58d02d104eSJerry Hoemann timeout when the pretimeout interrupt is delivered. Pretimeout 59d02d104eSJerry Hoemann is an optional feature. 60d02d104eSJerry Hoemann 61d02d104eSJerry HoemannWhat: /sys/class/watchdog/watchdogn/pretimeout_avaialable_governors 62d02d104eSJerry HoemannDate: February 2017 63d02d104eSJerry HoemannContact: Wim Van Sebroeck <wim@iguana.be> 64d02d104eSJerry HoemannDescription: 65d02d104eSJerry Hoemann It is a read only file. It shows the pretimeout governors 66d02d104eSJerry Hoemann available for this watchdog. 67d02d104eSJerry Hoemann 68d02d104eSJerry HoemannWhat: /sys/class/watchdog/watchdogn/pretimeout_governor 69d02d104eSJerry HoemannDate: February 2017 70d02d104eSJerry HoemannContact: Wim Van Sebroeck <wim@iguana.be> 71d02d104eSJerry HoemannDescription: 72d02d104eSJerry Hoemann It is a read/write file. When read, the currently assigned 73d02d104eSJerry Hoemann pretimeout governor is returned. When written, it sets 74d02d104eSJerry Hoemann the pretimeout governor. 75ebdc0f58SIvan Mikhaylov 76ebdc0f58SIvan MikhaylovWhat: /sys/class/watchdog/watchdog1/access_cs0 77ebdc0f58SIvan MikhaylovDate: August 2019 78ebdc0f58SIvan MikhaylovContact: Ivan Mikhaylov <i.mikhaylov@yadro.com>, 79ebdc0f58SIvan Mikhaylov Alexander Amelkin <a.amelkin@yadro.com> 80ebdc0f58SIvan MikhaylovDescription: 81ebdc0f58SIvan Mikhaylov It is a read/write file. This attribute exists only if the 82ebdc0f58SIvan Mikhaylov system has booted from the alternate flash chip due to 83ebdc0f58SIvan Mikhaylov expiration of a watchdog timer of AST2400/AST2500 when 84ebdc0f58SIvan Mikhaylov alternate boot function was enabled with 'aspeed,alt-boot' 85ebdc0f58SIvan Mikhaylov devicetree option for that watchdog or with an appropriate 86ebdc0f58SIvan Mikhaylov h/w strapping (for WDT2 only). 87ebdc0f58SIvan Mikhaylov 88ebdc0f58SIvan Mikhaylov At alternate flash the 'access_cs0' sysfs node provides: 89ebdc0f58SIvan Mikhaylov ast2400: a way to get access to the primary SPI flash 90ebdc0f58SIvan Mikhaylov chip at CS0 after booting from the alternate 91ebdc0f58SIvan Mikhaylov chip at CS1. 92ebdc0f58SIvan Mikhaylov ast2500: a way to restore the normal address mapping 93ebdc0f58SIvan Mikhaylov from (CS0->CS1, CS1->CS0) to (CS0->CS0, 94ebdc0f58SIvan Mikhaylov CS1->CS1). 95ebdc0f58SIvan Mikhaylov 96ebdc0f58SIvan Mikhaylov Clearing the boot code selection and timeout counter also 97ebdc0f58SIvan Mikhaylov resets to the initial state the chip select line mapping. When 98ebdc0f58SIvan Mikhaylov the SoC is in normal mapping state (i.e. booted from CS0), 99ebdc0f58SIvan Mikhaylov clearing those bits does nothing for both versions of the SoC. 100ebdc0f58SIvan Mikhaylov For alternate boot mode (booted from CS1 due to wdt2 101ebdc0f58SIvan Mikhaylov expiration) the behavior differs as described above. 102ebdc0f58SIvan Mikhaylov 103ebdc0f58SIvan Mikhaylov This option can be used with wdt2 (watchdog1) only. 104ebdc0f58SIvan Mikhaylov 105ebdc0f58SIvan Mikhaylov When read, the current status of the boot code selection is 106ebdc0f58SIvan Mikhaylov shown. When written with any non-zero value, it clears 107ebdc0f58SIvan Mikhaylov the boot code selection and the timeout counter, which results 108ebdc0f58SIvan Mikhaylov in chipselect reset for AST2400/AST2500. 109