ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_zbtlink_zbt-we826.dtsi
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 = "zbtlink,zbt-we826", "ralink,mt7620a-soc";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 led_power: power {
25 function = LED_FUNCTION_POWER;
26 color = <LED_COLOR_ID_GREEN>;
27 gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
28 };
29
30 usb {
31 function = LED_FUNCTION_USB;
32 color = <LED_COLOR_ID_GREEN>;
33 gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
34 trigger-sources = <&ohci_port1>, <&ehci_port1>;
35 linux,default-trigger = "usbport";
36 };
37
38 air {
39 label = "green:wifi";
40 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
46
47 reset {
48 label = "reset";
49 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_RESTART>;
51 };
52 };
53 };
54
55 &spi0 {
56 status = "okay";
57
58 flash0: flash@0 {
59 compatible = "jedec,spi-nor";
60 reg = <0>;
61 spi-max-frequency = <10000000>;
62
63 partitions {
64 compatible = "fixed-partitions";
65 #address-cells = <1>;
66 #size-cells = <1>;
67
68 partition@0 {
69 label = "u-boot";
70 reg = <0x0 0x30000>;
71 read-only;
72 };
73
74 partition@30000 {
75 label = "u-boot-env";
76 reg = <0x30000 0x10000>;
77 read-only;
78 };
79
80 factory: partition@40000 {
81 label = "factory";
82 reg = <0x40000 0x10000>;
83 read-only;
84
85 nvmem-layout {
86 compatible = "fixed-layout";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 eeprom_factory_0: eeprom@0 {
91 reg = <0x0 0x200>;
92 };
93
94 macaddr_factory_4: macaddr@4 {
95 reg = <0x4 0x6>;
96 };
97 };
98 };
99
100 firmware: partition@50000 {
101 compatible = "denx,uimage";
102 label = "firmware";
103 /* reg property is set based on flash size in DTS files */
104 };
105 };
106 };
107 };
108
109 &gpio1 {
110 status = "okay";
111 };
112
113 &gpio3 {
114 status = "okay";
115 };
116
117 &sdhci {
118 status = "okay";
119 };
120
121 &ehci {
122 status = "okay";
123 };
124
125 &ohci {
126 status = "okay";
127 };
128
129 &ethernet {
130 nvmem-cells = <&macaddr_factory_4>;
131 nvmem-cell-names = "mac-address";
132
133 mediatek,portmap = "llllw";
134 };
135
136 &wmac {
137 nvmem-cells = <&eeprom_factory_0>;
138 nvmem-cell-names = "eeprom";
139 };
140
141 &state_default {
142 default {
143 groups = "i2c", "uartf", "wled", "spi refclk", "pa";
144 function = "gpio";
145 };
146 };
147
148 &pcie {
149 status = "okay";
150 };