39582170827495466b06c6e733a936965733841e
[openwrt/openwrt.git] / target / linux / ramips / dts / WHR-300HP2.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8 compatible = "ralink,mt7620a-soc";
9 model = "Buffalo WHR-300HP2";
10
11 gpio-leds {
12 compatible = "gpio-leds";
13
14 power {
15 label = "whr-300hp2:red:power";
16 gpios = <&gpio0 7 1>;
17 };
18
19 wifi {
20 label = "whr-300hp2:green:wifi";
21 gpios = <&gpio0 8 1>;
22 };
23
24 power2 {
25 label = "whr-300hp2:green:power";
26 gpios = <&gpio0 9 1>;
27 };
28
29 wifi2 {
30 label = "whr-300hp2:orange:wifi";
31 gpios = <&gpio0 10 1>;
32 };
33
34 internet {
35 label = "whr-300hp2:green:internet";
36 gpios = <&gpio2 17 1>;
37 };
38
39 router {
40 label = "whr-300hp2:green:router";
41 gpios = <&gpio2 18 1>;
42 };
43
44 router2 {
45 label = "whr-300hp2:orange:router";
46 gpios = <&gpio2 19 1>;
47 };
48 };
49
50 gpio-keys-polled {
51 compatible = "gpio-keys-polled";
52 #address-cells = <1>;
53 #size-cells = <0>;
54 poll-interval = <20>;
55
56 reset {
57 label = "reset";
58 gpios = <&gpio2 12 1>;
59 linux,code = <KEY_RESTART>;
60 };
61
62 aoss {
63 label = "aoss";
64 gpios = <&gpio2 13 1>;
65 linux,code = <KEY_WPS_BUTTON>;
66 };
67
68 ap {
69 label = "ap";
70 gpios = <&gpio2 14 1>;
71 linux,code = <BTN_0>;
72 linux,input-type = <EV_SW>;
73 };
74
75 bridge {
76 label = "bridge";
77 gpios = <&gpio2 15 1>;
78 linux,code = <BTN_0>;
79 linux,input-type = <EV_SW>;
80 };
81 };
82 };
83
84 &gpio2 {
85 status = "okay";
86 };
87
88 &spi0 {
89 status = "okay";
90
91 m25p80@0 {
92 #address-cells = <1>;
93 #size-cells = <1>;
94 compatible = "jedec,spi-nor";
95 reg = <0>;
96 linux,modalias = "m25p80", "s25fl064k";
97 spi-max-frequency = <10000000>;
98
99 partition@0 {
100 label = "u-boot";
101 reg = <0x0 0x30000>;
102 read-only;
103 };
104
105 partition@30000 {
106 label = "u-boot-env";
107 reg = <0x30000 0x10000>;
108 read-only;
109 };
110
111 factory: partition@40000 {
112 label = "factory";
113 reg = <0x40000 0x10000>;
114 read-only;
115 };
116
117 partition@50000 {
118 label = "firmware";
119 reg = <0x50000 0x7b0000>;
120 };
121 };
122 };
123
124 &pinctrl {
125 state_default: pinctrl0 {
126 gpio {
127 ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd";
128 ralink,function = "gpio";
129 };
130
131 pa {
132 ralink,group = "pa";
133 ralink,function = "pa";
134 };
135 };
136 };
137
138 &ethernet {
139 pinctrl-names = "default";
140 pinctrl-0 = <&ephy_pins>;
141 mediatek,portmap = "llllw";
142 };
143
144 &gsw {
145 mediatek,port4 = "ephy";
146 };
147
148 &wmac {
149 ralink,mtd-eeprom = <&factory 0>;
150 };