Linux Audio

Check our new training course

In-person Linux kernel drivers training

Jun 16-20, 2025
Register
Loading...
v6.2
  1// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
  2/*
  3 * Copyright (C) STMicroelectronics 2017 - All Rights Reserved
  4 * Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.
  5 */
  6/dts-v1/;
  7
  8#include "stm32mp157.dtsi"
  9#include "stm32mp15xc.dtsi"
 10#include "stm32mp15-pinctrl.dtsi"
 11#include "stm32mp15xxaa-pinctrl.dtsi"
 12#include <dt-bindings/gpio/gpio.h>
 13#include <dt-bindings/mfd/st,stpmic1.h>
 14
 15/ {
 16	model = "STMicroelectronics STM32MP157C eval daughter";
 17	compatible = "st,stm32mp157c-ed1", "st,stm32mp157";
 18
 19	chosen {
 20		stdout-path = "serial0:115200n8";
 21	};
 22
 23	memory@c0000000 {
 24		device_type = "memory";
 25		reg = <0xC0000000 0x40000000>;
 26	};
 27
 28	reserved-memory {
 29		#address-cells = <1>;
 30		#size-cells = <1>;
 31		ranges;
 32
 33		mcuram2: mcuram2@10000000 {
 34			compatible = "shared-dma-pool";
 35			reg = <0x10000000 0x40000>;
 36			no-map;
 37		};
 38
 39		vdev0vring0: vdev0vring0@10040000 {
 40			compatible = "shared-dma-pool";
 41			reg = <0x10040000 0x1000>;
 42			no-map;
 43		};
 44
 45		vdev0vring1: vdev0vring1@10041000 {
 46			compatible = "shared-dma-pool";
 47			reg = <0x10041000 0x1000>;
 48			no-map;
 49		};
 50
 51		vdev0buffer: vdev0buffer@10042000 {
 52			compatible = "shared-dma-pool";
 53			reg = <0x10042000 0x4000>;
 54			no-map;
 55		};
 56
 57		mcuram: mcuram@30000000 {
 58			compatible = "shared-dma-pool";
 59			reg = <0x30000000 0x40000>;
 60			no-map;
 61		};
 62
 63		retram: retram@38000000 {
 64			compatible = "shared-dma-pool";
 65			reg = <0x38000000 0x10000>;
 66			no-map;
 67		};
 68
 69		gpu_reserved: gpu@e8000000 {
 70			reg = <0xe8000000 0x8000000>;
 71			no-map;
 72		};
 73	};
 74
 75	aliases {
 76		serial0 = &uart4;
 77	};
 78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 79	sd_switch: regulator-sd_switch {
 80		compatible = "regulator-gpio";
 81		regulator-name = "sd_switch";
 82		regulator-min-microvolt = <1800000>;
 83		regulator-max-microvolt = <2900000>;
 84		regulator-type = "voltage";
 85		regulator-always-on;
 86
 87		gpios = <&gpiof 14 GPIO_ACTIVE_HIGH>;
 88		gpios-states = <0>;
 89		states = <1800000 0x1>,
 90			 <2900000 0x0>;
 91	};
 92
 93	vin: vin {
 94		compatible = "regulator-fixed";
 95		regulator-name = "vin";
 96		regulator-min-microvolt = <5000000>;
 97		regulator-max-microvolt = <5000000>;
 98		regulator-always-on;
 99	};
100};
101
102&adc {
103	/* ANA0, ANA1 are dedicated pins and don't need pinctrl: only in6. */
104	pinctrl-0 = <&adc1_in6_pins_a>;
105	pinctrl-names = "default";
106	vdd-supply = <&vdd>;
107	vdda-supply = <&vdda>;
108	vref-supply = <&vdda>;
109	status = "disabled";
110	adc1: adc@0 {
111		st,adc-channels = <0 1 6>;
112		/* 16.5 ck_cycles sampling time */
113		st,min-sample-time-nsecs = <400>;
114		status = "okay";
115	};
116};
117
118&crc1 {
119	status = "okay";
120};
121
122&cryp1 {
123	status = "okay";
124};
125
126&dac {
127	pinctrl-names = "default";
128	pinctrl-0 = <&dac_ch1_pins_a &dac_ch2_pins_a>;
129	vref-supply = <&vdda>;
130	status = "disabled";
131	dac1: dac@1 {
132		status = "okay";
133	};
134	dac2: dac@2 {
135		status = "okay";
136	};
137};
138
139&dts {
140	status = "okay";
141};
142
143&gpu {
144	contiguous-area = <&gpu_reserved>;
145};
146
147&hash1 {
148	status = "okay";
149};
150
151&i2c4 {
152	pinctrl-names = "default", "sleep";
153	pinctrl-0 = <&i2c4_pins_a>;
154	pinctrl-1 = <&i2c4_sleep_pins_a>;
155	i2c-scl-rising-time-ns = <185>;
156	i2c-scl-falling-time-ns = <20>;
157	clock-frequency = <400000>;
158	status = "okay";
159	/* spare dmas for other usage */
160	/delete-property/dmas;
161	/delete-property/dma-names;
162
163	pmic: stpmic@33 {
164		compatible = "st,stpmic1";
165		reg = <0x33>;
166		interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
167		interrupt-controller;
168		#interrupt-cells = <2>;
169		status = "okay";
170
171		regulators {
172			compatible = "st,stpmic1-regulators";
173			buck1-supply = <&vin>;
174			buck2-supply = <&vin>;
175			buck3-supply = <&vin>;
176			buck4-supply = <&vin>;
177			ldo1-supply = <&v3v3>;
178			ldo2-supply = <&v3v3>;
179			ldo3-supply = <&vdd_ddr>;
180			ldo4-supply = <&vin>;
181			ldo5-supply = <&v3v3>;
182			ldo6-supply = <&v3v3>;
183			vref_ddr-supply = <&vin>;
184			boost-supply = <&vin>;
185			pwr_sw1-supply = <&bst_out>;
186			pwr_sw2-supply = <&bst_out>;
187
188			vddcore: buck1 {
189				regulator-name = "vddcore";
190				regulator-min-microvolt = <1200000>;
191				regulator-max-microvolt = <1350000>;
192				regulator-always-on;
193				regulator-initial-mode = <0>;
194				regulator-over-current-protection;
195			};
196
197			vdd_ddr: buck2 {
198				regulator-name = "vdd_ddr";
199				regulator-min-microvolt = <1350000>;
200				regulator-max-microvolt = <1350000>;
201				regulator-always-on;
202				regulator-initial-mode = <0>;
203				regulator-over-current-protection;
204			};
205
206			vdd: buck3 {
207				regulator-name = "vdd";
208				regulator-min-microvolt = <3300000>;
209				regulator-max-microvolt = <3300000>;
210				regulator-always-on;
211				st,mask-reset;
212				regulator-initial-mode = <0>;
213				regulator-over-current-protection;
214			};
215
216			v3v3: buck4 {
217				regulator-name = "v3v3";
218				regulator-min-microvolt = <3300000>;
219				regulator-max-microvolt = <3300000>;
220				regulator-always-on;
221				regulator-over-current-protection;
222				regulator-initial-mode = <0>;
223			};
224
225			vdda: ldo1 {
226				regulator-name = "vdda";
227				regulator-min-microvolt = <2900000>;
228				regulator-max-microvolt = <2900000>;
229				interrupts = <IT_CURLIM_LDO1 0>;
230			};
231
232			v2v8: ldo2 {
233				regulator-name = "v2v8";
234				regulator-min-microvolt = <2800000>;
235				regulator-max-microvolt = <2800000>;
236				interrupts = <IT_CURLIM_LDO2 0>;
237			};
238
239			vtt_ddr: ldo3 {
240				regulator-name = "vtt_ddr";
241				regulator-min-microvolt = <500000>;
242				regulator-max-microvolt = <750000>;
243				regulator-always-on;
244				regulator-over-current-protection;
245			};
246
247			vdd_usb: ldo4 {
248				regulator-name = "vdd_usb";
 
 
249				interrupts = <IT_CURLIM_LDO4 0>;
250			};
251
252			vdd_sd: ldo5 {
253				regulator-name = "vdd_sd";
254				regulator-min-microvolt = <2900000>;
255				regulator-max-microvolt = <2900000>;
256				interrupts = <IT_CURLIM_LDO5 0>;
257				regulator-boot-on;
258			};
259
260			v1v8: ldo6 {
261				regulator-name = "v1v8";
262				regulator-min-microvolt = <1800000>;
263				regulator-max-microvolt = <1800000>;
264				interrupts = <IT_CURLIM_LDO6 0>;
265			};
266
267			vref_ddr: vref_ddr {
268				regulator-name = "vref_ddr";
269				regulator-always-on;
 
270			};
271
272			bst_out: boost {
273				regulator-name = "bst_out";
274				interrupts = <IT_OCP_BOOST 0>;
275			};
276
277			vbus_otg: pwr_sw1 {
278				regulator-name = "vbus_otg";
279				interrupts = <IT_OCP_OTG 0>;
280			 };
281
282			 vbus_sw: pwr_sw2 {
283				regulator-name = "vbus_sw";
284				interrupts = <IT_OCP_SWOUT 0>;
285				regulator-active-discharge = <1>;
286			 };
287		};
288
289		onkey {
290			compatible = "st,stpmic1-onkey";
291			interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
292			interrupt-names = "onkey-falling", "onkey-rising";
293			power-off-time-sec = <10>;
294			status = "okay";
295		};
296
297		watchdog {
298			compatible = "st,stpmic1-wdt";
299			status = "disabled";
300		};
301	};
302};
303
304&ipcc {
305	status = "okay";
306};
307
308&iwdg2 {
309	timeout-sec = <32>;
310	status = "okay";
311};
312
313&m4_rproc {
314	memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
315			<&vdev0vring1>, <&vdev0buffer>;
316	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
317	mbox-names = "vq0", "vq1", "shutdown", "detach";
318	interrupt-parent = <&exti>;
319	interrupts = <68 1>;
320	status = "okay";
321};
322
323&pwr_regulators {
324	vdd-supply = <&vdd>;
325	vdd_3v3_usbfs-supply = <&vdd_usb>;
326};
327
328&rng1 {
329	status = "okay";
330};
331
332&rtc {
333	status = "okay";
334};
335
336&sdmmc1 {
337	pinctrl-names = "default", "opendrain", "sleep";
338	pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
339	pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_a>;
340	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_a>;
341	cd-gpios = <&gpiog 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
342	disable-wp;
343	st,sig-dir;
344	st,neg-edge;
345	st,use-ckin;
346	bus-width = <4>;
347	vmmc-supply = <&vdd_sd>;
348	vqmmc-supply = <&sd_switch>;
349	sd-uhs-sdr12;
350	sd-uhs-sdr25;
351	sd-uhs-sdr50;
352	sd-uhs-ddr50;
353	status = "okay";
354};
355
356&sdmmc2 {
357	pinctrl-names = "default", "opendrain", "sleep";
358	pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
359	pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_a>;
360	pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>;
361	non-removable;
362	no-sd;
363	no-sdio;
364	st,neg-edge;
365	bus-width = <8>;
366	vmmc-supply = <&v3v3>;
367	vqmmc-supply = <&vdd>;
368	mmc-ddr-3_3v;
369	status = "okay";
370};
371
372&timers6 {
373	status = "okay";
374	/* spare dmas for other usage */
375	/delete-property/dmas;
376	/delete-property/dma-names;
377	timer@5 {
378		status = "okay";
379	};
380};
381
382&uart4 {
383	pinctrl-names = "default", "sleep", "idle";
384	pinctrl-0 = <&uart4_pins_a>;
385	pinctrl-1 = <&uart4_sleep_pins_a>;
386	pinctrl-2 = <&uart4_idle_pins_a>;
387	/delete-property/dmas;
388	/delete-property/dma-names;
389	status = "okay";
390};
391
392&usbotg_hs {
393	vbus-supply = <&vbus_otg>;
394};
395
396&usbphyc_port0 {
397	phy-supply = <&vdd_usb>;
 
 
398};
399
400&usbphyc_port1 {
401	phy-supply = <&vdd_usb>;
 
 
402};
v5.4
  1// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
  2/*
  3 * Copyright (C) STMicroelectronics 2017 - All Rights Reserved
  4 * Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.
  5 */
  6/dts-v1/;
  7
  8#include "stm32mp157c.dtsi"
  9#include "stm32mp157xaa-pinctrl.dtsi"
 
 
 10#include <dt-bindings/gpio/gpio.h>
 11#include <dt-bindings/mfd/st,stpmic1.h>
 12
 13/ {
 14	model = "STMicroelectronics STM32MP157C eval daughter";
 15	compatible = "st,stm32mp157c-ed1", "st,stm32mp157";
 16
 17	chosen {
 18		stdout-path = "serial0:115200n8";
 19	};
 20
 21	memory@c0000000 {
 22		device_type = "memory";
 23		reg = <0xC0000000 0x40000000>;
 24	};
 25
 26	reserved-memory {
 27		#address-cells = <1>;
 28		#size-cells = <1>;
 29		ranges;
 30
 31		mcuram2: mcuram2@10000000 {
 32			compatible = "shared-dma-pool";
 33			reg = <0x10000000 0x40000>;
 34			no-map;
 35		};
 36
 37		vdev0vring0: vdev0vring0@10040000 {
 38			compatible = "shared-dma-pool";
 39			reg = <0x10040000 0x1000>;
 40			no-map;
 41		};
 42
 43		vdev0vring1: vdev0vring1@10041000 {
 44			compatible = "shared-dma-pool";
 45			reg = <0x10041000 0x1000>;
 46			no-map;
 47		};
 48
 49		vdev0buffer: vdev0buffer@10042000 {
 50			compatible = "shared-dma-pool";
 51			reg = <0x10042000 0x4000>;
 52			no-map;
 53		};
 54
 55		mcuram: mcuram@30000000 {
 56			compatible = "shared-dma-pool";
 57			reg = <0x30000000 0x40000>;
 58			no-map;
 59		};
 60
 61		retram: retram@38000000 {
 62			compatible = "shared-dma-pool";
 63			reg = <0x38000000 0x10000>;
 64			no-map;
 65		};
 66
 67		gpu_reserved: gpu@e8000000 {
 68			reg = <0xe8000000 0x8000000>;
 69			no-map;
 70		};
 71	};
 72
 73	aliases {
 74		serial0 = &uart4;
 75	};
 76
 77	reg11: reg11 {
 78		compatible = "regulator-fixed";
 79		regulator-name = "reg11";
 80		regulator-min-microvolt = <1100000>;
 81		regulator-max-microvolt = <1100000>;
 82		regulator-always-on;
 83	};
 84
 85	reg18: reg18 {
 86		compatible = "regulator-fixed";
 87		regulator-name = "reg18";
 88		regulator-min-microvolt = <1800000>;
 89		regulator-max-microvolt = <1800000>;
 90		regulator-always-on;
 91	};
 92
 93	sd_switch: regulator-sd_switch {
 94		compatible = "regulator-gpio";
 95		regulator-name = "sd_switch";
 96		regulator-min-microvolt = <1800000>;
 97		regulator-max-microvolt = <2900000>;
 98		regulator-type = "voltage";
 99		regulator-always-on;
100
101		gpios = <&gpiof 14 GPIO_ACTIVE_HIGH>;
102		gpios-states = <0>;
103		states = <1800000 0x1 2900000 0x0>;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104	};
105};
106
107&dts {
108	status = "okay";
109};
110
111&gpu {
112	contiguous-area = <&gpu_reserved>;
 
 
 
113	status = "okay";
114};
115
116&i2c4 {
117	pinctrl-names = "default";
118	pinctrl-0 = <&i2c4_pins_a>;
 
119	i2c-scl-rising-time-ns = <185>;
120	i2c-scl-falling-time-ns = <20>;
 
121	status = "okay";
122	/* spare dmas for other usage */
123	/delete-property/dmas;
124	/delete-property/dma-names;
125
126	pmic: stpmic@33 {
127		compatible = "st,stpmic1";
128		reg = <0x33>;
129		interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
130		interrupt-controller;
131		#interrupt-cells = <2>;
132		status = "okay";
133
134		regulators {
135			compatible = "st,stpmic1-regulators";
 
 
 
 
136			ldo1-supply = <&v3v3>;
137			ldo2-supply = <&v3v3>;
138			ldo3-supply = <&vdd_ddr>;
 
139			ldo5-supply = <&v3v3>;
140			ldo6-supply = <&v3v3>;
 
 
141			pwr_sw1-supply = <&bst_out>;
142			pwr_sw2-supply = <&bst_out>;
143
144			vddcore: buck1 {
145				regulator-name = "vddcore";
146				regulator-min-microvolt = <800000>;
147				regulator-max-microvolt = <1350000>;
148				regulator-always-on;
149				regulator-initial-mode = <0>;
150				regulator-over-current-protection;
151			};
152
153			vdd_ddr: buck2 {
154				regulator-name = "vdd_ddr";
155				regulator-min-microvolt = <1350000>;
156				regulator-max-microvolt = <1350000>;
157				regulator-always-on;
158				regulator-initial-mode = <0>;
159				regulator-over-current-protection;
160			};
161
162			vdd: buck3 {
163				regulator-name = "vdd";
164				regulator-min-microvolt = <3300000>;
165				regulator-max-microvolt = <3300000>;
166				regulator-always-on;
167				st,mask-reset;
168				regulator-initial-mode = <0>;
169				regulator-over-current-protection;
170			};
171
172			v3v3: buck4 {
173				regulator-name = "v3v3";
174				regulator-min-microvolt = <3300000>;
175				regulator-max-microvolt = <3300000>;
176				regulator-always-on;
177				regulator-over-current-protection;
178				regulator-initial-mode = <0>;
179			};
180
181			vdda: ldo1 {
182				regulator-name = "vdda";
183				regulator-min-microvolt = <2900000>;
184				regulator-max-microvolt = <2900000>;
185				interrupts = <IT_CURLIM_LDO1 0>;
186			};
187
188			v2v8: ldo2 {
189				regulator-name = "v2v8";
190				regulator-min-microvolt = <2800000>;
191				regulator-max-microvolt = <2800000>;
192				interrupts = <IT_CURLIM_LDO2 0>;
193			};
194
195			vtt_ddr: ldo3 {
196				regulator-name = "vtt_ddr";
197				regulator-min-microvolt = <500000>;
198				regulator-max-microvolt = <750000>;
199				regulator-always-on;
200				regulator-over-current-protection;
201			};
202
203			vdd_usb: ldo4 {
204				regulator-name = "vdd_usb";
205				regulator-min-microvolt = <3300000>;
206				regulator-max-microvolt = <3300000>;
207				interrupts = <IT_CURLIM_LDO4 0>;
208			};
209
210			vdd_sd: ldo5 {
211				regulator-name = "vdd_sd";
212				regulator-min-microvolt = <2900000>;
213				regulator-max-microvolt = <2900000>;
214				interrupts = <IT_CURLIM_LDO5 0>;
215				regulator-boot-on;
216			};
217
218			v1v8: ldo6 {
219				regulator-name = "v1v8";
220				regulator-min-microvolt = <1800000>;
221				regulator-max-microvolt = <1800000>;
222				interrupts = <IT_CURLIM_LDO6 0>;
223			};
224
225			vref_ddr: vref_ddr {
226				regulator-name = "vref_ddr";
227				regulator-always-on;
228				regulator-over-current-protection;
229			};
230
231			bst_out: boost {
232				regulator-name = "bst_out";
233				interrupts = <IT_OCP_BOOST 0>;
234			};
235
236			vbus_otg: pwr_sw1 {
237				regulator-name = "vbus_otg";
238				interrupts = <IT_OCP_OTG 0>;
239			 };
240
241			 vbus_sw: pwr_sw2 {
242				regulator-name = "vbus_sw";
243				interrupts = <IT_OCP_SWOUT 0>;
244				regulator-active-discharge;
245			 };
246		};
247
248		onkey {
249			compatible = "st,stpmic1-onkey";
250			interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
251			interrupt-names = "onkey-falling", "onkey-rising";
252			power-off-time-sec = <10>;
253			status = "okay";
254		};
255
256		watchdog {
257			compatible = "st,stpmic1-wdt";
258			status = "disabled";
259		};
260	};
261};
262
263&ipcc {
264	status = "okay";
265};
266
267&iwdg2 {
268	timeout-sec = <32>;
269	status = "okay";
270};
271
272&m4_rproc {
273	memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
274			<&vdev0vring1>, <&vdev0buffer>;
275	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
276	mbox-names = "vq0", "vq1", "shutdown";
277	interrupt-parent = <&exti>;
278	interrupts = <68 1>;
279	status = "okay";
280};
281
 
 
 
 
 
282&rng1 {
283	status = "okay";
284};
285
286&rtc {
287	status = "okay";
288};
289
290&sdmmc1 {
291	pinctrl-names = "default", "opendrain", "sleep";
292	pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
293	pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_a>;
294	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_a>;
295	broken-cd;
 
296	st,sig-dir;
297	st,neg-edge;
298	st,use-ckin;
299	bus-width = <4>;
300	vmmc-supply = <&vdd_sd>;
301	vqmmc-supply = <&sd_switch>;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
302	status = "okay";
303};
304
305&timers6 {
306	status = "okay";
307	/* spare dmas for other usage */
308	/delete-property/dmas;
309	/delete-property/dma-names;
310	timer@5 {
311		status = "okay";
312	};
313};
314
315&uart4 {
316	pinctrl-names = "default";
317	pinctrl-0 = <&uart4_pins_a>;
 
 
 
 
318	status = "okay";
319};
320
 
 
 
 
321&usbphyc_port0 {
322	phy-supply = <&vdd_usb>;
323	vdda1v1-supply = <&reg11>;
324	vdda1v8-supply = <&reg18>;
325};
326
327&usbphyc_port1 {
328	phy-supply = <&vdd_usb>;
329	vdda1v1-supply = <&reg11>;
330	vdda1v8-supply = <&reg18>;
331};