summaryrefslogtreecommitdiff
path: root/include/sbi_utils
diff options
context:
space:
mode:
authorMinda Chen <[email protected]>2023-03-09 14:19:58 +0800
committerAnup Patel <[email protected]>2023-03-09 21:00:57 +0530
commite9d08bd99cc702fcec1c5b59b593781da668e2bc (patch)
tree8b1b2cf40e976b79274f85860d8aced45836726e /include/sbi_utils
parent4b28afc98bbe406e3ad6f4a97d0fe96a882e83a1 (diff)
lib: utils/i2c: Add minimal StarFive jh7110 I2C driver
Starfive JH7110 I2C IP is synopsys designware. Minimum StarFIve I2C driver to read/send bytes over I2C bus. This allows querying information and perform operation of onboard PMIC, as well as power-off and reset. Signed-off-by: Minda Chen <[email protected]> Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'include/sbi_utils')
-rw-r--r--include/sbi_utils/i2c/dw_i2c.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/sbi_utils/i2c/dw_i2c.h b/include/sbi_utils/i2c/dw_i2c.h
new file mode 100644
index 00000000..88703e05
--- /dev/null
+++ b/include/sbi_utils/i2c/dw_i2c.h
@@ -0,0 +1,21 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2022 StarFive Technology Co., Ltd.
+ *
+ * Author: Minda Chen <[email protected]>
+ */
+
+#ifndef __DW_I2C_H__
+#define __DW_I2C_H__
+
+#include <sbi_utils/i2c/i2c.h>
+
+int dw_i2c_init(struct i2c_adapter *, int nodeoff);
+
+struct dw_i2c_adapter {
+ unsigned long addr;
+ struct i2c_adapter adapter;
+};
+
+#endif