ramips: cleanup SPI flash device tree properties usage
[lede.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                 spi-max-frequency = <10000000>;
82
83                 partition@0 {
84                         label = "u-boot";
85                         reg = <0x0 0x30000>;
86                         read-only;
87                 };
88
89                 partition@30000 {
90                         label = "u-boot-env";
91                         reg = <0x30000 0x10000>;
92                         read-only;
93                 };
94
95                 factory: partition@40000 {
96                         label = "factory";
97                         reg = <0x40000 0x10000>;
98                         read-only;
99                 };
100
101                 partition@50000 {
102                         label = "firmware";
103                         reg = <0x50000 0x7b0000>;
104                 };
105         };
106 };
107
108 &pinctrl {
109         state_default: pinctrl0 {
110                 gpio {
111                         ralink,group = "i2c", "jtag", "uartf";
112                         ralink,function = "gpio";
113                 };
114         };
115 };
116
117 &ethernet {
118         mtd-mac-address = <&factory 0x4>;
119 };
120
121 &esw {
122         mediatek,portmap = <0x2f>;
123         mediatek,led_polarity = <1>;
124 };
125
126 &wmac {
127         ralink,mtd-eeprom = <&factory 0>;
128         ralink,led-polarity = <1>;
129 };
130
131 &ehci {
132         status = "okay";
133 };
134
135 &ohci {
136         status = "okay";
137 };