Skip to content

Commit f57d287

Browse files
pelwellpopcornmix
authored andcommitted
overlays: Add the wifimac overlay
The wifimac overlay allows the MAC address for the onboard WiFi interface to be overridden. This is equivalent to the Pi 5 wifiaddr dtparam. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
1 parent 6f310ee commit f57d287

File tree

4 files changed

+35
-0
lines changed

4 files changed

+35
-0
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
348348
watterott-display.dtbo \
349349
waveshare-can-fd-hat-mode-a.dtbo \
350350
waveshare-can-fd-hat-mode-b.dtbo \
351+
wifimac.dtbo \
351352
wittypi.dtbo \
352353
wm8960-soundcard.dtbo \
353354
ws2812-pio.dtbo

arch/arm/boot/dts/overlays/README

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5668,6 +5668,15 @@ Load: dtoverlay=waveshare-can-fd-hat-mode-b
56685668
Params: <None>
56695669

56705670

5671+
Name: wifimac
5672+
Info: Override the MAC address for the onboard WiFi. Not Pi 5.
5673+
Load: dtoverlay=wifimac,<param>=<val>
5674+
Params: wifiaddr Set an alternative WiFi MAC address.
5675+
The value should be a 6-byte hexadecimal value,
5676+
with or without colon separators, written in the
5677+
natural (big-endian) order.
5678+
5679+
56715680
Name: wittypi
56725681
Info: Configures the wittypi RTC module.
56735682
Load: dtoverlay=wittypi,<param>=<val>

arch/arm/boot/dts/overlays/overlay_map.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,4 +520,8 @@
520520
bcm2712;
521521
};
522522

523+
wifimac {
524+
bcm2835;
525+
bcm2711;
526+
};
523527
};
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/dts-v1/;
2+
/plugin/;
3+
4+
/{
5+
compatible = "brcm,bcm2835";
6+
7+
fragment@0 {
8+
target = <&brcmf>;
9+
wifi0: __overlay__ {
10+
local-mac-address = [ 00 00 00 00 00 00 ];
11+
};
12+
};
13+
14+
__overrides__ {
15+
wifiaddr = <&wifi0>, "local-mac-address[";
16+
};
17+
18+
__exports__ {
19+
wifi0;
20+
};
21+
};

0 commit comments

Comments
 (0)