ramips: Use dts alias based status led
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / DIR-320-B1.dts
1 /dts-v1/;
2
3 #include "rt5350.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "dlink,dir-320-b1", "ralink,rt5350-soc";
10 model = "D-Link DIR-320 B1";
11
12 aliases {
13 led-status = &led_status;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 led_status: status {
20 label = "dir-320-b1:green:status";
21 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
22 };
23
24 usb {
25 label = "dir-320-b1:green:usb";
26 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
27 };
28
29 wps {
30 label = "dir-320-b1:green:wps";
31 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
32 };
33 };
34
35 gpio-keys-polled {
36 compatible = "gpio-keys-polled";
37 #address-cells = <1>;
38 #size-cells = <0>;
39 poll-interval = <20>;
40
41 reset {
42 label = "reset";
43 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RESTART>;
45 };
46
47 wps {
48 label = "wps";
49 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_WPS_BUTTON>;
51 };
52 };
53
54 gpio_export {
55 compatible = "gpio-export";
56 #size-cells = <0>;
57
58 usb {
59 gpio-export,name = "usb";
60 gpio-export,output = <1>;
61 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
62 };
63
64 root_hub {
65 gpio-export,name = "root_hub";
66 gpio-export,output = <1>;
67 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
68 };
69 };
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 = <10000000>;
81
82 partition@0 {
83 label = "u-boot";
84 reg = <0x0 0x30000>;
85 read-only;
86 };
87
88 partition@30000 {
89 label = "u-boot-env";
90 reg = <0x30000 0x10000>;
91 read-only;
92 };
93
94 factory: partition@40000 {
95 label = "factory";
96 reg = <0x40000 0x10000>;
97 read-only;
98 };
99
100 partition@50000 {
101 label = "firmware";
102 reg = <0x50000 0x7b0000>;
103 };
104 };
105 };
106
107 &pinctrl {
108 state_default: pinctrl0 {
109 gpio {
110 ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
111 ralink,function = "gpio";
112 };
113 };
114 };
115
116 &ethernet {
117 mtd-mac-address = <&factory 0x4>;
118 };
119
120 &esw {
121 mediatek,portmap = <0x2f>;
122 mediatek,led_polarity = <0x17>;
123 };
124
125 &wmac {
126 ralink,mtd-eeprom = <&factory 0>;
127 };
128
129 &ehci {
130 status = "okay";
131 };
132
133 &ohci {
134 status = "okay";
135 };