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