ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / rt5350_airlive_air3gii.dts
1 #include "rt5350.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 = "airlive,air3gii", "ralink,rt5350-soc";
9 model = "AirLive Air3GII";
10
11 leds {
12 compatible = "gpio-leds";
13
14 wlan {
15 function = LED_FUNCTION_WLAN;
16 color = <LED_COLOR_ID_GREEN>;
17 gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
18 };
19
20 mobile {
21 label = "green:mobile";
22 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
23 trigger-sources = <&ohci_port1>, <&ehci_port1>;
24 linux,default-trigger = "usbport";
25 };
26 };
27
28 keys {
29 compatible = "gpio-keys-polled";
30 poll-interval = <20>;
31
32 wps {
33 label = "wps";
34 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_WPS_BUTTON>;
36 };
37 };
38 };
39
40 &spi0 {
41 status = "okay";
42
43 flash@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 nvmem-layout {
71 compatible = "fixed-layout";
72 #address-cells = <1>;
73 #size-cells = <1>;
74
75 eeprom_factory_0: eeprom@0 {
76 reg = <0x0 0x200>;
77 };
78
79 macaddr_factory_4: macaddr@4 {
80 reg = <0x4 0x6>;
81 };
82 };
83 };
84
85 partition@50000 {
86 compatible = "denx,uimage";
87 label = "firmware";
88 reg = <0x50000 0x3b0000>;
89 };
90 };
91 };
92 };
93
94 &state_default {
95 gpio {
96 groups = "i2c", "jtag", "uartf";
97 function = "gpio";
98 };
99 };
100
101 &ethernet {
102 nvmem-cells = <&macaddr_factory_4>;
103 nvmem-cell-names = "mac-address";
104 };
105
106 &esw {
107 mediatek,portmap = <0x2f>;
108 };
109
110 &wmac {
111 nvmem-cells = <&eeprom_factory_0>;
112 nvmem-cell-names = "eeprom";
113 };