ipq807x: add Spectrum SAX1V1K
[openwrt/staging/pepe2k.git] / target / linux / qualcommax / files / arch / arm64 / boot / dts / qcom / ipq8072-sax1v1k.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4
5 #include "ipq8074.dtsi"
6 #include "ipq8074-hk-cpu.dtsi"
7 #include "ipq8074-ess.dtsi"
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/input/input.h>
10 #include <dt-bindings/leds/common.h>
11
12 / {
13 model = "Spectrum SAX1V1K";
14 compatible = "spectrum,sax1v1k", "qcom,ipq8074";
15
16 aliases {
17 led-boot = &led_system_red;
18 led-failsafe = &led_system_red;
19 led-running = &led_system_blue;
20 led-upgrade = &led_system_red;
21 serial0 = &blsp1_uart5;
22 /* Aliases as required by u-boot to patch MAC addresses */
23 ethernet0 = &dp6_syn;
24 ethernet1 = &dp4;
25 ethernet2 = &dp3;
26 ethernet3 = &dp2;
27 label-mac-device = &dp6_syn;
28 };
29
30 chosen {
31 stdout-path = "serial0:115200n8";
32 };
33
34 keys {
35 compatible = "gpio-keys";
36
37 reset {
38 label = "reset";
39 gpios = <&tlmm 34 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_RESTART>;
41 };
42
43 wps {
44 label = "wps";
45 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_WPS_BUTTON>;
47 };
48 };
49
50 leds {
51 compatible = "gpio-leds";
52
53 led_system_blue: system-blue {
54 gpios = <&tlmm 26 GPIO_ACTIVE_HIGH>;
55 color = <LED_COLOR_ID_BLUE>;
56 function = LED_FUNCTION_STATUS;
57 };
58
59 led_system_red: system-red {
60 gpios = <&tlmm 25 GPIO_ACTIVE_HIGH>;
61 color = <LED_COLOR_ID_RED>;
62 function = LED_FUNCTION_STATUS;
63 };
64 };
65 };
66
67 &tlmm {
68 mdio_pins: mdio-pins {
69 mdc {
70 pins = "gpio68";
71 function = "mdc";
72 drive-strength = <8>;
73 bias-pull-up;
74 };
75
76 mdio {
77 pins = "gpio69";
78 function = "mdio";
79 drive-strength = <8>;
80 bias-pull-up;
81 };
82 };
83 };
84
85 &blsp1_uart5 {
86 status = "okay";
87 };
88
89 &prng {
90 status = "okay";
91 };
92
93 &cryptobam {
94 status = "okay";
95 };
96
97 &crypto {
98 status = "okay";
99 };
100
101 &qpic_bam {
102 status = "okay";
103 };
104
105 &mdio {
106 pinctrl-0 = <&mdio_pins>;
107 pinctrl-names = "default";
108 reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
109 status = "okay";
110
111 ethernet-phy-package@0 {
112 #address-cells = <1>;
113 #size-cells = <0>;
114 compatible = "qcom,qca8075-package";
115 reg = <0>;
116
117 qcom,package-mode = "qsgmii";
118
119 qca8075_1: ethernet-phy@1 {
120 compatible = "ethernet-phy-ieee802.3-c22";
121 reg = <1>;
122 };
123
124 qca8075_2: ethernet-phy@2 {
125 compatible = "ethernet-phy-ieee802.3-c22";
126 reg = <2>;
127 };
128
129 qca8075_3: ethernet-phy@3 {
130 compatible = "ethernet-phy-ieee802.3-c22";
131 reg = <3>;
132 };
133 };
134
135 qca8081: ethernet-phy@28 {
136 compatible = "ethernet-phy-id004d.d101";
137 reg = <28>;
138 reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
139 };
140 };
141
142 &sdhc_1 {
143 /* Following same rule as QNAP 301W
144 * the emmc has a problem with the hs400 > hs200 speed switch.
145 * Therefore remove the mmc-hs400-1_8v property
146 */
147 /delete-property/ mmc-hs400-1_8v;
148 mmc-hs200-1_8v;
149 mmc-ddr-1_8v;
150 vqmmc-supply = <&l11>;
151 status = "okay";
152 };
153
154 &switch {
155 switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
156 switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
157 switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
158 switch_mac_mode2 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance2*/
159 status = "okay";
160
161 qcom,port_phyinfo {
162 port@2 {
163 port_id = <2>;
164 phy_address = <1>;
165 };
166
167 port@3 {
168 port_id = <3>;
169 phy_address = <2>;
170 };
171
172 port@4 {
173 port_id = <4>;
174 phy_address = <3>;
175 };
176
177 port@6 {
178 port_id = <6>;
179 phy_address = <28>;
180 port_mac_sel = "QGMAC_PORT";
181 };
182 };
183 };
184
185 &edma {
186 status = "okay";
187 };
188
189 &dp2 {
190 phy-mode = "qsgmii";
191 phy-handle = <&qca8075_1>;
192 label = "lan3";
193 status = "okay";
194 };
195
196 &dp3 {
197 phy-mode = "qsgmii";
198 phy-handle = <&qca8075_2>;
199 label = "lan2";
200 status = "okay";
201 };
202
203 &dp4 {
204 phy-mode = "qsgmii";
205 phy-handle = <&qca8075_3>;
206 label = "lan1";
207 status = "okay";
208 };
209
210 &dp6_syn {
211 phy-handle = <&qca8081>;
212 label = "wan";
213 status = "okay";
214 };
215
216 &wifi {
217 qcom,ath11k-calibration-variant = "Spectrum-SAX1V1K";
218 status = "okay";
219 };