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