ath79: qca: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / qca9531_glinet_gl-xe300.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca953x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "glinet,gl-xe300", "qca,qca9531";
10 model = "GL.iNet GL-XE300";
11
12 aliases {
13 label-mac-device = &eth0;
14 };
15
16 gpio-export {
17 compatible = "gpio-export";
18
19 gpio_lte_power {
20 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
21 gpio-export,name = "lte_power";
22 gpio-export,output = <1>;
23 };
24
25 gpio_sd_detect {
26 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
27 gpio-export,name = "sd_detect";
28 gpio-export,output = <0>;
29 };
30 };
31
32 keys {
33 compatible = "gpio-keys";
34
35 pinctrl-names = "default";
36 pinctrl-0 = <&jtag_disable_pins>;
37
38 reset {
39 label = "reset";
40 linux,code = <KEY_RESTART>;
41 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
42 };
43 };
44
45 leds {
46 compatible = "gpio-leds";
47
48 lan {
49 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
50 label = "green:lan";
51 };
52
53 wan {
54 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
55 label = "green:wan";
56 };
57
58 wlan {
59 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
60 label = "green:wlan";
61 linux,default-trigger = "phy0tpt";
62 };
63
64 lte {
65 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
66 label = "green:lte";
67 };
68 };
69 };
70
71 &pcie0 {
72 status = "okay";
73 };
74
75 &usb0 {
76 status = "okay";
77 };
78
79 &usb_phy {
80 status = "okay";
81 };
82
83 &spi {
84 status = "okay";
85
86 flash@0 {
87 compatible = "jedec,spi-nor";
88 reg = <0>;
89 spi-max-frequency = <25000000>;
90
91 partitions {
92 compatible = "fixed-partitions";
93 #address-cells = <1>;
94 #size-cells = <1>;
95
96 partition@0 {
97 label = "u-boot";
98 reg = <0x0 0x40000>;
99 read-only;
100 };
101
102 partition@40000 {
103 label = "u-boot-env";
104 reg = <0x40000 0x10000>;
105 };
106
107 art: partition@50000 {
108 label = "art";
109 reg = <0x50000 0x10000>;
110 read-only;
111
112 nvmem-layout {
113 compatible = "fixed-layout";
114 #address-cells = <1>;
115 #size-cells = <1>;
116
117 macaddr_art_0: macaddr@0 {
118 reg = <0x0 0x6>;
119 };
120 };
121 };
122
123 partition@60000 {
124 label = "kernel";
125 reg = <0x60000 0x400000>;
126 };
127
128 partition@460000 {
129 label = "nor_reserved";
130 reg = <0x460000 0xba0000>;
131 };
132 };
133 };
134
135 flash@1 {
136 compatible = "spi-nand";
137 reg = <1>;
138 spi-max-frequency = <25000000>;
139
140 partitions {
141 compatible = "fixed-partitions";
142 #address-cells = <1>;
143 #size-cells = <1>;
144
145 partition@0 {
146 label = "ubi";
147 reg = <0x0 0x8000000>;
148 };
149 };
150 };
151 };
152
153 &eth0 {
154 status = "okay";
155
156 phy-handle = <&swphy4>;
157
158 nvmem-cells = <&macaddr_art_0>;
159 nvmem-cell-names = "mac-address";
160 };
161
162 &eth1 {
163 nvmem-cells = <&macaddr_art_0>;
164 nvmem-cell-names = "mac-address";
165 mac-address-increment = <1>;
166 };
167
168 &wmac {
169 status = "okay";
170
171 mtd-cal-data = <&art 0x1000>;
172 };