lib: utils/i2c: Add minimal SiFive I2C driver

Minimum SiFive 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.

Tested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Tested-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Signed-off-by: Nikita Shubin <n.shubin@yadro.com>
This commit is contained in:
Nikita Shubin
2021-11-10 12:42:29 +03:00
committed by Anup Patel
parent 6ca6bcafb7
commit 13a1158d24
3 changed files with 281 additions and 0 deletions

View File

@@ -18,7 +18,10 @@
#include <sbi/sbi_console.h>
extern struct fdt_i2c_adapter fdt_i2c_adapter_sifive;
static struct fdt_i2c_adapter *i2c_adapter_drivers[] = {
&fdt_i2c_adapter_sifive
};
static int fdt_i2c_adapter_init(void *fdt, int nodeoff)