mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-09-09 00:06:08 +08:00
qualcommax: ipq807x: 301w: read the port MAC addresses from ART
The board names its six ports through ethernetN aliases for the bootloader
to patch an address into, and since the PPE conversion only the first two
arrive. On r35301-d47ce71a89, the last snapshot before it, every port came
up on an address of its own; on r35323-7ff96bf05c, the first one after,
lan1, lan2, 10g-1 and 10g-2 have none and inherit the conduit's, so four
ports and the bridge above them all answer to one MAC.
The addresses the bootloader hands out come from the MAC table at the start
of 0:art, one 6-byte slot per ethernetN alias. Describe those slots, so the
ports can read them whatever the bootloader does. ipq8071-ax3600.dtsi
describes its own ART table the same way.
The mapping is confirmed on a 301w: the table holds 24:5e:be:55:69:32
through :37 in slots 0 to 5 and nothing else, and the pre-conversion
snapshot brought up each port on the slot its alias names - lan4 on :32,
lan3 :33, lan2 :34, lan1 :35, 10g-1 :36, 10g-2 :37.
of_get_mac_address() consults the DT properties before the nvmem cell, so
a port the bootloader patched keeps the address it has.
Fixes: f50435627d ("qualcommax: ipq60xx/ipq807x: convert to PPE networking stack")
Assisted-by: Claude:claude-opus-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/24528
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
committed by
Robert Marko
parent
29c5542cd6
commit
3b35c7074a
@@ -322,6 +322,36 @@
|
||||
label = "0:art";
|
||||
reg = <0x370000 0x40000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_lan4: macaddr@0 {
|
||||
reg = <0x0 0x6>;
|
||||
};
|
||||
|
||||
macaddr_lan3: macaddr@6 {
|
||||
reg = <0x6 0x6>;
|
||||
};
|
||||
|
||||
macaddr_lan2: macaddr@c {
|
||||
reg = <0xc 0x6>;
|
||||
};
|
||||
|
||||
macaddr_lan1: macaddr@12 {
|
||||
reg = <0x12 0x6>;
|
||||
};
|
||||
|
||||
macaddr_10g_1: macaddr@18 {
|
||||
reg = <0x18 0x6>;
|
||||
};
|
||||
|
||||
macaddr_10g_2: macaddr@1e {
|
||||
reg = <0x1e 0x6>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@3b0000 {
|
||||
@@ -466,6 +496,8 @@
|
||||
phy-handle = <&qca8075_16>;
|
||||
phy-mode = "qsgmii";
|
||||
pcs-handle = <&uniphy0 0>;
|
||||
nvmem-cells = <&macaddr_lan4>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
lan3: port@2 {
|
||||
@@ -474,6 +506,8 @@
|
||||
phy-handle = <&qca8075_17>;
|
||||
phy-mode = "qsgmii";
|
||||
pcs-handle = <&uniphy0 1>;
|
||||
nvmem-cells = <&macaddr_lan3>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
lan2: port@3 {
|
||||
@@ -482,6 +516,8 @@
|
||||
phy-handle = <&qca8075_18>;
|
||||
phy-mode = "qsgmii";
|
||||
pcs-handle = <&uniphy0 2>;
|
||||
nvmem-cells = <&macaddr_lan2>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
|
||||
@@ -491,6 +527,8 @@
|
||||
phy-handle = <&qca8075_19>;
|
||||
phy-mode = "qsgmii";
|
||||
pcs-handle = <&uniphy0 3>;
|
||||
nvmem-cells = <&macaddr_lan1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
port_10g_1: port@5 {
|
||||
@@ -500,6 +538,8 @@
|
||||
phy-mode = "usxgmii";
|
||||
managed = "in-band-status";
|
||||
pcs-handle = <&uniphy1 0>;
|
||||
nvmem-cells = <&macaddr_10g_1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
port_10g_2: port@6 {
|
||||
@@ -509,6 +549,8 @@
|
||||
phy-mode = "usxgmii";
|
||||
managed = "in-band-status";
|
||||
pcs-handle = <&uniphy2 0>;
|
||||
nvmem-cells = <&macaddr_10g_2>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user