2021-11-19 22:56:02

by Vincent Pelletier

[permalink] [raw]
Subject: [PATCH v3 2/6] riscv: dts: sifive unmatched: Expose the board ID eeprom

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 <[email protected]>

---
Changes since v2:
- Fix end-of-commit-message separator so change lists do not end up in them.
Changes since v1:
- Remove trailing "." on subject line.
---
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 305a086e5207..cf8937708829 100644
--- a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
+++ b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
@@ -58,6 +58,16 @@ temperature-sensor@4c {
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>;
--
2.33.1



2021-11-21 17:23:44

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v3 2/6] riscv: dts: sifive unmatched: Expose the board ID eeprom

On 19/11/2021 23:55, Vincent Pelletier wrote:
> 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 <[email protected]>
>
> ---
> Changes since v2:
> - Fix end-of-commit-message separator so change lists do not end up in them.
> Changes since v1:
> - Remove trailing "." on subject line.
> ---
> arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>


Reviewed-by: Krzysztof Kozlowski <[email protected]>


Best regards,
Krzysztof