ramips: add proper system clock and reset driver support for legacy SoCs
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_zbtlink_zbt-we3526.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "zbtlink,zbt-we3526", "mediatek,mt7621-soc";
8 model = "Zbtlink ZBT-WE3526";
9
10 chosen {
11 bootargs = "console=ttyS0,115200";
12 };
13
14 keys {
15 compatible = "gpio-keys";
16
17 reset {
18 label = "reset";
19 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
20 linux,code = <KEY_RESTART>;
21 };
22 };
23 };
24
25 &i2c {
26 status = "okay";
27 };
28
29 &sdhci {
30 status = "okay";
31 };
32
33 &spi0 {
34 status = "okay";
35
36 flash@0 {
37 compatible = "jedec,spi-nor";
38 reg = <0>;
39 spi-max-frequency = <10000000>;
40
41 partitions {
42 compatible = "fixed-partitions";
43 #address-cells = <1>;
44 #size-cells = <1>;
45
46 partition@0 {
47 label = "u-boot";
48 reg = <0x0 0x30000>;
49 read-only;
50 };
51
52 partition@30000 {
53 label = "u-boot-env";
54 reg = <0x30000 0x10000>;
55 read-only;
56 };
57
58 factory: partition@40000 {
59 label = "factory";
60 reg = <0x40000 0x10000>;
61 read-only;
62 };
63
64 firmware: partition@50000 {
65 compatible = "denx,uimage";
66 label = "firmware";
67 reg = <0x50000 0xfb0000>;
68 };
69 };
70 };
71 };
72
73 &pcie {
74 status = "okay";
75 };
76
77 &pcie0 {
78 wifi@0,0 {
79 compatible = "pci14c3,7662";
80 reg = <0x0000 0 0 0 0>;
81 mediatek,mtd-eeprom = <&factory 0x8000>;
82 ieee80211-freq-limit = <5000000 6000000>;
83
84 led {
85 led-sources = <2>;
86 };
87 };
88 };
89
90 &pcie1 {
91 wifi@0,0 {
92 compatible = "pci14c3,7603";
93 reg = <0x0000 0 0 0 0>;
94 mediatek,mtd-eeprom = <&factory 0x0000>;
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_e006>;
109 nvmem-cell-names = "mac-address";
110 };
111
112 &mdio {
113 ethphy4: ethernet-phy@4 {
114 reg = <4>;
115 };
116 };
117
118 &switch0 {
119 ports {
120 port@0 {
121 status = "okay";
122 label = "lan1";
123 };
124
125 port@1 {
126 status = "okay";
127 label = "lan2";
128 };
129
130 port@2 {
131 status = "okay";
132 label = "lan3";
133 };
134
135 port@3 {
136 status = "okay";
137 label = "lan4";
138 };
139 };
140 };
141
142 &state_default {
143 gpio {
144 groups = "wdt";
145 function = "gpio";
146 };
147 };
148
149 &factory {
150 compatible = "nvmem-cells";
151 #address-cells = <1>;
152 #size-cells = <1>;
153
154 macaddr_factory_e000: macaddr@e000 {
155 reg = <0xe000 0x6>;
156 };
157
158 macaddr_factory_e006: macaddr@e006 {
159 reg = <0xe006 0x6>;
160 };
161 };