6c603bd12f9a72d0778e8df9b6f2da44fef28c5c
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / mt7620a_dovado_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 leds {
13 compatible = "gpio-leds";
14
15 usb {
16 label = "tiny-ac:green:usb";
17 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
18 trigger-sources = <&ohci_port1>, <&ehci_port1>;
19 linux,default-trigger = "usbport";
20 };
21
22 wifi {
23 label = "tiny-ac:orange:wifi";
24 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
25 };
26 };
27
28 keys {
29 compatible = "gpio-keys";
30
31 reset {
32 label = "reset";
33 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_RESTART>;
35 };
36 };
37
38 gpio_export {
39 compatible = "gpio-export";
40 #size-cells = <0>;
41
42 usbpower {
43 gpio-export,name = "usbpower";
44 gpio-export,output = <1>;
45 gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
46 };
47 };
48 };
49
50 &gpio0 {
51 status = "okay";
52 };
53
54 &gpio2 {
55 status = "okay";
56 };
57
58 &gpio3 {
59 status = "okay";
60 };
61
62 &spi0 {
63 status = "okay";
64
65 flash@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 compatible = "denx,uimage";
95 label = "firmware";
96 reg = <0x50000 0x7b0000>;
97 };
98 };
99 };
100 };
101
102 &ehci {
103 status = "okay";
104 };
105
106 &ohci {
107 status = "okay";
108 };
109
110 &ethernet {
111 pinctrl-names = "default";
112 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
113
114 mediatek,portmap = "llllw";
115
116 port@4 {
117 status = "okay";
118 phy-mode = "rgmii";
119 phy-handle = <&phy4>;
120 };
121
122 port@5 {
123 status = "okay";
124 phy-mode = "rgmii";
125 phy-handle = <&phy5>;
126 };
127
128 mdio-bus {
129 status = "okay";
130
131 phy4: ethernet-phy@4 {
132 reg = <4>;
133 phy-mode = "rgmii";
134 };
135
136 phy5: ethernet-phy@5 {
137 reg = <5>;
138 phy-mode = "rgmii";
139 };
140 };
141 };
142
143 &gsw {
144 mediatek,port4 = "gmac";
145 };
146
147 &pcie {
148 status = "okay";
149 };
150
151 &state_default {
152 gpio {
153 groups = "uartf", "nd_sd", "wled";
154 function = "gpio";
155 };
156 };
157
158 &pcie0 {
159 mt76@0,0 {
160 reg = <0x0000 0 0 0 0>;
161 mediatek,mtd-eeprom = <&factory 0x8000>;
162 ieee80211-freq-limit = <5000000 6000000>;
163 };
164 };