ath79: qca: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / qca9531_alcatel_hh40v.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 = "alcatel,hh40v", "qca,qca9531";
10 model = "Alcatel HH40V";
11
12 aliases {
13 label-mac-device = &wmac;
14 led-boot = &led_lan_link;
15 led-failsafe = &led_lan_link;
16 led-upgrade = &led_lan_link;
17 };
18
19 keys {
20 compatible = "gpio-keys";
21
22 reset {
23 label = "reset";
24 linux,code = <KEY_RESTART>;
25 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
26 };
27
28 wps {
29 label = "wps";
30 linux,code = <KEY_WPS_BUTTON>;
31 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
32 };
33
34 };
35
36 leds {
37 compatible = "gpio-leds";
38
39 pinctrl-names = "default";
40 pinctrl-0 = <&jtag_disable_pins>;
41
42 lan_active {
43 label = "green:lan";
44 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
45 };
46
47 led_lan_link: lan_link {
48 label = "orange:lan";
49 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
50 };
51
52 wan_active {
53 label = "green:wan";
54 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
55 };
56
57 wan_link {
58 label = "orange:wan";
59 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
60 };
61
62 wifi {
63 label = "blue:wifi";
64 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
65 linux,default-trigger = "phy0tpt";
66 };
67 };
68 };
69
70 &usb0 {
71 status = "okay";
72
73 dr_mode = "host";
74 };
75
76 &usb_phy {
77 status = "okay";
78 };
79
80 &spi {
81 status = "okay";
82
83 /* Winbond W25Q256 SPI flash */
84 flash@0 {
85 compatible = "jedec,spi-nor";
86 reg = <0>;
87 spi-max-frequency = <25000000>;
88
89 partitions {
90 compatible = "fixed-partitions";
91 #address-cells = <1>;
92 #size-cells = <1>;
93
94 partition@0 {
95 label = "u-boot";
96 reg = <0x000000 0x040000>;
97 read-only;
98 };
99
100 partition@40000 {
101 label = "u-boot-env";
102 reg = <0x040000 0x010000>;
103 };
104
105 partition@50000 {
106 label = "oem";
107 reg = <0x050000 0x100000>;
108 read-only;
109 };
110
111 partition@150000 {
112 compatible = "denx,uimage";
113 label = "firmware";
114 reg = <0x150000 0xea0000>;
115 };
116
117 art: partition@ff0000 {
118 label = "art";
119 reg = <0xff0000 0x010000>;
120 read-only;
121
122 nvmem-layout {
123 compatible = "fixed-layout";
124 #address-cells = <1>;
125 #size-cells = <1>;
126
127 cal_art_1000: cal@1000 {
128 reg = <0x1000 0x440>;
129 };
130
131 macaddr_art_0: macaddr@0 {
132 reg = <0x0 0x6>;
133 };
134
135 macaddr_art_6: macaddr@6 {
136 reg = <0x6 0x6>;
137 };
138
139 macaddr_art_1002: macaddr@1002 {
140 reg = <0x1002 0x6>;
141 };
142 };
143 };
144 };
145 };
146 };
147
148 &mdio0 {
149 status = "okay";
150 };
151
152
153 &eth0 {
154 status = "okay";
155
156 nvmem-cells = <&macaddr_art_0>;
157 nvmem-cell-names = "mac-address";
158
159 phy-handle = <&swphy4>;
160 };
161
162 &eth1 {
163 compatible = "qca,qca9530-eth", "syscon", "simple-mfd";
164
165 nvmem-cells = <&macaddr_art_6>;
166 nvmem-cell-names = "mac-address";
167 };
168
169 &wmac {
170 status = "okay";
171
172 nvmem-cells = <&cal_art_1000>, <&macaddr_art_1002>;
173 nvmem-cell-names = "calibration", "mac-address";
174 };