ath79: convert to new LED color/function format where possible
[openwrt/staging/pepe2k.git] / target / linux / ath79 / dts / qca9531_glinet_gl-x750.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca953x.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 = "glinet,gl-x750", "qca,qca9531";
11 model = "GL.iNet GL-X750";
12
13 keys {
14 compatible = "gpio-keys";
15
16 pinctrl-names = "default";
17 pinctrl-0 = <&jtag_disable_pins>;
18
19 reset {
20 label = "reset";
21 linux,code = <KEY_RESTART>;
22 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
23 };
24 };
25
26 leds {
27 compatible = "gpio-leds";
28
29 power {
30 function = LED_FUNCTION_POWER;
31 color = <LED_COLOR_ID_GREEN>;
32 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
33 default-state = "on";
34 };
35
36 wlan2g {
37 label = "green:wlan2g";
38 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
39 linux,default-trigger = "phy1tpt";
40 };
41
42 wlan5g {
43 label = "green:wlan5g";
44 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
45 linux,default-trigger = "phy0tpt";
46 };
47
48 wan {
49 function = LED_FUNCTION_WAN;
50 color = <LED_COLOR_ID_GREEN>;
51 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
52 };
53
54 4g {
55 label = "green:4g";
56 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
57 };
58 };
59 };
60
61 &pcie0 {
62 status = "okay";
63
64 wifi@0,0 {
65 compatible = "qcom,ath10k";
66 reg = <0x0000 0 0 0 0>;
67 nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 2>;
68 nvmem-cell-names = "calibration", "mac-address";
69 };
70 };
71
72 &usb0 {
73 status = "okay";
74 };
75
76 &usb_phy {
77 status = "okay";
78 };
79
80 &spi {
81 status = "okay";
82
83 flash@0 {
84 compatible = "jedec,spi-nor";
85 reg = <0>;
86 spi-max-frequency = <25000000>;
87
88 partitions {
89 compatible = "fixed-partitions";
90 #address-cells = <1>;
91 #size-cells = <1>;
92
93 partition@0 {
94 label = "u-boot";
95 reg = <0x000000 0x040000>;
96 read-only;
97 };
98
99 partition@40000 {
100 label = "u-boot-env";
101 reg = <0x040000 0x010000>;
102 };
103
104 art: partition@50000 {
105 label = "art";
106 reg = <0x050000 0x010000>;
107 read-only;
108
109 nvmem-layout {
110 compatible = "fixed-layout";
111 #address-cells = <1>;
112 #size-cells = <1>;
113
114 macaddr_art_0: macaddr@0 {
115 compatible = "mac-base";
116 reg = <0x0 0x6>;
117 #nvmem-cell-cells = <1>;
118 };
119
120 cal_art_5000: calibration@5000 {
121 reg = <0x5000 0x844>;
122 };
123 };
124 };
125
126 partition@60000 {
127 compatible = "denx,uimage";
128 label = "firmware";
129 reg = <0x060000 0xfa0000>;
130 };
131 };
132 };
133 };
134
135 &eth0 {
136 status = "okay";
137
138 phy-handle = <&swphy4>;
139
140 nvmem-cells = <&macaddr_art_0 0>;
141 nvmem-cell-names = "mac-address";
142 };
143
144 &eth1 {
145 nvmem-cells = <&macaddr_art_0 1>;
146 nvmem-cell-names = "mac-address";
147 };
148
149 &wmac {
150 status = "okay";
151
152 mtd-cal-data = <&art 0x1000>;
153 };