ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3052_nexaira_bc2.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 = "nexaira,bc2", "ralink,rt3052-soc";
9 model = "NexAira BC2";
10
11 flash@1f000000 {
12 compatible = "cfi-flash";
13 reg = <0x1f000000 0x800000>;
14 bank-width = <2>;
15 device-width = <2>;
16
17 partitions {
18 compatible = "fixed-partitions";
19 #address-cells = <1>;
20 #size-cells = <1>;
21
22 partition@0 {
23 label = "u-boot";
24 reg = <0x0 0x30000>;
25 read-only;
26 };
27
28 partition@30000 {
29 label = "u-boot-env";
30 reg = <0x30000 0x10000>;
31 read-only;
32 };
33
34 factory: partition@40000 {
35 label = "factory";
36 reg = <0x40000 0x10000>;
37 read-only;
38
39 nvmem-layout {
40 compatible = "fixed-layout";
41 #address-cells = <1>;
42 #size-cells = <1>;
43
44 eeprom_factory_0: eeprom@0 {
45 reg = <0x0 0x200>;
46 };
47
48 macaddr_factory_4: macaddr@4 {
49 reg = <0x4 0x6>;
50 };
51 };
52 };
53
54 partition@50000 {
55 compatible = "denx,uimage";
56 label = "firmware";
57 reg = <0x50000 0x7b0000>;
58 };
59 };
60 };
61
62 leds {
63 compatible = "gpio-leds";
64
65 usb {
66 function = LED_FUNCTION_USB;
67 color = <LED_COLOR_ID_BLUE>;
68 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
69 trigger-sources = <&otg_port1>;
70 linux,default-trigger = "usbport";
71 };
72 };
73
74 keys {
75 compatible = "gpio-keys-polled";
76 poll-interval = <20>;
77
78 reset {
79 label = "reset";
80 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
81 linux,code = <KEY_RESTART>;
82 };
83 };
84 };
85
86 &state_default {
87 gpio {
88 groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
89 function = "gpio";
90 };
91 };
92
93 &ethernet {
94 nvmem-cells = <&macaddr_factory_4>;
95 nvmem-cell-names = "mac-address";
96 };
97
98 &esw {
99 mediatek,portmap = <0x2f>;
100 };
101
102 &wmac {
103 nvmem-cells = <&eeprom_factory_0>;
104 nvmem-cell-names = "eeprom";
105 };
106
107 &otg {
108 status = "okay";
109 };