xref: /rk3399_ARM-atf/fdts/stm32mp15xx-osd32.dtsi (revision 78ff36192f7dd4defa874d8f4387ec94cfcd20ee)
12fbb6064SAhmad Fatoum/* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause) */
22fbb6064SAhmad Fatoum/*
3b8816d3cSYann Gautier * Copyright (C) 2020-2024 STMicroelectronics - All Rights Reserved
42fbb6064SAhmad Fatoum * Copyright (C) 2020 Ahmad Fatoum, Pengutronix
52fbb6064SAhmad Fatoum */
62fbb6064SAhmad Fatoum
72fbb6064SAhmad Fatoum#include "stm32mp15-pinctrl.dtsi"
82fbb6064SAhmad Fatoum
92fbb6064SAhmad Fatoum&i2c4 {
102fbb6064SAhmad Fatoum	pinctrl-names = "default";
112fbb6064SAhmad Fatoum	pinctrl-0 = <&i2c4_pins_a>;
122fbb6064SAhmad Fatoum	clock-frequency = <400000>;
132fbb6064SAhmad Fatoum	i2c-scl-rising-time-ns = <185>;
142fbb6064SAhmad Fatoum	i2c-scl-falling-time-ns = <20>;
152fbb6064SAhmad Fatoum	status = "okay";
162fbb6064SAhmad Fatoum
172fbb6064SAhmad Fatoum	pmic: stpmic@33 {
182fbb6064SAhmad Fatoum		compatible = "st,stpmic1";
192fbb6064SAhmad Fatoum		reg = <0x33>;
202fbb6064SAhmad Fatoum		interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
212fbb6064SAhmad Fatoum		interrupt-controller;
222fbb6064SAhmad Fatoum		#interrupt-cells = <2>;
232fbb6064SAhmad Fatoum
242fbb6064SAhmad Fatoum		regulators {
252fbb6064SAhmad Fatoum			compatible = "st,stpmic1-regulators";
262fbb6064SAhmad Fatoum
272fbb6064SAhmad Fatoum			ldo1-supply = <&v3v3>;
282fbb6064SAhmad Fatoum			ldo6-supply = <&v3v3>;
292fbb6064SAhmad Fatoum			pwr_sw1-supply = <&bst_out>;
302fbb6064SAhmad Fatoum
312fbb6064SAhmad Fatoum			vddcore: buck1 {
322fbb6064SAhmad Fatoum				regulator-name = "vddcore";
332fbb6064SAhmad Fatoum				regulator-min-microvolt = <1200000>;
342fbb6064SAhmad Fatoum				regulator-max-microvolt = <1350000>;
352fbb6064SAhmad Fatoum				regulator-always-on;
362fbb6064SAhmad Fatoum				regulator-initial-mode = <0>;
372fbb6064SAhmad Fatoum				regulator-over-current-protection;
382fbb6064SAhmad Fatoum			};
392fbb6064SAhmad Fatoum
402fbb6064SAhmad Fatoum			vdd_ddr: buck2 {
412fbb6064SAhmad Fatoum				regulator-name = "vdd_ddr";
422fbb6064SAhmad Fatoum				regulator-min-microvolt = <1350000>;
432fbb6064SAhmad Fatoum				regulator-max-microvolt = <1350000>;
442fbb6064SAhmad Fatoum				regulator-always-on;
452fbb6064SAhmad Fatoum				regulator-initial-mode = <0>;
462fbb6064SAhmad Fatoum				regulator-over-current-protection;
472fbb6064SAhmad Fatoum			};
482fbb6064SAhmad Fatoum
492fbb6064SAhmad Fatoum			vdd: buck3 {
502fbb6064SAhmad Fatoum				regulator-name = "vdd";
512fbb6064SAhmad Fatoum				regulator-min-microvolt = <3300000>;
522fbb6064SAhmad Fatoum				regulator-max-microvolt = <3300000>;
532fbb6064SAhmad Fatoum				regulator-always-on;
542fbb6064SAhmad Fatoum				st,mask-reset;
552fbb6064SAhmad Fatoum				regulator-initial-mode = <0>;
562fbb6064SAhmad Fatoum				regulator-over-current-protection;
572fbb6064SAhmad Fatoum			};
582fbb6064SAhmad Fatoum
592fbb6064SAhmad Fatoum			v3v3: buck4 {
602fbb6064SAhmad Fatoum				regulator-name = "v3v3";
612fbb6064SAhmad Fatoum				regulator-min-microvolt = <3300000>;
622fbb6064SAhmad Fatoum				regulator-max-microvolt = <3300000>;
632fbb6064SAhmad Fatoum				regulator-always-on;
642fbb6064SAhmad Fatoum				regulator-over-current-protection;
652fbb6064SAhmad Fatoum				regulator-initial-mode = <0>;
662fbb6064SAhmad Fatoum			};
672fbb6064SAhmad Fatoum
682fbb6064SAhmad Fatoum			v1v8_audio: ldo1 {
692fbb6064SAhmad Fatoum				regulator-name = "v1v8_audio";
702fbb6064SAhmad Fatoum				regulator-min-microvolt = <1800000>;
712fbb6064SAhmad Fatoum				regulator-max-microvolt = <1800000>;
722fbb6064SAhmad Fatoum				regulator-always-on;
732fbb6064SAhmad Fatoum			};
742fbb6064SAhmad Fatoum
752fbb6064SAhmad Fatoum			v3v3_hdmi: ldo2 {
762fbb6064SAhmad Fatoum				regulator-name = "v3v3_hdmi";
772fbb6064SAhmad Fatoum				regulator-min-microvolt = <3300000>;
782fbb6064SAhmad Fatoum				regulator-max-microvolt = <3300000>;
792fbb6064SAhmad Fatoum				regulator-always-on;
802fbb6064SAhmad Fatoum			};
812fbb6064SAhmad Fatoum
822fbb6064SAhmad Fatoum			vtt_ddr: ldo3 {
832fbb6064SAhmad Fatoum				regulator-name = "vtt_ddr";
842fbb6064SAhmad Fatoum				regulator-always-on;
852fbb6064SAhmad Fatoum				regulator-over-current-protection;
869eed71b7SAhmad Fatoum				st,regulator-sink-source;
872fbb6064SAhmad Fatoum			};
882fbb6064SAhmad Fatoum
892fbb6064SAhmad Fatoum			vdd_usb: ldo4 {
902fbb6064SAhmad Fatoum				regulator-name = "vdd_usb";
912fbb6064SAhmad Fatoum				regulator-min-microvolt = <3300000>;
922fbb6064SAhmad Fatoum				regulator-max-microvolt = <3300000>;
932fbb6064SAhmad Fatoum			};
942fbb6064SAhmad Fatoum
952fbb6064SAhmad Fatoum			vdda: ldo5 {
962fbb6064SAhmad Fatoum				regulator-name = "vdda";
972fbb6064SAhmad Fatoum				regulator-min-microvolt = <2900000>;
982fbb6064SAhmad Fatoum				regulator-max-microvolt = <2900000>;
992fbb6064SAhmad Fatoum				regulator-boot-on;
1002fbb6064SAhmad Fatoum			};
1012fbb6064SAhmad Fatoum
1022fbb6064SAhmad Fatoum			v1v2_hdmi: ldo6 {
1032fbb6064SAhmad Fatoum				regulator-name = "v1v2_hdmi";
1042fbb6064SAhmad Fatoum				regulator-min-microvolt = <1200000>;
1052fbb6064SAhmad Fatoum				regulator-max-microvolt = <1200000>;
1062fbb6064SAhmad Fatoum				regulator-always-on;
1072fbb6064SAhmad Fatoum			};
1082fbb6064SAhmad Fatoum
1092fbb6064SAhmad Fatoum			vref_ddr: vref_ddr {
1102fbb6064SAhmad Fatoum				regulator-name = "vref_ddr";
1112fbb6064SAhmad Fatoum				regulator-always-on;
1122fbb6064SAhmad Fatoum			};
1132fbb6064SAhmad Fatoum
1142fbb6064SAhmad Fatoum			bst_out: boost {
1152fbb6064SAhmad Fatoum				regulator-name = "bst_out";
1162fbb6064SAhmad Fatoum			};
1172fbb6064SAhmad Fatoum
1182fbb6064SAhmad Fatoum			vbus_otg: pwr_sw1 {
1192fbb6064SAhmad Fatoum				regulator-name = "vbus_otg";
1202fbb6064SAhmad Fatoum				regulator-active-discharge;
1212fbb6064SAhmad Fatoum			};
1222fbb6064SAhmad Fatoum
1232fbb6064SAhmad Fatoum			vbus_sw: pwr_sw2 {
1242fbb6064SAhmad Fatoum				regulator-name = "vbus_sw";
1252fbb6064SAhmad Fatoum				regulator-active-discharge;
1262fbb6064SAhmad Fatoum			};
1272fbb6064SAhmad Fatoum		};
1282fbb6064SAhmad Fatoum
1292fbb6064SAhmad Fatoum		pmic_watchdog: watchdog {
1302fbb6064SAhmad Fatoum			compatible = "st,stpmic1-wdt";
1312fbb6064SAhmad Fatoum			status = "disabled";
1322fbb6064SAhmad Fatoum		};
1332fbb6064SAhmad Fatoum	};
1342fbb6064SAhmad Fatoum};
1352fbb6064SAhmad Fatoum
1362fbb6064SAhmad Fatoum&rng1 {
1372fbb6064SAhmad Fatoum	status = "okay";
1382fbb6064SAhmad Fatoum};
1392fbb6064SAhmad Fatoum
1402fbb6064SAhmad Fatoum/* ATF Specific */
1412fbb6064SAhmad Fatoum#include <dt-bindings/clock/stm32mp1-clksrc.h>
1422fbb6064SAhmad Fatoum
1432fbb6064SAhmad Fatoum/ {
1442fbb6064SAhmad Fatoum	aliases {
1452fbb6064SAhmad Fatoum		gpio0 = &gpioa;
1462fbb6064SAhmad Fatoum		gpio1 = &gpiob;
1472fbb6064SAhmad Fatoum		gpio2 = &gpioc;
1482fbb6064SAhmad Fatoum		gpio3 = &gpiod;
1492fbb6064SAhmad Fatoum		gpio4 = &gpioe;
1502fbb6064SAhmad Fatoum		gpio5 = &gpiof;
1512fbb6064SAhmad Fatoum		gpio6 = &gpiog;
1522fbb6064SAhmad Fatoum		gpio7 = &gpioh;
1532fbb6064SAhmad Fatoum		gpio8 = &gpioi;
1542fbb6064SAhmad Fatoum		gpio25 = &gpioz;
1552fbb6064SAhmad Fatoum		i2c3 = &i2c4;
1562fbb6064SAhmad Fatoum	};
1572fbb6064SAhmad Fatoum};
1582fbb6064SAhmad Fatoum
1592fbb6064SAhmad Fatoum&bsec {
160b8816d3cSYann Gautier	board_id: board-id@ec {
1612fbb6064SAhmad Fatoum		reg = <0xec 0x4>;
1622fbb6064SAhmad Fatoum		st,non-secure-otp;
1632fbb6064SAhmad Fatoum	};
1642fbb6064SAhmad Fatoum};
1652fbb6064SAhmad Fatoum
1662fbb6064SAhmad Fatoum&clk_hse {
1672fbb6064SAhmad Fatoum	st,digbypass;
1682fbb6064SAhmad Fatoum};
1692fbb6064SAhmad Fatoum
1702fbb6064SAhmad Fatoum&cpu0 {
1712fbb6064SAhmad Fatoum	cpu-supply = <&vddcore>;
1722fbb6064SAhmad Fatoum};
1732fbb6064SAhmad Fatoum
1742fbb6064SAhmad Fatoum&cpu1 {
1752fbb6064SAhmad Fatoum	cpu-supply = <&vddcore>;
1762fbb6064SAhmad Fatoum};
1772fbb6064SAhmad Fatoum
1782fbb6064SAhmad Fatoum&hash1 {
1792fbb6064SAhmad Fatoum	status = "okay";
1802fbb6064SAhmad Fatoum};
1812fbb6064SAhmad Fatoum
1822fbb6064SAhmad Fatoum/* CLOCK init */
1832fbb6064SAhmad Fatoum&rcc {
1842fbb6064SAhmad Fatoum	st,clksrc = <
1852fbb6064SAhmad Fatoum		CLK_MPU_PLL1P
1862fbb6064SAhmad Fatoum		CLK_AXI_PLL2P
1872fbb6064SAhmad Fatoum		CLK_MCU_PLL3P
1882fbb6064SAhmad Fatoum		CLK_RTC_LSE
1892fbb6064SAhmad Fatoum		CLK_MCO1_DISABLED
1902fbb6064SAhmad Fatoum		CLK_MCO2_DISABLED
1912fbb6064SAhmad Fatoum		CLK_CKPER_HSE
1922fbb6064SAhmad Fatoum		CLK_FMC_ACLK
1932fbb6064SAhmad Fatoum		CLK_QSPI_ACLK
1942fbb6064SAhmad Fatoum		CLK_ETH_PLL4P
1952fbb6064SAhmad Fatoum		CLK_SDMMC12_PLL4P
1962fbb6064SAhmad Fatoum		CLK_DSI_DSIPLL
1972fbb6064SAhmad Fatoum		CLK_STGEN_HSE
1982fbb6064SAhmad Fatoum		CLK_USBPHY_HSE
1992fbb6064SAhmad Fatoum		CLK_SPI2S1_PLL3Q
2002fbb6064SAhmad Fatoum		CLK_SPI2S23_PLL3Q
2012fbb6064SAhmad Fatoum		CLK_SPI45_HSI
2022fbb6064SAhmad Fatoum		CLK_SPI6_HSI
2032fbb6064SAhmad Fatoum		CLK_I2C46_HSI
2042fbb6064SAhmad Fatoum		CLK_SDMMC3_PLL4P
2052fbb6064SAhmad Fatoum		CLK_USBO_USBPHY
2062fbb6064SAhmad Fatoum		CLK_ADC_CKPER
2072fbb6064SAhmad Fatoum		CLK_CEC_LSE
2082fbb6064SAhmad Fatoum		CLK_I2C12_HSI
2092fbb6064SAhmad Fatoum		CLK_I2C35_HSI
2102fbb6064SAhmad Fatoum		CLK_UART1_HSI
2112fbb6064SAhmad Fatoum		CLK_UART24_HSI
2122fbb6064SAhmad Fatoum		CLK_UART35_HSI
2132fbb6064SAhmad Fatoum		CLK_UART6_HSI
2142fbb6064SAhmad Fatoum		CLK_UART78_HSI
2152fbb6064SAhmad Fatoum		CLK_SPDIF_PLL4P
2162fbb6064SAhmad Fatoum		CLK_FDCAN_PLL4R
2172fbb6064SAhmad Fatoum		CLK_SAI1_PLL3Q
2182fbb6064SAhmad Fatoum		CLK_SAI2_PLL3Q
2192fbb6064SAhmad Fatoum		CLK_SAI3_PLL3Q
2202fbb6064SAhmad Fatoum		CLK_SAI4_PLL3Q
221d594239dSLionel Debieve		CLK_RNG1_CSI
2222fbb6064SAhmad Fatoum		CLK_RNG2_LSI
2232fbb6064SAhmad Fatoum		CLK_LPTIM1_PCLK1
2242fbb6064SAhmad Fatoum		CLK_LPTIM23_PCLK3
2252fbb6064SAhmad Fatoum		CLK_LPTIM45_LSE
2262fbb6064SAhmad Fatoum	>;
2272fbb6064SAhmad Fatoum
228*4391e5edSGabriel Fernandez	st,clkdiv = <
229*4391e5edSGabriel Fernandez		DIV(DIV_MPU, 1)
230*4391e5edSGabriel Fernandez		DIV(DIV_AXI, 0)
231*4391e5edSGabriel Fernandez		DIV(DIV_MCU, 0)
232*4391e5edSGabriel Fernandez		DIV(DIV_APB1, 1)
233*4391e5edSGabriel Fernandez		DIV(DIV_APB2, 1)
234*4391e5edSGabriel Fernandez		DIV(DIV_APB3, 1)
235*4391e5edSGabriel Fernandez		DIV(DIV_APB4, 1)
236*4391e5edSGabriel Fernandez		DIV(DIV_APB5, 2)
237*4391e5edSGabriel Fernandez		DIV(DIV_RTC, 23)
238*4391e5edSGabriel Fernandez		DIV(DIV_MCO1, 0)
239*4391e5edSGabriel Fernandez		DIV(DIV_MCO2, 0)
240*4391e5edSGabriel Fernandez	>;
241*4391e5edSGabriel Fernandez
242*4391e5edSGabriel Fernandez	st,pll_vco {
243*4391e5edSGabriel Fernandez		pll2_vco_1066Mhz: pll2-vco-1066Mhz {
244*4391e5edSGabriel Fernandez			src = <CLK_PLL12_HSE>;
245*4391e5edSGabriel Fernandez			divmn = <2 65>;
246*4391e5edSGabriel Fernandez			frac = <0x1400>;
247*4391e5edSGabriel Fernandez		};
248*4391e5edSGabriel Fernandez
249*4391e5edSGabriel Fernandez		pll3_vco_417Mhz: pll3-vco-417Mhz {
250*4391e5edSGabriel Fernandez			src = <CLK_PLL3_HSE>;
251*4391e5edSGabriel Fernandez			divmn = <1 33>;
252*4391e5edSGabriel Fernandez			frac = <0x1a04>;
253*4391e5edSGabriel Fernandez		};
254*4391e5edSGabriel Fernandez
255*4391e5edSGabriel Fernandez		pll4_vco_594Mhz: pll4-vco-594Mhz {
256*4391e5edSGabriel Fernandez			src = <CLK_PLL4_HSE>;
257*4391e5edSGabriel Fernandez			divmn = <3 98>;
258*4391e5edSGabriel Fernandez		};
259*4391e5edSGabriel Fernandez	};
260*4391e5edSGabriel Fernandez
2612fbb6064SAhmad Fatoum	/* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
2622fbb6064SAhmad Fatoum	pll2: st,pll@1 {
2632fbb6064SAhmad Fatoum		compatible = "st,stm32mp1-pll";
2642fbb6064SAhmad Fatoum		reg = <1>;
265*4391e5edSGabriel Fernandez
266*4391e5edSGabriel Fernandez		st,pll = <&pll2_cfg1>;
267*4391e5edSGabriel Fernandez
268*4391e5edSGabriel Fernandez		pll2_cfg1: pll2_cfg1 {
269*4391e5edSGabriel Fernandez			st,pll_vco = <&pll2_vco_1066Mhz>;
270*4391e5edSGabriel Fernandez			st,pll_div_pqr = <1 0 0>;
271*4391e5edSGabriel Fernandez		};
2722fbb6064SAhmad Fatoum	};
2732fbb6064SAhmad Fatoum
2742fbb6064SAhmad Fatoum	/* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
2752fbb6064SAhmad Fatoum	pll3: st,pll@2 {
2762fbb6064SAhmad Fatoum		compatible = "st,stm32mp1-pll";
2772fbb6064SAhmad Fatoum		reg = <2>;
278*4391e5edSGabriel Fernandez
279*4391e5edSGabriel Fernandez		st,pll = <&pll3_cfg1>;
280*4391e5edSGabriel Fernandez
281*4391e5edSGabriel Fernandez		pll3_cfg1: pll3_cfg1 {
282*4391e5edSGabriel Fernandez			st,pll_vco = <&pll3_vco_417Mhz>;
283*4391e5edSGabriel Fernandez			st,pll_div_pqr = <1 16 36>;
284*4391e5edSGabriel Fernandez		};
2852fbb6064SAhmad Fatoum	};
2862fbb6064SAhmad Fatoum
2872fbb6064SAhmad Fatoum	/* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */
2882fbb6064SAhmad Fatoum	pll4: st,pll@3 {
2892fbb6064SAhmad Fatoum		compatible = "st,stm32mp1-pll";
2902fbb6064SAhmad Fatoum		reg = <3>;
291*4391e5edSGabriel Fernandez
292*4391e5edSGabriel Fernandez		st,pll = <&pll4_cfg1>;
293*4391e5edSGabriel Fernandez
294*4391e5edSGabriel Fernandez		pll4_cfg1: pll4_cfg1 {
295*4391e5edSGabriel Fernandez			st,pll_vco = <&pll4_vco_594Mhz>;
296*4391e5edSGabriel Fernandez			st,pll_div_pqr = <5 7 7>;
297*4391e5edSGabriel Fernandez		};
2982fbb6064SAhmad Fatoum	};
2992fbb6064SAhmad Fatoum};
300