ramips: convert mt76 PCIe NIC EEPROM to NVMEM format for legacy SoCs
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7628an_wavlink_wl-wn570ha1.dts
1 #include "mt7628an.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/gpio/gpio.h>
5
6 / {
7 compatible = "wavlink,wl-wn570ha1", "mediatek,mt7628an-soc";
8 model = "Wavlink WL-WN570HA1";
9
10 keys {
11 compatible = "gpio-keys";
12
13 reset {
14 label = "reset";
15 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
16 linux,code = <KEY_RESTART>;
17 };
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 power {
24 label = "green:power";
25 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
26 default-state = "keep";
27 };
28
29 wan {
30 label = "green:wan";
31 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
32 };
33
34 wifi-high {
35 label = "green:wifi-high";
36 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
37 };
38
39 wifi-med {
40 label = "green:wifi-med";
41 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
42 };
43
44 wifi-low {
45 label = "green:wifi-low";
46 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
47 };
48
49 wifi {
50 label = "green:wifi";
51 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
52 };
53 };
54 };
55
56 &state_default {
57 gpio {
58 groups = "i2c", "wled_an", "p0led_an", "wdt", "refclk";
59 function = "gpio";
60 };
61 };
62
63 &pcie {
64 status = "okay";
65 };
66
67 &pcie0 {
68 wifi@0,0 {
69 reg = <0x0000 0 0 0 0>;
70 nvmem-cells = <&eeprom_factory_8000>;
71 nvmem-cell-names = "eeprom";
72 ieee80211-freq-limit = <5000000 6000000>;
73 };
74 };
75
76 &spi0 {
77 status = "okay";
78
79 flash@0 {
80 compatible = "jedec,spi-nor";
81 reg = <0>;
82 spi-max-frequency = <10000000>;
83
84 partitions {
85 compatible = "fixed-partitions";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 partition@0 {
90 label = "u-boot";
91 reg = <0x0 0x30000>;
92 read-only;
93 };
94
95 partition@30000 {
96 label = "u-boot-env";
97 reg = <0x30000 0x10000>;
98 read-only;
99 };
100
101 factory: partition@40000 {
102 compatible = "nvmem-cells";
103 label = "factory";
104 reg = <0x40000 0x10000>;
105 #address-cells = <1>;
106 #size-cells = <1>;
107 read-only;
108
109 eeprom_factory_0: eeprom@0 {
110 reg = <0x0 0x400>;
111 };
112
113 eeprom_factory_8000: eeprom@8000 {
114 reg = <0x8000 0x200>;
115 };
116
117 macaddr_factory_2e: macaddr@2e {
118 reg = <0x2e 0x6>;
119 };
120 };
121
122 partition@50000 {
123 compatible = "denx,uimage";
124 label = "firmware";
125 reg = <0x50000 0x7b0000>;
126 };
127 };
128 };
129 };
130
131 &wmac {
132 status = "okay";
133
134 nvmem-cells = <&eeprom_factory_0>;
135 nvmem-cell-names = "eeprom";
136 };
137
138 &ethernet {
139 nvmem-cells = <&macaddr_factory_2e>;
140 nvmem-cell-names = "mac-address";
141 };
142
143 &esw {
144 mediatek,portmap = <0x2f>;
145 };