[PATCH 06/11] eeprom: at24: add 24mac402/602 support

Ahmad Fatoum a.fatoum at pengutronix.de
Wed Dec 14 02:58:26 PST 2022


The 24MAC chips feature an independent address mode for a MAC address.
Linux handles these by registering a device that's just 6/8 bytes of
size and that seeks to a fixed offset. In barebox, we'll just report
the real size and expect code to use the appropriate offset.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 drivers/eeprom/at24.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/eeprom/at24.c b/drivers/eeprom/at24.c
index 3103d7722a40..f4b43ffe3f8d 100644
--- a/drivers/eeprom/at24.c
+++ b/drivers/eeprom/at24.c
@@ -99,6 +99,8 @@ static struct platform_device_id at24_ids[] = {
 	/* old variants can't be handled with this generic entry! */
 	{ "24c01", AT24_DEVICE_MAGIC(1024 / 8, 0) },
 	{ "24c02", AT24_DEVICE_MAGIC(2048 / 8, 0) },
+	{ "24mac402",	AT24_DEVICE_MAGIC(2048 / 8, AT24_FLAG_READONLY) },
+	{ "24mac602",	AT24_DEVICE_MAGIC(2048 / 8, AT24_FLAG_READONLY) },
 	/* spd is a 24c02 in memory DIMMs */
 	{ "spd", AT24_DEVICE_MAGIC(2048 / 8,
 		AT24_FLAG_READONLY | AT24_FLAG_IRUGO) },
-- 
2.30.2




More information about the barebox mailing list