ramips: DTS style improvements for mt7621_wevo_w2914ns-v2.dtsi
[oweals/openwrt.git] / target / linux / ramips / dts / rt3050_asus_wl-330n3g.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 = "asus,wl-330n3g", "ralink,rt3050-soc";
10         model = "Asus WL-330N3G";
11
12         aliases {
13                 led-boot = &led_power;
14                 led-failsafe = &led_power;
15                 led-running = &led_power;
16                 led-upgrade = &led_power;
17         };
18
19         leds {
20                 compatible = "gpio-leds";
21
22                 3g {
23                         label = "wl-330n3g:blue:3g";
24                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
25                 };
26
27                 3g2 {
28                         label = "wl-330n3g:red:3g";
29                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
30                 };
31
32                 led_power: power {
33                         label = "wl-330n3g:blue:power";
34                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
35                 };
36         };
37
38         keys {
39                 compatible = "gpio-keys-polled";
40                 poll-interval = <20>;
41
42                 reset {
43                         label = "reset";
44                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
45                         linux,code = <KEY_RESTART>;
46                 };
47
48                 wps {
49                         label = "wps";
50                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
51                         linux,code = <KEY_WPS_BUTTON>;
52                 };
53         };
54 };
55
56 &spi0 {
57         status = "okay";
58
59         m25p80@0 {
60                 compatible = "jedec,spi-nor";
61                 reg = <0>;
62                 spi-max-frequency = <10000000>;
63
64                 partitions {
65                         compatible = "fixed-partitions";
66                         #address-cells = <1>;
67                         #size-cells = <1>;
68
69                         partition@0 {
70                                 label = "u-boot";
71                                 reg = <0x0 0x30000>;
72                                 read-only;
73                         };
74
75                         partition@30000 {
76                                 label = "u-boot-env";
77                                 reg = <0x30000 0x10000>;
78                                 read-only;
79                         };
80
81                         factory: partition@40000 {
82                                 label = "factory";
83                                 reg = <0x40000 0x10000>;
84                                 read-only;
85                         };
86
87                         partition@50000 {
88                                 compatible = "denx,uimage";
89                                 label = "firmware";
90                                 reg = <0x50000 0x3b0000>;
91                         };
92                 };
93         };
94 };
95
96 &pinctrl {
97         state_default: pinctrl0 {
98                 gpio {
99                         ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
100                         ralink,function = "gpio";
101                 };
102         };
103 };
104
105 &ethernet {
106         mtd-mac-address = <&factory 0x4>;
107 };
108
109 &esw {
110         mediatek,portmap = <0x3e>;
111 };
112
113 &wmac {
114         ralink,mtd-eeprom = <&factory 0>;
115 };
116
117 &otg {
118         status = "okay";
119 };