c1eb2a8d1eccbaded11b07e5f590393f3e628b29
[oweals/openwrt.git] / target / linux / ramips / dts / rt5350_dlink_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-boot = &led_status;
14                 led-failsafe = &led_status;
15                 led-running = &led_status;
16                 led-upgrade = &led_status;
17         };
18
19         leds {
20                 compatible = "gpio-leds";
21
22                 led_status: status {
23                         label = "dir-320-b1:green:status";
24                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
25                 };
26
27                 usb {
28                         label = "dir-320-b1:green:usb";
29                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
30                 };
31
32                 wps {
33                         label = "dir-320-b1:green:wps";
34                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
35                 };
36         };
37
38         keys {
39                 compatible = "gpio-keys-polled";
40                 poll-interval = <20>;
41
42                 reset {
43                         label = "reset";
44                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
45                         linux,code = <KEY_RESTART>;
46                 };
47
48                 wps {
49                         label = "wps";
50                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
51                         linux,code = <KEY_WPS_BUTTON>;
52                 };
53         };
54
55         gpio_export {
56                 compatible = "gpio-export";
57                 #size-cells = <0>;
58
59                 usb {
60                         gpio-export,name = "usb";
61                         gpio-export,output = <1>;
62                         gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
63                 };
64
65                 root_hub {
66                         gpio-export,name = "root_hub";
67                         gpio-export,output = <1>;
68                         gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
69                 };
70         };
71 };
72
73 &spi0 {
74         status = "okay";
75
76         m25p80@0 {
77                 compatible = "jedec,spi-nor";
78                 reg = <0>;
79                 spi-max-frequency = <10000000>;
80
81                 partitions {
82                         compatible = "fixed-partitions";
83                         #address-cells = <1>;
84                         #size-cells = <1>;
85
86                         partition@0 {
87                                 label = "u-boot";
88                                 reg = <0x0 0x30000>;
89                                 read-only;
90                         };
91
92                         partition@30000 {
93                                 label = "u-boot-env";
94                                 reg = <0x30000 0x10000>;
95                                 read-only;
96                         };
97
98                         factory: partition@40000 {
99                                 label = "factory";
100                                 reg = <0x40000 0x10000>;
101                                 read-only;
102                         };
103
104                         partition@50000 {
105                                 compatible = "denx,uimage";
106                                 label = "firmware";
107                                 reg = <0x50000 0x7b0000>;
108                         };
109                 };
110         };
111 };
112
113 &state_default {
114         gpio {
115                 ralink,group = "i2c", "jtag", "uartf";
116                 ralink,function = "gpio";
117         };
118 };
119
120 &ethernet {
121         mtd-mac-address = <&factory 0x4>;
122 };
123
124 &esw {
125         mediatek,portmap = <0x2f>;
126         mediatek,led_polarity = <0x17>;
127 };
128
129 &wmac {
130         ralink,mtd-eeprom = <&factory 0>;
131 };
132
133 &ehci {
134         status = "okay";
135 };
136
137 &ohci {
138         status = "okay";
139 };