ramips: cleanup SPI flash device tree properties usage
[openwrt/staging/chunkeey.git] / target / linux / ramips / dts / E1700.dts
1 /*
2 * Device Tree file for the Linksys E1700
3 *
4 * Copyright (C) 2014 Imre Kaloz <kaloz@openwrt.org>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11 /dts-v1/;
12
13 #include "mt7620a.dtsi"
14
15 #include <dt-bindings/input/input.h>
16
17 / {
18 compatible = "linksys,e1700", "ralink,mt7620a-soc";
19 model = "Linksys E1700";
20
21 gpio-keys-polled {
22 compatible = "gpio-keys-polled";
23 #address-cells = <1>;
24 #size-cells = <0>;
25 poll-interval = <20>;
26
27 reset {
28 label = "reset";
29 gpios = <&gpio0 1 0>;
30 linux,code = <KEY_RESTART>;
31 };
32
33 wps {
34 label = "wps";
35 gpios = <&gpio0 2 0>;
36 linux,code = <KEY_WPS_BUTTON>;
37 };
38 };
39
40 gpio-leds {
41 compatible = "gpio-leds";
42
43 power {
44 label = "e1700:green:power";
45 gpios = <&gpio0 10 1>;
46 };
47
48 wan {
49 label = "e1700:green:wps";
50 gpios = <&gpio0 12 1>;
51 };
52 };
53 };
54
55 &spi0 {
56 status = "okay";
57
58 m25p80@0 {
59 #address-cells = <1>;
60 #size-cells = <1>;
61 compatible = "jedec,spi-nor";
62 reg = <0>;
63 spi-max-frequency = <10000000>;
64
65 partition@0 {
66 label = "u-boot";
67 reg = <0x0 0x30000>;
68 read-only;
69 };
70
71 partition@30000 {
72 label = "config";
73 reg = <0x30000 0x10000>;
74 read-only;
75 };
76
77 factory: partition@40000 {
78 label = "factory";
79 reg = <0x40000 0x10000>;
80 read-only;
81 };
82
83 partition@50000 {
84 label = "firmware";
85 reg = <0x50000 0x7b0000>;
86 };
87 };
88 };
89
90 &pinctrl {
91 state_default: pinctrl0 {
92 gpio {
93 ralink,group = "i2c", "uartf";
94 ralink,function = "gpio";
95 };
96 };
97 };
98
99 &ethernet {
100 status = "okay";
101 mtd-mac-address = <&factory 0x28>;
102 pinctrl-names = "default";
103 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
104
105 port@5 {
106 status = "okay";
107 mediatek,fixed-link = <1000 1 1 1>;
108 phy-mode = "rgmii";
109 };
110
111 mdio-bus {
112 status = "okay";
113
114 phy0: ethernet-phy@0 {
115 reg = <0>;
116 phy-mode = "rgmii";
117 };
118
119 phy1: ethernet-phy@1 {
120 reg = <1>;
121 phy-mode = "rgmii";
122 };
123
124 phy2: ethernet-phy@2 {
125 reg = <2>;
126 phy-mode = "rgmii";
127 };
128
129 phy3: ethernet-phy@3 {
130 reg = <3>;
131 phy-mode = "rgmii";
132 };
133
134 phy4: ethernet-phy@4 {
135 reg = <4>;
136 phy-mode = "rgmii";
137 };
138
139 phy1f: ethernet-phy@1f {
140 reg = <0x1f>;
141 phy-mode = "rgmii";
142 };
143 };
144 };
145
146 &gsw {
147 mediatek,port4 = "gmac";
148 mediatek,mt7530 = <1>;
149 };
150
151 &wmac {
152 ralink,mtd-eeprom = <&factory 0>;
153 };