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