ipq40xx: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4018-pa1200.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /* Copyright (c) 2017-2020, Sven Eckelmann <sven@narfation.org>
3 * Copyright (c) 2018, Marek Lindner <marek.lindner@kaiwoo.ai>
4 */
5
6 #include "qcom-ipq4019.dtsi"
7 #include <dt-bindings/gpio/gpio.h>
8 #include <dt-bindings/input/input.h>
9 #include <dt-bindings/soc/qcom,tcsr.h>
10
11 / {
12 model = "Plasma Cloud PA1200";
13 compatible = "plasmacloud,pa1200";
14
15 soc {
16 rng@22000 {
17 status = "okay";
18 };
19
20 tcsr@194b000 {
21 /* select hostmode */
22 compatible = "qcom,tcsr";
23 reg = <0x194b000 0x100>;
24 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
25 status = "okay";
26 };
27
28 tcsr@1949000 {
29 compatible = "qcom,tcsr";
30 reg = <0x1949000 0x100>;
31 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
32 };
33
34 ess_tcsr@1953000 {
35 compatible = "qcom,tcsr";
36 reg = <0x1953000 0x1000>;
37 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
38 };
39
40 tcsr@1957000 {
41 compatible = "qcom,tcsr";
42 reg = <0x1957000 0x100>;
43 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
44 };
45
46 usb2: usb2@60f8800 {
47 status = "okay";
48 };
49
50 crypto@8e3a000 {
51 status = "okay";
52 };
53
54 watchdog@b017000 {
55 status = "okay";
56 };
57 };
58
59 keys {
60 compatible = "gpio-keys";
61
62 reset {
63 label = "reset";
64 gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_RESTART>;
66 };
67 };
68
69 aliases {
70 led-boot = &led_status_purple;
71 led-failsafe = &led_status_yellow;
72 led-running = &led_status_cyan;
73 led-upgrade = &led_status_yellow;
74 label-mac-device = &swport5;
75 };
76
77 leds {
78 compatible = "gpio-leds";
79
80 led_status_cyan: status_cyan {
81 label = "cyan:status";
82 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
83 };
84
85 led_status_purple: status_purple {
86 label = "purple:status";
87 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
88 };
89
90 led_status_yellow: status_yellow {
91 label = "yellow:status";
92 gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
93 };
94 };
95
96 };
97
98 &tlmm {
99 serial_pins: serial_pinmux {
100 mux {
101 pins = "gpio60", "gpio61";
102 function = "blsp_uart0";
103 bias-disable;
104 };
105 };
106
107 spi_0_pins: spi_0_pinmux {
108 pin {
109 function = "blsp_spi0";
110 pins = "gpio55", "gpio56", "gpio57";
111 drive-strength = <12>;
112 bias-disable;
113 };
114 pin_cs {
115 function = "gpio";
116 pins = "gpio54";
117 drive-strength = <2>;
118 bias-disable;
119 output-high;
120 };
121 };
122 };
123
124 &blsp_dma {
125 status = "okay";
126 };
127
128 &blsp1_spi1 {
129 pinctrl-0 = <&spi_0_pins>;
130 pinctrl-names = "default";
131 status = "okay";
132 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
133
134 flash@0 {
135 #address-cells = <1>;
136 #size-cells = <1>;
137 compatible = "jedec,spi-nor";
138 reg = <0>;
139 spi-max-frequency = <24000000>;
140
141 /* partitions are passed via bootloader */
142 partitions {
143 partition-art {
144 label = "0:ART";
145
146 nvmem-layout {
147 compatible = "fixed-layout";
148 #address-cells = <1>;
149 #size-cells = <1>;
150
151 macaddr_gmac0: macaddr@0 {
152 reg = <0x0 0x6>;
153 };
154
155 macaddr_gmac1: macaddr@6 {
156 reg = <0x6 0x6>;
157 };
158
159 precal_art_1000: precal@1000 {
160 reg = <0x1000 0x2f20>;
161 };
162
163 precal_art_5000: precal@5000 {
164 reg = <0x5000 0x2f20>;
165 };
166 };
167 };
168 };
169 };
170 };
171
172 &blsp1_uart1 {
173 pinctrl-0 = <&serial_pins>;
174 pinctrl-names = "default";
175 status = "okay";
176 };
177
178 &cryptobam {
179 status = "okay";
180 };
181
182 &usb2_hs_phy {
183 status = "okay";
184 };
185
186 &mdio {
187 status = "okay";
188 };
189
190 &gmac {
191 status = "okay";
192 };
193
194 &switch {
195 status = "okay";
196 };
197
198 &swport4 {
199 status = "okay";
200 label = "ethernet2";
201
202 nvmem-cell-names = "mac-address";
203 nvmem-cells = <&macaddr_gmac1>;
204 };
205
206 &swport5 {
207 status = "okay";
208 label = "ethernet1";
209
210 nvmem-cell-names = "mac-address";
211 nvmem-cells = <&macaddr_gmac0>;
212 };
213
214 &wifi0 {
215 status = "okay";
216 qcom,ath10k-calibration-variant = "PlasmaCloud-PA1200";
217
218 nvmem-cell-names = "pre-calibration";
219 nvmem-cells = <&precal_art_1000>;
220 };
221
222 &wifi1 {
223 status = "okay";
224 qcom,ath10k-calibration-variant = "PlasmaCloud-PA1200";
225
226 nvmem-cell-names = "pre-calibration";
227 nvmem-cells = <&precal_art_5000>;
228 };