ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_planex_mzk-750dhp.dts
1 #include "mt7620a.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 = "planex,mzk-750dhp", "ralink,mt7620a-soc";
9 model = "Planex MZK-750DHP";
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 wps {
22 function = LED_FUNCTION_WPS;
23 color = <LED_COLOR_ID_GREEN>;
24 gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
25 };
26
27 led_power: power {
28 function = LED_FUNCTION_POWER;
29 color = <LED_COLOR_ID_GREEN>;
30 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
31 };
32
33 wlan5g {
34 label = "green:wlan5g";
35 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
36 };
37 };
38
39 keys {
40 compatible = "gpio-keys";
41
42 s1 {
43 label = "reset";
44 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_RESTART>;
46 };
47
48 s2 {
49 label = "wps";
50 gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_WPS_BUTTON>;
52 };
53 };
54 };
55
56 &gpio1 {
57 status = "okay";
58 };
59
60 &gpio2 {
61 status = "okay";
62 };
63
64 &spi0 {
65 status = "okay";
66
67 flash@0 {
68 compatible = "jedec,spi-nor";
69 reg = <0>;
70 spi-max-frequency = <10000000>;
71
72 partitions {
73 compatible = "fixed-partitions";
74 #address-cells = <1>;
75 #size-cells = <1>;
76
77 partition@0 {
78 label = "u-boot";
79 reg = <0x0 0x30000>;
80 read-only;
81 };
82
83 partition@30000 {
84 label = "u-boot-env";
85 reg = <0x30000 0x10000>;
86 read-only;
87 };
88
89 factory: partition@40000 {
90 label = "factory";
91 reg = <0x40000 0x10000>;
92 read-only;
93
94 nvmem-layout {
95 compatible = "fixed-layout";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 eeprom_factory_0: eeprom@0 {
100 reg = <0x0 0x200>;
101 };
102
103 eeprom_factory_8000: eeprom@8000 {
104 reg = <0x8000 0x200>;
105 };
106
107 macaddr_factory_4: macaddr@4 {
108 reg = <0x4 0x6>;
109 };
110 };
111 };
112
113 partition@50000 {
114 compatible = "denx,uimage";
115 label = "firmware";
116 reg = <0x50000 0x7b0000>;
117 };
118 };
119 };
120 };
121
122 &state_default {
123 gpio {
124 groups = "i2c", "spi refclk", "rgmii1", "nd_sd";
125 function = "gpio";
126 };
127 };
128
129 &ethernet {
130 pinctrl-names = "default";
131 pinctrl-0 = <&ephy_pins>;
132
133 nvmem-cells = <&macaddr_factory_4>;
134 nvmem-cell-names = "mac-address";
135
136 mediatek,portmap = "llllw";
137 };
138
139 &wmac {
140 nvmem-cells = <&eeprom_factory_0>;
141 nvmem-cell-names = "eeprom";
142 };
143
144 &pcie {
145 status = "okay";
146 };
147
148 &pcie0 {
149 mt76@0,0 {
150 reg = <0x0000 0 0 0 0>;
151 nvmem-cells = <&eeprom_factory_8000>;
152 nvmem-cell-names = "eeprom";
153 };
154 };