ramips: mt7621: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7621_wavlink_wl-wn573hx1.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 = "wavlink,wl-wn573hx1", "mediatek,mt7621-soc";
10 model = "WAVLINK WL-WN573HX1";
11
12 aliases {
13 led-boot = &led_status_blue;
14 led-failsafe = &led_status_blue;
15 led-running = &led_status_blue;
16 led-upgrade = &led_status_blue;
17 label-mac-device = &gmac0;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32 };
33
34 leds {
35 compatible = "gpio-leds";
36
37 led_status_blue:status_led {
38 label = "blue:status_led";
39 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
40 };
41
42 };
43 };
44
45 &gmac0 {
46 nvmem-cells = <&macaddr_factory_3fff4>;
47 nvmem-cell-names = "mac-address";
48 };
49
50 &mdio {
51 ethphy4: ethernet-phy@4 {
52 reg = <4>;
53 };
54 };
55
56 &pcie {
57 status = "okay";
58 };
59
60 &pcie1 {
61 wifi@0,0 {
62 compatible = "mediatek,mt76";
63 reg = <0x0000 0 0 0 0>;
64 mediatek,mtd-eeprom = <&factory 0x0>;
65 };
66 };
67
68 &spi0 {
69 status = "okay";
70 flash@0 {
71 compatible = "jedec,spi-nor";
72 reg = <0>;
73 spi-max-frequency = <14000000>;
74 partitions {
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 partition@0 {
80 label = "u-boot";
81 reg = <0x00000 0x30000>;
82 };
83
84 partition@30000 {
85 label = "config";
86 reg = <0x30000 0x10000>;
87 };
88
89 factory: partition@50000 {
90 label = "factory";
91 reg = <0x50000 0x40000>;
92
93 nvmem-layout {
94 compatible = "fixed-layout";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 macaddr_factory_3fff4: macaddr@3fff4 {
99 reg = <0x3fff4 0x6>;
100 };
101 };
102 };
103
104 partition@90000 {
105 compatible = "denx,uimage";
106 label = "firmware";
107 reg = <0x90000 0xf70000>;
108 };
109 };
110 };
111 };
112
113 &gmac0 {
114 nvmem-cells = <&macaddr_factory_3fff4>;
115 nvmem-cell-names = "mac-address";
116 };
117
118 &mdio {
119 ethphy4: ethernet-phy@4 {
120 reg = <4>;
121 };
122 };
123
124 &switch0 {
125 ports {
126 port@3 {
127 status = "okay";
128 label = "lan";
129 };
130 };
131 };