137bff732cf8b6391e6cd4685df7ef48f7004094
[openwrt/openwrt.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 color = <LED_COLOR_ID_GREEN>;
50 function = LED_FUNCTION_POWER;
51 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
52 };
53
54 led-2 {
55 color = <LED_COLOR_ID_GREEN>;
56 function = LED_FUNCTION_WPS;
57 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
58 };
59 };
60 };
61
62 &eth0 {
63 status = "okay";
64
65 phy-mode = "mii";
66
67 nvmem-cells = <&macaddr_mfcdata_35 0>;
68 nvmem-cell-names = "mac-address";
69
70 fixed-link {
71 speed = <100>;
72 full-duplex;
73 };
74 };
75
76 &mdio0 {
77 status = "okay";
78
79 switch0@1f {
80 compatible = "qca,ar8236";
81 reg = <0x1f>;
82 };
83 };
84
85 &spi {
86 status = "okay";
87
88 flash@0 {
89 compatible = "jedec,spi-nor";
90 reg = <0>;
91 spi-max-frequency = <30000000>;
92 m25p,fast-read;
93
94 partitions {
95 compatible = "fixed-partitions";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 partition@0 {
100 label = "u-boot";
101 reg = <0x000000 0x040000>;
102 read-only;
103 };
104
105 partition@40000 {
106 label = "u-boot-env";
107 reg = <0x040000 0x008000>;
108 read-only;
109 };
110
111 partition@48000 {
112 label = "mfcdata";
113 reg = <0x048000 0x008000>;
114 read-only;
115
116 nvmem-layout {
117 compatible = "fixed-layout";
118 #address-cells = <1>;
119 #size-cells = <1>;
120
121 macaddr_mfcdata_35: macaddr@35 {
122 compatible = "mac-base";
123 reg = <0x35 0x11>;
124 #nvmem-cell-cells = <1>;
125 };
126
127 macaddr_mfcdata_51: macaddr@51 {
128 compatible = "mac-base";
129 reg = <0x51 0x11>;
130 #nvmem-cell-cells = <1>;
131 };
132 };
133 };
134
135 partition@50000 {
136 label = "devconf";
137 reg = <0x050000 0x010000>;
138 read-only;
139 };
140
141 partition@60000 {
142 label = "langpack";
143 reg = <0x060000 0x020000>;
144 read-only;
145 };
146
147 partition@80000 {
148 label = "art";
149 reg = <0x080000 0x010000>;
150 read-only;
151
152 nvmem-layout {
153 compatible = "fixed-layout";
154 #address-cells = <1>;
155 #size-cells = <1>;
156
157 cal_art_1000: calibration@1000 {
158 reg = <0x1000 0x440>;
159 };
160 };
161 };
162
163 partition@90000 {
164 compatible = "seama";
165 label = "firmware";
166 reg = <0x090000 0x770000>;
167 };
168 };
169 };
170 };
171
172 &wmac {
173 status = "okay";
174
175 nvmem-cells = <&cal_art_1000>, <&macaddr_mfcdata_51 0>;
176 nvmem-cell-names = "calibration", "mac-address";
177 };