ath79: ar: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar7242_tplink_tl-wr2543-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7242.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "tplink,tl-wr2543-v1", "qca,ar7242";
10 model = "TP-Link TL-WR2543N/ND";
11
12 aliases {
13 led-boot = &led_wps;
14 led-failsafe = &led_wps;
15 led-running = &led_wps;
16 led-upgrade = &led_wps;
17 label-mac-device = &eth0;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200n8";
22 };
23
24 keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 linux,code = <KEY_RESTART>;
30 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
31 debounce-interval = <60>;
32 };
33
34 wps {
35 label = "wps";
36 linux,code = <KEY_WPS_BUTTON>;
37 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
38 debounce-interval = <60>;
39 };
40 };
41
42 leds {
43 compatible = "gpio-leds";
44
45 led_wps: wps {
46 label = "green:wps";
47 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
48 };
49
50 usb {
51 label = "green:usb";
52 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
53 trigger-sources = <&hub_port>;
54 linux,default-trigger = "usbport";
55 };
56 };
57
58 ath9k-leds {
59 compatible = "gpio-leds";
60
61 wlan2g {
62 label = "green:wlan2g";
63 gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
64 linux,default-trigger = "phy0tpt";
65 };
66
67 wlan5g {
68 label = "green:wlan5g";
69 gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
70 linux,default-trigger = "phy0tpt";
71 };
72 };
73
74 rtl8367 {
75 compatible = "realtek,rtl8367";
76 gpio-sda = <&gpio 1 GPIO_ACTIVE_HIGH>;
77 gpio-sck = <&gpio 6 GPIO_ACTIVE_HIGH>;
78 realtek,extif0 = <1 0 1 1 1 1 1 1 2>;
79
80 mdio-bus {
81 #address-cells = <1>;
82 #size-cells = <0>;
83 status = "okay";
84
85 phy0: ethernet-phy@0 {
86 reg = <0>;
87 };
88 };
89 };
90 };
91
92 &spi {
93 status = "okay";
94
95 flash@0 {
96 compatible = "jedec,spi-nor";
97 reg = <0>;
98 spi-max-frequency = <25000000>;
99 m25p,fast-read;
100
101 partitions {
102 compatible = "fixed-partitions";
103 #address-cells = <1>;
104 #size-cells = <1>;
105
106 uboot: partition@0 {
107 label = "u-boot";
108 reg = <0x000000 0x020000>;
109 read-only;
110
111 nvmem-layout {
112 compatible = "fixed-layout";
113 #address-cells = <1>;
114 #size-cells = <1>;
115
116 macaddr_uboot_1fc00: macaddr@1fc00 {
117 reg = <0x1fc00 0x6>;
118 };
119 };
120 };
121
122 partition@20000 {
123 compatible = "tplink,firmware";
124 label = "firmware";
125 reg = <0x020000 0x7d0000>;
126 };
127
128 art: partition@7f0000 {
129 label = "art";
130 reg = <0x7f0000 0x010000>;
131 read-only;
132
133 nvmem-layout {
134 compatible = "fixed-layout";
135 #address-cells = <1>;
136 #size-cells = <1>;
137
138 cal_art_1000: cal@1000 {
139 reg = <0x1000 0x440>;
140 };
141 };
142 };
143 };
144 };
145 };
146
147 &usb {
148 status = "okay";
149 };
150
151 &usb_phy {
152 status = "okay";
153 };
154
155 &pcie {
156 status = "okay";
157
158 ath9k: wifi@0,0 {
159 reg = <0x0000 0 0 0 0>;
160 #gpio-cells = <2>;
161 gpio-controller;
162 nvmem-cells = <&macaddr_uboot_1fc00>, <&cal_art_1000>;
163 nvmem-cell-names = "mac-address", "calibration";
164 };
165 };
166
167 &eth0 {
168 status = "okay";
169
170 phy-mode = "rgmii";
171 nvmem-cells = <&macaddr_uboot_1fc00>;
172 nvmem-cell-names = "mac-address";
173
174 phy-handle = <&phy0>;
175 fixed-link {
176 speed = <1000>;
177 full-duplex;
178 };
179 };