ath79: replace "mac-address-ascii" with "mac-base"
[openwrt/staging/stintel.git] / target / linux / ath79 / dts / qca9558_dlink_dir-629-a1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca955x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "dlink,dir-629-a1", "qca,qca9558";
11 model = "D-Link DIR-629 A1";
12
13 aliases {
14 label-mac-device = &eth0;
15 led-boot = &led_power;
16 led-failsafe = &led_power;
17 led-running = &led_power;
18 led-upgrade = &led_power;
19 serial0 = &uart;
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 reset {
26 label = "reset";
27 linux,code = <KEY_RESTART>;
28 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
29 };
30
31 wps {
32 label = "wps";
33 linux,code = <KEY_WPS_BUTTON>;
34 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
35 };
36 };
37
38 leds {
39 compatible = "gpio-leds";
40
41 led-0 {
42 color = <LED_COLOR_ID_GREEN>;
43 function = LED_FUNCTION_WLAN;
44 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
45 linux,default-trigger = "phy0tpt";
46 };
47
48 led_power: led-1 {
49 label = "green:power";
50 color = <LED_COLOR_ID_GREEN>;
51 function = LED_FUNCTION_POWER;
52 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
53 };
54
55 led-2 {
56 color = <LED_COLOR_ID_GREEN>;
57 function = LED_FUNCTION_WPS;
58 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
59 };
60 };
61 };
62
63 &eth0 {
64 status = "okay";
65
66 phy-mode = "mii";
67
68 nvmem-cells = <&macaddr_mfcdata_35 0>;
69 nvmem-cell-names = "mac-address";
70
71 fixed-link {
72 speed = <100>;
73 full-duplex;
74 };
75 };
76
77 &mdio0 {
78 status = "okay";
79
80 switch0@1f {
81 compatible = "qca,ar8236";
82 reg = <0x1f>;
83 };
84 };
85
86 &spi {
87 status = "okay";
88
89 flash@0 {
90 compatible = "jedec,spi-nor";
91 reg = <0>;
92 spi-max-frequency = <30000000>;
93 m25p,fast-read;
94
95 partitions {
96 compatible = "fixed-partitions";
97 #address-cells = <1>;
98 #size-cells = <1>;
99
100 partition@0 {
101 label = "u-boot";
102 reg = <0x000000 0x040000>;
103 read-only;
104 };
105
106 partition@40000 {
107 label = "u-boot-env";
108 reg = <0x040000 0x008000>;
109 read-only;
110 };
111
112 partition@48000 {
113 label = "mfcdata";
114 reg = <0x048000 0x008000>;
115 read-only;
116
117 compatible = "nvmem-cells";
118
119 nvmem-layout {
120 compatible = "fixed-layout";
121 #address-cells = <1>;
122 #size-cells = <1>;
123
124 macaddr_mfcdata_35: macaddr@35 {
125 compatible = "mac-base";
126 reg = <0x35 0x11>;
127 #nvmem-cell-cells = <1>;
128 };
129
130 macaddr_mfcdata_51: macaddr@51 {
131 compatible = "mac-base";
132 reg = <0x51 0x11>;
133 #nvmem-cell-cells = <1>;
134 };
135 };
136 };
137
138 partition@50000 {
139 label = "devconf";
140 reg = <0x050000 0x010000>;
141 read-only;
142 };
143
144 partition@60000 {
145 label = "langpack";
146 reg = <0x060000 0x020000>;
147 read-only;
148 };
149
150 partition@80000 {
151 label = "art";
152 reg = <0x080000 0x010000>;
153 read-only;
154
155 compatible = "nvmem-cells";
156 #address-cells = <1>;
157 #size-cells = <1>;
158
159 cal_art_1000: calibration@1000 {
160 reg = <0x1000 0x440>;
161 };
162 };
163
164 partition@90000 {
165 compatible = "seama";
166 label = "firmware";
167 reg = <0x090000 0x770000>;
168 };
169 };
170 };
171 };
172
173 &wmac {
174 status = "okay";
175
176 nvmem-cells = <&cal_art_1000>, <&macaddr_mfcdata_51 0>;
177 nvmem-cell-names = "calibration", "mac-address";
178 };