Merge tag 'usb-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[linux/fpc-iii.git] / arch / arm / boot / dts / qcom-ipq8064-rb3011.dts
blob282b89ce3d451b4233fd21ab49bdb62070b2607d
1 // SPDX-License-Identifier: GPL-2.0
2 #include "qcom-ipq8064.dtsi"
3 #include <dt-bindings/input/input.h>
5 / {
6         model = "MikroTik RB3011UiAS-RM";
7         compatible = "mikrotik,rb3011";
9         aliases {
10                 serial0 = &gsbi7_serial;
11                 ethernet0 = &gmac0;
12                 ethernet1 = &gmac3;
13                 mdio-gpio0 = &mdio0;
14                 mdio-gpio1 = &mdio1;
15         };
17         chosen {
18                 bootargs = "loglevel=8 console=ttyMSM0,115200";
19                 stdout-path = "serial0:115200n8";
20         };
22         memory@0 {
23                 reg = <0x42000000 0x3e000000>;
24                 device_type = "memory";
25         };
27         mdio0: mdio@0 {
28                 status = "okay";
29                 compatible = "virtual,mdio-gpio";
30                 gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>,
31                         <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
32                 #address-cells = <1>;
33                 #size-cells = <0>;
35                 pinctrl-0 = <&mdio0_pins>;
36                 pinctrl-names = "default";
38                 switch0: switch@10 {
39                         compatible = "qca,qca8337";
40                         #address-cells = <1>;
41                         #size-cells = <0>;
43                         dsa,member = <0 0>;
45                         pinctrl-0 = <&sw0_reset_pin>;
46                         pinctrl-names = "default";
48                         reset-gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
49                         reg = <0x10>;
51                         ports {
52                                 #address-cells = <1>;
53                                 #size-cells = <0>;
55                                 switch0cpu: port@0 {
56                                         reg = <0>;
57                                         label = "cpu";
58                                         ethernet = <&gmac0>;
59                                         phy-mode = "rgmii-id";
60                                         fixed-link {
61                                                 speed = <1000>;
62                                                 full-duplex;
63                                         };
64                                 };
66                                 port@1 {
67                                         reg = <1>;
68                                         label = "sw1";
69                                 };
71                                 port@2 {
72                                         reg = <2>;
73                                         label = "sw2";
74                                 };
76                                 port@3 {
77                                         reg = <3>;
78                                         label = "sw3";
79                                 };
81                                 port@4 {
82                                         reg = <4>;
83                                         label = "sw4";
84                                 };
86                                 port@5 {
87                                         reg = <5>;
88                                         label = "sw5";
89                                 };
90                         };
91                 };
92         };
94         mdio1: mdio@1 {
95                 status = "okay";
96                 compatible = "virtual,mdio-gpio";
97                 gpios = <&qcom_pinmux 11 GPIO_ACTIVE_HIGH>,
98                         <&qcom_pinmux 10 GPIO_ACTIVE_HIGH>;
99                 #address-cells = <1>;
100                 #size-cells = <0>;
102                 pinctrl-0 = <&mdio1_pins>;
103                 pinctrl-names = "default";
105                 switch1: switch@14 {
106                         compatible = "qca,qca8337";
107                         #address-cells = <1>;
108                         #size-cells = <0>;
110                         dsa,member = <1 0>;
112                         pinctrl-0 = <&sw1_reset_pin>;
113                         pinctrl-names = "default";
115                         reset-gpios = <&qcom_pinmux 17 GPIO_ACTIVE_LOW>;
116                         reg = <0x10>;
118                         ports {
119                                 #address-cells = <1>;
120                                 #size-cells = <0>;
122                                 switch1cpu: port@0 {
123                                         reg = <0>;
124                                         label = "cpu";
125                                         ethernet = <&gmac3>;
126                                         phy-mode = "sgmii";
127                                         fixed-link {
128                                                 speed = <1000>;
129                                                 full-duplex;
130                                         };
131                                 };
133                                 port@1 {
134                                         reg = <1>;
135                                         label = "sw6";
136                                 };
138                                 port@2 {
139                                         reg = <2>;
140                                         label = "sw7";
141                                 };
143                                 port@3 {
144                                         reg = <3>;
145                                         label = "sw8";
146                                 };
148                                 port@4 {
149                                         reg = <4>;
150                                         label = "sw9";
151                                 };
153                                 port@5 {
154                                         reg = <5>;
155                                         label = "sw10";
156                                 };
157                         };
158                 };
159         };
161         soc {
162                 gsbi5: gsbi@1a200000 {
163                         qcom,mode = <GSBI_PROT_SPI>;
164                         status = "okay";
166                         spi4: spi@1a280000 {
167                                 status = "okay";
168                                 spi-max-frequency = <50000000>;
170                                 pinctrl-0 = <&spi_pins>;
171                                 pinctrl-names = "default";
173                                 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
175                                 norflash: s25fl016k@0 {
176                                         compatible = "jedec,spi-nor";
177                                         #address-cells = <1>;
178                                         #size-cells = <1>;
179                                         spi-max-frequency = <50000000>;
180                                         reg = <0>;
182                                         partition@0 {
183                                                 label = "RouterBoot";
184                                                 reg = <0x0 0x40000>;
185                                         };
186                                 };
187                         };
188                 };
190                 gpio_keys {
191                         compatible = "gpio-keys";
192                         pinctrl-0 = <&buttons_pins>;
193                         pinctrl-names = "default";
195                         button@1 {
196                                 label = "reset";
197                                 linux,code = <KEY_RESTART>;
198                                 gpios = <&qcom_pinmux 66 GPIO_ACTIVE_LOW>;
199                                 linux,input-type = <1>;
200                                 debounce-interval = <60>;
201                         };
202                 };
204                 leds {
205                         compatible = "gpio-leds";
206                         pinctrl-0 = <&leds_pins>;
207                         pinctrl-names = "default";
209                         led@7 {
210                                 label = "rb3011:green:user";
211                                 gpios = <&qcom_pinmux 33 GPIO_ACTIVE_HIGH>;
212                                 default-state = "off";
213                         };
214                 };
216         };
219 &gmac0 {
220         status = "okay";
222         phy-mode = "rgmii";
223         qcom,id = <0>;
224         phy-handle = <&switch0cpu>;
226         fixed-link {
227                 speed = <1000>;
228                 full-duplex;
229         };
232 &gmac3 {
233         status = "okay";
235         phy-mode = "sgmii";
236         qcom,id = <3>;
237         phy-handle = <&switch1cpu>;
239         fixed-link {
240                 speed = <1000>;
241                 full-duplex;
242         };
245 &gsbi7 {
246         status = "okay";
247         qcom,mode = <GSBI_PROT_I2C_UART>;
250 &gsbi7_serial {
251         status = "okay";
254 &qcom_pinmux {
255         buttons_pins: buttons_pins {
256                 mux {
257                         pins = "gpio66";
258                         drive-strength = <16>;
259                         bias-disable;
260                 };
261         };
263         leds_pins: leds_pins {
264                 mux {
265                         pins = "gpio33";
266                         drive-strength = <16>;
267                         bias-disable;
268                 };
269         };
271         mdio0_pins: mdio0_pins {
272                 mux {
273                         pins = "gpio0", "gpio1";
274                         function = "gpio";
275                         drive-strength = <8>;
276                         bias-disable;
277                 };
278         };
280         mdio1_pins: mdio1_pins {
281                 mux {
282                         pins = "gpio10", "gpio11";
283                         function = "gpio";
284                         drive-strength = <8>;
285                         bias-disable;
286                 };
287         };
289         sw0_reset_pin: sw0_reset_pin {
290                 mux {
291                         pins = "gpio16";
292                         drive-strength = <16>;
293                         function = "gpio";
294                         bias-disable;
295                         input-disable;
296                 };
297         };
299         sw1_reset_pin: sw1_reset_pin {
300                 mux {
301                         pins = "gpio17";
302                         drive-strength = <16>;
303                         function = "gpio";
304                         bias-disable;
305                         input-disable;
306                 };
307         };