[PATCH v2] arm64: zynqmp: Define eeprom fixed partitions in DT

Michal Simek michal.simek at xilinx.com
Wed Jul 22 12:20:33 CEST 2020


Use fixed partition to cover eeprom content on zynqmp boards.

Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---

Changes in v2:
- remove address/size cells from eeprom nodes - it is not needed
- Add missing compatible node to zcu102

 arch/arm/dts/zynqmp-zcu102-rev1.0.dts | 29 +++++++++++++++------------
 arch/arm/dts/zynqmp-zcu104-revA.dts   | 23 +++++++++++++++++++--
 arch/arm/dts/zynqmp-zcu104-revC.dts   | 23 +++++++++++++++++++--
 arch/arm/dts/zynqmp-zcu106-revA.dts   | 21 +++++++++++++++++++
 arch/arm/dts/zynqmp-zcu111-revA.dts   | 21 +++++++++++++++++++
 arch/arm/dts/zynqmp-zcu1285-revA.dts  | 21 +++++++++++++++++++
 arch/arm/dts/zynqmp-zcu208-revA.dts   | 21 +++++++++++++++++++
 arch/arm/dts/zynqmp-zcu216-revA.dts   | 21 +++++++++++++++++++
 8 files changed, 163 insertions(+), 17 deletions(-)

diff --git a/arch/arm/dts/zynqmp-zcu102-rev1.0.dts b/arch/arm/dts/zynqmp-zcu102-rev1.0.dts
index d508f3359943..aed8548bc786 100644
--- a/arch/arm/dts/zynqmp-zcu102-rev1.0.dts
+++ b/arch/arm/dts/zynqmp-zcu102-rev1.0.dts
@@ -15,22 +15,25 @@
 };
 
 &eeprom {
-	#address-cells = <1>;
-	#size-cells = <1>;
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
 
-	board_sn: board-sn at 0 {
-		reg = <0x0 0x14>;
-	};
+		board_sn: board-sn at 0 {
+			reg = <0x0 0x14>;
+		};
 
-	eth_mac: eth-mac at 20 {
-		reg = <0x20 0x6>;
-	};
+		eth_mac: eth-mac at 20 {
+			reg = <0x20 0x6>;
+		};
 
-	board_name: board-name at d0 {
-		reg = <0xd0 0x6>;
-	};
+		board_name: board-name at d0 {
+			reg = <0xd0 0x6>;
+		};
 
-	board_revision: board-revision at e0 {
-		reg = <0xe0 0x3>;
+		board_revision: board-revision at e0 {
+			reg = <0xe0 0x3>;
+		};
 	};
 };
diff --git a/arch/arm/dts/zynqmp-zcu104-revA.dts b/arch/arm/dts/zynqmp-zcu104-revA.dts
index a4bd6b800a18..78949c313445 100644
--- a/arch/arm/dts/zynqmp-zcu104-revA.dts
+++ b/arch/arm/dts/zynqmp-zcu104-revA.dts
@@ -128,8 +128,27 @@
 			eeprom: eeprom at 54 { /* u23 */
 				compatible = "atmel,24c08";
 				reg = <0x54>;
-				#address-cells = <1>;
-				#size-cells = <1>;
+				partitions {
+					compatible = "fixed-partitions";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					board_sn: board-sn at 0 {
+						reg = <0x0 0x14>;
+					};
+
+					eth_mac: eth-mac at 20 {
+						reg = <0x20 0x6>;
+					};
+
+					board_name: board-name at d0 {
+						reg = <0xd0 0x6>;
+					};
+
+					board_revision: board-revision at e0 {
+						reg = <0xe0 0x3>;
+					};
+				};
 			};
 		};
 
diff --git a/arch/arm/dts/zynqmp-zcu104-revC.dts b/arch/arm/dts/zynqmp-zcu104-revC.dts
index d4b3769a27cc..35e4cec15213 100644
--- a/arch/arm/dts/zynqmp-zcu104-revC.dts
+++ b/arch/arm/dts/zynqmp-zcu104-revC.dts
@@ -153,8 +153,27 @@
 			eeprom: eeprom at 54 { /* u23 */
 				compatible = "atmel,24c08";
 				reg = <0x54>;
-				#address-cells = <1>;
-				#size-cells = <1>;
+				partitions {
+					compatible = "fixed-partitions";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					board_sn: board-sn at 0 {
+						reg = <0x0 0x14>;
+					};
+
+					eth_mac: eth-mac at 20 {
+						reg = <0x20 0x6>;
+					};
+
+					board_name: board-name at d0 {
+						reg = <0xd0 0x6>;
+					};
+
+					board_revision: board-revision at e0 {
+						reg = <0xe0 0x3>;
+					};
+				};
 			};
 		};
 
diff --git a/arch/arm/dts/zynqmp-zcu106-revA.dts b/arch/arm/dts/zynqmp-zcu106-revA.dts
index 221685fd23be..5f4cd17505e1 100644
--- a/arch/arm/dts/zynqmp-zcu106-revA.dts
+++ b/arch/arm/dts/zynqmp-zcu106-revA.dts
@@ -483,6 +483,27 @@
 			eeprom: eeprom at 54 { /* u23 */
 				compatible = "atmel,24c08";
 				reg = <0x54>;
+				partitions {
+					compatible = "fixed-partitions";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					board_sn: board-sn at 0 {
+						reg = <0x0 0x14>;
+					};
+
+					eth_mac: eth-mac at 20 {
+						reg = <0x20 0x6>;
+					};
+
+					board_name: board-name at d0 {
+						reg = <0xd0 0x6>;
+					};
+
+					board_revision: board-revision at e0 {
+						reg = <0xe0 0x3>;
+					};
+				};
 			};
 		};
 		i2c at 1 {
diff --git a/arch/arm/dts/zynqmp-zcu111-revA.dts b/arch/arm/dts/zynqmp-zcu111-revA.dts
index 63e285fe9a9a..cae83222bd90 100644
--- a/arch/arm/dts/zynqmp-zcu111-revA.dts
+++ b/arch/arm/dts/zynqmp-zcu111-revA.dts
@@ -379,6 +379,27 @@
 			eeprom: eeprom at 54 { /* u88 */
 				compatible = "atmel,24c08";
 				reg = <0x54>;
+				partitions {
+					compatible = "fixed-partitions";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					board_sn: board-sn at 0 {
+						reg = <0x0 0x14>;
+					};
+
+					eth_mac: eth-mac at 20 {
+						reg = <0x20 0x6>;
+					};
+
+					board_name: board-name at d0 {
+						reg = <0xd0 0x6>;
+					};
+
+					board_revision: board-revision at e0 {
+						reg = <0xe0 0x3>;
+					};
+				};
 			};
 		};
 		i2c at 1 {
diff --git a/arch/arm/dts/zynqmp-zcu1285-revA.dts b/arch/arm/dts/zynqmp-zcu1285-revA.dts
index d8b9cb1a9e13..3e6737edcfaf 100644
--- a/arch/arm/dts/zynqmp-zcu1285-revA.dts
+++ b/arch/arm/dts/zynqmp-zcu1285-revA.dts
@@ -152,6 +152,27 @@
 			eeprom: eeprom at 54 { /* u101 */
 				compatible = "atmel,24c32"; /* 24LC32A */
 				reg = <0x54>;
+				partitions {
+					compatible = "fixed-partitions";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					board_sn: board-sn at 0 {
+						reg = <0x0 0x14>;
+					};
+
+					eth_mac: eth-mac at 20 {
+						reg = <0x20 0x6>;
+					};
+
+					board_name: board-name at d0 {
+						reg = <0xd0 0x6>;
+					};
+
+					board_revision: board-revision at e0 {
+						reg = <0xe0 0x3>;
+					};
+				};
 			};
 		};
 		i2c at 3 {
diff --git a/arch/arm/dts/zynqmp-zcu208-revA.dts b/arch/arm/dts/zynqmp-zcu208-revA.dts
index 118a2de96b3c..e6e99cf8be96 100644
--- a/arch/arm/dts/zynqmp-zcu208-revA.dts
+++ b/arch/arm/dts/zynqmp-zcu208-revA.dts
@@ -397,6 +397,27 @@
 			eeprom: eeprom at 54 { /* u21 */
 				compatible = "atmel,24c128";
 				reg = <0x54>;
+				partitions {
+					compatible = "fixed-partitions";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					board_sn: board-sn at 0 {
+						reg = <0x0 0x14>;
+					};
+
+					eth_mac: eth-mac at 20 {
+						reg = <0x20 0x6>;
+					};
+
+					board_name: board-name at d0 {
+						reg = <0xd0 0x6>;
+					};
+
+					board_revision: board-revision at e0 {
+						reg = <0xe0 0x3>;
+					};
+				};
 			};
 		};
 		i2c_si5341: i2c at 1 {
diff --git a/arch/arm/dts/zynqmp-zcu216-revA.dts b/arch/arm/dts/zynqmp-zcu216-revA.dts
index e454bfcba797..b55defff6e45 100644
--- a/arch/arm/dts/zynqmp-zcu216-revA.dts
+++ b/arch/arm/dts/zynqmp-zcu216-revA.dts
@@ -401,6 +401,27 @@
 			eeprom: eeprom at 54 { /* u21 */
 				compatible = "atmel,24c128";
 				reg = <0x54>;
+				partitions {
+					compatible = "fixed-partitions";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					board_sn: board-sn at 0 {
+						reg = <0x0 0x14>;
+					};
+
+					eth_mac: eth-mac at 20 {
+						reg = <0x20 0x6>;
+					};
+
+					board_name: board-name at d0 {
+						reg = <0xd0 0x6>;
+					};
+
+					board_revision: board-revision at e0 {
+						reg = <0xe0 0x3>;
+					};
+				};
 			};
 		};
 		i2c_si5341: i2c at 1 {
-- 
2.27.0



More information about the U-Boot mailing list