ramips: add support for indicating the boot state using multiple leds
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / ALL0239-3G.dts
1 /dts-v1/;
2
3 #include "rt3050.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "allnet,all0239-3g", "ralink,rt3052-soc";
10 model = "Allnet ALL0239-3G";
11
12 aliases {
13 led-boot = &led_status;
14 led-failsafe = &led_status;
15 led-running = &led_status;
16 led-upgrade = &led_status;
17 };
18
19
20 cfi@1f000000 {
21 compatible = "cfi-flash";
22 reg = <0x1f000000 0x800000>;
23 bank-width = <2>;
24 device-width = <2>;
25
26 partitions {
27 compatible = "fixed-partitions";
28 #address-cells = <1>;
29 #size-cells = <1>;
30
31 partition@0 {
32 label = "u-boot";
33 reg = <0x0 0x30000>;
34 read-only;
35 };
36
37 partition@30000 {
38 label = "u-boot-env";
39 reg = <0x30000 0x10000>;
40 read-only;
41 };
42
43 factory: partition@40000 {
44 label = "factory";
45 reg = <0x40000 0x10000>;
46 read-only;
47 };
48
49 partition@50000 {
50 label = "firmware";
51 reg = <0x50000 0x7b0000>;
52 };
53 };
54 };
55
56 gpio-leds {
57 compatible = "gpio-leds";
58
59 usb {
60 label = "all0239-3g:green:usb";
61 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
62 trigger-sources = <&otg_port1>;
63 linux,default-trigger = "usbport";
64 };
65
66 3g {
67 label = "all0239-3g:green:3g";
68 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
69 };
70
71 led_status: status {
72 label = "all0239-3g:green:status";
73 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
74 };
75
76 wps {
77 label = "all0239-3g:green:wps";
78 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
79 };
80 };
81
82 gpio-keys-polled {
83 compatible = "gpio-keys-polled";
84 poll-interval = <20>;
85
86 reset {
87 label = "reset";
88 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
89 linux,code = <KEY_RESTART>;
90 };
91
92 connect {
93 label = "connect";
94 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
95 linux,code = <KEY_CONNECT>;
96 };
97
98 wps {
99 label = "wps";
100 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
101 linux,code = <KEY_WPS_BUTTON>;
102 };
103 };
104 };
105
106 &pinctrl {
107 state_default: pinctrl0 {
108 gpio {
109 ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
110 ralink,function = "gpio";
111 };
112 };
113 };
114
115 &ethernet {
116 mtd-mac-address = <&factory 0x28>;
117 };
118
119 &esw {
120 status = "okay";
121 mediatek,portmap = <0x3e>;
122 };
123
124 &wmac {
125 ralink,mtd-eeprom = <&factory 0>;
126 };
127
128 &otg {
129 status = "okay";
130 };