ramips: Use dts alias based status led
[openwrt/staging/wigyori.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-status = &led_status;
14 };
15
16
17 cfi@1f000000 {
18 compatible = "cfi-flash";
19 reg = <0x1f000000 0x800000>;
20 bank-width = <2>;
21 device-width = <2>;
22 #address-cells = <1>;
23 #size-cells = <1>;
24
25 partition@0 {
26 label = "u-boot";
27 reg = <0x0 0x30000>;
28 read-only;
29 };
30
31 partition@30000 {
32 label = "u-boot-env";
33 reg = <0x30000 0x10000>;
34 read-only;
35 };
36
37 factory: partition@40000 {
38 label = "factory";
39 reg = <0x40000 0x10000>;
40 read-only;
41 };
42
43 partition@50000 {
44 label = "firmware";
45 reg = <0x50000 0x7b0000>;
46 };
47 };
48
49 gpio-leds {
50 compatible = "gpio-leds";
51
52 usb {
53 label = "all0239-3g:green:usb";
54 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
55 };
56
57 3g {
58 label = "all0239-3g:green:3g";
59 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
60 };
61
62 led_status: status {
63 label = "all0239-3g:green:status";
64 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
65 };
66
67 wps {
68 label = "all0239-3g:green:wps";
69 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
70 };
71 };
72
73 gpio-keys-polled {
74 compatible = "gpio-keys-polled";
75 #address-cells = <1>;
76 #size-cells = <0>;
77 poll-interval = <20>;
78
79 reset {
80 label = "reset";
81 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
82 linux,code = <KEY_RESTART>;
83 };
84
85 connect {
86 label = "connect";
87 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
88 linux,code = <KEY_CONNECT>;
89 };
90
91 wps {
92 label = "wps";
93 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
94 linux,code = <KEY_WPS_BUTTON>;
95 };
96 };
97 };
98
99 &pinctrl {
100 state_default: pinctrl0 {
101 gpio {
102 ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
103 ralink,function = "gpio";
104 };
105 };
106 };
107
108 &ethernet {
109 mtd-mac-address = <&factory 0x28>;
110 };
111
112 &esw {
113 status = "okay";
114 mediatek,portmap = <0x3e>;
115 };
116
117 &wmac {
118 ralink,mtd-eeprom = <&factory 0>;
119 };
120
121 &otg {
122 status = "okay";
123 };