ramips: DTS rework
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / EX2700.dts
1 /*
2 * Device Tree file for the Netgear EX2700
3 *
4 * Copyright (C) 2016 Joseph C. Lehner <joseph.c.lehner@gmail.com>
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 / {
16 compatible = "ralink,mt7620a-soc";
17 model = "Netgear EX2700";
18
19 chosen {
20 bootargs = "console=ttyS0,57600";
21 };
22
23 gpio-leds {
24 compatible = "gpio-leds";
25
26 power_g {
27 label = "ex2700:green:power";
28 gpios = <&gpio0 9 1>;
29 default-state = "on";
30 };
31
32 power_r {
33 label = "ex2700:red:power";
34 gpios = <&gpio0 11 1>;
35 };
36
37 device_g {
38 label = "ex2700:green:device";
39 gpios = <&gpio0 13 1>;
40 };
41
42 device_r {
43 label = "ex2700:red:device";
44 gpios = <&gpio0 10 1>;
45 };
46
47 router_g {
48 label = "ex2700:green:router";
49 gpios = <&gpio0 12 1>;
50 };
51
52 router_r {
53 label = "ex2700:red:router";
54 gpios = <&gpio0 14 1>;
55 };
56
57 wps {
58 label = "ex2700:green:wps";
59 gpios = <&gpio1 15 1>;
60 };
61 };
62
63 gpio-keys-polled {
64 compatible = "gpio-keys-polled";
65 #address-cells = <1>;
66 #size-cells = <0>;
67 poll-interval = <20>;
68
69 reset {
70 label = "reset";
71 gpios = <&gpio0 1 1>;
72 linux,code = <0x198>;
73 };
74
75 wps {
76 label = "wps";
77 gpios = <&gpio0 2 1>;
78 linux,code = <0x211>;
79 };
80 };
81 };
82
83 &gpio0 {
84 status = "okay";
85 };
86
87 &gpio1 {
88 status = "okay";
89 };
90
91 &spi0 {
92 status = "okay";
93
94 m25p80@0 {
95 #address-cells = <1>;
96 #size-cells = <1>;
97 compatible = "jedec,spi-nor";
98 reg = <0 0>;
99 linux,modalias = "m25p80", "mx25l3205d";
100 spi-max-frequency = <10000000>;
101
102 partition@0 {
103 label = "u-boot";
104 reg = <0x0 0x30000>;
105 read-only;
106 };
107
108 partition@30000 {
109 label = "u-boot-env";
110 reg = <0x30000 0x10000>;
111 read-only;
112 };
113
114 partition@40000 {
115 label = "firmware";
116 reg = <0x40000 0x3b0000>;
117 };
118
119 art: partition@3f0000 {
120 label = "art";
121 reg = <0x3f0000 0x10000>;
122 read-only;
123 };
124 };
125 };
126
127 &ethernet {
128 mtd-mac-address = <&art 0x0>;
129 };
130
131 &wmac {
132 ralink,mtd-eeprom = <&art 0x1000>;
133 };
134
135 &pinctrl {
136 state_default: pinctrl0 {
137 default {
138 // spi refclk: pins 37, 38, 39
139 // uartf: pins 8, 9, 10, 11, 12, 13, 14
140 // i2c: pins 1, 2
141 ralink,group = "i2c", "uartf", "spi refclk";
142 ralink,function = "gpio";
143 };
144 };
145 };