[PATCH 5/5] riscv: dts: spacemit: k3-com260: Set Ethernet MAC from EEPROM

Yixun Lan dlan at kernel.org
Tue Nov 24 04:29:42 PST 2026


On 08:23 Thu 05 Nov     , Troy Mitchell wrote:
> 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 at linux.spacemit.com>

Reviewed-by: Yixun Lan <dlan at kernel.org>

> ---
>  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 at 50 {
>  		nvmem-layout {
>  			compatible = "onie,tlv-layout";
>  
> -			mac-address {
> +			mac_address: mac-address {
>  				#nvmem-cell-cells = <1>;
>  			};
>  
> @@ -216,6 +216,8 @@ dldo7: dldo7 {
>  };
>  
>  &eth1 {
> +	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
> 

-- 
Yixun Lan (dlan)



More information about the linux-riscv mailing list