ipq806x: add support for Cisco Meraki MR42/MR52
[openwrt/openwrt.git] / target / linux / ipq806x / files / arch / arm / boot / dts / qcom-ipq8068-mr42.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 MR42";
9 compatible = "meraki,mr42", "qcom,ipq8064";
10
11 aliases {
12 serial1 = &gsbi1_serial;
13 ethernet0 = &gmac3;
14
15 led-boot = &led_active;
16 led-failsafe = &led_power;
17 led-running = &led_active;
18 led-upgrade = &led_active;
19 };
20
21 keys {
22 compatible = "gpio-keys";
23 pinctrl-0 = <&button_pins>;
24 pinctrl-names = "default";
25
26 reset {
27 label = "reset";
28 gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_RESTART>;
30 debounce-interval = <60>;
31 wakeup-source;
32 };
33 };
34
35 leds {
36 compatible = "gpio-leds";
37 pinctrl-0 = <&led_pins>;
38 pinctrl-names = "default";
39
40 led_power: power {
41 label = "orange:power";
42 gpios = <&qcom_pinmux 31 GPIO_ACTIVE_HIGH>;
43 };
44
45 led_active: active {
46 label = "white:active";
47 gpios = <&qcom_pinmux 32 GPIO_ACTIVE_HIGH>;
48 };
49 };
50 };
51
52 &gmac3 {
53 status = "okay";
54
55 qcom,id = <3>;
56 mdiobus = <&mdio0>;
57
58 phy-mode = "sgmii";
59 phy-handle = <&phy2>;
60
61 nvmem-cells = <&mac_address>;
62 nvmem-cell-names = "mac-address";
63 };
64
65 &gsbi2 {
66 status = "okay";
67 qcom,mode = <GSBI_PROT_I2C>;
68 };
69
70 &gsbi2_i2c {
71 status = "okay";
72
73 pinctrl-0 = <&i2c0_pins>;
74 pinctrl-names = "default";
75
76 ina2xx@40 {
77 compatible = "ina219";
78 shunt-resistor = <40000>;
79 reg = <0x40>;
80 };
81
82 eeprom@56 {
83 compatible = "atmel,24c64";
84 pagesize = <32>;
85 reg = <0x56>;
86 read-only;
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 mac_address: mac-address@66 {
91 reg = <0x66 0x6>;
92 };
93 };
94 };
95
96 &gsbi6 {
97 qcom,mode = <GSBI_PROT_I2C>;
98 status = "okay";
99 };
100
101 &gsbi6_i2c {
102 status = "okay";
103
104 pinctrl-0 = <&i2c1_pins>;
105 pinctrl-names = "default";
106
107 tlc591xx@40 {
108 #address-cells = <1>;
109 #size-cells = <0>;
110 compatible = "ti,tlc59108";
111 reg = <0x40>;
112
113 red@0 {
114 label = "red:user";
115 reg = <0x0>;
116 };
117
118 green@1 {
119 label = "green:user";
120 reg = <0x1>;
121 };
122
123 blue@2 {
124 label = "blue:user";
125 reg = <0x2>;
126 };
127 };
128 };
129
130 &mdio0 {
131 status = "okay";
132
133 pinctrl-0 = <&mdio0_pins_active>, <&phy_active>;
134 pinctrl-names = "default";
135
136 phy2: ethernet-phy2 {
137 reg = <2>;
138
139 reset-gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
140 reset-assert-us = <24000>;
141
142 eee-broken-100tx;
143 eee-broken-1000t;
144 };
145 };
146
147 &qcom_pinmux {
148 i2c0_pins: i2c0_pins {
149 mux {
150 pins = "gpio24", "gpio25";
151 function = "gsbi2";
152 drive-strength = <2>;
153 bias-pull-up;
154 input;
155 };
156 };
157
158 button_pins: button_pins {
159 mux {
160 pins = "gpio26";
161 function = "gpio";
162 drive-strength = <2>;
163 bias-pull-up;
164 };
165 };
166
167 i2c1_pins: i2c1_pins {
168 mux {
169 pins = "gpio29", "gpio30";
170 function = "gsbi6";
171 drive-strength = <2>;
172 bias-pull-up;
173 input;
174 };
175 };
176
177 led_pins: led_pins {
178 mux {
179 pins = "gpio31", "gpio32";
180 function = "gpio";
181 drive-strength = <12>;
182 bias-pull-down;
183 output-low;
184 };
185 };
186 };
187
188 &wifi0 {
189 nvmem-cells = <&mac_address>;
190 nvmem-cell-names = "mac-address";
191 mac-address-increment = <1>;
192 };
193
194 &wifi1 {
195 nvmem-cells = <&mac_address>;
196 nvmem-cell-names = "mac-address";
197 mac-address-increment = <2>;
198 };
199
200 &wifi2 {
201 nvmem-cells = <&mac_address>;
202 nvmem-cell-names = "mac-address";
203 mac-address-increment = <3>;
204 };