ramips: DTS style improvements for mt7621_wevo_w2914ns-v2.dtsi
[oweals/openwrt.git] / target / linux / ramips / dts / rt3052_asiarf_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-boot = &led_wps;
14                 led-failsafe = &led_wps;
15                 led-running = &led_wps;
16                 led-upgrade = &led_wps;
17         };
18
19         leds {
20                 compatible = "gpio-leds";
21
22                 led_wps: wps {
23                         label = "awapn2403:green:wps";
24                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
25                 };
26         };
27
28         keys {
29                 compatible = "gpio-keys-polled";
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                 compatible = "jedec,spi-nor";
45                 reg = <0>;
46                 spi-max-frequency = <10000000>;
47
48                 partitions {
49                         compatible = "fixed-partitions";
50                         #address-cells = <1>;
51                         #size-cells = <1>;
52
53                         partition@0 {
54                                 label = "u-boot";
55                                 reg = <0x0 0x30000>;
56                                 read-only;
57                         };
58
59                         partition@30000 {
60                                 label = "u-boot-env";
61                                 reg = <0x30000 0x10000>;
62                                 read-only;
63                         };
64
65                         factory: partition@40000 {
66                                 label = "factory";
67                                 reg = <0x40000 0x10000>;
68                                 read-only;
69                         };
70
71                         partition@50000 {
72                                 compatible = "denx,uimage";
73                                 label = "firmware";
74                                 reg = <0x50000 0x3b0000>;
75                         };
76                 };
77         };
78 };
79
80 &pinctrl {
81         state_default: pinctrl0 {
82                 gpio {
83                         ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
84                         ralink,function = "gpio";
85                 };
86         };
87 };
88
89 &esw {
90         mediatek,portmap = <0x3e>;
91 };
92
93 &wmac {
94         ralink,mtd-eeprom = <&factory 0>;
95 };