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