b8bd41c21bbe7236541908dfd6a1ec19866d2d39
[openwrt/openwrt.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 #address-cells = <1>;
43 #size-cells = <0>;
44 poll-interval = <20>;
45
46 bat {
47 label = "bat";
48 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
49 linux,code = <KEY_WPS_BUTTON>;
50 };
51
52 reset {
53 label = "reset";
54 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
55 linux,code = <KEY_RESTART>;
56 };
57
58 mode {
59 label = "mode";
60 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
61 linux,code = <BTN_0>;
62 linux,input-type = <EV_SW>;
63 };
64 };
65
66 gpio_export {
67 compatible = "gpio-export";
68 #size-cells = <0>;
69
70 usb-mode {
71 gpio-export,name = "usb-mode";
72 gpio-export,output = <0>;
73 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
74 };
75 };
76 };
77
78 &spi0 {
79 status = "okay";
80
81 m25p80@0 {
82 #address-cells = <1>;
83 #size-cells = <1>;
84 compatible = "jedec,spi-nor";
85 reg = <0>;
86 spi-max-frequency = <10000000>;
87
88 partition@0 {
89 label = "u-boot";
90 reg = <0x0 0x30000>;
91 read-only;
92 };
93
94 partition@30000 {
95 label = "u-boot-env";
96 reg = <0x30000 0x10000>;
97 read-only;
98 };
99
100 factory: partition@40000 {
101 label = "factory";
102 reg = <0x40000 0x10000>;
103 read-only;
104 };
105
106 partition@50000 {
107 label = "firmware";
108 reg = <0x50000 0x7b0000>;
109 };
110 };
111 };
112
113 &pinctrl {
114 state_default: pinctrl0 {
115 gpio {
116 ralink,group = "i2c", "jtag", "uartf";
117 ralink,function = "gpio";
118 };
119 };
120 };
121
122 &ethernet {
123 mtd-mac-address = <&factory 0x4>;
124 };
125
126 &esw {
127 mediatek,portmap = <0x2f>;
128 mediatek,led_polarity = <1>;
129 };
130
131 &wmac {
132 ralink,mtd-eeprom = <&factory 0>;
133 ralink,led-polarity = <1>;
134 };
135
136 &ehci {
137 status = "okay";
138 };
139
140 &ohci {
141 status = "okay";
142 };