diff mbox series

imx8mn-var-som: dts: add SOM EEPROM

Message ID 20230427195639.2718734-1-hugo@hugovil.com (mailing list archive)
State New, archived
Headers show
Series imx8mn-var-som: dts: add SOM EEPROM | expand

Commit Message

Hugo Villeneuve April 27, 2023, 7:56 p.m. UTC
From: Hugo Villeneuve <hvilleneuve@dimonoff.com>

The 4Kbit EEPROM located on the SOM contains hardware configuration
options, manufacturing infos and ethernet MAC address.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
---
 arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Krzysztof Kozlowski April 28, 2023, 1:06 p.m. UTC | #1
On 27/04/2023 21:56, Hugo Villeneuve wrote:
> From: Hugo Villeneuve <hvilleneuve@dimonoff.com>

Thank you for your patch. There is something to discuss/improve.

> 
> The 4Kbit EEPROM located on the SOM contains hardware configuration
> options, manufacturing infos and ethernet MAC address.

Use subject prefixes matching the subsystem (which you can get for
example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
your patch is touching).

> 
> Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> ---
>  arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi
> index 9052b0d4b5b4..3ed396f41e46 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi
> @@ -30,6 +30,10 @@ reg_eth_phy: regulator-eth-phy {
>  		gpio = <&gpio2 9 GPIO_ACTIVE_HIGH>;
>  		enable-active-high;
>  	};
> +
> +	aliases {

Keep nodes ordered.

> +		eeprom_som = &eeprom_som;

That's no valid alias. Which upstream kernel driver makes use of this?

> +	};
>  };
>  

Best regards,
Krzysztof
Hugo Villeneuve May 1, 2023, 1:45 p.m. UTC | #2
On Fri, 28 Apr 2023 15:06:22 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> On 27/04/2023 21:56, Hugo Villeneuve wrote:
> > From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> 
> Thank you for your patch. There is something to discuss/improve.
> 
> > 
> > The 4Kbit EEPROM located on the SOM contains hardware configuration
> > options, manufacturing infos and ethernet MAC address.
> 
> Use subject prefixes matching the subsystem (which you can get for
> example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
> your patch is touching).
> 
> > 
> > Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> > ---
> >  arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi
> > index 9052b0d4b5b4..3ed396f41e46 100644
> > --- a/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi
> > @@ -30,6 +30,10 @@ reg_eth_phy: regulator-eth-phy {
> >  		gpio = <&gpio2 9 GPIO_ACTIVE_HIGH>;
> >  		enable-active-high;
> >  	};
> > +
> > +	aliases {
> 
> Keep nodes ordered.
> 
> > +		eeprom_som = &eeprom_som;
> 
> That's no valid alias. Which upstream kernel driver makes use of this?

Is "eeprom-som" ok?

No driver uses it for now..

Hugo.

> 
> > +	};
> >  };
> >  
> 
> Best regards,
> Krzysztof
> 
>
Krzysztof Kozlowski May 1, 2023, 4:27 p.m. UTC | #3
On 01/05/2023 15:45, Hugo Villeneuve wrote:
> On Fri, 28 Apr 2023 15:06:22 +0200
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> 
>> On 27/04/2023 21:56, Hugo Villeneuve wrote:
>>> From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
>>
>> Thank you for your patch. There is something to discuss/improve.
>>
>>>
>>> The 4Kbit EEPROM located on the SOM contains hardware configuration
>>> options, manufacturing infos and ethernet MAC address.
>>
>> Use subject prefixes matching the subsystem (which you can get for
>> example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
>> your patch is touching).
>>
>>>
>>> Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
>>> ---
>>>  arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi | 10 ++++++++++
>>>  1 file changed, 10 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi
>>> index 9052b0d4b5b4..3ed396f41e46 100644
>>> --- a/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi
>>> +++ b/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi
>>> @@ -30,6 +30,10 @@ reg_eth_phy: regulator-eth-phy {
>>>  		gpio = <&gpio2 9 GPIO_ACTIVE_HIGH>;
>>>  		enable-active-high;
>>>  	};
>>> +
>>> +	aliases {
>>
>> Keep nodes ordered.
>>
>>> +		eeprom_som = &eeprom_som;
>>
>> That's no valid alias. Which upstream kernel driver makes use of this?
> 
> Is "eeprom-som" ok?
> 
> No driver uses it for now..

None of them are valid if nothing uses them. There is also no clear
meaning of this alias to me. Why "som" should denote any alias in
upstream kernel?

Anyway, drop it as there are no users.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi
index 9052b0d4b5b4..3ed396f41e46 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi
@@ -30,6 +30,10 @@  reg_eth_phy: regulator-eth-phy {
 		gpio = <&gpio2 9 GPIO_ACTIVE_HIGH>;
 		enable-active-high;
 	};
+
+	aliases {
+		eeprom_som = &eeprom_som;
+	};
 };
 
 &A53_0 {
@@ -223,6 +227,12 @@  ldo6_reg: LDO6 {
 			};
 		};
 	};
+
+	eeprom_som: eeprom@52 {
+		compatible = "atmel,24c04";
+		reg = <0x52>;
+		pagesize = <16>;
+	};
 };
 
 &i2c3 {