bmips: convert mtd-mac-address to nvmem implementation
[openwrt/staging/stintel.git] / target / linux / bmips / dts / bcm6358-huawei-hg556a-b.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include "bcm6358.dtsi"
4
5 / {
6 compatible = "huawei,hg556a-b", "brcm,bcm6358";
7 model = "Huawei EchoLife HG556a (version B)";
8
9 aliases {
10 led-boot = &led_power_red;
11 led-failsafe = &led_power_red;
12 led-running = &led_power_red;
13 led-upgrade = &led_power_red;
14
15 led-dsl = &led_dsl_red;
16 led-usb = &led_hspa_red;
17 };
18
19 keys {
20 compatible = "gpio-keys-polled";
21 poll-interval = <20>;
22
23 help {
24 label = "help";
25 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_HELP>;
27 debounce-interval = <60>;
28 };
29
30 wlan {
31 label = "wlan";
32 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
33 linux,code = <KEY_WLAN>;
34 debounce-interval = <60>;
35 };
36
37 restart {
38 label = "restart";
39 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_RESTART>;
41 debounce-interval = <60>;
42 };
43
44 reset {
45 label = "reset";
46 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
47 linux,code = <KEY_CONFIG>;
48 debounce-interval = <60>;
49 };
50 };
51
52 leds {
53 compatible = "gpio-leds";
54
55 led@0 {
56 label = "red:message";
57 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
58 };
59
60 led_hspa_red: led@1 {
61 label = "red:hspa";
62 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
63 };
64
65 led_dsl_red: led@2 {
66 label = "red:dsl";
67 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
68 };
69
70 led_power_red: led@3 {
71 label = "red:power";
72 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
73 };
74
75 led@6 {
76 label = "all";
77 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
78 default-state = "on";
79 };
80
81 led@12 {
82 label = "green:lan1";
83 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
84 };
85
86 led@13 {
87 label = "red:lan1";
88 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
89 };
90
91 led@15 {
92 label = "green:lan2";
93 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
94 };
95
96 led@22 {
97 label = "red:lan2";
98 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
99 };
100
101 led@23 {
102 label = "green:lan3";
103 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
104 };
105
106 led@26 {
107 label = "red:lan3";
108 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
109 };
110
111 led@27 {
112 label = "green:lan4";
113 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
114 };
115
116 led@28 {
117 label = "red:lan4";
118 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
119 };
120 };
121
122 ath9k-fixup {
123 compatible = "brcm,ath9k-fixup";
124 reg = <0x30000000 0x8000000>;
125
126 pci-dev = <1>;
127
128 nvmem-cells = <&macaddr_cfe_6a0>;
129 nvmem-cell-names = "mac-address";
130 mac-address-increment = <1>;
131
132 ath,eeprom = <&cal_data 0x1e000>;
133 ath,endian-check;
134 ath,led-pin = <2>;
135 ath,led-active-high;
136 };
137 };
138
139 &ehci {
140 status = "okay";
141 };
142
143 &ohci {
144 status = "okay";
145 };
146
147 &pci {
148 status = "okay";
149 };
150
151 &pflash {
152 status = "okay";
153
154 partitions {
155 compatible = "fixed-partitions";
156 #address-cells = <1>;
157 #size-cells = <1>;
158
159 cfe: partition@0 {
160 label = "cfe";
161 reg = <0x000000 0x020000>;
162 read-only;
163 };
164
165 partition@20000 {
166 label = "firmware";
167 reg = <0x020000 0xec0000>;
168 compatible = "brcm,bcm963xx-imagetag";
169 };
170
171 cal_data: partition@ee0000 {
172 label = "cal_data";
173 reg = <0xee0000 0x100000>;
174 read-only;
175 };
176
177 partition@fe0000 {
178 label = "nvram";
179 reg = <0xfe0000 0x020000>;
180 };
181 };
182 };
183
184 &uart0 {
185 status = "okay";
186 };
187
188 &usbh {
189 status = "okay";
190 };
191
192 &cfe {
193 compatible = "nvmem-cells";
194 #address-cells = <1>;
195 #size-cells = <1>;
196
197 macaddr_cfe_6a0: macaddr@6a0 {
198 reg = <0x6a0 0x6>;
199 };
200 };