ramips: cleanup SPI flash device tree properties usage
[lede.git] / target / linux / ramips / dts / ArcherC50.dts
1 /dts-v1/;
2 #include <dt-bindings/input/input.h>
3 #include <dt-bindings/gpio/gpio.h>
4
5 #include "mt7620a.dtsi"
6
7 / {
8         compatible = "ralink,mt7620a-soc";
9         model = "TP-Link Archer C50";
10
11         chosen {
12                 bootargs = "console=ttyS0,115200";
13         };
14
15         gpio-leds {
16                 compatible = "gpio-leds";
17
18                 lan {
19                         label = "c50:green:lan";
20                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
21                 };
22
23                 power {
24                         label = "c50:green:power";
25                         gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
26                 };
27
28                 usb {
29                         label = "c50:green:usb";
30                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
31                 };
32
33                 wan {
34                         label = "c50:green:wan";
35                         gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
36                 };
37
38                 wan_orange {
39                         label = "c50:orange:wan";
40                         gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
41                 };
42
43                 wlan5g {
44                         label = "c50:green:wlan5g";
45                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
46                 };
47
48                 wlan2g {
49                         label = "c50:green:wlan2g";
50                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
51                 };
52
53                 wps {
54                         label = "c50:green:wps";
55                         gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
56                 };
57         };
58
59         gpio-keys-polled {
60                 compatible = "gpio-keys-polled";
61                 #address-cells = <1>;
62                 #size-cells = <0>;
63                 poll-interval = <20>;
64
65                 reset {
66                         label = "reset";
67                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
68                         linux,code = <KEY_RESTART>;
69                 };
70
71                 rfkill {
72                         label = "rfkill";
73                         gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
74                         linux,code = <KEY_RFKILL>;
75                 };      };
76 };
77
78 &gpio1 {
79         status = "okay";
80 };
81
82 &gpio2 {
83         status = "okay";
84 };
85
86 &gpio3 {
87         status = "okay";
88 };
89
90 &spi0 {
91         status = "okay";
92
93         m25p80@0 {
94                 #address-cells = <1>;
95                 #size-cells = <1>;
96                 compatible = "jedec,spi-nor";
97                 reg = <0>;
98                 spi-max-frequency = <10000000>;
99
100                 partition@0 {
101                         label = "u-boot";
102                         reg = <0x0 0x20000>;
103                         read-only;
104                 };
105
106                 partition@20000 {
107                         label = "firmware";
108                         reg = <0x20000 0x7a0000>;
109                 };
110
111                 partition@7c0000 {
112                         label = "config";
113                         reg = <0x7c0000 0x10000>;
114                         read-only;
115                 };
116
117                 rom: partition@7d0000 {
118                         label = "rom";
119                         reg = <0x7d0000 0x10000>;
120                         read-only;
121                 };
122
123                 partition@7e0000 {
124                         label = "romfile";
125                         reg = <0x7e0000 0x10000>;
126                         read-only;
127                 };
128
129                 radio: partition@7f0000 {
130                         label = "radio";
131                         reg = <0x7f0000 0x10000>;
132                         read-only;
133                 };
134         };
135 };
136
137 &pinctrl {
138         state_default: pinctrl0 {
139                 gpio {
140                         ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "ephy", "spi refclk", "mdio", "wdt", "nd_sd";
141                         ralink,function = "gpio";
142                 };
143
144                 pa {
145                         ralink,group = "pa";
146                         ralink,function = "pa";
147                 };
148         };
149 };
150
151 &ethernet {
152                 pinctrl-names = "default";
153                 mtd-mac-address = <&rom 0xf100>;
154                 mediatek,portmap = "wllll";
155         };
156
157 &ehci {
158         status = "okay";
159 };
160
161 &ohci {
162         status = "okay";
163 };
164
165 &gsw {
166         mediatek,port4 = "ephy";
167 };
168
169 &wmac {
170         ralink,mtd-eeprom = <&radio 0>;
171 };
172
173 &pcie {
174         status = "okay";
175
176         pcie-bridge {
177                 mt76@0,0 {
178                         reg = <0x0000 0 0 0 0>;
179                         device_type = "pci";
180                         mediatek,mtd-eeprom = <&radio 32768>;
181                         mediatek,2ghz = <0>;
182                         mtd-mac-address = <&rom 0xf100>;
183                         mtd-mac-address-increment = <(-1)>;
184                 };
185         };
186 };