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