ath79: Add wifi to WNDR3700, WNDR3700v2 and WNDR3800
[oweals/openwrt.git] / target / linux / ath79 / dts / ar9330_glinet_ar150.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 "ar9330.dtsi"
8
9 / {
10         model = "GL.iNet GL-AR150";
11         compatible = "glinet,ar150", "qca,ar9330";
12
13         aliases {
14                 serial0 = &uart;
15                 led-status = &wlan;
16         };
17
18         leds {
19                 compatible = "gpio-leds";
20
21                 wlan: wlan {
22                         label = "gl-ar150:orange:wlan";
23                         gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
24                         default-state = "off";
25                         linux,default-trigger = "phy0tpt";
26                 };
27
28                 lan {
29                         label = "gl-ar150:green:lan";
30                         gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
31                         default-state = "off";
32                 };
33
34                 wan {
35                         label = "gl-ar150:green:wan";
36                         gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
37                         default-state = "off";
38                 };
39         };
40
41         keys {
42                 compatible = "gpio-keys-polled";
43                 poll-interval = <100>;
44
45                 manual {
46                         label = "manual";
47                         linux,code = <BTN_7>;
48                         gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
49                 };
50
51                 auto {
52                         label = "auto";
53                         linux,code = <BTN_8>;
54                         gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
55                 };
56
57                 reset {
58                         label = "reset";
59                         linux,code = <KEY_RESTART>;
60                         gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
61                 };
62         };
63 };
64
65 &uart {
66         status = "okay";
67 };
68
69 &gpio {
70         status = "okay";
71 };
72
73 &usb {
74         dr_mode = "host";
75         status = "okay";
76 };
77
78 &usb_phy {
79         status = "okay";
80         gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
81 };
82
83 &spi {
84         num-chipselects = <1>;
85         status = "okay";
86
87         flash@0 {
88                 compatible = "jedec,spi-nor";
89                 spi-max-frequency = <104000000>;
90                 reg = <0>;
91
92                 partitions {
93                         compatible = "fixed-partitions";
94                         #address-cells = <1>;
95                         #size-cells = <1>;
96
97                         partition@0 {
98                                 label = "u-boot";
99                                 reg = <0x000000 0x040000>;
100                                 read-only;
101                         };
102
103                         partition@1 {
104                                 label = "u-boot-env";
105                                 reg = <0x040000 0x010000>;
106                         };
107
108                         partition@2 {
109                                 label = "firmware";
110                                 reg = <0x050000 0xfa0000>;
111                         };
112
113                         art: partition@3 {
114                                 label = "ART";
115                                 reg = <0xff0000 0x010000>;
116                                 read-only;
117                         };
118                 };
119         };
120 };
121
122 &eth0 {
123         status = "okay";
124
125         mtd-mac-address = <&art 0x0>;
126 };
127
128 &eth1 {
129         status = "okay";
130
131         mtd-mac-address = <&art 0x0>;
132
133         gmac-config {
134                 device = <&gmac>;
135
136                 switch-phy-addr-swap = <0>;
137                 switch-phy-swap = <0>;
138         };
139 };
140
141 &wmac {
142         status = "okay";
143         mtd-cal-data = <&art 0x1000>;
144         mtd-mac-address = <&art 0x0>;
145 };