ath79: fix MAC address assignment for TP-Link ar7241 devices
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_compex_wpj558-16m.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include "qca955x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "compex,wpj558-16m", "qca,qca9558";
10 model = "Compex WPJ558 (16MB flash)";
11
12 aliases {
13 label-mac-device = &eth0;
14 led-boot = &led_sig4;
15 led-failsafe = &led_sig4;
16 led-running = &led_sig4;
17 led-upgrade = &led_sig4;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 sig1 {
24 label = "red:sig1";
25 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
26 };
27
28 sig2 {
29 label = "yellow:sig2";
30 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
31 };
32
33 sig3 {
34 label = "green:sig3";
35 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
36 };
37
38 led_sig4: sig4 {
39 label = "green:sig4";
40 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
46
47 reset {
48 label = "Reset";
49 linux,code = <KEY_RESTART>;
50 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
51 debounce-interval = <60>;
52 };
53 };
54
55 beeper {
56 compatible = "gpio-beeper";
57 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
58 };
59 };
60
61 &spi {
62 status = "okay";
63
64 flash@0 {
65 compatible = "jedec,spi-nor";
66 reg = <0>;
67 spi-max-frequency = <50000000>;
68 m25p,fast-read;
69
70 partitions {
71 compatible = "fixed-partitions";
72 #address-cells = <1>;
73 #size-cells = <1>;
74
75 uboot: partition@0 {
76 label = "u-boot";
77 reg = <0x000000 0x030000>;
78 read-only;
79 };
80
81 firmware@30000 {
82 compatible = "denx,uimage";
83 label = "firmware";
84 reg = <0x030000 0xfc0000>;
85 };
86
87 art: partition@ff0000 {
88 label = "art";
89 reg = <0xff0000 0x010000>;
90 read-only;
91 };
92 };
93 };
94 };
95
96 &mdio0 {
97 status = "okay";
98
99 phy0: ethernet-phy@0 {
100 reg = <0>;
101
102 qca,ar8327-initvals = <
103 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
104 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
105 0x50 0xcc35cc35 /* LED_CTRL0 */
106 0x54 0x00000000 /* LED_CTRL1 */
107 0x58 0x00000000 /* LED_CTRL2 */
108 0x5c 0x03ffff00 /* LED_CTRL3 */
109 0x7c 0x0000007e /* PORT0_STATUS */
110 0x94 0x0000007e /* PORT6 STATUS */
111 >;
112 };
113 };
114
115 &eth0 {
116 status = "okay";
117
118 pll-data = <0x56000000 0x00000101 0x00001616>;
119 phy-handle = <&phy0>;
120
121 nvmem-cells = <&macaddr_uboot_2e010>;
122 nvmem-cell-names = "mac-address";
123 };
124
125 &wmac {
126 status = "okay";
127
128 mtd-cal-data = <&art 0x1000>;
129 };
130
131 &pcie0 {
132 status = "okay";
133 };
134
135 &uboot {
136 compatible = "nvmem-cells";
137 #address-cells = <1>;
138 #size-cells = <1>;
139
140 macaddr_uboot_2e010: macaddr@2e010 {
141 reg = <0x2e010 0x6>;
142 };
143 };