ath79: qca: convert to nvmem-layout
[openwrt/staging/blocktrron.git] / target / linux / ath79 / dts / qca9558_qxwlan_e558.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 aliases {
10 led-boot = &led_system;
11 led-failsafe = &led_system;
12 led-running = &led_system;
13 led-upgrade = &led_system;
14 label-mac-device = &eth0;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "Reset button";
22 linux,code = <KEY_RESTART>;
23 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
24 debounce-interval = <60>;
25 };
26 };
27
28 leds {
29 compatible = "gpio-leds";
30
31 wlan {
32 label = "green:wlan";
33 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
34 linux,default-trigger = "phy0tpt";
35 };
36
37 led_system: system {
38 label = "green:system";
39 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
40 default-state = "on";
41 };
42
43 sig1 {
44 label = "green:sig1";
45 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
46 };
47
48 sig2 {
49 label = "green:sig2";
50 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
51 };
52 };
53 };
54
55 &pcie0 {
56 status = "okay";
57 };
58
59 &pcie1 {
60 status = "okay";
61 };
62
63 &spi {
64 status = "okay";
65
66 flash@0 {
67 compatible = "jedec,spi-nor";
68 reg = <0>;
69 spi-max-frequency = <25000000>;
70
71 partitions: partitions {
72 compatible = "fixed-partitions";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 partition@0 {
77 label = "u-boot";
78 reg = <0x000000 0x040000>;
79 read-only;
80 };
81
82 partition@40000 {
83 label = "u-boot-env";
84 reg = <0x040000 0x010000>;
85 read-only;
86 };
87
88 pridata: partition@50000 {
89 label = "pri-data";
90 reg = <0x050000 0x010000>;
91 read-only;
92
93 nvmem-layout {
94 compatible = "fixed-layout";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 macaddr_pridata_400: macaddr@400 {
99 reg = <0x400 0x6>;
100 };
101 };
102 };
103
104 art: partition@60000 {
105 label = "art";
106 reg = <0x060000 0x010000>;
107 read-only;
108 };
109 };
110 };
111 };
112
113 &mdio0 {
114 status = "okay";
115
116 phy0: ethernet-phy@0 {
117 reg = <0>;
118
119 qca,ar8327-initvals = <
120 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
121 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
122 0x10 0x81000080 /* POWER_ON_STRAP */
123 0x50 0xcc35cc35 /* LED_CTRL0 */
124 0x54 0xca35ca35 /* LED_CTRL1 */
125 0x58 0xc935c935 /* LED_CTRL2 */
126 0x5c 0x03ffff00 /* LED_CTRL3 */
127 0x7c 0x0000007e /* PORT0_STATUS */
128 0x94 0x0000007e /* PORT6 STATUS */
129 >;
130 };
131 };
132
133 &eth0 {
134 status = "okay";
135
136 pll-data = <0x56000000 0x00000101 0x00001616>;
137
138 phy-handle = <&phy0>;
139
140 nvmem-cells = <&macaddr_pridata_400>;
141 nvmem-cell-names = "mac-address";
142 mac-address-increment = <1>;
143 };
144
145 &eth1 {
146 status = "okay";
147
148 pll-data = <0x03000101 0x00000101 0x00001616>;
149
150 nvmem-cells = <&macaddr_pridata_400>;
151 nvmem-cell-names = "mac-address";
152
153 fixed-link {
154 speed = <1000>;
155 full-duplex;
156 };
157 };
158
159 &usb_phy0 {
160 status = "okay";
161 };
162
163 &usb0 {
164 status = "okay";
165 };
166
167 &usb_phy1 {
168 status = "okay";
169 };
170
171 &usb1 {
172 status = "okay";
173 };
174
175 &wmac {
176 status = "okay";
177
178 mtd-cal-data = <&art 0x1000>;
179 };