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