ramips: add support for XiaoYu XY-C5
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_hiwifi_hc5962.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 = "hiwifi,hc5962", "mediatek,mt7621-soc";
10         model = "HiWiFi HC5962";
11
12         aliases {
13                 led-boot = &led_status;
14                 led-failsafe = &led_status;
15                 led-running = &led_status;
16                 led-upgrade = &led_status;
17         };
18
19         chosen {
20                 bootargs = "console=ttyS0,115200";
21         };
22
23         leds {
24                 compatible = "gpio-leds";
25
26                 led_status: status {
27                         label = "hc5962:white:status";
28                         gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
29                 };
30
31                 system {
32                         label = "hc5962:red:system";
33                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
34                 };
35         };
36
37         keys {
38                 compatible = "gpio-keys-polled";
39                 poll-interval = <20>;
40
41                 reset {
42                         label = "reset";
43                         gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
44                         linux,code = <KEY_RESTART>;
45                 };
46         };
47 };
48
49 &nand {
50         status = "okay";
51
52         partitions {
53                 compatible = "fixed-partitions";
54                 #address-cells = <1>;
55                 #size-cells = <1>;
56
57                 partition@0 {
58                         label = "u-boot";
59                         reg = <0x0 0x80000>;
60                         read-only;
61                 };
62
63                 partition@80000 {
64                         label = "debug";
65                         reg = <0x80000 0x80000>;
66                         read-only;
67                 };
68
69                 factory: partition@100000 {
70                         label = "factory";
71                         reg = <0x100000 0x40000>;
72                         read-only;
73                 };
74
75                 partition@140000 {
76                         label = "kernel";
77                         reg = <0x140000 0x200000>;
78                 };
79
80                 partition@340000 {
81                         label = "ubi";
82                         reg = <0x340000 0x1E00000>;
83                 };
84
85                 partition@2140000 {
86                         label = "hw_panic";
87                         reg = <0x2140000 0x80000>;
88                         read-only;
89                 };
90
91                 partition@21c0000 {
92                         label = "bdinfo";
93                         reg = <0x21c0000 0x80000>;
94                         read-only;
95                 };
96
97                 partition@2240000 {
98                         label = "backup";
99                         reg = <0x2240000 0x80000>;
100                         read-only;
101                 };
102
103                 partition@22c0000 {
104                         label = "overly";
105                         reg = <0x22c0000 0x1000000>;
106                 };
107
108                 partition@32c0000 {
109                         label = "firmware_backup";
110                         reg = <0x32c0000 0x2000000>;
111                 };
112
113                 partition@52c0000 {
114                         label = "oem";
115                         reg = <0x52c0000 0x200000>;
116                 };
117
118                 partition@54c0000 {
119                         label = "opt";
120                         reg = <0x54c0000 0x2ac0000>;
121                 };
122         };
123 };
124
125 &pcie {
126         status = "okay";
127 };
128
129 &pcie0 {
130         mt76@0,0 {
131                 reg = <0x0000 0 0 0 0>;
132                 mediatek,mtd-eeprom = <&factory 0x0000>;
133                 ieee80211-freq-limit = <2400000 2500000>;
134         };
135 };
136
137 &pcie1 {
138         mt76@0,0 {
139                 reg = <0x0000 0 0 0 0>;
140                 mediatek,mtd-eeprom = <&factory 0x8000>;
141                 ieee80211-freq-limit = <5000000 6000000>;
142         };
143 };
144
145 &pinctrl {
146         state_default: pinctrl0 {
147                 gpio {
148                         ralink,group = "uart3", "jtag";
149                         ralink,function = "gpio";
150                 };
151         };
152 };