ramips: fix MTD EEPROM offset for TL-WR840N v5
[oweals/openwrt.git] / target / linux / ramips / dts / MPRA2.dts
1 /dts-v1/;
2
3 #include "rt5350.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "hame,mpr-a2", "ralink,rt5350-soc";
10         model = "HAME MPR-A2";
11
12         aliases {
13                 led-boot = &led_system;
14                 led-failsafe = &led_system;
15                 led-running = &led_system;
16                 led-upgrade = &led_system;
17         };
18
19         gpio-leds {
20                 compatible = "gpio-leds";
21
22                 led_system: system {
23                         label = "mpr-a2:blue:system";
24                         gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
25                 };
26
27                 power {
28                         label = "mpr-a2:red:power";
29                         gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
30                 };
31         };
32
33         gpio-keys-polled {
34                 compatible = "gpio-keys-polled";
35                 poll-interval = <20>;
36
37                 wps {
38                         label = "reset";
39                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
40                         linux,code = <KEY_RESTART>;
41                 };
42         };
43
44         gpio_export {
45                 compatible = "gpio-export";
46                 #size-cells = <0>;
47
48                 usb {
49                         gpio-export,name = "usb";
50                         gpio-export,output = <1>;
51                         gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
52                 };
53
54                 root_hub {
55                         gpio-export,name = "root_hub";
56                         gpio-export,output = <1>;
57                         gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
58                 };
59         };
60 };
61
62 &spi0 {
63         status = "okay";
64
65         m25p80@0 {
66                 compatible = "jedec,spi-nor";
67                 reg = <0>;
68                 spi-max-frequency = <10000000>;
69
70                 partitions {
71                         compatible = "fixed-partitions";
72                         #address-cells = <1>;
73                         #size-cells = <1>;
74
75                         partition@0 {
76                                 label = "u-boot";
77                                 reg = <0x0 0x30000>;
78                                 read-only;
79                         };
80
81                         partition@30000 {
82                                 label = "u-boot-env";
83                                 reg = <0x30000 0x10000>;
84                                 read-only;
85                         };
86
87                         factory: partition@40000 {
88                                 label = "factory";
89                                 reg = <0x40000 0x10000>;
90                                 read-only;
91                         };
92
93                         partition@50000 {
94                                 label = "firmware";
95                                 reg = <0x50000 0x7b0000>;
96                         };
97                 };
98         };
99 };
100
101 &pinctrl {
102         state_default: pinctrl0 {
103                 gpio {
104                         ralink,group = "i2c", "jtag", "uartf";
105                         ralink,function = "gpio";
106                 };
107         };
108 };
109
110 &ethernet {
111         mtd-mac-address = <&factory 0x4>;
112 };
113
114 &esw {
115         mediatek,portmap = <0x1>;
116         mediatek,portdisable = <0x3e>;
117 };
118
119 &wmac {
120         ralink,mtd-eeprom = <&factory 0>;
121 };
122
123 &ehci {
124         status = "okay";
125 };
126
127 &ohci {
128         status = "okay";
129 };