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