ramips: Use dts alias based status led
[openwrt/openwrt.git] / target / linux / ramips / dts / AWAPN2403.dts
1 /dts-v1/;
2
3 #include "rt3050.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "asiarf,awapn2403", "ralink,rt3052-soc";
10 model = "AsiaRF AWAPN2403";
11
12 aliases {
13 led-status = &led_wps;
14 };
15
16
17 gpio-leds {
18 compatible = "gpio-leds";
19
20 led_wps: wps {
21 label = "awapn2403:green:wps";
22 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
23 };
24 };
25
26 gpio-keys-polled {
27 compatible = "gpio-keys-polled";
28 #address-cells = <1>;
29 #size-cells = <0>;
30 poll-interval = <20>;
31
32 reset {
33 label = "reset";
34 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_RESTART>;
36 };
37 };
38 };
39
40 &spi0 {
41 status = "okay";
42
43 m25p80@0 {
44 #address-cells = <1>;
45 #size-cells = <1>;
46 compatible = "jedec,spi-nor";
47 reg = <0>;
48 spi-max-frequency = <10000000>;
49
50 partition@0 {
51 label = "u-boot";
52 reg = <0x0 0x30000>;
53 read-only;
54 };
55
56 partition@30000 {
57 label = "u-boot-env";
58 reg = <0x30000 0x10000>;
59 read-only;
60 };
61
62 factory: partition@40000 {
63 label = "factory";
64 reg = <0x40000 0x10000>;
65 read-only;
66 };
67
68 partition@50000 {
69 label = "firmware";
70 reg = <0x50000 0x3b0000>;
71 };
72 };
73 };
74
75 &pinctrl {
76 state_default: pinctrl0 {
77 gpio {
78 ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
79 ralink,function = "gpio";
80 };
81 };
82 };
83
84 &esw {
85 mediatek,portmap = <0x3e>;
86 };
87
88 &wmac {
89 ralink,mtd-eeprom = <&factory 0>;
90 };