94daefbb7915e257b3e074fb36f266842bd1f959
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9558_engenius_epg5000.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "qca955x.dtsi"
8
9 / {
10         model = "EnGenius EPG5000";
11         compatible = "engenius,epg5000", "qca,qca9558";
12
13         chosen {
14                 bootargs = "console=ttyS0,115200n8";
15         };
16
17         aliases {
18                 led-boot = &led_power;
19                 led-failsafe = &led_power;
20                 led-running = &led_power;
21                 led-upgrade = &led_power;
22         };
23
24         leds {
25                 compatible = "gpio-leds";
26
27                 led_power: power {
28                         label = "epg5000:amber:power";
29                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
30                         default-state = "on";
31                 };
32
33                 wlan2g {
34                         label = "epg5000:blue:wlan2g";
35                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
36                         linux,default-trigger = "phy1tpt";
37                 };
38
39                 wlan5g {
40                         label = "epg5000:blue:wlan5g";
41                         gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
42                         linux,default-trigger = "phy0tpt";
43                 };
44
45                 wps_amber {
46                         label = "epg5000:amber:wps";
47                         gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
48                 };
49
50                 wps_blue {
51                         label = "epg5000:blue:wps";
52                         gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
53                 };
54         };
55
56         keys {
57                 compatible = "gpio-keys";
58
59                 reset {
60                         label = "reset";
61                         linux,code = <KEY_RESTART>;
62                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
63                         debounce-interval = <60>;
64                 };
65
66                 wps {
67                         label = "wps";
68                         linux,code = <KEY_WPS_BUTTON>;
69                         gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
70                         debounce-interval = <60>;
71                 };
72         };
73 };
74
75 &eth0 {
76         status = "okay";
77
78         phy-handle = <&phy0>;
79         pll-data = <0xa6000000 0x00000101 0x00001616>;
80 };
81
82 &mdio0 {
83         status = "okay";
84
85         phy0: ethernet-phy@0 {
86                 reg = <0>;
87
88                 qca,ar8327-initvals = <
89                         0x04 0x87600000 /* PORT0 PAD MODE CTRL */
90                         0x7c 0x0000007e /* PORT0_STATUS */
91                         >;
92         };
93 };
94
95 &pcie0 {
96         status = "okay";
97
98         wifi@0,0 {
99                 compatible = "pci168c,003c";
100                 reg = <0x0000 0 0 0 0>;
101         };
102 };
103
104 &spi {
105         status = "okay";
106
107         num-cs = <1>;
108
109         flash@0 {
110                 compatible = "jedec,spi-nor";
111                 reg = <0>;
112                 spi-max-frequency = <25000000>;
113
114                 partitions {
115                         compatible = "fixed-partitions";
116                         #address-cells = <1>;
117                         #size-cells = <1>;
118
119                         partition@0 {
120                                 label = "u-boot";
121                                 reg = <0x000000 0x030000>;
122                                 read-only;
123                         };
124
125                         partition@30000 {
126                                 label = "u-boot-env";
127                                 reg = <0x030000 0x010000>;
128                         };
129
130                         partition@40000 {
131                                 compatible = "denx,uimage";
132                                 label = "firmware";
133                                 reg = <0x040000 0xe50000>;
134                         };
135
136                         partition@790000 {
137                                 label = "manufacture";
138                                 reg = <0xe90000 0x100000>;
139                                 read-only;
140                         };
141
142                         partition@ed0000 {
143                                 label = "backup";
144                                 reg = <0xf90000 0x010000>;
145                                 read-only;
146                         };
147
148                         partition@fe0000 {
149                                 label = "storage";
150                                 reg = <0xfa0000 0x050000>;
151                                 read-only;
152                         };
153
154                         partition@ff0000 {
155                                 label = "art";
156                                 reg = <0xff0000 0x010000>;
157                                 read-only;
158                         };
159                 };
160         };
161 };
162
163 &uart {
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         qca,no-eeprom;
179 };