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