ramips: move partitions into partition table node
[openwrt/staging/wigyori.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 compatible = "jedec,spi-nor";
65 reg = <0>;
66 spi-max-frequency = <10000000>;
67
68 partitions {
69 compatible = "fixed-partitions";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 partition@0 {
74 label = "u-boot";
75 reg = <0x0 0x30000>;
76 read-only;
77 };
78
79 partition@30000 {
80 label = "u-boot-env";
81 reg = <0x30000 0x10000>;
82 read-only;
83 };
84
85 factory: partition@40000 {
86 label = "factory";
87 reg = <0x40000 0x10000>;
88 read-only;
89 };
90
91 partition@50000 {
92 label = "firmware";
93 reg = <0x50000 0x3b0000>;
94 };
95 };
96 };
97 };
98
99 &pinctrl {
100 state_default: pinctrl0 {
101 gpio {
102 ralink,group = "i2c", "jtag";
103 ralink,function = "gpio";
104 };
105
106 uartf_gpio {
107 ralink,group = "uartf";
108 ralink,function = "gpio uartf";
109 };
110 };
111 };
112
113 &ethernet {
114 mtd-mac-address = <&factory 0x4>;
115 };
116
117 &wmac {
118 ralink,mtd-eeprom = <&factory 0>;
119 };
120
121 &ehci {
122 status = "okay";
123 };
124
125 &ohci {
126 status = "okay";
127 };