ath79: qca: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / qca9563_tplink_deco-m4r-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 #include "qca956x.dtsi"
7
8 / {
9 compatible = "tplink,deco-m4r-v1", "qca,qca9563";
10 model = "TP-Link Deco M4R v1";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 wlan2g {
23 label = "red:wlan2g";
24 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
25 linux,default-trigger = "phy1tpt";
26 };
27
28 led_power: power {
29 label = "green:power";
30 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
31 default-state = "on";
32 };
33
34 wlan5g {
35 label = "blue:wlan5g";
36 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
37 linux,default-trigger = "phy0tpt";
38 };
39 };
40
41
42 keys {
43 compatible = "gpio-keys";
44
45 reset {
46 label = "Reset button";
47 linux,code = <KEY_RESTART>;
48 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
49 debounce-interval = <60>;
50 };
51 };
52 };
53
54 &pcie {
55 status = "okay";
56 };
57
58 &mdio0 {
59 status = "okay";
60
61 phy0: ethernet-phy@0 {
62 reg = <0>;
63 phy-mode = "sgmii";
64 qca,mib-poll-interval = <500>;
65
66 qca,ar8327-initvals = <
67 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
68 0x7c 0x0000007e /* PORT0_STATUS */
69 >;
70 };
71 };
72
73 &spi {
74 status = "okay";
75 num-cs = <1>;
76
77 flash@0 {
78 compatible = "jedec,spi-nor";
79 reg = <0>;
80 spi-max-frequency = <25000000>;
81
82 partitions {
83 compatible = "fixed-partitions";
84 #address-cells = <1>;
85 #size-cells = <1>;
86
87 uboot: partition@0 {
88 label = "u-boot";
89 reg = <0x000000 0x080000>;
90 read-only;
91 };
92
93 partition@80000 {
94 compatible = "denx,uimage";
95 label = "firmware";
96 reg = <0x080000 0xe00000>;
97 };
98
99 partition@e80000 {
100 label = "product-info";
101 reg = <0xe80000 0x05000>;
102 read-only;
103 };
104
105 config: partition@e85000 {
106 label = "config";
107 reg = <0xe85000 0x16b000>;
108 read-only;
109
110 nvmem-layout {
111 compatible = "fixed-layout";
112 #address-cells = <1>;
113 #size-cells = <1>;
114
115 macaddr_config_8: macaddr@8 {
116 reg = <0x8 0x6>;
117 };
118 };
119 };
120
121 art: partition@ff0000 {
122 label = "art";
123 reg = <0xff0000 0x010000>;
124 read-only;
125 };
126 };
127 };
128 };
129
130 &eth0 {
131 status = "okay";
132
133 phy-mode = "sgmii";
134 phy-handle = <&phy0>;
135
136 nvmem-cells = <&macaddr_config_8>;
137 nvmem-cell-names = "mac-address";
138 };
139
140 &wmac {
141 status = "okay";
142
143 mtd-cal-data = <&art 0x1000>;
144 nvmem-cells = <&macaddr_config_8>;
145 nvmem-cell-names = "mac-address";
146 };