ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3050_asus_wl-330n.dts
1 #include "rt3050.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 compatible = "asus,wl-330n", "ralink,rt3050-soc";
9 model = "Asus WL-330N";
10
11 aliases {
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 link {
22 label = "blue:link";
23 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
24 };
25
26 led_power: power {
27 function = LED_FUNCTION_POWER;
28 color = <LED_COLOR_ID_BLUE>;
29 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
30 };
31 };
32
33 keys {
34 compatible = "gpio-keys-polled";
35 poll-interval = <20>;
36
37 reset {
38 label = "reset";
39 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_RESTART>;
41 };
42
43 wps {
44 label = "wps";
45 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_WPS_BUTTON>;
47 };
48 };
49 };
50
51 &spi0 {
52 status = "okay";
53
54 flash@0 {
55 compatible = "jedec,spi-nor";
56 reg = <0>;
57 spi-max-frequency = <10000000>;
58
59 partitions {
60 compatible = "fixed-partitions";
61 #address-cells = <1>;
62 #size-cells = <1>;
63
64 partition@0 {
65 label = "u-boot";
66 reg = <0x0 0x30000>;
67 read-only;
68 };
69
70 partition@30000 {
71 label = "u-boot-env";
72 reg = <0x30000 0x10000>;
73 read-only;
74 };
75
76 factory: partition@40000 {
77 label = "factory";
78 reg = <0x40000 0x10000>;
79 read-only;
80
81 nvmem-layout {
82 compatible = "fixed-layout";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 eeprom_factory_0: eeprom@0 {
87 reg = <0x0 0x200>;
88 };
89
90 macaddr_factory_4: macaddr@4 {
91 reg = <0x4 0x6>;
92 };
93 };
94 };
95
96 partition@50000 {
97 compatible = "denx,uimage";
98 label = "firmware";
99 reg = <0x50000 0x3b0000>;
100 };
101 };
102 };
103 };
104
105 &state_default {
106 gpio {
107 groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
108 function = "gpio";
109 };
110 };
111
112 &ethernet {
113 nvmem-cells = <&macaddr_factory_4>;
114 nvmem-cell-names = "mac-address";
115 };
116
117 &esw {
118 mediatek,portmap = <0x3e>;
119 };
120
121 &wmac {
122 nvmem-cells = <&eeprom_factory_0>;
123 nvmem-cell-names = "eeprom";
124 };