ramips: add support for I-O DATA WNPR2600G
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_gehua_ghl-r-001.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7621.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10         compatible = "gehua,ghl-r-001", "mediatek,mt7621-soc";
11         model = "GeHua GHL-R-001";
12
13         chosen {
14                 bootargs = "console=ttyS0,57600";
15         };
16
17         leds {
18                 compatible = "gpio-leds";
19
20                 internet {
21                         label = "ghl-r-001:blue:internet";
22                         gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
23                 };
24
25                 usb {
26                         label = "ghl-r-001:blue:usb";
27                         gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
28                         trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
29                         linux,default-trigger = "usbport";
30                 };
31         };
32
33         keys {
34                 compatible = "gpio-keys-polled";
35                 poll-interval = <20>;
36
37                 reset {
38                         label = "reset";
39                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
40                         linux,code = <KEY_RESTART>;
41                 };
42         };
43 };
44
45 &uartlite3 {
46         status = "okay";
47 };
48
49 &spi0 {
50         status = "okay";
51
52         flash@0 {
53                 compatible = "mx25l25635f", "jedec,spi-nor";
54                 reg = <0>;
55                 spi-max-frequency = <25000000>;
56                 m25p,fast-read;
57
58                 partitions {
59                         compatible = "fixed-partitions";
60                         #address-cells = <1>;
61                         #size-cells = <1>;
62
63                         partition@0 {
64                                 label = "u-boot";
65                                 reg = <0x0 0x30000>;
66                                 read-only;
67                         };
68
69                         partition@30000 {
70                                 label = "u-boot-env";
71                                 reg = <0x30000 0x10000>;
72                                 read-only;
73                         };
74
75                         factory: partition@40000 {
76                                 label = "factory";
77                                 reg = <0x40000 0x10000>;
78                                 read-only;
79                         };
80
81                         partition@50000 {
82                                 compatible = "denx,uimage";
83                                 label = "firmware";
84                                 reg = <0x50000 0x1fb0000>;
85                         };
86                 };
87         };
88 };
89
90 &pcie {
91         status = "okay";
92 };
93
94 &pcie0 {
95         wifi@0,0 {
96                 reg = <0x0000 0 0 0 0>;
97                 mediatek,mtd-eeprom = <&factory 0x0000>;
98         };
99 };
100
101 &pcie1 {
102         wifi@0,0 {
103                 reg = <0x0000 0 0 0 0>;
104                 mediatek,mtd-eeprom = <&factory 0x8000>;
105                 ieee80211-freq-limit = <5000000 6000000>;
106
107                 led {
108                         led-sources = <2>;
109                         led-active-low;
110                 };
111         };
112 };
113
114 &ethernet {
115         mtd-mac-address = <&factory 0xe000>;
116 };
117
118 &pinctrl {
119         state_default: pinctrl0 {
120                 gpio {
121                         ralink,group = "jtag", "wdt";
122                         ralink,function = "gpio";
123                 };
124         };
125 };