summaryrefslogtreecommitdiff
path: root/tools/src/pmgr.h
diff options
context:
space:
mode:
authormagh <magh@maghmogh.com>2023-03-06 18:44:55 -0600
committermagh <magh@maghmogh.com>2023-03-06 18:44:55 -0600
commite80d9d8871b325a04b18f90a9ea4bb7fd148fb25 (patch)
tree79dbdb8506b7ff1e92549188d1b94cfc0b3503ae /tools/src/pmgr.h
add m1n1HEADmaster
Diffstat (limited to 'tools/src/pmgr.h')
-rw-r--r--tools/src/pmgr.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/src/pmgr.h b/tools/src/pmgr.h
new file mode 100644
index 0000000..5dcc939
--- /dev/null
+++ b/tools/src/pmgr.h
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: MIT */
+
+#ifndef PMGR_H
+#define PMGR_H
+
+#include "types.h"
+
+#define PMGR_DIE_OFFSET 0x2000000000
+
+#define PMGR_DEVICE_ID GENMASK(15, 0)
+#define PMGR_DIE_ID GENMASK(31, 28)
+
+int pmgr_init(void);
+
+int pmgr_power_enable(u32 id);
+int pmgr_power_disable(u32 id);
+
+int pmgr_adt_power_enable(const char *path);
+int pmgr_adt_power_disable(const char *path);
+int pmgr_adt_reset(const char *path);
+
+int pmgr_reset(int die, const char *name);
+
+#endif