ramips: mt7628: use nvmem-layout
[openwrt/staging/stintel.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 label = "factory";
112 reg = <0x40000 0x10000>;
113 read-only;
114
115 nvmem-layout {
116 compatible = "fixed-layout";
117 #address-cells = <1>;
118 #size-cells = <1>;
119
120 eeprom_factory_0: eeprom@0 {
121 reg = <0x0 0x400>;
122 };
123
124 macaddr_factory_2e: macaddr@2e {
125 reg = <0x2e 0x6>;
126 };
127 };
128 };
129
130 partition@50000 {
131 compatible = "denx,uimage";
132 label = "firmware";
133 reg = <0x50000 0x1fb0000>;
134 };
135 };
136 };
137
138 spidev@1 {
139 #address-cells = <1>;
140 #size-cells = <1>;
141 compatible = "linux,spidev";
142 reg = <1>;
143 spi-max-frequency = <40000000>;
144 };
145 };
146
147 &i2c {
148 status = "okay";
149 };
150
151 &uart1 {
152 status = "okay";
153 };
154
155 &uart2 {
156 status = "okay";
157 };
158
159 &pwm {
160 status = "okay";
161 };
162
163 &ethernet {
164 nvmem-cells = <&macaddr_factory_2e>;
165 nvmem-cell-names = "mac-address";
166 };
167
168 &sdhci {
169 status = "okay";
170 mediatek,cd-high;
171 };
172
173 &wmac {
174 status = "okay";
175
176 nvmem-cells = <&eeprom_factory_0>;
177 nvmem-cell-names = "eeprom";
178 };