ramips: add support for I-O DATA WN-AC733GR3
[openwrt/staging/jow.git] / target / linux / ramips / dts / WN-AC733GR3.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7620a.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "iodata,wn-ac733gr3", "ralink,mt7620a-soc";
11 model = "I-O DATA WN-AC733GR3";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 };
19
20 memory@0 {
21 device_type = "memory";
22 reg = <0x0 0x4000000>;
23 };
24
25 leds {
26 compatible = "gpio-leds";
27
28 led_power: power {
29 label = "wn-ac733gr3:green:power";
30 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
31 default-state = "on";
32 };
33
34 notification {
35 label = "wn-ac733gr3:green:notification";
36 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
37 };
38
39 wlan2g {
40 label = "wn-ac733gr3:green:wlan2g";
41 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
42 };
43
44 wlan5g {
45 label = "wn-ac733gr3:green:wlan5g";
46 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
47 };
48 };
49
50 keys {
51 compatible = "gpio-keys-polled";
52 poll-interval = <20>;
53
54 reset {
55 label = "reset";
56 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
57 linux,code = <KEY_RESTART>;
58 };
59
60 wps {
61 label = "wps";
62 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
63 linux,code = <KEY_WPS_BUTTON>;
64 };
65
66 router {
67 label = "router";
68 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
69 linux,code = <BTN_0>;
70 linux,input-type = <EV_SW>;
71 };
72
73 auto {
74 label = "auto";
75 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
76 linux,code = <BTN_0>;
77 linux,input-type = <EV_SW>;
78 };
79 };
80
81 rtl8367rb {
82 compatible = "realtek,rtl8367b";
83 gpio-sda = <&gpio0 22 GPIO_ACTIVE_HIGH>;
84 gpio-sck = <&gpio0 23 GPIO_ACTIVE_HIGH>;
85 realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
86 };
87 };
88
89 &spi0 {
90 status = "okay";
91
92 flash@0 {
93 compatible = "jedec,spi-nor";
94 reg = <0>;
95 spi-max-frequency = <10000000>;
96
97 partitions {
98 compatible = "fixed-partitions";
99 #address-cells = <1>;
100 #size-cells = <1>;
101
102 partition@0 {
103 label = "u-boot";
104 reg = <0x0 0x30000>;
105 read-only;
106 };
107
108 partition@30000 {
109 label = "u-boot-env";
110 reg = <0x30000 0x10000>;
111 read-only;
112 };
113
114 Factory: partition@40000 {
115 label = "Factory";
116 reg = <0x40000 0x8000>;
117 read-only;
118 };
119
120 iNIC_rf: partition@48000 {
121 label = "iNIC_rf";
122 reg = <0x48000 0x8000>;
123 read-only;
124 };
125
126 partition@50000 {
127 compatible = "denx,uimage";
128 label = "firmware";
129 reg = <0x50000 0x6d4000>;
130 };
131
132 partition@724000 {
133 label = "manufacture";
134 reg = <0x724000 0x8c000>;
135 read-only;
136 };
137
138 partition@7b0000 {
139 label = "backup";
140 reg = <0x7b0000 0x10000>;
141 read-only;
142 };
143
144 partition@7c0000 {
145 label = "storage";
146 reg = <0x7c0000 0x40000>;
147 read-only;
148 };
149 };
150 };
151 };
152
153 &ethernet {
154 pinctrl-names = "default";
155 pinctrl-0 = <&rgmii1_pins>;
156 mtd-mac-address = <&Factory 0x4>;
157
158 port@5 {
159 status = "okay";
160 mediatek,fixed-link = <1000 1 1 1>;
161 phy-mode = "rgmii";
162 };
163 };
164
165 &gpio0 {
166 rtl8367rb_reset {
167 gpio-hog;
168 gpios = <0 GPIO_ACTIVE_HIGH>;
169 output-high;
170 line-name = "rtl8367rb-reset";
171 };
172 };
173
174 &pinctrl {
175 state_default: pinctrl0 {
176 gpio {
177 ralink,group = "i2c", "uartf", "mdio";
178 ralink,function = "gpio";
179 };
180 };
181 };
182
183 &pcie {
184 status = "okay";
185 };
186
187 &pcie0 {
188 wifi@0,0 {
189 compatible = "mediatek,mt76";
190 reg = <0x0000 0 0 0 0>;
191 mediatek,mtd-eeprom = <&iNIC_rf 0x0>;
192 ieee80211-freq-limit = <5000000 6000000>;
193 };
194 };
195
196 &wmac {
197 ralink,mtd-eeprom = <&Factory 0x0>;
198 };