ramips: add support for SNR-CPE-ME2-SFP
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_mqmaker_witi.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "mqmaker,witi", "mediatek,mt7621-soc";
8 model = "MQmaker WiTi";
9
10 keys {
11 compatible = "gpio-keys";
12
13 reset {
14 label = "reset";
15 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
16 linux,code = <KEY_RESTART>;
17 };
18 };
19 };
20
21 &i2c {
22 status = "okay";
23
24 rtc@51 {
25 status = "okay";
26 compatible = "nxp,pcf8563";
27 reg = <0x51>;
28 };
29 };
30
31 &sdhci {
32 status = "okay";
33 };
34
35 &spi0 {
36 status = "okay";
37
38 flash@0 {
39 compatible = "jedec,spi-nor";
40 reg = <0>;
41 spi-max-frequency = <10000000>;
42
43 partitions {
44 compatible = "fixed-partitions";
45 #address-cells = <1>;
46 #size-cells = <1>;
47
48 partition@0 {
49 label = "u-boot";
50 reg = <0x0 0x30000>;
51 read-only;
52 };
53
54 partition@30000 {
55 label = "u-boot-env";
56 reg = <0x30000 0x10000>;
57 read-only;
58 };
59
60 factory: partition@40000 {
61 label = "factory";
62 reg = <0x40000 0x10000>;
63 };
64
65 partition@50000 {
66 compatible = "denx,uimage";
67 label = "firmware";
68 reg = <0x50000 0xfb0000>;
69 };
70 };
71 };
72 };
73
74 &pcie {
75 status = "okay";
76 };
77
78 &pcie0 {
79 mt76@0,0 {
80 reg = <0x0000 0 0 0 0>;
81 mediatek,mtd-eeprom = <&factory 0x8000>;
82 ieee80211-freq-limit = <5000000 6000000>;
83 nvmem-cells = <&macaddr_factory_e000>;
84 nvmem-cell-names = "mac-address";
85 };
86 };
87
88 &pcie1 {
89 mt76@0,0 {
90 reg = <0x0000 0 0 0 0>;
91 mediatek,mtd-eeprom = <&factory 0x0000>;
92 ieee80211-freq-limit = <2400000 2500000>;
93 nvmem-cells = <&macaddr_factory_e000>;
94 nvmem-cell-names = "mac-address";
95 };
96 };
97
98 &gmac0 {
99 nvmem-cells = <&macaddr_factory_e000>;
100 nvmem-cell-names = "mac-address";
101 };
102
103 &gmac1 {
104 status = "okay";
105 label = "wan";
106 phy-handle = <&ethphy4>;
107
108 nvmem-cells = <&macaddr_factory_e000>;
109 nvmem-cell-names = "mac-address";
110 mac-address-increment = <1>;
111 };
112
113 &mdio {
114 ethphy4: ethernet-phy@4 {
115 reg = <4>;
116 };
117 };
118
119 &switch0 {
120 ports {
121 port@0 {
122 status = "okay";
123 label = "lan1";
124 };
125
126 port@1 {
127 status = "okay";
128 label = "lan2";
129 };
130
131 port@2 {
132 status = "okay";
133 label = "lan3";
134 };
135
136 port@3 {
137 status = "okay";
138 label = "lan4";
139 };
140 };
141 };
142
143 &state_default {
144 gpio {
145 groups = "wdt";
146 function = "gpio";
147 };
148 };
149
150 &factory {
151 compatible = "nvmem-cells";
152 #address-cells = <1>;
153 #size-cells = <1>;
154
155 macaddr_factory_e000: macaddr@e000 {
156 reg = <0xe000 0x6>;
157 };
158 };