162306a36Sopenharmony_ciWhat:		/sys/devices/platform/firmware\:zynqmp-firmware/ggs*
262306a36Sopenharmony_ciDate:		March 2020
362306a36Sopenharmony_ciKernelVersion:	5.6
462306a36Sopenharmony_ciContact:	"Jolly Shah" <jollys@xilinx.com>
562306a36Sopenharmony_ciDescription:
662306a36Sopenharmony_ci		Read/Write PMU global general storage register value,
762306a36Sopenharmony_ci		GLOBAL_GEN_STORAGE{0:3}.
862306a36Sopenharmony_ci		Global general storage register that can be used
962306a36Sopenharmony_ci		by system to pass information between masters.
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci		The register is reset during system or power-on
1262306a36Sopenharmony_ci		resets. Three registers are used by the FSBL and
1362306a36Sopenharmony_ci		other Xilinx software products: GLOBAL_GEN_STORAGE{4:6}.
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci		Usage::
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci		    # cat /sys/devices/platform/firmware\:zynqmp-firmware/ggs0
1862306a36Sopenharmony_ci		    # echo <value> > /sys/devices/platform/firmware\:zynqmp-firmware/ggs0
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci		Example::
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ci		    # cat /sys/devices/platform/firmware\:zynqmp-firmware/ggs0
2362306a36Sopenharmony_ci		    # echo 0x1234ABCD > /sys/devices/platform/firmware\:zynqmp-firmware/ggs0
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ciUsers:		Xilinx
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_ciWhat:		/sys/devices/platform/firmware\:zynqmp-firmware/pggs*
2862306a36Sopenharmony_ciDate:		March 2020
2962306a36Sopenharmony_ciKernelVersion:	5.6
3062306a36Sopenharmony_ciContact:	"Jolly Shah" <jollys@xilinx.com>
3162306a36Sopenharmony_ciDescription:
3262306a36Sopenharmony_ci		Read/Write PMU persistent global general storage register
3362306a36Sopenharmony_ci		value, PERS_GLOB_GEN_STORAGE{0:3}.
3462306a36Sopenharmony_ci		Persistent global general storage register that
3562306a36Sopenharmony_ci		can be used by system to pass information between
3662306a36Sopenharmony_ci		masters.
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ci		This register is only reset by the power-on reset
3962306a36Sopenharmony_ci		and maintains its value through a system reset.
4062306a36Sopenharmony_ci		Four registers are used by the FSBL and other Xilinx
4162306a36Sopenharmony_ci		software products: PERS_GLOB_GEN_STORAGE{4:7}.
4262306a36Sopenharmony_ci		Register is reset only by a POR reset.
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ci		Usage::
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ci		    # cat /sys/devices/platform/firmware\:zynqmp-firmware/pggs0
4762306a36Sopenharmony_ci		    # echo <value> > /sys/devices/platform/firmware\:zynqmp-firmware/pggs0
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ci		Example::
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ci		    # cat /sys/devices/platform/firmware\:zynqmp-firmware/pggs0
5262306a36Sopenharmony_ci		    # echo 0x1234ABCD > /sys/devices/platform/firmware\:zynqmp-firmware/pggs0
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_ciUsers:		Xilinx
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ciWhat:		/sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
5762306a36Sopenharmony_ciDate:		March 2020
5862306a36Sopenharmony_ciKernelVersion:	5.6
5962306a36Sopenharmony_ciContact:	"Jolly Shah" <jollys@xilinx.com>
6062306a36Sopenharmony_ciDescription:
6162306a36Sopenharmony_ci		This sysfs interface allows to set the shutdown scope for the
6262306a36Sopenharmony_ci		next shutdown request. When the next shutdown is performed, the
6362306a36Sopenharmony_ci		platform specific portion of PSCI-system_off can use the chosen
6462306a36Sopenharmony_ci		shutdown scope.
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_ci		Following are available shutdown scopes(subtypes):
6762306a36Sopenharmony_ci
6862306a36Sopenharmony_ci		subsystem:
6962306a36Sopenharmony_ci				Only the APU along with all of its peripherals
7062306a36Sopenharmony_ci				not used by other processing units will be
7162306a36Sopenharmony_ci				shut down. This may result in the FPD power
7262306a36Sopenharmony_ci				domain being shut down provided that no other
7362306a36Sopenharmony_ci				processing unit uses FPD peripherals or DRAM.
7462306a36Sopenharmony_ci		ps_only:
7562306a36Sopenharmony_ci				The complete PS will be shut down, including the
7662306a36Sopenharmony_ci				RPU, PMU, etc.  Only the PL domain (FPGA)
7762306a36Sopenharmony_ci				remains untouched.
7862306a36Sopenharmony_ci		system:
7962306a36Sopenharmony_ci				The complete system/device is shut down.
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ci		Usage::
8262306a36Sopenharmony_ci
8362306a36Sopenharmony_ci		    # cat /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
8462306a36Sopenharmony_ci		    # echo <scope> > /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
8562306a36Sopenharmony_ci
8662306a36Sopenharmony_ci		Example::
8762306a36Sopenharmony_ci
8862306a36Sopenharmony_ci		    # cat /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
8962306a36Sopenharmony_ci		    # echo "subsystem" > /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ciUsers:		Xilinx
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ciWhat:		/sys/devices/platform/firmware\:zynqmp-firmware/health_status
9462306a36Sopenharmony_ciDate:		March 2020
9562306a36Sopenharmony_ciKernelVersion:	5.6
9662306a36Sopenharmony_ciContact:	"Jolly Shah" <jollys@xilinx.com>
9762306a36Sopenharmony_ciDescription:
9862306a36Sopenharmony_ci		This sysfs interface allows to set the health status. If PMUFW
9962306a36Sopenharmony_ci		is compiled with CHECK_HEALTHY_BOOT, it will check the healthy
10062306a36Sopenharmony_ci		bit on FPD WDT expiration. If healthy bit is set by a user
10162306a36Sopenharmony_ci		application running in Linux, PMUFW will do APU only restart. If
10262306a36Sopenharmony_ci		healthy bit is not set during FPD WDT expiration, PMUFW will do
10362306a36Sopenharmony_ci		system restart.
10462306a36Sopenharmony_ci
10562306a36Sopenharmony_ci		Usage:
10662306a36Sopenharmony_ci
10762306a36Sopenharmony_ci		Set healthy bit::
10862306a36Sopenharmony_ci
10962306a36Sopenharmony_ci		    # echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/health_status
11062306a36Sopenharmony_ci
11162306a36Sopenharmony_ci		Unset healthy bit::
11262306a36Sopenharmony_ci
11362306a36Sopenharmony_ci		    # echo 0 > /sys/devices/platform/firmware\:zynqmp-firmware/health_status
11462306a36Sopenharmony_ci
11562306a36Sopenharmony_ciUsers:		Xilinx
11662306a36Sopenharmony_ci
11762306a36Sopenharmony_ciWhat:		/sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
11862306a36Sopenharmony_ciDate:		Feb 2022
11962306a36Sopenharmony_ciKernelVersion:	5.18
12062306a36Sopenharmony_ciContact:	"Ronak Jain" <ronak.jain@xilinx.com>
12162306a36Sopenharmony_ciDescription:
12262306a36Sopenharmony_ci		This sysfs interface allows user to configure features at
12362306a36Sopenharmony_ci		runtime. The user can enable or disable features running at
12462306a36Sopenharmony_ci		firmware as well as the user can configure the parameters of
12562306a36Sopenharmony_ci		the features at runtime. The supported features are over
12662306a36Sopenharmony_ci		temperature and external watchdog. Here, the external watchdog
12762306a36Sopenharmony_ci		is completely different than the /dev/watchdog as the external
12862306a36Sopenharmony_ci		watchdog is running on the firmware and it is used to monitor
12962306a36Sopenharmony_ci		the health of firmware not APU(Linux). Also, the external
13062306a36Sopenharmony_ci		watchdog is interfaced outside of the zynqmp soc.
13162306a36Sopenharmony_ci
13262306a36Sopenharmony_ci		The supported config ids are for the feature configuration is,
13362306a36Sopenharmony_ci		1. PM_FEATURE_OVERTEMP_STATUS = 1, the user can enable or
13462306a36Sopenharmony_ci		disable the over temperature feature.
13562306a36Sopenharmony_ci		2. PM_FEATURE_OVERTEMP_VALUE = 2, the user can configure the
13662306a36Sopenharmony_ci		over temperature limit in Degree Celsius.
13762306a36Sopenharmony_ci		3. PM_FEATURE_EXTWDT_STATUS = 3, the user can enable or disable
13862306a36Sopenharmony_ci		the external watchdog feature.
13962306a36Sopenharmony_ci		4. PM_FEATURE_EXTWDT_VALUE = 4, the user can configure the
14062306a36Sopenharmony_ci		external watchdog feature.
14162306a36Sopenharmony_ci
14262306a36Sopenharmony_ci		Usage:
14362306a36Sopenharmony_ci
14462306a36Sopenharmony_ci		Select over temperature config ID to enable/disable feature
14562306a36Sopenharmony_ci		# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
14662306a36Sopenharmony_ci
14762306a36Sopenharmony_ci		Check over temperature config ID is selected or not
14862306a36Sopenharmony_ci		# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
14962306a36Sopenharmony_ci		The expected result is 1.
15062306a36Sopenharmony_ci
15162306a36Sopenharmony_ci		Select over temperature config ID to configure OT limit
15262306a36Sopenharmony_ci		# echo 2 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
15362306a36Sopenharmony_ci
15462306a36Sopenharmony_ci		Check over temperature config ID is selected or not
15562306a36Sopenharmony_ci		# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
15662306a36Sopenharmony_ci		The expected result is 2.
15762306a36Sopenharmony_ci
15862306a36Sopenharmony_ci		Select external watchdog config ID to enable/disable feature
15962306a36Sopenharmony_ci		# echo 3 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
16062306a36Sopenharmony_ci
16162306a36Sopenharmony_ci		Check external watchdog config ID is selected or not
16262306a36Sopenharmony_ci		# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
16362306a36Sopenharmony_ci		The expected result is 3.
16462306a36Sopenharmony_ci
16562306a36Sopenharmony_ci		Select external watchdog config ID to configure time interval
16662306a36Sopenharmony_ci		# echo 4 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
16762306a36Sopenharmony_ci
16862306a36Sopenharmony_ci		Check external watchdog config ID is selected or not
16962306a36Sopenharmony_ci		# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
17062306a36Sopenharmony_ci		The expected result is 4.
17162306a36Sopenharmony_ci
17262306a36Sopenharmony_ciUsers:		Xilinx
17362306a36Sopenharmony_ci
17462306a36Sopenharmony_ciWhat:		/sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
17562306a36Sopenharmony_ciDate:		Feb 2022
17662306a36Sopenharmony_ciKernelVersion:	5.18
17762306a36Sopenharmony_ciContact:	"Ronak Jain" <ronak.jain@xilinx.com>
17862306a36Sopenharmony_ciDescription:
17962306a36Sopenharmony_ci		This sysfs interface allows to configure features at runtime.
18062306a36Sopenharmony_ci		The user can enable or disable features running at firmware.
18162306a36Sopenharmony_ci		Also, the user can configure the parameters of the features
18262306a36Sopenharmony_ci		at runtime. The supported features are over temperature and
18362306a36Sopenharmony_ci		external watchdog. Here, the external watchdog is completely
18462306a36Sopenharmony_ci		different than the /dev/watchdog as the external watchdog is
18562306a36Sopenharmony_ci		running on the firmware and it is used to monitor the health
18662306a36Sopenharmony_ci		of firmware not APU(Linux). Also, the external watchdog is
18762306a36Sopenharmony_ci		interfaced outside of the zynqmp soc.
18862306a36Sopenharmony_ci
18962306a36Sopenharmony_ci		By default the features are disabled in the firmware. The user
19062306a36Sopenharmony_ci		can enable features by querying appropriate config id of the
19162306a36Sopenharmony_ci		features.
19262306a36Sopenharmony_ci
19362306a36Sopenharmony_ci		The default limit for the over temperature is 90 Degree Celsius.
19462306a36Sopenharmony_ci		The default timer interval for the external watchdog is 570ms.
19562306a36Sopenharmony_ci
19662306a36Sopenharmony_ci		The supported config ids are for the feature configuration is,
19762306a36Sopenharmony_ci		1. PM_FEATURE_OVERTEMP_STATUS = 1, the user can enable or
19862306a36Sopenharmony_ci		disable the over temperature feature.
19962306a36Sopenharmony_ci		2. PM_FEATURE_OVERTEMP_VALUE = 2, the user can configure the
20062306a36Sopenharmony_ci		over temperature limit in Degree Celsius.
20162306a36Sopenharmony_ci		3. PM_FEATURE_EXTWDT_STATUS = 3, the user can enable or disable
20262306a36Sopenharmony_ci		the external watchdog feature.
20362306a36Sopenharmony_ci		4. PM_FEATURE_EXTWDT_VALUE = 4, the user can configure the
20462306a36Sopenharmony_ci		external watchdog feature.
20562306a36Sopenharmony_ci
20662306a36Sopenharmony_ci		Usage:
20762306a36Sopenharmony_ci
20862306a36Sopenharmony_ci		Enable over temperature feature
20962306a36Sopenharmony_ci		# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
21062306a36Sopenharmony_ci		# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
21162306a36Sopenharmony_ci
21262306a36Sopenharmony_ci		Check whether the over temperature feature is enabled or not
21362306a36Sopenharmony_ci		# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
21462306a36Sopenharmony_ci		The expected result is 1.
21562306a36Sopenharmony_ci
21662306a36Sopenharmony_ci		Disable over temperature feature
21762306a36Sopenharmony_ci		# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
21862306a36Sopenharmony_ci		# echo 0 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
21962306a36Sopenharmony_ci
22062306a36Sopenharmony_ci		Check whether the over temperature feature is disabled or not
22162306a36Sopenharmony_ci		# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
22262306a36Sopenharmony_ci		The expected result is 0.
22362306a36Sopenharmony_ci
22462306a36Sopenharmony_ci		Configure over temperature limit to 50 Degree Celsius
22562306a36Sopenharmony_ci		# echo 2 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
22662306a36Sopenharmony_ci		# echo 50 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
22762306a36Sopenharmony_ci
22862306a36Sopenharmony_ci		Check whether the over temperature limit is configured or not
22962306a36Sopenharmony_ci		# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
23062306a36Sopenharmony_ci		The expected result is 50.
23162306a36Sopenharmony_ci
23262306a36Sopenharmony_ci		Enable external watchdog feature
23362306a36Sopenharmony_ci		# echo 3 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
23462306a36Sopenharmony_ci		# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
23562306a36Sopenharmony_ci
23662306a36Sopenharmony_ci		Check whether the external watchdog feature is enabled or not
23762306a36Sopenharmony_ci		# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
23862306a36Sopenharmony_ci		The expected result is 1.
23962306a36Sopenharmony_ci
24062306a36Sopenharmony_ci		Disable external watchdog feature
24162306a36Sopenharmony_ci		# echo 3 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
24262306a36Sopenharmony_ci		# echo 0 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
24362306a36Sopenharmony_ci
24462306a36Sopenharmony_ci		Check whether the external watchdog feature is disabled or not
24562306a36Sopenharmony_ci		# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
24662306a36Sopenharmony_ci		The expected result is 0.
24762306a36Sopenharmony_ci
24862306a36Sopenharmony_ci		Configure external watchdog timer interval to 500ms
24962306a36Sopenharmony_ci		# echo 4 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
25062306a36Sopenharmony_ci		# echo 500 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
25162306a36Sopenharmony_ci
25262306a36Sopenharmony_ci		Check whether the external watchdog timer interval is configured or not
25362306a36Sopenharmony_ci		# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
25462306a36Sopenharmony_ci		The expected result is 500.
25562306a36Sopenharmony_ci
25662306a36Sopenharmony_ciUsers:		Xilinx
257