xref: /freebsd/sys/contrib/device-tree/src/arm/st/stm32mp157c-odyssey-som.dtsi (revision a8089ea5aee578e08acab2438e82fc9a9ae50ed8)
1// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2/*
3 * Copyright (C) 2020 Marcin Sloniewski <marcin.sloniewski@gmail.com>.
4 */
5
6/dts-v1/;
7
8#include "stm32mp157.dtsi"
9#include "stm32mp15xc.dtsi"
10#include "stm32mp15-pinctrl.dtsi"
11#include "stm32mp15xxac-pinctrl.dtsi"
12#include <dt-bindings/gpio/gpio.h>
13#include <dt-bindings/leds/common.h>
14#include <dt-bindings/mfd/st,stpmic1.h>
15
16/ {
17	model = "Seeed Studio Odyssey-STM32MP157C SOM";
18	compatible = "seeed,stm32mp157c-odyssey-som", "st,stm32mp157";
19
20	memory@c0000000 {
21		device_type = "memory";
22		reg = <0xc0000000 0x20000000>;
23	};
24
25	reserved-memory {
26		#address-cells = <1>;
27		#size-cells = <1>;
28		ranges;
29
30		mcuram2: mcuram2@10000000 {
31			compatible = "shared-dma-pool";
32			reg = <0x10000000 0x40000>;
33			no-map;
34		};
35
36		vdev0vring0: vdev0vring0@10040000 {
37			compatible = "shared-dma-pool";
38			reg = <0x10040000 0x1000>;
39			no-map;
40		};
41
42		vdev0vring1: vdev0vring1@10041000 {
43			compatible = "shared-dma-pool";
44			reg = <0x10041000 0x1000>;
45			no-map;
46		};
47
48		vdev0buffer: vdev0buffer@10042000 {
49			compatible = "shared-dma-pool";
50			reg = <0x10042000 0x4000>;
51			no-map;
52		};
53
54		mcuram: mcuram@30000000 {
55			compatible = "shared-dma-pool";
56			reg = <0x30000000 0x40000>;
57			no-map;
58		};
59
60		retram: retram@38000000 {
61			compatible = "shared-dma-pool";
62			reg = <0x38000000 0x10000>;
63			no-map;
64		};
65	};
66
67	led {
68		compatible = "gpio-leds";
69		led-blue {
70			color = <LED_COLOR_ID_BLUE>;
71			function = LED_FUNCTION_HEARTBEAT;
72			gpios = <&gpiog 3 GPIO_ACTIVE_HIGH>;
73			linux,default-trigger = "heartbeat";
74		};
75	};
76};
77
78&i2c2 {
79	pinctrl-names = "default";
80	pinctrl-0 = <&i2c2_pins_a>;
81	i2c-scl-rising-time-ns = <185>;
82	i2c-scl-falling-time-ns = <20>;
83	status = "okay";
84	/* spare dmas for other usage */
85	/delete-property/dmas;
86	/delete-property/dma-names;
87
88	pmic: stpmic@33 {
89		compatible = "st,stpmic1";
90		reg = <0x33>;
91		interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
92		interrupt-controller;
93		#interrupt-cells = <2>;
94
95		regulators {
96			compatible = "st,stpmic1-regulators";
97			ldo1-supply = <&v3v3>;
98			ldo3-supply = <&vdd_ddr>;
99			ldo6-supply = <&v3v3>;
100			pwr_sw1-supply = <&bst_out>;
101			pwr_sw2-supply = <&bst_out>;
102
103			vddcore: buck1 {
104				regulator-name = "vddcore";
105				regulator-min-microvolt = <800000>;
106				regulator-max-microvolt = <1350000>;
107				regulator-always-on;
108				regulator-initial-mode = <0>;
109				regulator-over-current-protection;
110			};
111
112			vdd_ddr: buck2 {
113				regulator-name = "vdd_ddr";
114				regulator-min-microvolt = <1350000>;
115				regulator-max-microvolt = <1350000>;
116				regulator-always-on;
117				regulator-initial-mode = <0>;
118				regulator-over-current-protection;
119			};
120
121			vdd: buck3 {
122				regulator-name = "vdd";
123				regulator-min-microvolt = <3300000>;
124				regulator-max-microvolt = <3300000>;
125				regulator-always-on;
126				st,mask-reset;
127				regulator-initial-mode = <0>;
128				regulator-over-current-protection;
129			};
130
131			v3v3: buck4 {
132				regulator-name = "v3v3";
133				regulator-min-microvolt = <3300000>;
134				regulator-max-microvolt = <3300000>;
135				regulator-always-on;
136				regulator-over-current-protection;
137				regulator-initial-mode = <0>;
138			};
139
140			v1v8_audio: ldo1 {
141				regulator-name = "v1v8_audio";
142				regulator-min-microvolt = <1800000>;
143				regulator-max-microvolt = <1800000>;
144				regulator-always-on;
145				interrupts = <IT_CURLIM_LDO1 0>;
146			};
147
148			v3v3_hdmi: ldo2 {
149				regulator-name = "v3v3_hdmi";
150				regulator-min-microvolt = <3300000>;
151				regulator-max-microvolt = <3300000>;
152				regulator-always-on;
153				interrupts = <IT_CURLIM_LDO2 0>;
154			};
155
156			vtt_ddr: ldo3 {
157				regulator-name = "vtt_ddr";
158				regulator-min-microvolt = <500000>;
159				regulator-max-microvolt = <750000>;
160				regulator-always-on;
161				regulator-over-current-protection;
162			};
163
164			vdd_usb: ldo4 {
165				regulator-name = "vdd_usb";
166				interrupts = <IT_CURLIM_LDO4 0>;
167			};
168
169			vdda: ldo5 {
170				regulator-name = "vdda";
171				regulator-min-microvolt = <2900000>;
172				regulator-max-microvolt = <2900000>;
173				interrupts = <IT_CURLIM_LDO5 0>;
174				regulator-boot-on;
175			};
176
177			v1v2_hdmi: ldo6 {
178				regulator-name = "v1v2_hdmi";
179				regulator-min-microvolt = <1200000>;
180				regulator-max-microvolt = <1200000>;
181				regulator-always-on;
182				interrupts = <IT_CURLIM_LDO6 0>;
183			};
184
185			vref_ddr: vref_ddr {
186				regulator-name = "vref_ddr";
187				regulator-always-on;
188			};
189
190			 bst_out: boost {
191				regulator-name = "bst_out";
192				interrupts = <IT_OCP_BOOST 0>;
193			 };
194
195			vbus_otg: pwr_sw1 {
196				regulator-name = "vbus_otg";
197				interrupts = <IT_OCP_OTG 0>;
198			 };
199
200			 vbus_sw: pwr_sw2 {
201				regulator-name = "vbus_sw";
202				interrupts = <IT_OCP_SWOUT 0>;
203				regulator-active-discharge = <1>;
204			 };
205		};
206
207		onkey {
208			compatible = "st,stpmic1-onkey";
209			interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
210			interrupt-names = "onkey-falling", "onkey-rising";
211			power-off-time-sec = <10>;
212		};
213
214		watchdog {
215			compatible = "st,stpmic1-wdt";
216			status = "disabled";
217		};
218	};
219};
220
221&ipcc {
222	status = "okay";
223};
224
225&iwdg2 {
226	timeout-sec = <32>;
227	status = "okay";
228};
229
230&m4_rproc {
231	memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
232			<&vdev0vring1>, <&vdev0buffer>;
233	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
234	mbox-names = "vq0", "vq1", "shutdown";
235	interrupt-parent = <&exti>;
236	interrupts = <68 1>;
237	status = "okay";
238};
239
240&rng1 {
241	status = "okay";
242};
243
244&rtc {
245	status = "okay";
246};
247
248&sdmmc2 {
249	pinctrl-names = "default", "opendrain", "sleep";
250	pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_d>;
251	pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_d>;
252	pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_d>;
253	non-removable;
254	no-sd;
255	no-sdio;
256	st,neg-edge;
257	bus-width = <8>;
258	vmmc-supply = <&v3v3>;
259	vqmmc-supply = <&vdd>;
260	mmc-ddr-3_3v;
261	status = "okay";
262};
263
264