[PATCH 05/11] i2c: at91: extend for SAMA5D4 support
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Dec 14 02:58:25 PST 2022
The driver was recently updated for SAMA5D2 support and SAMA5D4/SAM9x60
is straight-forward to add on top. While at it, drop has_clear_cmd,
which denotes hardware I2C bus recovery support. We never used the
member.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/i2c/busses/i2c-at91.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c
index b100dc6c17b5..1feae6cbf067 100644
--- a/drivers/i2c/busses/i2c-at91.c
+++ b/drivers/i2c/busses/i2c-at91.c
@@ -78,7 +78,6 @@ struct at91_twi_pdata {
bool has_dig_filtr;
bool has_adv_dig_filtr;
bool has_ana_filtr;
- bool has_clear_cmd;
};
struct at91_twi_dev {
@@ -438,6 +437,13 @@ static struct at91_twi_pdata at91sam9x5_config = {
.has_unre_flag = false,
};
+static struct at91_twi_pdata sama5d4_config = {
+ .clk_max_div = 7,
+ .clk_offset = 4,
+ .has_hold_field = true,
+ .has_dig_filtr = true,
+};
+
static struct at91_twi_pdata sama5d2_config = {
.clk_max_div = 7,
.clk_offset = 3,
@@ -492,9 +498,15 @@ static struct of_device_id at91_twi_dt_ids[] = {
}, {
.compatible = "atmel,at91sam9x5-i2c",
.data = &at91sam9x5_config,
+ }, {
+ .compatible = "atmel,sama5d4-i2c",
+ .data = &sama5d4_config,
}, {
.compatible = "atmel,sama5d2-i2c",
.data = &sama5d2_config,
+ }, {
+ .compatible = "microchip,sam9x60-i2c",
+ .data = &sama5d2_config,
}, {
/* sentinel */
}
--
2.30.2
More information about the barebox
mailing list