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