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