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