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