Add ISL69269 Voltage Regulator support
The configuration of the voltage regulator relies on the EM-Schema[1]
1: https://gerrit.openbmc.org/c/openbmc/entity-manager/+/79823
Tested:
```
<7> Requesting Image update with 10
<7> started asynchronous update with fd 10
<7> starting async update with FD: 11
<7> Harme_MB_VR_CPU0_VCORE0_5813: created dbus interfaces on path /xyz/openbmc_project/software/Harme_MB_VR_CPU0_VCORE0_5813
<7> starting the async update with memfd 11
<7> open fd 11
<7> file size: 7646
<7> parsing package header
<7> parsing package, pkg header size: 152
<7> Harme_MB_VR_CPU0_VCORE0_5813: set version 99A5A351
<7> device id from configuration: 0x49d29b00
<7> device revision from config: 0x7000000
<7> Production hex file format recognized
<7> Config ID: 0
<7> Config Production CRC: 0x99a5a351
<7> Device revision read from device: 0x6000100
<7> Production mode revision checks out
<6> Successfully updated VR Harme_MB_VR_CPU0_VCORE0
<7> Default implementation for device reset
<7> Harme_MB_VR_CPU0_VCORE0_5813: setting association definitions
<7> inventory item at path /xyz/openbmc_project/inventory/system/board/BMC_Storage_Module
<7> inventory item at path /xyz/openbmc_project/inventory/system/board/CB
<7> inventory item at path /xyz/openbmc_project/inventory/system/board/Harma_Fan_Board_0
<7> inventory item at path /xyz/openbmc_project/inventory/system/board/Harma_Fan_Board_1
<7> inventory item at path /xyz/openbmc_project/inventory/system/board/Harma_MB
<7> found associated inventory item for Harme_MB_VR_CPU0_VCORE0: /xyz/openbmc_project/inventory/system/board/Harma_MB
<7> Harme_MB_VR_CPU0_VCORE0_5813: creating 'running' association to /xyz/openbmc_project/inventory/system/board/Harma_MB
<7> [Software] enabling update of /xyz/openbmc_project/software/Harme_MB_VR_CPU0_VCORE0_5813 (adding the update interface)
<7> Successfully updated to software version Harme_MB_VR_CPU0_VCORE0_5813
```
Change-Id: Ia7d7b19066cd2a55748eeffacc18e7d6c78ca797
Signed-off-by: Christopher Meis <christopher.meis@9elements.com>
diff --git a/i2c-vr/isl69269/isl69269.hpp b/i2c-vr/isl69269/isl69269.hpp
new file mode 100644
index 0000000..986c65d
--- /dev/null
+++ b/i2c-vr/isl69269/isl69269.hpp
@@ -0,0 +1,65 @@
+#pragma once
+
+#include "common/include/i2c/i2c.hpp"
+#include "i2c-vr/vr.hpp"
+
+#include <sdbusplus/async.hpp>
+
+#include <cstdint>
+
+namespace phosphor::software::VR
+{
+
+class ISL69269 : public VoltageRegulator
+{
+ public:
+ ISL69269(sdbusplus::async::context& ctx, uint16_t bus, uint16_t address);
+
+ sdbusplus::async::task<bool> verifyImage(const uint8_t* image,
+ size_t imageSize) final;
+
+ sdbusplus::async::task<bool> updateFirmware(bool force) final;
+ sdbusplus::async::task<bool> getCRC(uint32_t* checksum) final;
+ sdbusplus::async::task<bool> reset() final;
+
+ bool forcedUpdateAllowed() final;
+
+ private:
+ struct Data
+ {
+ uint8_t len;
+ uint8_t pec;
+ uint8_t addr;
+ uint8_t cmd;
+ uint8_t data[30];
+ };
+
+ struct Configuration
+ {
+ uint8_t addr;
+ uint8_t mode;
+ uint8_t cfgId;
+ uint16_t wrCnt;
+ uint32_t devIdExp;
+ uint32_t devRevExp;
+ uint32_t crcExp;
+ struct Data pData[1024];
+ };
+ sdbusplus::async::task<bool> dmaReadWrite(uint8_t* reg, uint8_t* resp);
+ sdbusplus::async::task<bool> getRemainingWrites(uint8_t* remain);
+ sdbusplus::async::task<bool> getHexMode(uint8_t* mode);
+ sdbusplus::async::task<bool> getDeviceId(uint32_t* deviceId);
+ sdbusplus::async::task<bool> getDeviceRevision(uint32_t* revision);
+ sdbusplus::async::task<bool> program();
+ sdbusplus::async::task<bool> getProgStatus();
+ sdbusplus::async::task<bool> restoreCfg();
+
+ bool parseImage(const uint8_t* image, size_t imageSize);
+ bool checkImage();
+
+ phosphor::i2c::I2C i2cInterface;
+ uint8_t mode;
+
+ struct Configuration configuration;
+};
+} // namespace phosphor::software::VR