ramips: Use dts alias based status led
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / DIR-645.dts
1 /dts-v1/;
2
3 #include "rt3883.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "dlink,dir-645", "ralink,rt3883-soc";
10 model = "D-Link DIR-645";
11
12 aliases {
13 led-status = &led_wps;
14 };
15
16 rtl8367b {
17 compatible = "realtek,rtl8367b";
18 gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
19 gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
20 realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
21 };
22
23 gpio-keys-polled {
24 compatible = "gpio-keys-polled";
25 #address-cells = <1>;
26 #size-cells = <0>;
27 poll-interval = <100>;
28
29 reset {
30 label = "reset";
31 gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
32 linux,code = <KEY_RESTART>;
33 };
34
35 wps {
36 label = "wps";
37 gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
38 linux,code = <KEY_WPS_BUTTON>;
39 };
40 };
41
42 gpio-leds {
43 compatible = "gpio-leds";
44
45 inet {
46 label = "dir-645:green:inet";
47 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
48 };
49
50 led_wps: wps {
51 label = "dir-645:green:wps";
52 gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
53 };
54 };
55
56 gpio_export {
57 compatible = "gpio-export";
58 #size-cells = <0>;
59
60 usb {
61 gpio-export,name = "usb";
62 gpio-export,output = <1>;
63 gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
64 };
65 };
66 };
67
68 &gpio1 {
69 status = "okay";
70 };
71
72 &spi0 {
73 status = "okay";
74
75 m25p80@0 {
76 #address-cells = <1>;
77 #size-cells = <1>;
78 compatible = "jedec,spi-nor";
79 reg = <0>;
80 spi-max-frequency = <25000000>;
81
82 partition@0 {
83 label = "uboot";
84 reg = <0x0 0x30000>;
85 read-only;
86 };
87
88 partition@30000 {
89 label = "uboot-env";
90 reg = <0x30000 0x4000>;
91 read-only;
92 };
93
94 factory: partition@34000 {
95 label = "factory";
96 reg = <0x34000 0x4000>;
97 read-only;
98 };
99
100 partition@38000 {
101 label = "nvram";
102 reg = <0x38000 0x8000>;
103 read-only;
104 };
105
106 partition@40000 {
107 label = "devdata";
108 reg = <0x40000 0x10000>;
109 };
110
111 partition@50000 {
112 label = "firmware";
113 reg = <0x50000 0x7b0000>;
114 };
115 };
116 };
117
118 &pinctrl {
119 state_default: pinctrl0 {
120 gpio {
121 ralink,group = "i2c", "jtag", "uartf";
122 ralink,function = "gpio";
123 };
124 };
125 };
126
127 &ethernet {
128 mtd-mac-address = <&factory 0x4>;
129
130 port@0 {
131 mediatek,fixed-link = <1000 1 1 0>;
132 };
133 };
134
135 &wmac {
136 ralink,5ghz = <0>;
137 ralink,mtd-eeprom = <&factory 0>;
138 };
139
140 &ehci {
141 status = "okay";
142 };
143
144 &ohci {
145 status = "okay";
146 };