linux-sunxi.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/1] arm64: dts: allwinner: NanoPi R1S H5: Add generic compatible string for I2C EEPROM
@ 2021-10-10 13:50 Chukun Pan
  2021-10-10 13:50 ` [PATCH v2 1/1] " Chukun Pan
  0 siblings, 1 reply; 3+ messages in thread
From: Chukun Pan @ 2021-10-10 13:50 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Maxime Ripard, Rob Herring, Jernej Skrabec, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel, Chukun Pan

Hi ChenYu,

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

Thanks for correcting, I did it, also upgrade the commit message.

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

Frankly speaking, I’m a little confused about this. There is a rtl8153
usb network card on this machine, the original factory seems to store
its mac address on this eeprom. It seems that there is no usb network
card written in dts in the kernel before, and the rtl8152 driver may
also need to be modified accordingly to support reading the mac address
from eeprom.

Sorry for my bad English.

Thanks,
Chukun

Changes from v2:
* Typo fixes for the position format.
* Add a nvmem cell representing the MAC address.

Chukun Pan (1):
  arm64: dts: allwinner: NanoPi R1S H5: Add generic compatible string
    for I2C EEPROM

 .../arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

-- 
2.17.1


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

* [PATCH v2 1/1] arm64: dts: allwinner: NanoPi R1S H5: Add generic compatible string for I2C EEPROM
  2021-10-10 13:50 [PATCH v2 0/1] arm64: dts: allwinner: NanoPi R1S H5: Add generic compatible string for I2C EEPROM Chukun Pan
@ 2021-10-10 13:50 ` Chukun Pan
  2021-10-14  7:19   ` (subset) " Maxime Ripard
  0 siblings, 1 reply; 3+ messages in thread
From: Chukun Pan @ 2021-10-10 13:50 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Maxime Ripard, Rob Herring, Jernej Skrabec, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel, Chukun Pan

The 'microchip,24c02' compatible does not match the at24 driver, so
add this generic fallback to the device node compatible string to
make the device to match the driver using the OF device ID table.

Also set this eeprom to read-only mode because it stores the mac
address of the onboard usb network card.

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

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..55b369534a08 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,16 @@
 	status = "okay";
 
 	eeprom@51 {
-		compatible = "microchip,24c02";
+		compatible = "microchip,24c02", "atmel,24c02";
 		reg = <0x51>;
 		pagesize = <16>;
+		read-only;
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		eth_mac1: mac-address@fa {
+			reg = <0xfa 0x06>;
+		};
 	};
 };
 
-- 
2.17.1


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

* Re: (subset) [PATCH v2 1/1] arm64: dts: allwinner: NanoPi R1S H5: Add generic compatible string for I2C EEPROM
  2021-10-10 13:50 ` [PATCH v2 1/1] " Chukun Pan
@ 2021-10-14  7:19   ` Maxime Ripard
  0 siblings, 0 replies; 3+ messages in thread
From: Maxime Ripard @ 2021-10-14  7:19 UTC (permalink / raw)
  To: Chen-Yu Tsai, Chukun Pan
  Cc: Maxime Ripard, linux-sunxi, linux-arm-kernel, Rob Herring,
	linux-kernel, Jernej Skrabec, devicetree, Maxime Ripard

On Sun, 10 Oct 2021 21:50:17 +0800, Chukun Pan wrote:
> The 'microchip,24c02' compatible does not match the at24 driver, so
> add this generic fallback to the device node compatible string to
> make the device to match the driver using the OF device ID table.
> 
> Also set this eeprom to read-only mode because it stores the mac
> address of the onboard usb network card.
> 
> [...]

Applied to local tree (sunxi/dt-for-5.16).

Thanks!
Maxime

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

end of thread, other threads:[~2021-10-14  7:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-10 13:50 [PATCH v2 0/1] arm64: dts: allwinner: NanoPi R1S H5: Add generic compatible string for I2C EEPROM Chukun Pan
2021-10-10 13:50 ` [PATCH v2 1/1] " Chukun Pan
2021-10-14  7:19   ` (subset) " Maxime Ripard

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).