riscv: dts: sifive unmatched: Expose the board ID eeprom
authorVincent Pelletier <plr.vincent@gmail.com>
Tue, 16 Nov 2021 23:57:38 +0000 (23:57 +0000)
committerPalmer Dabbelt <palmer@rivosinc.com>
Fri, 17 Dec 2021 05:27:21 +0000 (21:27 -0800)
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@gmail.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts

index f8648ee..d1f2289 100644 (file)
                interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
        };
 
+       eeprom@54 {
+               compatible = "microchip,24c02", "atmel,24c02";
+               reg = <0x54>;
+               vcc-supply = <&vdd_bpro>;
+               label = "board-id";
+               pagesize = <16>;
+               read-only;
+               size = <256>;
+       };
+
        pmic@58 {
                compatible = "dlg,da9063";
                reg = <0x58>;