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