diff options
author | Soby Mathew <soby.mathew@arm.com> | 2018-09-10 11:06:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-10 11:06:16 +0100 |
commit | e636812dce642cc45d65e3dba4c9ffbdb7169307 (patch) | |
tree | 317c782857e01dd233bd9f3b7218ddd970cf99fa /drivers/allwinner/sunxi_i2c.c | |
parent | ba72b1964aae67d9874a9906cd885c5784eefe9a (diff) | |
parent | 5069c1cfef76cc86e6ad15bdd75b9330c3181e76 (diff) |
Merge pull request #1534 from Icenowy/sun50i_h6_pmic
Add support for Allwinner H6 + X-Powers AXP805 PMIC combination
Diffstat (limited to 'drivers/allwinner/sunxi_i2c.c')
-rw-r--r-- | drivers/allwinner/sunxi_i2c.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/allwinner/sunxi_i2c.c b/drivers/allwinner/sunxi_i2c.c new file mode 100644 index 00000000..cc91ca58 --- /dev/null +++ b/drivers/allwinner/sunxi_i2c.c @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2018 Icenowy Zheng <icenowy@aosc.io> + * + * SPDX-License-Identifier: BSD-3-Clause + * https://spdx.org/licenses + */ + +/* This driver provides I2C support for Allwinner sunXi SoCs */ + +#include <mmio.h> + +#define CONFIG_SYS_TCLK 24000000 +#define CONFIG_SYS_I2C_SPEED 100000 +#define CONFIG_SYS_I2C_SLAVE 0 + +#define I2C_INTERRUPT_CLEAR_INVERTED + +struct mentor_i2c_regs { + uint32_t slave_address; + uint32_t xtnd_slave_addr; + uint32_t data; + uint32_t control; + uint32_t status; + uint32_t baudrate; + uint32_t soft_reset; +}; + +#include "../mentor/i2c/mi2cv.c" |