5d37b124486ec685273dfa41067e357739c2f138
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7628an_widora_neo.dtsi
1 #include "mt7628an.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "widora,neo", "mediatek,mt7628an-soc";
8
9 aliases {
10 led-boot = &led_wifi;
11 led-failsafe = &led_wifi;
12 led-running = &led_wifi;
13 led-upgrade = &led_wifi;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,115200";
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_wifi: wifi {
24 label = "orange:wifi";
25 gpios = <&wgpio 0 GPIO_ACTIVE_HIGH>;
26 default-state = "on";
27 };
28 };
29
30 keys {
31 compatible = "gpio-keys";
32
33 wps {
34 label = "reset";
35 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_WPS_BUTTON>;
37 };
38 };
39
40 wgpio: gpio-wifi {
41 compatible = "mediatek,gpio-wifi";
42 #address-cells = <1>;
43 #size-cells = <0>;
44 gpio-controller;
45 #gpio-cells = <2>;
46 };
47 };
48
49 &spi0 {
50 status = "okay";
51
52 pinctrl-names = "default";
53 pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
54
55 flash0: flash@0 {
56 compatible = "jedec,spi-nor";
57 reg = <0>;
58 spi-max-frequency = <40000000>;
59
60 partitions {
61 compatible = "fixed-partitions";
62 #address-cells = <1>;
63 #size-cells = <1>;
64
65 partition@0 {
66 label = "u-boot";
67 reg = <0x0 0x30000>;
68 read-only;
69 };
70
71 partition@30000 {
72 label = "u-boot-env";
73 reg = <0x30000 0x10000>;
74 };
75
76 factory: partition@40000 {
77 compatible = "nvmem-cells";
78 label = "factory";
79 reg = <0x40000 0x10000>;
80 #address-cells = <1>;
81 #size-cells = <1>;
82 read-only;
83
84 eeprom_factory_0: eeprom@0 {
85 reg = <0x0 0x400>;
86 };
87
88 macaddr_factory_28: macaddr@28 {
89 reg = <0x28 0x6>;
90 };
91 };
92
93 firmware: partition@50000 {
94 compatible = "denx,uimage";
95 label = "firmware";
96 /* reg property is set based on flash size in DTS files */
97 };
98 };
99 };
100
101 spidev@1 {
102 #address-cells = <1>;
103 #size-cells = <1>;
104 compatible = "linux,spidev";
105 reg = <1>;
106 spi-max-frequency = <40000000>;
107 };
108 };
109
110 &state_default {
111 gpio {
112 groups = "gpio";
113 function = "gpio";
114 };
115
116 perst {
117 groups = "perst";
118 function = "gpio";
119 };
120
121 refclk {
122 groups = "refclk";
123 function = "gpio";
124 };
125
126 i2s {
127 groups = "i2s";
128 function = "gpio";
129 };
130
131 spis {
132 groups = "spis";
133 function = "gpio";
134 };
135
136 wled_kn {
137 groups = "wled_kn";
138 function = "gpio";
139 };
140
141 wled_an {
142 groups = "wled_an";
143 function = "wled_an";
144 };
145
146 wdt {
147 groups = "wdt";
148 function = "gpio";
149 };
150 };
151
152 &i2c {
153 status = "okay";
154 };
155
156 &uart1 {
157 status = "okay";
158 };
159
160 &uart2 {
161 status = "okay";
162 };
163
164 &pwm {
165 status = "okay";
166 };
167
168 &ethernet {
169 nvmem-cells = <&macaddr_factory_28>;
170 nvmem-cell-names = "mac-address";
171 };
172
173 &sdhci {
174 status = "okay";
175 mediatek,cd-low;
176 };
177
178 &wmac {
179 status = "okay";
180
181 nvmem-cells = <&eeprom_factory_0>;
182 nvmem-cell-names = "eeprom";
183 };