aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/ABI/stable/sysfs-driver-firmware-zynqmp
blob: c3fec3c835af362061d0211e4e31b9abd7e096bc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
What:		/sys/devices/platform/firmware\:zynqmp-firmware/ggs*
Date:		March 2020
KernelVersion:	5.6
Contact:	"Jolly Shah" <jollys@xilinx.com>
Description:
		Read/Write PMU global general storage register value,
		GLOBAL_GEN_STORAGE{0:3}.
		Global general storage register that can be used
		by system to pass information between masters.

		The register is reset during system or power-on
		resets. Three registers are used by the FSBL and
		other Xilinx software products: GLOBAL_GEN_STORAGE{4:6}.

		Usage::

		    # cat /sys/devices/platform/firmware\:zynqmp-firmware/ggs0
		    # echo <value> > /sys/devices/platform/firmware\:zynqmp-firmware/ggs0

		Example::

		    # cat /sys/devices/platform/firmware\:zynqmp-firmware/ggs0
		    # echo 0x1234ABCD > /sys/devices/platform/firmware\:zynqmp-firmware/ggs0

Users:		Xilinx

What:		/sys/devices/platform/firmware\:zynqmp-firmware/pggs*
Date:		March 2020
KernelVersion:	5.6
Contact:	"Jolly Shah" <jollys@xilinx.com>
Description:
		Read/Write PMU persistent global general storage register
		value, PERS_GLOB_GEN_STORAGE{0:3}.
		Persistent global general storage register that
		can be used by system to pass information between
		masters.

		This register is only reset by the power-on reset
		and maintains its value through a system reset.
		Four registers are used by the FSBL and other Xilinx
		software products: PERS_GLOB_GEN_STORAGE{4:7}.
		Register is reset only by a POR reset.

		Usage::

		    # cat /sys/devices/platform/firmware\:zynqmp-firmware/pggs0
		    # echo <value> > /sys/devices/platform/firmware\:zynqmp-firmware/pggs0

		Example::

		    # cat /sys/devices/platform/firmware\:zynqmp-firmware/pggs0
		    # echo 0x1234ABCD > /sys/devices/platform/firmware\:zynqmp-firmware/pggs0

Users:		Xilinx

What:		/sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
Date:		March 2020
KernelVersion:	5.6
Contact:	"Jolly Shah" <jollys@xilinx.com>
Description:
		This sysfs interface allows to set the shutdown scope for the
		next shutdown request. When the next shutdown is performed, the
		platform specific portion of PSCI-system_off can use the chosen
		shutdown scope.

		Following are available shutdown scopes(subtypes):

		subsystem:
				Only the APU along with all of its peripherals
				not used by other processing units will be
				shut down. This may result in the FPD power
				domain being shut down provided that no other
				processing unit uses FPD peripherals or DRAM.
		ps_only:
				The complete PS will be shut down, including the
				RPU, PMU, etc.  Only the PL domain (FPGA)
				remains untouched.
		system:
				The complete system/device is shut down.

		Usage::

		    # cat /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
		    # echo <scope> > /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope

		Example::

		    # cat /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
		    # echo "subsystem" > /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope

Users:		Xilinx

What:		/sys/devices/platform/firmware\:zynqmp-firmware/health_status
Date:		March 2020
KernelVersion:	5.6
Contact:	"Jolly Shah" <jollys@xilinx.com>
Description:
		This sysfs interface allows to set the health status. If PMUFW
		is compiled with CHECK_HEALTHY_BOOT, it will check the healthy
		bit on FPD WDT expiration. If healthy bit is set by a user
		application running in Linux, PMUFW will do APU only restart. If
		healthy bit is not set during FPD WDT expiration, PMUFW will do
		system restart.

		Usage:

		Set healthy bit::

		    # echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/health_status

		Unset healthy bit::

		    # echo 0 > /sys/devices/platform/firmware\:zynqmp-firmware/health_status

Users:		Xilinx

What:		/sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
Date:		Feb 2022
KernelVersion:	5.18
Contact:	"Ronak Jain" <ronak.jain@xilinx.com>
Description:
		This sysfs interface allows user to configure features at
		runtime. The user can enable or disable features running at
		firmware as well as the user can configure the parameters of
		the features at runtime. The supported features are over
		temperature and external watchdog. Here, the external watchdog
		is completely different than the /dev/watchdog as the external
		watchdog is running on the firmware and it is used to monitor
		the health of firmware not APU(Linux). Also, the external
		watchdog is interfaced outside of the zynqmp soc.

		The supported config ids are for the feature configuration is,
		1. PM_FEATURE_OVERTEMP_STATUS = 1, the user can enable or
		disable the over temperature feature.
		2. PM_FEATURE_OVERTEMP_VALUE = 2, the user can configure the
		over temperature limit in Degree Celsius.
		3. PM_FEATURE_EXTWDT_STATUS = 3, the user can enable or disable
		the external watchdog feature.
		4. PM_FEATURE_EXTWDT_VALUE = 4, the user can configure the
		external watchdog feature.

		Usage:

		Select over temperature config ID to enable/disable feature
		# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id

		Check over temperature config ID is selected or not
		# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
		The expected result is 1.

		Select over temperature config ID to configure OT limit
		# echo 2 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id

		Check over temperature config ID is selected or not
		# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
		The expected result is 2.

		Select external watchdog config ID to enable/disable feature
		# echo 3 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id

		Check external watchdog config ID is selected or not
		# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
		The expected result is 3.

		Select external watchdog config ID to configure time interval
		# echo 4 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id

		Check external watchdog config ID is selected or not
		# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
		The expected result is 4.

Users:		Xilinx

What:		/sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
Date:		Feb 2022
KernelVersion:	5.18
Contact:	"Ronak Jain" <ronak.jain@xilinx.com>
Description:
		This sysfs interface allows to configure features at runtime.
		The user can enable or disable features running at firmware.
		Also, the user can configure the parameters of the features
		at runtime. The supported features are over temperature and
		external watchdog. Here, the external watchdog is completely
		different than the /dev/watchdog as the external watchdog is
		running on the firmware and it is used to monitor the health
		of firmware not APU(Linux). Also, the external watchdog is
		interfaced outside of the zynqmp soc.

		By default the features are disabled in the firmware. The user
		can enable features by querying appropriate config id of the
		features.

		The default limit for the over temperature is 90 Degree Celsius.
		The default timer interval for the external watchdog is 570ms.

		The supported config ids are for the feature configuration is,
		1. PM_FEATURE_OVERTEMP_STATUS = 1, the user can enable or
		disable the over temperature feature.
		2. PM_FEATURE_OVERTEMP_VALUE = 2, the user can configure the
		over temperature limit in Degree Celsius.
		3. PM_FEATURE_EXTWDT_STATUS = 3, the user can enable or disable
		the external watchdog feature.
		4. PM_FEATURE_EXTWDT_VALUE = 4, the user can configure the
		external watchdog feature.

		Usage:

		Enable over temperature feature
		# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
		# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value

		Check whether the over temperature feature is enabled or not
		# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
		The expected result is 1.

		Disable over temperature feature
		# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
		# echo 0 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value

		Check whether the over temperature feature is disabled or not
		# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
		The expected result is 0.

		Configure over temperature limit to 50 Degree Celsius
		# echo 2 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
		# echo 50 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value

		Check whether the over temperature limit is configured or not
		# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
		The expected result is 50.

		Enable external watchdog feature
		# echo 3 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
		# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value

		Check whether the external watchdog feature is enabled or not
		# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
		The expected result is 1.

		Disable external watchdog feature
		# echo 3 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
		# echo 0 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value

		Check whether the external watchdog feature is disabled or not
		# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
		The expected result is 0.

		Configure external watchdog timer interval to 500ms
		# echo 4 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
		# echo 500 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value

		Check whether the external watchdog timer interval is configured or not
		# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
		The expected result is 500.

Users:		Xilinx