ramips: Use dts alias based status led
[openwrt/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 #address-cells = <1>;
42 #size-cells = <0>;
43 poll-interval = <20>;
44
45 reset {
46 label = "reset";
47 gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
48 linux,code = <KEY_RESTART>;
49 };
50 };
51 };
52
53 &nand {
54 status = "okay";
55
56 partition@0 {
57 label = "u-boot";
58 reg = <0x0 0x80000>;
59 read-only;
60 };
61
62 partition@80000 {
63 label = "debug";
64 reg = <0x80000 0x80000>;
65 read-only;
66 };
67
68 factory: partition@100000 {
69 label = "factory";
70 reg = <0x100000 0x40000>;
71 read-only;
72 };
73
74 partition@140000 {
75 label = "kernel";
76 reg = <0x140000 0x200000>;
77 };
78
79 partition@340000 {
80 label = "ubi";
81 reg = <0x340000 0x1E00000>;
82 };
83
84 partition@2140000 {
85 label = "hw_panic";
86 reg = <0x2140000 0x80000>;
87 read-only;
88 };
89
90 partition@21c0000 {
91 label = "bdinfo";
92 reg = <0x21c0000 0x80000>;
93 read-only;
94 };
95
96 partition@2240000 {
97 label = "backup";
98 reg = <0x2240000 0x80000>;
99 read-only;
100 };
101
102 partition@22c0000 {
103 label = "overly";
104 reg = <0x22c0000 0x1000000>;
105 };
106
107 partition@32c0000 {
108 label = "firmware_backup";
109 reg = <0x32c0000 0x2000000>;
110 };
111
112 partition@52c0000 {
113 label = "oem";
114 reg = <0x52c0000 0x200000>;
115 };
116
117 partition@54c0000 {
118 label = "opt";
119 reg = <0x54c0000 0x2ac0000>;
120 };
121 };
122
123 &pcie {
124 status = "okay";
125
126 pcie0 {
127 mt76@0,0 {
128 reg = <0x0000 0 0 0 0>;
129 device_type = "pci";
130 mediatek,mtd-eeprom = <&factory 0x0000>;
131 ieee80211-freq-limit = <2400000 2500000>;
132 };
133 };
134
135 pcie1 {
136 mt76@1,0 {
137 reg = <0x0000 0 0 0 0>;
138 device_type = "pci";
139 mediatek,mtd-eeprom = <&factory 0x8000>;
140 ieee80211-freq-limit = <5000000 6000000>;
141 };
142 };
143 };
144
145 &pinctrl {
146 state_default: pinctrl0 {
147 gpio {
148 ralink,group = "uart3", "jtag";
149 ralink,function = "gpio";
150 };
151 };
152 };