USB power on must be supported by the mainboard and chipset as well.
However, I think that 2nd and subsequent
soft power off/on cycles would work if the system would be put in
stand-by mode
in the right way.
What do you mean by that?
That I do not think I need original PC bios support for usb wake up if I myself program the chipset from linux before putting PC into suspend state.
Either way, I made partial progress, but then I got stuck.
chipset/datasheet : i440BX - iPIIX4-i82371AB-29056201.pdf
chapter 7.2 - pg 137 - Power Management IO Space Registers chapter 7.2.3 - pg 138 - Base + 04h = Set Power On Suspend chapter 7.2.6 - pg 140 - Base + 0Eh = USB_EN
# lspci -s 00:07.3 00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 02)
# setpci -D -v -s 00:07.3 40.L
00:07.3:40 = 00004001
# cat /proc/ioports | grep 00:07.3
4000-403f : 0000:00:07.3 5000-500f : 0000:00:07.3
So this means that at offset 0x4000 at IO space should be the PM stuff that I could modify, but when I read space, I get all 0xFF's so that's not working :-(
# dd bs=1 skip=13500 if=/dev/port count=60 | od -t x1 -v
0000000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0000020 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0000040 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0000060 ff ff ff ff ff ff ff ff ff ff ff
/dev/port itself works at least for low numbers.
"X" = 0x58 ASCII # printf "\x58" | dd bs=1 seek=128 of=/dev/port # dd bs=1 skip=128 if=/dev/port count=1 above correctly shows "X" on screen.
but no idea so far why I can't read the PM space.