ramips: set usb led trigger via devicetree
[oweals/openwrt.git] / target / linux / ramips / dts / WN-AX1167GR.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "iodata,wn-ax1167gr", "mediatek,mt7621-soc";
10         model = "I-O DATA WN-AX1167GR";
11
12         aliases {
13                 led-status = &led_power;
14         };
15
16         memory@0 {
17                 device_type = "memory";
18                 reg = <0x0 0x4000000>;
19         };
20
21         chosen {
22                 bootargs = "console=ttyS0,115200";
23         };
24
25         gpio-leds {
26                 compatible = "gpio-leds";
27
28                 led_power: power {
29                         label = "wn-ax1167gr:green:power";
30                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
31                 };
32
33                 wps {
34                         label = "wn-ax1167gr:green:wps";
35                         gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
36                 };
37         };
38
39         gpio-keys-polled {
40                 compatible = "gpio-keys-polled";
41                 poll-interval = <20>;
42
43                 reset {
44                         label = "reset";
45                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
46                         linux,code = <KEY_RESTART>;
47                 };
48
49                 wps {
50                         label = "wps";
51                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
52                         linux,code = <KEY_WPS_BUTTON>;
53                 };
54
55                 auto {
56                         label = "auto";
57                         gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
58                         linux,code = <BTN_0>;
59                         linux,input-type = <EV_SW>;
60                 };
61
62                 custom {
63                         label = "custom";
64                         gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
65                         linux,code = <BTN_0>;
66                         linux,input-type = <EV_SW>;
67                 };
68         };
69 };
70
71 &spi0 {
72         status = "okay";
73
74         m25p80@0 {
75                 compatible = "jedec,spi-nor";
76                 reg = <0>;
77                 spi-max-frequency = <10000000>;
78                 m25p,chunked-io = <32>;
79
80                 partitions {
81                         compatible = "fixed-partitions";
82                         #address-cells = <1>;
83                         #size-cells = <1>;
84
85                         partition@0 {
86                                 label = "Bootloader";
87                                 reg = <0x0 0x30000>;
88                                 read-only;
89                         };
90
91                         partition@30000 {
92                                 label = "Config";
93                                 reg = <0x30000 0x10000>;
94                                 read-only;
95                         };
96
97                         Factory: partition@40000 {
98                                 label = "Factory";
99                                 reg = <0x40000 0x10000>;
100                                 read-only;
101                         };
102
103                         iNIC_rf: partition@50000 {
104                                 label = "iNIC_rf";
105                                 reg = <0x50000 0x10000>;
106                                 read-only;
107                         };
108
109                         partition@60000 {
110                                 label = "firmware";
111                                 reg = <0x60000 0xf30000>;
112                         };
113
114                         partition@f90000 {
115                                 label = "Key";
116                                 reg = <0xf90000 0x10000>;
117                                 read-only;
118                         };
119
120                         partition@fa0000 {
121                                 label = "backup";
122                                 reg = <0xfa0000 0x10000>;
123                                 read-only;
124                         };
125
126                         partition@fb0000 {
127                                 label = "storage";
128                                 reg = <0xfb0000 0x50000>;
129                                 read-only;
130                         };
131                 };
132         };
133 };
134
135 &ethernet {
136         mtd-mac-address = <&iNIC_rf 0x4>;
137 };
138
139 &pinctrl {
140         state_default: pinctrl0 {
141                 gpio {
142                         ralink,group = "uart2", "uart3", "jtag";
143                         ralink,function = "gpio";
144                 };
145         };
146 };
147
148 &pcie {
149         status = "okay";
150 };
151
152 &pcie0 {
153         mt76@0,0 {
154                 reg = <0x0000 0 0 0 0>;
155                 mediatek,mtd-eeprom = <&iNIC_rf 0x0>;
156         };
157 };
158
159 &pcie1 {
160         mt76@0,0 {
161                 reg = <0x0000 0 0 0 0>;
162                 mediatek,mtd-eeprom = <&Factory 0x0>;
163                 ieee80211-freq-limit = <5000000 6000000>;
164         };
165 };
166
167 &xhci {
168         status = "disabled";
169 };