b9045a3e5f4f261d3690ffd480b82a08a1109f9b
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / qca953x_tplink_tl-wr810n.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca953x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 led-boot = &led_system;
11 led-failsafe = &led_system;
12 led-running = &led_system;
13 led-upgrade = &led_system;
14 label-mac-device = &eth1;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 led_system: system {
21 label = "blue:system";
22 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
23 };
24 };
25
26 keys {
27 compatible = "gpio-keys";
28
29 reset {
30 label = "Reset button";
31 linux,code = <KEY_RESTART>;
32 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
33 debounce-interval = <60>;
34 };
35
36 switch_b0 {
37 label = "switch_b0";
38 linux,input-type = <EV_SW>;
39 linux,code = <BTN_0>;
40 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
41 debounce-interval = <60>;
42 };
43
44 switch_b1 {
45 label = "switch_b1";
46 linux,input-type = <EV_SW>;
47 linux,code = <BTN_1>;
48 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
49 debounce-interval = <60>;
50 };
51 };
52 };
53
54 &spi {
55 status = "okay";
56
57 flash@0 {
58 compatible = "jedec,spi-nor";
59 reg = <0>;
60 spi-max-frequency = <25000000>;
61
62 partitions {
63 compatible = "fixed-partitions";
64 #address-cells = <1>;
65 #size-cells = <1>;
66
67 uboot: partition@0 {
68 label = "u-boot";
69 reg = <0x000000 0x020000>;
70 read-only;
71
72 nvmem-layout {
73 compatible = "fixed-layout";
74 #address-cells = <1>;
75 #size-cells = <1>;
76
77 macaddr_uboot_1fc00: macaddr@1fc00 {
78 reg = <0x1fc00 0x6>;
79 };
80 };
81 };
82
83 partition@20000 {
84 compatible = "tplink,firmware";
85 label = "firmware";
86 reg = <0x020000 0x7d0000>;
87 };
88
89 art: partition@7f0000 {
90 label = "art";
91 reg = <0x7f0000 0x010000>;
92 read-only;
93 };
94 };
95 };
96 };
97
98 &eth0 {
99 status = "okay";
100
101 phy-handle = <&swphy4>;
102
103 nvmem-cells = <&macaddr_uboot_1fc00>;
104 nvmem-cell-names = "mac-address";
105 mac-address-increment = <1>;
106 };
107
108 &eth1 {
109 nvmem-cells = <&macaddr_uboot_1fc00>;
110 nvmem-cell-names = "mac-address";
111 };
112
113 &wmac {
114 status = "okay";
115
116 mtd-cal-data = <&art 0x1000>;
117 nvmem-cells = <&macaddr_uboot_1fc00>;
118 nvmem-cell-names = "mac-address";
119 };