Files
eternalwrt-mt798x/target/linux/ath79/dts/ar7161_netgear_wndap360.dts
T
Rosen PenevandJonas Jelonek 1ac7a562ef ath79: wndap360: switch MACs to newer firmware
Original ar71xx has this setup:

define WNDAP360_WMAC0_MAC_OFFSET               0x120c
define WNDAP360_WMAC1_MAC_OFFSET               0x520c

/* Reusing wifi MAC with offset of 1 as eth0 MAC */
ath79_init_mac(ath79_eth0_data.mac_addr,
               art + WNDAP360_WMAC0_MAC_OFFSET, 1);

ap94_pci_init(art + WNDAP360_CALDATA0_OFFSET,
              art + WNDAP360_WMAC0_MAC_OFFSET,
              art + WNDAP360_CALDATA1_OFFSET,
              art + WNDAP360_WMAC1_MAC_OFFSET);

The ath79 port made a questionable change for eth0 being just art with
no offset. That MAC ends up being the OUI for Atheros.

WNDAP360_WMAC1_MAC_OFFSET is the same as WNDAP360_WMAC0_MAC_OFFSET
except with the first hex value being subtracted by 2, which is not a
valid OUI.

And newer Netgear firmware seems to assign differently as well,
art_120C as a base and the others incremented by 0x8.

Switch the assignment to the latest firmware and add label-mac-device to
document that the first Wi-FI MAC address is printed on the device.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22895
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-10 09:06:06 +02:00

165 lines
2.8 KiB
Devicetree

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "ar7100.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "netgear,wndap360", "qca,ar7161";
model = "Netgear WNDAP360";
chosen {
bootargs = "console=ttyS0,9600";
};
aliases {
led-boot = &led_power_orange;
led-failsafe = &led_power_orange;
led-running = &led_power_green;
led-upgrade = &led_power_orange;
label-mac-device = &ath9k;
};
leds {
compatible = "gpio-leds";
led_power_green: power_green {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
};
led_power_orange: power_orange {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
};
};
};
&mdio0 {
status = "okay";
phy1: ethernet-phy@1 {
reg = <0x1>;
};
};
&eth0 {
status = "okay";
pll-data = <0x11110000 0x00001099 0x00991099>;
phy-mode = "rgmii";
phy-handle = <&phy1>;
nvmem-cells = <&macaddr_art_120c 10>;
nvmem-cell-names = "mac-address";
};
&spi {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x040000>;
read-only;
};
partition@40000 {
label = "u-boot-env";
reg = <0x40000 0x010000>;
read-only;
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x790000>;
};
partition@7e0000 {
label = "nvram";
reg = <0x7e0000 0x010000>;
read-only;
};
partition@7f0000 {
label = "art";
reg = <0x7f0000 0x010000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
macaddr_art_120c: macaddr@120c {
compatible = "mac-base";
reg = <0x120c 0x6>;
#nvmem-cell-cells = <1>;
};
calibration_art_1000: calibration@1000 {
reg = <0x1000 0xeb8>;
};
calibration_art_5000: calibration@5000 {
reg = <0x5000 0xeb8>;
};
};
};
};
};
};
&pcie0 {
status = "okay";
ath9k: wifi@11,0 {
compatible = "pci168c,0029";
reg = <0x8800 0 0 0 0>;
nvmem-cells = <&macaddr_art_120c 0>, <&calibration_art_1000>;
nvmem-cell-names = "mac-address", "calibration";
led {
led-sources = <5>;
led-active-low;
};
};
wifi@12,0 {
compatible = "pci168c,0029";
reg = <0x9000 0 0 0 0>;
nvmem-cells = <&macaddr_art_120c 8>, <&calibration_art_5000>;
nvmem-cell-names = "mac-address", "calibration";
led {
led-sources = <5>;
led-active-low;
};
};
};