ramips: Use dts alias based status led
[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                 #address-cells = <1>;
42                 #size-cells = <0>;
43                 poll-interval = <20>;
44
45                 reset {
46                         label = "reset";
47                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
48                         linux,code = <KEY_RESTART>;
49                 };
50
51                 wps {
52                         label = "wps";
53                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
54                         linux,code = <KEY_WPS_BUTTON>;
55                 };
56
57                 auto {
58                         label = "auto";
59                         gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
60                         linux,code = <BTN_0>;
61                         linux,input-type = <EV_SW>;
62                 };
63
64                 custom {
65                         label = "custom";
66                         gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
67                         linux,code = <BTN_0>;
68                         linux,input-type = <EV_SW>;
69                 };
70         };
71 };
72
73 &spi0 {
74         status = "okay";
75
76         m25p80@0 {
77                 #address-cells = <1>;
78                 #size-cells = <1>;
79                 compatible = "jedec,spi-nor";
80                 reg = <0>;
81                 spi-max-frequency = <10000000>;
82                 m25p,chunked-io = <32>;
83
84                 partition@0 {
85                         label = "Bootloader";
86                         reg = <0x0 0x30000>;
87                         read-only;
88                 };
89
90                 partition@30000 {
91                         label = "Config";
92                         reg = <0x30000 0x10000>;
93                         read-only;
94                 };
95
96                 Factory: partition@40000 {
97                         label = "Factory";
98                         reg = <0x40000 0x10000>;
99                         read-only;
100                 };
101
102                 iNIC_rf: partition@50000 {
103                         label = "iNIC_rf";
104                         reg = <0x50000 0x10000>;
105                         read-only;
106                 };
107
108                 partition@60000 {
109                         label = "firmware";
110                         reg = <0x60000 0xf30000>;
111                 };
112
113                 partition@f90000 {
114                         label = "Key";
115                         reg = <0xf90000 0x10000>;
116                         read-only;
117                 };
118
119                 partition@fa0000 {
120                         label = "backup";
121                         reg = <0xfa0000 0x10000>;
122                         read-only;
123                 };
124
125                 partition@fb0000 {
126                         label = "storage";
127                         reg = <0xfb0000 0x50000>;
128                         read-only;
129                 };
130         };
131 };
132
133 &ethernet {
134         mtd-mac-address = <&iNIC_rf 0x4>;
135 };
136
137 &pinctrl {
138         state_default: pinctrl0 {
139                 gpio {
140                         ralink,group = "uart2", "uart3", "jtag";
141                         ralink,function = "gpio";
142                 };
143         };
144 };
145
146 &pcie {
147         status = "okay";
148
149         pcie0 {
150                 mt76@0,0 {
151                         reg = <0x0000 0 0 0 0>;
152                         device_type = "pci";
153                         mediatek,mtd-eeprom = <&iNIC_rf 0x0>;
154                 };
155         };
156
157         pcie1 {
158                 mt76@1,0 {
159                         reg = <0x0000 0 0 0 0>;
160                         device_type = "pci";
161                         mediatek,mtd-eeprom = <&Factory 0x0>;
162                         ieee80211-freq-limit = <5000000 6000000>;
163                 };
164         };
165 };
166
167 &xhci {
168         status = "disabled";
169 };