diff options
| author | Weikai Kong | 2025-03-06 21:48:47 +0000 |
|---|---|---|
| committer | Robert Marko | 2025-03-26 09:12:02 +0000 |
| commit | c5e86c3195c8e0f63293c609a22d266029e29b87 (patch) | |
| tree | 0370910f5810caba45056dfbc012980e2b9e6762 | |
| parent | cf04dbcf4a93ec9603de961eb6ef5aaaf5003ffd (diff) | |
| download | openwrt-c5e86c3195c8e0f63293c609a22d266029e29b87.tar.gz | |
qualcommax: mr7350: switch to ascii-eq-delim-env
Using the pending ascii-eq-delim-env4 driver is a better way to read mac addresses since no
extra config is required
The change is like eacc4d8c9b31ac17df034d2140558bdaaa56c16b, except for using smem for devinfo
thanks to @musashino205 for pointing out the simplification that removes
the extra partition
Signed-off-by: Weikai Kong <priv@pppig236.com>
Link: https://github.com/openwrt/openwrt/pull/18186
Signed-off-by: Robert Marko <robimarko@gmail.com>
| -rw-r--r-- | target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-mr7350.dts | 30 | ||||
| -rw-r--r-- | target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network | 5 |
2 files changed, 30 insertions, 5 deletions
diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-mr7350.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-mr7350.dts index 313712061f..228be6b1c1 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-mr7350.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-mr7350.dts @@ -175,6 +175,26 @@ partitions { compatible = "qcom,smem-part"; + #address-cells = <1>; + #size-cells = <1>; + + partition-0-devinfo { + label = "devinfo"; + read-only; + #address-cells = <1>; + #size-cells = <1>; + + nvmem-layout { + compatible = "ascii-eq-delim-env"; + #address-cells = <1>; + #size-cells = <1>; + + hw_mac_addr: hw_mac_addr { + compatible = "mac-base"; + #nvmem-cell-cells = <1>; + }; + }; + }; }; }; }; @@ -368,30 +388,40 @@ status = "okay"; phy-handle = <&qca8075_0>; label = "lan1"; + nvmem-cells = <&hw_mac_addr 1>; + nvmem-cell-names = "mac-address"; }; &dp2 { status = "okay"; phy-handle = <&qca8075_1>; label = "lan2"; + nvmem-cells = <&hw_mac_addr 1>; + nvmem-cell-names = "mac-address"; }; &dp3 { status = "okay"; phy-handle = <&qca8075_2>; label = "lan3"; + nvmem-cells = <&hw_mac_addr 1>; + nvmem-cell-names = "mac-address"; }; &dp4 { status = "okay"; phy-handle = <&qca8075_3>; label = "lan4"; + nvmem-cells = <&hw_mac_addr 1>; + 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"; }; &wifi { diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network index 34f8c95e8f..3fa86a37f1 100644 --- a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network +++ b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network @@ -46,11 +46,6 @@ ipq60xx_setup_macs() local label_mac="" case $board in - linksys,mr7350) - label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) - lan_mac=$label_mac - wan_mac=$label_mac - ;; qihoo,360v6) lan_mac=$(mtd_get_mac_ascii factory lanMac) wan_mac=$(macaddr_add "$lan_mac" 1) |