ramips: only add spidev node in for WrtNode2R (and not for 2P)
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620a_glinet_gl-mt300a.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 = "glinet,gl-mt300a", "ralink,mt7620a-soc";
10         model = "GL-MT300A";
11
12         chosen {
13                 bootargs = "console=ttyS0,115200";
14         };
15
16         leds {
17                 compatible = "gpio-leds";
18
19                 wan {
20                         label = "gl-mt300a:wan";
21                         gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
22                 };
23
24                 lan {
25                         label = "gl-mt300a:lan";
26                         gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
27                 };
28
29                 wlan {
30                         label = "gl-mt300a:wlan";
31                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
32                 };
33
34                 usb {
35                         label = "gl-mt300a:usb";
36                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
37                 };
38         };
39
40         keys {
41                 compatible = "gpio-keys-polled";
42                 poll-interval = <20>;
43                 reset {
44                         label = "reset";
45                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
46                         linux,code = <KEY_RESTART>;
47                 };
48
49                 BTN_0 {
50                         label = "BTN_0";
51                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
52                         linux,code = <BTN_0>;
53                 };
54
55                 BTN_1 {
56                         label = "BTN_1";
57                         gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
58                         linux,code = <BTN_1>;
59                 };
60         };
61 };
62
63 &gpio0 {
64         status = "okay";
65 };
66
67 &gpio1 {
68         status = "okay";
69 };
70
71 &gpio2 {
72         status = "okay";
73 };
74
75 &gpio3 {
76         status = "okay";
77 };
78
79 &spi0 {
80         status = "okay";
81
82         m25p80@0 {
83                 compatible = "jedec,spi-nor";
84                 reg = <0>;
85                 spi-max-frequency = <10000000>;
86
87                 partitions {
88                         compatible = "fixed-partitions";
89                         #address-cells = <1>;
90                         #size-cells = <1>;
91
92                         partition@0 {
93                                 label = "u-boot";
94                                 reg = <0x0 0x30000>;
95                         };
96
97                         partition@30000 {
98                                 label = "u-boot-env";
99                                 reg = <0x30000 0x10000>;
100                                 read-only;
101                         };
102
103                         factory: partition@40000 {
104                                 label = "factory";
105                                 reg = <0x40000 0x10000>;
106                                 read-only;
107                         };
108
109                         partition@50000 {
110                                 compatible = "denx,uimage";
111                                 label = "firmware";
112                                 reg = <0x50000 0xf80000>;
113                         };
114
115                         partition@ff0000 {
116                                 label = "art";
117                                 reg = <0xff0000 0x10000>;
118                         };
119                 };
120         };
121 };
122
123 &sdhci {
124         status = "okay";
125 };
126
127 &ehci {
128         status = "okay";
129 };
130
131 &ohci {
132         status = "okay";
133 };
134
135 &ethernet {
136         mtd-mac-address = <&factory 0x4000>;
137         mediatek,portmap = "wllll";
138 };
139
140 &wmac {
141         ralink,mtd-eeprom = <&factory 0>;
142 };
143
144 &pinctrl {
145         state_default: pinctrl0 {
146                 gpio {
147                         ralink,group = "wled","ephy","uartf","i2c";
148                         ralink,function = "gpio";
149                 };
150         };
151 };