ramips: mt7620: tidy up ethernet node in DTS files
[openwrt/openwrt.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 chosen {
13 bootargs = "console=ttyS0,57600";
14 };
15
16 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 keys {
33 compatible = "gpio-keys";
34
35 reset {
36 label = "reset";
37 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_RESTART>;
39 };
40 };
41
42 gpio_export {
43 compatible = "gpio-export";
44 #size-cells = <0>;
45
46 usbpower {
47 gpio-export,name = "usbpower";
48 gpio-export,output = <1>;
49 gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
50 };
51 };
52 };
53
54 &gpio0 {
55 status = "okay";
56 };
57
58 &gpio2 {
59 status = "okay";
60 };
61
62 &gpio3 {
63 status = "okay";
64 };
65
66 &spi0 {
67 status = "okay";
68
69 flash@0 {
70 compatible = "jedec,spi-nor";
71 reg = <0>;
72 spi-max-frequency = <10000000>;
73
74 partitions {
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 partition@0 {
80 label = "u-boot";
81 reg = <0x0 0x30000>;
82 read-only;
83 };
84
85 partition@30000 {
86 label = "u-boot-env";
87 reg = <0x30000 0x10000>;
88 read-only;
89 };
90
91 factory: partition@40000 {
92 label = "factory";
93 reg = <0x40000 0x10000>;
94 read-only;
95 };
96
97 partition@50000 {
98 compatible = "denx,uimage";
99 label = "firmware";
100 reg = <0x50000 0x7b0000>;
101 };
102 };
103 };
104 };
105
106 &ehci {
107 status = "okay";
108 };
109
110 &ohci {
111 status = "okay";
112 };
113
114 &ethernet {
115 pinctrl-names = "default";
116 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
117
118 mediatek,portmap = "llllw";
119
120 port@4 {
121 status = "okay";
122 phy-mode = "rgmii";
123 phy-handle = <&phy4>;
124 };
125
126 port@5 {
127 status = "okay";
128 phy-mode = "rgmii";
129 phy-handle = <&phy5>;
130 };
131
132 mdio-bus {
133 status = "okay";
134
135 phy4: ethernet-phy@4 {
136 reg = <4>;
137 phy-mode = "rgmii";
138 };
139
140 phy5: ethernet-phy@5 {
141 reg = <5>;
142 phy-mode = "rgmii";
143 };
144 };
145 };
146
147 &gsw {
148 mediatek,port4 = "gmac";
149 };
150
151 &pcie {
152 status = "okay";
153 };
154
155 &state_default {
156 gpio {
157 groups = "uartf", "nd_sd", "wled";
158 function = "gpio";
159 };
160 };
161
162 &pcie0 {
163 mt76@0,0 {
164 reg = <0x0000 0 0 0 0>;
165 mediatek,mtd-eeprom = <&factory 0x8000>;
166 ieee80211-freq-limit = <5000000 6000000>;
167 };
168 };