ath79: fix MAC address assignment for TP-Link ar7241 devices
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9331_pisen_ts-d084.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9331.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "Pisen TS-D084";
10 compatible = "pisen,ts-d084", "qca,ar9331";
11
12 aliases {
13 led-boot = &led_system;
14 led-failsafe = &led_system;
15 led-running = &led_system;
16 led-upgrade = &led_system;
17 label-mac-device = &wmac;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 reset {
24 label = "reset";
25 linux,code = <KEY_RESTART>;
26 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
27 debounce-interval = <60>;
28 };
29 };
30
31 leds {
32 compatible = "gpio-leds";
33
34 led_system: system {
35 label = "blue:system";
36 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
37 };
38 };
39 };
40
41 &spi {
42 status = "okay";
43
44 flash@0 {
45 compatible = "jedec,spi-nor";
46 reg = <0>;
47 spi-max-frequency = <25000000>;
48
49 partitions {
50 compatible = "fixed-partitions";
51 #address-cells = <1>;
52 #size-cells = <1>;
53
54 uboot: partition@0 {
55 reg = <0x0 0x20000>;
56 label = "u-boot";
57 read-only;
58 };
59
60 firmware: partition@20000 {
61 compatible = "tplink,firmware";
62 reg = <0x20000 0x7d0000>;
63 label = "firmware";
64 };
65
66 art: partition@7f0000 {
67 reg = <0x7f0000 0x10000>;
68 label = "art";
69 read-only;
70 };
71 };
72 };
73 };
74
75 &eth0 {
76 status = "okay";
77
78 nvmem-cells = <&macaddr_uboot_1fc00>;
79 nvmem-cell-names = "mac-address";
80
81 gmac-config {
82 device = <&gmac>;
83
84 switch-phy-addr-swap = <0>;
85 switch-phy-swap = <0>;
86 };
87 };
88
89 &eth1 {
90 status = "okay";
91 compatible = "syscon", "simple-mfd";
92 };
93
94 &usb {
95 dr_mode = "host";
96 status = "okay";
97 };
98
99 &usb_phy {
100 status = "okay";
101 };
102
103 &wmac {
104 status = "okay";
105 mtd-cal-data = <&art 0x1000>;
106 nvmem-cells = <&macaddr_uboot_1fc00>;
107 nvmem-cell-names = "mac-address";
108 };
109
110 &uboot {
111 compatible = "nvmem-cells";
112 #address-cells = <1>;
113 #size-cells = <1>;
114
115 macaddr_uboot_1fc00: macaddr@1fc00 {
116 reg = <0x1fc00 0x6>;
117 };
118 };