[PATCH] ramips: add NVMEM cells with Netgear R6220 wifi EEPROMs

Rafał Miłecki zajec5 at gmail.com
Mon May 8 09:02:55 PDT 2023


From: Rafał Miłecki <rafal at milecki.pl>

This allows reading EEPROMs using NVMEM interface.

Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
 target/linux/ramips/dts/mt7621_netgear_r6220.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/target/linux/ramips/dts/mt7621_netgear_r6220.dts b/target/linux/ramips/dts/mt7621_netgear_r6220.dts
index 0f476ef060..2ebe58ca63 100644
--- a/target/linux/ramips/dts/mt7621_netgear_r6220.dts
+++ b/target/linux/ramips/dts/mt7621_netgear_r6220.dts
@@ -42,9 +42,22 @@
 		};
 
 		factory: partition at 2e00000 {
+			compatible = "nvmem-cells";
 			label = "factory";
 			reg = <0x2e00000 0x100000>;
 			read-only;
+
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0x2e00000 0x100000>;
+
+			eeprom0: eeprom at 0 {
+				reg = <0x0 0x400>;
+			};
+
+			eeprom1: eeprom at 8000 {
+				reg = <0x8000 0x200>;
+			};
 		};
 
 		partition at 4200000 {
-- 
2.35.3




More information about the openwrt-devel mailing list