From 79df8e99fb5cc4c0e2716b1051302f72df28ee04 Mon Sep 17 00:00:00 2001
From: Josua Mayer <josua@solid-run.com>
Date: Sun, 13 Mar 2022 10:54:15 +0200
Subject: [PATCH] add SoM and Carrier eeproms

Signed-off-by: Josua Mayer <josua@solid-run.com>
---
 arch/arm/dts/cn9130-cex7-A.dts  | 11 ++++++-----
 arch/arm/dts/cn9130-cf-base.dts | 20 +++++++++++++++-----
 arch/arm/dts/cn9130-cf-pro.dts  | 20 +++++++++++++++-----
 3 files changed, 36 insertions(+), 15 deletions(-)

diff --git a/arch/arm/dts/cn9130-cex7-A.dts b/arch/arm/dts/cn9130-cex7-A.dts
index 2db0fc802e..209e485822 100644
--- a/arch/arm/dts/cn9130-cex7-A.dts
+++ b/arch/arm/dts/cn9130-cex7-A.dts
@@ -147,12 +147,13 @@
 	pinctrl-0 = <&cp0_i2c0_pins>;
 	status = "okay";
 	clock-frequency = <100000>;
-	eeprom0: eeprom@50 {
-                compatible = "atmel,24c64";
-                reg = <0x50>;
-                pagesize = <0x20>;
-        };
 
+	/* M24C0x-MWN */
+	com_eeprom@50 {
+		compatible = "atmel,24c02";
+		reg = <0x50>;
+		pagesize = <0x10>;
+	};
 };
 
 &cp0_i2c1 {
diff --git a/arch/arm/dts/cn9130-cf-base.dts b/arch/arm/dts/cn9130-cf-base.dts
index a9d4a4491f..355c9d8ed0 100644
--- a/arch/arm/dts/cn9130-cf-base.dts
+++ b/arch/arm/dts/cn9130-cf-base.dts
@@ -145,11 +145,7 @@
 	pinctrl-0 = <&cp0_i2c0_pins>;
 	status = "okay";
 	clock-frequency = <100000>;
-	eeprom0: eeprom@50 {
-                compatible = "atmel,24c64";
-                reg = <0x53>;
-                pagesize = <0x20>;
-        };
+
 	/*
 	 * PCA9655 GPIO expander, up to 1MHz clock.
 	 *  0-CON3 CLKREQ#
@@ -225,6 +221,20 @@
 			line-name = "m.2 devslp";
 		};
 	};
+
+	/* 24AA025UID */
+	carrier_eeprom@52 {
+		compatible = "atmel,24c02";
+		reg = <0x52>;
+		pagesize = <8>;
+	};
+
+	/* M24C02-WMN6TP */
+	som_eeprom@53 {
+		compatible = "atmel,24c02";
+		reg = <0x53>;
+		pagesize = <16>;
+	};
 };
 
 &cp0_i2c1 {
diff --git a/arch/arm/dts/cn9130-cf-pro.dts b/arch/arm/dts/cn9130-cf-pro.dts
index fb37dd833d..6931818cf6 100644
--- a/arch/arm/dts/cn9130-cf-pro.dts
+++ b/arch/arm/dts/cn9130-cf-pro.dts
@@ -145,11 +145,7 @@
 	pinctrl-0 = <&cp0_i2c0_pins>;
 	status = "okay";
 	clock-frequency = <100000>;
-	eeprom0: eeprom@50 {
-                compatible = "atmel,24c64";
-                reg = <0x53>;
-                pagesize = <0x20>;
-        };
+
 	/*
 	 * PCA9655 GPIO expander, up to 1MHz clock.
 	 *  0-CON3 CLKREQ#
@@ -231,6 +227,20 @@
 			line-name = "m.2 devslp";
 		};
 	};
+
+	/* 24AA025UID */
+	carrier_eeprom@52 {
+		compatible = "atmel,24c02";
+		reg = <0x52>;
+		pagesize = <8>;
+	};
+
+	/* M24C02-WMN6TP */
+	som_eeprom@53 {
+		compatible = "atmel,24c02";
+		reg = <0x53>;
+		pagesize = <16>;
+	};
 };
 
 &cp0_i2c1 {
