ramips: fix MTD EEPROM offset for TL-WR840N v5
[oweals/openwrt.git] / target / linux / ramips / dts / ZBT-WE1226.dts
1 /dts-v1/;
2 #include <dt-bindings/input/input.h>
3 #include <dt-bindings/gpio/gpio.h>
4
5 #include "mt7628an.dtsi"
6
7 / {
8         compatible = "zbtlink,zbt-we1226", "mediatek,mt7628an-soc";
9         model = "Zbtlink ZBT-WE1226";
10
11         aliases {
12                 led-boot = &led_wlan;
13                 led-failsafe = &led_wlan;
14                 led-running = &led_wlan;
15                 led-upgrade = &led_wlan;
16         };
17
18         chosen {
19                 bootargs = "console=ttyS0,115200";
20         };
21
22         memory@0 {
23                 device_type = "memory";
24                 reg = <0x0 0x4000000>;
25         };
26
27         gpio-keys-polled {
28                 compatible = "gpio-keys-polled";
29                 poll-interval = <20>;
30
31                 reset {
32                         label = "reset";
33                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
34                         linux,code = <KEY_RESTART>;
35                 };
36         };
37
38         gpio-leds {
39                 compatible = "gpio-leds";
40
41                 wan {
42                         label = "zbt-we1226:green:wan";
43                         gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
44                 };
45
46                 lan1 {
47                         label = "zbt-we1226:green:lan1";
48                         gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
49                 };
50
51                 lan2 {
52                         label = "zbt-we1226:green:lan2";
53                         gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
54                 };
55
56                 led_wlan: wlan {
57                         label = "zbt-we1226:green:wlan";
58                         gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
59                 };
60         };
61 };
62
63 &pinctrl {
64         state_default: pinctrl0 {
65                 gpio {
66                         ralink,group = "p0led_an", "p1led_an", "p4led_an", "wdt", "wled_an";
67                         ralink,function = "gpio";
68                 };
69         };
70 };
71
72 &spi0 {
73         status = "okay";
74
75         m25p80@0 {
76                 compatible = "jedec,spi-nor";
77                 reg = <0>;
78                 spi-max-frequency = <10000000>;
79                 m25p,chunked-io = <32>;
80
81                 partitions {
82                         compatible = "fixed-partitions";
83                         #address-cells = <1>;
84                         #size-cells = <1>;
85
86                         partition@0 {
87                                 label = "u-boot";
88                                 reg = <0x0 0x30000>;
89                                 read-only;
90                         };
91
92                         partition@30000 {
93                                 label = "u-boot-env";
94                                 reg = <0x30000 0x10000>;
95                                 read-only;
96                         };
97
98                         factory: partition@40000 {
99                                 label = "factory";
100                                 reg = <0x40000 0x10000>;
101                                 read-only;
102                         };
103
104                         partition@50000 {
105                                 label = "firmware";
106                                 reg = <0x50000 0x7b0000>;
107                         };
108                 };
109         };
110 };
111
112 &wmac {
113         status = "okay";
114         ralink,mtd-eeprom = <&factory 0x4>;
115 };
116
117 &ethernet {
118         mtd-mac-address = <&factory 0x2e>;
119         mediatek,portmap = "llllw";
120 };