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