ramips: DTS rework
[openwrt/openwrt.git] / target / linux / ramips / dts / WHR-600D.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 / {
6 compatible = "ralink,mt7620a-soc";
7 model = "Buffalo WHR-600D";
8
9 gpio-leds {
10 compatible = "gpio-leds";
11
12 power {
13 label = "whr-600d:red:power";
14 gpios = <&gpio0 7 1>;
15 };
16
17 wifi {
18 label = "whr-600d:green:wifi";
19 gpios = <&gpio0 8 1>;
20 };
21
22 power2 {
23 label = "whr-600d:green:power";
24 gpios = <&gpio0 9 1>;
25 };
26
27 wifi2 {
28 label = "whr-600d:orange:wifi";
29 gpios = <&gpio0 10 1>;
30 };
31
32 internet {
33 label = "whr-600d:green:internet";
34 gpios = <&gpio2 17 1>;
35 };
36
37 router {
38 label = "whr-600d:green:router";
39 gpios = <&gpio2 18 1>;
40 };
41
42 router2 {
43 label = "whr-600d: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", "mx25l6405d";
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 };
130
131 &ethernet {
132 pinctrl-names = "default";
133 pinctrl-0 = <&ephy_pins>;
134 mtd-mac-address = <&factory 0x4>;
135 mediatek,portmap = "llllw";
136 };
137
138 &gsw {
139 mediatek,port4 = "ephy";
140 };
141
142 &wmac {
143 ralink,mtd-eeprom = <&factory 0>;
144 };
145
146 &pcie {
147 status = "okay";
148 };