diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2023-01-09 14:08:16 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-01-12 15:52:21 +0100 |
commit | ca11a805b2d16d5ed5f9f6fe64823cf20cecfde7 (patch) | |
tree | 5a1aa41e9a8fd5016563ef9e7eaf99473aa5f5aa /drivers/i2c | |
parent | 2ccdea1ab241193871281aff5768b55f88c40f44 (diff) | |
download | barebox-ca11a805b2d16d5ed5f9f6fe64823cf20cecfde7.tar.gz |
i2c: at91: extend for SAMA5D4 support
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.
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230109130822.1657470-6-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-at91.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c index 2fe21a7ec9..86fa4c03b7 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, @@ -493,9 +499,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 */ } }; |