ramips: only add spidev node in for WrtNode2R (and not for 2P)
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620a_sercomm_na930.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 = "sercomm,na930", "ralink,mt7620a-soc";
10         model = "Sercomm NA930";
11
12         aliases {
13                 led-boot = &led_power;
14                 led-failsafe = &led_power;
15                 led-running = &led_power;
16                 led-upgrade = &led_power;
17         };
18
19         chosen {
20                 bootargs = "console=ttyS1,57600";
21         };
22
23         nand {
24                 compatible = "mtk,mt7620-nand";
25
26                 partitions {
27                         compatible = "fixed-partitions";
28                         #address-cells = <1>;
29                         #size-cells = <1>;
30
31                         partition@0 {
32                                 label = "u-boot";
33                                 reg = <0x0 0x20000>;
34                                 read-only;
35                         };
36
37                         partition@200000 {
38                                 label = "factory";
39                                 reg = <0x200000 0x40000>;
40                                 read-only;
41                         };
42
43                         partition@240000 {
44                                 label = "Config";
45                                 reg = <0x240000 0x400000>;
46                                 read-only;
47                         };
48
49                         partition@640000 {
50                                 compatible = "denx,uimage";
51                                 label = "firmware";
52                                 reg = <0x640000 0x1400000>;
53                         };
54                 };
55         };
56
57         keys {
58                 compatible = "gpio-keys-polled";
59                 poll-interval = <20>;
60
61                 reset {
62                         label = "reset";
63                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
64                         linux,code = <KEY_RESTART>;
65                 };
66
67                 zwave {
68                         label = "zwave";
69                         gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
70                         linux,code = <BTN_0>;
71                 };
72
73                 wps {
74                         label = "wps";
75                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
76                         linux,code = <KEY_WPS_BUTTON>;
77                 };
78         };
79
80         leds {
81                 compatible = "gpio-leds";
82
83                 zwave {
84                         label = "na930:blue:zwave";
85                         gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
86                 };
87
88                 status {
89                         label = "na930:blue:status";
90                         gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
91                         trigger-sources = <&ohci_port1>, <&ehci_port1>;
92                         linux,default-trigger = "usbport";
93                 };
94
95                 service {
96                         label = "na930:blue:service";
97                         gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
98                 };
99
100                 led_power: power {
101                         label = "na930:blue:power";
102                         gpios = <&gpio2 29 GPIO_ACTIVE_LOW>;
103                 };
104         };
105
106         gpio_export {
107                 compatible = "gpio-export";
108                 #size-cells = <0>;
109
110                 telit {
111                         gpio-export,name = "telit";
112                         gpio-export,output = <1>;
113                         gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
114                 };
115         };
116 };
117
118 &pinctrl {
119         state_default: pinctrl0 {
120                 gpio {
121                         ralink,group = "i2c", "rgmii2", "spi", "ephy";
122                         ralink,function = "gpio";
123                 };
124
125                 uartf_gpio {
126                         ralink,group = "uartf";
127                         ralink,function = "gpio uartf";
128                 };
129         };
130 };
131
132 &uart {
133         status = "okay";
134 };
135
136 &gpio1 {
137         status = "okay";
138 };
139
140 &gpio2 {
141         status = "okay";
142 };
143
144 &ethernet {
145         status = "okay";
146         pinctrl-names = "default";
147         pinctrl-0 = <&rgmii1_pins &mdio_pins>;
148         mediatek,portmap = "llllw";
149
150         port@4 {
151                 status = "okay";
152                 phy-handle = <&phy4>;
153                 phy-mode = "rgmii";
154         };
155
156         port@5 {
157                 status = "okay";
158                 phy-handle = <&phy5>;
159                 phy-mode = "rgmii";
160         };
161
162         mdio-bus {
163                 status = "okay";
164
165                 phy4: ethernet-phy@4 {
166                         reg = <4>;
167                         phy-mode = "rgmii";
168                 };
169
170                 phy5: ethernet-phy@5 {
171                         reg = <5>;
172                         phy-mode = "rgmii";
173                 };
174         };
175 };
176
177 &gsw {
178         mediatek,port4 = "gmac";
179 };
180
181 &ehci {
182         status = "okay";
183 };
184
185 &ohci {
186         status = "okay";
187 };