ramips: add support for SNR-CPE-ME2-SFP
[openwrt/openwrt.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 label = "factory";
83 reg = <0x40000 0x10000>;
84 read-only;
85 };
86
87 partition@50000 {
88 compatible = "denx,uimage";
89 label = "firmware";
90 reg = <0x50000 0x7b0000>;
91 };
92 };
93 };
94 };
95
96 &ehci {
97 status = "okay";
98 };
99
100 &ohci {
101 status = "okay";
102 };
103
104 &ethernet {
105 pinctrl-names = "default";
106 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
107
108 mediatek,portmap = "llllw";
109
110 port@4 {
111 status = "okay";
112 phy-mode = "rgmii";
113 phy-handle = <&phy4>;
114 };
115
116 port@5 {
117 status = "okay";
118 phy-mode = "rgmii";
119 phy-handle = <&phy5>;
120 };
121
122 mdio-bus {
123 status = "okay";
124
125 phy4: ethernet-phy@4 {
126 reg = <4>;
127 phy-mode = "rgmii";
128 };
129
130 phy5: ethernet-phy@5 {
131 reg = <5>;
132 phy-mode = "rgmii";
133 };
134 };
135 };
136
137 &gsw {
138 mediatek,port4-gmac;
139 mediatek,ephy-base = /bits/ 8 <8>;
140 };
141
142 &pcie {
143 status = "okay";
144 };
145
146 &state_default {
147 gpio {
148 groups = "uartf", "nd_sd", "wled";
149 function = "gpio";
150 };
151 };
152
153 &pcie0 {
154 mt76@0,0 {
155 reg = <0x0000 0 0 0 0>;
156 mediatek,mtd-eeprom = <&factory 0x8000>;
157 ieee80211-freq-limit = <5000000 6000000>;
158 };
159 };