cb6310df18d162638a4c6080b04b7d00c404a21c
[openwrt/staging/noltari.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 &switch0 {
104 ports {
105 port@0 {
106 status = "okay";
107 label = "lan1";
108 };
109
110 port@1 {
111 status = "okay";
112 label = "lan2";
113 };
114
115 port@2 {
116 status = "okay";
117 label = "lan3";
118 };
119
120 port@3 {
121 status = "okay";
122 label = "lan4";
123 };
124
125 port@4 {
126 status = "okay";
127 label = "wan";
128 nvmem-cells = <&macaddr_factory_e000>;
129 nvmem-cell-names = "mac-address";
130 mac-address-increment = <1>;
131 };
132 };
133 };
134
135 &state_default {
136 gpio {
137 groups = "wdt";
138 function = "gpio";
139 };
140 };
141
142 &factory {
143 compatible = "nvmem-cells";
144 #address-cells = <1>;
145 #size-cells = <1>;
146
147 macaddr_factory_e000: macaddr@e000 {
148 reg = <0xe000 0x6>;
149 };
150 };