[PATCH v3 06/14] arm64: dts: qcom: lemans-evk: Add EEPROM and nvmem layout

Wasim Nazir posted 14 patches 4 weeks ago
There is a newer version of this series
[PATCH v3 06/14] arm64: dts: qcom: lemans-evk: Add EEPROM and nvmem layout
Posted by Wasim Nazir 4 weeks ago
From: Monish Chunara <quic_mchunara@quicinc.com>

Integrate the GT24C256C EEPROM via I2C to enable access to
board-specific non-volatile data.

Also, define an nvmem-layout to expose structured regions within the
EEPROM, allowing consumers to retrieve configuration data such as
Ethernet MAC addresses via the nvmem subsystem.

Signed-off-by: Monish Chunara <quic_mchunara@quicinc.com>
Signed-off-by: Wasim Nazir <wasim.nazir@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/lemans-evk.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/lemans-evk.dts b/arch/arm64/boot/dts/qcom/lemans-evk.dts
index c48cb4267b72..30c3e5bead07 100644
--- a/arch/arm64/boot/dts/qcom/lemans-evk.dts
+++ b/arch/arm64/boot/dts/qcom/lemans-evk.dts
@@ -319,6 +319,18 @@ expander3: gpio@3b {
 		#gpio-cells = <2>;
 		gpio-controller;
 	};
+
+	eeprom@50 {
+		compatible = "giantec,gt24c256c", "atmel,24c256";
+		reg = <0x50>;
+		pagesize = <64>;
+
+		nvmem-layout {
+			compatible = "fixed-layout";
+			#address-cells = <1>;
+			#size-cells = <1>;
+		};
+	};
 };
 
 &mdss0 {

-- 
2.51.0
Re: [PATCH v3 06/14] arm64: dts: qcom: lemans-evk: Add EEPROM and nvmem layout
Posted by Konrad Dybcio 3 weeks, 6 days ago
On 9/4/25 6:39 PM, Wasim Nazir wrote:
> From: Monish Chunara <quic_mchunara@quicinc.com>
> 
> Integrate the GT24C256C EEPROM via I2C to enable access to
> board-specific non-volatile data.
> 
> Also, define an nvmem-layout to expose structured regions within the
> EEPROM, allowing consumers to retrieve configuration data such as
> Ethernet MAC addresses via the nvmem subsystem.
> 
> Signed-off-by: Monish Chunara <quic_mchunara@quicinc.com>
> Signed-off-by: Wasim Nazir <wasim.nazir@oss.qualcomm.com>
> ---
>  arch/arm64/boot/dts/qcom/lemans-evk.dts | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/lemans-evk.dts b/arch/arm64/boot/dts/qcom/lemans-evk.dts
> index c48cb4267b72..30c3e5bead07 100644
> --- a/arch/arm64/boot/dts/qcom/lemans-evk.dts
> +++ b/arch/arm64/boot/dts/qcom/lemans-evk.dts
> @@ -319,6 +319,18 @@ expander3: gpio@3b {
>  		#gpio-cells = <2>;
>  		gpio-controller;
>  	};
> +
> +	eeprom@50 {
> +		compatible = "giantec,gt24c256c", "atmel,24c256";
> +		reg = <0x50>;
> +		pagesize = <64>;
> +
I'm not super happy that this would be the only line of defense, but
you probably want to add 'read-only' to the eeprom node (or not)

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad
Re: [PATCH v3 06/14] arm64: dts: qcom: lemans-evk: Add EEPROM and nvmem layout
Posted by Monish Chunara 3 weeks, 6 days ago
On Fri, Sep 05, 2025 at 02:07:50PM +0200, Konrad Dybcio wrote:
> On 9/4/25 6:39 PM, Wasim Nazir wrote:
> > From: Monish Chunara <quic_mchunara@quicinc.com>
> > 
> > Integrate the GT24C256C EEPROM via I2C to enable access to
> > board-specific non-volatile data.
> > 
> > Also, define an nvmem-layout to expose structured regions within the
> > EEPROM, allowing consumers to retrieve configuration data such as
> > Ethernet MAC addresses via the nvmem subsystem.
> > 
> > Signed-off-by: Monish Chunara <quic_mchunara@quicinc.com>
> > Signed-off-by: Wasim Nazir <wasim.nazir@oss.qualcomm.com>
> > ---
> >  arch/arm64/boot/dts/qcom/lemans-evk.dts | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/qcom/lemans-evk.dts b/arch/arm64/boot/dts/qcom/lemans-evk.dts
> > index c48cb4267b72..30c3e5bead07 100644
> > --- a/arch/arm64/boot/dts/qcom/lemans-evk.dts
> > +++ b/arch/arm64/boot/dts/qcom/lemans-evk.dts
> > @@ -319,6 +319,18 @@ expander3: gpio@3b {
> >  		#gpio-cells = <2>;
> >  		gpio-controller;
> >  	};
> > +
> > +	eeprom@50 {
> > +		compatible = "giantec,gt24c256c", "atmel,24c256";
> > +		reg = <0x50>;
> > +		pagesize = <64>;
> > +
> I'm not super happy that this would be the only line of defense, but
> you probably want to add 'read-only' to the eeprom node (or not)
>
The Ethernet interface requires both read and write access at the driver level
to store and retrieve MAC address and related data; therefore 'read-only' is not
added here.

Regards,
Monish