meta-ampere: mtjade: fix PCIE AER when Host shutdowns
Switch OCP power source from 3V3 to standby too early causes PCIE AER
error on the OCP adapter.
This commit changes to switch the OCP power source via OCP_MAIN_PWREN in
power control application to avoid the issue.
Tested:
1. Run IPMI chassis power soft command and check if no PCIE AER error
generated.
Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com>
Change-Id: I9dbc621390fb04fa818a04aeaac53b6b729e9e75
diff --git a/meta-ampere/meta-jade/recipes-ampere/platform/ampere-platform-init/ampere-platform-init.service b/meta-ampere/meta-jade/recipes-ampere/platform/ampere-platform-init/ampere-platform-init.service
index 51b3caa..b1989bb 100644
--- a/meta-ampere/meta-jade/recipes-ampere/platform/ampere-platform-init/ampere-platform-init.service
+++ b/meta-ampere/meta-jade/recipes-ampere/platform/ampere-platform-init/ampere-platform-init.service
@@ -6,7 +6,6 @@
RemainAfterExit=true
Type=oneshot
ExecStart=/usr/sbin/ampere_platform_init.sh
-StandardOutput=syslog
[Install]
WantedBy=sysinit.target
diff --git a/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-gpio-config/ampere_gpio_utils.sh b/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-gpio-config/ampere_gpio_utils.sh
index 5d1a1a2..67e601c 100644
--- a/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-gpio-config/ampere_gpio_utils.sh
+++ b/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-gpio-config/ampere_gpio_utils.sh
@@ -10,7 +10,6 @@
set_gpio_power_off() {
echo "Setting GPIO before Power off"
- gpio_configure_output "$OCP_MAIN_PWREN" 0
rm -f /run/openbmc/host@0-on
}
@@ -20,7 +19,6 @@
if [ "$val" == 1 ]; then
exit
fi
- gpio_configure_output "$OCP_MAIN_PWREN" 1
gpio_configure_output "$SPI0_PROGRAM_SEL" 1
gpio_configure_output "$SPI0_BACKUP_SEL" 0
}
diff --git a/meta-ampere/meta-jade/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json b/meta-ampere/meta-jade/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json
index f2722c8..0b6ad45 100644
--- a/meta-ampere/meta-jade/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json
+++ b/meta-ampere/meta-jade/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json
@@ -4,6 +4,7 @@
"power_config": {
"power_good_in": "PGOOD",
"power_up_outs": [
+ {"name": "OCP_MAIN_PWREN", "polarity": true},
{"name": "BMC_SYS_PSON_L", "polarity": false}
],
"reset_outs": [
@@ -25,6 +26,11 @@
"direction": "out"
},
{
+ "name": "OCP_MAIN_PWREN",
+ "pin": "R4",
+ "direction": "out"
+ },
+ {
"name": "BMC_S0_SYSRESET_L",
"pin": "L3",
"direction": "out"