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