ramips: fix MTD EEPROM offset for TL-WR840N v5
[oweals/openwrt.git] / target / linux / ramips / dts / ZBT-WG3526.dtsi
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-wg3526", "mediatek,mt7621-soc";
8
9         aliases {
10                 led-boot = &led_status;
11                 led-failsafe = &led_status;
12                 led-running = &led_status;
13                 led-upgrade = &led_status;
14         };
15
16         memory@0 {
17                 device_type = "memory";
18                 reg = <0x0 0x1c000000>, <0x20000000 0x4000000>;
19         };
20
21         chosen {
22                 bootargs = "console=ttyS0,115200";
23         };
24
25         palmbus: palmbus@1E000000 {
26                 i2c@900 {
27                         status = "okay";
28                 };
29         };
30
31         gpio-keys-polled {
32                 compatible = "gpio-keys-polled";
33                 poll-interval = <20>;
34
35                 reset {
36                         label = "reset";
37                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
38                         linux,code = <KEY_RESTART>;
39                 };
40         };
41
42         gpio-leds {
43                 compatible = "gpio-leds";
44
45                 led_status: status {
46                         label = "zbt-wg3526:green:status";
47                         gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
48                 };
49         };
50 };
51
52 &sdhci {
53         status = "okay";
54 };
55
56 &spi0 {
57         status = "okay";
58
59         m25p80@0 {
60                 compatible = "jedec,spi-nor";
61                 reg = <0>;
62                 spi-max-frequency = <10000000>;
63                 m25p,chunked-io = <32>;
64
65                 partitions {
66                         compatible = "fixed-partitions";
67                         #address-cells = <1>;
68                         #size-cells = <1>;
69
70                         partition@0 {
71                                 label = "u-boot";
72                                 reg = <0x0 0x30000>;
73                                 read-only;
74                         };
75
76                         partition@30000 {
77                                 label = "u-boot-env";
78                                 reg = <0x30000 0x10000>;
79                                 read-only;
80                         };
81
82                         factory: partition@40000 {
83                                 label = "factory";
84                                 reg = <0x40000 0x10000>;
85                                 read-only;
86                         };
87
88                         firmware: partition@50000 {
89                                 label = "firmware";
90                         };
91                 };
92         };
93 };
94
95 &pcie {
96         status = "okay";
97 };
98
99 &pcie0 {
100         wifi@0,0 {
101                 compatible = "pci14c3,7603";
102                 reg = <0x0000 0 0 0 0>;
103                 mediatek,mtd-eeprom = <&factory 0x0000>;
104         };
105 };
106
107 &pcie1 {
108         wifi@0,0 {
109                 compatible = "pci14c3,7662";
110                 reg = <0x0000 0 0 0 0>;
111                 mediatek,mtd-eeprom = <&factory 0x8000>;
112                 ieee80211-freq-limit = <5000000 6000000>;
113         };
114 };
115
116 &ethernet {
117         mtd-mac-address = <&factory 0xe000>;
118 };
119
120 &pinctrl {
121         state_default: pinctrl0 {
122                 gpio {
123                         ralink,group = "wdt", "rgmii2", "jtag", "mdio";
124                         ralink,function = "gpio";
125                 };
126         };
127 };