ath79: qca: convert to nvmem-layout
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9533_comfast_cf-e110n-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-e110n-v2", "qca,qca9533";
10 model = "COMFAST CF-E110N v2";
11
12 aliases {
13 serial0 = &uart;
14 led-boot = &led_rssihigh;
15 led-failsafe = &led_rssihigh;
16 led-upgrade = &led_rssihigh;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 pinctrl-names = "default";
23 pinctrl-0 = <&jtag_disable_pins &led_rssilow_pin &led_rssimediumhigh_pin &led_rssihigh_pin>;
24
25 wan {
26 label = "green:wan";
27 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
28 };
29
30 lan {
31 label = "green:lan";
32 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
33 };
34
35 rssilow {
36 label = "red:rssilow";
37 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
38 };
39
40 rssimediumlow {
41 label = "red:rssimediumlow";
42 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
43 };
44
45 rssimediumhigh {
46 label = "green:rssimediumhigh";
47 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
48 };
49
50 led_rssihigh: rssihigh {
51 label = "green:rssihigh";
52 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
53 };
54 };
55
56 ath9k-leds {
57 compatible = "gpio-leds";
58
59 wlan {
60 label = "green:wlan";
61 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
62 linux,default-trigger = "phy0tpt";
63 };
64 };
65
66 keys {
67 compatible = "gpio-keys";
68
69 reset {
70 label = "reset";
71 linux,code = <KEY_RESTART>;
72 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
73 debounce-interval = <60>;
74 };
75 };
76 };
77
78 &pinmux {
79 led_rssilow_pin: pinmux_rssilow_pin {
80 pinctrl-single,bits = <0x8 0x0 0xff000000>;
81 };
82
83 led_rssimediumhigh_pin: pinmux_rssimediumhigh_pin {
84 pinctrl-single,bits = <0xc 0x0 0x00ff0000>;
85 };
86
87 led_rssihigh_pin: pinmux_rssihigh_pin {
88 pinctrl-single,bits = <0x10 0x0 0x000000ff>;
89 };
90 };
91
92 &spi {
93 status = "okay";
94
95 flash@0 {
96 compatible = "winbond,w25q128", "jedec,spi-nor";
97 reg = <0>;
98 spi-max-frequency = <25000000>;
99
100 partitions {
101 compatible = "fixed-partitions";
102 #address-cells = <1>;
103 #size-cells = <1>;
104
105 partition@0 {
106 label = "u-boot";
107 reg = <0x000000 0x010000>;
108 read-only;
109 };
110
111 art: partition@10000 {
112 label = "art";
113 reg = <0x010000 0x010000>;
114 read-only;
115
116 nvmem-layout {
117 compatible = "fixed-layout";
118 #address-cells = <1>;
119 #size-cells = <1>;
120
121 macaddr_art_0: macaddr@0 {
122 reg = <0x0 0x6>;
123 };
124
125 macaddr_art_6: macaddr@6 {
126 reg = <0x6 0x6>;
127 };
128
129 macaddr_art_1002: macaddr@1002 {
130 reg = <0x1002 0x6>;
131 };
132 };
133 };
134
135 partition@20000 {
136 compatible = "denx,uimage";
137 label = "firmware";
138 reg = <0x020000 0xfd0000>;
139 };
140
141 partition@ff0000 {
142 label = "nvram";
143 reg = <0xff0000 0x010000>;
144 read-only;
145 };
146 };
147 };
148 };
149
150 &eth0 {
151 status = "okay";
152
153 phy-handle = <&swphy4>;
154
155 nvmem-cells = <&macaddr_art_0>;
156 nvmem-cell-names = "mac-address";
157 };
158
159 &eth1 {
160 nvmem-cells = <&macaddr_art_1002>;
161 nvmem-cell-names = "mac-address";
162
163 gmac-config {
164 device = <&gmac>;
165 };
166 };
167
168 &wmac {
169 status = "okay";
170
171 mtd-cal-data = <&art 0x1000>;
172 nvmem-cells = <&macaddr_art_6>;
173 nvmem-cell-names = "mac-address";
174 };