a14f3cbef37f4b036f80f66585a286759c6fc1a7
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7628an_wavlink_wl-wn570ha1.dts
1 /dts-v1/;
2 #include <dt-bindings/input/input.h>
3 #include <dt-bindings/gpio/gpio.h>
4
5 #include "mt7628an.dtsi"
6
7 / {
8 compatible = "wavlink,wl-wn570ha1", "mediatek,mt7628an-soc";
9 model = "Wavlink WL-WN570HA1";
10
11 keys {
12 compatible = "gpio-keys";
13
14 reset {
15 label = "reset";
16 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
17 linux,code = <KEY_RESTART>;
18 };
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 power {
25 label = "wl-wn570ha1:green:power";
26 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
27 default-state = "keep";
28 };
29
30 wan {
31 label = "wl-wn570ha1:green:wan";
32 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
33 };
34
35 wifi-high {
36 label = "wl-wn570ha1:green:wifi-high";
37 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
38 };
39
40 wifi-med {
41 label = "wl-wn570ha1:green:wifi-med";
42 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
43 };
44
45 wifi-low {
46 label = "wl-wn570ha1:green:wifi-low";
47 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
48 };
49
50 wifi {
51 label = "wl-wn570ha1:green:wifi";
52 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
53 };
54 };
55 };
56
57 &state_default {
58 gpio {
59 groups = "i2c", "wled_an", "p0led_an", "wdt", "refclk";
60 function = "gpio";
61 };
62 };
63
64 &pcie {
65 status = "okay";
66 };
67
68 &pcie0 {
69 wifi@0,0 {
70 reg = <0x0000 0 0 0 0>;
71 mediatek,mtd-eeprom = <&factory 0x8000>;
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 label = "factory";
103 reg = <0x40000 0x10000>;
104 read-only;
105 };
106
107 partition@50000 {
108 compatible = "denx,uimage";
109 label = "firmware";
110 reg = <0x50000 0x7b0000>;
111 };
112 };
113 };
114 };
115
116 &wmac {
117 status = "okay";
118 };
119
120 &ethernet {
121 mtd-mac-address = <&factory 0x2e>;
122 };
123
124 &esw {
125 mediatek,portmap = <0x2f>;
126 };