ramips: cleanup SPI flash device tree properties usage
[oweals/openwrt.git] / target / linux / ramips / dts / MLW221.dts
1 /dts-v1/;
2
3 #include "mt7620n.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8         compatible = "mlw221", "ralink,mt7620n-soc";
9         model = "Kingston MLW221";
10
11         gpio-leds {
12                 compatible = "gpio-leds";
13
14                 system {
15                         label = "mlw221:blue:system";
16                         gpios = <&gpio2 3 1>;
17                 };
18
19                 wifi {
20                         label = "mlw221:blue:wifi";
21                         gpios = <&gpio3 0 1>;
22                 };
23         };
24
25         gpio-keys-polled {
26                 compatible = "gpio-keys-polled";
27                 #address-cells = <1>;
28                 #size-cells = <0>;
29                 poll-interval = <20>;
30
31                 reset {
32                         label = "reset";
33                         gpios = <&gpio0 1 1>;
34                         linux,code = <KEY_RESTART>;
35                 };
36
37                 system {
38                         label = "system";
39                         gpios = <&gpio0 2 1>;
40                         linux,code = <KEY_RFKILL>;
41                 };
42         };
43 };
44
45 &gpio0 {
46         status = "okay";
47 };
48
49 &gpio2 {
50         status = "okay";
51 };
52
53 &gpio3 {
54         status = "okay";
55 };
56
57 &spi0 {
58         status = "okay";
59
60         m25p80@0 {
61                 #address-cells = <1>;
62                 #size-cells = <1>;
63                 compatible = "jedec,spi-nor";
64                 reg = <0>;
65                 spi-max-frequency = <10000000>;
66
67                 partition@0 {
68                         label = "u-boot";
69                         reg = <0x0 0x30000>;
70                         read-only;
71                 };
72
73                 partition@30000 {
74                         label = "u-boot-env";
75                         reg = <0x30000 0x10000>;
76                         read-only;
77                 };
78
79                 factory: partition@40000 {
80                         label = "factory";
81                         reg = <0x40000 0x10000>;
82                         read-only;
83                 };
84
85                 partition@50000 {
86                         label = "firmware";
87                         reg = <0x50000 0xf60000>;
88                 };
89
90                 partition@fb0000 {
91                         label = "user-config";
92                         reg = <0xfb0000 0x50000>;
93                 };
94         };
95 };
96
97 &ehci {
98         status = "okay";
99 };
100
101 &ohci {
102         status = "okay";
103 };
104
105 &ethernet {
106         mtd-mac-address = <&factory 0x4>;
107         mediatek,portmap = "wllll";
108 };
109
110 &wmac {
111         ralink,mtd-eeprom = <&factory 0>;
112 };
113
114 &pinctrl {
115         state_default: pinctrl0 {
116                 default {
117                         ralink,group = "i2c", "ephy", "wled";
118                         ralink,function = "gpio";
119                 };
120         };
121 };