ramips: replace pinctrl property names
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620n_elecom_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         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";
40
41                 reset {
42                         label = "reset";
43                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
44                         linux,code = <KEY_RESTART>;
45                 };
46
47                 wps {
48                         label = "wps";
49                         gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
50                         linux,code = <KEY_WPS_BUTTON>;
51                 };
52         };
53 };
54
55 &gpio1 {
56         status = "okay";
57 };
58
59 &gpio2 {
60         status = "okay";
61 };
62
63 &gpio3 {
64         status = "okay";
65 };
66
67 &spi0 {
68         status = "okay";
69
70         m25p80@0 {
71                 compatible = "jedec,spi-nor";
72                 reg = <0>;
73                 spi-max-frequency = <10000000>;
74
75                 partitions {
76                         compatible = "fixed-partitions";
77                         #address-cells = <1>;
78                         #size-cells = <1>;
79
80                         partition@0 {
81                                 label = "u-boot";
82                                 reg = <0x0 0x30000>;
83                                 read-only;
84                         };
85
86                         partition@30000 {
87                                 label = "u-boot-env";
88                                 reg = <0x30000 0x10000>;
89                         };
90
91                         factory: partition@40000 {
92                                 label = "factory";
93                                 reg = <0x40000 0x10000>;
94                                 read-only;
95                         };
96
97                         partition@50000 {
98                                 label = "recover";
99                                 reg = <0x50000 0x1c0000>;
100                                 read-only;
101                         };
102
103                         partition@210000 {
104                                 compatible = "denx,uimage";
105                                 label = "firmware";
106                                 reg = <0x210000 0xdf0000>;
107                         };
108                 };
109         };
110 };
111
112 &ehci {
113         status = "okay";
114 };
115
116 &ohci {
117         status = "okay";
118 };
119
120 &ethernet {
121         mtd-mac-address = <&factory 0x2e>;
122         mediatek,portmap = "llllw";
123 };
124
125 &wmac {
126         ralink,mtd-eeprom = <&factory 0>;
127 };
128
129 &state_default {
130         default {
131                 groups = "i2c", "ephy", "wled";
132                 function = "gpio";
133         };
134 };