qualcommax: ipq807x: use ascii-env driver

Use ascii-env driver for reading mac addresses directly
from devinfo partition for:
- Linksys MX5300
- Linksys HomeWRK

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22592
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Paweł Owoc 2026-03-24 10:17:41 +01:00 committed by Robert Marko
parent ad7d6b6bff
commit 9270415d51
2 changed files with 41 additions and 16 deletions

View File

@ -15,15 +15,6 @@
aliases {
serial0 = &blsp1_uart5;
/*
* Aliases as required by u-boot
* to patch MAC addresses
*/
ethernet0 = &dp1;
ethernet1 = &dp2;
ethernet2 = &dp3;
ethernet3 = &dp4;
ethernet4 = &dp5;
led-boot = &led_system_blue;
led-running = &led_system_blue;
led-failsafe = &led_system_red;
@ -296,6 +287,15 @@
label = "devinfo";
reg = <0x1060000 0x20000>;
read-only;
nvmem-layout {
compatible = "ascii-eq-delim-env";
hw_mac_addr: hw_mac_addr {
compatible = "mac-base";
#nvmem-cell-cells = <1>;
};
};
};
partition@1080000 {
@ -475,30 +475,40 @@
status = "okay";
phy-handle = <&qca8075_0>;
label = "lan1";
nvmem-cells = <&hw_mac_addr 0>;
nvmem-cell-names = "mac-address";
};
&dp2 {
status = "okay";
phy-handle = <&qca8075_1>;
label = "lan2";
nvmem-cells = <&hw_mac_addr 0>;
nvmem-cell-names = "mac-address";
};
&dp3 {
status = "okay";
phy-handle = <&qca8075_2>;
label = "lan3";
nvmem-cells = <&hw_mac_addr 0>;
nvmem-cell-names = "mac-address";
};
&dp4 {
status = "okay";
phy-handle = <&qca8075_3>;
label = "lan4";
nvmem-cells = <&hw_mac_addr 0>;
nvmem-cell-names = "mac-address";
};
&dp5 {
status = "okay";
phy-handle = <&qca8075_4>;
label = "wan";
nvmem-cells = <&hw_mac_addr 0>;
nvmem-cell-names = "mac-address";
};
&ssphy_0 {

View File

@ -8,13 +8,6 @@
model = "Linksys HomeWRK";
compatible = "linksys,homewrk", "qcom,ipq8074";
aliases {
ethernet1 = &dp2;
ethernet2 = &dp3;
ethernet3 = &dp4;
ethernet4 = &dp5;
};
chosen {
bootargs-append = " root=/dev/ubiblock0_1";
};
@ -35,6 +28,20 @@
partitions {
compatible = "qcom,smem-part";
partition-devinfo {
label = "devinfo";
read-only;
nvmem-layout {
compatible = "ascii-eq-delim-env";
mac_address: mac_address {
compatible = "mac-base";
#nvmem-cell-cells = <1>;
};
};
};
};
};
};
@ -43,24 +50,32 @@
status = "okay";
phy-handle = <&qca8075_1>;
label = "wan";
nvmem-cells = <&mac_address 0>;
nvmem-cell-names = "mac-address";
};
&dp3 {
status = "okay";
phy-handle = <&qca8075_2>;
label = "lan3";
nvmem-cells = <&mac_address 1>;
nvmem-cell-names = "mac-address";
};
&dp4 {
status = "okay";
phy-handle = <&qca8075_3>;
label = "lan2";
nvmem-cells = <&mac_address 1>;
nvmem-cell-names = "mac-address";
};
&dp5 {
status = "okay";
phy-handle = <&qca8075_4>;
label = "lan1";
nvmem-cells = <&mac_address 1>;
nvmem-cell-names = "mac-address";
};
&wifi {