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