36c23de08a096de435abe1ec524a3582fe25f0c6
[openwrt/openwrt.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 poll-interval = <20>;
38
39 reset {
40 label = "reset";
41 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_RESTART>;
43 };
44
45 wps {
46 label = "wps";
47 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_WPS_BUTTON>;
49 };
50 };
51
52 gpio_export {
53 compatible = "gpio-export";
54 #size-cells = <0>;
55
56 usb {
57 gpio-export,name = "usb";
58 gpio-export,output = <1>;
59 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
60 };
61
62 root_hub {
63 gpio-export,name = "root_hub";
64 gpio-export,output = <1>;
65 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
66 };
67 };
68 };
69
70 &spi0 {
71 status = "okay";
72
73 m25p80@0 {
74 compatible = "jedec,spi-nor";
75 reg = <0>;
76 spi-max-frequency = <10000000>;
77
78 partitions {
79 compatible = "fixed-partitions";
80 #address-cells = <1>;
81 #size-cells = <1>;
82
83 partition@0 {
84 label = "u-boot";
85 reg = <0x0 0x30000>;
86 read-only;
87 };
88
89 partition@30000 {
90 label = "u-boot-env";
91 reg = <0x30000 0x10000>;
92 read-only;
93 };
94
95 factory: partition@40000 {
96 label = "factory";
97 reg = <0x40000 0x10000>;
98 read-only;
99 };
100
101 partition@50000 {
102 label = "firmware";
103 reg = <0x50000 0x7b0000>;
104 };
105 };
106 };
107 };
108
109 &pinctrl {
110 state_default: pinctrl0 {
111 gpio {
112 ralink,group = "i2c", "jtag", "uartf";
113 ralink,function = "gpio";
114 };
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 0>;
129 };
130
131 &ehci {
132 status = "okay";
133 };
134
135 &ohci {
136 status = "okay";
137 };