ath79: add support for D-Link DAP-2230 A1
[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 flash@0 {
91 compatible = "jedec,spi-nor";
92 spi-max-frequency = <33000000>;
93 reg = <0>;
94
95 partitions {
96 compatible = "fixed-partitions";
97 #address-cells = <1>;
98 #size-cells = <1>;
99
100 partition@0 {
101 label = "u-boot";
102 reg = <0x000000 0x040000>;
103 read-only;
104 };
105
106 partition@40000 {
107 label = "u-boot-env";
108 reg = <0x040000 0x010000>;
109 };
110
111 partition@50000 {
112 compatible = "denx,uimage";
113 label = "firmware";
114 reg = <0x050000 0xfa0000>;
115 };
116
117 art: partition@ff0000 {
118 label = "art";
119 reg = <0xff0000 0x010000>;
120 read-only;
121 };
122 };
123 };
124 };
125
126 &eth0 {
127 status = "okay";
128
129 mtd-mac-address = <&art 0x0>;
130
131 gmac-config {
132 device = <&gmac>;
133
134 switch-phy-addr-swap = <0>;
135 switch-phy-swap = <0>;
136 };
137 };
138
139 &eth1 {
140 status = "okay";
141
142 mtd-mac-address = <&art 0x0>;
143 };
144
145 &wmac {
146 status = "okay";
147
148 mtd-cal-data = <&art 0x1000>;
149 };