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