ramips: move partitions into partition table node
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / ArcherC20i.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "tplink,c20i", "ralink,mt7620a-soc";
10 model = "TP-Link Archer C20i";
11
12 chosen {
13 bootargs = "console=ttyS0,115200";
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18 lan {
19 label = "c20i:blue:lan";
20 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
21 };
22 usb {
23 label = "c20i:blue:usb";
24 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
25 };
26 wps {
27 label = "c20i:blue:wps";
28 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
29 };
30 wan {
31 label = "c20i:blue:wan";
32 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
33 };
34 wlan {
35 label = "c20i:blue:wlan";
36 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
37 };
38 };
39
40 gpio-keys {
41 compatible = "gpio-keys";
42
43 rfkill {
44 label = "rfkill";
45 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_RFKILL>;
47 };
48 reset_wps {
49 label = "reset_wps";
50 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_RESTART>;
52 };
53 };
54 };
55
56 &gpio1 {
57 status = "okay";
58 };
59
60 &gpio2 {
61 status = "okay";
62 };
63
64 &gpio3 {
65 status = "okay";
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
76 partitions {
77 compatible = "fixed-partitions";
78 #address-cells = <1>;
79 #size-cells = <1>;
80
81 partition@0 {
82 label = "u-boot";
83 reg = <0x0 0x20000>;
84 read-only;
85 };
86
87 partition@20000 {
88 label = "firmware";
89 reg = <0x20000 0x7a0000>;
90 };
91
92 partition@7c0000 {
93 label = "config";
94 reg = <0x7c0000 0x10000>;
95 };
96
97 rom: partition@7d0000 {
98 label = "rom";
99 reg = <0x7d0000 0x10000>;
100 };
101
102 partition@7e0000 {
103 label = "romfile";
104 reg = <0x7e0000 0x10000>;
105 };
106
107 radio: partition@7f0000 {
108 label = "radio";
109 reg = <0x7f0000 0x10000>;
110 };
111 };
112 };
113 };
114
115 &pinctrl {
116 state_default: pinctrl0 {
117 gpio {
118 ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd", "ephy", "spi refclk";
119 ralink,function = "gpio";
120 };
121 };
122 };
123
124 &ethernet {
125 pinctrl-names = "default";
126 mtd-mac-address = <&rom 0xf100>;
127 mediatek,portmap = "wllll";
128 };
129
130 &ehci {
131 status = "okay";
132 };
133
134 &ohci {
135 status = "okay";
136 };
137
138 &gsw {
139 mediatek,port4 = "ephy";
140 };
141
142 &wmac {
143 ralink,mtd-eeprom = <&radio 0>;
144 };
145
146 &pcie {
147 status = "okay";
148 };
149
150 &pcie0 {
151 mt76@0,0 {
152 reg = <0x0000 0 0 0 0>;
153 mediatek,mtd-eeprom = <&radio 32768>;
154 };
155 };