522fa12fd977aa95c69fe9a720d8308384ddbe80
[openwrt/staging/hauke.git] / target / linux / ipq806x / files / arch / arm / boot / dts / qcom-ipq8068-mr52.dts
1 // SPDX-License-Identifier: GPL-2.0 OR MIT
2
3 #include "qcom-ipq8068-cryptid-common.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8 model = "Meraki MR52";
9 compatible = "meraki,mr52", "qcom,ipq8064";
10
11 aliases {
12 serial1 = &gsbi1_serial;
13 mdio-gpio0 = &mdio_gpio0;
14 ethernet0 = &gmac2;
15 ethernet1 = &gmac3;
16
17 led-boot = &led_active;
18 led-failsafe = &led_power;
19 led-running = &led_active;
20 led-upgrade = &led_active;
21 };
22
23 keys {
24 compatible = "gpio-keys";
25 pinctrl-0 = <&button_pins>;
26 pinctrl-names = "default";
27
28 reset {
29 label = "reset";
30 gpios = <&qcom_pinmux 25 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_RESTART>;
32 debounce-interval = <60>;
33 wakeup-source;
34 };
35 };
36
37 leds {
38 compatible = "gpio-leds";
39 pinctrl-0 = <&led_pins>;
40 pinctrl-names = "default";
41
42 led_power: power {
43 label = "orange:power";
44 gpios = <&qcom_pinmux 19 GPIO_ACTIVE_HIGH>;
45 };
46
47 lan2_green {
48 label = "green:lan2";
49 gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
50 };
51
52 lan1_green {
53 label = "green:lan1";
54 gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
55 };
56
57 led_active: active {
58 label = "white:active";
59 gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
60 };
61
62 lan2_orange {
63 label = "orange:lan2";
64 gpios = <&qcom_pinmux 60 GPIO_ACTIVE_HIGH>;
65 };
66
67 lan1_orange {
68 label = "orange:lan1";
69 gpios = <&qcom_pinmux 62 GPIO_ACTIVE_HIGH>;
70 };
71 };
72 };
73
74 &gmac2 {
75 status = "okay";
76
77 qcom,id = <2>;
78 mdiobus = <&mdio0>;
79
80 phy-mode = "sgmii";
81 phy-handle = <&phy0>;
82
83 nvmem-cells = <&mac_address 0>;
84 nvmem-cell-names = "mac-address";
85 };
86
87 &gmac3 {
88 status = "okay";
89
90 qcom,id = <3>;
91 mdiobus = <&mdio_gpio0>;
92
93 phy-mode = "sgmii";
94 phy-handle = <&phy4>;
95
96 nvmem-cells = <&mac_address 1>;
97 nvmem-cell-names = "mac-address";
98 };
99
100 &gsbi7 {
101 status = "okay";
102 qcom,mode = <GSBI_PROT_I2C>;
103 };
104
105 &gsbi7_i2c {
106 status = "okay";
107
108 pinctrl-0 = <&i2c_pins>;
109 pinctrl-names = "default";
110
111 ina2xx@45 {
112 compatible = "ina219";
113 shunt-resistor = <80000>;
114 reg = <0x45>;
115 };
116
117 tlc591xx@49 {
118 #address-cells = <1>;
119 #size-cells = <0>;
120 compatible = "ti,tlc59108";
121 reg = <0x49>;
122
123 red@0 {
124 label = "red:user";
125 reg = <0x0>;
126 };
127
128 green@1 {
129 label = "green:user";
130 reg = <0x1>;
131 };
132
133 blue@2 {
134 label = "blue:user";
135 reg = <0x2>;
136 };
137 };
138
139 eeprom@52 {
140 compatible = "atmel,24c64";
141 pagesize = <32>;
142 reg = <0x52>;
143 read-only;
144
145 nvmem-layout {
146 compatible = "fixed-layout";
147 #address-cells = <1>;
148 #size-cells = <1>;
149
150 mac_address: mac-address@66 {
151 compatible = "mac-base";
152 reg = <0x66 0x6>;
153 #nvmem-cell-cells = <1>;
154 };
155 };
156 };
157 };
158
159 &qcom_pinmux {
160 i2c_pins: i2c_pins {
161 mux {
162 pins = "gpio8", "gpio9";
163 function = "gsbi7";
164 drive-strength = <2>;
165 bias-pull-up;
166 input;
167 };
168 };
169
170 led_pins: led_pins {
171 mux {
172 pins = "gpio19", "gpio26";
173 function = "gpio";
174 drive-strength = <12>;
175 bias-pull-down;
176 output-low;
177 };
178 };
179
180 button_pins: button_pins {
181 mux {
182 pins = "gpio25";
183 function = "gpio";
184 drive-strength = <2>;
185 bias-pull-up;
186 input;
187 };
188 };
189 };
190
191 &soc {
192 mdio_gpio0: mdio {
193 compatible = "virtual,mdio-gpio";
194 #address-cells = <1>;
195 #size-cells = <0>;
196
197 status = "okay";
198
199 pinctrl-0 = <&mdio0_pins_active>, <&phy_active>;
200 pinctrl-names = "default";
201
202 gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH
203 &qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
204
205 phy0: ethernet-phy0 {
206 reg = <0>;
207 reset-gpios = <&qcom_pinmux 7 GPIO_ACTIVE_LOW>;
208 reset-assert-us = <24000>;
209 };
210
211 phy4: ethernet-phy4 {
212 reg = <4>;
213 reset-gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
214 reset-assert-us = <24000>;
215 };
216 };
217 };
218
219 &wifi0 {
220 nvmem-cells = <&mac_address 4>;
221 nvmem-cell-names = "mac-address";
222 };
223
224 &wifi1 {
225 nvmem-cells = <&mac_address 3>;
226 nvmem-cell-names = "mac-address";
227 };
228
229 &wifi2 {
230 nvmem-cells = <&mac_address 2>;
231 nvmem-cell-names = "mac-address";
232 };
233
234 &hs_phy_0 {
235 status = "okay";
236 };
237
238 &ss_phy_0 {
239 status = "okay";
240 };
241
242 &usb3_0 {
243 status = "okay";
244 };
245
246 &hs_phy_1 {
247 status = "okay";
248 };
249
250 &ss_phy_1 {
251 status = "okay";
252 };
253
254 &usb3_1 {
255 status = "okay";
256 };