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