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 9*b852e7a4SThomas WeißschuhWhat: /sys/class/watchdog/watchdogn/fw_version 10*b852e7a4SThomas WeißschuhDate: April 2023 11*b852e7a4SThomas WeißschuhContact: Thomas Weißschuh 12*b852e7a4SThomas WeißschuhDescription: 13*b852e7a4SThomas Weißschuh It is a read only file. It contains firmware version of 14*b852e7a4SThomas Weißschuh watchdog device. 15*b852e7a4SThomas Weißschuh 1633b71126SPratyush AnandWhat: /sys/class/watchdog/watchdogn/identity 1733b71126SPratyush AnandDate: August 2015 1833b71126SPratyush AnandContact: Wim Van Sebroeck <wim@iguana.be> 1933b71126SPratyush AnandDescription: 2033b71126SPratyush Anand It is a read only file. It contains identity string of 2133b71126SPratyush Anand watchdog device. 2233b71126SPratyush Anand 2333b71126SPratyush AnandWhat: /sys/class/watchdog/watchdogn/nowayout 2433b71126SPratyush AnandDate: August 2015 2533b71126SPratyush AnandContact: Wim Van Sebroeck <wim@iguana.be> 2633b71126SPratyush AnandDescription: 27bc44fa73SRasmus Villemoes It is a read/write file. While reading, it gives '1' 28bc44fa73SRasmus Villemoes if the device has the nowayout feature set, otherwise 29bc44fa73SRasmus Villemoes it gives '0'. Writing a '1' to the file enables the 30bc44fa73SRasmus Villemoes nowayout feature. Once set, the nowayout feature 31bc44fa73SRasmus Villemoes cannot be disabled, so writing a '0' either has no 32bc44fa73SRasmus Villemoes effect (if the feature was already disabled) or 33bc44fa73SRasmus Villemoes results in a permission error. 3433b71126SPratyush Anand 3533b71126SPratyush AnandWhat: /sys/class/watchdog/watchdogn/state 3633b71126SPratyush AnandDate: August 2015 3733b71126SPratyush AnandContact: Wim Van Sebroeck <wim@iguana.be> 3833b71126SPratyush AnandDescription: 3933b71126SPratyush Anand It is a read only file. It gives active/inactive status of 4033b71126SPratyush Anand watchdog device. 4133b71126SPratyush Anand 4233b71126SPratyush AnandWhat: /sys/class/watchdog/watchdogn/status 4333b71126SPratyush AnandDate: August 2015 4433b71126SPratyush AnandContact: Wim Van Sebroeck <wim@iguana.be> 4533b71126SPratyush AnandDescription: 4633b71126SPratyush Anand It is a read only file. It contains watchdog device's 4733b71126SPratyush Anand internal status bits. It is equivalent to WDIOC_GETSTATUS 4833b71126SPratyush Anand of ioctl interface. 4933b71126SPratyush Anand 5033b71126SPratyush AnandWhat: /sys/class/watchdog/watchdogn/timeleft 5133b71126SPratyush AnandDate: August 2015 5233b71126SPratyush AnandContact: Wim Van Sebroeck <wim@iguana.be> 5333b71126SPratyush AnandDescription: 5433b71126SPratyush Anand It is a read only file. It contains value of time left for 5533b71126SPratyush Anand reset generation. It is equivalent to WDIOC_GETTIMELEFT of 5633b71126SPratyush Anand ioctl interface. 5733b71126SPratyush Anand 5833b71126SPratyush AnandWhat: /sys/class/watchdog/watchdogn/timeout 5933b71126SPratyush AnandDate: August 2015 6033b71126SPratyush AnandContact: Wim Van Sebroeck <wim@iguana.be> 6133b71126SPratyush AnandDescription: 6233b71126SPratyush Anand It is a read only file. It is read to know about current 6333b71126SPratyush Anand value of timeout programmed. 64d02d104eSJerry Hoemann 65d02d104eSJerry HoemannWhat: /sys/class/watchdog/watchdogn/pretimeout 66d02d104eSJerry HoemannDate: December 2016 67d02d104eSJerry HoemannContact: Wim Van Sebroeck <wim@iguana.be> 68d02d104eSJerry HoemannDescription: 69d02d104eSJerry Hoemann It is a read only file. It specifies the time in seconds before 70d02d104eSJerry Hoemann timeout when the pretimeout interrupt is delivered. Pretimeout 71d02d104eSJerry Hoemann is an optional feature. 72d02d104eSJerry Hoemann 73d02d104eSJerry HoemannWhat: /sys/class/watchdog/watchdogn/pretimeout_avaialable_governors 74d02d104eSJerry HoemannDate: February 2017 75d02d104eSJerry HoemannContact: Wim Van Sebroeck <wim@iguana.be> 76d02d104eSJerry HoemannDescription: 77d02d104eSJerry Hoemann It is a read only file. It shows the pretimeout governors 78d02d104eSJerry Hoemann available for this watchdog. 79d02d104eSJerry Hoemann 80d02d104eSJerry HoemannWhat: /sys/class/watchdog/watchdogn/pretimeout_governor 81d02d104eSJerry HoemannDate: February 2017 82d02d104eSJerry HoemannContact: Wim Van Sebroeck <wim@iguana.be> 83d02d104eSJerry HoemannDescription: 84d02d104eSJerry Hoemann It is a read/write file. When read, the currently assigned 85d02d104eSJerry Hoemann pretimeout governor is returned. When written, it sets 86d02d104eSJerry Hoemann the pretimeout governor. 87ebdc0f58SIvan Mikhaylov 88ebdc0f58SIvan MikhaylovWhat: /sys/class/watchdog/watchdog1/access_cs0 89ebdc0f58SIvan MikhaylovDate: August 2019 90ebdc0f58SIvan MikhaylovContact: Ivan Mikhaylov <i.mikhaylov@yadro.com>, 91ebdc0f58SIvan Mikhaylov Alexander Amelkin <a.amelkin@yadro.com> 92ebdc0f58SIvan MikhaylovDescription: 93ebdc0f58SIvan Mikhaylov It is a read/write file. This attribute exists only if the 94ebdc0f58SIvan Mikhaylov system has booted from the alternate flash chip due to 95ebdc0f58SIvan Mikhaylov expiration of a watchdog timer of AST2400/AST2500 when 96ebdc0f58SIvan Mikhaylov alternate boot function was enabled with 'aspeed,alt-boot' 97ebdc0f58SIvan Mikhaylov devicetree option for that watchdog or with an appropriate 98ebdc0f58SIvan Mikhaylov h/w strapping (for WDT2 only). 99ebdc0f58SIvan Mikhaylov 100ebdc0f58SIvan Mikhaylov At alternate flash the 'access_cs0' sysfs node provides: 10154a19b4dSMauro Carvalho Chehab 10254a19b4dSMauro Carvalho Chehab ast2400: 10354a19b4dSMauro Carvalho Chehab a way to get access to the primary SPI flash 104ebdc0f58SIvan Mikhaylov chip at CS0 after booting from the alternate 105ebdc0f58SIvan Mikhaylov chip at CS1. 10654a19b4dSMauro Carvalho Chehab ast2500: 10754a19b4dSMauro Carvalho Chehab a way to restore the normal address mapping 108ebdc0f58SIvan Mikhaylov from (CS0->CS1, CS1->CS0) to (CS0->CS0, 109ebdc0f58SIvan Mikhaylov CS1->CS1). 110ebdc0f58SIvan Mikhaylov 111ebdc0f58SIvan Mikhaylov Clearing the boot code selection and timeout counter also 112ebdc0f58SIvan Mikhaylov resets to the initial state the chip select line mapping. When 113ebdc0f58SIvan Mikhaylov the SoC is in normal mapping state (i.e. booted from CS0), 114ebdc0f58SIvan Mikhaylov clearing those bits does nothing for both versions of the SoC. 115ebdc0f58SIvan Mikhaylov For alternate boot mode (booted from CS1 due to wdt2 116ebdc0f58SIvan Mikhaylov expiration) the behavior differs as described above. 117ebdc0f58SIvan Mikhaylov 118ebdc0f58SIvan Mikhaylov This option can be used with wdt2 (watchdog1) only. 119ebdc0f58SIvan Mikhaylov 120ebdc0f58SIvan Mikhaylov When read, the current status of the boot code selection is 121ebdc0f58SIvan Mikhaylov shown. When written with any non-zero value, it clears 122ebdc0f58SIvan Mikhaylov the boot code selection and the timeout counter, which results 123ebdc0f58SIvan Mikhaylov in chipselect reset for AST2400/AST2500. 124