613edf6cf4b6f903dec2b997da84fb34452ae43e
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / mt7628an_cudy_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 label-mac-device = &wmac;
18 };
19
20 keys {
21 compatible = "gpio-keys-polled";
22 poll-interval = <20>;
23
24 reset {
25 label = "reset";
26 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
27 linux,code = <KEY_RESTART>;
28 };
29
30 wps {
31 label = "rfkill";
32 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
33 linux,code = <KEY_WPS_BUTTON>;
34 };
35 };
36
37 leds {
38 compatible = "gpio-leds";
39
40 lan1 {
41 label = "wr1000:blue:lan1";
42 gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
43 };
44
45 lan2 {
46 label = "wr1000:blue:lan2";
47 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
48 };
49
50 wan {
51 label = "wr1000:blue:wan";
52 gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
53 };
54
55 wlan2g {
56 label = "wr1000:blue:wlan2g";
57 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
58 linux,default-trigger = "phy0tpt";
59 };
60
61 led_wps: wps {
62 label = "wr1000:blue:wps";
63 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
64 };
65 };
66 };
67
68 &spi0 {
69 status = "okay";
70
71 flash@0 {
72 compatible = "jedec,spi-nor";
73 reg = <0>;
74 spi-max-frequency = <10000000>;
75
76 partitions {
77 compatible = "fixed-partitions";
78 #address-cells = <1>;
79 #size-cells = <1>;
80
81 partition@0 {
82 label = "u-boot";
83 reg = <0x0 0x30000>;
84 read-only;
85 };
86
87 partition@30000 {
88 label = "u-boot-env";
89 reg = <0x30000 0x10000>;
90 read-only;
91 };
92
93 factory: partition@40000 {
94 label = "factory";
95 reg = <0x40000 0x10000>;
96 read-only;
97 };
98
99 partition@50000 {
100 compatible = "denx,uimage";
101 label = "firmware";
102 reg = <0x50000 0x7b0000>;
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 ralink,mtd-eeprom = <&factory 0x4>;
139 };
140
141 &ethernet {
142 mtd-mac-address = <&factory 0x28>;
143 mediatek,portmap = "llllw";
144 };