1// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
2/*
3 * Copyright (C) Linaro Ltd 2019 - All Rights Reserved
4 * Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
5 * Copyright (C) 2020 Marek Vasut <marex@denx.de>
6 */
7/dts-v1/;
8
9#include "stm32mp157.dtsi"
10#include "stm32mp15-pinctrl.dtsi"
11#include "stm32mp15xxac-pinctrl.dtsi"
12#include <dt-bindings/gpio/gpio.h>
13#include <dt-bindings/mfd/st,stpmic1.h>
14
15/ {
16	aliases {
17		spi0 = &qspi;
18	};
19
20	memory@c0000000 {
21		device_type = "memory";
22		reg = <0xc0000000 0x40000000>;
23	};
24};
25
26&i2c4 {
27	pinctrl-names = "default";
28	pinctrl-0 = <&i2c4_pins_a>;
29	i2c-scl-rising-time-ns = <185>;
30	i2c-scl-falling-time-ns = <20>;
31	status = "okay";
32	/delete-property/dmas;
33	/delete-property/dma-names;
34
35	pmic: stpmic@33 {
36		compatible = "st,stpmic1";
37		reg = <0x33>;
38		interrupts-extended = <&exti 55 IRQ_TYPE_EDGE_FALLING>;
39		interrupt-controller;
40		#interrupt-cells = <2>;
41		status = "okay";
42
43		regulators {
44			compatible = "st,stpmic1-regulators";
45
46			ldo1-supply = <&v3v3>;
47			ldo2-supply = <&v3v3>;
48			ldo3-supply = <&vdd_ddr>;
49			ldo5-supply = <&v3v3>;
50			ldo6-supply = <&v3v3>;
51			pwr_sw1-supply = <&bst_out>;
52			pwr_sw2-supply = <&bst_out>;
53
54			vddcore: buck1 {
55				regulator-name = "vddcore";
56				regulator-min-microvolt = <800000>;
57				regulator-max-microvolt = <1350000>;
58				regulator-always-on;
59				regulator-initial-mode = <0>;
60				regulator-over-current-protection;
61			};
62
63			vdd_ddr: buck2 {
64				regulator-name = "vdd_ddr";
65				regulator-min-microvolt = <1350000>;
66				regulator-max-microvolt = <1350000>;
67				regulator-always-on;
68				regulator-initial-mode = <0>;
69				regulator-over-current-protection;
70			};
71
72			vdd: buck3 {
73				regulator-name = "vdd";
74				regulator-min-microvolt = <2900000>;
75				regulator-max-microvolt = <2900000>;
76				regulator-always-on;
77				regulator-initial-mode = <0>;
78				regulator-over-current-protection;
79			};
80
81			v3v3: buck4 {
82				regulator-name = "v3v3";
83				regulator-min-microvolt = <3300000>;
84				regulator-max-microvolt = <3300000>;
85				regulator-always-on;
86				regulator-over-current-protection;
87				regulator-initial-mode = <0>;
88			};
89
90			vdda: ldo1 {
91				regulator-name = "vdda";
92				regulator-min-microvolt = <2900000>;
93				regulator-max-microvolt = <2900000>;
94				interrupts = <IT_CURLIM_LDO1 0>;
95				interrupt-parent = <&pmic>;
96			};
97
98			v2v8: ldo2 {
99				regulator-name = "v2v8";
100				regulator-min-microvolt = <2800000>;
101				regulator-max-microvolt = <2800000>;
102				interrupts = <IT_CURLIM_LDO2 0>;
103				interrupt-parent = <&pmic>;
104			};
105
106			vtt_ddr: ldo3 {
107				regulator-name = "vtt_ddr";
108				regulator-min-microvolt = <500000>;
109				regulator-max-microvolt = <750000>;
110				regulator-always-on;
111				regulator-over-current-protection;
112			};
113
114			vdd_usb: ldo4 {
115				regulator-name = "vdd_usb";
116				interrupts = <IT_CURLIM_LDO4 0>;
117				interrupt-parent = <&pmic>;
118			};
119
120			vdd_sd: ldo5 {
121				regulator-name = "vdd_sd";
122				regulator-min-microvolt = <2900000>;
123				regulator-max-microvolt = <2900000>;
124				interrupts = <IT_CURLIM_LDO5 0>;
125				interrupt-parent = <&pmic>;
126				regulator-boot-on;
127			};
128
129			v1v8: ldo6 {
130				regulator-name = "v1v8";
131				regulator-min-microvolt = <1800000>;
132				regulator-max-microvolt = <1800000>;
133				interrupts = <IT_CURLIM_LDO6 0>;
134				interrupt-parent = <&pmic>;
135				regulator-enable-ramp-delay = <300000>;
136			};
137
138			vref_ddr: vref_ddr {
139				regulator-name = "vref_ddr";
140				regulator-always-on;
141			};
142
143			bst_out: boost {
144				regulator-name = "bst_out";
145				interrupts = <IT_OCP_BOOST 0>;
146				interrupt-parent = <&pmic>;
147			};
148
149			vbus_otg: pwr_sw1 {
150				regulator-name = "vbus_otg";
151				interrupts = <IT_OCP_OTG 0>;
152				interrupt-parent = <&pmic>;
153				regulator-active-discharge = <1>;
154			};
155
156			vbus_sw: pwr_sw2 {
157				regulator-name = "vbus_sw";
158				interrupts = <IT_OCP_SWOUT 0>;
159				interrupt-parent = <&pmic>;
160				regulator-active-discharge = <1>;
161			};
162		};
163
164		onkey {
165			compatible = "st,stpmic1-onkey";
166			interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 1>;
167			interrupt-names = "onkey-falling", "onkey-rising";
168			status = "okay";
169		};
170
171		watchdog {
172			compatible = "st,stpmic1-wdt";
173			status = "disabled";
174		};
175	};
176};
177
178&iwdg2 {
179	timeout-sec = <32>;
180	status = "okay";
181};
182
183&pwr_regulators {
184	vdd-supply = <&vdd>;
185	vdd_3v3_usbfs-supply = <&vdd_usb>;
186};
187
188&qspi {
189	pinctrl-names = "default", "sleep";
190	pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>;
191	pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a>;
192	reg = <0x58003000 0x1000>, <0x70000000 0x200000>;
193	#address-cells = <1>;
194	#size-cells = <0>;
195	status = "okay";
196
197	flash0: spi-flash@0 {
198		compatible = "jedec,spi-nor";
199		reg = <0>;
200		spi-rx-bus-width = <4>;
201		spi-max-frequency = <108000000>;
202		#address-cells = <1>;
203		#size-cells = <1>;
204	};
205};
206
207&rng1 {
208	status = "okay";
209};
210
211&rtc {
212	status = "okay";
213};
214