ath79: qca: convert to nvmem-layout
[openwrt/staging/nbd.git] / target / linux / ath79 / dts / qca9558_openmesh_a60.dtsi
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
8 / {
9 chosen {
10 /delete-property/ bootargs;
11 };
12
13 aliases {
14 serial0 = &uart;
15 led-boot = &led_status_green;
16 led-failsafe = &led_status_green;
17 led-running = &led_status_green;
18 led-upgrade = &led_status_green;
19 label-mac-device = &eth0;
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
32 leds {
33 compatible = "gpio-leds";
34
35 status_blue {
36 label = "blue:status";
37 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
38 };
39
40 status_red {
41 label = "red:status";
42 gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
43 };
44
45 led_status_green: status_green {
46 label = "green:status";
47 gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
48 };
49 };
50
51 watchdog {
52 compatible = "linux,wdt-gpio";
53 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
54 hw_algo = "toggle";
55 /* hw_margin_ms is actually 300s but driver limits it to 60s */
56 hw_margin_ms = <60000>;
57 always-running;
58 };
59 };
60
61 &usb_phy1 {
62 status = "okay";
63 };
64
65 &usb1 {
66 status = "okay";
67 };
68
69 &spi {
70 status = "okay";
71
72 flash@0 {
73 compatible = "jedec,spi-nor";
74 reg = <0>;
75 spi-max-frequency = <40000000>;
76
77 /* partitions are passed via bootloader */
78 partitions {
79 compatible = "fixed-partitions";
80 #address-cells = <1>;
81 #size-cells = <1>;
82
83 partition@0 {
84 label = "u-boot";
85 reg = <0x000000 0x040000>;
86 read-only;
87 };
88
89 partition@40000 {
90 label = "u-boot-env";
91 reg = <0x040000 0x010000>;
92 };
93
94 partition@50000 {
95 label = "custom";
96 reg = <0x050000 0x060000>;
97 read-only;
98 };
99
100 partition@b0000 {
101 label = "inactive";
102 reg = <0x0b0000 0x7a0000>;
103 };
104
105 partition@850000 {
106 label = "inactive2";
107 reg = <0x850000 0x7a0000>;
108 };
109
110 art: partition@ff0000 {
111 label = "ART";
112 reg = <0xff0000 0x010000>;
113 read-only;
114
115 nvmem-layout {
116 compatible = "fixed-layout";
117 #address-cells = <1>;
118 #size-cells = <1>;
119
120 macaddr_art_0: macaddr@0 {
121 reg = <0x0 0x6>;
122 };
123
124 macaddr_art_6: macaddr@6 {
125 reg = <0x6 0x6>;
126 };
127 };
128 };
129 };
130 };
131 };
132
133 &mdio0 {
134 status = "okay";
135
136 phy1: ethernet-phy@1 {
137 reg = <1>;
138 eee-broken-100tx;
139 eee-broken-1000t;
140 };
141
142 phy2: ethernet-phy@2 {
143 reg = <2>;
144 eee-broken-100tx;
145 eee-broken-1000t;
146 at803x-override-sgmii-link-check;
147 };
148 };
149
150 &eth0 {
151 status = "okay";
152
153 pll-data = <0x82000101 0x80000101 0x80001313>;
154
155 nvmem-cells = <&macaddr_art_0>;
156 nvmem-cell-names = "mac-address";
157
158 phy-mode = "rgmii-id";
159 phy-handle = <&phy1>;
160
161 gmac-config {
162 device = <&gmac>;
163 rgmii-enabled = <1>;
164 rxd-delay = <3>;
165 rxdv-delay = <3>;
166 txd-delay = <0>;
167 txen-delay = <0>;
168 };
169 };
170
171 &eth1 {
172 status = "okay";
173
174 pll-data = <0x03000101 0x80000101 0x80001313>;
175
176 nvmem-cells = <&macaddr_art_6>;
177 nvmem-cell-names = "mac-address";
178
179 qca955x-sgmii-fixup;
180
181 phy-handle = <&phy2>;
182 };
183
184 &wmac {
185 status = "okay";
186
187 mtd-cal-data = <&art 0x1000>;
188 nvmem-cells = <&macaddr_art_0>;
189 nvmem-cell-names = "mac-address";
190 mac-address-increment = <2>;
191 };
192
193 &pcie0 {
194 status = "okay";
195 };