ipq806x: add support for Cisco Meraki MR42/MR52
[openwrt/openwrt.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>;
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>;
97 nvmem-cell-names = "mac-address";
98 mac-address-increment = <1>;
99 };
100
101 &gsbi7 {
102 status = "okay";
103 qcom,mode = <GSBI_PROT_I2C>;
104 };
105
106 &gsbi7_i2c {
107 status = "okay";
108
109 pinctrl-0 = <&i2c_pins>;
110 pinctrl-names = "default";
111
112 ina2xx@45 {
113 compatible = "ina219";
114 shunt-resistor = <80000>;
115 reg = <0x45>;
116 };
117
118 tlc591xx@49 {
119 #address-cells = <1>;
120 #size-cells = <0>;
121 compatible = "ti,tlc59108";
122 reg = <0x49>;
123
124 red@0 {
125 label = "red:user";
126 reg = <0x0>;
127 };
128
129 green@1 {
130 label = "green:user";
131 reg = <0x1>;
132 };
133
134 blue@2 {
135 label = "blue:user";
136 reg = <0x2>;
137 };
138 };
139
140 eeprom@52 {
141 compatible = "atmel,24c64";
142 pagesize = <32>;
143 reg = <0x52>;
144 read-only;
145 #address-cells = <1>;
146 #size-cells = <1>;
147
148 mac_address: mac-address@66 {
149 reg = <0x66 0x6>;
150 };
151 };
152 };
153
154 &qcom_pinmux {
155 i2c_pins: i2c_pins {
156 mux {
157 pins = "gpio8", "gpio9";
158 function = "gsbi7";
159 drive-strength = <2>;
160 bias-pull-up;
161 input;
162 };
163 };
164
165 led_pins: led_pins {
166 mux {
167 pins = "gpio19", "gpio26";
168 function = "gpio";
169 drive-strength = <12>;
170 bias-pull-down;
171 output-low;
172 };
173 };
174
175 button_pins: button_pins {
176 mux {
177 pins = "gpio25";
178 function = "gpio";
179 drive-strength = <2>;
180 bias-pull-up;
181 input;
182 };
183 };
184 };
185
186 &soc {
187 mdio_gpio0: mdio {
188 compatible = "virtual,mdio-gpio";
189 #address-cells = <1>;
190 #size-cells = <0>;
191
192 status = "okay";
193
194 pinctrl-0 = <&mdio0_pins_active>, <&phy_active>;
195 pinctrl-names = "default";
196
197 gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH
198 &qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
199
200 phy0: ethernet-phy0 {
201 reg = <0>;
202 reset-gpios = <&qcom_pinmux 7 GPIO_ACTIVE_LOW>;
203 reset-assert-us = <24000>;
204 };
205
206 phy4: ethernet-phy4 {
207 reg = <4>;
208 reset-gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
209 reset-assert-us = <24000>;
210 };
211 };
212 };
213
214 &wifi0 {
215 nvmem-cells = <&mac_address>;
216 nvmem-cell-names = "mac-address";
217 mac-address-increment = <4>;
218 };
219
220 &wifi1 {
221 nvmem-cells = <&mac_address>;
222 nvmem-cell-names = "mac-address";
223 mac-address-increment = <3>;
224 };
225
226 &wifi2 {
227 nvmem-cells = <&mac_address>;
228 nvmem-cell-names = "mac-address";
229 mac-address-increment = <2>;
230 };