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