93ab067ef66920fe54851fd5fc2f04893e999f8e
[openwrt/staging/mkresin.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 compatible = "denx,uimage";
100 label = "firmware";
101 reg = <0x50000 0x7b0000>;
102 };
103 };
104 };
105 };
106
107 &ehci {
108 status = "okay";
109 };
110
111 &ohci {
112 status = "okay";
113 };
114
115 &ethernet {
116 status = "okay";
117 pinctrl-names = "default";
118 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
119 mediatek,portmap = "llllw";
120
121 port@4 {
122 status = "okay";
123 phy-mode = "rgmii";
124 phy-handle = <&phy4>;
125 };
126
127 port@5 {
128 status = "okay";
129 phy-mode = "rgmii";
130 phy-handle = <&phy5>;
131 };
132
133 mdio-bus {
134 status = "okay";
135
136 phy4: ethernet-phy@4 {
137 reg = <4>;
138 phy-mode = "rgmii";
139 };
140
141 phy5: ethernet-phy@5 {
142 reg = <5>;
143 phy-mode = "rgmii";
144 };
145 };
146 };
147
148 &gsw {
149 mediatek,port4 = "gmac";
150 };
151
152 &pcie {
153 status = "okay";
154 };
155
156 &pinctrl {
157 state_default: pinctrl0 {
158 gpio {
159 ralink,group = "uartf", "nd_sd", "wled";
160 ralink,function = "gpio";
161 };
162 };
163 };