ath79: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ath79 / dts / ar7161_trendnet_tew-673gru.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7100.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 = "trendnet,tew-673gru", "qca,ar7161";
11 model = "TRENDNET TEW-673GRU";
12
13 aliases {
14 led-boot = &led_wps;
15 led-failsafe = &led_wps;
16 led-running = &led_wps;
17 led-upgrade = &led_wps;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_wps: wps {
24 function = LED_FUNCTION_WPS;
25 color = <LED_COLOR_ID_BLUE>;
26 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
27 };
28 };
29
30 keys {
31 compatible = "gpio-keys";
32
33 reset {
34 label = "reset";
35 linux,code = <KEY_RESTART>;
36 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
37 };
38
39 wps {
40 label = "wps";
41 linux,code = <KEY_WPS_BUTTON>;
42 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
43 };
44 };
45
46 rtl8366s {
47 compatible = "realtek,rtl8366s";
48 gpio-sda = <&gpio 5 GPIO_ACTIVE_HIGH>;
49 gpio-sck = <&gpio 7 GPIO_ACTIVE_HIGH>;
50 realtek,initvals = <0x06 0x0108>;
51
52 mdio-bus {
53 #address-cells = <1>;
54 #size-cells = <0>;
55 status = "okay";
56
57 phy4: ethernet-phy@4 {
58 reg = <4>;
59 phy-mode = "rgmii";
60 };
61 };
62 };
63
64 virtual_flash {
65 compatible = "mtd-concat";
66 devices = <&fwconcat0 &fwconcat1>;
67
68 partitions {
69 compatible = "fixed-partitions";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 partition@0 {
74 compatible = "denx,uimage";
75 label = "firmware";
76 reg = <0x0 0x0>;
77 };
78 };
79 };
80 };
81
82 &usb1 {
83 status = "okay";
84 };
85
86 &usb2 {
87 status = "okay";
88 };
89
90 &usb_phy {
91 status = "okay";
92 };
93
94 &pcie0 {
95 status = "okay";
96
97 wifi@11,0 {
98 compatible = "pci168c,0029";
99 reg = <0x8800 0 0 0 0>;
100 qca,no-eeprom;
101 };
102
103 wifi@12,0 {
104 compatible = "pci168c,0029";
105 reg = <0x9000 0 0 0 0>;
106 qca,no-eeprom;
107 };
108 };
109
110 &spi {
111 status = "okay";
112
113 flash@0 {
114 compatible = "jedec,spi-nor";
115 reg = <0>;
116 spi-max-frequency = <25000000>;
117
118 partitions {
119 compatible = "fixed-partitions";
120 #address-cells = <1>;
121 #size-cells = <1>;
122
123 partition@0 {
124 label = "u-boot";
125 reg = <0x000000 0x040000>;
126 read-only;
127 };
128
129 partition@40000 {
130 label = "config";
131 reg = <0x040000 0x010000>;
132 read-only;
133 };
134
135 fwconcat0: partition@50000 {
136 label = "fwconcat0";
137 reg = <0x050000 0x610000>;
138 };
139
140 partition@660000 {
141 label = "caldata";
142 reg = <0x660000 0x010000>;
143 read-only;
144 };
145
146 fwconcat1: partition@670000 {
147 label = "fwconcat1";
148 reg = <0x670000 0x190000>;
149 };
150 };
151 };
152 };
153
154 &eth0 {
155 status = "okay";
156
157 pll-data = <0x11110000 0x00001099 0x00991099>;
158
159 fixed-link {
160 speed = <1000>;
161 full-duplex;
162 };
163 };
164
165 &eth1 {
166 status = "okay";
167
168 pll-data = <0x11110000 0x00001099 0x00991099>;
169
170 phy-handle = <&phy4>;
171 };