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