a582172aca42397100ad470d2076d6e24dc1d7b7
[openwrt/openwrt.git] / target / linux / ramips / dts / WR1000.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7628an.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "cudy,wr1000", "mediatek,mt7628an-soc";
11 model = "Cudy WR1000";
12
13 aliases {
14 led-boot = &led_wps;
15 led-failsafe = &led_wps;
16 led-upgrade = &led_wps;
17 };
18
19 keys {
20 compatible = "gpio-keys-polled";
21 poll-interval = <20>;
22
23 reset {
24 label = "reset";
25 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_RESTART>;
27 };
28
29 wps {
30 label = "rfkill";
31 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_WPS_BUTTON>;
33 };
34 };
35
36 leds {
37 compatible = "gpio-leds";
38
39 lan1 {
40 label = "wr1000:blue:lan1";
41 gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
42 };
43
44 lan2 {
45 label = "wr1000:blue:lan2";
46 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
47 };
48
49 wan {
50 label = "wr1000:blue:wan";
51 gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
52 };
53
54 wlan2g {
55 label = "wr1000:blue:wlan2g";
56 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
57 linux,default-trigger = "phy0tpt";
58 };
59
60 led_wps: wps {
61 label = "wr1000:blue:wps";
62 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
63 };
64 };
65 };
66
67 &spi0 {
68 status = "okay";
69
70 flash@0 {
71 compatible = "jedec,spi-nor";
72 reg = <0>;
73 spi-max-frequency = <10000000>;
74
75 partitions {
76 compatible = "fixed-partitions";
77 #address-cells = <1>;
78 #size-cells = <1>;
79
80 partition@0 {
81 label = "u-boot";
82 reg = <0x0 0x30000>;
83 read-only;
84 };
85
86 partition@30000 {
87 label = "u-boot-env";
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 partition@50000 {
99 compatible = "denx,uimage";
100 label = "firmware";
101 reg = <0x50000 0x7b0000>;
102 };
103
104 };
105 };
106 };
107
108 &pinctrl {
109 state_default: pinctrl0 {
110 gpio {
111 ralink,group = "i2s", "refclk", "wdt", "p4led_an",
112 "p3led_an", "p2led_an", "wled_an";
113 ralink,function = "gpio";
114 };
115 };
116 };
117
118 &pcie {
119 status = "okay";
120 };
121
122 &pcie0 {
123 wifi@0,0 {
124 compatible = "mediatek,mt76";
125 reg = <0x0000 0 0 0 0>;
126 mediatek,mtd-eeprom = <&factory 0x8000>;
127 ieee80211-freq-limit = <5000000 6000000>;
128
129 led {
130 led-sources = <2>;
131 led-active-low;
132 };
133 };
134 };
135
136 &wmac {
137 status = "okay";
138 };
139
140 &ethernet {
141 mtd-mac-address = <&factory 0x2e>;
142 mediatek,portmap = "llllw";
143 };