e5460b299df17bcd446863481473e14871ec631b
[openwrt/staging/hauke.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 label-mac-device = &eth0;
14 };
15
16 leds {
17 compatible = "gpio-leds";
18
19 wlan {
20 label = "green:wlan";
21 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
22 linux,default-trigger = "phy0tpt";
23 };
24
25 lan {
26 label = "green:lan";
27 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
28 };
29
30 wan {
31 label = "green:wan";
32 gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
33 };
34
35 3g4g {
36 label = "green:3g4g";
37 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
38 };
39 };
40
41 keys {
42 compatible = "gpio-keys";
43
44 reset {
45 label = "reset";
46 linux,code = <KEY_RESTART>;
47 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
48 debounce-interval = <60>;
49 };
50 };
51
52 reg_usb_vbus: reg_usb_vbus {
53 compatible = "regulator-fixed";
54 regulator-name = "usb_vbus";
55 regulator-min-microvolt = <5000000>;
56 regulator-max-microvolt = <5000000>;
57 gpio = <&gpio 6 GPIO_ACTIVE_LOW>;
58 };
59
60 gpio-export {
61 compatible = "gpio-export";
62
63 minipcie {
64 gpio-export,name = "minipcie";
65 gpio-export,output = <0>;
66 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
67 };
68 };
69 };
70
71 &usb {
72 status = "okay";
73
74 dr_mode = "host";
75 vbus-supply = <&reg_usb_vbus>;
76 };
77
78 &usb_phy {
79 status = "okay";
80 };
81
82 &spi {
83 status = "okay";
84
85 flash@0 {
86 compatible = "jedec,spi-nor";
87 spi-max-frequency = <33000000>;
88 reg = <0>;
89
90 partitions {
91 compatible = "fixed-partitions";
92 #address-cells = <1>;
93 #size-cells = <1>;
94
95 partition@0 {
96 label = "u-boot";
97 reg = <0x000000 0x040000>;
98 read-only;
99 };
100
101 partition@40000 {
102 label = "u-boot-env";
103 reg = <0x040000 0x010000>;
104 };
105
106 partition@50000 {
107 compatible = "denx,uimage";
108 label = "firmware";
109 reg = <0x050000 0xfa0000>;
110 };
111
112 art: partition@ff0000 {
113 label = "art";
114 reg = <0xff0000 0x010000>;
115 read-only;
116 };
117 };
118 };
119 };
120
121 &eth0 {
122 status = "okay";
123
124 nvmem-cells = <&macaddr_art_0>;
125 nvmem-cell-names = "mac-address";
126
127 gmac-config {
128 device = <&gmac>;
129
130 switch-phy-addr-swap = <0>;
131 switch-phy-swap = <0>;
132 };
133 };
134
135 &eth1 {
136 status = "okay";
137
138 nvmem-cells = <&macaddr_art_0>;
139 nvmem-cell-names = "mac-address";
140 };
141
142 &wmac {
143 status = "okay";
144
145 mtd-cal-data = <&art 0x1000>;
146 };
147
148 &art {
149 compatible = "nvmem-cells";
150 #address-cells = <1>;
151 #size-cells = <1>;
152
153 macaddr_art_0: macaddr@0 {
154 reg = <0x0 0x6>;
155 };
156 };