ramips: dts: Unify naming of gpio-keys nodes
[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-boot = &led_status;
14 led-failsafe = &led_status;
15 led-running = &led_status;
16 led-upgrade = &led_status;
17 };
18
19 gpio-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 &pinctrl {
114 state_default: pinctrl0 {
115 gpio {
116 ralink,group = "i2c", "jtag", "uartf";
117 ralink,function = "gpio";
118 };
119 };
120 };
121
122 &ethernet {
123 mtd-mac-address = <&factory 0x4>;
124 };
125
126 &esw {
127 mediatek,portmap = <0x2f>;
128 mediatek,led_polarity = <0x17>;
129 };
130
131 &wmac {
132 ralink,mtd-eeprom = <&factory 0>;
133 };
134
135 &ehci {
136 status = "okay";
137 };
138
139 &ohci {
140 status = "okay";
141 };