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