ramips: add support for ALFA Network Quad-E4G
[oweals/openwrt.git] / target / linux / ramips / dts / rt5350_hilink_hlk-rm04.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         chosen {
13                 bootargs = "console=ttyS1,57600";
14         };
15
16         gpio-export {
17                 compatible = "gpio-export";
18                 #size-cells = <0>;
19
20                 /* I2C */
21                 gpio1 {
22                         /* I2C_I2C_SD */
23                         gpio-export,name = "hlk-rm04:gpio0";
24                         gpio-export,direction_may_change = <1>;
25                         gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
26                 };
27                 gpio2 {
28                         /* I2C_I2C_SCLK */
29                         gpio-export,name = "hlk-rm04:gpio1";
30                         gpio-export,direction_may_change = <1>;
31                         gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
32                 };
33         };
34
35         keys {
36                 compatible = "gpio-keys-polled";
37                 poll-interval = <20>;
38                 reset {
39                         label = "reset";
40                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
41                         linux,code = <KEY_RESTART>;
42                 };
43                 wps {
44                         label = "wps";
45                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
46                         linux,code = <KEY_WPS_BUTTON>;
47                 };
48         };
49 };
50
51 &uart {
52         status = "okay";
53 };
54
55 &spi0 {
56         status = "okay";
57
58         m25p80@0 {
59                 compatible = "jedec,spi-nor";
60                 reg = <0>;
61                 spi-max-frequency = <10000000>;
62
63                 partitions {
64                         compatible = "fixed-partitions";
65                         #address-cells = <1>;
66                         #size-cells = <1>;
67
68                         partition@0 {
69                                 label = "u-boot";
70                                 reg = <0x0 0x30000>;
71                                 read-only;
72                         };
73
74                         partition@30000 {
75                                 label = "u-boot-env";
76                                 reg = <0x30000 0x10000>;
77                                 read-only;
78                         };
79
80                         factory: partition@40000 {
81                                 label = "factory";
82                                 reg = <0x40000 0x10000>;
83                                 read-only;
84                         };
85
86                         partition@50000 {
87                                 compatible = "denx,uimage";
88                                 label = "firmware";
89                                 reg = <0x50000 0x3b0000>;
90                         };
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 };