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