ramips: convert to new LED color/function format where possible
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7628an_hilink_hlk-7688a.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "hilink,hlk-7688a", "mediatek,mt7628an-soc";
11 model = "Hi-Link HLK-7688A";
12
13 aliases {
14 led-boot = &led_wlan;
15 led-failsafe = &led_wlan;
16 led-upgrade = &led_wlan;
17 };
18
19 keys {
20 compatible = "gpio-keys";
21
22 reset {
23 label = "reset";
24 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_RESTART>;
26 };
27 };
28
29 leds {
30 compatible = "gpio-leds";
31
32 led_wlan: wlan {
33 function = LED_FUNCTION_WLAN;
34 color = <LED_COLOR_ID_GREEN>;
35 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
36 linux,default-trigger = "phy0tpt";
37 };
38 };
39 };
40
41 &state_default {
42 gpio {
43 groups = "wdt", "wled_an";
44 function = "gpio";
45 };
46 };
47
48 &uart1 {
49 status = "okay";
50 };
51
52 &i2c {
53 status = "okay";
54 };
55
56 &spi0 {
57 status = "okay";
58
59 pinctrl-names = "default";
60 pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
61
62 flash@0 {
63 compatible = "jedec,spi-nor";
64 reg = <0>;
65 spi-max-frequency = <40000000>;
66 broken-flash-reset;
67
68 partitions {
69 compatible = "fixed-partitions";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 partition@0 {
74 label = "u-boot";
75 reg = <0x0 0x30000>;
76 read-only;
77 };
78
79 partition@30000 {
80 label = "u-boot-env";
81 reg = <0x30000 0x10000>;
82 read-only;
83 };
84
85 factory: partition@40000 {
86 label = "factory";
87 reg = <0x40000 0x10000>;
88 read-only;
89
90 nvmem-layout {
91 compatible = "fixed-layout";
92 #address-cells = <1>;
93 #size-cells = <1>;
94
95 eeprom_factory_0: eeprom@0 {
96 reg = <0x0 0x400>;
97 };
98
99 macaddr_factory_28: macaddr@28 {
100 reg = <0x28 0x6>;
101 };
102 };
103 };
104
105 partition@50000 {
106 compatible = "denx,uimage";
107 label = "firmware";
108 reg = <0x50000 0x1fb0000>;
109 };
110 };
111 };
112
113 spidev@1 {
114 #address-cells = <1>;
115 #size-cells = <1>;
116 compatible = "linux,spidev";
117 reg = <1>;
118 spi-max-frequency = <40000000>;
119 };
120 };
121
122 &ethernet {
123 nvmem-cells = <&macaddr_factory_28>;
124 nvmem-cell-names = "mac-address";
125 };
126
127 &esw {
128 mediatek,portmap = <0x3e>;
129 };
130
131 &wmac {
132 status = "okay";
133
134 nvmem-cells = <&eeprom_factory_0>;
135 nvmem-cell-names = "eeprom";
136 };