* [PATCH 0/5] riscv: dts: spacemit: k3-com260: Describe SD card, SPI NOR and MAC
@ 2026-11-05 8:23 Troy Mitchell
2026-11-05 8:23 ` [PATCH 1/5] riscv: dts: spacemit: k3-com260-ifx: Drop wrong SD card vmmc-supply Troy Mitchell
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Troy Mitchell @ 2026-11-05 8:23 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
Troy Mitchell, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: devicetree, linux-riscv, spacemit, linux-kernel
The SD card slot and the SPI NOR flash of the K3 CoM260 module, and the
MAC address stored in its EEPROM, are part of the module, but they are
either described only in the IFX carrier device tree or not described
at all.
Fix the SD card power description, move the SD card slot into the
shared CoM260 device tree and describe the SPI NOR flash there. Enable
the AT24 EEPROM driver and the ONIE TLV layout in the RISC-V defconfig,
then let the module's Ethernet controller take its MAC address from the
module EEPROM. Every carrier using the module inherits these
descriptions.
---
Troy Mitchell (5):
riscv: dts: spacemit: k3-com260-ifx: Drop wrong SD card vmmc-supply
riscv: dts: spacemit: k3-com260: Move SD card to the module
riscv: dts: spacemit: k3-com260: Add SPI NOR flash
riscv: defconfig: Enable AT24 EEPROM and ONIE TLV layout
riscv: dts: spacemit: k3-com260: Set Ethernet MAC from EEPROM
arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts | 18 ------
arch/riscv/boot/dts/spacemit/k3-com260.dtsi | 76 +++++++++++++++++++++++++-
arch/riscv/configs/defconfig | 2 +
3 files changed, 77 insertions(+), 19 deletions(-)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261105-k3-com260-module-sd-nor-mac-44edede14582
Best regards,
--
Troy Mitchell <troy.mitchell@linux.spacemit.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/5] riscv: dts: spacemit: k3-com260-ifx: Drop wrong SD card vmmc-supply
2026-11-05 8:23 [PATCH 0/5] riscv: dts: spacemit: k3-com260: Describe SD card, SPI NOR and MAC Troy Mitchell
@ 2026-11-05 8:23 ` Troy Mitchell
2026-11-05 8:23 ` [PATCH 2/5] riscv: dts: spacemit: k3-com260: Move SD card to the module Troy Mitchell
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Troy Mitchell @ 2026-11-05 8:23 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
Troy Mitchell, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: devicetree, linux-riscv, spacemit, linux-kernel
The SD card VDD on the K3 CoM260 module comes from a fixed, always-on
3.3 V rail that software cannot control. ALDO4 of the P1 PMIC does not
supply the card, so referencing it as vmmc-supply describes the wrong
power wiring.
Drop the vmmc-supply property. It is optional for a card powered by a
fixed supply, and the SDHCI core then uses the voltages advertised by
the controller.
Fixes: 055044260e7a ("riscv: dts: spacemit: k3: Enable SD card support")
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts b/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts
index fadcf28389be..6e295bc6f196 100644
--- a/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts
+++ b/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts
@@ -122,7 +122,6 @@ &sdhci0 {
no-sdio;
disable-wp;
cap-sd-highspeed;
- vmmc-supply = <&aldo4>;
vqmmc-supply = <&aldo1>;
sd-uhs-sdr25;
sd-uhs-sdr50;
--
2.56.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/5] riscv: dts: spacemit: k3-com260: Move SD card to the module
2026-11-05 8:23 [PATCH 0/5] riscv: dts: spacemit: k3-com260: Describe SD card, SPI NOR and MAC Troy Mitchell
2026-11-05 8:23 ` [PATCH 1/5] riscv: dts: spacemit: k3-com260-ifx: Drop wrong SD card vmmc-supply Troy Mitchell
@ 2026-11-05 8:23 ` Troy Mitchell
2026-11-05 8:23 ` [PATCH 3/5] riscv: dts: spacemit: k3-com260: Add SPI NOR flash Troy Mitchell
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Troy Mitchell @ 2026-11-05 8:23 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
Troy Mitchell, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: devicetree, linux-riscv, spacemit, linux-kernel
The SD card slot, its power supply and the signal-voltage switching
circuitry reside on the K3 CoM260 module. Describing the slot only in
the IFX carrier board leaves other CoM260 carriers without this shared
hardware description.
Move the SD controller configuration into the module include without
changing its properties, so every carrier using the module inherits it.
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts | 17 -----------------
arch/riscv/boot/dts/spacemit/k3-com260.dtsi | 17 +++++++++++++++++
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts b/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts
index 6e295bc6f196..38809d01df82 100644
--- a/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts
+++ b/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts
@@ -111,20 +111,3 @@ hub_3_0: hub@2 {
&usb3b_u2phy {
status = "okay";
};
-
-&sdhci0 {
- pinctrl-names = "default","uhs";
- pinctrl-0 = <&mmc1_cfg>;
- pinctrl-1 = <&mmc1_uhs_cfg>;
- bus-width = <4>;
- cd-gpios = <&gpio K3_GPIO(4) GPIO_ACTIVE_HIGH>;
- no-mmc;
- no-sdio;
- disable-wp;
- cap-sd-highspeed;
- vqmmc-supply = <&aldo1>;
- sd-uhs-sdr25;
- sd-uhs-sdr50;
- sd-uhs-sdr104;
- status = "okay";
-};
diff --git a/arch/riscv/boot/dts/spacemit/k3-com260.dtsi b/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
index 054bfff7413a..f2df797a2c80 100644
--- a/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
@@ -233,6 +233,23 @@ phy1: ethernet-phy@1 {
};
};
+&sdhci0 {
+ pinctrl-names = "default","uhs";
+ pinctrl-0 = <&mmc1_cfg>;
+ pinctrl-1 = <&mmc1_uhs_cfg>;
+ bus-width = <4>;
+ cd-gpios = <&gpio K3_GPIO(4) GPIO_ACTIVE_HIGH>;
+ no-mmc;
+ no-sdio;
+ disable-wp;
+ cap-sd-highspeed;
+ vqmmc-supply = <&aldo1>;
+ sd-uhs-sdr25;
+ sd-uhs-sdr50;
+ sd-uhs-sdr104;
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_0_cfg>;
--
2.56.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/5] riscv: dts: spacemit: k3-com260: Add SPI NOR flash
2026-11-05 8:23 [PATCH 0/5] riscv: dts: spacemit: k3-com260: Describe SD card, SPI NOR and MAC Troy Mitchell
2026-11-05 8:23 ` [PATCH 1/5] riscv: dts: spacemit: k3-com260-ifx: Drop wrong SD card vmmc-supply Troy Mitchell
2026-11-05 8:23 ` [PATCH 2/5] riscv: dts: spacemit: k3-com260: Move SD card to the module Troy Mitchell
@ 2026-11-05 8:23 ` Troy Mitchell
2026-11-05 8:23 ` [PATCH 4/5] riscv: defconfig: Enable AT24 EEPROM and ONIE TLV layout Troy Mitchell
2026-11-05 8:23 ` [PATCH 5/5] riscv: dts: spacemit: k3-com260: Set Ethernet MAC from EEPROM Troy Mitchell
4 siblings, 0 replies; 8+ messages in thread
From: Troy Mitchell @ 2026-11-05 8:23 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
Troy Mitchell, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: devicetree, linux-riscv, spacemit, linux-kernel
The K3 CoM260 module carries the SPI NOR flash that holds the boot
firmware. Enable the QSPI controller with its 1.8 V pin configuration
and describe the flash together with the partition layout used by the
boot firmware, so that every carrier using the module gets access to
it.
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
arch/riscv/boot/dts/spacemit/k3-com260.dtsi | 55 +++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k3-com260.dtsi b/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
index f2df797a2c80..f94607cb2eeb 100644
--- a/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
@@ -233,6 +233,61 @@ phy1: ethernet-phy@1 {
};
};
+&qspi_cfg {
+ qspi-pins {
+ power-source = <1800>;
+ };
+
+ qspi-cs0-pins {
+ power-source = <1800>;
+ };
+};
+
+&qspi {
+ pinctrl-names = "default";
+ pinctrl-0 = <&qspi_cfg>;
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <26500000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <4>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ bootinfo@0 {
+ reg = <0x0 0x20000>;
+ };
+
+ fsbl@20000 {
+ reg = <0x20000 0x80000>;
+ };
+
+ env@a0000 {
+ reg = <0xa0000 0x10000>;
+ };
+
+ esos@b0000 {
+ reg = <0xb0000 0x100000>;
+ };
+
+ opensbi@1b0000 {
+ reg = <0x1b0000 0x60000>;
+ };
+
+ uboot@210000 {
+ reg = <0x210000 0x5f0000>;
+ };
+ };
+ };
+};
+
&sdhci0 {
pinctrl-names = "default","uhs";
pinctrl-0 = <&mmc1_cfg>;
--
2.56.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 4/5] riscv: defconfig: Enable AT24 EEPROM and ONIE TLV layout
2026-11-05 8:23 [PATCH 0/5] riscv: dts: spacemit: k3-com260: Describe SD card, SPI NOR and MAC Troy Mitchell
` (2 preceding siblings ...)
2026-11-05 8:23 ` [PATCH 3/5] riscv: dts: spacemit: k3-com260: Add SPI NOR flash Troy Mitchell
@ 2026-11-05 8:23 ` Troy Mitchell
2026-11-05 10:42 ` E Shattow
2026-11-05 8:23 ` [PATCH 5/5] riscv: dts: spacemit: k3-com260: Set Ethernet MAC from EEPROM Troy Mitchell
4 siblings, 1 reply; 8+ messages in thread
From: Troy Mitchell @ 2026-11-05 8:23 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
Troy Mitchell, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: devicetree, linux-riscv, spacemit, linux-kernel
The OrangePi RV2 and R2S device trees take the Ethernet MAC address from
the ONIE TLV data in an AT24 EEPROM, and the K3 CoM260 module stores its
MAC address the same way. Without the EEPROM driver and the ONIE TLV
layout, the MAC address lookup keeps returning -EPROBE_DEFER and the
Ethernet controller never probes unless the bootloader passes a MAC
address in the device tree.
Enable both drivers as built-in so the MAC address is available as soon
as the Ethernet driver probes, including for network root file systems.
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
arch/riscv/configs/defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
index 04ae305d5511..a76f801d8eed 100644
--- a/arch/riscv/configs/defconfig
+++ b/arch/riscv/configs/defconfig
@@ -276,6 +276,8 @@ CONFIG_PHY_STARFIVE_JH7110_DPHY_RX=m
CONFIG_PHY_STARFIVE_JH7110_PCIE=m
CONFIG_PHY_STARFIVE_JH7110_USB=m
CONFIG_LIBNVDIMM=y
+CONFIG_NVMEM_LAYOUT_ONIE_TLV=y
+CONFIG_EEPROM_AT24=y
CONFIG_NVMEM_SUNXI_SID=y
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_POSIX_ACL=y
--
2.56.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 5/5] riscv: dts: spacemit: k3-com260: Set Ethernet MAC from EEPROM
2026-11-05 8:23 [PATCH 0/5] riscv: dts: spacemit: k3-com260: Describe SD card, SPI NOR and MAC Troy Mitchell
` (3 preceding siblings ...)
2026-11-05 8:23 ` [PATCH 4/5] riscv: defconfig: Enable AT24 EEPROM and ONIE TLV layout Troy Mitchell
@ 2026-11-05 8:23 ` Troy Mitchell
4 siblings, 0 replies; 8+ messages in thread
From: Troy Mitchell @ 2026-11-05 8:23 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
Troy Mitchell, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: devicetree, linux-riscv, spacemit, linux-kernel
The EEPROM on the K3 CoM260 module stores the board MAC address in its
ONIE TLV data. Assign it to the module's Ethernet controller, so that
every carrier board using the module gets a stable MAC address instead
of a random one.
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
arch/riscv/boot/dts/spacemit/k3-com260.dtsi | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/riscv/boot/dts/spacemit/k3-com260.dtsi b/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
index f94607cb2eeb..1f5c958c9d6d 100644
--- a/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
@@ -42,7 +42,7 @@ eeprom@50 {
nvmem-layout {
compatible = "onie,tlv-layout";
- mac-address {
+ mac_address: mac-address {
#nvmem-cell-cells = <1>;
};
@@ -216,6 +216,8 @@ dldo7: dldo7 {
};
ð1 {
+ nvmem-cells = <&mac_address 0>;
+ nvmem-cell-names = "mac-address";
pinctrl-names = "default";
pinctrl-0 = <&gmac1_rgmii_0_cfg>, <&gmac1_phy_0_cfg>;
phy-mode = "rgmii-id";
--
2.56.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4/5] riscv: defconfig: Enable AT24 EEPROM and ONIE TLV layout
2026-11-05 8:23 ` [PATCH 4/5] riscv: defconfig: Enable AT24 EEPROM and ONIE TLV layout Troy Mitchell
@ 2026-11-05 10:42 ` E Shattow
2026-11-05 14:20 ` Troy Mitchell
0 siblings, 1 reply; 8+ messages in thread
From: E Shattow @ 2026-11-05 10:42 UTC (permalink / raw)
To: Troy Mitchell, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Yixun Lan, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: devicetree, linux-riscv, spacemit, linux-kernel
On 11/5/26 00:23, Troy Mitchell wrote:
> The OrangePi RV2 and R2S device trees take the Ethernet MAC address from
> the ONIE TLV data in an AT24 EEPROM, and the K3 CoM260 module stores its
> MAC address the same way. Without the EEPROM driver and the ONIE TLV
> layout, the MAC address lookup keeps returning -EPROBE_DEFER and the
> Ethernet controller never probes unless the bootloader passes a MAC
> address in the device tree.
>
> Enable both drivers as built-in so the MAC address is available as soon
> as the Ethernet driver probes, including for network root file systems.
This does not make sense for platforms which have no use for EEPROM
driver in Linux userspace.
>
> Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
> ---
> arch/riscv/configs/defconfig | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
> index 04ae305d5511..a76f801d8eed 100644
> --- a/arch/riscv/configs/defconfig
> +++ b/arch/riscv/configs/defconfig
> @@ -276,6 +276,8 @@ CONFIG_PHY_STARFIVE_JH7110_DPHY_RX=m
> CONFIG_PHY_STARFIVE_JH7110_PCIE=m
> CONFIG_PHY_STARFIVE_JH7110_USB=m
> CONFIG_LIBNVDIMM=y
> +CONFIG_NVMEM_LAYOUT_ONIE_TLV=y
> +CONFIG_EEPROM_AT24=y
Enabled as module, please.
> CONFIG_NVMEM_SUNXI_SID=y
> CONFIG_EXT4_FS=y
> CONFIG_EXT4_FS_POSIX_ACL=y
>
-E
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4/5] riscv: defconfig: Enable AT24 EEPROM and ONIE TLV layout
2026-11-05 10:42 ` E Shattow
@ 2026-11-05 14:20 ` Troy Mitchell
0 siblings, 0 replies; 8+ messages in thread
From: Troy Mitchell @ 2026-11-05 14:20 UTC (permalink / raw)
To: E Shattow, Troy Mitchell, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Yixun Lan, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Alexandre Ghiti
Cc: devicetree, linux-riscv, spacemit, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1465 bytes --]
On Thu Nov 5, 2026 at 10:42 AM GMT, E Shattow wrote:
> On 11/5/26 00:23, Troy Mitchell wrote:
>> The OrangePi RV2 and R2S device trees take the Ethernet MAC address from
>> the ONIE TLV data in an AT24 EEPROM, and the K3 CoM260 module stores its
>> MAC address the same way. Without the EEPROM driver and the ONIE TLV
>> layout, the MAC address lookup keeps returning -EPROBE_DEFER and the
>> Ethernet controller never probes unless the bootloader passes a MAC
>> address in the device tree.
>>
>> Enable both drivers as built-in so the MAC address is available as soon
>> as the Ethernet driver probes, including for network root file systems.
>
> This does not make sense for platforms which have no use for EEPROM
> driver in Linux userspace.
>
>>
>> Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
>> ---
>> arch/riscv/configs/defconfig | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
>> index 04ae305d5511..a76f801d8eed 100644
>> --- a/arch/riscv/configs/defconfig
>> +++ b/arch/riscv/configs/defconfig
>> @@ -276,6 +276,8 @@ CONFIG_PHY_STARFIVE_JH7110_DPHY_RX=m
>> CONFIG_PHY_STARFIVE_JH7110_PCIE=m
>> CONFIG_PHY_STARFIVE_JH7110_USB=m
>> CONFIG_LIBNVDIMM=y
>> +CONFIG_NVMEM_LAYOUT_ONIE_TLV=y
>> +CONFIG_EEPROM_AT24=y
>
> Enabled as module, please.
Yes, you are right. Will be module in the next version.
--
Troy Mitchell
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-11-05 14:21 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-05 8:23 [PATCH 0/5] riscv: dts: spacemit: k3-com260: Describe SD card, SPI NOR and MAC Troy Mitchell
2026-11-05 8:23 ` [PATCH 1/5] riscv: dts: spacemit: k3-com260-ifx: Drop wrong SD card vmmc-supply Troy Mitchell
2026-11-05 8:23 ` [PATCH 2/5] riscv: dts: spacemit: k3-com260: Move SD card to the module Troy Mitchell
2026-11-05 8:23 ` [PATCH 3/5] riscv: dts: spacemit: k3-com260: Add SPI NOR flash Troy Mitchell
2026-11-05 8:23 ` [PATCH 4/5] riscv: defconfig: Enable AT24 EEPROM and ONIE TLV layout Troy Mitchell
2026-11-05 10:42 ` E Shattow
2026-11-05 14:20 ` Troy Mitchell
2026-11-05 8:23 ` [PATCH 5/5] riscv: dts: spacemit: k3-com260: Set Ethernet MAC from EEPROM Troy Mitchell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®