ath79: qca: convert to nvmem-layout
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9531_comfast_cf-e313ac.dts
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 compatible = "comfast,cf-e313ac", "qca,qca9531";
10 model = "COMFAST CF-E313AC";
11
12 aliases {
13 serial0 = &uart;
14 led-boot = &led_rssihigh;
15 led-failsafe = &led_rssihigh;
16 led-upgrade = &led_rssihigh;
17 label-mac-device = &eth1;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22 pinctrl-names = "default";
23
24 wlan {
25 label = "green:wlan";
26 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
27 linux,default-trigger = "phy0tpt";
28 };
29
30 lan {
31 label = "green:lan";
32 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
33 };
34
35 wan {
36 label = "green:wan";
37 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
38 };
39
40 rssilow {
41 label = "red:rssilow";
42 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
43 };
44
45 rssimediumlow {
46 label = "red:rssimediumlow";
47 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
48 };
49
50 rssimediumhigh {
51 label = "green:rssimediumhigh";
52 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
53 };
54
55 led_rssihigh: rssihigh {
56 label = "green:rssihigh";
57 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
58 };
59 };
60
61 keys {
62 compatible = "gpio-keys";
63
64 reset {
65 label = "reset";
66 linux,code = <KEY_RESTART>;
67 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
68 debounce-interval = <60>;
69 };
70 };
71 };
72
73 &spi {
74 status = "okay";
75
76 flash@0 {
77 compatible = "jedec,spi-nor";
78 reg = <0>;
79 spi-max-frequency = <25000000>;
80
81 partitions {
82 compatible = "fixed-partitions";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 partition@0 {
87 label = "u-boot";
88 reg = <0x000000 0x010000>;
89 read-only;
90 };
91
92 art: partition@10000 {
93 label = "art";
94 reg = <0x010000 0x010000>;
95 read-only;
96
97 nvmem-layout {
98 compatible = "fixed-layout";
99 #address-cells = <1>;
100 #size-cells = <1>;
101
102 macaddr_art_0: macaddr@0 {
103 reg = <0x0 0x6>;
104 };
105
106 macaddr_art_1002: macaddr@1002 {
107 reg = <0x1002 0x6>;
108 };
109 };
110 };
111
112 partition@20000 {
113 compatible = "denx,uimage";
114 label = "firmware";
115 reg = <0x020000 0x7c0000>;
116 };
117
118 partition@7e0000 {
119 label = "config";
120 reg = <0x7e0000 0x010000>;
121 read-only;
122 };
123
124 partition@7f0000 {
125 label = "nvram";
126 reg = <0x7f0000 0x010000>;
127 read-only;
128 };
129 };
130 };
131 };
132
133 &eth0 {
134 status = "okay";
135
136 phy-handle = <&swphy0>;
137
138 nvmem-cells = <&macaddr_art_1002>;
139 nvmem-cell-names = "mac-address";
140
141 gmac-config {
142 device = <&gmac>;
143 switch-phy-swap = <1>;
144 };
145 };
146
147 &eth1 {
148 nvmem-cells = <&macaddr_art_0>;
149 nvmem-cell-names = "mac-address";
150 };
151
152 &pcie0 {
153 status = "okay";
154
155 wifi@0,0 {
156 compatible = "qcom,ath10k";
157 reg = <0 0 0 0 0>;
158 };
159 };