ath79: convert to new LED color/function format where possible
[openwrt/staging/robimarko.git] / target / linux / ath79 / dts / qca9558_trendnet_tew-823dru.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca955x.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-823dru", "qca,qca9558";
11 model = "TRENDNET TEW-823DRU";
12
13 aliases {
14 led-boot = &led_power_green;
15 led-failsafe = &led_power_green;
16 led-running = &led_power_green;
17 led-upgrade = &led_power_green;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 power_orange {
24 function = LED_FUNCTION_POWER;
25 color = <LED_COLOR_ID_ORANGE>;
26 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
27 };
28
29 led_power_green: power_green {
30 function = LED_FUNCTION_POWER;
31 color = <LED_COLOR_ID_GREEN>;
32 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
33 };
34
35 planet_green {
36 label = "green:planet";
37 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
38 };
39
40 planet_orange {
41 label = "orange:planet";
42 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
43 };
44 };
45
46 keys {
47 compatible = "gpio-keys";
48
49 reset {
50 label = "Reset button";
51 linux,code = <KEY_RESTART>;
52 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
53 debounce-interval = <60>;
54 };
55
56 wps {
57 label = "WPS button";
58 linux,code = <KEY_WPS_BUTTON>;
59 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
60 debounce-interval = <60>;
61 };
62 };
63 };
64
65 &pcie0 {
66 status = "okay";
67 };
68
69 &pcie1 {
70 status = "okay";
71 };
72
73 &usb_phy0 {
74 status = "okay";
75 };
76
77 &usb0 {
78 status = "okay";
79 };
80
81 &usb_phy1 {
82 status = "okay";
83 };
84
85 &usb1 {
86 status = "okay";
87 };
88
89 &spi {
90 status = "okay";
91
92 flash@0 {
93 compatible = "jedec,spi-nor";
94 reg = <0>;
95 spi-max-frequency = <25000000>;
96
97 partitions {
98 compatible = "fixed-partitions";
99 #address-cells = <1>;
100 #size-cells = <1>;
101
102 partition@0 {
103 label = "u-boot";
104 reg = <0x000000 0x030000>;
105 read-only;
106 };
107
108 partition@30000 {
109 label = "nvram";
110 reg = <0x030000 0x010000>;
111 read-only;
112 };
113
114 partition@40000 {
115 compatible = "denx,uimage";
116 label = "firmware";
117 reg = <0x040000 0xef0000>;
118 };
119
120 partition@f30000 {
121 label = "lang";
122 reg = <0xf30000 0x030000>;
123 read-only;
124 };
125
126 partition@f60000 {
127 label = "my-dlink";
128 reg = <0xf60000 0x080000>;
129 read-only;
130 };
131
132 partition@fe0000 {
133 label = "mac";
134 reg = <0xfe0000 0x010000>;
135 read-only;
136 };
137
138 art: partition@ff0000 {
139 label = "art";
140 reg = <0xff0000 0x010000>;
141 read-only;
142 };
143 };
144 };
145 };
146
147 &mdio0 {
148 status = "okay";
149
150 phy0: ethernet-phy@0 {
151 reg = <0>;
152 qca,ar8327-initvals = <
153 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
154 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
155 0x10 0x81000080 /* POWER_ON_STRAP */
156 0x7c 0x0000007e /* PORT0_STATUS */
157 0x94 0x0000007e /* PORT6 STATUS */
158 >;
159 };
160 };
161
162 &eth0 {
163 status = "okay";
164
165 phy-handle = <&phy0>;
166 pll-data = <0x56000000 0x00000101 0x00001616>;
167
168 gmac-config {
169 device = <&gmac>;
170 rgmii-enabled = <1>;
171 };
172 };
173
174 &eth1 {
175 status = "okay";
176
177 pll-data = <0x03000101 0x00000101 0x00001616>;
178
179 fixed-link {
180 speed = <1000>;
181 full-duplex;
182 };
183 };
184
185 &wmac {
186 status = "okay";
187
188 mtd-cal-data = <&art 0x1000>;
189 };