ath79: qca: convert to nvmem-layout
[openwrt/staging/nbd.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 nvmem-layout {
118 compatible = "fixed-layout";
119 #address-cells = <1>;
120 #size-cells = <1>;
121
122 macaddr_mfcdata_35: macaddr@35 {
123 compatible = "mac-base";
124 reg = <0x35 0x11>;
125 #nvmem-cell-cells = <1>;
126 };
127
128 macaddr_mfcdata_51: macaddr@51 {
129 compatible = "mac-base";
130 reg = <0x51 0x11>;
131 #nvmem-cell-cells = <1>;
132 };
133 };
134 };
135
136 partition@50000 {
137 label = "devconf";
138 reg = <0x050000 0x010000>;
139 read-only;
140 };
141
142 partition@60000 {
143 label = "langpack";
144 reg = <0x060000 0x020000>;
145 read-only;
146 };
147
148 partition@80000 {
149 label = "art";
150 reg = <0x080000 0x010000>;
151 read-only;
152
153 nvmem-layout {
154 compatible = "fixed-layout";
155 #address-cells = <1>;
156 #size-cells = <1>;
157
158 cal_art_1000: calibration@1000 {
159 reg = <0x1000 0x440>;
160 };
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 };