ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_aigale_ai-br100.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 = "aigale,ai-br100", "ralink,mt7620a-soc";
9 model = "Aigale Ai-BR100";
10
11 aliases {
12 led-boot = &led_wlan;
13 led-failsafe = &led_wlan;
14 led-running = &led_wlan;
15 led-upgrade = &led_wlan;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 wan {
22 function = LED_FUNCTION_WAN;
23 color = <LED_COLOR_ID_BLUE>;
24 gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
25 };
26
27 led_wlan: wlan {
28 function = LED_FUNCTION_WLAN;
29 color = <LED_COLOR_ID_BLUE>;
30 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
31 };
32 };
33
34 keys {
35 compatible = "gpio-keys";
36
37 reset {
38 label = "reset";
39 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_RESTART>;
41 };
42 };
43 };
44
45 &gpio2 {
46 status = "okay";
47 };
48
49 &gpio3 {
50 status = "okay";
51 };
52
53 &spi0 {
54 status = "okay";
55
56 flash@0 {
57 compatible = "jedec,spi-nor";
58 reg = <0>;
59 spi-max-frequency = <10000000>;
60
61 partitions {
62 compatible = "fixed-partitions";
63 #address-cells = <1>;
64 #size-cells = <1>;
65
66 partition@0 {
67 label = "u-boot";
68 reg = <0x0 0x20000>;
69 read-only;
70 };
71
72 partition@20000 {
73 label = "u-boot-env";
74 reg = <0x20000 0x10000>;
75 read-only;
76 };
77
78 factory: partition@30000 {
79 label = "factory";
80 reg = <0x30000 0x10000>;
81 read-only;
82
83 nvmem-layout {
84 compatible = "fixed-layout";
85 #address-cells = <1>;
86 #size-cells = <1>;
87
88 eeprom_factory_0: eeprom@0 {
89 reg = <0x0 0x200>;
90 };
91
92 macaddr_factory_4: macaddr@4 {
93 reg = <0x4 0x6>;
94 };
95 };
96 };
97
98 partition@40000 {
99 compatible = "denx,uimage";
100 label = "firmware";
101 reg = <0x40000 0x7c0000>;
102 };
103 };
104 };
105 };
106
107 &ehci {
108 status = "okay";
109 };
110
111 &ohci {
112 status = "okay";
113 };
114
115 &state_default {
116 gpio {
117 groups = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd";
118 function = "gpio";
119 };
120 };
121
122 &ethernet {
123 nvmem-cells = <&macaddr_factory_4>;
124 nvmem-cell-names = "mac-address";
125
126 mediatek,portmap = "llllw";
127 };
128
129 &wmac {
130 nvmem-cells = <&eeprom_factory_0>;
131 nvmem-cell-names = "eeprom";
132 };