Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/2] riscv: dts: spacemit: add eeprom for K3 CoM260
@ 2026-07-22 20:28 Jennifer Berringer
  2026-07-22 20:28 ` [PATCH 1/2] riscv: dts: spacemit: k3-com260: add eeprom on i2c2 Jennifer Berringer
  2026-07-22 20:28 ` [PATCH 2/2] riscv: dts: spacemit: k3-com260-ifx: add eeprom on i2c1 Jennifer Berringer
  0 siblings, 2 replies; 4+ messages in thread
From: Jennifer Berringer @ 2026-07-22 20:28 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan
  Cc: devicetree, linux-riscv, spacemit, linux-kernel,
	Jennifer Berringer

SpacemiT K3 CoM260 Dev Kit has two eeproms: one on the compute
module and one on the carrier board. Both use a Giantec
GT24C02B-2TFLI-TR.

Jennifer Berringer (2):
  riscv: dts: spacemit: k3-com260: add eeprom on i2c2
  riscv: dts: spacemit: k3-com260-ifx: add eeprom on i2c1

 .../riscv/boot/dts/spacemit/k3-com260-ifx.dts | 15 +++++++++
 arch/riscv/boot/dts/spacemit/k3-com260.dtsi   | 32 +++++++++++++++++++
 arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi  | 12 +++++++
 3 files changed, 59 insertions(+)


base-commit: 199380e4d8cd22e539a08d4949e9582b09390bd5
-- 
2.55.0


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

* [PATCH 1/2] riscv: dts: spacemit: k3-com260: add eeprom on i2c2
  2026-07-22 20:28 [PATCH 0/2] riscv: dts: spacemit: add eeprom for K3 CoM260 Jennifer Berringer
@ 2026-07-22 20:28 ` Jennifer Berringer
  2026-07-22 20:28 ` [PATCH 2/2] riscv: dts: spacemit: k3-com260-ifx: add eeprom on i2c1 Jennifer Berringer
  1 sibling, 0 replies; 4+ messages in thread
From: Jennifer Berringer @ 2026-07-22 20:28 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan
  Cc: devicetree, linux-riscv, spacemit, linux-kernel,
	Jennifer Berringer

Enable i2c2 on the K3 CoM260 compute module and use it for a 24c02
eeprom. This eeprom stores the product name, a MAC address, and a serial
number.

Signed-off-by: Jennifer Berringer <jberring@redhat.com>
---
 arch/riscv/boot/dts/spacemit/k3-com260.dtsi | 32 +++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/riscv/boot/dts/spacemit/k3-com260.dtsi b/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
index a38d7b738258d..a6f160dca19de 100644
--- a/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
@@ -26,6 +26,38 @@ reg_5v_sys: regulator-5v-sys {
 	};
 };
 
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c2_1_cfg>;
+	status = "okay";
+
+	eeprom@50 {
+		compatible = "atmel,24c02";
+		pagesize = <8>;
+		reg = <0x50>;
+		read-only;
+		size = <256>;
+		status = "okay";
+
+		nvmem-layout {
+			compatible = "onie,tlv-layout";
+
+			mac-address {
+				#nvmem-cell-cells = <1>;
+			};
+
+			num-macs {
+			};
+
+			product-name {
+			};
+
+			serial-number {
+			};
+		};
+	};
+};
+
 &i2c8 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c8_cfg>;
-- 
2.55.0


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

* [PATCH 2/2] riscv: dts: spacemit: k3-com260-ifx: add eeprom on i2c1
  2026-07-22 20:28 [PATCH 0/2] riscv: dts: spacemit: add eeprom for K3 CoM260 Jennifer Berringer
  2026-07-22 20:28 ` [PATCH 1/2] riscv: dts: spacemit: k3-com260: add eeprom on i2c2 Jennifer Berringer
@ 2026-07-22 20:28 ` Jennifer Berringer
  2026-07-22 20:37   ` sashiko-bot
  1 sibling, 1 reply; 4+ messages in thread
From: Jennifer Berringer @ 2026-07-22 20:28 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan
  Cc: devicetree, linux-riscv, spacemit, linux-kernel,
	Jennifer Berringer

Enable i2c1 for k3-com260-ifx and use it for a 24c02 eeprom. This
eeprom, unlike the one connected to i2c2, is part of the carrier board.
Some boards do not have any data programmed on this eeprom from factory.

Signed-off-by: Jennifer Berringer <jberring@redhat.com>
---
 arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts | 15 +++++++++++++++
 arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi   | 12 ++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts b/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts
index e7f76cd24b903..a5c08a7a781a9 100644
--- a/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts
+++ b/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts
@@ -20,6 +20,21 @@ chosen {
 	};
 };
 
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_1_cfg>;
+	status = "okay";
+
+	eeprom@50 {
+		compatible = "atmel,24c02";
+		pagesize = <8>;
+		reg = <0x50>;
+		read-only;
+		size = <256>;
+		status = "okay";
+	};
+};
+
 &sdhci0 {
 	pinctrl-names = "default","uhs";
 	pinctrl-0 = <&mmc1_cfg>;
diff --git a/arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi b/arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi
index 5b9045e014345..6482d24be1394 100644
--- a/arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi
@@ -78,6 +78,18 @@ gmac1-phy-0-pins {
 		};
 	};
 
+	/omit-if-no-ref/
+	i2c1_1_cfg: i2c1-1-cfg {
+		i2c1-1-pins {
+			pinmux = <K3_PADCONF(54, 5)>,	/* i2c1 scl */
+				 <K3_PADCONF(55, 5)>;	/* i2c1 sda */
+
+			bias-pull-up = <1>;
+			drive-strength = <25>;
+			power-source = <1800>;
+		};
+	};
+
 	/omit-if-no-ref/
 	i2c2_1_cfg: i2c2-1-cfg {
 		i2c2-1-pins {
-- 
2.55.0


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

* Re: [PATCH 2/2] riscv: dts: spacemit: k3-com260-ifx: add eeprom on i2c1
  2026-07-22 20:28 ` [PATCH 2/2] riscv: dts: spacemit: k3-com260-ifx: add eeprom on i2c1 Jennifer Berringer
@ 2026-07-22 20:37   ` sashiko-bot
  0 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-07-22 20:37 UTC (permalink / raw)
  To: Jennifer Berringer; +Cc: devicetree, conor+dt, robh

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The unprogrammed carrier board EEPROM is incorrectly marked `read-only`, preventing it from being programmed.
--

--- Patch [2]: [PATCH 2/2] riscv: dts: spacemit: k3-com260-ifx: add eeprom on i2c1 ---
commit 94048b36205e1670d5a85578a1cb608f4a7a0439
Author: Jennifer Berringer <jberring@redhat.com>

riscv: dts: spacemit: k3-com260-ifx: add eeprom on i2c1

Enable i2c1 for the k3-com260-ifx board and attach a 24c02 EEPROM. The commit
message notes that this carrier board EEPROM comes unprogrammed from the
factory on some boards.

> diff --git a/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts b/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts
> index e7f76cd24b903..a5c08a7a781a9 100644
> --- a/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts
> +++ b/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts

[ ... ]

> @@ -20,6 +20,21 @@ chosen {
>  	};
>  };
>  
> +&i2c1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c1_1_cfg>;
> +	status = "okay";
> +
> +	eeprom@50 {
> +		compatible = "atmel,24c02";
> +		pagesize = <8>;
> +		reg = <0x50>;
> +		read-only;

[Severity: Medium]
The commit message mentions that some boards do not have any data programmed
on this EEPROM from the factory. Does marking this eeprom@50 node as
read-only prevent users or provisioning scripts from writing the initial
configuration data to the EEPROM from Linux?

> +		size = <256>;
> +		status = "okay";
> +	};
> +};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260722202848.1817988-1-jberring@redhat.com?part=2

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

end of thread, other threads:[~2026-07-22 20:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-22 20:28 [PATCH 0/2] riscv: dts: spacemit: add eeprom for K3 CoM260 Jennifer Berringer
2026-07-22 20:28 ` [PATCH 1/2] riscv: dts: spacemit: k3-com260: add eeprom on i2c2 Jennifer Berringer
2026-07-22 20:28 ` [PATCH 2/2] riscv: dts: spacemit: k3-com260-ifx: add eeprom on i2c1 Jennifer Berringer
2026-07-22 20:37   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox