ramips: MSG1500 X.00: switch to mac-address-ascii dts
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / mt7621_raisecom_msg1500-x-00.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "raisecom,msg1500-x-00", "mediatek,mt7621-soc";
10 model = "RAISECOM MSG1500 X.00";
11
12 aliases {
13 led-boot = &led_usb;
14 led-failsafe = &led_usb;
15 led-upgrade = &led_usb;
16 label-mac-device = &gmac0;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 wlan2g {
23 label = "blue:wlan2g";
24 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
25 linux,default-trigger = "phy0radio";
26 };
27
28 wlan5g {
29 label = "blue:wlan5g";
30 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
31 linux,default-trigger = "phy1radio";
32 };
33
34 led_usb: usb {
35 label = "blue:usb";
36 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
37 trigger-sources = <&ehci_port2>;
38 linux,default-trigger = "usbport";
39 };
40 };
41
42 keys {
43 compatible = "gpio-keys";
44
45 reset {
46 label = "reset";
47 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_RESTART>;
49 };
50
51 wps {
52 label = "wps";
53 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_WPS_BUTTON>;
55 };
56
57 wifi {
58 label = "wifi";
59 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
60 linux,code = <KEY_RFKILL>;
61 };
62 };
63 };
64
65 &nand {
66 status = "okay";
67
68 partitions {
69 compatible = "fixed-partitions";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 partition@0 {
74 label = "Bootloader";
75 reg = <0x0 0x80000>;
76 read-only;
77 };
78
79 partition@80000 {
80 label = "Config";
81 reg = <0x80000 0x80000>;
82 read-only;
83
84 compatible = "nvmem-cells";
85 #address-cells = <1>;
86 #size-cells = <1>;
87
88 macaddr_config_8014: macaddr@8014 {
89 reg = <0x8014 0x11>;
90 };
91
92 macaddr_config_8036: macaddr@8036 {
93 reg = <0x8036 0x11>;
94 };
95 };
96
97 factory: partition@100000 {
98 label = "Factory";
99 reg = <0x100000 0x40000>;
100 read-only;
101
102 compatible = "nvmem-cells";
103 #address-cells = <1>;
104 #size-cells = <1>;
105
106 macaddr_factory_4: macaddr@4 {
107 reg = <0x4 0x6>;
108 };
109 };
110
111 partition@140000 {
112 label = "kernel";
113 reg = <0x140000 0x400000>;
114 };
115
116 partition@540000 {
117 label = "ubi";
118 reg = <0x540000 0x7a40000>;
119 };
120 };
121 };
122
123 &pcie {
124 status = "okay";
125 };
126
127 &pcie0 {
128 wifi@0,0 {
129 compatible = "mediatek,mt76";
130 reg = <0x0000 0 0 0 0>;
131 mediatek,mtd-eeprom = <&factory 0x0>;
132 /* 5 GHz (phy1) does not take the address from calibration data,
133 but setting it manually here works */
134 nvmem-cells = <&macaddr_factory_4>;
135 nvmem-cell-names = "mac-address";
136 };
137 };
138
139 &gmac0 {
140 nvmem-cells = <&macaddr_config_8014>;
141 nvmem-cell-names = "mac-address-ascii";
142 };
143
144 &gmac1 {
145 status = "okay";
146 label = "wan";
147 phy-handle = <&ethphy4>;
148
149 nvmem-cells = <&macaddr_config_8036>;
150 nvmem-cell-names = "mac-address-ascii";
151 };
152
153 &mdio {
154 ethphy4: ethernet-phy@4 {
155 reg = <4>;
156 };
157 };
158
159 &switch0 {
160 ports {
161 port@0 {
162 status = "okay";
163 label = "lan4";
164 };
165
166 port@1 {
167 status = "okay";
168 label = "lan3";
169 };
170
171 port@2 {
172 status = "okay";
173 label = "lan2";
174 };
175
176 port@3 {
177 status = "okay";
178 label = "lan1";
179 };
180 };
181 };
182
183 &state_default {
184 gpio {
185 groups = "i2c", "jtag", "uart3", "wdt";
186 function = "gpio";
187 };
188 };