ath79: initial gl-ar300m support
[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         memory@0 {
19                 device_type = "memory";
20                 reg = <0x0 0x4000000>;
21         };
22
23         leds {
24                 compatible = "gpio-leds";
25
26                 wlan: wlan {
27                         label = "gl-ar150:orange:wlan";
28                         gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
29                         default-state = "off";
30                         linux,default-trigger = "phy0tpt";
31                 };
32
33                 lan {
34                         label = "gl-ar150:green:lan";
35                         gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
36                         default-state = "off";
37                 };
38
39                 wan {
40                         label = "gl-ar150:green:wan";
41                         gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
42                         default-state = "off";
43                 };
44         };
45
46         keys {
47                 compatible = "gpio-keys-polled";
48                 #address-cells = <1>;
49                 #size-cells = <0>;
50                 poll-interval = <100>;
51
52                 manual {
53                         label = "manual";
54                         linux,code = <BTN_7>;
55                         gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
56                 };
57
58                 auto {
59                         label = "auto";
60                         linux,code = <BTN_8>;
61                         gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
62                 };
63
64                 reset {
65                         label = "reset";
66                         linux,code = <KEY_RESTART>;
67                         gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
68                 };
69         };
70 };
71
72 &uart {
73         status = "okay";
74 };
75
76 &gpio {
77         status = "okay";
78 };
79
80 &usb {
81         dr_mode = "host";
82         status = "okay";
83 };
84
85 &usb_phy {
86         status = "okay";
87         gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
88 };
89
90 &spi {
91         num-chipselects = <1>;
92         status = "okay";
93
94         spiflash@0 {
95                 #address-cells = <1>;
96                 #size-cells = <1>;
97                 compatible = "jedec,spi-nor";
98                 spi-max-frequency = <104000000>;
99                 reg = <0>;
100
101                 partitions {
102                         compatible = "fixed-partitions";
103                         #address-cells = <1>;
104                         #size-cells = <1>;
105
106                         partition@0 {
107                                 label = "u-boot";
108                                 reg = <0x000000 0x040000>;
109                                 read-only;
110                         };
111
112                         partition@1 {
113                                 label = "u-boot-env";
114                                 reg = <0x040000 0x010000>;
115                         };
116
117                         partition@2 {
118                                 label = "firmware";
119                                 reg = <0x050000 0xfa0000>;
120                         };
121
122                         art: partition@3 {
123                                 label = "ART";
124                                 reg = <0xff0000 0x010000>;
125                                 read-only;
126                         };
127                 };
128         };
129 };
130
131 &mdio0 {
132         status = "okay";
133
134         phy4: ethernet-phy@4 {
135                 reg = <4>;
136                 phy-mode = "mii";
137         };
138 };
139
140 &eth0 {
141         status = "okay";
142
143         mtd-mac-address = <&art 0x0>;
144
145         phy-handle = <&phy4>;
146 };
147
148 &eth1 {
149         status = "okay";
150
151         mtd-mac-address = <&art 0x0>;
152
153         fixed-link {
154                 speed = <1000>;
155                 full-duplex;
156         };
157
158         gmac-config {
159                 device = <&gmac>;
160
161                 switch-phy-addr-swap = <0>;
162                 switch-phy-swap = <0>;
163         };
164 };
165
166 &wmac {
167         status = "okay";
168         mtd-cal-data = <&art 0x1000>;
169         mtd-mac-address = <&art 0x0>;
170 };