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