1d4efcc592bf562a3c68404faf81291bc78e0510
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7620n_elecom_wrh-300cr.dts
1 #include "mt7620n.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "elecom,wrh-300cr", "ralink,mt7620n-soc";
8 model = "ELECOM WRH-300CR";
9
10 aliases {
11 led-boot = &led_wps;
12 led-failsafe = &led_wps;
13 led-running = &led_wps;
14 led-upgrade = &led_wps;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 led_wps: wps {
21 label = "wrh-300cr:green:wps";
22 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
23 };
24
25 ethernet {
26 label = "wrh-300cr:green:ethernet";
27 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
28 };
29
30 wlan {
31 label = "wrh-300cr:green:wlan";
32 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
33 };
34 };
35
36 keys {
37 compatible = "gpio-keys";
38
39 reset {
40 label = "reset";
41 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_RESTART>;
43 };
44
45 wps {
46 label = "wps";
47 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_WPS_BUTTON>;
49 };
50 };
51 };
52
53 &gpio1 {
54 status = "okay";
55 };
56
57 &gpio2 {
58 status = "okay";
59 };
60
61 &gpio3 {
62 status = "okay";
63 };
64
65 &spi0 {
66 status = "okay";
67
68 flash@0 {
69 compatible = "jedec,spi-nor";
70 reg = <0>;
71 spi-max-frequency = <10000000>;
72
73 partitions {
74 compatible = "fixed-partitions";
75 #address-cells = <1>;
76 #size-cells = <1>;
77
78 partition@0 {
79 label = "u-boot";
80 reg = <0x0 0x30000>;
81 read-only;
82 };
83
84 partition@30000 {
85 label = "u-boot-env";
86 reg = <0x30000 0x10000>;
87 };
88
89 factory: partition@40000 {
90 label = "factory";
91 reg = <0x40000 0x10000>;
92 read-only;
93 };
94
95 partition@50000 {
96 label = "recover";
97 reg = <0x50000 0x1c0000>;
98 read-only;
99 };
100
101 partition@210000 {
102 compatible = "denx,uimage";
103 label = "firmware";
104 reg = <0x210000 0xdf0000>;
105 };
106 };
107 };
108 };
109
110 &ehci {
111 status = "okay";
112 };
113
114 &ohci {
115 status = "okay";
116 };
117
118 &ethernet {
119 mtd-mac-address = <&factory 0x2e>;
120
121 mediatek,portmap = "llllw";
122 };
123
124 &wmac {
125 ralink,mtd-eeprom = <&factory 0x0>;
126 };
127
128 &state_default {
129 default {
130 groups = "i2c", "ephy", "wled";
131 function = "gpio";
132 };
133 };