ramips: mt7620: tidy up ethernet node in DTS files
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_zyxel_keenetic-viva.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 = "zyxel,keenetic-viva", "ralink,mt7620a-soc";
10 model = "ZyXEL Keenetic Viva";
11
12 aliases {
13 led-boot = &led_power_green;
14 led-failsafe = &led_power_green;
15 led-running = &led_power_green;
16 led-upgrade = &led_power_green;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 wan {
23 label = "keenetic-viva:green:wan";
24 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
25 };
26
27 usb {
28 label = "keenetic-viva:green:usb";
29 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
30 trigger-sources = <&ohci_port1>, <&ehci_port1>;
31 linux,default-trigger = "usbport";
32 };
33
34 power_alert {
35 label = "keenetic-viva:red:power";
36 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
37 };
38
39 wifi {
40 label = "keenetic-viva:green:wifi";
41 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
42 };
43
44 led_power_green: power {
45 label = "keenetic-viva:green:power";
46 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
47 };
48 };
49
50 keys {
51 compatible = "gpio-keys";
52
53 reset {
54 label = "reset";
55 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
56 linux,code = <KEY_RESTART>;
57 };
58
59 wps {
60 label = "wps";
61 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
62 linux,code = <KEY_WPS_BUTTON>;
63 };
64
65 fn {
66 label = "fn";
67 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
68 linux,code = <BTN_0>;
69 };
70 };
71
72 gpio_export {
73 compatible = "gpio-export";
74 #size-cells = <0>;
75
76 usb_power {
77 gpio-export,name = "usb";
78 gpio-export,output = <1>;
79 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
80 };
81 };
82
83 rtl8367rb {
84 compatible = "realtek,rtl8367b";
85 cpu_port = <7>;
86 realtek,extif2 = <1 0 1 1 1 1 1 1 2>;
87 mii-bus = <&mdio0>;
88 };
89 };
90
91 &spi0 {
92 status = "okay";
93
94 flash@0 {
95 compatible = "jedec,spi-nor";
96 reg = <0>;
97 spi-max-frequency = <10000000>;
98
99 partitions {
100 compatible = "fixed-partitions";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 partition@0 {
105 label = "u-boot";
106 reg = <0x0 0x30000>;
107 read-only;
108 };
109
110 partition@30000 {
111 label = "u-boot-env";
112 reg = <0x30000 0x10000>;
113 read-only;
114 };
115
116 factory: partition@40000 {
117 label = "factory";
118 reg = <0x40000 0x10000>;
119 read-only;
120 };
121
122 partition@50000 {
123 compatible = "denx,uimage";
124 label = "firmware";
125 reg = <0x50000 0xfb0000>;
126 };
127 };
128 };
129 };
130
131 &state_default {
132 gpio {
133 groups = "i2c", "uartf";
134 function = "gpio";
135 };
136 };
137
138 &ethernet {
139 pinctrl-names = "default";
140 pinctrl-0 = <&rgmii2_pins &mdio_pins>;
141
142 mtd-mac-address = <&factory 0x00004>;
143
144 port@4 {
145 status = "okay";
146 mediatek,fixed-link = <1000 1 1 1>;
147 phy-mode = "rgmii";
148 phy-handle = <&phy4>;
149 };
150
151 mdio0: mdio-bus {
152 status = "okay";
153
154 phy4: ethernet-phy@4 {
155 reg = <4>;
156 phy-mode = "rgmii";
157 };
158 };
159 };
160
161 &gsw {
162 mediatek,port4 = "gmac";
163 };
164
165 &wmac {
166 ralink,mtd-eeprom = <&factory 0x0>;
167 };
168
169 &ehci {
170 status = "okay";
171 };
172
173 &ohci {
174 status = "okay";
175 };