ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / rt5350_hame_mpr-a1.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 = "hame,mpr-a1", "ralink,rt5350-soc";
9 model = "HAME MPR-A1";
10
11 aliases {
12 led-boot = &led_system;
13 led-failsafe = &led_system;
14 led-running = &led_system;
15 led-upgrade = &led_system;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 led_system: system {
22 label = "blue:system";
23 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
24 };
25
26 power {
27 function = LED_FUNCTION_POWER;
28 color = <LED_COLOR_ID_RED>;
29 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
30 };
31 };
32
33 keys {
34 compatible = "gpio-keys-polled";
35 poll-interval = <20>;
36
37 wps {
38 label = "reset";
39 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_RESTART>;
41 };
42 };
43
44 gpio_export {
45 compatible = "gpio-export";
46 #size-cells = <0>;
47
48 usb {
49 gpio-export,name = "usb";
50 gpio-export,output = <1>;
51 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
52 };
53
54 root_hub {
55 gpio-export,name = "root_hub";
56 gpio-export,output = <1>;
57 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
58 };
59 };
60 };
61
62 &spi0 {
63 status = "okay";
64
65 flash@0 {
66 compatible = "jedec,spi-nor";
67 reg = <0>;
68 spi-max-frequency = <10000000>;
69
70 partitions {
71 compatible = "fixed-partitions";
72 #address-cells = <1>;
73 #size-cells = <1>;
74
75 partition@0 {
76 label = "u-boot";
77 reg = <0x0 0x30000>;
78 read-only;
79 };
80
81 partition@30000 {
82 label = "u-boot-env";
83 reg = <0x30000 0x10000>;
84 read-only;
85 };
86
87 factory: partition@40000 {
88 label = "factory";
89 reg = <0x40000 0x10000>;
90 read-only;
91
92 nvmem-layout {
93 compatible = "fixed-layout";
94 #address-cells = <1>;
95 #size-cells = <1>;
96
97 eeprom_factory_0: eeprom@0 {
98 reg = <0x0 0x200>;
99 };
100
101 macaddr_factory_4: macaddr@4 {
102 reg = <0x4 0x6>;
103 };
104 };
105 };
106
107 partition@50000 {
108 compatible = "denx,uimage";
109 label = "firmware";
110 reg = <0x50000 0x3b0000>;
111 };
112 };
113 };
114 };
115
116 &state_default {
117 gpio {
118 groups = "i2c", "jtag", "uartf", "led";
119 function = "gpio";
120 };
121 };
122
123 &ethernet {
124 nvmem-cells = <&macaddr_factory_4>;
125 nvmem-cell-names = "mac-address";
126 };
127
128 &esw {
129 mediatek,portmap = <0x2f>;
130 };
131
132 &wmac {
133 nvmem-cells = <&eeprom_factory_0>;
134 nvmem-cell-names = "eeprom";
135 };