ramips: move partitions into partition table node
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / WN-GX300GR.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "iodata,wn-gx300gr", "mediatek,mt7621-soc";
10 model = "I-O DATA WN-GX300GR";
11
12 aliases {
13 led-status = &led_power;
14 };
15
16 memory@0 {
17 device_type = "memory";
18 reg = <0x0 0x4000000>;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200";
23 };
24
25 gpio-leds {
26 compatible = "gpio-leds";
27
28 led_power: power {
29 label = "wn-gx300gr:green:power";
30 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
31 };
32
33 wps {
34 label = "wn-gx300gr:green:wps";
35 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
36 };
37 };
38
39 gpio-keys-polled {
40 compatible = "gpio-keys-polled";
41 poll-interval = <20>;
42
43 reset {
44 label = "reset";
45 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_RESTART>;
47 };
48
49 wps {
50 label = "wps";
51 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
52 linux,code = <KEY_WPS_BUTTON>;
53 };
54
55 auto {
56 label = "auto";
57 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
58 linux,code = <BTN_0>;
59 linux,input-type = <EV_SW>;
60 };
61
62 custom {
63 label = "custom";
64 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
65 linux,code = <BTN_0>;
66 linux,input-type = <EV_SW>;
67 };
68 };
69 };
70
71 &spi0 {
72 status = "okay";
73
74 m25p80@0 {
75 compatible = "jedec,spi-nor";
76 reg = <0>;
77 spi-max-frequency = <10000000>;
78 m25p,chunked-io = <32>;
79
80 partitions {
81 compatible = "fixed-partitions";
82 #address-cells = <1>;
83 #size-cells = <1>;
84
85 partition@0 {
86 label = "Bootloader";
87 reg = <0x0 0x30000>;
88 read-only;
89 };
90
91 partition@30000 {
92 label = "Config";
93 reg = <0x30000 0x10000>;
94 read-only;
95 };
96
97 Factory: partition@40000 {
98 label = "Factory";
99 reg = <0x40000 0x10000>;
100 read-only;
101 };
102
103 partition@50000 {
104 label = "iNIC_rf";
105 reg = <0x50000 0x10000>;
106 read-only;
107 };
108
109 partition@60000 {
110 label = "firmware";
111 reg = <0x60000 0x770000>;
112 };
113
114 partition@7d0000 {
115 label = "Key";
116 reg = <0x7d0000 0x10000>;
117 read-only;
118 };
119
120 partition@7e0000 {
121 label = "backup";
122 reg = <0x7e0000 0x10000>;
123 read-only;
124 };
125
126 partition@7f0000 {
127 label = "storage";
128 reg = <0x7f0000 0x10000>;
129 read-only;
130 };
131 };
132 };
133 };
134
135 &ethernet {
136 mtd-mac-address = <&Factory 0x4>;
137 };
138
139 &pinctrl {
140 state_default: pinctrl0 {
141 gpio {
142 ralink,group = "uart2", "uart3", "jtag";
143 ralink,function = "gpio";
144 };
145 };
146 };
147
148 &pcie {
149 status = "okay";
150 };
151
152 &pcie0 {
153 mt76@0,0 {
154 reg = <0x0000 0 0 0 0>;
155 mediatek,mtd-eeprom = <&Factory 0x0>;
156 };
157 };
158
159 &xhci {
160 status = "disabled";
161 };