ath79: add support for Qxwlan E600G v2 / E600GAC v2
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9331_glinet_gl-mifi.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9331.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "glinet,gl-mifi", "qca,ar9331";
10 model = "GL.iNet GL-MiFi";
11
12 aliases {
13 serial0 = &uart;
14 label-mac-device = &eth0;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 wlan {
21 label = "green:wlan";
22 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
23 linux,default-trigger = "phy0tpt";
24 };
25
26 lan {
27 label = "green:lan";
28 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
29 };
30
31 wan {
32 label = "green:wan";
33 gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
34 };
35
36 3g4g {
37 label = "green:3g4g";
38 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
39 };
40 };
41
42 keys {
43 compatible = "gpio-keys";
44
45 reset {
46 label = "reset";
47 linux,code = <KEY_RESTART>;
48 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
49 debounce-interval = <60>;
50 };
51 };
52
53 reg_usb_vbus: reg_usb_vbus {
54 compatible = "regulator-fixed";
55 regulator-name = "usb_vbus";
56 regulator-min-microvolt = <5000000>;
57 regulator-max-microvolt = <5000000>;
58 gpio = <&gpio 6 GPIO_ACTIVE_LOW>;
59 };
60
61 gpio-export {
62 compatible = "gpio-export";
63
64 minipcie {
65 gpio-export,name = "minipcie";
66 gpio-export,output = <0>;
67 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
68 };
69 };
70 };
71
72 &uart {
73 status = "okay";
74 };
75
76 &usb {
77 status = "okay";
78
79 dr_mode = "host";
80 vbus-supply = <&reg_usb_vbus>;
81 };
82
83 &usb_phy {
84 status = "okay";
85 };
86
87 &spi {
88 status = "okay";
89
90 num-chipselects = <1>;
91
92 flash@0 {
93 compatible = "jedec,spi-nor";
94 spi-max-frequency = <33000000>;
95 reg = <0>;
96
97 partitions {
98 compatible = "fixed-partitions";
99 #address-cells = <1>;
100 #size-cells = <1>;
101
102 partition@0 {
103 label = "u-boot";
104 reg = <0x000000 0x040000>;
105 read-only;
106 };
107
108 partition@40000 {
109 label = "u-boot-env";
110 reg = <0x040000 0x010000>;
111 };
112
113 partition@50000 {
114 compatible = "denx,uimage";
115 label = "firmware";
116 reg = <0x050000 0xfa0000>;
117 };
118
119 art: partition@ff0000 {
120 label = "art";
121 reg = <0xff0000 0x010000>;
122 read-only;
123 };
124 };
125 };
126 };
127
128 &eth0 {
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 &eth1 {
142 status = "okay";
143
144 mtd-mac-address = <&art 0x0>;
145 };
146
147 &wmac {
148 status = "okay";
149
150 mtd-cal-data = <&art 0x1000>;
151 };