ipq40xx: add PoE passthrpugh GPIO
[openwrt/staging/blocktrron.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 reset-deassert-us = <10000>;
140 };
141 };
142
143 &sdhc_1 {
144 /* Following same rule as QNAP 301W
145 * the emmc has a problem with the hs400 > hs200 speed switch.
146 * Therefore remove the mmc-hs400-1_8v property
147 */
148 /delete-property/ mmc-hs400-1_8v;
149 mmc-hs200-1_8v;
150 mmc-ddr-1_8v;
151 vqmmc-supply = <&l11>;
152 status = "okay";
153 };
154
155 &switch {
156 switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
157 switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
158 switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
159 switch_mac_mode2 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance2*/
160 status = "okay";
161
162 qcom,port_phyinfo {
163 port@2 {
164 port_id = <2>;
165 phy_address = <1>;
166 };
167
168 port@3 {
169 port_id = <3>;
170 phy_address = <2>;
171 };
172
173 port@4 {
174 port_id = <4>;
175 phy_address = <3>;
176 };
177
178 port@6 {
179 port_id = <6>;
180 phy_address = <28>;
181 port_mac_sel = "QGMAC_PORT";
182 };
183 };
184 };
185
186 &edma {
187 status = "okay";
188 };
189
190 &dp2 {
191 phy-mode = "qsgmii";
192 phy-handle = <&qca8075_1>;
193 label = "lan3";
194 status = "okay";
195 };
196
197 &dp3 {
198 phy-mode = "qsgmii";
199 phy-handle = <&qca8075_2>;
200 label = "lan2";
201 status = "okay";
202 };
203
204 &dp4 {
205 phy-mode = "qsgmii";
206 phy-handle = <&qca8075_3>;
207 label = "lan1";
208 status = "okay";
209 };
210
211 &dp6_syn {
212 phy-handle = <&qca8081>;
213 label = "wan";
214 status = "okay";
215 };
216
217 &wifi {
218 qcom,ath11k-calibration-variant = "Spectrum-SAX1V1K";
219 status = "okay";
220 };