cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
254 Views
Registered: ‎01-01-2019

PMU API force power down from Linux

Jump to solution

Hi,

Based on Xilinx v2017.4 version.

I want to power down SD0 through Xilinx Zynq MPSoC firmware debug APIs.

I use the following command from Linux:

root@root:/home# echo get_node_status 39 > /sys/kernel/debug/zynqmp_pm/power
[ 67.656382] GET_NODE_STATUS:
[ 67.656382] NodeId: 39
[ 67.656382] Status: 1
[ 67.656382] Requirements: 1
[ 67.656382] Usage: 1
root@root:/home# echo force_powerdown 39 > /sys/kernel/debug/zynqmp_pm/power
root@root:/home# echo get_node_status 39 > /sys/kernel/debug/zynqmp_pm/power
[ 80.212382] GET_NODE_STATUS:
[ 80.212382] NodeId: 39
[ 80.212382] Status: 1
[ 80.212382] Requirements: 1
[ 80.212382] Usage: 1

The node status seems not change anything, and after insert the SD card, I can still access the SD card.

root@root:/home# [ 304.681311] mmc0: new high speed SDHC card at address 1234
[ 304.687029] mmcblk0: mmc0:1234 SA16G 14.5 GiB
[ 304.692421] mmcblk0: p1
root@root:/home# mount /dev/mmcblk0p1 /mnt/
root@root:/home# ls /mnt/
test.txt

Can you please give me a hint of what I am missing?

By the way, what is the mean of Status, Requirements, and Usage that return from get_node_status?

Thanks.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Adventurer
Adventurer
142 Views
Registered: ‎01-01-2019

I trace pmufw code, and found that echo force_powerdown 39 > /sys/kernel/debug/zynqmp_pm/power will call the PmForcePowerdown() in pmufw.

According to the function description, it can only power down RPU, APU, PL (in the future).

2020-02-21_160117.png

https://github.com/Xilinx/embeddedsw/blob/xilinx-v2017.4/lib/sw_apps/zynqmp_pmufw/src/pm_core.c#L231

View solution in original post

0 Kudos
1 Reply
Highlighted
Adventurer
Adventurer
143 Views
Registered: ‎01-01-2019

I trace pmufw code, and found that echo force_powerdown 39 > /sys/kernel/debug/zynqmp_pm/power will call the PmForcePowerdown() in pmufw.

According to the function description, it can only power down RPU, APU, PL (in the future).

2020-02-21_160117.png

https://github.com/Xilinx/embeddedsw/blob/xilinx-v2017.4/lib/sw_apps/zynqmp_pmufw/src/pm_core.c#L231

View solution in original post

0 Kudos