ramips: fix MTD EEPROM offset for TL-WR840N v5
[oweals/openwrt.git] / target / linux / ramips / dts / TINY-AC.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "dovado,tiny-ac", "ralink,mt7620a-soc";
10         model = "Dovado Tiny AC";
11
12         chosen {
13                 bootargs = "console=ttyS0,57600";
14         };
15
16         gpio-leds {
17                 compatible = "gpio-leds";
18
19                 usb {
20                         label = "tiny-ac:green:usb";
21                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
22                         trigger-sources = <&ohci_port1>, <&ehci_port1>;
23                         linux,default-trigger = "usbport";
24                 };
25
26                 wifi {
27                         label = "tiny-ac:orange:wifi";
28                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
29                 };
30         };
31
32         gpio-keys-polled {
33                 compatible = "gpio-keys-polled";
34                 poll-interval = <20>;
35
36                 reset {
37                         label = "reset";
38                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
39                         linux,code = <KEY_RESTART>;
40                 };
41         };
42
43         gpio_export {
44                 compatible = "gpio-export";
45                 #size-cells = <0>;
46
47                 usbpower {
48                         gpio-export,name = "usbpower";
49                         gpio-export,output = <1>;
50                         gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
51                 };
52         };
53 };
54
55 &gpio0 {
56         status = "okay";
57 };
58
59 &gpio2 {
60         status = "okay";
61 };
62
63 &gpio3 {
64         status = "okay";
65 };
66
67 &spi0 {
68         status = "okay";
69
70         m25p80@0 {
71                 compatible = "jedec,spi-nor";
72                 reg = <0>;
73                 spi-max-frequency = <10000000>;
74
75                 partitions {
76                         compatible = "fixed-partitions";
77                         #address-cells = <1>;
78                         #size-cells = <1>;
79
80                         partition@0 {
81                                 label = "u-boot";
82                                 reg = <0x0 0x30000>;
83                                 read-only;
84                         };
85
86                         partition@30000 {
87                                 label = "u-boot-env";
88                                 reg = <0x30000 0x10000>;
89                                 read-only;
90                         };
91
92                         factory: partition@40000 {
93                                 label = "factory";
94                                 reg = <0x40000 0x10000>;
95                                 read-only;
96                         };
97
98                         partition@50000 {
99                                 label = "firmware";
100                                 reg = <0x50000 0x7b0000>;
101                         };
102                 };
103         };
104 };
105
106 &ehci {
107         status = "okay";
108 };
109
110 &ohci {
111         status = "okay";
112 };
113
114 &ethernet {
115         status = "okay";
116         pinctrl-names = "default";
117         pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
118         mediatek,portmap = "llllw";
119
120         port@4 {
121                 status = "okay";
122                 phy-mode = "rgmii";
123                 phy-handle = <&phy4>;
124         };
125
126         port@5 {
127                 status = "okay";
128                 phy-mode = "rgmii";
129                 phy-handle = <&phy5>;
130         };
131
132         mdio-bus {
133                 status = "okay";
134
135                 phy4: ethernet-phy@4 {
136                         reg = <4>;
137                         phy-mode = "rgmii";
138                 };
139
140                 phy5: ethernet-phy@5 {
141                         reg = <5>;
142                         phy-mode = "rgmii";
143                 };
144         };
145 };
146
147 &gsw {
148         mediatek,port4 = "gmac";
149 };
150
151 &pcie {
152         status = "okay";
153 };
154
155 &pinctrl {
156         state_default: pinctrl0 {
157                 gpio {
158                         ralink,group = "uartf", "nd_sd", "wled";
159                         ralink,function = "gpio";
160                 };
161         };
162 };