summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta-facebook/meta-bletchley/recipes-bletchley/detect-gpio-present/files/detect-sled-present15
-rw-r--r--meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB0.conf2
-rw-r--r--meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB1.conf2
-rw-r--r--meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB2.conf2
-rw-r--r--meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB3.conf2
-rw-r--r--meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB4.conf2
-rw-r--r--meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB5.conf2
-rw-r--r--meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB6.conf2
-rw-r--r--meta-facebook/meta-minerva/recipes-phosphor/gpio/phosphor-gpio-monitor/minerva-phosphor-multi-gpio-presence.json146
-rw-r--r--meta-facebook/meta-minerva/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend3
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge.bb1
-rw-r--r--meta-google/recipes-google/networking/gbmc-nic-config.bb1
-rw-r--r--meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init/files/meson.build34
-rw-r--r--meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init/files/meson.options5
-rw-r--r--meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init/files/platform_init.cpp350
-rw-r--r--meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init/files/platform_init.service12
-rw-r--r--meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init_%.bbappend1
-rw-r--r--meta-nvidia/recipes-phosphor/platform/platform-init_%.bbappend1
-rw-r--r--meta-phosphor/recipes-extended/sdbusplus/python3-sdbus++_git.bb2
-rw-r--r--meta-phosphor/recipes-extended/sdbusplus/sdbusplus-rev.inc2
-rw-r--r--meta-phosphor/recipes-phosphor/platform/platform-init_git.bb (renamed from meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init/platform-init.bb)15
21 files changed, 23 insertions, 579 deletions
diff --git a/meta-facebook/meta-bletchley/recipes-bletchley/detect-gpio-present/files/detect-sled-present b/meta-facebook/meta-bletchley/recipes-bletchley/detect-gpio-present/files/detect-sled-present
index 2483736880..b57bf6326c 100644
--- a/meta-facebook/meta-bletchley/recipes-bletchley/detect-gpio-present/files/detect-sled-present
+++ b/meta-facebook/meta-bletchley/recipes-bletchley/detect-gpio-present/files/detect-sled-present
@@ -33,9 +33,6 @@ sled_insert_action()
local I2C_BUS_NUM
I2C_BUS_NUM=$(get_bus_num "$SLED_ID")
- # 0022: fusb302
- bind_i2c_driver "${I2C_BUS_NUM}-0022" "typec_fusb302"
-
# 0045: ina230
bind_i2c_driver "${I2C_BUS_NUM}-0045" "ina2xx"
@@ -45,7 +42,7 @@ sled_insert_action()
# 0041: pca9536
bind_i2c_driver "${I2C_BUS_NUM}-0041" "pca953x"
- # 0076: pca9539
+ # 0076: pca9539. provides FUSB302 VBUS‑enable GPIO; fusb302 auto-binds after it probes
bind_i2c_driver "${I2C_BUS_NUM}-0076" "pca953x"
# 004f: tmp421
@@ -79,8 +76,8 @@ sled_remove_action()
# # 0041: pca9536
# unbind_i2c_driver "${I2C_BUS_NUM}-0041" "pca953x"
- # # 0076: pca9539
- # unbind_i2c_driver "${I2C_BUS_NUM}-0076" "pca953x"
+ # 0076: pca9539
+ unbind_i2c_driver "${I2C_BUS_NUM}-0076" "pca953x"
# # 004f: tmp421
# unbind_i2c_driver "${I2C_BUS_NUM}-004f" "tmp421"
@@ -96,14 +93,14 @@ sled_remove_action()
}
-dbus-monitor --system "type=signal,interface=${DBUS_PROPERTY_INTF},sender=${SERVICE_NAME},path=${PRESENT_OBJPATH}" |
+busctl monitor --system --match "type=signal,interface=${DBUS_PROPERTY_INTF},sender=${SERVICE_NAME},path=${PRESENT_OBJPATH}" |
while read -r line; do
case "$line" in
- *"boolean false"*)
+ *"BOOLEAN false"*)
echo "SLED${SLED_ID} Removal"
sled_remove_action "$SLED_ID"
;;
- *"boolean true"*)
+ *"BOOLEAN true"*)
echo "SLED${SLED_ID} Insertion"
sled_insert_action "$SLED_ID"
;;
diff --git a/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB0.conf b/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB0.conf
index 48d63a5dce..8a6f86f83b 100644
--- a/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB0.conf
+++ b/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB0.conf
@@ -1,4 +1,4 @@
baud = 57600
console-id = ath_uart0
-logfile = /var/log/obmc-console-ath-uart0.log
+logfile = /var/log/obmc-console-ath_uart0.log
logsize = 256k
diff --git a/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB1.conf b/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB1.conf
index 440b9c29d9..3f2e6a0f06 100644
--- a/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB1.conf
+++ b/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB1.conf
@@ -1,4 +1,4 @@
baud = 57600
console-id = ath_uart1
-logfile = /var/log/obmc-console-ath-uart1.log
+logfile = /var/log/obmc-console-ath_uart1.log
logsize = 256k
diff --git a/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB2.conf b/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB2.conf
index 232f3a9bfe..f8731b0791 100644
--- a/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB2.conf
+++ b/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB2.conf
@@ -1,4 +1,4 @@
baud = 57600
console-id = ath_uart_ccp0
-logfile = /var/log/obmc-console-ath-uart-ccp0.log
+logfile = /var/log/obmc-console-ath_uart_ccp0.log
logsize = 256k
diff --git a/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB3.conf b/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB3.conf
index 352164d2ee..64339db6c9 100644
--- a/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB3.conf
+++ b/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB3.conf
@@ -1,4 +1,4 @@
baud = 57600
console-id = ath_uart_ccp1
-logfile = /var/log/obmc-console-ath-uart-ccp1.log
+logfile = /var/log/obmc-console-ath_uart_ccp1.log
logsize = 256k
diff --git a/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB4.conf b/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB4.conf
index 2761c5de1c..e9ff3d30b7 100644
--- a/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB4.conf
+++ b/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB4.conf
@@ -1,4 +1,4 @@
baud = 57600
console-id = nowl_uart
-logfile = /var/log/obmc-console-nowl-uart.log
+logfile = /var/log/obmc-console-nowl_uart.log
logsize = 256k
diff --git a/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB5.conf b/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB5.conf
index 4d14d935c1..59cf91258a 100644
--- a/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB5.conf
+++ b/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB5.conf
@@ -1,4 +1,4 @@
baud = 57600
console-id = sowl_uart
-logfile = /var/log/obmc-console-sowl-uart.log
+logfile = /var/log/obmc-console-sowl_uart.log
logsize = 256k
diff --git a/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB6.conf b/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB6.conf
index 4b9045384c..47c4d6dcf6 100644
--- a/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB6.conf
+++ b/meta-facebook/meta-harma/recipes-phosphor/console/obmc-console/server.ttyUSB6.conf
@@ -1,4 +1,4 @@
baud = 57600
console-id = mmc_uart
-logfile = /var/log/obmc-console-mmc-uart.log
+logfile = /var/log/obmc-console-mmc_uart.log
logsize = 256k
diff --git a/meta-facebook/meta-minerva/recipes-phosphor/gpio/phosphor-gpio-monitor/minerva-phosphor-multi-gpio-presence.json b/meta-facebook/meta-minerva/recipes-phosphor/gpio/phosphor-gpio-monitor/minerva-phosphor-multi-gpio-presence.json
deleted file mode 100644
index 5c6d3c33ef..0000000000
--- a/meta-facebook/meta-minerva/recipes-phosphor/gpio/phosphor-gpio-monitor/minerva-phosphor-multi-gpio-presence.json
+++ /dev/null
@@ -1,146 +0,0 @@
-[
- {
- "Name": "FAN1",
- "LineName": "FAN1_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN1"
- },
- {
- "Name": "FAN2",
- "LineName": "FAN2_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN2"
- },
- {
- "Name": "FAN3",
- "LineName": "FAN3_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN3"
- },
- {
- "Name": "FAN4",
- "LineName": "FAN4_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN4"
- },
- {
- "Name": "FAN5",
- "LineName": "FAN5_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN5"
- },
- {
- "Name": "FAN6",
- "LineName": "FAN6_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN6"
- },
- {
- "Name": "FAN7",
- "LineName": "FAN7_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN7"
- },
- {
- "Name": "FAN8",
- "LineName": "FAN8_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN8"
- },
- {
- "Name": "FAN9",
- "LineName": "FAN9_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN9"
- },
- {
- "Name": "FAN10",
- "LineName": "FAN10_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN10"
- },
- {
- "Name": "FAN11",
- "LineName": "FAN11_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN11"
- },
- {
- "Name": "FAN12",
- "LineName": "FAN12_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN12"
- },
- {
- "Name": "FAN13",
- "LineName": "FAN13_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN13"
- },
- {
- "Name": "FAN14",
- "LineName": "FAN14_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN14"
- },
- {
- "Name": "FAN15",
- "LineName": "FAN15_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN15"
- },
- {
- "Name": "FAN16",
- "LineName": "FAN16_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN16"
- },
- {
- "Name": "FAN17",
- "LineName": "FAN17_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN17"
- },
- {
- "Name": "FAN18",
- "LineName": "FAN18_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN18"
- },
- {
- "Name": "FAN19",
- "LineName": "FAN19_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN19"
- },
- {
- "Name": "FAN20",
- "LineName": "FAN20_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN20"
- },
- {
- "Name": "FAN21",
- "LineName": "FAN21_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN21"
- },
- {
- "Name": "FAN22",
- "LineName": "FAN22_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN22"
- },
- {
- "Name": "FAN23",
- "LineName": "FAN23_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN23"
- },
- {
- "Name": "FAN24",
- "LineName": "FAN24_PRSNT",
- "Bias": "DISABLE",
- "Inventory": "/system/board/Minerva_Fan_Board/FAN24"
- }
-]
diff --git a/meta-facebook/meta-minerva/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend b/meta-facebook/meta-minerva/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
index 855c004b2c..d3217bf262 100644
--- a/meta-facebook/meta-minerva/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
+++ b/meta-facebook/meta-minerva/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
@@ -17,7 +17,6 @@ SERVICE_LIST = "rpu-ready-assert@.service \
SERVICE_FILE_FMT = "file://{0}"
SRC_URI += "file://minerva-phosphor-multi-gpio-monitor.json \
- file://minerva-phosphor-multi-gpio-presence.json \
file://logging \
file://fan-reload \
file://cr-toggle-boot-logger \
@@ -36,8 +35,6 @@ do_install:append() {
install -d ${D}${datadir}/phosphor-gpio-monitor
install -m 0644 ${UNPACKDIR}/minerva-phosphor-multi-gpio-monitor.json \
${D}${datadir}/phosphor-gpio-monitor/phosphor-multi-gpio-monitor.json
- install -m 0644 ${UNPACKDIR}/minerva-phosphor-multi-gpio-presence.json \
- ${D}${datadir}/phosphor-gpio-monitor/phosphor-multi-gpio-presence.json
for s in ${SERVICE_LIST}
do
diff --git a/meta-google/recipes-google/networking/gbmc-bridge.bb b/meta-google/recipes-google/networking/gbmc-bridge.bb
index c4243f3e34..e23931df07 100644
--- a/meta-google/recipes-google/networking/gbmc-bridge.bb
+++ b/meta-google/recipes-google/networking/gbmc-bridge.bb
@@ -53,6 +53,7 @@ FILES:${PN}:append = " \
RDEPENDS:${PN}:append = " \
bash \
+ ${@'' if d.getVar('GBMC_DHCP_RELAY') != '1' else 'dhcp-relay'} \
dhcp-done \
gbmc-ip-monitor \
gbmc-net-common \
diff --git a/meta-google/recipes-google/networking/gbmc-nic-config.bb b/meta-google/recipes-google/networking/gbmc-nic-config.bb
index 4e0a41495f..5cc4b89a35 100644
--- a/meta-google/recipes-google/networking/gbmc-nic-config.bb
+++ b/meta-google/recipes-google/networking/gbmc-nic-config.bb
@@ -31,7 +31,6 @@ FILES:${PN} += " \
RDEPENDS:${PN}:append = " \
bash \
- ${@'' if d.getVar('GBMC_DHCP_RELAY') != '1' else 'dhcp-relay'} \
gbmc-ip-monitor \
gbmc-net-common \
nftables-systemd \
diff --git a/meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init/files/meson.build b/meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init/files/meson.build
deleted file mode 100644
index a95af4605f..0000000000
--- a/meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init/files/meson.build
+++ /dev/null
@@ -1,34 +0,0 @@
-project(
- 'platform-init',
- 'cpp',
- version: '0.1',
- default_options: [
- 'warning_level=3',
- 'cpp_std=c++23',
- ],
-)
-
-gpiodcxx = dependency('libgpiodcxx', default_options: ['bindings=cxx'])
-systemd = dependency('systemd')
-libsystemd = dependency('libsystemd')
-libexec = get_option('prefix') + '/' + get_option('libexecdir')
-
-conf = configuration_data()
-conf.set10('INIT_CARD', get_option('init-p2020').allowed())
-configure_file(output: 'config.h', configuration: conf)
-configuration_inc = include_directories('.')
-
-exe = executable(
- 'platform-init',
- 'platform_init.cpp',
- dependencies: [
- gpiodcxx,
- libsystemd,
- ],
- include_directories: configuration_inc,
- install: true,
- install_dir: libexec,
-)
-
-systemd_system_unit_dir = systemd.get_variable('systemdsystemunitdir')
-install_data('platform_init.service', install_dir: systemd_system_unit_dir)
diff --git a/meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init/files/meson.options b/meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init/files/meson.options
deleted file mode 100644
index f6543a683d..0000000000
--- a/meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init/files/meson.options
+++ /dev/null
@@ -1,5 +0,0 @@
-option('init-p2020',
- type: 'feature',
- value: 'disabled',
- description: 'Enable Init of P2020 add in card on gb200')
-
diff --git a/meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init/files/platform_init.cpp b/meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init/files/platform_init.cpp
deleted file mode 100644
index 17cb731041..0000000000
--- a/meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init/files/platform_init.cpp
+++ /dev/null
@@ -1,350 +0,0 @@
-// SPDX-License-Identifier: Apache-2.0
-// SPDX-FileCopyrightText: 2025 NVIDIA
-
-#include <fcntl.h>
-#include <gpiod.hpp>
-#include <systemd/sd-daemon.h>
-
-#include <chrono>
-#include <cstdint>
-#include <cstdlib>
-#include <cstring>
-#include <filesystem>
-#include <format>
-#include <fstream>
-#include <iostream>
-#include <thread>
-#include <unordered_map>
-
-#include <config.h>
-
-using namespace std::chrono_literals;
-
-constexpr static const char *app_name = "platform_init";
-
-// Map of GPIO name to line. Holds lines open for the duration of the program
-static std::unordered_map<std::string, gpiod::line> io;
-
-void sleep_milliseconds(std::chrono::milliseconds milliseconds) {
- std::cerr << std::format("Sleeping for {} milliseconds\n",
- milliseconds.count());
- std::this_thread::sleep_for(milliseconds);
-}
-
-void set_gpio(const char *line_name, int value,
- std::chrono::milliseconds find_timeout = 0ms) {
- std::cerr << std::format("{} Request to set to {}\n", line_name, value);
- std::chrono::milliseconds polling_time = 10ms;
- gpiod::line &line = io[line_name];
- if (!line) {
- do {
- line = gpiod::find_line(line_name);
- if (!line) {
- std::cerr << std::format("{} not found yet, waiting and retrying\n",
- line_name);
-
- sleep_milliseconds(polling_time);
- find_timeout -= polling_time;
- }
- } while (!line && find_timeout > 0s);
- if (!line && find_timeout <= 0s) {
- std::cerr << std::format("{} Unable to find\n", line_name);
- return;
- }
- try {
- line.request({app_name, gpiod::line_request::DIRECTION_OUTPUT, 0}, value);
- } catch (const std::system_error &e) {
- std::cerr << std::format("{} unable to set direction and value {}\n",
- line_name, e.what());
- return;
- }
- // No need to set if the init did it for us
- std::cerr << std::format("{} Set to {}\n", line_name, value);
- return;
- }
- std::cerr << std::format("{} Settingto {}\n", line_name, value);
- line.set_value(value);
-}
-
-int get_gpio(const char *line_name) {
- std::cerr << std::format("{} Request to get\n", line_name);
-
- gpiod::line line = gpiod::find_line(line_name);
- if (!line) {
- std::cerr << std::format("{} Set unable to find\n", line_name);
- return -1;
- }
- try {
- line.request({app_name, gpiod::line_request::DIRECTION_INPUT, 0});
- } catch (const std::system_error &e) {
- std::cerr << std::format("{} unable to set {}\n", line_name, e.what());
- }
-
- int value = line.get_value();
- std::cerr << std::format("{} was {}\n", line_name, value);
- return value;
-}
-
-enum class GpioEventResult { Error, Asserted, Timeout };
-
-struct GpioEvent {
- GpioEvent(const char *line_name_in, int value_in)
- : line_name(line_name_in), value(value_in) {
- line = gpiod::find_line(line_name);
- if (!line) {
- std::cerr << std::format("{} GpioEvent: Unable to find\n", line_name);
- return;
- }
- int edge = value ? ::gpiod::line_request::EVENT_RISING_EDGE
- : ::gpiod::line_request::EVENT_FALLING_EDGE;
-
- line.request({app_name, edge, 0});
-
- int val = line.get_value();
- if (val == value) {
- std::cerr << std::format("{} GpioEvent is already {}\n", line_name, val);
- } else {
- std::cerr << std::format("GpioEvent created for {}\n", line_name);
- }
- }
- GpioEventResult wait() {
- if (!line) {
- std::cerr << std::format("Line {} wasn't initialized\n", line_name);
- return GpioEventResult::Error;
- }
- std::cerr << std::format("{} Waiting to go to {}\n", line_name,
- value ? "assert" : "deassert");
- auto events = line.event_wait(std::chrono::seconds(120));
- if (!events) {
- std::cerr << std::format("{} Timeout\n", line_name);
- return GpioEventResult::Timeout;
- }
-
- std::cerr << std::format("{} Asserted\n", line_name);
-
- return GpioEventResult::Asserted;
- }
-
- gpiod::line line;
- std::string line_name;
- int value;
-};
-
-void rebind_i2c(std::string number) {
- std::string bindpath =
- std::format("/sys/bus/platform/drivers/aspeed-i2c-bus/unbind", number);
- std::ofstream bindofs(bindpath);
- if (!bindofs) {
- std::cerr << std::format("{} unable to open\n", bindpath);
- return;
- }
- try {
- bindofs << std::format("{}.i2c\n", number);
- } catch (const std::system_error &e) {
- std::cerr << std::format("{} unable to write\n", bindpath);
- return;
- }
- bindofs.close();
- std::cerr << std::format("{} unbound\n", number);
-
- std::string unbindpath =
- std::format("/sys/bus/platform/drivers/aspeed-i2c-bus/bind", number);
- std::ofstream unbindofs(unbindpath);
- if (!unbindofs) {
- std::cerr << std::format("{} unable to open\n", unbindpath);
- return;
- }
- try {
- unbindofs << std::format("{}.i2c\n", number);
- } catch (const std::system_error &e) {
- std::cerr << std::format("{} unable to write\n", unbindpath);
- return;
- }
- std::cerr << std::format("{} bound\n", number);
-}
-
-void set_gpio_raw(int chip_num, int bit_num, int value) {
- std::string syspath = std::format("gpiochip{}", chip_num);
- std::cerr << std::format("Setting gpiochip{} bit {} to {}\n", chip_num,
- bit_num, value);
- try {
- gpiod::chip chip(syspath);
- gpiod::line line = chip.get_line(bit_num);
- line.request({app_name, gpiod::line_request::DIRECTION_OUTPUT, 0}, value);
- std::cerr << std::format("gpiochip{} bit {} set to {}\n", chip_num, bit_num,
- value);
- } catch (const std::system_error &e) {
- std::cerr << std::format("Error setting gpiochip{} bit {}: {}\n", chip_num,
- bit_num, e.what());
- }
-}
-
-void new_device(unsigned int bus, unsigned int address,
- std::string_view device_type) {
- std::string path = std::format("/sys/bus/i2c/devices/i2c-{}/new_device", bus);
- std::cerr << std::format("attempting to open {}", path);
- std::ofstream new_device(path);
- if (!new_device) {
- std::cerr << "Error: Unable to create I2C device\n";
- return;
- }
- new_device << std::format("{} 0x{:02x}", device_type, address);
- new_device.close();
-
- std::cerr << std::format("{} device created at bus {}", device_type, bus);
-}
-
-void wait_for_path_to_exist(std::string_view path,
- std::chrono::milliseconds timeout) {
-
- while (true) {
- std::error_code ec;
- bool exists = std::filesystem::exists(path, ec);
- if (exists) {
- return;
- }
- sleep_milliseconds(1ms);
- timeout -= 1ms;
- }
- std::cerr << std::format("Failed to wait for {} to exist", path);
-}
-
-void init_p2020_gpu_card() {
- std::cerr << "Initializing GPU card...\n";
-
- // Init the P2020 gpio expander
- new_device(14, 0x20, "pca6408");
-
- // Wait for device to be created
- auto device_path = "/sys/bus/i2c/devices/14-0020";
- wait_for_path_to_exist(device_path, 1000ms);
-
- // Find the GPIO chip number
- std::string gpio_chip;
- for (const auto &entry : std::filesystem::directory_iterator(device_path)) {
- std::string path = entry.path().string();
- if (path.find("gpiochip") != std::string::npos) {
- gpio_chip = path.substr(path.find("gpiochip") + std::strlen("gpiochip"));
- break;
- }
- }
- if (gpio_chip.empty()) {
- std::cerr << "Error: Could not find GPIO chip number\n";
- return;
- }
-
- std::cerr << "Found GPIO chip: gpiochip" << gpio_chip << "\n";
- unsigned int gpiochipint = 0;
- try {
- gpiochipint = std::stoi(gpio_chip);
- } catch (const std::exception &e) {
- std::cout << "Failed to convert gpiochip\n";
- return;
- }
-
- // Set MCU in recovery
- set_gpio_raw(gpiochipint, 3, 1);
-
- // Reset MCU
- set_gpio_raw(gpiochipint, 4, 0);
- set_gpio_raw(gpiochipint, 4, 1);
-
- // Switch MUX to MCU
- set_gpio_raw(gpiochipint, 5, 1);
-}
-
-bool hmc_is_present() {
- std::error_code ec;
- bool exists = std::filesystem::exists("/sys/bus/i2c/devices/9-0074", ec);
- if (ec) {
- exists = false;
- }
- if (exists) {
- std::cerr << "HMC present in platform";
- } else {
- std::cerr << "HMC not present in platform";
- }
- return exists;
-}
-
-int main() {
- // Reset USB hubs
- set_gpio("USB_HUB_RESET_L-O", 0, 10000ms);
- bool hmc_present = hmc_is_present();
- if (!hmc_present) {
- set_gpio("SEC_USB2_HUB_RST_L-O", 0, 10000ms);
- }
-
- sleep_milliseconds(100ms);
- if (!hmc_present) {
- set_gpio("SEC_USB2_HUB_RST_L-O", 1);
- }
- // Write SGPIO_BMC_EN-O=1 to correctly set mux to send SGPIO signals to FPGA
- set_gpio("SGPIO_BMC_EN-O", 1);
-
- // Write the bit for BMC without HMC
- set_gpio("HMC_BMC_DETECT-O", !hmc_present, 30000ms);
-
- // Set BMC_EROT_FPGA_SPI_MUX_SEL-O = 1 to enable FPGA to access its EROT
- set_gpio("BMC_EROT_FPGA_SPI_MUX_SEL-O", 1);
-
- // Enable 12V
- set_gpio("BMC_12V_CTRL-O", 1, 10000ms);
-
- set_gpio("PWR_BRAKE_L-O", 1);
- set_gpio("SHDN_REQ_L-O", 1);
- set_gpio("SHDN_FORCE_L-O", 1);
- // Hold in reset (asserted) after standby power enabled
- set_gpio("SYS_RST_IN_L-O", 0);
-
- GpioEvent fpga_ready_wait = GpioEvent("FPGA_READY_BMC-I", 1);
- GpioEvent sec_erot_fpga_rst = GpioEvent("SEC_FPGA_READY_BMC-I", 1);
-
- // Release FPGA EROT from reset
- set_gpio("EROT_FPGA_RST_L-O", 1);
- set_gpio("SEC_EROT_FPGA_RST_L-O", 1);
-
- sleep_milliseconds(100ms);
-
- set_gpio("FPGA_RST_L-O", 1);
-
- if (fpga_ready_wait.wait() != GpioEventResult::Asserted) {
- std::cerr << "FPGA_READY_BMC-I failed to assert\n";
- // return EXIT_FAILURE;
- }
-
- if (sec_erot_fpga_rst.wait() != GpioEventResult::Asserted) {
- std::cerr << "SEC_FPGA_READY_BMC-I failed to assert\n";
- // return EXIT_FAILURE;
- }
-
- // ReInitialize the FPGA connected I2C buses to unstick them and let FruDevice
- // know it can scan for FRUs
- // I2c bus 1
- rebind_i2c("1e78a100");
- // I2c bus 2
- rebind_i2c("1e78a180");
-
- // Set sgpio signals
- set_gpio("RUN_POWER_EN-O", 1);
- set_gpio("SYS_RST_IN_L-O", 1);
- set_gpio("GLOBAL_WP_BMC-O", 0);
-
- set_gpio("BMC_READY-O", 1);
-
- if (INIT_CARD == 1) {
- init_p2020_gpu_card();
- }
-
- set_gpio("USB_HUB_RESET_L-O", 1);
- if (!hmc_present) {
- set_gpio("SEC_USB2_HUB_RST_L-O", 1);
- }
-
- sd_notify(0, "READY=1");
- std::cerr << "Platform init complete\n";
- pause();
- std::cerr << "Releasing platform\n";
-
- return EXIT_SUCCESS;
-}
diff --git a/meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init/files/platform_init.service b/meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init/files/platform_init.service
deleted file mode 100644
index c1e5f5a8ba..0000000000
--- a/meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init/files/platform_init.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Start up the GB200Nvl hardware
-Before=xyz.openbmc_project.FruDevice.service
-
-[Service]
-Type=notify
-ExecStart=/usr/libexec/platform-init
-SyslogIdentifier=gb200nvl-platform-init
-TimeoutStartSec=500
-
-[Install]
-WantedBy=multi-user.target
diff --git a/meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init_%.bbappend b/meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init_%.bbappend
new file mode 100644
index 0000000000..0a4342f4d2
--- /dev/null
+++ b/meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init_%.bbappend
@@ -0,0 +1 @@
+OEEXTRA_MESON::append = "-Dplatform-name=nvidia-gb200"
diff --git a/meta-nvidia/recipes-phosphor/platform/platform-init_%.bbappend b/meta-nvidia/recipes-phosphor/platform/platform-init_%.bbappend
new file mode 100644
index 0000000000..335abe64a2
--- /dev/null
+++ b/meta-nvidia/recipes-phosphor/platform/platform-init_%.bbappend
@@ -0,0 +1 @@
+EXTRA_OEMESON:append:nv-gpu-pcie-card = " -Dinit-p2020=enabled"
diff --git a/meta-phosphor/recipes-extended/sdbusplus/python3-sdbus++_git.bb b/meta-phosphor/recipes-extended/sdbusplus/python3-sdbus++_git.bb
index c87b258ed2..57db211196 100644
--- a/meta-phosphor/recipes-extended/sdbusplus/python3-sdbus++_git.bb
+++ b/meta-phosphor/recipes-extended/sdbusplus/python3-sdbus++_git.bb
@@ -19,7 +19,7 @@ PYPI_PACKAGE = "sdbusplus"
S = "${WORKDIR}/git/tools"
-inherit setuptools3
+inherit python_setuptools_build_meta
RDEPENDS:${PN} += " \
${PYTHON_PN}-inflection \
diff --git a/meta-phosphor/recipes-extended/sdbusplus/sdbusplus-rev.inc b/meta-phosphor/recipes-extended/sdbusplus/sdbusplus-rev.inc
index bc2d872744..da785d6902 100644
--- a/meta-phosphor/recipes-extended/sdbusplus/sdbusplus-rev.inc
+++ b/meta-phosphor/recipes-extended/sdbusplus/sdbusplus-rev.inc
@@ -3,4 +3,4 @@ PR = "r1"
PV ?= "1.0+git${SRCPV}"
SRC_URI += "git://github.com/openbmc/sdbusplus;branch=master;protocol=https"
-SRCREV = "47ac18da9347b199df9be04250b2a987fc4c30a7"
+SRCREV = "ed24aa516d98adb46947c3218fa94c876242e049"
diff --git a/meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init/platform-init.bb b/meta-phosphor/recipes-phosphor/platform/platform-init_git.bb
index 9f05dc9e12..abebb88db5 100644
--- a/meta-nvidia/meta-gb200nvl-obmc/recipes-nvidia/platform-init/platform-init.bb
+++ b/meta-phosphor/recipes-phosphor/platform/platform-init_git.bb
@@ -1,24 +1,19 @@
-SUMMARY = "Platform init for GB200NVL"
+SUMMARY = "OpenBMC Platform init"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
DEPENDS = " \
+ cli11 \
libgpiod \
systemd \
"
-S = "${WORKDIR}/sources"
-UNPACKDIR = "${S}"
+S = "${WORKDIR}/git"
-SRC_URI += "\
- file://meson.options \
- file://meson.build \
- file://platform_init.cpp \
- file://platform_init.service \
-"
+SRCREV = "2b314e48381304ed5e5723076bfa9f1cd1f563bf"
-EXTRA_OEMESON:append:nv-gpu-pcie-card = " -Dinit-p2020=enabled"
+SRC_URI += "git://github.com/openbmc/platform-init.git;branch=master;protocol=https;branch=main"
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE:${PN}:append = " platform_init.service "