Fresh pull from upstream
[librecmc/librecmc.git] / target / linux / ramips / dts / X5.dts
1 /dts-v1/;
2
3 #include "rt5350.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8         compatible = "X5", "ralink,rt5350-soc";
9         model = "Poray X5";
10
11         gpio-leds {
12                 compatible = "gpio-leds";
13
14                 power {
15                         label = "x5:green:power";
16                         gpios = <&gpio0 13 1>;
17                 };
18
19                 20 {
20                         label = "x5:green:20";
21                         gpios = <&gpio0 12 1>;
22                 };
23
24                 50 {
25                         label = "x5:green:50";
26                         gpios = <&gpio0 11 1>;
27                 };
28
29                 80 {
30                         label = "x5:green:80";
31                         gpios = <&gpio0 7 1>;
32                 };
33         };
34
35         gpio-keys-polled {
36                 compatible = "gpio-keys-polled";
37                 #address-cells = <1>;
38                 #size-cells = <0>;
39                 poll-interval = <20>;
40
41                 bat {
42                         label = "bat";
43                         gpios = <&gpio0 9 1>;
44                         linux,code = <KEY_WPS_BUTTON>;
45                 };
46
47                 reset {
48                         label = "reset";
49                         gpios = <&gpio0 10 1>;
50                         linux,code = <KEY_RESTART>;
51                 };
52
53                 mode {
54                         label = "mode";
55                         gpios = <&gpio0 14 1>;
56                         linux,code = <BTN_0>;
57                         linux,input-type = <EV_SW>;
58                 };
59         };
60
61         gpio_export {
62                 compatible = "gpio-export";
63                 #size-cells = <0>;
64
65                 usb-mode {
66                         gpio-export,name = "usb-mode";
67                         gpio-export,output = <0>;
68                         gpios = <&gpio0 18 0>;
69                 };
70         };
71 };
72
73 &spi0 {
74         status = "okay";
75
76         m25p80@0 {
77                 #address-cells = <1>;
78                 #size-cells = <1>;
79                 compatible = "jedec,spi-nor";
80                 reg = <0>;
81                 linux,modalias = "m25p80", "gd25q64";
82                 spi-max-frequency = <10000000>;
83
84                 partition@0 {
85                         label = "u-boot";
86                         reg = <0x0 0x30000>;
87                         read-only;
88                 };
89
90                 partition@30000 {
91                         label = "u-boot-env";
92                         reg = <0x30000 0x10000>;
93                         read-only;
94                 };
95
96                 factory: partition@40000 {
97                         label = "factory";
98                         reg = <0x40000 0x10000>;
99                         read-only;
100                 };
101
102                 partition@50000 {
103                         label = "firmware";
104                         reg = <0x50000 0x7b0000>;
105                 };
106         };
107 };
108
109 &pinctrl {
110         state_default: pinctrl0 {
111                 gpio {
112                         ralink,group = "i2c", "jtag", "uartf";
113                         ralink,function = "gpio";
114                 };
115         };
116 };
117
118 &ethernet {
119         mtd-mac-address = <&factory 0x4>;
120 };
121
122 &esw {
123         mediatek,portmap = <0x2f>;
124         mediatek,led_polarity = <1>;
125 };
126
127 &wmac {
128         ralink,mtd-eeprom = <&factory 0>;
129         ralink,led-polarity = <1>;
130 };
131
132 &ehci {
133         status = "okay";
134 };
135
136 &ohci {
137         status = "okay";
138 };