ath79: fix MAC address assignment for TP-Link ar7241 devices
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7242_meraki_mr12.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7242.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "meraki,mr12", "qca,ar7242";
10 model = "Meraki MR12";
11
12 aliases {
13 led-boot = &led_power_orange;
14 led-failsafe = &led_power_orange;
15 led-running = &led_power_green;
16 led-upgrade = &led_power_orange;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 link1 {
23 label = "green:link1";
24 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
25 };
26
27 link2 {
28 label = "green:link2";
29 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
30 };
31
32 link3 {
33 label = "green:link3";
34 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
35 };
36
37 link4 {
38 label = "green:link4";
39 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
40 };
41
42 lan {
43 label = "green:lan";
44 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
45 };
46
47 led_power_orange: power_orange {
48 label = "orange:power";
49 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
50 panic-indicator;
51 };
52
53 led_power_green: power_green {
54 label = "green:power";
55 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
56 };
57 };
58
59 keys {
60 compatible = "gpio-keys";
61
62 reset {
63 label = "reset";
64 linux,code = <KEY_RESTART>;
65 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
66 };
67 };
68 };
69
70 &pcie {
71 status = "okay";
72
73 wifi@0,0,0 {
74 compatible = "pci168c,002a";
75 reg = <0x0000 0 0 0 0>;
76 qca,no-eeprom;
77 nvmem-cells = <&macaddr_config_66>;
78 nvmem-cell-names = "mac-address";
79 mac-address-increment = <1>;
80 };
81 };
82
83 &mdio0 {
84 status = "okay";
85
86 phy4: ethernet-phy@4 {
87 reg = <4>;
88 };
89 };
90
91 &eth0 {
92 status = "okay";
93
94 nvmem-cells = <&macaddr_config_66>;
95 nvmem-cell-names = "mac-address";
96
97 pll-data = <0x02000000 0x00000101 0x00001313>;
98
99 phy-mode = "rgmii-id";
100 phy-handle = <&phy4>;
101 };
102
103 &mdio1 {
104 status = "okay";
105 };
106
107 &eth1 {
108 status = "okay";
109
110 nvmem-cells = <&macaddr_config_66>;
111 nvmem-cell-names = "mac-address";
112 };
113
114 &spi {
115 status = "okay";
116
117 flash@0 {
118 compatible = "jedec,spi-nor";
119 reg = <0>;
120 spi-max-frequency = <50000000>;
121
122 partitions {
123 compatible = "fixed-partitions";
124 #address-cells = <1>;
125 #size-cells = <1>;
126
127 partition@0 {
128 label = "u-boot";
129 reg = <0x000000 0x40000>;
130 read-only;
131 };
132
133 partition@40000 {
134 label = "u-boot-env";
135 reg = <0x40000 0x40000>;
136 read-only;
137 };
138
139 config: partition@80000 {
140 label = "config";
141 reg = <0x80000 0x20000>;
142 read-only;
143 };
144
145 partition@a0000 {
146 label = "firmware";
147 reg = <0xa0000 0xf40000>;
148 compatible = "denx,uimage";
149 };
150
151 partition@fe0000 {
152 label = "art";
153 reg = <0xfe0000 0x20000>;
154 read-only;
155 };
156 };
157 };
158 };
159
160 &config {
161 compatible = "nvmem-cells";
162 #address-cells = <1>;
163 #size-cells = <1>;
164
165 macaddr_config_66: macaddr@66 {
166 reg = <0x66 0x6>;
167 };
168 };