Linux Audio

Check our new training course

Loading...
v6.2
  1// SPDX-License-Identifier: GPL-2.0
  2#include "qcom-ipq8064.dtsi"
  3#include <dt-bindings/input/input.h>
  4#include <dt-bindings/leds/common.h>
  5
  6/ {
  7	model = "MikroTik RB3011UiAS-RM";
  8	compatible = "mikrotik,rb3011", "qcom,ipq8064";
  9
 10	aliases {
 11		serial0 = &gsbi7_serial;
 12		ethernet0 = &gmac0;
 13		ethernet1 = &gmac3;
 14		mdio-gpio0 = &mdio0;
 15		mdio-gpio1 = &mdio1;
 16	};
 17
 18	chosen {
 19		bootargs = "loglevel=8 console=ttyMSM0,115200";
 20		stdout-path = "serial0:115200n8";
 21	};
 22
 23	memory@42000000 {
 24		reg = <0x42000000 0x3e000000>;
 25		device_type = "memory";
 26	};
 27
 28	mdio0: mdio-0 {
 29		status = "okay";
 30		compatible = "virtual,mdio-gpio";
 31		gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>,
 32			<&qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
 33		#address-cells = <1>;
 34		#size-cells = <0>;
 35
 36		pinctrl-0 = <&mdio0_pins>;
 37		pinctrl-names = "default";
 38
 39		switch0: switch@10 {
 40			compatible = "qca,qca8337";
 41			#address-cells = <1>;
 42			#size-cells = <0>;
 43
 44			dsa,member = <0 0>;
 45
 46			pinctrl-0 = <&sw0_reset_pin>;
 47			pinctrl-names = "default";
 48
 49			reset-gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
 50			reg = <0x10>;
 51
 52			ports {
 53				#address-cells = <1>;
 54				#size-cells = <0>;
 55
 56				switch0cpu: port@0 {
 57					reg = <0>;
 58					label = "cpu";
 59					ethernet = <&gmac0>;
 60					phy-mode = "rgmii-id";
 61					fixed-link {
 62						speed = <1000>;
 63						full-duplex;
 64					};
 65				};
 66
 67				port@1 {
 68					reg = <1>;
 69					label = "sw1";
 70				};
 71
 72				port@2 {
 73					reg = <2>;
 74					label = "sw2";
 75				};
 76
 77				port@3 {
 78					reg = <3>;
 79					label = "sw3";
 80				};
 81
 82				port@4 {
 83					reg = <4>;
 84					label = "sw4";
 85				};
 86
 87				port@5 {
 88					reg = <5>;
 89					label = "sw5";
 90				};
 91			};
 92		};
 93	};
 94
 95	mdio1: mdio-1 {
 96		status = "okay";
 97		compatible = "virtual,mdio-gpio";
 98		gpios = <&qcom_pinmux 11 GPIO_ACTIVE_HIGH>,
 99			<&qcom_pinmux 10 GPIO_ACTIVE_HIGH>;
100		#address-cells = <1>;
101		#size-cells = <0>;
102
103		pinctrl-0 = <&mdio1_pins>;
104		pinctrl-names = "default";
105
106		switch1: switch@14 {
107			compatible = "qca,qca8337";
108			#address-cells = <1>;
109			#size-cells = <0>;
110
111			dsa,member = <1 0>;
112
113			pinctrl-0 = <&sw1_reset_pin>;
114			pinctrl-names = "default";
115
116			reset-gpios = <&qcom_pinmux 17 GPIO_ACTIVE_LOW>;
117			reg = <0x10>;
118
119			ports {
120				#address-cells = <1>;
121				#size-cells = <0>;
122
123				switch1cpu: port@0 {
124					reg = <0>;
125					label = "cpu";
126					ethernet = <&gmac3>;
127					phy-mode = "sgmii";
128					fixed-link {
129						speed = <1000>;
130						full-duplex;
131					};
132				};
133
134				port@1 {
135					reg = <1>;
136					label = "sw6";
137				};
138
139				port@2 {
140					reg = <2>;
141					label = "sw7";
142				};
143
144				port@3 {
145					reg = <3>;
146					label = "sw8";
147				};
148
149				port@4 {
150					reg = <4>;
151					label = "sw9";
152				};
153
154				port@5 {
155					reg = <5>;
156					label = "sw10";
157				};
158			};
159		};
160	};
161
162	soc {
163		gsbi5: gsbi@1a200000 {
164			qcom,mode = <GSBI_PROT_SPI>;
165			status = "okay";
166
167			spi4: spi@1a280000 {
168				status = "okay";
169				spi-max-frequency = <50000000>;
170
171				pinctrl-0 = <&spi_pins>;
172				pinctrl-names = "default";
173
174				cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
175
176				norflash: flash@0 {
177					compatible = "jedec,spi-nor";
178					#address-cells = <1>;
179					#size-cells = <1>;
180					spi-max-frequency = <50000000>;
181					reg = <0>;
182
183					partition@0 {
184						label = "RouterBoot";
185						reg = <0x0 0x40000>;
186					};
187				};
188			};
189		};
190
191		gpio-keys {
192			compatible = "gpio-keys";
193			pinctrl-0 = <&buttons_pins>;
194			pinctrl-names = "default";
195
196			button {
197				label = "reset";
198				linux,code = <KEY_RESTART>;
199				gpios = <&qcom_pinmux 66 GPIO_ACTIVE_LOW>;
200				linux,input-type = <1>;
201				debounce-interval = <60>;
202			};
203		};
204
205		leds {
206			compatible = "gpio-leds";
207			pinctrl-0 = <&leds_pins>;
208			pinctrl-names = "default";
209
210			led@7 {
211				label = "rb3011:green:user";
212				color = <LED_COLOR_ID_GREEN>;
213				gpios = <&qcom_pinmux 33 GPIO_ACTIVE_HIGH>;
214				default-state = "off";
215			};
216		};
217
218	};
219};
220
221&adm_dma {
222	status = "okay";
223};
224
225&gmac0 {
226	status = "okay";
227
228	phy-mode = "rgmii";
229	qcom,id = <0>;
230	phy-handle = <&switch0cpu>;
231
232	fixed-link {
233		speed = <1000>;
234		full-duplex;
235	};
236};
237
238&gmac3 {
239	status = "okay";
240
241	phy-mode = "sgmii";
242	qcom,id = <3>;
243	phy-handle = <&switch1cpu>;
244
245	fixed-link {
246		speed = <1000>;
247		full-duplex;
248	};
249};
250
251&gsbi7 {
252	status = "okay";
253	qcom,mode = <GSBI_PROT_I2C_UART>;
254};
255
256&gsbi7_serial {
257	status = "okay";
258};
259
260&hs_phy_1 {
261	status = "okay";
262};
263
264&nand {
265	status = "okay";
266
267	nand@0 {
 
268		reg = <0>;
269
270		nand-ecc-strength = <4>;
271		nand-bus-width = <8>;
272		nand-ecc-step-size = <512>;
273
274		partitions {
275			compatible = "fixed-partitions";
276			#address-cells = <1>;
277			#size-cells = <1>;
278
279			boot@0 {
280				label = "RouterBoard NAND 1 Boot";
281				reg = <0x0000000 0x0800000>;
282			};
283
284			main@800000 {
285				label = "RouterBoard NAND 1 Main";
286				reg = <0x0800000 0x7800000>;
287			};
288		};
289	};
290};
291
292&qcom_pinmux {
293	buttons_pins: buttons_pins {
294		mux {
295			pins = "gpio66";
296			drive-strength = <16>;
297			bias-disable;
298		};
299	};
300
301	leds_pins: leds_pins {
302		mux {
303			pins = "gpio33";
304			drive-strength = <16>;
 
 
 
 
 
 
 
 
 
305			bias-disable;
306		};
307	};
308
309	mdio1_pins: mdio1_pins {
310		mux {
311			pins = "gpio10", "gpio11";
312			function = "gpio";
313			drive-strength = <8>;
314			bias-disable;
315		};
316	};
317
318	sw0_reset_pin: sw0_reset_pin {
319		mux {
320			pins = "gpio16";
321			drive-strength = <16>;
322			function = "gpio";
323			bias-disable;
324			input-disable;
325		};
326	};
327
328	sw1_reset_pin: sw1_reset_pin {
329		mux {
330			pins = "gpio17";
331			drive-strength = <16>;
332			function = "gpio";
333			bias-disable;
334			input-disable;
335		};
336	};
337
338	usb1_pwr_en_pins: usb1_pwr_en_pins {
339		mux {
340			pins = "gpio4";
341			function = "gpio";
342			drive-strength = <16>;
343			bias-disable;
344			output-high;
345		};
346	};
347};
348
349&ss_phy_1 {
350	status = "okay";
351};
352
353&usb3_1 {
354	pinctrl-0 = <&usb1_pwr_en_pins>;
355	pinctrl-names = "default";
356
357	status = "okay";
358};
v5.14.15
  1// SPDX-License-Identifier: GPL-2.0
  2#include "qcom-ipq8064.dtsi"
  3#include <dt-bindings/input/input.h>
 
  4
  5/ {
  6	model = "MikroTik RB3011UiAS-RM";
  7	compatible = "mikrotik,rb3011";
  8
  9	aliases {
 10		serial0 = &gsbi7_serial;
 11		ethernet0 = &gmac0;
 12		ethernet1 = &gmac3;
 13		mdio-gpio0 = &mdio0;
 14		mdio-gpio1 = &mdio1;
 15	};
 16
 17	chosen {
 18		bootargs = "loglevel=8 console=ttyMSM0,115200";
 19		stdout-path = "serial0:115200n8";
 20	};
 21
 22	memory@0 {
 23		reg = <0x42000000 0x3e000000>;
 24		device_type = "memory";
 25	};
 26
 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>;
 34
 35		pinctrl-0 = <&mdio0_pins>;
 36		pinctrl-names = "default";
 37
 38		switch0: switch@10 {
 39			compatible = "qca,qca8337";
 40			#address-cells = <1>;
 41			#size-cells = <0>;
 42
 43			dsa,member = <0 0>;
 44
 45			pinctrl-0 = <&sw0_reset_pin>;
 46			pinctrl-names = "default";
 47
 48			reset-gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
 49			reg = <0x10>;
 50
 51			ports {
 52				#address-cells = <1>;
 53				#size-cells = <0>;
 54
 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				};
 65
 66				port@1 {
 67					reg = <1>;
 68					label = "sw1";
 69				};
 70
 71				port@2 {
 72					reg = <2>;
 73					label = "sw2";
 74				};
 75
 76				port@3 {
 77					reg = <3>;
 78					label = "sw3";
 79				};
 80
 81				port@4 {
 82					reg = <4>;
 83					label = "sw4";
 84				};
 85
 86				port@5 {
 87					reg = <5>;
 88					label = "sw5";
 89				};
 90			};
 91		};
 92	};
 93
 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>;
101
102		pinctrl-0 = <&mdio1_pins>;
103		pinctrl-names = "default";
104
105		switch1: switch@14 {
106			compatible = "qca,qca8337";
107			#address-cells = <1>;
108			#size-cells = <0>;
109
110			dsa,member = <1 0>;
111
112			pinctrl-0 = <&sw1_reset_pin>;
113			pinctrl-names = "default";
114
115			reset-gpios = <&qcom_pinmux 17 GPIO_ACTIVE_LOW>;
116			reg = <0x10>;
117
118			ports {
119				#address-cells = <1>;
120				#size-cells = <0>;
121
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				};
132
133				port@1 {
134					reg = <1>;
135					label = "sw6";
136				};
137
138				port@2 {
139					reg = <2>;
140					label = "sw7";
141				};
142
143				port@3 {
144					reg = <3>;
145					label = "sw8";
146				};
147
148				port@4 {
149					reg = <4>;
150					label = "sw9";
151				};
152
153				port@5 {
154					reg = <5>;
155					label = "sw10";
156				};
157			};
158		};
159	};
160
161	soc {
162		gsbi5: gsbi@1a200000 {
163			qcom,mode = <GSBI_PROT_SPI>;
164			status = "okay";
165
166			spi4: spi@1a280000 {
167				status = "okay";
168				spi-max-frequency = <50000000>;
169
170				pinctrl-0 = <&spi_pins>;
171				pinctrl-names = "default";
172
173				cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
174
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>;
181
182					partition@0 {
183						label = "RouterBoot";
184						reg = <0x0 0x40000>;
185					};
186				};
187			};
188		};
189
190		gpio_keys {
191			compatible = "gpio-keys";
192			pinctrl-0 = <&buttons_pins>;
193			pinctrl-names = "default";
194
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		};
203
204		leds {
205			compatible = "gpio-leds";
206			pinctrl-0 = <&leds_pins>;
207			pinctrl-names = "default";
208
209			led@7 {
210				label = "rb3011:green:user";
 
211				gpios = <&qcom_pinmux 33 GPIO_ACTIVE_HIGH>;
212				default-state = "off";
213			};
214		};
215
216	};
217};
218
219&adm_dma {
220	status = "okay";
221};
222
223&gmac0 {
224	status = "okay";
225
226	phy-mode = "rgmii";
227	qcom,id = <0>;
228	phy-handle = <&switch0cpu>;
229
230	fixed-link {
231		speed = <1000>;
232		full-duplex;
233	};
234};
235
236&gmac3 {
237	status = "okay";
238
239	phy-mode = "sgmii";
240	qcom,id = <3>;
241	phy-handle = <&switch1cpu>;
242
243	fixed-link {
244		speed = <1000>;
245		full-duplex;
246	};
247};
248
249&gsbi7 {
250	status = "okay";
251	qcom,mode = <GSBI_PROT_I2C_UART>;
252};
253
254&gsbi7_serial {
255	status = "okay";
256};
257
258&hs_phy_1 {
259	status = "okay";
260};
261
262&nand {
263	status = "okay";
264
265	nandcs@0 {
266		compatible = "qcom,nandcs";
267		reg = <0>;
268
269		nand-ecc-strength = <4>;
270		nand-bus-width = <8>;
271		nand-ecc-step-size = <512>;
272
273		partitions {
274			compatible = "fixed-partitions";
275			#address-cells = <1>;
276			#size-cells = <1>;
277
278			boot@0 {
279				label = "RouterBoard NAND 1 Boot";
280				reg = <0x0000000 0x0800000>;
281			};
282
283			main@800000 {
284				label = "RouterBoard NAND 1 Main";
285				reg = <0x0800000 0x7800000>;
286			};
287		};
288	};
289};
290
291&qcom_pinmux {
292	buttons_pins: buttons_pins {
293		mux {
294			pins = "gpio66";
295			drive-strength = <16>;
296			bias-disable;
297		};
298	};
299
300	leds_pins: leds_pins {
301		mux {
302			pins = "gpio33";
303			drive-strength = <16>;
304			bias-disable;
305		};
306	};
307
308	mdio0_pins: mdio0_pins {
309		mux {
310			pins = "gpio0", "gpio1";
311			function = "gpio";
312			drive-strength = <8>;
313			bias-disable;
314		};
315	};
316
317	mdio1_pins: mdio1_pins {
318		mux {
319			pins = "gpio10", "gpio11";
320			function = "gpio";
321			drive-strength = <8>;
322			bias-disable;
323		};
324	};
325
326	sw0_reset_pin: sw0_reset_pin {
327		mux {
328			pins = "gpio16";
329			drive-strength = <16>;
330			function = "gpio";
331			bias-disable;
332			input-disable;
333		};
334	};
335
336	sw1_reset_pin: sw1_reset_pin {
337		mux {
338			pins = "gpio17";
339			drive-strength = <16>;
340			function = "gpio";
341			bias-disable;
342			input-disable;
343		};
344	};
345
346	usb1_pwr_en_pins: usb1_pwr_en_pins {
347		mux {
348			pins = "gpio4";
349			function = "gpio";
350			drive-strength = <16>;
351			bias-disable;
352			output-high;
353		};
354	};
355};
356
357&ss_phy_1 {
358	status = "okay";
359};
360
361&usb3_1 {
362	pinctrl-0 = <&usb1_pwr_en_pins>;
363	pinctrl-names = "default";
364
365	status = "okay";
366};