ramips: Use dts alias based status led
[openwrt/openwrt.git] / target / linux / ramips / dts / HC5661A.dts
1 /dts-v1/;
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "hiwifi,hc5661a", "mediatek,mt7628an-soc";
10 model = "HiWiFi HC5661A";
11
12 aliases {
13 led-status = &led_system;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,115200";
18 };
19
20 memory@0 {
21 device_type = "memory";
22 reg = <0x0 0x8000000>;
23 };
24
25 gpio-leds {
26 compatible = "gpio-leds";
27
28 led_system: system {
29 label = "hc5661a:blue:system";
30 gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
31 };
32 internet {
33 label = "hc5661a:blue:internet";
34 gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
35 };
36 wlan2g {
37 label = "hc5661a:blue:wlan2g";
38 gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
39 };
40 };
41
42 gpio-keys {
43 compatible = "gpio-keys-polled";
44 #address-cells = <1>;
45 #size-cells = <0>;
46 poll-interval = <20>;
47
48 reset {
49 label = "reset";
50 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_RESTART>;
52 };
53 };
54 };
55
56 &pinctrl {
57 state_default: pinctrl0 {
58 gpio {
59 ralink,group = "i2c", "refclk", "wled_an";
60 ralink,function = "gpio";
61 };
62 };
63 };
64
65 &spi0 {
66 status = "okay";
67
68 m25p80@0 {
69 #address-cells = <1>;
70 #size-cells = <1>;
71 compatible = "jedec,spi-nor";
72 reg = <0>;
73 linux,modalias = "m25p80", "w25q128";
74 spi-max-frequency = <10000000>;
75 m25p,chunked-io = <32>;
76
77 partition@0 {
78 label = "u-boot";
79 reg = <0x0 0x30000>;
80 read-only;
81 };
82
83 partition@30000 {
84 label = "hw_panic";
85 reg = <0x30000 0x10000>;
86 read-only;
87 };
88
89 factory: partition@40000 {
90 label = "factory";
91 reg = <0x40000 0x10000>;
92 read-only;
93 };
94
95 partition@50000 {
96 label = "firmware";
97 reg = <0x50000 0xf70000>;
98 };
99
100 partition@fc0000 {
101 label = "oem";
102 reg = <0xfc0000 0x20000>;
103 read-only;
104 };
105
106 bdinfo: partition@fe0000 {
107 label = "bdinfo";
108 reg = <0xfe0000 0x10000>;
109 read-only;
110 };
111
112 partition@ff0000 {
113 label = "backup";
114 reg = <0xff0000 0x10000>;
115 read-only;
116 };
117 };
118 };
119
120 &ethernet {
121 mtd-mac-address = <&factory 0x4>;
122 mediatek,portmap = "wllll";
123 };
124
125 &wmac {
126 status = "okay";
127 };