8a029b149ff7cd8916c7f2df45e616adf96fba42
[openwrt/staging/wigyori.git] /
1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
2 /dts-v1/;
3 /plugin/;
4
5 #include <dt-bindings/gpio/gpio.h>
6
7 / {
8 compatible = "bananapi,bpi-r4", "mediatek,mt7988a";
9
10 fragment@0 {
11 target-path = "/";
12 __overlay__ {
13 wifi_12v: regulator-wifi-12v {
14 compatible = "regulator-fixed";
15 regulator-name = "wifi";
16 regulator-min-microvolt = <12000000>;
17 regulator-max-microvolt = <12000000>;
18 gpio = <&pio 4 GPIO_ACTIVE_HIGH>;
19 enable-active-high;
20 regulator-always-on;
21 };
22 };
23 };
24
25 fragment@1 {
26 target = <&i2c_wifi>;
27 __overlay__ {
28 // 5G WIFI MAC Address EEPROM
29 wifi_eeprom@51 {
30 compatible = "atmel,24c02";
31 reg = <0x51>;
32 address-bits = <8>;
33 page-size = <8>;
34 size = <256>;
35
36 nvmem-layout {
37 compatible = "fixed-layout";
38 #address-cells = <1>;
39 #size-cells = <1>;
40
41 macaddr_5g: macaddr@0 {
42 reg = <0x0 0x6>;
43 };
44 };
45 };
46
47 // 6G WIFI MAC Address EEPROM
48 wifi_eeprom@52 {
49 compatible = "atmel,24c02";
50 reg = <0x52>;
51 address-bits = <8>;
52 page-size = <8>;
53 size = <256>;
54
55 nvmem-layout {
56 compatible = "fixed-layout";
57 #address-cells = <1>;
58 #size-cells = <1>;
59
60 macaddr_6g: macaddr@0 {
61 reg = <0x0 0x6>;
62 };
63 };
64 };
65 };
66 };
67
68 fragment@2 {
69 target = <&pcie0>;
70 __overlay__ {
71 pcie@0,0 {
72 reg = <0x0000 0 0 0 0>;
73
74 wifi@0,0 {
75 compatible = "mediatek,mt76";
76 reg = <0x0000 0 0 0 0>;
77 nvmem-cell-names = "mac-address";
78 nvmem-cells = <&macaddr_5g>;
79 };
80 };
81 };
82 };
83
84 fragment@3 {
85 target = <&pcie1>;
86 __overlay__ {
87 pcie@0,0 {
88 reg = <0x0000 0 0 0 0>;
89
90 wifi@0,0 {
91 compatible = "mediatek,mt76";
92 reg = <0x0000 0 0 0 0>;
93 nvmem-cell-names = "mac-address";
94 nvmem-cells = <&macaddr_6g>;
95 };
96 };
97 };
98 };
99 };