ramips: fix size-cells on spi nodes
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / HLKRM04.dts
1 /dts-v1/;
2
3 #include "rt5350.dtsi"
4
5 / {
6 compatible = "HLKRM04", "ralink,rt5350-soc";
7 model = "HILINK HLK-RM04";
8
9 memory@0 {
10 device_type = "memory";
11 reg = <0x0 0x1000000>;
12 };
13
14 chosen {
15 bootargs = "console=ttyS1,57600";
16 };
17
18 gpio-export {
19 compatible = "gpio-export";
20 #size-cells = <0>;
21
22 /* I2C */
23 gpio1 {
24 /* I2C_I2C_SD */
25 gpio-export,name = "hlk-rm04:gpio0";
26 gpio-export,direction_may_change = <1>;
27 gpios = <&gpio0 1 0>;
28 };
29 gpio2 {
30 /* I2C_I2C_SCLK */
31 gpio-export,name = "hlk-rm04:gpio1";
32 gpio-export,direction_may_change = <1>;
33 gpios = <&gpio0 2 0>;
34 };
35 };
36
37 gpio-keys-polled {
38 compatible = "gpio-keys-polled";
39 #address-cells = <1>;
40 #size-cells = <0>;
41 poll-interval = <20>;
42 reset {
43 label = "reset";
44 gpios = <&gpio0 0 1>;
45 linux,code = <0x198>;
46 };
47 wps {
48 label = "wps";
49 gpios = <&gpio0 14 1>;
50 linux,code = <0x211>;
51 };
52 };
53 };
54
55 &uart {
56 status = "okay";
57 };
58
59 &spi0 {
60 status = "okay";
61
62 m25p80@0 {
63 #address-cells = <1>;
64 #size-cells = <1>;
65 compatible = "jedec,spi-nor";
66 reg = <0>;
67 linux,modalias = "m25p80", "s25fl064k";
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 };