ath79: qca: convert to nvmem-layout
[openwrt/staging/nbd.git] / target / linux / ath79 / dts / qca9533_tplink_tl-wr841.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 label-mac-device = &wmac;
11 };
12
13 leds: leds {
14 compatible = "gpio-leds";
15
16 wifi {
17 label = "green:wlan";
18 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
19 linux,default-trigger = "phy0tpt";
20 };
21
22 led_qss: qss {
23 label = "green:qss";
24 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
25 };
26
27 wan {
28 label = "green:wan";
29 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
30 };
31
32 lan1 {
33 label = "green:lan1";
34 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
35 };
36
37 lan2 {
38 label = "green:lan2";
39 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
40 };
41
42 lan3 {
43 label = "green:lan3";
44 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
45 };
46
47 lan4 {
48 label = "green:lan4";
49 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
50 };
51 };
52
53 keys {
54 compatible = "gpio-keys";
55
56 reset {
57 label = "Reset button";
58 linux,code = <KEY_RESTART>;
59 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
60 debounce-interval = <60>;
61 };
62
63 rfkill {
64 label = "RFKILL button";
65 linux,code = <KEY_RFKILL>;
66 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
67 debounce-interval = <60>;
68 };
69 };
70 };
71
72 &spi {
73 status = "okay";
74
75 flash@0 {
76 compatible = "jedec,spi-nor";
77 reg = <0>;
78 spi-max-frequency = <25000000>;
79
80 partitions {
81 compatible = "fixed-partitions";
82 #address-cells = <1>;
83 #size-cells = <1>;
84
85 uboot: partition@0 {
86 label = "u-boot";
87 reg = <0x000000 0x020000>;
88 read-only;
89
90 nvmem-layout {
91 compatible = "fixed-layout";
92 #address-cells = <1>;
93 #size-cells = <1>;
94
95 macaddr_uboot_1fc00: macaddr@1fc00 {
96 reg = <0x1fc00 0x6>;
97 };
98 };
99 };
100
101 partition@20000 {
102 compatible = "tplink,firmware";
103 label = "firmware";
104 reg = <0x020000 0x3d0000>;
105 };
106
107 art: partition@3f0000 {
108 label = "art";
109 reg = <0x3f0000 0x010000>;
110 read-only;
111 };
112 };
113 };
114 };
115
116 &eth0 {
117 status = "okay";
118
119 phy-handle = <&swphy4>;
120
121 nvmem-cells = <&macaddr_uboot_1fc00>;
122 nvmem-cell-names = "mac-address";
123 mac-address-increment = <1>;
124 };
125
126 &eth1 {
127 nvmem-cells = <&macaddr_uboot_1fc00>;
128 nvmem-cell-names = "mac-address";
129 };
130
131 &wmac {
132 status = "okay";
133
134 mtd-cal-data = <&art 0x1000>;
135 nvmem-cells = <&macaddr_uboot_1fc00>;
136 nvmem-cell-names = "mac-address";
137 };