ath79: qca: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / qca9531_comfast_cf-e130n-v2.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-e130n-v2", "qca,qca9531";
10 model = "COMFAST CF-E130N v2";
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
23 pinctrl-names = "default";
24
25 wlan {
26 label = "green:wlan";
27 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
28 linux,default-trigger = "phy0tpt";
29 };
30
31 lan {
32 label = "green:lan";
33 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
34 };
35
36 unused {
37 label = "green:unused";
38 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
39 };
40
41 rssilow {
42 label = "red:rssilow";
43 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
44 };
45
46 rssimediumlow {
47 label = "red:rssimediumlow";
48 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
49 };
50
51 rssimediumhigh {
52 label = "green:rssimediumhigh";
53 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
54 };
55
56 led_rssihigh: rssihigh {
57 label = "green:rssihigh";
58 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
59 };
60 };
61
62 keys {
63 compatible = "gpio-keys";
64
65 reset {
66 label = "reset";
67 linux,code = <KEY_RESTART>;
68 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
69 debounce-interval = <60>;
70 };
71 };
72 };
73
74 &spi {
75 status = "okay";
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 partition@0 {
88 label = "u-boot";
89 reg = <0x000000 0x010000>;
90 read-only;
91 };
92
93 art: partition@10000 {
94 label = "art";
95 reg = <0x010000 0x010000>;
96 read-only;
97
98 nvmem-layout {
99 compatible = "fixed-layout";
100 #address-cells = <1>;
101 #size-cells = <1>;
102
103 macaddr_art_0: macaddr@0 {
104 reg = <0x0 0x6>;
105 };
106 };
107 };
108
109 partition@20000 {
110 compatible = "denx,uimage";
111 label = "firmware";
112 reg = <0x020000 0x7c0000>;
113 };
114
115 partition@7e0000 {
116 label = "configs";
117 reg = <0x7e0000 0x010000>;
118 read-only;
119 };
120
121 partition@7f0000 {
122 label = "nvram";
123 reg = <0x7f0000 0x010000>;
124 read-only;
125 };
126 };
127 };
128 };
129
130 &eth1 {
131 nvmem-cells = <&macaddr_art_0>;
132 nvmem-cell-names = "mac-address";
133
134 gmac-config {
135 device = <&gmac>;
136 switch-phy-swap = <1>;
137 };
138 };
139
140 &wmac {
141 status = "okay";
142
143 nvmem-cells = <&macaddr_art_0>;
144 nvmem-cell-names = "mac-address";
145 mtd-cal-data = <&art 0x1000>;
146 };