ramips: move partitions into partition table node
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / WRH-300CR.dts
1 /dts-v1/;
2
3 #include "mt7620n.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "elecom,wrh-300cr", "ralink,mt7620n-soc";
10 model = "ELECOM WRH-300CR";
11
12 aliases {
13 led-status = &led_wps;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 led_wps: wps {
20 label = "wrh-300cr:green:wps";
21 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
22 };
23
24 ethernet {
25 label = "wrh-300cr:green:ethernet";
26 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
27 };
28
29 wlan {
30 label = "wrh-300cr:green:wlan";
31 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
32 };
33 };
34
35 gpio-keys-polled {
36 compatible = "gpio-keys-polled";
37 poll-interval = <20>;
38
39 reset {
40 label = "reset";
41 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_RESTART>;
43 };
44
45 wps {
46 label = "wps";
47 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_WPS_BUTTON>;
49 };
50 };
51 };
52
53 &gpio1 {
54 status = "okay";
55 };
56
57 &gpio2 {
58 status = "okay";
59 };
60
61 &gpio3 {
62 status = "okay";
63 };
64
65 &spi0 {
66 status = "okay";
67
68 m25p80@0 {
69 compatible = "jedec,spi-nor";
70 reg = <0>;
71 spi-max-frequency = <10000000>;
72
73 partitions {
74 compatible = "fixed-partitions";
75 #address-cells = <1>;
76 #size-cells = <1>;
77
78 partition@0 {
79 label = "u-boot";
80 reg = <0x0 0x30000>;
81 read-only;
82 };
83
84 partition@30000 {
85 label = "u-boot-env";
86 reg = <0x30000 0x10000>;
87 };
88
89 factory: partition@40000 {
90 label = "factory";
91 reg = <0x40000 0x10000>;
92 read-only;
93 };
94
95 partition@50000 {
96 label = "recover";
97 reg = <0x50000 0x1c0000>;
98 read-only;
99 };
100
101 partition@210000 {
102 label = "firmware";
103 reg = <0x210000 0xdf0000>;
104 };
105 };
106 };
107 };
108
109 &ehci {
110 status = "okay";
111 };
112
113 &ohci {
114 status = "okay";
115 };
116
117 &ethernet {
118 mtd-mac-address = <&factory 0x2e>;
119 mediatek,portmap = "llllw";
120 };
121
122 &wmac {
123 ralink,mtd-eeprom = <&factory 0>;
124 };
125
126 &pinctrl {
127 state_default: pinctrl0 {
128 default {
129 ralink,group = "i2c", "ephy", "wled";
130 ralink,function = "gpio";
131 };
132 };
133 };