ath79: fix MAC address assignment for TP-Link ar7241 devices
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9330_ziking_cpe46b.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9330.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "ZiKing CPE46B";
10 compatible = "ziking,cpe46b", "qca,ar9330";
11
12 aliases {
13 label-mac-device = &eth0;
14 };
15
16 leds {
17 compatible = "gpio-leds";
18
19 wlan {
20 label = "green:wlan";
21 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
22 linux,default-trigger = "phy0tpt";
23 };
24
25 rssi1 {
26 label = "green:rssi1";
27 gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
28 };
29
30 rssi2 {
31 label = "green:rssi2";
32 gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
33 };
34 };
35
36 keys {
37 compatible = "gpio-keys";
38
39 reset {
40 label = "reset";
41 linux,code = <KEY_RESTART>;
42 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
43 };
44 };
45 };
46
47 &spi {
48 status = "okay";
49
50 flash@0 {
51 compatible = "jedec,spi-nor";
52 spi-max-frequency = <50000000>;
53 reg = <0>;
54
55 partitions {
56 compatible = "fixed-partitions";
57 #address-cells = <1>;
58 #size-cells = <1>;
59
60 partition@0 {
61 label = "u-boot";
62 reg = <0x000000 0x010000>;
63 read-only;
64 };
65
66 partition@10000 {
67 label = "u-boot-env";
68 reg = <0x010000 0x010000>;
69 };
70
71 partition@20000 {
72 compatible = "denx,uimage";
73 label = "firmware";
74 reg = <0x020000 0x7d0000>;
75 };
76
77 art: partition@7f0000 {
78 label = "art";
79 reg = <0x7f0000 0x010000>;
80 read-only;
81 };
82 };
83 };
84 };
85
86 &eth0 {
87 status = "okay";
88
89 nvmem-cells = <&macaddr_art_0>;
90 nvmem-cell-names = "mac-address";
91 };
92
93 &eth1 {
94 status = "okay";
95
96 nvmem-cells = <&macaddr_art_0>;
97 nvmem-cell-names = "mac-address";
98 mac-address-increment = <2>;
99 };
100
101 &wmac {
102 status = "okay";
103
104 mtd-cal-data = <&art 0x1000>;
105 };
106
107 &art {
108 compatible = "nvmem-cells";
109 #address-cells = <1>;
110 #size-cells = <1>;
111
112 macaddr_art_0: macaddr@0 {
113 reg = <0x0 0x6>;
114 };
115 };