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:
20bc44fa73SRasmus Villemoes		It is a read/write file. While reading, it gives '1'
21bc44fa73SRasmus Villemoes		if the device has the nowayout feature set, otherwise
22bc44fa73SRasmus Villemoes		it gives '0'. Writing a '1' to the file enables the
23bc44fa73SRasmus Villemoes		nowayout feature. Once set, the nowayout feature
24bc44fa73SRasmus Villemoes		cannot be disabled, so writing a '0' either has no
25bc44fa73SRasmus Villemoes		effect (if the feature was already disabled) or
26bc44fa73SRasmus Villemoes		results in a permission error.
2733b71126SPratyush Anand
2833b71126SPratyush AnandWhat:		/sys/class/watchdog/watchdogn/state
2933b71126SPratyush AnandDate:		August 2015
3033b71126SPratyush AnandContact:	Wim Van Sebroeck <wim@iguana.be>
3133b71126SPratyush AnandDescription:
3233b71126SPratyush Anand		It is a read only file. It gives active/inactive status of
3333b71126SPratyush Anand		watchdog device.
3433b71126SPratyush Anand
3533b71126SPratyush AnandWhat:		/sys/class/watchdog/watchdogn/status
3633b71126SPratyush AnandDate:		August 2015
3733b71126SPratyush AnandContact:	Wim Van Sebroeck <wim@iguana.be>
3833b71126SPratyush AnandDescription:
3933b71126SPratyush Anand		It is a read only file. It contains watchdog device's
4033b71126SPratyush Anand		internal status bits. It is equivalent to WDIOC_GETSTATUS
4133b71126SPratyush Anand		of ioctl interface.
4233b71126SPratyush Anand
4333b71126SPratyush AnandWhat:		/sys/class/watchdog/watchdogn/timeleft
4433b71126SPratyush AnandDate:		August 2015
4533b71126SPratyush AnandContact:	Wim Van Sebroeck <wim@iguana.be>
4633b71126SPratyush AnandDescription:
4733b71126SPratyush Anand		It is a read only file. It contains value of time left for
4833b71126SPratyush Anand		reset generation. It is equivalent to WDIOC_GETTIMELEFT of
4933b71126SPratyush Anand		ioctl interface.
5033b71126SPratyush Anand
5133b71126SPratyush AnandWhat:		/sys/class/watchdog/watchdogn/timeout
5233b71126SPratyush AnandDate:		August 2015
5333b71126SPratyush AnandContact:	Wim Van Sebroeck <wim@iguana.be>
5433b71126SPratyush AnandDescription:
5533b71126SPratyush Anand		It is a read only file. It is read to know about current
5633b71126SPratyush Anand		value of timeout programmed.
57d02d104eSJerry Hoemann
58d02d104eSJerry HoemannWhat:		/sys/class/watchdog/watchdogn/pretimeout
59d02d104eSJerry HoemannDate:		December 2016
60d02d104eSJerry HoemannContact:	Wim Van Sebroeck <wim@iguana.be>
61d02d104eSJerry HoemannDescription:
62d02d104eSJerry Hoemann		It is a read only file. It specifies the time in seconds before
63d02d104eSJerry Hoemann		timeout when the pretimeout interrupt is delivered.  Pretimeout
64d02d104eSJerry Hoemann		is an optional feature.
65d02d104eSJerry Hoemann
66d02d104eSJerry HoemannWhat:		/sys/class/watchdog/watchdogn/pretimeout_avaialable_governors
67d02d104eSJerry HoemannDate:		February 2017
68d02d104eSJerry HoemannContact:	Wim Van Sebroeck <wim@iguana.be>
69d02d104eSJerry HoemannDescription:
70d02d104eSJerry Hoemann		It is a read only file. It shows the pretimeout governors
71d02d104eSJerry Hoemann		available for this watchdog.
72d02d104eSJerry Hoemann
73d02d104eSJerry HoemannWhat:		/sys/class/watchdog/watchdogn/pretimeout_governor
74d02d104eSJerry HoemannDate:		February 2017
75d02d104eSJerry HoemannContact:	Wim Van Sebroeck <wim@iguana.be>
76d02d104eSJerry HoemannDescription:
77d02d104eSJerry Hoemann		It is a read/write file. When read, the currently assigned
78d02d104eSJerry Hoemann		pretimeout governor is returned.  When written, it sets
79d02d104eSJerry Hoemann		the pretimeout governor.
80ebdc0f58SIvan Mikhaylov
81ebdc0f58SIvan MikhaylovWhat:		/sys/class/watchdog/watchdog1/access_cs0
82ebdc0f58SIvan MikhaylovDate:		August 2019
83ebdc0f58SIvan MikhaylovContact:	Ivan Mikhaylov <i.mikhaylov@yadro.com>,
84ebdc0f58SIvan Mikhaylov		Alexander Amelkin <a.amelkin@yadro.com>
85ebdc0f58SIvan MikhaylovDescription:
86ebdc0f58SIvan Mikhaylov		It is a read/write file. This attribute exists only if the
87ebdc0f58SIvan Mikhaylov		system has booted from the alternate flash chip due to
88ebdc0f58SIvan Mikhaylov		expiration of a watchdog timer of AST2400/AST2500 when
89ebdc0f58SIvan Mikhaylov		alternate boot function was enabled with 'aspeed,alt-boot'
90ebdc0f58SIvan Mikhaylov		devicetree option for that watchdog or with an appropriate
91ebdc0f58SIvan Mikhaylov		h/w strapping (for WDT2 only).
92ebdc0f58SIvan Mikhaylov
93ebdc0f58SIvan Mikhaylov		At alternate flash the 'access_cs0' sysfs node provides:
9454a19b4dSMauro Carvalho Chehab
9554a19b4dSMauro Carvalho Chehab			ast2400:
9654a19b4dSMauro Carvalho Chehab				a way to get access to the primary SPI flash
97ebdc0f58SIvan Mikhaylov				chip at CS0 after booting from the alternate
98ebdc0f58SIvan Mikhaylov				chip at CS1.
9954a19b4dSMauro Carvalho Chehab			ast2500:
10054a19b4dSMauro Carvalho Chehab				a way to restore the normal address mapping
101ebdc0f58SIvan Mikhaylov				from (CS0->CS1, CS1->CS0) to (CS0->CS0,
102ebdc0f58SIvan Mikhaylov				CS1->CS1).
103ebdc0f58SIvan Mikhaylov
104ebdc0f58SIvan Mikhaylov		Clearing the boot code selection and timeout counter also
105ebdc0f58SIvan Mikhaylov		resets to the initial state the chip select line mapping. When
106ebdc0f58SIvan Mikhaylov		the SoC is in normal mapping state (i.e. booted from CS0),
107ebdc0f58SIvan Mikhaylov		clearing those bits does nothing for both versions of the SoC.
108ebdc0f58SIvan Mikhaylov		For alternate boot mode (booted from CS1 due to wdt2
109ebdc0f58SIvan Mikhaylov		expiration) the behavior differs as described above.
110ebdc0f58SIvan Mikhaylov
111ebdc0f58SIvan Mikhaylov		This option can be used with wdt2 (watchdog1) only.
112ebdc0f58SIvan Mikhaylov
113ebdc0f58SIvan Mikhaylov		When read, the current status of the boot code selection is
114ebdc0f58SIvan Mikhaylov		shown. When written with any non-zero value, it clears
115ebdc0f58SIvan Mikhaylov		the boot code selection and the timeout counter, which results
116ebdc0f58SIvan Mikhaylov		in chipselect reset for AST2400/AST2500.
117