Fresh pull from upstream
[librecmc/librecmc.git] / target / linux / ramips / dts / WIZFI630A.dts
1 /dts-v1/;
2
3 #include "rt5350.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8         compatible = "wizfi630a", "ralink,rt5350-soc";
9         model = "WIZnet WizFi630A";
10
11         chosen {
12                 bootargs = "console=ttyS1,115200";
13         };
14
15         gpio-export {
16                 compatible = "gpio-export";
17                 #size-cells = <0>;
18         };
19
20         gpio-leds {
21                 compatible = "gpio-leds";
22
23                 run {
24                         label = "wizfi630a::run";
25                         gpios = <&gpio0 1 1>;
26                 };
27
28                 wps {
29                         label = "wizfi630a::wps";
30                         gpios = <&gpio0 20 1>;
31                 };
32
33                 uart1 {
34                         label = "wizfi630a::uart1";
35                         gpios = <&gpio0 18 1>;
36                 };
37
38                 uart2 {
39                         label = "wizfi630a::uart2";
40                         gpios = <&gpio0 21 1>;
41                 };
42         };
43
44         gpio-keys-polled {
45                 compatible = "gpio-keys-polled";
46                 #address-cells = <1>;
47                 #size-cells = <0>;
48                 poll-interval = <20>;
49
50                 reset {
51                         label = "reset";
52                         gpios = <&gpio0 17 1>;
53                         linux,code = <KEY_RESTART>;
54                 };
55
56                 wps {
57                         label = "wps";
58                         gpios = <&gpio0 0 1>;
59                         linux,code = <KEY_WPS_BUTTON>;
60                 };
61                 
62                 scm1 {
63                         label = "SCM1";
64                         gpios = <&gpio0 19 1>;
65                         linux,code = <BTN_0>;
66                 };
67
68                 scm2 {
69                         label = "SCM2";
70                         gpios = <&gpio0 2 1>;
71                         linux,code = <BTN_1>;
72                 };
73         };
74 };
75
76 &gpio1 {
77         status = "okay";
78 };
79
80 &spi0 {
81         status = "okay";
82
83         m25p80@0 {
84                 #address-cells = <1>;
85                 #size-cells = <1>;
86                 compatible = "jedec,spi-nor";
87                 reg = <0>;
88                 linux,modalias = "m25p80", "w25q128";
89                 spi-max-frequency = <10000000>;
90
91                 partition@0 {
92                         #size-cells = <1>;
93                         label = "uboot";
94                         reg = <0x0 0x30000>;
95                         read-only;
96                 };
97
98                 partition@30000 {
99                         #size-cells = <1>;
100                         label = "uboot-env";
101                         reg = <0x30000 0x10000>;
102                         read-only;
103                 };
104
105                 factory: partition@40000 {
106                         #size-cells = <1>;
107                         label = "factory";
108                         reg = <0x40000 0x10000>;
109                         read-only;
110                 };
111
112                 partition@50000 {
113                         #size-cells = <1>;
114                         label = "firmware";
115                         reg = <0x50000 0xfb0000>;
116                 };
117         };
118 };
119
120 &uart {
121         compatible = "ralink,mt7620a-uart", "ralink,rt2880-uart", "ns16550a";
122         reg = <0x500 0x100>;
123         resets = <&rstctrl 12>;
124         reset-names = "uart";
125         interrupt-parent = <&intc>;
126         interrupts = <5>;
127         reg-shift = <2>;
128         pinctrl-names = "default";
129         pinctrl-0 = <&uartf_pins>;
130         status = "okay";
131 };
132
133 &uartlite {
134         compatible = "ralink,mt7620a-uart", "ralink,rt2880-uart", "ns16550a";
135         reg = <0xc00 0x100>;
136         resets = <&rstctrl 19>;
137         reset-names = "uartl";
138         interrupt-parent = <&intc>;
139         interrupts = <12>;
140         reg-shift = <2>;
141         pinctrl-names = "default";
142         pinctrl-0 = <&uartlite_pins>;
143 };
144
145 &pinctrl {
146         state_default: pinctrl0 {
147                 gpio {
148                         ralink,group = "i2c", "jtag" ;
149                         ralink,function = "gpio";
150                 };
151         };
152
153         uartf_gpio_pins: uartf_gpio {
154                 uartf_gpio {
155                         ralink,group = "uartf";
156                         ralink,function = "uartf";
157                 };
158         };
159
160         uartlite_pins: uartlite {
161                 uart {
162                         ralink,group = "uartlite";
163                         ralink,function = "uartlite";
164                 };
165         };
166 };
167
168 &ethernet {
169         mtd-mac-address = <&factory 0x4>;
170 };
171
172 &esw {
173         mediatek,portmap = <0x17>;
174 };
175
176 &wmac {
177         ralink,mtd-eeprom = <&factory 0>;
178 };
179
180 &ehci {
181         status = "okay";
182 };
183
184 &ohci {
185         status = "okay";
186 };