ramips: Use dts alias based status led
[openwrt/openwrt.git] / target / linux / ramips / dts / ZBT-WE1226.dts
1 /dts-v1/;
2 #include <dt-bindings/input/input.h>
3 #include <dt-bindings/gpio/gpio.h>
4
5 #include "mt7628an.dtsi"
6
7 / {
8 compatible = "zbtlink,zbt-we1226", "mediatek,mt7628an-soc";
9 model = "Zbtlink ZBT-WE1226";
10
11 aliases {
12 led-status = &led_wlan;
13 };
14
15 chosen {
16 bootargs = "console=ttyS0,115200";
17 };
18
19 memory@0 {
20 device_type = "memory";
21 reg = <0x0 0x4000000>;
22 };
23
24 gpio-keys-polled {
25 compatible = "gpio-keys-polled";
26 #address-cells = <1>;
27 #size-cells = <0>;
28 poll-interval = <20>;
29
30 reset {
31 label = "reset";
32 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
33 linux,code = <KEY_RESTART>;
34 };
35 };
36
37 gpio-leds {
38 compatible = "gpio-leds";
39
40 wan {
41 label = "zbt-we1226:green:wan";
42 gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
43 };
44
45 lan1 {
46 label = "zbt-we1226:green:lan1";
47 gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
48 };
49
50 lan2 {
51 label = "zbt-we1226:green:lan2";
52 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
53 };
54
55 led_wlan: wlan {
56 label = "zbt-we1226:green:wlan";
57 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
58 };
59 };
60 };
61
62 &pinctrl {
63 state_default: pinctrl0 {
64 gpio {
65 ralink,group = "p0led_an", "p1led_an", "p4led_an", "wdt", "wled_an";
66 ralink,function = "gpio";
67 };
68 };
69 };
70
71 &spi0 {
72 status = "okay";
73
74 m25p80@0 {
75 #address-cells = <1>;
76 #size-cells = <1>;
77 compatible = "jedec,spi-nor";
78 reg = <0>;
79 spi-max-frequency = <10000000>;
80 m25p,chunked-io = <32>;
81
82 partition@0 {
83 label = "u-boot";
84 reg = <0x0 0x30000>;
85 read-only;
86 };
87
88 partition@30000 {
89 label = "u-boot-env";
90 reg = <0x30000 0x10000>;
91 read-only;
92 };
93
94 factory: partition@40000 {
95 label = "factory";
96 reg = <0x40000 0x10000>;
97 read-only;
98 };
99
100 partition@50000 {
101 label = "firmware";
102 reg = <0x50000 0x7b0000>;
103 };
104 };
105 };
106
107 &wmac {
108 status = "okay";
109 ralink,mtd-eeprom = <&factory 0x4>;
110 };
111
112 &ethernet {
113 mtd-mac-address = <&factory 0x2e>;
114 mediatek,portmap = "llllw";
115 };