[linux-riscv][J][PATCHv2 08/17] riscv: dts: sifive unmatched: Expose the board ID eeprom

Dimitri John Ledkov dimitri.ledkov at canonical.com
Fri Feb 25 20:54:41 UTC 2022


From: Vincent Pelletier <plr.vincent at gmail.com>

Mark it as read-only as it is factory-programmed with identifying
information, and no executable nor configuration:
- eth MAC address
- board model (PCB version, BoM version)
- board serial number
Accidental modification would cause misidentification which could brick
the board, so marking read-only seem like both a safe and non-constraining
choice.

Signed-off-by: Vincent Pelletier <plr.vincent at gmail.com>
Signed-off-by: Palmer Dabbelt <palmer at rivosinc.com>
(cherry picked from commit 8120393b74b31bbaf293f59896de6b0d50febc48)
BugLink: https://bugs.launchpad.net/bugs/1962010
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov at canonical.com>
---
 arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
index c06dec9343..e545b2b6d2 100644
--- a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
+++ b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
@@ -100,6 +100,16 @@ temperature-sensor at 4c {
 		interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
 	};
 
+	eeprom at 54 {
+		compatible = "microchip,24c02", "atmel,24c02";
+		reg = <0x54>;
+		vcc-supply = <&vdd_bpro>;
+		label = "board-id";
+		pagesize = <16>;
+		read-only;
+		size = <256>;
+	};
+
 	pmic at 58 {
 		compatible = "dlg,da9063";
 		reg = <0x58>;
-- 
2.32.0




More information about the kernel-team mailing list