linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: allwinner: NanoPi R1S H5: use the correct compatible for the eeprom
@ 2021-10-01 14:50 Chukun Pan
  2021-10-05 17:48 ` Chen-Yu Tsai
  0 siblings, 1 reply; 2+ messages in thread
From: Chukun Pan @ 2021-10-01 14:50 UTC (permalink / raw)
  To: Rob Herring
  Cc: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel, Chukun Pan

The 'microchip,24c02' compatible does not match the at24 driver, so
replace it with 'atmel,24c02'. In addition, because the mac address
is stored on this eeprom, set it to read-only mode.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
---
 arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts
index 55bcdf8d1a07..4f01c17c49e0 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts
@@ -142,9 +142,10 @@
 	status = "okay";
 
 	eeprom@51 {
-		compatible = "microchip,24c02";
-		reg = <0x51>;
+		compatible = "atmel,24c02";
 		pagesize = <16>;
+		reg = <0x51>;
+		read-only; /* This holds our MAC */
 	};
 };
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] arm64: dts: allwinner: NanoPi R1S H5: use the correct compatible for the eeprom
  2021-10-01 14:50 [PATCH] arm64: dts: allwinner: NanoPi R1S H5: use the correct compatible for the eeprom Chukun Pan
@ 2021-10-05 17:48 ` Chen-Yu Tsai
  0 siblings, 0 replies; 2+ messages in thread
From: Chen-Yu Tsai @ 2021-10-05 17:48 UTC (permalink / raw)
  To: Chukun Pan
  Cc: Rob Herring, Maxime Ripard, Jernej Skrabec, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel

Hi,

On Fri, Oct 1, 2021 at 10:51 PM Chukun Pan <amadeus@jmu.edu.cn> wrote:
>
> The 'microchip,24c02' compatible does not match the at24 driver, so
> replace it with 'atmel,24c02'. In addition, because the mac address
> is stored on this eeprom, set it to read-only mode.
>
> Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
> ---
>  arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts
> index 55bcdf8d1a07..4f01c17c49e0 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts
> @@ -142,9 +142,10 @@
>         status = "okay";
>
>         eeprom@51 {
> -               compatible = "microchip,24c02";
> -               reg = <0x51>;
> +               compatible = "atmel,24c02";

You should add the atmel compatible as a fallback one, not replace the
microchip one.

Also FTR 24c02 is not the correct part number. It is 24aa025e48.


>                 pagesize = <16>;
> +               reg = <0x51>;

Please don't move the reg property. It should follow the compatible.

> +               read-only; /* This holds our MAC */

Please also add a cell representing the MAC address, and hook it up
to the GMAC. You can find an example here [1].

Regards
ChenYu

[1] https://lore.kernel.org/linux-rockchip/20210622034505.18824-1-cnsztl@gmail.com/

>         };
>  };
>
> --
> 2.17.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-05 17:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-01 14:50 [PATCH] arm64: dts: allwinner: NanoPi R1S H5: use the correct compatible for the eeprom Chukun Pan
2021-10-05 17:48 ` Chen-Yu Tsai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).