1*4882a593SmuzhiyunWhat: /sys/class/watchdog/watchdogn/bootstatus 2*4882a593SmuzhiyunDate: August 2015 3*4882a593SmuzhiyunContact: Wim Van Sebroeck <wim@iguana.be> 4*4882a593SmuzhiyunDescription: 5*4882a593Smuzhiyun It is a read only file. It contains status of the watchdog 6*4882a593Smuzhiyun device at boot. It is equivalent to WDIOC_GETBOOTSTATUS of 7*4882a593Smuzhiyun ioctl interface. 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunWhat: /sys/class/watchdog/watchdogn/identity 10*4882a593SmuzhiyunDate: August 2015 11*4882a593SmuzhiyunContact: Wim Van Sebroeck <wim@iguana.be> 12*4882a593SmuzhiyunDescription: 13*4882a593Smuzhiyun It is a read only file. It contains identity string of 14*4882a593Smuzhiyun watchdog device. 15*4882a593Smuzhiyun 16*4882a593SmuzhiyunWhat: /sys/class/watchdog/watchdogn/nowayout 17*4882a593SmuzhiyunDate: August 2015 18*4882a593SmuzhiyunContact: Wim Van Sebroeck <wim@iguana.be> 19*4882a593SmuzhiyunDescription: 20*4882a593Smuzhiyun It is a read/write file. While reading, it gives '1' 21*4882a593Smuzhiyun if the device has the nowayout feature set, otherwise 22*4882a593Smuzhiyun it gives '0'. Writing a '1' to the file enables the 23*4882a593Smuzhiyun nowayout feature. Once set, the nowayout feature 24*4882a593Smuzhiyun cannot be disabled, so writing a '0' either has no 25*4882a593Smuzhiyun effect (if the feature was already disabled) or 26*4882a593Smuzhiyun results in a permission error. 27*4882a593Smuzhiyun 28*4882a593SmuzhiyunWhat: /sys/class/watchdog/watchdogn/state 29*4882a593SmuzhiyunDate: August 2015 30*4882a593SmuzhiyunContact: Wim Van Sebroeck <wim@iguana.be> 31*4882a593SmuzhiyunDescription: 32*4882a593Smuzhiyun It is a read only file. It gives active/inactive status of 33*4882a593Smuzhiyun watchdog device. 34*4882a593Smuzhiyun 35*4882a593SmuzhiyunWhat: /sys/class/watchdog/watchdogn/status 36*4882a593SmuzhiyunDate: August 2015 37*4882a593SmuzhiyunContact: Wim Van Sebroeck <wim@iguana.be> 38*4882a593SmuzhiyunDescription: 39*4882a593Smuzhiyun It is a read only file. It contains watchdog device's 40*4882a593Smuzhiyun internal status bits. It is equivalent to WDIOC_GETSTATUS 41*4882a593Smuzhiyun of ioctl interface. 42*4882a593Smuzhiyun 43*4882a593SmuzhiyunWhat: /sys/class/watchdog/watchdogn/timeleft 44*4882a593SmuzhiyunDate: August 2015 45*4882a593SmuzhiyunContact: Wim Van Sebroeck <wim@iguana.be> 46*4882a593SmuzhiyunDescription: 47*4882a593Smuzhiyun It is a read only file. It contains value of time left for 48*4882a593Smuzhiyun reset generation. It is equivalent to WDIOC_GETTIMELEFT of 49*4882a593Smuzhiyun ioctl interface. 50*4882a593Smuzhiyun 51*4882a593SmuzhiyunWhat: /sys/class/watchdog/watchdogn/timeout 52*4882a593SmuzhiyunDate: August 2015 53*4882a593SmuzhiyunContact: Wim Van Sebroeck <wim@iguana.be> 54*4882a593SmuzhiyunDescription: 55*4882a593Smuzhiyun It is a read only file. It is read to know about current 56*4882a593Smuzhiyun value of timeout programmed. 57*4882a593Smuzhiyun 58*4882a593SmuzhiyunWhat: /sys/class/watchdog/watchdogn/pretimeout 59*4882a593SmuzhiyunDate: December 2016 60*4882a593SmuzhiyunContact: Wim Van Sebroeck <wim@iguana.be> 61*4882a593SmuzhiyunDescription: 62*4882a593Smuzhiyun It is a read only file. It specifies the time in seconds before 63*4882a593Smuzhiyun timeout when the pretimeout interrupt is delivered. Pretimeout 64*4882a593Smuzhiyun is an optional feature. 65*4882a593Smuzhiyun 66*4882a593SmuzhiyunWhat: /sys/class/watchdog/watchdogn/pretimeout_avaialable_governors 67*4882a593SmuzhiyunDate: February 2017 68*4882a593SmuzhiyunContact: Wim Van Sebroeck <wim@iguana.be> 69*4882a593SmuzhiyunDescription: 70*4882a593Smuzhiyun It is a read only file. It shows the pretimeout governors 71*4882a593Smuzhiyun available for this watchdog. 72*4882a593Smuzhiyun 73*4882a593SmuzhiyunWhat: /sys/class/watchdog/watchdogn/pretimeout_governor 74*4882a593SmuzhiyunDate: February 2017 75*4882a593SmuzhiyunContact: Wim Van Sebroeck <wim@iguana.be> 76*4882a593SmuzhiyunDescription: 77*4882a593Smuzhiyun It is a read/write file. When read, the currently assigned 78*4882a593Smuzhiyun pretimeout governor is returned. When written, it sets 79*4882a593Smuzhiyun the pretimeout governor. 80*4882a593Smuzhiyun 81*4882a593SmuzhiyunWhat: /sys/class/watchdog/watchdog1/access_cs0 82*4882a593SmuzhiyunDate: August 2019 83*4882a593SmuzhiyunContact: Ivan Mikhaylov <i.mikhaylov@yadro.com>, 84*4882a593Smuzhiyun Alexander Amelkin <a.amelkin@yadro.com> 85*4882a593SmuzhiyunDescription: 86*4882a593Smuzhiyun It is a read/write file. This attribute exists only if the 87*4882a593Smuzhiyun system has booted from the alternate flash chip due to 88*4882a593Smuzhiyun expiration of a watchdog timer of AST2400/AST2500 when 89*4882a593Smuzhiyun alternate boot function was enabled with 'aspeed,alt-boot' 90*4882a593Smuzhiyun devicetree option for that watchdog or with an appropriate 91*4882a593Smuzhiyun h/w strapping (for WDT2 only). 92*4882a593Smuzhiyun 93*4882a593Smuzhiyun At alternate flash the 'access_cs0' sysfs node provides: 94*4882a593Smuzhiyun 95*4882a593Smuzhiyun ast2400: 96*4882a593Smuzhiyun a way to get access to the primary SPI flash 97*4882a593Smuzhiyun chip at CS0 after booting from the alternate 98*4882a593Smuzhiyun chip at CS1. 99*4882a593Smuzhiyun ast2500: 100*4882a593Smuzhiyun a way to restore the normal address mapping 101*4882a593Smuzhiyun from (CS0->CS1, CS1->CS0) to (CS0->CS0, 102*4882a593Smuzhiyun CS1->CS1). 103*4882a593Smuzhiyun 104*4882a593Smuzhiyun Clearing the boot code selection and timeout counter also 105*4882a593Smuzhiyun resets to the initial state the chip select line mapping. When 106*4882a593Smuzhiyun the SoC is in normal mapping state (i.e. booted from CS0), 107*4882a593Smuzhiyun clearing those bits does nothing for both versions of the SoC. 108*4882a593Smuzhiyun For alternate boot mode (booted from CS1 due to wdt2 109*4882a593Smuzhiyun expiration) the behavior differs as described above. 110*4882a593Smuzhiyun 111*4882a593Smuzhiyun This option can be used with wdt2 (watchdog1) only. 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun When read, the current status of the boot code selection is 114*4882a593Smuzhiyun shown. When written with any non-zero value, it clears 115*4882a593Smuzhiyun the boot code selection and the timeout counter, which results 116*4882a593Smuzhiyun in chipselect reset for AST2400/AST2500. 117