ramips: add support for TP-Link RE200 v1
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620a_hiwifi_hc5x61.dtsi
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7         compatible = "hiwifi,hc5x61", "ralink,mt7620a-soc";
8
9         chosen {
10                 bootargs = "console=ttyS0,115200";
11         };
12
13         keys {
14                 compatible = "gpio-keys";
15
16                 reset {
17                         label = "reset";
18                         gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
19                         linux,code = <KEY_RESTART>;
20                 };
21         };
22
23         gpio_export {
24                 compatible = "gpio-export";
25                 #size-cells = <0>;
26
27                 usbpower {
28                         gpio-export,name = "usbpower";
29                         gpio-export,output = <1>;
30                         gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
31                 };
32         };
33 };
34
35 &sysc {
36         ralink,gpiomux = "i2c", "jtag";
37         ralink,uartmux = "gpio";
38         ralink,wdtmux = <1>;
39 };
40
41 &gpio0 {
42         status = "okay";
43 };
44
45 &gpio2 {
46         status = "okay";
47 };
48
49 &gpio3 {
50         status = "okay";
51 };
52
53 &spi0 {
54         status = "okay";
55
56         m25p80@0 {
57                 compatible = "jedec,spi-nor";
58                 reg = <0>;
59                 spi-max-frequency = <10000000>;
60
61                 partitions {
62                         compatible = "fixed-partitions";
63                         #address-cells = <1>;
64                         #size-cells = <1>;
65
66                         partition@0 {
67                                 label = "u-boot";
68                                 reg = <0x0 0x30000>;
69                                 read-only;
70                         };
71
72                         partition@30000 {
73                                 label = "u-boot-env";
74                                 reg = <0x30000 0x10000>;
75                                 read-only;
76                         };
77
78                         factory: partition@40000 {
79                                 label = "factory";
80                                 reg = <0x40000 0x10000>;
81                                 read-only;
82                         };
83
84                         partition@50000 {
85                                 compatible = "denx,uimage";
86                                 label = "firmware";
87                                 reg = <0x50000 0xf80000>;
88                         };
89
90                         partition@fd0000 {
91                                 label = "hwf_config";
92                                 reg = <0xfd0000 0x10000>;
93                                 read-only;
94                         };
95
96                         bdinfo: partition@fe0000 {
97                                 label = "bdinfo";
98                                 reg = <0xfe0000 0x10000>;
99                                 read-only;
100                         };
101
102                         partition@ff0000 {
103                                 label = "backup";
104                                 reg = <0xff0000 0x10000>;
105                                 read-only;
106                         };
107                 };
108         };
109 };
110
111 &ethernet {
112         pinctrl-names = "default";
113         pinctrl-0 = <&ephy_pins>;
114         mtd-mac-address = <&factory 0x4>;
115         mediatek,portmap = "wllll";
116 };
117
118 &sdhci {
119         status = "okay";
120 };
121
122 &wmac {
123         ralink,mtd-eeprom = <&factory 0>;
124         pinctrl-names = "default";
125         pinctrl-0 = <&pa_pins>;
126 };
127
128 &state_default {
129         gpio {
130                 ralink,group = "uartf", "wled";
131                 ralink,function = "gpio";
132         };
133 };