All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Enable eeprom tlv command for SpacemiT K3 in main app
@ 2026-10-19  1:40 E Shattow
  2026-10-19  1:40 ` [PATCH 1/4] riscv: dts: spacemit: enable the i2c2 adapter on K3 Pico-ITX board E Shattow
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: E Shattow @ 2026-10-19  1:40 UTC (permalink / raw)
  To: u-boot, Yixun Lan; +Cc: E Shattow

Cherry-pick a few commits that have the required eeprom nodes and enable
the eeprom tlv command in SpacemiT K3 config. There's not any SPL in-tree
so don't worry yet about implementing such hooks or config options.

Aurelien Jarno (3):
  riscv: dts: spacemit: enable the i2c2 adapter on K3 Pico-ITX board
  riscv: dts: spacemit: add 24c02 eeprom on K3 Pico-ITX board
  riscv: dts: spacemit: add i2c aliases on K3 Pico-ITX board

E Shattow (1):
  configs: spacemit: k3: enable eeprom tlv command in main app

 configs/spacemit_k3_defconfig                 |  2 +
 .../src/riscv/spacemit/k3-pico-itx.dts        | 38 +++++++++++++++++++
 .../src/riscv/spacemit/k3-pinctrl.dtsi        | 11 ++++++
 3 files changed, 51 insertions(+)


base-commit: 8d534cec0cc0109a37c0ded8854da03f1526dc0e
-- 
2.53.0


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

* [PATCH 1/4] riscv: dts: spacemit: enable the i2c2 adapter on K3 Pico-ITX board
  2026-10-19  1:40 [PATCH 0/4] Enable eeprom tlv command for SpacemiT K3 in main app E Shattow
@ 2026-10-19  1:40 ` E Shattow
  2026-10-19  1:40 ` [PATCH 2/4] riscv: dts: spacemit: add 24c02 eeprom " E Shattow
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: E Shattow @ 2026-10-19  1:40 UTC (permalink / raw)
  To: u-boot, Sumit Garg, Yixun Lan, Tom Rini; +Cc: Aurelien Jarno

From: Aurelien Jarno <aurelien@aurel32.net>

Define I2C2 pinctrl properties, and enable it on the K3 Pico-ITX board.
It will be used by the 24c02 eeprom.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Yixun Lan <dlan@kernel.org>
Link: https://patch.msgid.link/20260623204431.498700-3-aurelien@aurel32.net
Signed-off-by: Yixun Lan <dlan@kernel.org>

[ upstream commit: 48dd3d020528e05795dfa46308ba5b59a1835bba ]

(cherry picked from commit 5b8d10184a9e7fb8b31d279e09e3673b8d69f690)
---
 dts/upstream/src/riscv/spacemit/k3-pico-itx.dts |  6 ++++++
 dts/upstream/src/riscv/spacemit/k3-pinctrl.dtsi | 11 +++++++++++
 2 files changed, 17 insertions(+)

diff --git a/dts/upstream/src/riscv/spacemit/k3-pico-itx.dts b/dts/upstream/src/riscv/spacemit/k3-pico-itx.dts
index b89c1521e664..dde6028a5ef3 100644
--- a/dts/upstream/src/riscv/spacemit/k3-pico-itx.dts
+++ b/dts/upstream/src/riscv/spacemit/k3-pico-itx.dts
@@ -43,6 +43,12 @@
 	};
 };
 
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c2_1_cfg>;
+	status = "okay";
+};
+
 &i2c8 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c8_cfg>;
diff --git a/dts/upstream/src/riscv/spacemit/k3-pinctrl.dtsi b/dts/upstream/src/riscv/spacemit/k3-pinctrl.dtsi
index 3ee1471f3798..50dc124c097f 100644
--- a/dts/upstream/src/riscv/spacemit/k3-pinctrl.dtsi
+++ b/dts/upstream/src/riscv/spacemit/k3-pinctrl.dtsi
@@ -78,6 +78,17 @@
 		};
 	};
 
+	/omit-if-no-ref/
+	i2c2_1_cfg: i2c2-1-cfg {
+		i2c2-1-pins {
+			pinmux = <K3_PADCONF(46, 5)>,	/* i2c2 scl */
+				 <K3_PADCONF(47, 5)>;	/* i2c2 sda */
+
+			bias-pull-up = <0>;
+			drive-strength = <25>;
+		};
+	};
+
 	/omit-if-no-ref/
 	i2c8_cfg: i2c8-cfg {
 		i2c8-pins {
-- 
2.53.0


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

* [PATCH 2/4] riscv: dts: spacemit: add 24c02 eeprom on K3 Pico-ITX board
  2026-10-19  1:40 [PATCH 0/4] Enable eeprom tlv command for SpacemiT K3 in main app E Shattow
  2026-10-19  1:40 ` [PATCH 1/4] riscv: dts: spacemit: enable the i2c2 adapter on K3 Pico-ITX board E Shattow
@ 2026-10-19  1:40 ` E Shattow
  2026-10-19  1:40 ` [PATCH 3/4] riscv: dts: spacemit: add i2c aliases " E Shattow
  2026-10-19  1:40 ` [PATCH 4/4] configs: spacemit: k3: enable eeprom tlv command in main app E Shattow
  3 siblings, 0 replies; 5+ messages in thread
From: E Shattow @ 2026-10-19  1:40 UTC (permalink / raw)
  To: u-boot, Sumit Garg, Yixun Lan, Tom Rini; +Cc: Aurelien Jarno

From: Aurelien Jarno <aurelien@aurel32.net>

The K3 Pico-ITX board includes a 24c02 eeprom, that stores the product
name, the part name, the MAC address of the network interfaces and the
board's serial number. These values are also exposed via an
onie,tlv-layout nvmem layout.

The eeprom is marked as read-only since its contents are not supposed to
be modified.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Yixun Lan <dlan@kernel.org>
Link: https://patch.msgid.link/20260623204431.498700-4-aurelien@aurel32.net
Signed-off-by: Yixun Lan <dlan@kernel.org>

[ upstream commit: 930491838c55c41317da9f263e3e9b013cb9aaa8 ]

(cherry picked from commit 3146b373c9699a456fa58b56a23d1127096cbc86)
---
 .../src/riscv/spacemit/k3-pico-itx.dts        | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/dts/upstream/src/riscv/spacemit/k3-pico-itx.dts b/dts/upstream/src/riscv/spacemit/k3-pico-itx.dts
index dde6028a5ef3..143bf6f41260 100644
--- a/dts/upstream/src/riscv/spacemit/k3-pico-itx.dts
+++ b/dts/upstream/src/riscv/spacemit/k3-pico-itx.dts
@@ -47,6 +47,36 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c2_1_cfg>;
 	status = "okay";
+
+	eeprom@50 {
+		compatible = "atmel,24c02";
+		reg = <0x50>;
+		pagesize = <8>;
+		read-only;
+		size = <256>;
+		status = "okay";
+
+		nvmem-layout {
+			compatible = "onie,tlv-layout";
+
+			mac-address {
+				#nvmem-cell-cells = <1>;
+			};
+
+			num-macs {
+			};
+
+			part-number {
+			};
+
+			product-name {
+			};
+
+			serial-number {
+			};
+
+		};
+	};
 };
 
 &i2c8 {
-- 
2.53.0


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

* [PATCH 3/4] riscv: dts: spacemit: add i2c aliases on K3 Pico-ITX board
  2026-10-19  1:40 [PATCH 0/4] Enable eeprom tlv command for SpacemiT K3 in main app E Shattow
  2026-10-19  1:40 ` [PATCH 1/4] riscv: dts: spacemit: enable the i2c2 adapter on K3 Pico-ITX board E Shattow
  2026-10-19  1:40 ` [PATCH 2/4] riscv: dts: spacemit: add 24c02 eeprom " E Shattow
@ 2026-10-19  1:40 ` E Shattow
  2026-10-19  1:40 ` [PATCH 4/4] configs: spacemit: k3: enable eeprom tlv command in main app E Shattow
  3 siblings, 0 replies; 5+ messages in thread
From: E Shattow @ 2026-10-19  1:40 UTC (permalink / raw)
  To: u-boot, Sumit Garg, Yixun Lan, Tom Rini; +Cc: Aurelien Jarno

From: Aurelien Jarno <aurelien@aurel32.net>

Add i2c aliases for i2c2 and i2c8 on K3 Pico-ITX board. This is useful
to keep a stable number for the /dev entries after loading the i2c-dev
module.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Yixun Lan <dlan@kernel.org>
Link: https://patch.msgid.link/20260623204431.498700-5-aurelien@aurel32.net
Signed-off-by: Yixun Lan <dlan@kernel.org>

[ upstream commit: ae4e84366b5d621171da2e9fae2b1f8bea3312b8 ]

(cherry picked from commit e1f4b93f2a556b0ae661285aa72cad07b3c65fa4)
---
 dts/upstream/src/riscv/spacemit/k3-pico-itx.dts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dts/upstream/src/riscv/spacemit/k3-pico-itx.dts b/dts/upstream/src/riscv/spacemit/k3-pico-itx.dts
index 143bf6f41260..309b4554d064 100644
--- a/dts/upstream/src/riscv/spacemit/k3-pico-itx.dts
+++ b/dts/upstream/src/riscv/spacemit/k3-pico-itx.dts
@@ -14,6 +14,8 @@
 
 	aliases {
 		ethernet0 = &eth0;
+		i2c2 = &i2c2;
+		i2c8 = &i2c8;
 		serial0 = &uart0;
 	};
 
-- 
2.53.0


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

* [PATCH 4/4] configs: spacemit: k3: enable eeprom tlv command in main app
  2026-10-19  1:40 [PATCH 0/4] Enable eeprom tlv command for SpacemiT K3 in main app E Shattow
                   ` (2 preceding siblings ...)
  2026-10-19  1:40 ` [PATCH 3/4] riscv: dts: spacemit: add i2c aliases " E Shattow
@ 2026-10-19  1:40 ` E Shattow
  3 siblings, 0 replies; 5+ messages in thread
From: E Shattow @ 2026-10-19  1:40 UTC (permalink / raw)
  To: u-boot, Yixun Lan, Tom Rini; +Cc: E Shattow

Enable "tlv" command. SPL is not yet upstream so this is only in the main
app.

Signed-off-by: E Shattow <e@freeshell.de>
---
 configs/spacemit_k3_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/spacemit_k3_defconfig b/configs/spacemit_k3_defconfig
index 586305c62322..66d1a36c79c3 100644
--- a/configs/spacemit_k3_defconfig
+++ b/configs/spacemit_k3_defconfig
@@ -22,6 +22,7 @@ CONFIG_SYS_CBSIZE=256
 CONFIG_SYS_PBSIZE=276
 # CONFIG_BOARD_INIT is not set
 CONFIG_HUSH_PARSER=y
+CONFIG_CMD_TLV_EEPROM=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_DHCP=y
@@ -44,6 +45,7 @@ CONFIG_SPACEMIT_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_SPACEMIT_K1=y
 CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
 CONFIG_PHY_GIGE=y
 CONFIG_DWC_ETH_QOS=y
 CONFIG_DWC_ETH_QOS_SPACEMIT=y
-- 
2.53.0


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

end of thread, other threads:[~2026-10-19  1:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-19  1:40 [PATCH 0/4] Enable eeprom tlv command for SpacemiT K3 in main app E Shattow
2026-10-19  1:40 ` [PATCH 1/4] riscv: dts: spacemit: enable the i2c2 adapter on K3 Pico-ITX board E Shattow
2026-10-19  1:40 ` [PATCH 2/4] riscv: dts: spacemit: add 24c02 eeprom " E Shattow
2026-10-19  1:40 ` [PATCH 3/4] riscv: dts: spacemit: add i2c aliases " E Shattow
2026-10-19  1:40 ` [PATCH 4/4] configs: spacemit: k3: enable eeprom tlv command in main app E Shattow

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.