[openwrt/openwrt] ramips: use fixed layout cell "mac-base" for Ubiquiti EdgeRouter X
LEDE Commits
lede-commits at lists.infradead.org
Fri Jul 14 02:38:37 PDT 2023
rmilecki pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/28b6224104cc102b246fe9f7a4cbe0ef70567fec
commit 28b6224104cc102b246fe9f7a4cbe0ef70567fec
Author: Rafał Miłecki <rafal at milecki.pl>
AuthorDate: Fri Jul 14 10:49:04 2023 +0200
ramips: use fixed layout cell "mac-base" for Ubiquiti EdgeRouter X
This drops a use of downstream "mac-address-increment".
Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
.../ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts | 3 +-
.../linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi | 37 +++++++++++-----------
2 files changed, 19 insertions(+), 21 deletions(-)
diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts
index c00eb52c7c..50a77c3877 100644
--- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts
+++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts
@@ -72,9 +72,8 @@
label = "eth5";
phy-handle = <&ephy7>;
phy-mode = "rgmii-rxid";
- nvmem-cells = <&macaddr_factory_22>;
+ nvmem-cells = <&macaddr_factory_22 5>;
nvmem-cell-names = "mac-address";
- mac-address-increment = <5>;
};
};
};
diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi
index 95cf3d2ccd..411bf6a85a 100644
--- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi
+++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi
@@ -20,7 +20,7 @@
};
&gmac0 {
- nvmem-cells = <&macaddr_factory_22>;
+ nvmem-cells = <&macaddr_factory_22 0>;
nvmem-cell-names = "mac-address";
label = "dsa";
};
@@ -35,33 +35,29 @@
port at 1 {
status = "okay";
label = "eth1";
- nvmem-cells = <&macaddr_factory_22>;
+ nvmem-cells = <&macaddr_factory_22 1>;
nvmem-cell-names = "mac-address";
- mac-address-increment = <1>;
};
port at 2 {
status = "okay";
label = "eth2";
- nvmem-cells = <&macaddr_factory_22>;
+ nvmem-cells = <&macaddr_factory_22 2>;
nvmem-cell-names = "mac-address";
- mac-address-increment = <2>;
};
port at 3 {
status = "okay";
label = "eth3";
- nvmem-cells = <&macaddr_factory_22>;
+ nvmem-cells = <&macaddr_factory_22 3>;
nvmem-cell-names = "mac-address";
- mac-address-increment = <3>;
};
port at 4 {
status = "okay";
label = "eth4";
- nvmem-cells = <&macaddr_factory_22>;
+ nvmem-cells = <&macaddr_factory_22 4>;
nvmem-cell-names = "mac-address";
- mac-address-increment = <4>;
};
};
};
@@ -87,8 +83,21 @@
};
factory: partition at e0000 {
+ compatible = "nvmem-cells";
label = "factory";
reg = <0xe0000 0x60000>;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_factory_22: macaddr at 22 {
+ compatible = "mac-base";
+ reg = <0x22 0x6>;
+ #nvmem-cell-cells = <1>;
+ };
+ };
};
partition at 140000 {
@@ -146,13 +155,3 @@
&xhci {
status = "disabled";
};
-
-&factory {
- compatible = "nvmem-cells";
- #address-cells = <1>;
- #size-cells = <1>;
-
- macaddr_factory_22: macaddr at 22 {
- reg = <0x22 0x6>;
- };
-};
More information about the lede-commits
mailing list