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