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