ramips: move partitions into partition table node
[openwrt/openwrt.git] / target / linux / ramips / dts / WR1200JS.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 = "youhua,wr1200js", "mediatek,mt7621-soc";
10 model = "YouHua WR1200JS";
11
12 aliases {
13 led-status = &led_wps;
14 };
15
16 memory@0 {
17 device_type = "memory";
18 reg = <0x0 0x8000000>;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200";
23 };
24
25 gpio-leds {
26 compatible = "gpio-leds";
27
28 internet {
29 label = "wr1200js:blue:internet";
30 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
31 };
32
33 led_wps: wps {
34 label = "wr1200js:blue:wps";
35 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
36 };
37
38 usb {
39 label = "wr1200js:blue:usb";
40 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 gpio-keys-polled {
45 compatible = "gpio-keys-polled";
46 poll-interval = <20>;
47
48 reset {
49 label = "reset";
50 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_RESTART>;
52 };
53
54 wps {
55 label = "wps";
56 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
57 linux,code = <KEY_WPS_BUTTON>;
58 };
59
60 wifi {
61 label = "wifi";
62 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
63 linux,code = <KEY_RFKILL>;
64 };
65 };
66 };
67
68 &spi0 {
69 status = "okay";
70
71 m25p80@0 {
72 compatible = "jedec,spi-nor";
73 reg = <0>;
74 spi-max-frequency = <10000000>;
75 m25p,chunked-io = <32>;
76
77 partitions {
78 compatible = "fixed-partitions";
79 #address-cells = <1>;
80 #size-cells = <1>;
81
82 partition@0 {
83 label = "u-boot";
84 reg = <0x0 0x30000>;
85 read-only;
86 };
87
88 partition@30000 {
89 label = "u-boot-env";
90 reg = <0x30000 0x10000>;
91 read-only;
92 };
93
94 factory: partition@40000 {
95 label = "factory";
96 reg = <0x40000 0x10000>;
97 read-only;
98 };
99
100 partition@50000 {
101 label = "firmware";
102 reg = <0x50000 0xfb0000>;
103 };
104 };
105 };
106 };
107
108 &pcie {
109 status = "okay";
110 };
111
112 &pcie0 {
113 mt76@0,0 {
114 reg = <0x0000 0 0 0 0>;
115 mediatek,mtd-eeprom = <&factory 0x0000>;
116 };
117 };
118
119 &pcie1 {
120 mt76@0,0 {
121 reg = <0x0000 0 0 0 0>;
122 mediatek,mtd-eeprom = <&factory 0x8000>;
123 ieee80211-freq-limit = <5000000 6000000>;
124
125 led {
126 led-sources = <2>;
127 led-active-low;
128 };
129 };
130 };
131
132 &ethernet {
133 mtd-mac-address = <&factory 0xe000>;
134 };
135
136 &pinctrl {
137 state_default: pinctrl0 {
138 gpio {
139 ralink,group = "i2c", "uart2", "uart3", "wdt";
140 ralink,function = "gpio";
141 };
142 };
143 };