ramips: mt7620a: use mac-base
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7620a_tplink_archer.dtsi
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/gpio/gpio.h>
5
6 / {
7 chosen {
8 bootargs = "console=ttyS0,115200";
9 };
10
11 keys {
12 compatible = "gpio-keys";
13
14 reset {
15 label = "reset";
16 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
17 linux,code = <KEY_RESTART>;
18 };
19
20 rfkill {
21 label = "rfkill";
22 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_RFKILL>;
24 };
25 };
26 };
27
28 &gpio1 {
29 status = "okay";
30 };
31
32 &gpio2 {
33 status = "okay";
34 };
35
36 &gpio3 {
37 status = "okay";
38 };
39
40 &spi0 {
41 status = "okay";
42
43 flash@0 {
44 compatible = "jedec,spi-nor";
45 reg = <0>;
46 spi-max-frequency = <30000000>;
47
48 partitions {
49 compatible = "fixed-partitions";
50 #address-cells = <1>;
51 #size-cells = <1>;
52
53 partition@0 {
54 label = "u-boot";
55 reg = <0x0 0x20000>;
56 read-only;
57 };
58
59 partition@20000 {
60 compatible = "tplink,firmware";
61 label = "firmware";
62 reg = <0x20000 0x7a0000>;
63 };
64
65 partition@7c0000 {
66 label = "config";
67 reg = <0x7c0000 0x10000>;
68 read-only;
69 };
70
71 rom: partition@7d0000 {
72 label = "rom";
73 reg = <0x7d0000 0x10000>;
74 read-only;
75
76 nvmem-layout {
77 compatible = "fixed-layout";
78 #address-cells = <1>;
79 #size-cells = <1>;
80
81 macaddr_rom_f100: macaddr@f100 {
82 compatible = "mac-base";
83 reg = <0xf100 0x6>;
84 #nvmem-cell-cells = <1>;
85 };
86 };
87 };
88
89 partition@7e0000 {
90 label = "romfile";
91 reg = <0x7e0000 0x10000>;
92 read-only;
93 };
94
95 radio: partition@7f0000 {
96 label = "radio";
97 reg = <0x7f0000 0x10000>;
98 read-only;
99
100 nvmem-layout {
101 compatible = "fixed-layout";
102 #address-cells = <1>;
103 #size-cells = <1>;
104
105 eeprom_radio_0: eeprom@0 {
106 reg = <0x0 0x200>;
107 };
108
109 eeprom_radio_8000: eeprom@8000 {
110 reg = <0x8000 0x200>;
111 };
112 };
113 };
114 };
115 };
116 };
117
118 &ethernet {
119 pinctrl-names = "default";
120
121 nvmem-cells = <&macaddr_rom_f100>;
122 nvmem-cell-names = "mac-address";
123
124 mediatek,portmap = "wllll";
125 };
126
127 &ehci {
128 status = "okay";
129 };
130
131 &ohci {
132 status = "okay";
133 };
134
135 &wmac {
136 nvmem-cells = <&eeprom_radio_0>;
137 nvmem-cell-names = "eeprom";
138 };
139
140 &pcie {
141 status = "okay";
142 };
143
144 &pcie0 {
145 wifi: mt76@0,0 {
146 reg = <0x0000 0 0 0 0>;
147 nvmem-cells = <&eeprom_radio_8000>;
148 nvmem-cell-names = "eeprom";
149 ieee80211-freq-limit = <5000000 6000000>;
150 };
151 };