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