summaryrefslogtreecommitdiff
path: root/meta-ampere/meta-jade/recipes-phosphor/gpio
AgeCommit message (Collapse)AuthorFilesLines
2021-12-30Revert "meta-ampere: mtjade: support PSU present detection via GPIO"Thang Q. Nguyen3-24/+0
By replacing phosphor-hwmon by dbus-sensor, PSU presence detection via GPIO does not work anymore and it causes confiction with dbus-sensor's PSUSensor. Revert the commit to avoid the confliction Change-Id: Idfd54325c122921a3c5df062bce1b6909b643999 Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com>
2021-11-04meta-ampere: fix shellcheck issuesThang Q. Nguyen3-23/+21
Fix all issues from the shellcheck checked on bash shells under meta-ampere. Tested: Verify the following features: 1. Power control (on,off, cycle, graceful shutdown, hard reset). 2. UART switching. 3. UEFI firmware update. Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: Idabf839b7521ecadb642230cc8bb3472c787002e
2021-09-02meta-phosphor: change systemd.bbclass to match upstream override syntaxPatrick Williams5-10/+10
Upstream bbclasses changed to typically use the `:${PN}` override syntax, including the SYSTEMD_ variables. Change our systemd.bbclass to do the same for consistency and perform a tree-wide variable replacement. Spot checked by building bletchley and witherspoon and checking some of the SYSTEMD_LINK directives on installed packages under qemu. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I20a9dd809bff8af8759488734f80486c7228c6eb
2021-08-13meta-ampere: fix compilation error with latest YoctoThang Q. Nguyen7-15/+14
Make the following changes to fix compilation errors: 1. Add honister to LAYERSERIES_COMPAT 2. Increase CONF_VERSION to 2. 3. Fix mistake on previous change on Yocto syntax update. Tested: 1. Compile OpenBMC for Mt.Jade without error. Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I5ac3f568d776109955759fab78844b1d38a51af1
2021-08-07meta-ampere: Cleanup for Yocto override syntax changeThang Q. Nguyen5-19/+19
Run convert-overrides.py meta-ampere and update missing changes as below: - Change all _mtjade to :mtjade - Change all _${PN} to :${PN} Tested: 1. Check compilation without problem. 2. Check basic functions like switch UART mux, power control. Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I42038b2a98ed1951d6c770bdf49f5fc440f8163e
2021-08-04meta-ampere: power control: restructure source codeThuBaNguyen4-0/+39
ampere-hostctrl package includes the generic codes and the platform specific codes. The generic sources are applied for all of the Ampere platforms, they are the service files and the scripts to setting the GPIO pins. The platform specific sources are the GPIO pin config file and the gpio monitor config files. This commit moves the platform specific files to the platform code. Tested: 1. Do the power control actions use ipmitool, BMC web and Redfish. 2. Make sure the server states are changed as expected. Signed-off-by: ThuBaNguyen <thu@os.amperecomputing.com> Change-Id: Ic0e261109f7a5dfaf38c883bff0afedab763a0b6
2021-06-13meta-ampere: mtjade: support PSU present detection via GPIOChanh Nguyen3-0/+24
It checks GPIO key for powersupply presence, and creates the inventory object. Tested: 1. Plug the PSU, check busctl command for Present attribute 2. Plug out the PSU, check busctl command for Present attribute $ busctl --no-pager introspect xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0 Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com> Change-Id: I4520d537d425249debe5c0d8c6bf8b0f6e3c5b34
2021-06-13meta-ampere: Support software workaround for PSU redundancy issueChanh Nguyen6-0/+127
When system only uses single PSU ( ex : PSU1 ) to power ON normal 12V, HSC2 will be trigged Fault event (FET health). At this time, plugging in PSU2 in system, the PSU2 won't deliver power to +12V_MB because HSC2 is protected by Fault event. Due to HSC2 protected, the PSU redundancy mechanism can't be created. Once PSU1 is plugged out at this moment, system will crash ( reset ) because +12V_MB dropped. Support detecting PSU plug event and reset the Hot-Swap feature by disabling and then enabling again it through PMBUS command to clear the event. Tested: 1. Plug only PSU1 to power ON system (12V) 2. Wait until host is booted, check POUT: $ ipmitool sdr | grep "POUT" PSU1_POUT | 112 Watts | ok PSU2_POUT | 0 Watts | ok 3. Plug in PSU2 in system, check POUT: $ ipmitool sdr | grep "POUT" PSU1_POUT | 64 Watts | ok PSU2_POUT | 48 Watts | ok 4. Unplug AC power PSU1, check POUT: $ ipmitool sdr | grep "POUT" PSU1_POUT | 0 Watts | ok PSU2_POUT | 128 Watts | ok 5. Plug in AC power PSU1, check POUT: $ ipmitool sdr | grep "POUT" PSU1_POUT | 80 Watts | ok PSU2_POUT | 64 Watts | ok 6. Repeat 1. to 5. with PSU2. Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com> Change-Id: Ia6e00cd7b08de48059f2450e7eaf108418d0a026
2021-02-26meta-ampere: Support UID button and LEDChanh Nguyen4-0/+89
The UID button is used to provide visual identification of the system when pushed. Pressing the UID button toggles the UID LED. The same action can be done via Redfish (by patching IndicatorLED from redfish/v1/Systems/system) or the IPMI chassis identify command. Tested: 1. Press the UID button to toggles the UID on/off 2. Turn on the UID LED via ipmi command $ ipmitool chassis identify 3. Turn Lit/Blinking/Off UID LED via Redfish then check the IndicatorLED values $ curl -X PATCH --user root:0penBmc -H "Content-Type: application/json" \ -H "If-Match: *" --insecure https://BMC_IP/redfish/v1/Systems/system \ -d '{"IndicatorLED": "Lit/Blinking/Off"}' $curl -X GET --user root:0penBmc -H "Content-Type: application/json" \ --insecure https://BMC_IP/redfish/v1/Systems/system The IndicatorLED is "Lit/Blinking/Off" Signed-off-by: Hieu Huynh <hieu.huynh@amperecomputing.com> Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com> Change-Id: I58eeae7ac22a9d4ddd4acdfbd167095bdc74072c
2021-02-25meta-ampere: Support Fault LEDChanh Nguyen5-0/+88
Monitor the Socket 0 and Socket 1's CPU_FAULT GPIO and turn on the Fault LED when any GPIO turns ON. Tested: 1. Flash special SCP image to stimulate CPU Fault LED 2. Check if the Fault LED is ON. Signed-off-by: Tung Nguyen <tung.nguyen@amperecomputing.com> Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com> Change-Id: I73bf34b4361528c9c8825942ddc7f24d51589189