ath79: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9132_tplink_tl-wr1043nd-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-only
2
3 #include "ar9132.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 = "tplink,tl-wr1043nd-v1", "qca,ar9132";
11 model = "TP-Link TL-WR1043ND v1";
12
13 aliases {
14 led-boot = &led_system;
15 led-failsafe = &led_system;
16 led-running = &led_system;
17 led-upgrade = &led_system;
18 label-mac-device = &eth0;
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 reset {
25 label = "reset";
26 linux,code = <KEY_RESTART>;
27 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
28 debounce-interval = <60>;
29 };
30
31 qss {
32 label = "qss";
33 linux,code = <KEY_WPS_BUTTON>;
34 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
35 debounce-interval = <60>;
36 };
37 };
38
39 leds {
40 compatible = "gpio-leds";
41
42 usb {
43 function = LED_FUNCTION_USB;
44 color = <LED_COLOR_ID_GREEN>;
45 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
46 trigger-sources = <&hub_port>;
47 linux,default-trigger = "usbport";
48 };
49
50 led_system: system {
51 label = "green:system";
52 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
53 linux,default-trigger = "heartbeat";
54 };
55
56 qss {
57 label = "green:qss";
58 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
59 };
60
61 wlan {
62 function = LED_FUNCTION_WLAN;
63 color = <LED_COLOR_ID_GREEN>;
64 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
65 linux,default-trigger = "phy0tpt";
66 };
67 };
68
69 rtl8366rb {
70 compatible = "realtek,rtl8366rb";
71 gpio-sda = <&gpio 18 GPIO_ACTIVE_HIGH>;
72 gpio-sck = <&gpio 19 GPIO_ACTIVE_HIGH>;
73
74 resets = <&rst 8>;
75 reset-names = "switch";
76 };
77 };
78
79 &usb {
80 status = "okay";
81 };
82
83 &usb_phy {
84 status = "okay";
85 };
86
87 &spi {
88 status = "okay";
89
90 flash@0 {
91 compatible = "jedec,spi-nor";
92 reg = <0>;
93 spi-max-frequency = <25000000>;
94 m25p,fast-read;
95
96 partitions {
97 compatible = "fixed-partitions";
98 #address-cells = <1>;
99 #size-cells = <1>;
100
101 uboot: partition@0 {
102 label = "u-boot";
103 reg = <0x000000 0x020000>;
104 read-only;
105
106 nvmem-layout {
107 compatible = "fixed-layout";
108 #address-cells = <1>;
109 #size-cells = <1>;
110
111 macaddr_uboot_1fc00: macaddr@1fc00 {
112 reg = <0x1fc00 0x6>;
113 };
114 };
115 };
116
117 partition@20000 {
118 compatible = "tplink,firmware";
119 label = "firmware";
120 reg = <0x020000 0x7D0000>;
121 };
122
123 art: partition@7F0000 {
124 label = "art";
125 reg = <0x7F0000 0x010000>;
126 read-only;
127 };
128 };
129 };
130 };
131
132 &eth0 {
133 status = "okay";
134
135 phy-mode = "rgmii";
136 nvmem-cells = <&macaddr_uboot_1fc00>;
137 nvmem-cell-names = "mac-address";
138
139 fixed-link {
140 speed = <1000>;
141 full-duplex;
142 };
143 };
144
145 &wmac {
146 status = "okay";
147
148 mtd-cal-data = <&art 0x1000>;
149 nvmem-cells = <&macaddr_uboot_1fc00>;
150 nvmem-cell-names = "mac-address";
151 };