0c61dcb24d7c8e5c8d21f95a6bad50d4aa4b1763
[openwrt/staging/hauke.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 = "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 = "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 &gpio2 {
49 status = "okay";
50 };
51
52 &gpio3 {
53 status = "okay";
54 };
55
56 &spi0 {
57 status = "okay";
58
59 flash@0 {
60 compatible = "jedec,spi-nor";
61 reg = <0>;
62 spi-max-frequency = <10000000>;
63
64 partitions {
65 compatible = "fixed-partitions";
66 #address-cells = <1>;
67 #size-cells = <1>;
68
69 partition@0 {
70 label = "u-boot";
71 reg = <0x0 0x30000>;
72 read-only;
73 };
74
75 partition@30000 {
76 label = "u-boot-env";
77 reg = <0x30000 0x10000>;
78 read-only;
79 };
80
81 factory: partition@40000 {
82 compatible = "nvmem-cells";
83 label = "factory";
84 reg = <0x40000 0x10000>;
85 #address-cells = <1>;
86 #size-cells = <1>;
87 read-only;
88
89 eeprom_factory_8000: eeprom@8000 {
90 reg = <0x8000 0x200>;
91 };
92 };
93
94 partition@50000 {
95 compatible = "denx,uimage";
96 label = "firmware";
97 reg = <0x50000 0x7b0000>;
98 };
99 };
100 };
101 };
102
103 &ehci {
104 status = "okay";
105 };
106
107 &ohci {
108 status = "okay";
109 };
110
111 &ethernet {
112 pinctrl-names = "default";
113 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
114
115 mediatek,portmap = "llllw";
116
117 port@4 {
118 status = "okay";
119 phy-mode = "rgmii";
120 phy-handle = <&phy4>;
121 };
122
123 port@5 {
124 status = "okay";
125 phy-mode = "rgmii";
126 phy-handle = <&phy5>;
127 };
128
129 mdio-bus {
130 status = "okay";
131
132 phy4: ethernet-phy@4 {
133 reg = <4>;
134 phy-mode = "rgmii";
135 };
136
137 phy5: ethernet-phy@5 {
138 reg = <5>;
139 phy-mode = "rgmii";
140 };
141 };
142 };
143
144 &gsw {
145 mediatek,port4-gmac;
146 mediatek,ephy-base = /bits/ 8 <8>;
147 };
148
149 &pcie {
150 status = "okay";
151 };
152
153 &state_default {
154 gpio {
155 groups = "uartf", "nd_sd", "wled";
156 function = "gpio";
157 };
158 };
159
160 &pcie0 {
161 mt76@0,0 {
162 reg = <0x0000 0 0 0 0>;
163 nvmem-cells = <&eeprom_factory_8000>;
164 nvmem-cell-names = "eeprom";
165 ieee80211-freq-limit = <5000000 6000000>;
166 };
167 };